Hi - am trying to get the OpenGL Boxes sample built and am struggling. I'm being told:
:-1: error: This example requires Qt to be configured with -opengl desktop
all of which is fine - I've rebuilt Qt from source with the -opengl desktop flag set. My config now reports itself as below:
c++11 minimal-config small-config medium-config large-config full-config debug_and_release build_all debug release shared zlib dynamicgl png freetype harfbuzz build_all accessibility opengl ssl openssl dbus audio-backend wmf-backend native-gestures qpa concurrent
- note the "opengl" but the occurrence of "dynamicgl" in there is triggering the error message, and if I ignore the message I get a whole load of opengl link errors.
I've built Qt 5.5 from source with VS2013 on Windows 7 and these options: "configure -platform win32-msvc2013 -opengl desktop -developer-build" - it seems to me I've done everything I should need to, but obviously not. So... what's going wrong? All help welcome! Thanks, Mike
A partial answer turns out to be to set the opengl linkage explicitly; remove the test, and set the search location for opengl thus:
LIBS += -L'C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/um/x64' -lOpenGL32
The -L reference points to a folder containing 64-bit OpenGL library - in my case this came with the latest Windows SDK.
The doc refers to an "environment variable QT_OPENGL" but is very unclear how that should be set. Perhaps it should be set to point to that folder - does anyone know? And is it a Windows environment variable?
Also, enigmatically, the "New Features" notes for 5.5. tell us:
"On Windows the OpenGL implementation to use can now be configured based on the GPU vendor and driver version using JSON configuration files. This allows shipping fine-grained card and driver blacklists with the apps, when necessary."
...but there seems to be precisely zero explanation of what that actually means or how to define or locate these mysterious JSON files. it suggests it would be possible to point to an OpenGL library on the hoof - obviously important for multiple installations - but in the absence of an example the poor vexed user is left high and dry. Again, can ANYONE explain what this is all about?