Skip to main content
gamedev.net
🔒 Locked

Double Buffer in SDL

Started by felipefcm Nov 7, 2011 at 10:00 PM 0 replies 1.7k views
Original Post
felipefcm
felipefcm
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.
Wooh
Wooh
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.