Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lu6cifer

Pages: [1]
1
Graphics / Maintaining background image through window.clear()
« on: June 19, 2013, 02:22:58 am »
I'm very new to SFML, so this question will probably be a bit basic  :P

I'm trying to do some basic animation, so i've created a sprite and everytime i click my mouse, the window will clear the screen with black and redraw the sprite at my mouse position (as far as i know, this is usually how you animate things?)

But the problem comes when i try to use a background image; the window.clear() function only allows me to clear with an RGB color, so upon clearing, the background image gets cleared as well.

I've thought about fixing this by simply loading the background right after clearing, but does SFML have a way to make certain images persist after the frame is cleared?

Pages: [1]
anything