Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens when Qt is compiled with no-angle and -no-opengl?

Tags:

c++

qt

opengl

Recently I tried to compile my Qt static libraries with both -no-angle and -no-opengl. I first thought that it would not compile. But unexpectedly, Qt (5.7) compiled just fine. I could also compile my application (using many QtWidgets).

To my surprise I could not see any difference with my Angle based Qt app. No lags, no glitches, my QtCharts were displaying as always.

I could not find any definitive answer on the web. but I have two guesses:

  • I was not really using any hardware acceleration after all.
  • There is a mysterious fallback mechanism.

What is going on here ?

like image 956
Arnaud Avatar asked Feb 27 '17 13:02

Arnaud


1 Answers

What happens? In your case nothing. Qt widgets don't use OpenGL behind your back. You have to explicitly force its use in a given widget stack by using the QOpenGlWidget as the top level widget. By default, you're using the CPU-based raster rendering backend - as you noted, it performs quite well.

Compiling Qt without angle and OpenGL support is a good way to make your application smaller if you don't use OpenGL :)

like image 116
Kuba hasn't forgotten Monica Avatar answered Nov 05 '22 03:11

Kuba hasn't forgotten Monica