# Do I have to clear the entire target with a single color every frame?

Do I have to clear the entire target with a single color every frame? I thought the newly drawn ones will overwrite the old ones.

• What do you observe when you don't clear the target with a single colour? Does the result visibly differ from what you want? Jul 11 at 11:06
• I saw nothing. The result did not visibly differ from what I want. Because no objects were drawn on the screen. Jul 11 at 11:15
• You don't want any objects drawn on the screen? Jul 11 at 11:19
• I am learning the basics of SFML, and I want to test things, DMGregory. Jul 11 at 11:32

So you're right, if you plan to redraw the whole screen, every frame, then you don't have to call clear.
...but since calling clear is cheap, it is highly recommended to do so: it will prevent some eventual WTF?!!!? during future development (e.g. WTF, why are there weird shapes when I debug my character movement code ?!!!?). Also, since it is generally expected to be there, you'll get less weird looks at you when you have other devs look at your code. Without going into details, it can help you find some bugs with your code that would be harder to track if you didn't do it.