summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpixelbuffer_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qglpixelbuffer_mac.mm')
-rw-r--r--src/opengl/qglpixelbuffer_mac.mm3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/opengl/qglpixelbuffer_mac.mm b/src/opengl/qglpixelbuffer_mac.mm
index 9a679b1..e95e36b 100644
--- a/src/opengl/qglpixelbuffer_mac.mm
+++ b/src/opengl/qglpixelbuffer_mac.mm
@@ -299,9 +299,8 @@ void QGLPixelBuffer::releaseFromDynamicTexture()
GLuint QGLPixelBuffer::generateDynamicTexture() const
{
- Q_D(const QGLPixelBuffer);
-
#ifdef QT_MAC_USE_COCOA
+ Q_D(const QGLPixelBuffer);
NSOpenGLContext *oldContext = [NSOpenGLContext currentContext];
if (d->share_ctx != oldContext)
[static_cast<NSOpenGLContext *>(d->share_ctx) makeCurrentContext];