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.
Forum Updated to NodeBB v4.3 + New Features

Using Qt with directly calls to OpenGL.

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 1.7k 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.
  • F Offline
    F Offline
    feniks_fire
    wrote on 3 Nov 2017, 18:43 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 3 Nov 2017, 19:02 last edited by
      #2

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

      1 Reply Last reply
      1
      • J Offline
        J Offline
        jeremy_k
        wrote on 3 Nov 2017, 19:13 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
        • F Offline
          F Offline
          feniks_fire
          wrote on 3 Nov 2017, 19:23 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 3 Nov 2017, 19:48 last edited by A Former User 11 Mar 2017, 19:54
            #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
            • F Offline
              F Offline
              feniks_fire
              wrote on 3 Nov 2017, 20:51 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 3 Nov 2017, 20:56 last edited by
                #7

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

                1 Reply Last reply
                0

                1/7

                3 Nov 2017, 18:43

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved