Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt::AA_UseOpenGLES and Qt::AA_ShareOpenGLContexts cause crash
Forum Updated to NodeBB v4.3 + New Features

Qt::AA_UseOpenGLES and Qt::AA_ShareOpenGLContexts cause crash

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 2.2k 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.
  • G Offline
    G Offline
    gotvptop developer
    wrote on last edited by
    #1

    I have attached a test application and images to illustrate the issue. I am using Qt 5.12.2 on windows 10. [0_1557302703262_QtOpenglThreadTestApp.zip](Uploading 100%)
    0_1557302886280_QtOpenglThreadTestCrash.png 0_1557302892845_QtOpenglThreadTestCrash2.png
    if I comment out QApplication::setAttribute( Qt::AA_UseOpenGLES ); then is renders the logo fine else crashes
    If at all possible I would like to use the gles shaders on linux/android/windows which is what I assumed ANGLE was for
    I have to render in a thread because kodi is a part of my app
    the whole source is at https://github.com/brettrjones/gotvptop.git
    The test application is under SOURCE_DIR/SandboxApps

    1 Reply Last reply
    0
    • fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by
      #2

      https://doc.qt.io/qt-5/qopenglextrafunctions.html
      "The QOpenGLExtraFunctions class provides cross-platform access to the OpenGL ES 3.0, 3.1 and 3.2 API."

      I am not sure you need to enable th e UseOpenGLES flag after that. Probably need to test with and without. I tried looking at your code, but could not quickly find the relevant source that uses QOpenGLFunctions.

      C++ is a perfectly valid school of magic.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gotvptop developer
        wrote on last edited by
        #3

        Thanks for the response although I think my fundamental issues are in trying to share the context and use gles on windows at the same time. I am going to try a different approach and try using a plain qwidget for painting the rendered QOffscreenSurface fbo and put all of the rendering initialization and rendering into the thread so will have a single thread that accesses opengl

        1 Reply Last reply
        0

        • Login

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