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

Pages: [1]
1
General discussions / Multiple IntRects in a single Sprite
« on: June 15, 2020, 08:42:27 pm »
I'm trying to do level gen but I want to have a single sprite for the level. I have a sprite sheet and i would like to assign different textures to different "areas" of a sprite.

sprite.setTextureRect(sf::IntRect(0, 0, 32, 32));
sprite.setTextureRect(sf::IntRect(32,32,32,32));
 

The code above I know would replace the texture rect but is there a way that I can have both?

Pages: [1]