[SDL] Double buffering waitretrace and flickering

Sam Lantinga slouken at devolution.com
Wed Aug 18 08:40:10 PDT 1999


> to my knowledge you only have access to the backbuffer. 
> When using double buffering you should test the return value of
> SDL_SetVideoMode in order to check if you have really a double buffer.
> As far as I know SDL_Flip() waits to vsync, the one possible reason for the
> flickering might be, that your back- and frontbuffer are not in sync, meaning,
> they contain different content.

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)

Lead Programmer, Loki Entertainment Software
--
"Any sufficiently advanced bug is indistinguishable from a feature"
						 -- Rich Kulawiec 



More information about the SDL mailing list