summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qplatformopenglcontext.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2012-09-27 15:24:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-03 17:22:03 +0200
commit394249616cbb4c0861a032d33f846f85e2801677 (patch)
treed1b7b2b44041be92bbc47f3419866a823ed381c6 /src/gui/kernel/qplatformopenglcontext.h
parent84100c9085ddc30368582d02a4229d44622f85e2 (diff)
downloadqtbase-394249616cbb4c0861a032d33f846f85e2801677.tar.gz
OpenGL: Don't request a context version higher than is supported
The function wglCreateContextAttribsARB will fail if we request a context version higher than is supported. We therefore upper-bound the requested version by the version of the static context. This results in context creation succeeding and having the closest possible match to the requested format. The xcb qpa plugin is modified to operate similarly to the windows plugin in that it now creates a "static" context which is used to limit the versions of contexts requested by the user. Change-Id: I277ad7cc82edfdf7b9d8502ad921c8175feb1a4a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformopenglcontext.h')
-rw-r--r--src/gui/kernel/qplatformopenglcontext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformopenglcontext.h b/src/gui/kernel/qplatformopenglcontext.h
index bed83b0913..e64dad64c2 100644
--- a/src/gui/kernel/qplatformopenglcontext.h
+++ b/src/gui/kernel/qplatformopenglcontext.h
@@ -88,7 +88,7 @@ public:
QOpenGLContext *context() const;
- static bool parseOpenGLVersion(const QString& versionString, int &major, int &minor);
+ static bool parseOpenGLVersion(const QByteArray &versionString, int &major, int &minor);
private:
friend class QOpenGLContext;