summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-18 20:00:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-19 12:15:14 +0200
commit5295459d0aff98f6817769b2eef279115e4ffad0 (patch)
tree8d50f3cc317a9255836b071b0a66316f4db1a1e6 /vcl/opengl
parentba91d344bbf81f9e9cc98e7a9bfef9f5e9cdeb07 (diff)
tdf#112166 need to check if glXCreateContextAttribsARB really exists
checking the glXCreateContextAttribsARB function pointer will just return the epoxy_glXCreateContextAttribsARB stub which always exists. Change-Id: I740cc680082102c1f9712cf5cc083e92b26f8865 Reviewed-on: https://gerrit.libreoffice.org/59300 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/x11/gdiimpl.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx
index 27539319ed03..bcb533b56bf8 100644
--- a/vcl/opengl/x11/gdiimpl.cxx
+++ b/vcl/opengl/x11/gdiimpl.cxx
@@ -297,7 +297,9 @@ bool X11OpenGLContext::ImplInit()
if (!g_vShareList.empty())
pSharedCtx = g_vShareList.front();
- if (glXCreateContextAttribsARB && !mbRequestLegacyContext)
+ //tdf#112166 for, e.g. VirtualBox GL, claiming OpenGL 2.1
+ static bool hasCreateContextAttribsARB = glXGetProcAddress(reinterpret_cast<const GLubyte*>("glXCreateContextAttribsARB")) != nullptr;
+ if (hasCreateContextAttribsARB && !mbRequestLegacyContext)
{
int best_fbc = -1;
GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering);