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. Cannot compile simple Opengl 4.3 program
Forum Updated to NodeBB v4.3 + New Features

Cannot compile simple Opengl 4.3 program

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.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.
  • E Offline
    E Offline
    ElCommunist
    wrote on last edited by
    #1

    Hello everyone, and thanks for your valuable time :-)

    I used to develop with Visual 2012 (Windows 7), using SDL 2 + glew, to compile Opengl 4 programs (making a game engine), and it worked just fine.

    To improve this engine, I decided to do some WYSIWYG ("what you see is what you get"), so I naturally learned Qt (5.2) as it is the most powerful framework to deal with GUI/OpenGL integration. So far, I love this framework ;-)

    But now, I start tryng to compile the simplest OpenGL 4.3 program with QtCreator, and I cannot get it to work.
    What I have done by now is:
    -> Subclass QWindow
    -> Set surface type, creates context, and bind context with window
    -> And the source of the error : try to resolve GL functions with "QOpenGLFunctions_4_3_Core" class

    It does not work because the compiler does not know "QOpenGLFunctions_4_3_Core" type... I found out that the macro "QT_OPENGL_ES_2" is defined in "qopenglfunctions_4_3_core.h", which disable "QOpenGLFunctions_4_3_Core" class declaration.
    Even if I use "DEFINES += QT_NO_OPENGL_ES_2 " in the .pro, there are strange behavior : the syntax now highlights the "QOpenGLFunctions_4_3_Core" type and functions, but compiler still fails (it still does not recognize the type...)

    Has someone here managed to compile and run an OpenGl program with version 4.3 ? (using QWindow, or whatever other methods...) ? I cannot find tutorial on thenet to help, except this one "http://www.kdab.com/opengl-in-qt-5-1-part-1/", which lead me here :-|

    Many thanks for your help

    1 Reply Last reply
    0
    • E Offline
      E Offline
      ElCommunist
      wrote on last edited by
      #2

      I found the problem : I installed the Qt 5.2 installer for Windows 7 - Visual 2012 - 32 bits, which does not incude OpenGL components.

      After downloading the 64 bits version - Windows 7 - Visual 2012 - OpenGL, it runs just fine ;-)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        welcome to devnet

        Good to know that you have solved it all by yourself.

        -I will mark your post as solved in the header line.- You can do that -also by yourself- while editing the first port and change the title line.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          Actually, I cannot do that for you. Please edit first post and introduce "[solved]". This helps others to find that there might be an answer for their problem.

          Vote the answer(s) that helped you to solve your issue(s)

          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