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

Author Topic: [SOLVED]Loading a texture using Physfs  (Read 2187 times)

0 Members and 1 Guest are viewing this topic.

fundo

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
[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 »

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Back to C++ gamedev with SFML in May 2023

fundo

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
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!

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
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.
Back to C++ gamedev with SFML in May 2023

fundo

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
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

 

anything