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

Author Topic: how to load a texture with iOS  (Read 1169 times)

0 Members and 1 Guest are viewing this topic.

tanis

  • Newbie
  • *
  • Posts: 11
    • View Profile
how to load a texture with iOS
« on: November 13, 2015, 05:20:07 pm »
Hello,

I'm trying to load a Texture with loadFromFile on iOS but no matter what path I'm using I cannot find the file.
What's the correct way to load images on iOS?

Cheers!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: how to load a texture with iOS
« Reply #1 on: November 13, 2015, 06:37:40 pm »
Have you tried copying the image file, say `image.png`, to your application resource folder and use `.loadFromFile("image.png")`? If I remember correctly that's how it's supposed to work on iOS, but I might be wrong.
SFML / OS X developer

tanis

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: how to load a texture with iOS
« Reply #2 on: November 14, 2015, 05:04:21 pm »
I sorted it out. The problem was that I wasn't including SFML/Main. I didn't know about that. Haven't checked the forums before diving in the code. Then I checked the sources and I understood I was missing something.
Now that's working fine. I might even contribute support for tvOS now.

 

anything