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 - dverg

Pages: [1]
1
Graphics / setTextureRect() or setTexture()
« on: February 12, 2013, 09:03:11 pm »
Hi

sorry, if this question is already answered, but I got a database error while using the search function...

I'm just switched to SFML 2 and currently I'm reading through the documentation. The new way to use sf::Sprite with sf::Texture instead of sf::Image seems very interesting to me.

But here is my question:
If I want to implement an animation, would it be better have several sf::Texture's and switch the images from the animation with sf::Sprite::setTexture().
Or is the better way to have one large sf::Texture containing all the animation images and then, each time the image should change, calling the function sf::Sprite::setTextureRect().

thanks and I apologize for my bad english :)

Pages: [1]