UWP with Qt: OpenGL context creation issue
-
wrote on 6 Dec 2020, 23:28 last edited by
Hi,
while trying to run the standard opengl cube example together with UWP, I get the following errors:
qt.winrtrunner.app: QEGLPlatformContext: Failed to create context: 3006
qt.winrtrunner.app: QOpenGLWidget: Failed to create context
qt.winrtrunner.app: QEGLPlatformContext: eglMakeCurrent failed: 3009
qt.winrtrunner.app: composeAndFlush: makeCurrent() failedI use Qt 5.14.2 for UWP 64bit (MSVC 2017) and QtCreator 4.11.1 on Windows 10.
On non UWP (Desktop Qt 5.14.2 MSVC2017 64bit), it works.
Anyone some ideas how to solve this? Any help is highly appreciated.
Thanks,
Paul -
wrote on 13 Dec 2020, 22:11 last edited by
Hi,
I could solve the problem partially.
By adding the lines
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setSamples(4);
format.setStencilBufferSize(8);
format.setVersion(3, 0);
QSurfaceFormat::setDefaultFormat(format);before showing the MainWindow, the context creation error disappears.
But instead, a new error arises:
QOpenGLWidget: Failed to make context current
Does anyone have an idea how to solve this one?
Thanks and regards,
Paul
1/2