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

Author Topic: Android/iOS "Soon"  (Read 41207 times)

0 Members and 1 Guest are viewing this topic.

Triebr

  • Newbie
  • *
  • Posts: 1
    • View Profile
Android/iOS "Soon"
« on: April 30, 2013, 05:13:40 am »
I noticed the main page of SFML says Android and iOS will be supported "Soon", but looking through the source I don't see any mention of Android or iOS.

How "soon" is soon? Has any work been started on these ports?

I currently use SDL2 which is easy to use on Android/iOS but SDL2 is still unstable, and I prefer SFML because it is C++ so I am interested to see an estimate on when Android support will be available.

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: Android/iOS "Soon"
« Reply #1 on: April 30, 2013, 05:27:14 am »
Well, considering how long it took SFML 2.0 to come out you'll probably be waiting a while :P

But in all seriousness....

Some news for the near future:
- SFML 2.1 will be released as quickly as possible and be a bug fix release
- SFML 2.2 should add support for iOS, I'm already working on it

This is a pretty big project. All of the OpenGL code used needs to be done with OpenGL ES code. I don't know much about either Android or iOS development so there may be some other specific tweaks to get it to work in those systems as well. Basically a lot of updates and testing. It's probably going to be a while.
DSFML - SFML for the D Programming Language.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android/iOS "Soon"
« Reply #2 on: April 30, 2013, 08:46:31 am »
I already started to work on the iOS port, but I'm going to stop and focus on fixing bugs for SFML 2.1. Android will come later, I don't know when. I still haven't started to investigate how Android and the NDK work.

However there are already users working on unofficial Android ports (see this post for example). I'm sure there will be more of them in the near future.
Laurent Gomila - SFML developer

game_maker

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Email
Re: Android/iOS "Soon"
« Reply #3 on: August 02, 2013, 12:35:48 am »
Will the bindings support iOS and Android? Which ones?

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: Android/iOS "Soon"
« Reply #4 on: August 02, 2013, 03:50:37 am »
Will the bindings support iOS and Android? Which ones?

The .Net and C bindings are the only ones Laurent actually provides. I can't say for sure about the .Net ones, but the C bindings should support both once SFML itself does. Everything else is dependent on if the language the binding is for runs on iOS/Android systems and if the developers of the bindings can get everything working.
DSFML - SFML for the D Programming Language.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android/iOS "Soon"
« Reply #5 on: August 02, 2013, 07:40:17 am »
There should be no problem for CSFML. I don't know for other languages, I haven't investigated yet.
Laurent Gomila - SFML developer

game_maker

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Email
Re: Android/iOS "Soon"
« Reply #6 on: August 03, 2013, 12:56:36 am »
It's awesome.

Thank you!

cpolymeris

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Android/iOS "Soon"
« Reply #7 on: August 05, 2013, 09:02:53 am »
All of the OpenGL code used needs to be done with OpenGL ES code.

Slightly offtopic, but that would open the door to an SFML port to the Web/EGL. Interesting...

Rhimlock

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Android/iOS "Soon"
« Reply #8 on: August 07, 2013, 10:48:10 pm »
Just a little Feedback to the esfml-port running under Ubuntu (AC100 withTegra2):

I get a undefined Reference error on GlxContext::selectBestVisual(...) in WindowImplX11.cpp

This is obvious since there is no GlxContext on SFML_EMBEDDED_SYSTEM but EGLContext, which is missing this function.

My workaround so far is to change WindowsImplX11.cpp (Step 1) to:

#ifndef SFML_EMBEDDED_SYSTEM
    visualInfo = GlxContext::selectBestVisual(m_display, mode.bitsPerPixel, settings);
#else
    visualInfo = _EGLContext::selectBestVisual(m_display, mode.bitsPerPixel, settings);
#endif

Step 2 is to implement selectBestVisual in EGLContext but i only return the first visual instead of calculating the best one. I couldn't figure it out for EGL :-(.

I guess this is no problem for Android since it does not use X11.

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: Android/iOS "Soon"
« Reply #9 on: August 08, 2013, 12:27:55 am »
Thanks for your feedback.

Maybe I messed up a commit last time I had to rebase eSFML on SFML 2.1. I assume I'll get the same behavior tomorrow on my Raspberry Pi if your laptob is ARM-based.
Interested in using SFML with Python ? Try out its Python binding!

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: Android/iOS "Soon"
« Reply #10 on: August 09, 2013, 12:56:09 am »
I couldn't reproduce your compilation error on my Raspberry Pi with Pidora as OS. However I noticed other errors which are now fixed. What branch are you compiling ? The master or the Android branch ? Both should work though.

This is weird. I couldn't figure out why you're having this error. I mean, I glanced the code and it's obvious a method definition is missing but why am I not getting it on my Raspberry Pi which does compile WindowImplX11.cpp but doesn't compile GlxContext.cpp which is correct.

Just like that, try a verbose make (make VERBOSE=1) and verify if -DSFML_EMBEDDED_SYSTEM is sent. I'm wondering if CMake thinks, as you're on Ubuntu, you're not on an ARM based system (and so doesn't set SFML_EMBEDDED_SYSTEM variable to True).
« Last Edit: August 09, 2013, 04:40:19 am by Sonkun »
Interested in using SFML with Python ? Try out its Python binding!

Rhimlock

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Android/iOS "Soon"
« Reply #11 on: August 09, 2013, 05:27:18 pm »
I used the master-branch in my test (downloaded as ZIP from github).

Now I cloned the master and tried again, same error.


Just to be clear: I can compile the esfml-Projekt using cmake and make, but I cant complie my project using libsfml, throwing:
/usr/local/lib/libsfml-window.so:-1: error: undefined reference to `sf::priv::GlxContext::selectBestVisual(_XDisplay*, unsigned int, sf::ContextSettings const&)'



Minimal example:
#include <sfml/graphics.hpp>
int main()
{
    sf::RenderWindow win(sf::VideoMode::getDesktopMode(),"test");
    return 0;
}

 

Compiling with:
g++ -o test main.cpp -lsfml-graphics -lsfml-window -lsfml-system -lEGL -lGLESv1_CM

btw: Is there a reason why you changed the Include-Files from UpperCase to LowerCase?
include/SFML/Graphics.hpp
to
include/sfml/graphics.hpp
« Last Edit: August 09, 2013, 05:43:40 pm by Ghosa »

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: Android/iOS "Soon"
« Reply #12 on: August 09, 2013, 07:52:28 pm »
-DSFML_EMBEDDED_SYSTEM is missing. That means CMake failed to detect your platform and thus, has set SFML_EMBEDDED_SYSTEM at false. Try:

cmake -DSFML_EMBEDDED_SYSTEM


btw: Is there a reason why you changed the Include-Files from UpperCase to LowerCase?
include/SFML/Graphics.hpp
to
include/sfml/graphics.hpp
This is an experimental repository meant to try new stuff. The Android port was a new stuff and it will be adapted then merged into the official repository soon. You can read the wiki.
Interested in using SFML with Python ? Try out its Python binding!

Rhimlock

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Android/iOS "Soon"
« Reply #13 on: August 09, 2013, 08:19:19 pm »
Damn, somehow I removed this from my last post:

Flags from make VERBOSE=1 for sfml-graphics:

-DGLEW_STATIC -DGL_GLEXT_PROTOTYPES -DSFML_EMBEDDED_SYSTEM -DSFML_GRAPHICS_EXPORTS -DSTBI_FAILURE_USERMSG -O3 -DNDEBUG -fPIC


So -DSFML_EMBEDDED_SYSTEM is not missing.

Nevertheless I try again with
Code: [Select]
cmake -DSFML_EMBEDDED_SYSTEM=1 ..
make
sudo make install

But compiling of the minimal example still causes the same error.

#include <sfml/graphics.hpp>
int main()
{
    sf::RenderWindow win(sf::VideoMode::getDesktopMode(),"test");
    return 0;
}
 

Code: [Select]
g++ -o test main.cpp -lsfml-graphics -lsfml-window -lsfml-system -lEGL -lGLESv1_CM
Code: [Select]
/usr/local/lib/libsfml-window.so: undefined reference to `sf::priv::GlxContext::selectBestVisual(_XDisplay*, unsigned int, sf::ContextSettings const&)'


Does the example compile on your RPi?
« Last Edit: August 09, 2013, 08:22:48 pm by Ghosa »

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: Android/iOS "Soon"
« Reply #14 on: August 09, 2013, 10:43:22 pm »
Fuck >.< I forgot undefined references only show up when you compile a project using the libraries. Well, I'm getting the same errors then. It seems I broke something during my last rebase because I remember I had the examples compiling and running well. I can't find _EGLContext::selectBestVisual() neither, strange. I'll figure that out tomorrow and give you news as soon as it's fixed. Thank you.
Interested in using SFML with Python ? Try out its Python binding!

 

anything