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. OpenGL in Qt 5.1
Forum Updated to NodeBB v4.3 + New Features

OpenGL in Qt 5.1

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    rivierakid
    wrote on 4 Jul 2013, 22:10 last edited by
    #1

    Hi, I'm little bit confused about OpenGL in Qt 5.1 (VS 2012 x64).

    Now I'm using multiple QGLWidgets (shared context, core profile 3.3) and the deprecated classes for shaders (QGLShaderProgram) + GLEW library. Now I'm thinking about rewriting the app using new Qt OpenGL support.

    First I'd tried to replace QGLShaderProgram with the QOpenGLShaderProgram, but I have a problem with my geometry shader. The app is working correctly with QGLShaderProgram, but not with the QOpenglShaderProgram. When there is a geometry shader in usage, glGetError() return invalid operation (no error during compilation and linking).
    Thats really strange. Could it be a conflict between GLEW and the QtOpenglFunction table?

    Second question is about the QWindow class. Should I replace the QGLWidgets with QWindow? There are about 3 QGLWidgets in my app (one central and two in QDockWidget). They share the context (textures, shaders, ...)

    Thanks for help
    Martin

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 5 Jul 2013, 07:12 last edited by
      #2

      Possibly you are using an Angle build of Qt and trying to use OpenGL >2.0 functions? You probably need to compile Qt with "-opengl desktop" option.

      (Z(:^

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rivierakid
        wrote on 5 Jul 2013, 10:08 last edited by
        #3

        No,
        qt-windows-opensource-5.1.0-msvc2012_opengl-x86_64-offline.exe
        fca8f6ff98ee4d01a6c8fcfef8e339f6

        BTW I've reported it as a bug:
        https://bugreports.qt-project.org/browse/QTBUG-32243

        1 Reply Last reply
        0

        1/3

        4 Jul 2013, 22:10

        • Login

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