# SDL deleting an image from the screen?

Well, I'm sort of a beginner to SDL, and I was wondering how one would go about deleting an image from the screen and replacing it with another? I attempted to do this, but it didn't seem to change it, how would someone with more experience than me go about doing it?

• I'm unfamiliar with SDL, but in most graphics I've worked with, you must always specifically draw the image every frame for it to remain there. To make it disappear, I'd just stop calling the code that draws it. – Anko Jan 14 '13 at 3:05
• Some more detail on what you're doing currently and why you think that's not working for you would be useful to potential answerers. – Anko Jan 14 '13 at 3:07

You need to flip the buffer surface to the screen to make it update. You need SDL_Flip function.