summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.0.03
-rw-r--r--src/opengl/qgl_p.h2
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index 0014760b6c..834b62edbe 100644
--- a/dist/changes-5.0.0
+++ b/dist/changes-5.0.0
@@ -617,6 +617,9 @@ QtOpenGL
QGLWidget and a QOpenGLFramebufferObject. It is recommended that applications
using QGLPixelBuffer for offscreen rendering to a texture switch to using
QOpenGLFramebufferObject directly instead, for improved performance.
+* The default major version of QGLFormat has been changed to 2 to be aligned
+ with QSurfaceFormat. Applications that want to use a different version should
+ explicitly request it using QGLFormat::setVersion().
QtScript
--------
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 4a2b2b11d1..6ef4eda5fc 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -86,7 +86,7 @@ public:
depthSize = accumSize = stencilSize = redSize = greenSize = blueSize = alphaSize = -1;
numSamples = -1;
swapInterval = -1;
- majorVersion = 1;
+ majorVersion = 2;
minorVersion = 0;
profile = QGLFormat::NoProfile;
}
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 899e642249..3f77aa7233 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -439,7 +439,7 @@ void tst_QGL::getSetCheck()
// int QGLFormat::major/minorVersion()
// void QGLFormat::setVersion(int, int)
- QCOMPARE(obj1.majorVersion(), 1);
+ QCOMPARE(obj1.majorVersion(), 2);
QCOMPARE(obj1.minorVersion(), 0);
obj1.setVersion(3, 2);
QCOMPARE(obj1.majorVersion(), 3);