1
Graphics / Animated sprite in SFML
« on: February 03, 2012, 09:04:18 pm »
I'm planning a little animated sprite class for SFML. I think it makes sense to inherit from sf::Drawable or sf::Sprite (the first seems nicer in theory, but I think the second might work better, or at least more easily, in practice).
Anyway, I have two little questions to help me decide on implementation.
1. Is there much of a performance difference between loading lots of small textures as opposed to one large one?
2. Is either of sf::Sprite::SetTexture or sf::Sprite::SetSubRect likely to be significantly faster (I don't know if this question can be easily answered, if not I guess I could use a profiler if I really wanted to...)
Thanks,
Xander
Anyway, I have two little questions to help me decide on implementation.
1. Is there much of a performance difference between loading lots of small textures as opposed to one large one?
2. Is either of sf::Sprite::SetTexture or sf::Sprite::SetSubRect likely to be significantly faster (I don't know if this question can be easily answered, if not I guess I could use a profiler if I really wanted to...)
Thanks,
Xander