windows: Set forward compatibility bit properly

The bit should be set when QSurfaceFormat::DeprecatedFunctions is
_not_ specified. The documentation was correct, the implementation
was not.

Change-Id: If7202d3a59d5336fff255a290b65fb4bfa7b79c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
Laszlo Agocs 2013-11-26 14:25:11 +01:00 committed by The Qt Project
parent 1c2be58fec
commit 09466a942e

View File

@ -589,7 +589,7 @@ static HGLRC createContext(const QOpenGLStaticContext &staticContext,
if (requestedVersion >= 0x0300) {
attributes[attribIndex++] = WGL_CONTEXT_FLAGS_ARB;
attributes[attribIndex] = 0;
if (format.testOption(QSurfaceFormat::DeprecatedFunctions))
if (!format.testOption(QSurfaceFormat::DeprecatedFunctions))
attributes[attribIndex] |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
if (format.testOption(QSurfaceFormat::DebugContext))
attributes[attribIndex] |= WGL_CONTEXT_DEBUG_BIT_ARB;