Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. UWP with Qt: OpenGL context creation issue
Forum Updated to NodeBB v4.3 + New Features

UWP with Qt: OpenGL context creation issue

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 1 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Klee
    wrote on 6 Dec 2020, 23:28 last edited by
    #1

    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

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Paul Klee
      wrote on 13 Dec 2020, 22:11 last edited by
      #2

      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 Reply Last reply
      0

      1/2

      6 Dec 2020, 23:28

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved