diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-11-16 18:18:36 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-12-11 22:53:52 +0000 |
commit | 382eafb5f350111a430318f49594e6162ad49495 (patch) | |
tree | b9de36b419f3d98f864e98c7335ce315ffe323a0 /vcl/source | |
parent | 6c0e9a5bdd72bf4c9b51e9edcd44776f1595f826 (diff) |
Get Double-buffered context creation working on linux.
Change-Id: I3db1d6792fcd51577f047b82029124ec825ea319
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 4a68ab823bf7..fb50f90f89ad 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -705,9 +705,7 @@ bool GLWindow::HasGLXExtension( const char* name ) const bool OpenGLContext::ImplInit() { if (!m_aGLWin.dpy) - { return false; - } OpenGLZone aZone; @@ -721,11 +719,10 @@ bool OpenGLContext::ImplInit() if (!g_vShareList.empty()) pSharedCtx = g_vShareList.front(); -#ifdef DBG_UTIL if (glXCreateContextAttribsARB && !mbRequestLegacyContext) { int best_fbc = -1; - GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering, true); + GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering, false); if (!pFBC) return false; @@ -733,24 +730,28 @@ bool OpenGLContext::ImplInit() { int pContextAttribs[] = { +#if 0 // defined(DBG_UTIL) GLX_CONTEXT_MAJOR_VERSION_ARB, 3, GLX_CONTEXT_MINOR_VERSION_ARB, 2, +#endif None + }; m_aGLWin.ctx = glXCreateContextAttribsARB(m_aGLWin.dpy, pFBC[best_fbc], pSharedCtx, /* direct, not via X */ GL_TRUE, pContextAttribs); SAL_INFO_IF(m_aGLWin.ctx, "vcl.opengl", "created a 3.2 core context"); } else SAL_WARN("vcl.opengl", "unable to find correct FBC"); - } -#endif if (!m_aGLWin.ctx) { if (!m_aGLWin.vi) return false; + SAL_WARN("vcl.opengl", "attempting to create a non-double-buffered " + "visual matching the context"); + m_aGLWin.ctx = glXCreateContext(m_aGLWin.dpy, m_aGLWin.vi, pSharedCtx, |