diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2012-09-18 17:05:01 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-26 19:21:15 +0200 |
commit | aad58ac87e371129ee61168effd9daa491b476ab (patch) | |
tree | 7dfd20e817f1003eb008b75f8d27bd9194fd76d3 /src/gui/kernel/qplatformopenglcontext.h | |
parent | 61d853797bff92d206db0d7fa6666c116f5ff00f (diff) |
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>
Diffstat (limited to 'src/gui/kernel/qplatformopenglcontext.h')
-rw-r--r-- | src/gui/kernel/qplatformopenglcontext.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformopenglcontext.h b/src/gui/kernel/qplatformopenglcontext.h index ffdfaba15e..bed83b0913 100644 --- a/src/gui/kernel/qplatformopenglcontext.h +++ b/src/gui/kernel/qplatformopenglcontext.h @@ -88,6 +88,8 @@ public: QOpenGLContext *context() const; + static bool parseOpenGLVersion(const QString& versionString, int &major, int &minor); + private: friend class QOpenGLContext; |