Solved OpenGL Accelerated Series work only from Qt Creator
-
My system is: Windows 7, with Qt 5.11.1, QtCreator 4.7, MinGW 5.3
I'm displaying many LineSeries (depending on the configuration from 1 to 21) on a QChart, with new points every ~20ms.
For performance reasons I need to use OpenGL acceleration, which I can set by:
setUseOpenGL(1)
If I start the compiled program from QtCreator (Ctrl+R) it works correctly, since the "graphic" of the points changes, and the performance is increased.
If I run the compiled exe from windows, it does not.
Assuming a DLL is missing (even tho', I get no errors whatsoever) I copied:
opengl32sw.dll libGLESv2.dll libEGL.dll Qt5OpenGLd.dll Qt5OpenGL.dll
But nothing has changed, the performance is low and the graphic is the "common one".
Do you have any idea on what I am doing wrong?
Thanks
-
Hi and welcome to devnet,
How are you doing the deployment ?
Did you already check windeployqt ? -
@SGaist Thank you for your answer.
I did not know windeployqt, I had found many people suggesting using Dependency Walker and that's what I did :).Anyway, I've just run it, it copied a bunch of stuff and created directories in the exe folder.
BUT, sadly the problem is still there.
Maybe Qt Creator sets some enviromental variables?
-
Ok, following my last post I solved the issue.
Qt Creator sets in the environment variables:
QT_OPENGL = angle
which was not set automatically in Windows.
I simply tried
set QT_OPENGL = angle
in the console, and then I run the program (from the console). Now it works correctly.
I believe Qt should implement some notification if setUseOpenGL fails for some reason tho' :-)
Cheers