diff options
Diffstat (limited to 'examples/qt3d/scene3d/main.cpp')
-rw-r--r-- | examples/qt3d/scene3d/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/qt3d/scene3d/main.cpp b/examples/qt3d/scene3d/main.cpp index f4f01a7ea..23be5e2c0 100644 --- a/examples/qt3d/scene3d/main.cpp +++ b/examples/qt3d/scene3d/main.cpp @@ -51,6 +51,9 @@ #include <QGuiApplication> #include <QQuickView> +#include <Qt3DRender/qt3drender-config.h> + + int main(int argc, char **argv) { { @@ -67,6 +70,11 @@ int main(int argc, char **argv) #endif QSurfaceFormat::setDefaultFormat(format); } + +#if !QT_CONFIG(qt3d_rhi_renderer) + qputenv("QSG_RHI_BACKEND", "opengl"); +#endif + QGuiApplication app(argc, argv); // Force OpenGL backend |