Sign in to follow this  

Clear screen

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