[Interest] OpenGL Window Example: Terrible resize window performance

Till Oliver Knoll till.oliver.knoll at gmail.com
Sun Jul 13 18:36:32 CEST 2014



Am 13.07.14 15:47, schrieb Till Oliver Knoll:
> Hi,
> 
> anyone else noticed that the performance is terrible when resizing the
> window of the "OpenGL Window Example"?

A quick experiment confirmed my suspicion that it must have anything to
do with the "animation triggering": when in main.cpp I

  setwindow.setAnimating(false);

then the resizing is smooth. Off course the triangle does not rotate
(funnily it does while resizing the window ;)).

As the animation basically posts an update request in
OpenGLWindow::renderLater:

  QCoreApplication::postEvent(this, new QEvent(QEvent::UpdateRequest));

and also keeps track of "pending updates" with a member variable
(m_update_pending) this must somehow interfere (at least on OS X) with
the "resize events" sent by the OS.

So far my quick'n'dirty analysis and educated guesswork...

Cheers, Oliver



More information about the Interest mailing list