summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/planets-qml/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/planets-qml/main.cpp')
-rw-r--r--examples/qt3d/planets-qml/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/qt3d/planets-qml/main.cpp b/examples/qt3d/planets-qml/main.cpp
index 32fca3136..da1335f80 100644
--- a/examples/qt3d/planets-qml/main.cpp
+++ b/examples/qt3d/planets-qml/main.cpp
@@ -52,6 +52,8 @@
#include <QQuickView>
#include <QQmlContext>
#include <QOpenGLContext>
+#include <Qt3DRender/qt3drender-config.h>
+
#include "networkcontroller.h"
int main(int argc, char **argv)
@@ -66,6 +68,9 @@ int main(int argc, char **argv)
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setSamples(4);
+#if !QT_CONFIG(qt3d_rhi_renderer)
+ qputenv("QSG_RHI_BACKEND", "opengl");
+#endif
NetworkController networkController;