Jump to content
  • Advertisement
Sign in to follow this  
Stromberg

Clear screen

This topic is 3686 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

How to clear the screen with SDL? Is there a special function or the like? How do you clear the screen (black)? Stromberg

Share this post


Link to post
Share on other sites
Advertisement
SDL_FillRect(myScreen, NULL, 0x00)

The first parameter is the SDL_Surface to fill. The second parameter takes a SDL_Rect pointer, that points to the area of that surface that you are filling, but when you're filling the entire surface, you can just use NULL. The third parameter is the color in hexadecimal.

SDL_FillRect

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!