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 3 not supported with Qt 4.7
Forum Updated to NodeBB v4.3 + New Features

OpenGL 3 not supported with Qt 4.7

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

    Hello,

    I am happy to join this forum today ! I use Qt for a certain time. I recently started to use openGL with it, and now I have a few problems to do it on Linux. On Windows my drivers were up-to-date, and it was working.

    But now, I am running on Debian, unstable version. After one night and one kernel compilation, my NVidia driver is finally up-to-date, version 310.32 :D

    I know it comes with openGL 3.0 (higher in fact), and Qt 4.7 supports it. I have the last version of the libqt4-opengl-dev package. However I am not able to create a context with openGL >= 2.1.

    @format().openGLVersionFlags().testFlag(QGLFormat::OpenGL_Version_3_0)@

    returns false.

    Did I miss something ? I really want to use GLSL 1.3, not 1.2 :)

    Thank for you help.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      badjoke
      wrote on last edited by
      #2

      Oops, exact duplicate of “QGLShaderProgram: shader programs are not supported” with OpenGL 3.2 in 5.0.1 I think... except I am not on Mac.

      Edit: Actually I am using Qt 5.0, but the use of the package libqt4-opengl is confusing. If somebody can explain to me how to upgrade the whole thing, thanks.

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

        Ok, I solved my issue thanks to this : http://qt-project.org/wiki/How_to_use_OpenGL_Core_Profile_with_Qt
        Maybe it will can help somebody.

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

          Hi, at this point you are probably best using Qt 5. This has better support for modern OpenGL. Qt 5.1 should see a whole bunch of other new stuff to make your life easier when writing Qt + OpenGL 3/4 applications.

          Any questions just come back to the forum.

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

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

            Hi, thank for your answer.

            Actually I don't understand what I need to install in order to use openGL with Qt5. I installed Qt Creator (with Qt 5), then I had errors about openGL headers not found. That is why I installed the package libtqt4-opengl-dev, but it seems it was not a good idea. Can you please tell me what I should do to develop with the latest version ?

            Thanks.

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

              Hello again,

              According to this thread http://qt-project.org/forums/viewthread/22821/#107114 , I compiled Qt by passing in -opengl desktop option to the configure.

              I added this new compiled version to the compiler in Qt Creator options. Unfortunately I am not able to choose it for my project : the choice 'Qt version' doesn't appear. According to some researches it might be because my own version doesn't have ABI support, but it does:
              ABI: x86-linux-generic-elf-32bit, same as the default version

              What I am doing wrong ?

              Thank you.

              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