We use Qt for the visualization viewer, and we are having problems with the QApplication::processEvents() method. Since we needed to control the frame rate (in the game loop mode), we redefined QApplication to define our own and our game loop, which looks like
MainApplication app; // Some code here while (true) { app.processEvents(); app.doFrame(); // sync code, nothing for now }
This works fine, the time is about 0.001s for calling processEvents() , whereas for an empty scene, doFrame() takes about 0.0001s. Now we have a problem when we double-click on the title bar (to enlarge the window). Indeed, after this, the call to processEvents() goes from approximately 0.001 to approximately 0.01 s (* 10). Most of the time, it seems, take in QPlatformBackingStore::composeAndFlush()
The view used is based on QOpenGLWidget, and all rendering is done outside of Qt (we write in Qt FBO).
Note that we do not override QApplication::processEvents() .
thanks
c ++ qt opengl qtopengl qapplication
Zouch
source share