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

Author Topic: How to merge textures quickly?  (Read 2408 times)

0 Members and 1 Guest are viewing this topic.

Jimmyee

  • Newbie
  • *
  • Posts: 21
    • View Profile
How to merge textures quickly?
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to merge textures quickly?
« Reply #1 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.
Laurent Gomila - SFML developer

Jimmyee

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: How to merge textures quickly?
« Reply #2 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

 

anything