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. QOpenGLPaintEngine vs. desktop OpenGL core profile
QtWS25 Last Chance

QOpenGLPaintEngine vs. desktop OpenGL core profile

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.7k 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.
  • martin_kyM Offline
    martin_kyM Offline
    martin_ky
    wrote on last edited by
    #1

    Hello, as the title suggest, my question is: will it be possible to use QPainter (backed by QOpenGLPaintEngine) with core profile?

    So far, I only managed a working QPainter with compatibility profile (gl version > 3.2). When switched to core profile, I got a black window and the following debug output:

    @QOpenGLShader::compile(Vertex): Vertex shader failed to compile with the following errors:
    ERROR: error(#272) Implicit version number 110 not supported by GL3 forward compatible context
    ERROR: error(#273) 1 compilation errors. No code generated

    followed by problematic shader source code

    @

    Upon looking into the soruces, I found that the QOpenGLPaintEngine's stock shaders are missing the #version directive, causing shader compilation to fail in core profile. I managed to "hack" the #version in, but without success. I'm afraid the problem is deeper than that.

    My concern is only because I read somewhere that compatibility profile is not available on some platforms (OS X).

    My setup is: Win7 / MSVC2010 and current Qt 5.1 sources from git, configured with: -opengl desktop -no-angle.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      No the QOpenGLPaintEngine is not usable with Core profile contexts at present. It is also likely quite some work to make it work with a core profile so I can't see it happening anytime soon.

      It is true that OS X doesn't provide OpenGL 3.2 Compatibility profile, however it does still provide OpenGL 2.x contexts and the QOpenGLPaintEngine works there.

      Similar story for QtQuick 2...

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • martin_kyM Offline
        martin_kyM Offline
        martin_ky
        wrote on last edited by
        #3

        Thank you for the clarification.

        I have a followup question, maybe little offtopic. Can I have another QQuickView rendered into an offscreen FBO, without exposing the window? It seems QQuickWindow::setRenderTarget() is designed just for this. My idea is to have this auxiliary hidden window render my QML UI layer into an FBO and then re-use this FBO in my OpenGL 4.2 core profile renderer in the first QWindow.

        Should be in theory possible via context sharing, right? Thank you for any input.

        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