SFML community forums

Help => Graphics => Topic started by: Jimmyee on May 09, 2013, 09:30:57 pm

Title: How to merge textures quickly?
Post by: Jimmyee on May 09, 2013, 09:30:57 pm
How to do that quickly? D I have to use RenderTexture? I have to create a big texture so I can use only one while drawing 2D map with vertex arrays. I thought it's possible through sf::Image somehow but I can't get it working.
Title: Re: How to merge textures quickly?
Post by: Laurent on May 09, 2013, 10:15:59 pm
Why don't you do it with an image editor, instead of using code and doing it all the time?

You can use sf::Image::copy to copy an image to a bigger one.
Title: Re: How to merge textures quickly?
Post by: Jimmyee on May 10, 2013, 06:03:43 pm
Thank you.
I just wanted to use multiple sprite sets saved in several files. I'd build a custom virtual texture with the tiles the map is gonna use. Anyways, I realised it's complicated and just moved all the sprites to one texture :P