Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
1  
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
add comment

1 Answer

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

Take a look at this tutorial: Lazy Foo' SDL Tutorial

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.