Change the default major version of QGLFormat to 2.
This is being changed because: - The OpenGL paint engine in Qt only supports GL2 - QML2 only supports GL2 - QSurfaceFormat has a default value of 2 Applications that want to use GL1 on a QGLWidget will have to explicitly request this format using QGLFormat::setVersion. Task-number: QTBUG-27589 Change-Id: Ieb283ef7d6e15a29ec28ce7e4363dbf477decaa7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
c54a2dca16
commit
a61788d139
3
dist/changes-5.0.0
vendored
3
dist/changes-5.0.0
vendored
@ -617,6 +617,9 @@ QtOpenGL
|
|||||||
QGLWidget and a QOpenGLFramebufferObject. It is recommended that applications
|
QGLWidget and a QOpenGLFramebufferObject. It is recommended that applications
|
||||||
using QGLPixelBuffer for offscreen rendering to a texture switch to using
|
using QGLPixelBuffer for offscreen rendering to a texture switch to using
|
||||||
QOpenGLFramebufferObject directly instead, for improved performance.
|
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
|
QtScript
|
||||||
--------
|
--------
|
||||||
|
@ -86,7 +86,7 @@ public:
|
|||||||
depthSize = accumSize = stencilSize = redSize = greenSize = blueSize = alphaSize = -1;
|
depthSize = accumSize = stencilSize = redSize = greenSize = blueSize = alphaSize = -1;
|
||||||
numSamples = -1;
|
numSamples = -1;
|
||||||
swapInterval = -1;
|
swapInterval = -1;
|
||||||
majorVersion = 1;
|
majorVersion = 2;
|
||||||
minorVersion = 0;
|
minorVersion = 0;
|
||||||
profile = QGLFormat::NoProfile;
|
profile = QGLFormat::NoProfile;
|
||||||
}
|
}
|
||||||
|
@ -439,7 +439,7 @@ void tst_QGL::getSetCheck()
|
|||||||
|
|
||||||
// int QGLFormat::major/minorVersion()
|
// int QGLFormat::major/minorVersion()
|
||||||
// void QGLFormat::setVersion(int, int)
|
// void QGLFormat::setVersion(int, int)
|
||||||
QCOMPARE(obj1.majorVersion(), 1);
|
QCOMPARE(obj1.majorVersion(), 2);
|
||||||
QCOMPARE(obj1.minorVersion(), 0);
|
QCOMPARE(obj1.minorVersion(), 0);
|
||||||
obj1.setVersion(3, 2);
|
obj1.setVersion(3, 2);
|
||||||
QCOMPARE(obj1.majorVersion(), 3);
|
QCOMPARE(obj1.majorVersion(), 3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user