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. Qml Gridview implement in OpenGL
Forum Updated to NodeBB v4.3 + New Features

Qml Gridview implement in OpenGL

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 2 Posters 574 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.
  • J Offline
    J Offline
    jackson7281
    wrote on 29 Feb 2020, 05:01 last edited by
    #1

    Hi everyone :
    My project is using the Qt5.11 GridView, SwipeView to create some User interface base on QML, but the GridView is not very smooth as I want, right now I try to use the OpenGL, I'm new in OpenGL, I search some resources,
    https://stackoverflow.com/questions/6493099/qt-rendering-using-opengl
    but seems the QDeclarativeView is not defined in my qt5.11, and then in .pro
    I add += declarative also got a "unknown module" error message,

    Is there a better way to use it ?

    thank you

    R 1 Reply Last reply 29 Feb 2020, 11:11
    0
    • J jackson7281
      29 Feb 2020, 05:01

      Hi everyone :
      My project is using the Qt5.11 GridView, SwipeView to create some User interface base on QML, but the GridView is not very smooth as I want, right now I try to use the OpenGL, I'm new in OpenGL, I search some resources,
      https://stackoverflow.com/questions/6493099/qt-rendering-using-opengl
      but seems the QDeclarativeView is not defined in my qt5.11, and then in .pro
      I add += declarative also got a "unknown module" error message,

      Is there a better way to use it ?

      thank you

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 29 Feb 2020, 11:11 last edited by
      #2

      @jackson7281
      this is Qt4/QML1 code.
      basically QML is already using OpenGL backend if the libs are available on your system and not explicitly configured differently.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      J 1 Reply Last reply 29 Feb 2020, 11:51
      1
      • R raven-worx
        29 Feb 2020, 11:11

        @jackson7281
        this is Qt4/QML1 code.
        basically QML is already using OpenGL backend if the libs are available on your system and not explicitly configured differently.

        J Offline
        J Offline
        jackson7281
        wrote on 29 Feb 2020, 11:51 last edited by jackson7281
        #3

        @raven-worx
        hi raven, thank you for your help.
        so you mean there is no need to add OpenGL to project, the QML is already using OpenGL ?
        My embedded system is raspberry pi 3B, OpenGL have been enabled by the raspi-config, but I'm not sure it's also working in my QML project

        R 1 Reply Last reply 29 Feb 2020, 17:31
        0
        • J jackson7281
          29 Feb 2020, 11:51

          @raven-worx
          hi raven, thank you for your help.
          so you mean there is no need to add OpenGL to project, the QML is already using OpenGL ?
          My embedded system is raspberry pi 3B, OpenGL have been enabled by the raspi-config, but I'm not sure it's also working in my QML project

          R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 29 Feb 2020, 17:31 last edited by raven-worx
          #4

          @jackson7281
          yes, basically. The whole QML2 render backend was designed for OpenGL initially, this recently changed and was extended.
          Nevertheless you may want to read the following and check if your is application already using HW accerleration.
          https://www.qt.io/blog/2017/01/18/opengl-implementation-qt-quick-app-using-today

          What backend are you using btw? EGLFS, X11?

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          J 1 Reply Last reply 1 Mar 2020, 02:41
          1
          • R raven-worx
            29 Feb 2020, 17:31

            @jackson7281
            yes, basically. The whole QML2 render backend was designed for OpenGL initially, this recently changed and was extended.
            Nevertheless you may want to read the following and check if your is application already using HW accerleration.
            https://www.qt.io/blog/2017/01/18/opengl-implementation-qt-quick-app-using-today

            What backend are you using btw? EGLFS, X11?

            J Offline
            J Offline
            jackson7281
            wrote on 1 Mar 2020, 02:41 last edited by jackson7281 3 Jan 2020, 03:02
            #5

            @raven-worx
            Sorry, I searched some info about the EGLFS, X11. But I think i don't know which back-end I'm using.
            After set the QSG_INFO, the debug console display the following log

            qt.scenegraph.general: threaded render loop
            qt.scenegraph.general: Using sg animation driver
            qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
            qt.scenegraph.general: texture atlas dimensions: 2048x1024
            qt.scenegraph.general: R/G/B/A Buffers: 8 8 8 0
            qt.scenegraph.general: Depth Buffer: 24
            qt.scenegraph.general: Stencil Buffer: 8
            qt.scenegraph.general: Samples: 0
            qt.scenegraph.general: GL_VENDOR: Broadcom
            qt.scenegraph.general: GL_RENDERER: VC4 V3D 2.1
            qt.scenegraph.general: GL_VERSION: OpenGL ES 2.0 Mesa 19.1.0-devel
            qt.scenegraph.general: GL_EXTENSIONS: GL_MESA_tile_raster_order GL_OES_depth_texture GL_OES_packed_depth_stencil
            I can see the the GL_VENDOR, GL_VERSION, GL_RENDERER
            Does that means the QML has run the OpenGL correctly ?

            R 1 Reply Last reply 1 Mar 2020, 11:42
            0
            • J jackson7281
              1 Mar 2020, 02:41

              @raven-worx
              Sorry, I searched some info about the EGLFS, X11. But I think i don't know which back-end I'm using.
              After set the QSG_INFO, the debug console display the following log

              qt.scenegraph.general: threaded render loop
              qt.scenegraph.general: Using sg animation driver
              qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
              qt.scenegraph.general: texture atlas dimensions: 2048x1024
              qt.scenegraph.general: R/G/B/A Buffers: 8 8 8 0
              qt.scenegraph.general: Depth Buffer: 24
              qt.scenegraph.general: Stencil Buffer: 8
              qt.scenegraph.general: Samples: 0
              qt.scenegraph.general: GL_VENDOR: Broadcom
              qt.scenegraph.general: GL_RENDERER: VC4 V3D 2.1
              qt.scenegraph.general: GL_VERSION: OpenGL ES 2.0 Mesa 19.1.0-devel
              qt.scenegraph.general: GL_EXTENSIONS: GL_MESA_tile_raster_order GL_OES_depth_texture GL_OES_packed_depth_stencil
              I can see the the GL_VENDOR, GL_VERSION, GL_RENDERER
              Does that means the QML has run the OpenGL correctly ?

              R Offline
              R Offline
              raven-worx
              Moderators
              wrote on 1 Mar 2020, 11:42 last edited by
              #6

              @jackson7281 said in Qml Gridview implement in OpenGL:

              Does that means the QML has run the OpenGL correctly ?

              qt.scenegraph.general: GL_VERSION: OpenGL ES 2.0 Mesa 19.1.0-devel

              yes. the current platform can be inspected during runtime with QGuiApplication::platformName()

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              J 1 Reply Last reply 2 Mar 2020, 08:48
              1
              • R raven-worx
                1 Mar 2020, 11:42

                @jackson7281 said in Qml Gridview implement in OpenGL:

                Does that means the QML has run the OpenGL correctly ?

                qt.scenegraph.general: GL_VERSION: OpenGL ES 2.0 Mesa 19.1.0-devel

                yes. the current platform can be inspected during runtime with QGuiApplication::platformName()

                J Offline
                J Offline
                jackson7281
                wrote on 2 Mar 2020, 08:48 last edited by jackson7281 3 Feb 2020, 08:49
                #7

                @raven-worx
                Thank you for your help, now I can move forward my project.

                1 Reply Last reply
                0

                1/7

                29 Feb 2020, 05:01

                • 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