• Advertisement
Sign in to follow this  

Double Buffer in SDL

This topic is 2295 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement