SFML community forums

Help => Graphics => Topic started by: Meerjel01 on April 24, 2023, 05:45:37 pm

Title: Textures Container
Post by: Meerjel01 on April 24, 2023, 05:45:37 pm
A theory:
I've done this with my Xbox homebrew engines that a class contains a list of textures which entities uses by linking a specific texture from the container to the entity's sprite. This way used textures don't get duplicated for a single entity.

Maybe it's already implemented in SFML but if not, here's an idea for you :)
Title: Re: Textures Container
Post by: eXpl0it3r on April 24, 2023, 09:48:10 pm
You mean something like the ResourceHolder (https://github.com/SFML/SFML-Game-Development-Book/tree/master/02_Resources/Include/Book) from the SFML Game Development book? :)
Title: Re: Textures Container
Post by: Meerjel01 on April 25, 2023, 07:56:06 am
Apparently  :)