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. Qt Scene Grapg(QSG) vs OpenGL(gl function)?
Forum Updated to NodeBB v4.3 + New Features

Qt Scene Grapg(QSG) vs OpenGL(gl function)?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
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.
  • AlienA Offline
    AlienA Offline
    Alien
    wrote on last edited by Alien
    #1

    Hey,
    What is the advantages of using Qt Scene Grapg(QSG) against direct using of OpenGL (gl function)?
    I mean the advantages of inheritance from QQuickItem against inheritance from QQuickFramebufferObject or some other stuff?

    Regards,

    1 Reply Last reply
    0
    • jiancaiyangJ Offline
      jiancaiyangJ Offline
      jiancaiyang
      wrote on last edited by
      #2

      In early Qt versions, Qt uses OpenGL as Scene Graph default back-ends. So we can easily mix both of them without problem.
      Recently Qt introduces D3D and Vulkan as alternatives, they may well fit their target platform. For example D3D is usually used for Windows and X-Box platform.

      我们自己的论坛:http://qtdream.com
      擅长三维角色仿真动画。

      AlienA 1 Reply Last reply
      0
      • jiancaiyangJ jiancaiyang

        In early Qt versions, Qt uses OpenGL as Scene Graph default back-ends. So we can easily mix both of them without problem.
        Recently Qt introduces D3D and Vulkan as alternatives, they may well fit their target platform. For example D3D is usually used for Windows and X-Box platform.

        AlienA Offline
        AlienA Offline
        Alien
        wrote on last edited by Alien
        #3

        Dear @jiancaiyang ,
        When developers can use opengl directly why they should use qsg instead? My main question is that what are the advantages of qsg syntax?

        jiancaiyangJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Some good reasons are explained in the first part of the Qt Quick Scene Graph. But basically one of the goodies is that it allows for optimisations to avoid useless rendering that you would otherwise have to calculate by hand thus have better performance for complexe scenes.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • AlienA Alien

            Dear @jiancaiyang ,
            When developers can use opengl directly why they should use qsg instead? My main question is that what are the advantages of qsg syntax?

            jiancaiyangJ Offline
            jiancaiyangJ Offline
            jiancaiyang
            wrote on last edited by
            #5

            @Alien I tested QSG* classes, found it is mainly suitable for 2D tiles, if you are mixing Qt Quick Contents with 3D scenes, you'd better. not use QSG* related classes.

            我们自己的论坛:http://qtdream.com
            擅长三维角色仿真动画。

            AlienA 1 Reply Last reply
            1
            • jiancaiyangJ jiancaiyang

              @Alien I tested QSG* classes, found it is mainly suitable for 2D tiles, if you are mixing Qt Quick Contents with 3D scenes, you'd better. not use QSG* related classes.

              AlienA Offline
              AlienA Offline
              Alien
              wrote on last edited by Alien
              #6

              Dear @jiancaiyang,
              Thank you so much but I've read that QSG can be used for complex 3D mesh,look at :
              http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html
              It says:
              "
              The most important node for users is the QSGGeometryNode. It is used to define custom graphics by defining its geometry and material. The geometry is defined using QSGGeometry and describes the shape or mesh of the graphical primitive. It can be a line, a rectangle, a polygon, many disconnected rectangles, or complex 3D mesh. The material defines how the pixels in this shape are filled.
              "

              1 Reply Last reply
              0
              • jiancaiyangJ Offline
                jiancaiyangJ Offline
                jiancaiyang
                wrote on last edited by
                #7

                I've written a blog post three years ago. You can take a view of it ( You may turn on translator ).
                Here

                我们自己的论坛:http://qtdream.com
                擅长三维角色仿真动画。

                1 Reply Last reply
                1

                • Login

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