[SDL] Double buffering waitretrace and flickering
shodan at CBL-atabuen.hs.earthlink.net
Wed Aug 18 09:01:25 PDT 1999
> I believe this is correct. Usually the cause of flickering when double
> buffering is set up is that the two video pages have different contents.
> When using double-buffering, you have to remember that after the flip,
> the contents of the new buffer are the screen contents from the _previous_
> frame. This is ONLY true if the SDL_DOUBLEBUF flag is really set in the
> screen surface after you call SDL_SetVideoMode().
> -Sam Lantinga (slouken at devolution.com)
Yeah... But did you see what I am doing? I am clearing to black with
SDL_FillRect, then I do a blit to the surface and then I do
SDL_flip(screen) then rinse and repeat. Screen is the surface which I did
verify has the SDL_DOUBLEBUF bit on. So since I am clearing the buffer
completely before blitting again it still flickers, and I am not even
animating anything at this point. It looks as though the flip is not doing
a wait for retrace... I can't think how else I can get flicker since I use
double buffering, clear the entire backbuffer and blit one single 64x64
image onto it then flip.
More information about the SDL