Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Quick question regarding copying of sprites.
Print
Pages: [
1
]
Author
Topic: Quick question regarding copying of sprites. (Read 1520 times)
0 Members and 1 Guest are viewing this topic.
heishe
Full Member
Posts: 121
Quick question regarding copying of sprites.
«
on:
February 16, 2011, 11:05:02 pm »
When I copy a sprite
( spritea = spriteb or my_sprite = new sf::Sprite(someothersprite))
does it create a hardcopy of the image or does it just copy pointers to the copied image.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Quick question regarding copying of sprites.
«
Reply #1 on:
February 16, 2011, 11:10:35 pm »
A sprite is not an image, images are sf::Image. So when you copy a sprite, all you copy internally is a few floats.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Quick question regarding copying of sprites.