Why are the frameSwapped and aboutToCompose signals of QOpenGLWidget emitted almost simultaneously?

85 Views Asked by At

In theory, if I enable the vertical sync option with setSwapInterval(1), the time interval between the emissions of these two signals should be at least the refresh period of the display. However, in practice, I find that the moments when these two signals are emitted are almost simultaneous in my environment. Why is this? Have I overlooked any settings options? This makes me feel as if the step of swapping the buffer has not taken place.

This is my options:

QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setVersion(3, 3);
format.setProfile(QSurfaceFormat::CoreProfile);
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
format.setSwapInterval(1);
QSurfaceFormat::setDefaultFormat(format);
......

Qt:5.12.10 Windows10 SDK

0

There are 0 best solutions below