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

Author Topic: is it ok to load texture object multiple times?  (Read 1493 times)

0 Members and 3 Guests are viewing this topic.

underww

  • Newbie
  • *
  • Posts: 34
    • View Profile
is it ok to load texture object multiple times?
« on: July 20, 2015, 12:21:02 pm »
Hello there,

I use only one sf::Texture object as a tileset at the same time.
but sometimes I need to change a tileset in game. (runtime)
in this case, can I call loadFromFile function again?
is there any drawback like waste memory? or should I delete and create the object?

Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: is it ok to load texture object multiple times?
« Reply #1 on: July 20, 2015, 01:20:44 pm »
Quote
in this case, can I call loadFromFile function again?
Yes.
Laurent Gomila - SFML developer