macOS: Don't mess with native handle for QOpenGLContext

QOpenGLContext::setNativeHandle() is documented as:

 "configuration settings, like format(), are ignored since this
  QOpenGLContext will wrap an already created native context"

We should respect this and not apply QT_MAC_OPENGL_SURFACE_ORDER.

Change-Id: Idfdf3eac0e9f9d0a86f1b23aa475c3e4f12127e2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
bb10
Tor Arne Vestbø 2018-07-31 18:39:41 +02:00
parent 137e6c8277
commit f09b0337d7
1 changed files with 0 additions and 3 deletions

View File

@ -99,9 +99,6 @@ QCocoaGLContext::QCocoaGLContext(const QSurfaceFormat &format, QPlatformOpenGLCo
m_context = context;
[m_context retain];
m_shareContext = share ? static_cast<QCocoaGLContext *>(share)->nsOpenGLContext() : nil;
// OpenGL surfaces can be ordered either above(default) or below the NSWindow.
const GLint order = qt_mac_resolveOption(1, "QT_MAC_OPENGL_SURFACE_ORDER");
[m_context setValues:&order forParameter:NSOpenGLCPSurfaceOrder];
updateSurfaceFormat();
return;
}