Qt World Summit: Register Today!

Graphics tearing

  • Hi all,
    I working on a simple app for an embedded platform currently running Qt4.6, though we plan to move to 4.7 soon. I'm trying to get some simple animations running smoothly.

    My test app is built using QPropertyAnimations to move 8 100x200 QPixmap images around the screen. The app seems to be working fine. The frame rate looks good, but the animations are showing a very noticeable tearing. My guess is that blit operations are not properly timed with the vsync.

    I've looked through the docs, but I can't see any method for dealing with vsync. Is there anything I can do to eliminate or even just minimize the tearing? Is the vsync something that needs to be handled at a lower level, like the directfb?

    I'm running my app with -qws -display directfb.


  • Hi,

    you are not the only one with this problem..
    If you are using OpenGL (I would recommend to use Opengl due to hardware accerlation) :
    According to the documentation there is a possibilty to set the swapInterval of your QGLWidget.

    QGLFormat fmt = QGLFormat::defaultFormat();

Log in to reply