diff options
Diffstat (limited to 'examples/qt3d')
-rw-r--r-- | examples/qt3d/scene3d/AnimatedEntity.qml | 3 | ||||
-rw-r--r-- | examples/qt3d/scene3d/main.cpp | 14 | ||||
-rw-r--r-- | examples/qt3d/simple-qml/main.qml | 3 |
3 files changed, 18 insertions, 2 deletions
diff --git a/examples/qt3d/scene3d/AnimatedEntity.qml b/examples/qt3d/scene3d/AnimatedEntity.qml index d1975cb47..2cfeeb73a 100644 --- a/examples/qt3d/scene3d/AnimatedEntity.qml +++ b/examples/qt3d/scene3d/AnimatedEntity.qml @@ -51,7 +51,7 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 -import Qt3D.Extras 2.0 +import Qt3D.Extras 2.15 import QtQuick 2.0 as QQ2 @@ -77,6 +77,7 @@ Entity { activeFrameGraph: ForwardRenderer { camera: camera clearColor: "transparent" + showDebugOverlay: true } }, InputSettings { } diff --git a/examples/qt3d/scene3d/main.cpp b/examples/qt3d/scene3d/main.cpp index 8886263f4..8d8bc581e 100644 --- a/examples/qt3d/scene3d/main.cpp +++ b/examples/qt3d/scene3d/main.cpp @@ -53,6 +53,20 @@ int main(int argc, char **argv) { + { + // Set OpenGL requirements + QSurfaceFormat format = QSurfaceFormat::defaultFormat(); +#ifndef QT_OPENGL_ES_2 + format.setVersion(4, 1); + format.setProfile(QSurfaceFormat::CoreProfile); + format.setSamples(4); +#else + format.setVersion(3, 0); + format.setProfile(QSurfaceFormat::NoProfile); + format.setRenderableType(QSurfaceFormat::OpenGLES); +#endif + QSurfaceFormat::setDefaultFormat(format); + } QGuiApplication app(argc, argv); QQuickView view; diff --git a/examples/qt3d/simple-qml/main.qml b/examples/qt3d/simple-qml/main.qml index 5eed965ca..9f4149202 100644 --- a/examples/qt3d/simple-qml/main.qml +++ b/examples/qt3d/simple-qml/main.qml @@ -52,7 +52,7 @@ import QtQuick 2.2 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 -import Qt3D.Extras 2.0 +import Qt3D.Extras 2.15 Entity { id: sceneRoot @@ -78,6 +78,7 @@ Entity { activeFrameGraph: ForwardRenderer { clearColor: Qt.rgba(0, 0.5, 1, 1) camera: camera + showDebugOverlay: true } }, // Event Source will be set by the Qt3DQuickWindow |