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

Author Topic: [Android] LoadFromFile (Not apk/internal asset)  (Read 1123 times)

0 Members and 1 Guest are viewing this topic.

CytraL

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • GitHub
[Android] LoadFromFile (Not apk/internal asset)
« on: June 09, 2015, 06:32:53 am »
I see that Android ResourceStream implementation only works with Internal Assets... perhaps is best uses "FILE" against "Asset" and use "funopen" for get FILE handle... and try first to get a internal assets if it can't... try with 'normal' resource... or something like that :\

Or.. exists any method for load "external" assets??!?!!

*** In 2.3 i get a crash when try load a file that doesn't exists.
Code: [Select]
sf::Texture texture;
texture.loadFromFile("ssss");  <-- CRASH!


How i can help with Android branch?

Grettings!
dev@redneboa.es | WordPress | GitHub | YouTube

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: [Android] LoadFromFile (Not apk/internal asset)
« Reply #1 on: June 10, 2015, 10:25:34 am »
External loading doesn't exist yet due to there being no real "interface" for it so far.

However, you should be able to do it just by creating your own sf::Stream object and using sf::Texture::loadFromStream.

To help/contribute: just create your own fork on GitHub, implement your changes, create a pull request for review (or a topic on the forums first if you're not sure about whether that's something wanted).

 

anything