[SDL] Double buffering waitretrace and flickering

dtabuenc at cs.ucr.edu dtabuenc at cs.ucr.edu
Wed Aug 18 20:40:35 PDT 1999


> 
> Did you initialize SDL with SDL_DOUBLEBUFFER or SDL_DOUBLEBUF? (i'm not sure which
> is is right now) but you have to do it to have access to the back buffer,  right?

I don't mean to be rude but do people actually read the body of the
message or just the subject? I've been getting responses that tell me
to enable double buffering... I already said that I am checking the
return and verifying that I am in fact double buffering.The functions
UI am using are SDL or Fill_Rect to clear the screen to black, then
SDL_BlitSurface or whatever the blitting function is called to blit a
64x64 image to the screen (which is 640x480x16). Then I just use
SDL_Flip to swap the buffers. I do this over and over in a tight loop.
This is not part of anything I am just using it to test so the 3
functions are in a tight loop. Also I read that I wasn't supposed to
use SDL_BlitSurface on a locked surface. Hmm... Just occoured to me.
does  that mean you can use it on a surface that requires locking? I
guess not because then you would never be able to blit ANYTHING to the
screen. Again the only thing I can figure out is that it is not waiting
for a retrace. Can I just post the code so you can figure it out? It's
pretty small...




More information about the SDL mailing list