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. How to enable OpenGl rendering in QML?
Forum Updated to NodeBB v4.3 + New Features

How to enable OpenGl rendering in QML?

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 2 Posters 220 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.
  • M Offline
    M Offline
    Mizmas
    wrote on 21 Apr 2025, 20:45 last edited by
    #1

    I've tried enabling OpenGl rendering by setting the environment variable
    set QT_QUICK_BACKEND=opengl
    But I get the debug log and it falls back to using Direct3D:

    Debug: Loading backend opengl
    Warning: Could not create scene graph context for backend 'opengl' - check that plugins are installed correctly in C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/plugins
    

    Any help?

    J 1 Reply Last reply 22 Apr 2025, 05:26
    0
    • M Mizmas
      21 Apr 2025, 20:45

      I've tried enabling OpenGl rendering by setting the environment variable
      set QT_QUICK_BACKEND=opengl
      But I get the debug log and it falls back to using Direct3D:

      Debug: Loading backend opengl
      Warning: Could not create scene graph context for backend 'opengl' - check that plugins are installed correctly in C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/plugins
      

      Any help?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 22 Apr 2025, 05:26 last edited by
      #2

      @Mizmas Did you do what the warning suggests?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply 22 Apr 2025, 10:10
      0
      • J jsulm
        22 Apr 2025, 05:26

        @Mizmas Did you do what the warning suggests?

        M Offline
        M Offline
        Mizmas
        wrote on 22 Apr 2025, 10:10 last edited by
        #3

        @jsulm But what subfolder is it actually looking for? It just specifies the "Plugins" folder, which I have. For example I did find the openglrenderer.dll in "C:\Qt\Tools\QtDesignStudio\qt6_design_studio_reduced_version\plugins\renderers\openglrenderer.dll"

        J 1 Reply Last reply 22 Apr 2025, 10:48
        0
        • M Mizmas
          22 Apr 2025, 10:10

          @jsulm But what subfolder is it actually looking for? It just specifies the "Plugins" folder, which I have. For example I did find the openglrenderer.dll in "C:\Qt\Tools\QtDesignStudio\qt6_design_studio_reduced_version\plugins\renderers\openglrenderer.dll"

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 22 Apr 2025, 10:48 last edited by
          #4

          @Mizmas Set QT_DEBUG_PLUGINS env variable before running your app to get more information why it fails (https://doc.qt.io/qt-6/debug.html)

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply 22 Apr 2025, 11:15
          0
          • J jsulm
            22 Apr 2025, 10:48

            @Mizmas Set QT_DEBUG_PLUGINS env variable before running your app to get more information why it fails (https://doc.qt.io/qt-6/debug.html)

            M Offline
            M Offline
            Mizmas
            wrote on 22 Apr 2025, 11:15 last edited by
            #5

            @jsulm Well, I think this is it, it's looking for a "scenegraph" subfolder, which isn't in my "plugins" folder, I can't find any scenegraph specifically in the Qt maintenance tool, and I do have all the additional libraries installed:
            Screenshot_1.png

            Debug: Loading backend opengl
            Debug: checking directory path "C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/plugins/scenegraph" ...
            Debug: checking directory path "C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/bin/scenegraph" ...
            Warning: Could not create scene graph context for backend 'opengl' - check that plugins are installed correctly in C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/plugins
            
            J 1 Reply Last reply 22 Apr 2025, 11:19
            0
            • M Mizmas
              22 Apr 2025, 11:15

              @jsulm Well, I think this is it, it's looking for a "scenegraph" subfolder, which isn't in my "plugins" folder, I can't find any scenegraph specifically in the Qt maintenance tool, and I do have all the additional libraries installed:
              Screenshot_1.png

              Debug: Loading backend opengl
              Debug: checking directory path "C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/plugins/scenegraph" ...
              Debug: checking directory path "C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/bin/scenegraph" ...
              Warning: Could not create scene graph context for backend 'opengl' - check that plugins are installed correctly in C:/Qt/Tools/QtDesignStudio/qt6_design_studio_reduced_version/plugins
              
              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 22 Apr 2025, 11:19 last edited by
              #6

              @Mizmas I'm wondering why it is searching in C:\Qt\Tools\QtDesignStudio. It should search in the Qt installation folder. Did you change any env variable like PATH?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              M 2 Replies Last reply 22 Apr 2025, 11:29
              0
              • J jsulm
                22 Apr 2025, 11:19

                @Mizmas I'm wondering why it is searching in C:\Qt\Tools\QtDesignStudio. It should search in the Qt installation folder. Did you change any env variable like PATH?

                M Offline
                M Offline
                Mizmas
                wrote on 22 Apr 2025, 11:29 last edited by
                #7

                @jsulm Well, it's probably because I'm in the Qt Design Studio :D I'm just designing the UI, I'm not loading the UI with c++ or python. It should still be possible to switch the rendering though, for example I can successfully switch to software rendering, and since the Qt Design Studio has the openglrenderer.dll inside it's folder, it should also be possible.

                M 1 Reply Last reply 22 Apr 2025, 15:46
                0
                • M Mizmas
                  22 Apr 2025, 11:29

                  @jsulm Well, it's probably because I'm in the Qt Design Studio :D I'm just designing the UI, I'm not loading the UI with c++ or python. It should still be possible to switch the rendering though, for example I can successfully switch to software rendering, and since the Qt Design Studio has the openglrenderer.dll inside it's folder, it should also be possible.

                  M Offline
                  M Offline
                  Mizmas
                  wrote on 22 Apr 2025, 15:46 last edited by
                  #8

                  @Mizmas I did a fresh latest install of PySide6 in a .venv, and loaded the .qml file with QQmlApplicationEngine with the OpenGl environment variable set, and it's the same error, it's looking for a scenegraph subfolder inside the plugins folder, but there's no damn scenegraph folder

                  [DEBUG] checking directory path "C:/Users/gusta/OneDrive/Dokumentai/PyCharmProjects/Medieval/.venv/Lib/site-packages/PySide6/plugins/scenegraph" ...
                   [DEBUG] checking directory path "C:/Users/gusta/AppData/Local/Programs/Python/Python312/scenegraph" ...
                   [WARNING] Could not create scene graph context for backend 'opengl' - check that plugins are installed correctly in C:/Users/gusta/OneDrive/Dokumentai/PyCharmProjects/Medieval/.venv/Lib/site-packages/PySide6/plugins
                  
                  1 Reply Last reply
                  0
                  • J jsulm
                    22 Apr 2025, 11:19

                    @Mizmas I'm wondering why it is searching in C:\Qt\Tools\QtDesignStudio. It should search in the Qt installation folder. Did you change any env variable like PATH?

                    M Offline
                    M Offline
                    Mizmas
                    wrote on 23 Apr 2025, 10:21 last edited by
                    #9

                    @jsulm It turns out you need to use QSG_RHI_BACKEND=opengl instead

                    1 Reply Last reply
                    1
                    • M Mizmas has marked this topic as solved on 23 Apr 2025, 10:21

                    4/9

                    22 Apr 2025, 10:48

                    • Login

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