summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qglxintegration.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-02-10 10:23:15 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-10 16:24:47 +0100
commit38257651b7e2085ae66c1c67ee9e33e93587b573 (patch)
tree28a27f3a1f1faf410e37182ad7e30597745df78a /src/plugins/platforms/xcb/qglxintegration.cpp
parent7dca7c3c571ec595b792bbc2d2d448aac587886a (diff)
Properly read back the actual format in xcb and xlib plugins.
Change-Id: Iccef2c4a87863b93914b84edf3a6015dad5e512a Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qglxintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index 6ada127beb..0144caae3d 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -64,6 +64,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
: QPlatformOpenGLContext()
, m_screen(screen)
, m_context(0)
+ , m_format(format)
{
m_shareContext = 0;
if (share)
@@ -82,7 +83,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
if (m_context)
m_format = qglx_surfaceFormatFromGLXFBConfig(DISPLAY_FROM_XCB(screen), config, m_context);
} else {
- XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(m_screen), screen->screenNumber(), format);
+ XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(m_screen), screen->screenNumber(), &m_format);
if (!visualInfo)
qFatal("Could not initialize GLX");
m_context = glXCreateContext(DISPLAY_FROM_XCB(screen), visualInfo, m_shareContext, true);