diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-04-06 15:53:55 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-06-25 12:39:07 +0200 |
commit | 27dc07fa050b5f216516debcd11802530a0c2d79 (patch) | |
tree | 30fd4a5663c84274d39e967eb6302ef44c2958f7 /src/plugins/platforms/cocoa/qcocoaintegration.mm | |
parent | b69d537d7ffe385d374388a0754dd03ba25684c8 (diff) |
Support adapting an existing NSOpenGLContext in cocoa
Change-Id: I61b4055020c82dd5ac40850fe7def91d26ffb6fe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 8723b20615..b22bc71e30 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -422,7 +422,11 @@ QPlatformWindow *QCocoaIntegration::createPlatformWindow(QWindow *window) const QPlatformOpenGLContext *QCocoaIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const { - return new QCocoaGLContext(context->format(), context->shareHandle()); + QCocoaGLContext *glContext = new QCocoaGLContext(context->format(), + context->shareHandle(), + context->nativeHandle()); + context->setNativeHandle(glContext->nativeHandle()); + return glContext; } QPlatformBackingStore *QCocoaIntegration::createPlatformBackingStore(QWindow *window) const |