diff options
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformintegration.cpp')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index 3d495724c6..f4c292fe73 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -71,8 +71,6 @@ #include "qandroidsystemlocale.h" #include "qandroidplatformoffscreensurface.h" -#include <QtPlatformHeaders/QEGLNativeContext> - #if QT_CONFIG(vulkan) #include "qandroidplatformvulkanwindow.h" #include "qandroidplatformvulkaninstance.h" @@ -307,11 +305,15 @@ QPlatformOpenGLContext *QAndroidPlatformIntegration::createPlatformOpenGLContext format.setRedBufferSize(8); format.setGreenBufferSize(8); format.setBlueBufferSize(8); - auto ctx = new QAndroidPlatformOpenGLContext(format, context->shareHandle(), m_eglDisplay, context->nativeHandle()); - context->setNativeHandle(QVariant::fromValue<QEGLNativeContext>(QEGLNativeContext(ctx->eglContext(), m_eglDisplay))); + auto ctx = new QAndroidPlatformOpenGLContext(format, context->shareHandle(), m_eglDisplay); return ctx; } +QOpenGLContext *QAndroidPlatformIntegration::createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const +{ + return QEGLPlatformContext::createFrom<QAndroidPlatformOpenGLContext>(context, display, m_eglDisplay, shareContext); +} + QPlatformOffscreenSurface *QAndroidPlatformIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const { if (!QtAndroid::activity()) |