From 1ff94b05e977378776ba9f73e82d5c20b4f6bc3e Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 17 Dec 2012 12:43:26 +0100 Subject: OpenGL examples: Add error message about ANGLE on Windows These OpenGL examples require a Desktop OpenGL and will not build with OpenGL ES 2.0. This means those examples do not build on Windows with the default configuration using ANGLE. ANGLE is wrapping OpenGL ES 2.0 to DirectX and does not support the full Desktop OpenGL feature set. Since this is confusing for Windows users that do not know about ANGLE this patch adds an explicit error message describing the solution. (configuring Qt with -opengl desktop) Task-number: QTBUG-28590 Change-Id: I782e6830b9e282ddcc8a2ee0a47faf3579d36aab Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen (cherry picked from commit 63693430c7cb8e8ede611eb9e99f305370d11ff9) Reviewed-by: Sergio Ahumada --- examples/opengl/framebufferobject2/framebufferobject2.pro | 6 ++++++ examples/opengl/grabber/grabber.pro | 6 ++++++ examples/opengl/hellogl/hellogl.pro | 6 ++++++ examples/opengl/overpainting/overpainting.pro | 6 ++++++ examples/opengl/pbuffers/pbuffers.pro | 6 ++++++ examples/opengl/pbuffers2/pbuffers2.pro | 6 ++++++ examples/opengl/samplebuffers/samplebuffers.pro | 6 ++++++ 7 files changed, 42 insertions(+) diff --git a/examples/opengl/framebufferobject2/framebufferobject2.pro b/examples/opengl/framebufferobject2/framebufferobject2.pro index d26751ab0e..3a0dbb4446 100644 --- a/examples/opengl/framebufferobject2/framebufferobject2.pro +++ b/examples/opengl/framebufferobject2/framebufferobject2.pro @@ -10,3 +10,9 @@ INSTALLS += target simulator: warning(This example might not fully work on Simulator platform) + +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} diff --git a/examples/opengl/grabber/grabber.pro b/examples/opengl/grabber/grabber.pro index a60dbbe2dc..c4c54c7c32 100644 --- a/examples/opengl/grabber/grabber.pro +++ b/examples/opengl/grabber/grabber.pro @@ -11,3 +11,9 @@ INSTALLS += target simulator: warning(This example might not fully work on Simulator platform) + +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} diff --git a/examples/opengl/hellogl/hellogl.pro b/examples/opengl/hellogl/hellogl.pro index acaca35635..42913835a2 100644 --- a/examples/opengl/hellogl/hellogl.pro +++ b/examples/opengl/hellogl/hellogl.pro @@ -16,3 +16,9 @@ INSTALLS += target simulator: warning(This example might not fully work on Simulator platform) + +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} diff --git a/examples/opengl/overpainting/overpainting.pro b/examples/opengl/overpainting/overpainting.pro index 08fe9b3dae..141c8cb7ce 100644 --- a/examples/opengl/overpainting/overpainting.pro +++ b/examples/opengl/overpainting/overpainting.pro @@ -15,3 +15,9 @@ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/overpainting INSTALLS += target simulator: warning(This example might not fully work on Simulator platform) + +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} diff --git a/examples/opengl/pbuffers/pbuffers.pro b/examples/opengl/pbuffers/pbuffers.pro index 1a9882c45d..57bb3aa32a 100644 --- a/examples/opengl/pbuffers/pbuffers.pro +++ b/examples/opengl/pbuffers/pbuffers.pro @@ -11,3 +11,9 @@ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers INSTALLS += target simulator: warning(This example might not fully work on Simulator platform) + +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} diff --git a/examples/opengl/pbuffers2/pbuffers2.pro b/examples/opengl/pbuffers2/pbuffers2.pro index 31fd22cced..c53309d1fa 100644 --- a/examples/opengl/pbuffers2/pbuffers2.pro +++ b/examples/opengl/pbuffers2/pbuffers2.pro @@ -9,3 +9,9 @@ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers2 INSTALLS += target simulator: warning(This example might not fully work on Simulator platform) + +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} diff --git a/examples/opengl/samplebuffers/samplebuffers.pro b/examples/opengl/samplebuffers/samplebuffers.pro index 5793ea3e68..d16993adfe 100644 --- a/examples/opengl/samplebuffers/samplebuffers.pro +++ b/examples/opengl/samplebuffers/samplebuffers.pro @@ -9,3 +9,9 @@ INSTALLS += target simulator: warning(This example might not fully work on Simulator platform) + +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} -- cgit v1.2.3