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

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
    • View Profile
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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
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.
Laurent Gomila - SFML developer