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. Qt5.0 OpenGL Types and ES #define[Solved]
Forum Updated to NodeBB v4.3 + New Features

Qt5.0 OpenGL Types and ES #define[Solved]

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

    Hi,

    I am porting over my OpenGL application written with Qt 4.8.1 to Qt 5.0, the latter of which I compiled from source for both x86 and x86-64. The application uses OpenGL 2 and GLEW. I am developing on Windows 7 x64.

    After changing over the #include-s, I ran into problems. It seems that "QT_OPENGL_ES_2" is defined, so that in the file "qtbase/src/opengl/qgl.h", it will eventually include "qtbase/src/3rdparty/angle/include/gles2/gl2.h". The problem is that this file defines a number of things that GLEW already defines (e.g. "GLintptr"). In that first file, something similar happens with "typedef GLfloat GLdouble;"

    All this seems very strange, as I don't (think?) I'm having Qt use OpenGL ES. After some groveling around in the sources and my compiler, the culprit seems to be "qtbase/src/corelib/global/qconfig.h", lines 124-128, which will define QT_OPENGL_ES_2 when it's not available, even if QT_NO_OPENGL_ES_2 has been defined. Something similar happens immediately above for QT_OPENGL_ES.

    So . . . any thoughts?

    Thanks.
    Ian

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

      The released Qt5 binaries use ANGLE on windows which provides OpenGL ES implemented on top of DirectX. To be able to use your desktop OpenGL implementation build Qt5 yourself using -opengl desktop as part of the configure options.

      This should also be fixed for Qt 5.0.1 by also providing a desktop OpenGL build.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

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

        Doing so fixes that problem. Thanks!

        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