Jump to content
  • Advertisement
Sign in to follow this  
felipefcm

Double Buffer in SDL

This topic is 2564 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!