Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Opengl with QML
Forum Updated to NodeBB v4.3 + New Features

Opengl with QML

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 5 Posters 2.3k 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.
  • ashajgA Offline
    ashajgA Offline
    ashajg
    wrote on last edited by
    #1

    Hi

    Do QML components use opengl internally?
    Can anyone suggest starting point to study QtQuick with opengl?

    Thanks

    sierdzioS 1 Reply Last reply
    0
    • ashajgA ashajg

      Hi

      Do QML components use opengl internally?
      Can anyone suggest starting point to study QtQuick with opengl?

      Thanks

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @ashajg said in Opengl with QML:

      Hi

      Do QML components use opengl internally?

      Yes, QtQuick is all based on OpenGL, it's all drawn using your GPU :-) In Qt6, a more flexible backend will be used. it will use different renderers as needed (OpenGL, Vulkan, DirectX etc.).

      Can anyone suggest starting point to study QtQuick with opengl?

      What do you want to learn?

      (Z(:^

      ashajgA 1 Reply Last reply
      1
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        You can start learning how OpenGL works. Start learning modern OpenGL. This will help.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        ashajgA 1 Reply Last reply
        1
        • sierdzioS sierdzio

          @ashajg said in Opengl with QML:

          Hi

          Do QML components use opengl internally?

          Yes, QtQuick is all based on OpenGL, it's all drawn using your GPU :-) In Qt6, a more flexible backend will be used. it will use different renderers as needed (OpenGL, Vulkan, DirectX etc.).

          Can anyone suggest starting point to study QtQuick with opengl?

          What do you want to learn?

          ashajgA Offline
          ashajgA Offline
          ashajg
          wrote on last edited by
          #4

          @sierdzio said in Opengl with QML:

          What do you want to learn?

          Hi @sierdzio thanks for help!!!

          Just wanted to know how to use opengl with qml.
          But as you said it uses opengl internally, I don't think
          I need to add any extra implementation to do the same.

          1 Reply Last reply
          0
          • dheerendraD dheerendra

            You can start learning how OpenGL works. Start learning modern OpenGL. This will help.

            ashajgA Offline
            ashajgA Offline
            ashajg
            wrote on last edited by
            #5

            @dheerendra Sir Thanks for the help!!!!

            I ll start looking into modern OpenGl.

            1 Reply Last reply
            0
            • fcarneyF Offline
              fcarneyF Offline
              fcarney
              wrote on last edited by fcarney
              #6

              Not all QtQuick graphics programming requires knowledge of opengl. It depends on what you are doing:
              https://github.com/Demolishun/MeetupGameHackathon1

              It may be worthwhile learning the other interfaces as well.

              Edit:
              Also, the books on Qt cover a lot of this:
              books
              You can get ALL the packt books on a $10/month sub.

              C++ is a perfectly valid school of magic.

              1 Reply Last reply
              1
              • I Offline
                I Offline
                istlota101
                wrote on last edited by istlota101
                #7

                I assume you already know that Qt Quick modules are C++ modules designed to be registered with QML and then used in a .qml form as if they were QML Items. I also assume you understand why Qt Creator is the BEST IDE to use if you are coding Qt Qml apps. Now, Qt Creator happens to be bundled with an example called "Scene Graph - OpenGL Under QML" which is a good place for you to start from. That example uses a Squircle class which is subclassed from QQuickItem and is then registered with QML from the main.cpp file --> https://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html .
                .....................
                From there, I suggest you then study how to subclass a class derived from QQuickFrameBufferObject instead of QQuickItem.. As the module name suggests, the Qt codemeisters designed this module to simplify coding Modern OpenGL Qt apps which use VAOs, VBOs, shaders, projection perspective matrices, and the whole ball of wax.
                .......................
                But, alas, I do not think Qt Creator comes bundled with a QQuickFrameBufferObject example (which, IMHO, is THE way to code Qt OpenGL apps). I suggest you study a book authored by Marek Krajewsji, entitled "Hands-on High Performance Programming with Qt5", which includes a QQuickFrameBufferObject example. O'Reilly (formerly Safari Books Online) has this book which you can study online by subscribing to their site --> https://www.oreilly.com/library/view/hands-on-high-performance/9781789531244/a5d0d818-f4cf-467f-8c79-49b0e7002b2c.xhtml
                .................
                Here is a qt.io link to a QQuickFramebufferObject example --> https://www.qt.io/blog/2015/05/11/integrating-custom-opengl-rendering-with-qt-quick-via-qquickframebufferobject

                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