How to enable OpenGl rendering in QML?
-
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?
-
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?
-
-
@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"
@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)
-
@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)
@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:
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
-
@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:
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
-
@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?
@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.
-
@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.
@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
-
@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?
-