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?

How to enable OpenGl rendering in QML?

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 2 Posters 188 Views
  • 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 23 days ago 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 23 days ago
    0
    • M Mizmas
      23 days ago

      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 Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote 23 days ago 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 23 days ago
      0
      • J jsulm
        23 days ago

        @Mizmas Did you do what the warning suggests?

        M Offline
        M Offline
        Mizmas
        wrote 23 days ago 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 23 days ago
        0
        • M Mizmas
          23 days ago

          @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 Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote 23 days ago 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 23 days ago
          0
          • J jsulm
            23 days ago

            @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 23 days ago 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 23 days ago
            0
            • M Mizmas
              23 days ago

              @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 Online
              J Online
              jsulm
              Lifetime Qt Champion
              wrote 23 days ago 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 23 days ago
              0
              • J jsulm
                23 days ago

                @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 23 days ago 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 23 days ago
                0
                • M Mizmas
                  23 days ago

                  @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 23 days ago 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
                    23 days ago

                    @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 22 days ago 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 22 days ago

                    9/9

                    23 Apr 2025, 10:21

                    • Login

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