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. [SOLVED] How do I get Qt Creator to support more (or less?) recent OpenGL versions?
QtWS25 Last Chance

[SOLVED] How do I get Qt Creator to support more (or less?) recent OpenGL versions?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 3.5k 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.
  • B Offline
    B Offline
    bugloaf
    wrote on last edited by
    #1

    I'm porting to Qt some code that I used to compile under MSVC++. I get errors that certain OpenGL functions and constants are not defined, like the following:

    error: 'GL_FUNC_ADD' was not declared in this scope

    error: 'glBlendEquation' was not declared in this scope

    Other OpenGL identifiers cause no problem, so it's not a question of me forgetting the include or the OpenGL module.

    I know glBlendEquation was an extension at one point, but that was many years ago; it should be part of the standard by now. How do I get Qt to use a more recent OpenGL API?

    Or maybe glBlendEquation is deprecated now. How do I get Qt to use a less recent API? Or is Qt using OpenGL ES?

    Thank you for considering my questions.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      I don't think this has anything to do with Qt. Are you correctly adding the needed includes?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bugloaf
        wrote on last edited by
        #3

        I'm using #include <QtOpenGL>. As I already mentioned, other OpenGL identifiers (such as glBlendFunc) do not cause compiler errors, so it appears that Qt is providing a different version of the OpenGL API than the one I want.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on last edited by
          #4

          Qt is not providing any OpenGL API -- it just #includes the OpenGL headers. I think Microsoft's gl.h is missing glBlendEquation. Can you check that?

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply
          0
          • B Offline
            B Offline
            baysmith
            wrote on last edited by
            #5

            If the system's OpenGL headers does not provide access to some part of the OpenGL API, then you have to use an OpenGL extension manager (like "GLEW":http://www.opengl.org/sdk/libs/GLEW/ or "GLEE":http://www.opengl.org/sdk/libs/GLee/). It appears that in the upcoming Qt 4.8, you may also use "QGLFunctions":http://doc.qt.nokia.com/4.8-snapshot/qglfunctions.html.

            Nokia Certified Qt Specialist.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bugloaf
              wrote on last edited by
              #6

              I tried using GLEW, because I was using that in the original MSVC project, but I kept getting linker errors no matter what I tried.

              Today I downloaded GLee and included the source code in my project. The compiler errors are gone!

              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