From 052e60d67e87d40e8aea0dc132519319a5a40409 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 20 Aug 2015 14:59:43 +0200 Subject: gltf example: show a note to explain the lack of material on non-ES Change-Id: Ic268445614a2d9d645029629747f5ef2e1aedc97 Reviewed-by: Sean Harmer --- examples/qt3d/gltf/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'examples/qt3d/gltf') diff --git a/examples/qt3d/gltf/main.cpp b/examples/qt3d/gltf/main.cpp index 1c1018404..9cd7025fa 100644 --- a/examples/qt3d/gltf/main.cpp +++ b/examples/qt3d/gltf/main.cpp @@ -40,6 +40,7 @@ #include #include +#include #include int main(int argc, char* argv[]) @@ -61,5 +62,13 @@ int main(int argc, char* argv[]) engine.setSource(QUrl("qrc:/main.qml")); view.show(); + const bool isES = QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES + || view.requestedFormat().renderableType() == QSurfaceFormat::OpenGLES; + if (!isES) + qDebug("Using a non-OpenGL ES context. This may result in no material on the model " + "as currently the standard glTF format only includes OpenGL ES 2.0 shaders. " + "To overcome this, run the application on OpenGL ES or use the qgltf tool " + "with -g to generate a slightly extended glTF asset from the original COLLADA source."); + return app.exec(); } -- cgit v1.2.3