XCB: Correctly report the created OpenGL context version and profile
authorSean Harmer <sean.harmer@kdab.com>
Tue, 18 Sep 2012 16:05:01 +0000 (17:05 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 26 Sep 2012 17:21:15 +0000 (19:21 +0200)
commitaad58ac87e371129ee61168effd9daa491b476ab
tree7dfd20e817f1003eb008b75f8d27bd9194fd76d3
parent61d853797bff92d206db0d7fa6666c116f5ff00f
XCB: Correctly report the created OpenGL context version and profile

This commit fixes the xcb qpa plugin such that it now correctly reports
the version and profile of the created OpenGL context in the
QOpenGLSurfaceFormat. To do this we have to create a temporary X window
so that we can make our new context current.

We also handle the buggy nVidia drivers which incorrectly report 0 for
the GL_CONTEXT_PROFILE_MASK query.

The reduced format is also copied back from qglx_findVisualInfo.

Change-Id: I6f34fe1c6130aebbb6b40c36df4acc216069d2b1
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
src/gui/kernel/qplatformopenglcontext.cpp
src/gui/kernel/qplatformopenglcontext.h
src/platformsupport/glxconvenience/qglxconvenience.cpp
src/plugins/platforms/xcb/qglxintegration.cpp