Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
how to load a texture with iOS
Print
Pages: [
1
]
Author
Topic: how to load a texture with iOS (Read 1577 times)
0 Members and 1 Guest are viewing this topic.
tanis
Newbie
Posts: 11
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!
Logged
Hiura
SFML Team
Hero Member
Posts: 4321
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.
Logged
SFML / OS X developer
tanis
Newbie
Posts: 11
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.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
how to load a texture with iOS