Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

UWP with Qt: OpenGL context creation issue



  • 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() failed

    I 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



  • 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


Log in to reply