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.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/qt3d/planets-qml/main.cpp b/examples/qt3d/planets-qml/main.cpp
index 2d38334e0..396a06083 100644
--- a/examples/qt3d/planets-qml/main.cpp
+++ b/examples/qt3d/planets-qml/main.cpp
@@ -43,6 +43,17 @@ int main(int argc, char **argv)
QQuickView view;
+ QSurfaceFormat format;
+#ifndef QT_OPENGL_ES_2
+#ifdef Q_OS_OSX
+ format.setVersion(3, 2);
+#endif
+ format.setProfile(QSurfaceFormat::CoreProfile);
+#endif
+ format.setDepthBufferSize(24);
+ format.setSamples(4);
+ view.setFormat(format);
+
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl("qrc:/PlanetsMain.qml"));
view.show();