[Development] Late API addition in QScreen for 5.0

Christoph Feck christoph at maxiom.de
Fri May 4 16:03:59 CEST 2012


On Friday 04 May 2012 13:37:04 Samuel Rødal wrote:
> Hello,
> 
> to be able to achieve smooth animations in QML 2, the animations
> should ideally use a fixed timestep, and not a timer which might
> have inaccuracies depending on the platform and won't give fully
> smooth results.

Does OpenGL 2 have API to drive animations by vertical blanking 
interrupts instead of using a timer? From my experience with movie 
players, you always get tearing or stuttering, if the frame rate of 
the display is not a 100% exact multiple of that of the animation or 
the video.

> In the context of this, and to avoid having values of 60 hard-coded
> (we have a couple of those in qtdeclarative/src/quick already), we
> really need to know the refresh rates of the screens we're
> rendering to. I've therefore added QScreen::refreshRate(), which
> gives the screen's vertical refresh rate, and thus can be used to
> run visual animations with a fixed timestep without the animation
> running faster or slower on different displays.
> 
> The change is up for review at
> https://codereview.qt-project.org/#change,25317
> 
> --
> Samuel
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list