1
Graphics / Re: Can you have two different global textures in different classes.
« on: April 24, 2017, 02:22:58 am »Make a resource holder class now. Global SFML resources will more often than not lead to crashes due to undefined destruction order.
Thor has an excellent resource holder class and the SFML Game Development book has some code for one as well.
what would a function in main that uses the Game Development example look like. Would it look something like this?
ResourceHolder exampleTexture;
sf::Texture cake;
exampleTexutre.load(cake, directory)
sf::Texture cake;
exampleTexutre.load(cake, directory)