Advertisement

Double Buffer in SDL

Started by November 07, 2011 10:00 PM
0 comments, last by Wooh 13 years, 3 months ago
Hi everyone.

I read that in some cases a SDL application may not obtain a double buffered surface, or even use video memory, if that surface is not in fullscreen mode.
I'm currently using Windows. My question is, if I create a surface with appropriate flags for double buffer not fullscreen, if the surface is not really double buffered, the pointer would be NULL? Or SDL will make some arrangements to let me use it like it is?
In case yes, if toggle fullscreen in runtime will make it? Or is necessary to restart the application in fullscreen?

Thank you.
To request hardware double buffering you pass SDL_HWSURFACE|SDL_DOUBLEBUF as flags to SDL_SetVideoMode. If it fails SDL instead tries to give you a software surface as if you had passed SDL_SWSURFACE instead of SDL_HWSURFACE. Software surfaces are always doubled buffered.

This topic is closed to new replies.

Advertisement