Women in Technology

Hear us Roar



Article:
  Animation in SDL: Hardware Surfaces
Subject:   No luck :(
Date:   2005-04-29 09:42:57
From:   vmicho
I'm getting always 2000fps and so I get also tearing.
It never waits for retrace. I tried lotsa different codes.
Also SDL_blit isnt working for me on a locked screen :( weird.


In the Allegro library, there is a function for rtrace sync. I wonder why this isnt implemented in SDL.


Full Threads Newest First

Showing messages 1 through 1 of 1.

  • No luck :(
    2010-07-09 00:30:31  lunardivide [View]

    Allegro relies on VESA and VGA standards to implement retrace syncing. These are not properly supported on many drivers although NVIDIA cards are reported to work more reliably than other types of cards for these standards. I have even seen a case with the Dell Desktop on-board driver where flipping the screen *without* retrace did not work. The driver went so far as to change the VGA hardware layer to use triple buffering (schedule a frame change and return immediately) when an immediate buffer change was requested. This caused severe tearing where half the screen showed what was currently being drawn. I would imagine that SDL prioritizes reliability over feature support. Many applications simply leave double-buffering off by default and use less reliable methods like these at the user's option. If you would like to implement an Allegro-like VESA screen retrace sync in SDL, it is a very simple system call for PC's (just a few lines of code). I am not sure what options there are for Apple.