Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
[SOLVED]Loading a texture using Physfs
Print
Pages: [
1
]
Author
Topic: [SOLVED]Loading a texture using Physfs (Read 2398 times)
0 Members and 1 Guest are viewing this topic.
fundo
Newbie
Posts: 7
[SOLVED]Loading a texture using Physfs
«
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?
«
Last Edit: October 18, 2013, 09:00:40 pm by fundo
»
Logged
FRex
Hero Member
Posts: 1848
Back to C++ gamedev with SFML in May 2023
Re: Loading a texture using Physfs
«
Reply #1 on:
October 18, 2013, 07:12:03 pm »
https://github.com/SFML/SFML/wiki/Source%3A-PhysicsFS-Input-Stream
Logged
Back to C++ gamedev with SFML in May 2023
fundo
Newbie
Posts: 7
Re: Loading a texture using Physfs
«
Reply #2 on:
October 18, 2013, 08:58:16 pm »
omg... it is that easy?? thank you kind sir!
Logged
FRex
Hero Member
Posts: 1848
Back to C++ gamedev with SFML in May 2023
Re: [SOLVED]Loading a texture using Physfs
«
Reply #3 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.
Logged
Back to C++ gamedev with SFML in May 2023
fundo
Newbie
Posts: 7
Re: [SOLVED]Loading a texture using Physfs
«
Reply #4 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
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
[SOLVED]Loading a texture using Physfs