I noticed (only recently) that I could do something like this:
Create sprite
Set sprite's texture
Draw sprite to screen
Change sprite's position
Draw sprite to screen
Display
And it'll make two images appear at different locations.
I had been using one sf::Sprite per image before that =x
Anyways, which of the following is better for drawing multiple images to the screen at different positions?
A) One texture, many sprites with that texture.
B) One texture, one sprite with that texture but has its position moved around and drawn to the screen.
I'm guessing it's option B but I'd rather ask and be sure.
Also, if I had many different textures..
Should I be doing this?
Many textures, one sprite.
For each image, I just set the one sprite's texture, set the sprite's position and draw it.
So the loop will be, like:
sf::Sprite 'A' was created some where..
for each image I want to draw
set A's texture to that image
set A's position
draw A
end
render_window.Display()