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. Using Qt with directly calls to OpenGL.

Using Qt with directly calls to OpenGL.

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 1.8k Views 2 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.
  • feniks_fireF Offline
    feniks_fireF Offline
    feniks_fire
    wrote on last edited by
    #1

    How I can use Qt to manage the OpenGL window, while using direct OpenGL commands to render?

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

      Hi! See QOpenGLWindow and QOpenGLWidget. You might also be interested in QOpenGLFunctions.

      1 Reply Last reply
      1
      • jeremy_kJ Offline
        jeremy_kJ Offline
        jeremy_k
        wrote on last edited by
        #3

        There's a set of OpenGL examples that ship with Qt.

        http://code.qt.io/cgit/qt/qtbase.git/tree/examples/opengl
        http://doc.qt.io/qt-5/qtgui-index.html#opengl-and-opengl-es-integration

        Asking a question about code? http://eel.is/iso-c++/testcase/

        1 Reply Last reply
        1
        • feniks_fireF Offline
          feniks_fireF Offline
          feniks_fire
          wrote on last edited by
          #4

          @Wieland @jeremy_k
          thanks but all these examples seems that don't use directly opengl, their using "qt opengl wrappers" so they make Qt calls that make OpenGL calls for them. And I need calls opengl directly.

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

            @feniks_fire said in Using Qt with directly calls to OpenGL.:

            so they make Qt calls that make OpenGL calls for them

            No. The OpenGL Window and Widget only provide you with a surface you can render to and integration points (at least initializeGL(), resizeGL(), and paintGL()) to coordinate your rendering with the rest of the GUI. There is a convenience wrapper, QOpenGLFunctions, but you don't have to use it at all.

            1 Reply Last reply
            2
            • feniks_fireF Offline
              feniks_fireF Offline
              feniks_fire
              wrote on last edited by
              #6

              @Wieland
              Thanks! It's really work hhaha! 2,5 hours of searching and finally it's work. And yeah I apologize for my disbelief, you have right. Again, really big thanks :).

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

                Great to hear you got it to work now. :-)

                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