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 from 4.8 to 5.0.1
Qt 6.11 is out! See what's new in the release blog

OpenGL from 4.8 to 5.0.1

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 5.7k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I am trying to compile my application using Qt 5.0.1 (mingw4_7).
    6 errors something like:
    'GLdouble' has a previous declaration as 'typedef double GLdouble'

    and about 300 warnings:
    GL_FALSE redefined, etc.

    The same problem with Qt 5.0.0

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Sounds like an OpenGL desktop vs OpenGL ES 2 issue to me. The Qt5 pre-compiled packages are built against ANGLE at present which provides OpenGL ES 2. If you then #include <GL/gl.h> or similar you will get conflicting definitions.

      If you wish to use desktop OpenGL on windows with Qt 5 it is necessary to rebuild Qt yourself passing in -opengl desktop to the configure.bat script.

      This will hopefully be resolved in Qt 5.0.2 where binaries built against desktop OpenGL will be shipped too. Please vote for https://bugreports.qt-project.org/browse/QTBUG-28715

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I have compiled Qt 5.0.1 with -opengl desktop.
        I solved the problem, and got another one.

        Qt reports wrong version (2.1).
        I have added:
        @
        format.setVersion(4,3);
        format.setProfile(QGLFormat::CompatibilityProfile);
        @
        Now qt reports 4.3 version.

        I can't change the swap interval. It is always = -1
        @
        format.setSwapInterval(0) // It doesn't work.
        @

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          A default constructed QGLFormat (or QSurfaceFormat for that matter) defaults to OpenGL 2.x as that is what QtQuick2 uses. As you found, you can request specific versions and if your card and driver supports it you will get that version back.

          For the swap interval I am not sure. Have you tried a swap interval of 1? You may have to step into the windows qpa plugin to see what it is doing. I can't recall off the top of my head.

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            https://bugreports.qt-project.org/browse/QTBUG-29073

            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