SFML community forums

Help => General => Topic started by: fundo on October 18, 2013, 06:59:48 pm

Title: [SOLVED]Loading a texture using Physfs
Post by: fundo on October 18, 2013, 06:59:48 pm
I'm a noob so forgive me if this question has already been asked. Suppose I have a texture sprite.png in a zip file myZip.zip and I wanna grab it using Physfs and load it into a sf::Texture. Is this possible? if so, which Physfs function does this?
Title: Re: Loading a texture using Physfs
Post by: FRex on October 18, 2013, 07:12:03 pm
https://github.com/SFML/SFML/wiki/Source%3A-PhysicsFS-Input-Stream
Title: Re: Loading a texture using Physfs
Post by: fundo on October 18, 2013, 08:58:16 pm
omg... it is that easy?? thank you kind sir!
Title: Re: [SOLVED]Loading a texture using Physfs
Post by: FRex on October 18, 2013, 09:40:51 pm
Keep in mind it's just mock up example. You probably have physfs.h in include path, not inside folder physfs/ and might want to have different input streams and pass them as sf::InputPointer in std::unique_ptr and so on.
Title: Re: [SOLVED]Loading a texture using Physfs
Post by: fundo on October 18, 2013, 10:44:22 pm
Noted. This I way much better than the nothing I was going on. Will make the necessary adjustments... thank you again