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

Author Topic: Android and iOS ports available for testing  (Read 302587 times)

0 Members and 2 Guests are viewing this topic.

Fizix

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Android and iOS ports available for testing
« Reply #75 on: January 27, 2014, 09:20:26 am »
I also got the EGL_BAD_ALLOC, and setting the width and height to 1 in the attribs for creating the pbuffer solved it for me and rendering continued as normal.

nero81af

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #76 on: January 27, 2014, 01:10:24 pm »
I could manage to display some graphics using the sfml-graphic module: I rendered a blue rectangle on white background on android. so probably the problem is in my opengl setup! dunno where tho

nero81af

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #77 on: January 27, 2014, 02:38:49 pm »
ok I got it working! it was a problem on my opengl code! still have to figure out what! probably some unimplemented feature of opengl es! btw eglCreatePbufferSourface really need another type of initialization!

Window/EGLContext.cpp: line 86:
- EGLint attrib_list[] = { EGL_NONE };
+ EGLint attrib_list[] = { EGL_WIDTH,1,EGL_HEIGHT,1,EGL_NONE };

93interactive

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • http://93-interactive.com
Re: Android and iOS ports available for testing
« Reply #78 on: January 27, 2014, 05:01:58 pm »
There's no audio module on iOS, I'm still waiting for libsndfile to add a license exception for iOS so that I can use it statically without breaking the terms of the license. The author said it was one of its priorities, but it was months ago and I've got no news...

Well, great news in general, but do you have any hint that the author will add this exception, because i found a quote of the original developer on stackoverflow where he mentioned that he is quite happy with LGPL and when asked if he could make an exception for someones iOS game, he answered with something similar like 'i could do that but then i would have to track down every developer who has commited something and i won't do that'

So unless you have got some hint from him, that he will do it, i would not count on it.

I personally could live with throwing out libsndfile and just limit audio format support to ogg/vorbis, which is bsd licensed.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #79 on: January 27, 2014, 07:26:02 pm »
Quote
So unless you have got some hint from him, that he will do it, i would not count on it.
He said it to me personally by e-mail. And it was of course after he wrote that post on stackoverflow. But... it was strange that he changed his mind so quickly, so maybe it was just a way to get rid of me ;D
Laurent Gomila - SFML developer

short_name

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Android and iOS ports available for testing
« Reply #80 on: February 03, 2014, 12:37:52 am »
No joy so far.  I can compile the android port without problems and I can run all the samples that come with the NDK on an AVD and on my phone but I cannot run the sample that comes with the android_and_IOS port.  When I try to run it on either an AVD or on my real Nexus 4 it starts and then says "Unfortunately, SFML has stopped."

Building the project seems to work fine. Here is the output from ~/android-ndk-r9/ndk-build:
Code: [Select]
Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml   
Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbserver
Gdbsetup       : libs/armeabi-v7a/gdb.setup
Install        : libsfml-activity.so => libs/armeabi-v7a/libsfml-activity.so
Install        : libsfml-example.so => libs/armeabi-v7a/libsfml-example.so
Install        : libsfml-system.so => libs/armeabi-v7a/libsfml-system.so
Install        : libsfml-window.so => libs/armeabi-v7a/libsfml-window.so
Install        : libsfml-graphics.so => libs/armeabi-v7a/libsfml-graphics.so
Install        : libsfml-audio.so => libs/armeabi-v7a/libsfml-audio.so
Install        : libsfml-network.so => libs/armeabi-v7a/libsfml-network.so
Install        : libstlport_shared.so => libs/armeabi-v7a/libstlport_shared.so
Install        : libopenal.so => libs/armeabi-v7a/libopenal.so
Install        : libsndfile.so => libs/armeabi-v7a/libsndfile.so
Here are what I think are the relevant log messages when it crashes:
Code: [Select]
02-02 16:30:52.743: I/ActivityManager(601): Start proc com.example.sfml for activity com.example.sfml/android.app.NativeActivity: pid=22731 uid=10155 gids={50155}
02-02 16:30:52.763: I/SearchController(24544): #onHotwordDetectorStopped
02-02 16:30:52.763: I/MicrophoneInputStream(24544): mic_close
02-02 16:30:52.773: D/dalvikvm(826): GC_CONCURRENT freed 495K, 6% free 9518K/10080K, paused 2ms+1ms, total 15ms
02-02 16:30:52.843: D/dalvikvm(24544): threadid=49: thread exiting, not yet detached (count=0)
02-02 16:30:52.843: D/dalvikvm(24544): threadid=37: thread exiting, not yet detached (count=0)
02-02 16:30:52.893: I/Adreno-EGL(22731): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
02-02 16:30:52.914: D/dalvikvm(826): GC_CONCURRENT freed 388K, 6% free 9515K/10080K, paused 1ms+1ms, total 14ms
02-02 16:30:53.084: D/dalvikvm(826): GC_CONCURRENT freed 483K, 6% free 9520K/10080K, paused 2ms+2ms, total 21ms
02-02 16:30:53.444: A/libc(22731): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 22748 (om.example.sfml)
02-02 16:30:53.504: I/DEBUG(171): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-02 16:30:53.504: I/DEBUG(171): Build fingerprint: 'google/occam/mako:4.4.2/KOT49H/937116:user/release-keys'
02-02 16:30:53.504: I/DEBUG(171): Revision: '10'
02-02 16:30:53.504: I/DEBUG(171): pid: 22731, tid: 22748, name: om.example.sfml  >>> com.example.sfml <<<
02-02 16:30:53.504: I/DEBUG(171): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
and the backtrace:
Code: [Select]
02-02 16:30:53.654: I/DEBUG(171): backtrace:
02-02 16:30:53.664: I/DEBUG(171):     #00  pc 00000000  <unknown>
02-02 16:30:53.664: I/DEBUG(171):     #01  pc 000417a3  /system/lib/egl/libGLESv2_adreno.so (glGetString+16)
02-02 16:30:53.664: I/DEBUG(171):     #02  pc 0001c909  /system/lib/egl/libGLESv1_CM_adreno.so (Load_Gll_2_0+984)
02-02 16:30:53.664: I/DEBUG(171):     #03  pc 00021d03  /system/lib/egl/libGLESv1_CM_adreno.so (gliMakeCurrent+18)
02-02 16:30:53.664: I/DEBUG(171):     #04  pc 00024d89  /system/lib/egl/libGLESv1_CM_adreno.so (oglSetBuffers+48)
02-02 16:30:53.664: I/DEBUG(171):     #05  pc 0001c7f4  /system/lib/egl/libEGL_adreno.so (eglGLUpdateSurfaces+648)
02-02 16:30:53.664: I/DEBUG(171):     #06  pc 00010b50  /system/lib/egl/libEGL_adreno.so (qeglDrvAPI_eglMakeCurrent+628)
02-02 16:30:53.664: I/DEBUG(171):     #07  pc 00006b0c  /system/lib/egl/libEGL_adreno.so (eglMakeCurrent+16)
02-02 16:30:53.664: I/DEBUG(171):     #08  pc 0000d3e5  /system/lib/libEGL.so (android::egl_display_t::makeCurrent(android::egl_context_t*, android::egl_context_t*, void*, void*, void*, void*, void*, void*)+84)
I have tried it using API Level 17, 18 and 19 on AVD's. 
I am using ndk-r9 per the post by sonkun at November 29, 2013, 05:18:00 PM
I believe I configured cmake properly, but I attached a screenshot of my cmake-gui configuration.

Xotraz

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Android and iOS ports available for testing
« Reply #81 on: February 05, 2014, 04:10:39 pm »
Hi, when i wanted to use my makefies, i had some errors to compile SFML for Android.

C:\Users\TRS>cmake --build C:/Users/TRS/Desktop/Création/SFML-Android-Build
CMake Error: Target DependInfo.cmake file not foundScanning dependencies of targ
et sfml-system

CMake Error: Directory Information file not found
Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o
G__~1.EXE: error: unrecognized command line option '-mfloat-abi=softfp'
G__~1.EXE: error: unrecognized command line option '-mfpu=vfpv3-d16'
G__~1.EXE: error: unrecognized command line option '-mthumb'
G__~1.EXE: error: C:\Users\TRS\Desktop\Cr&#9484;ation\SFML-Android\src\SFML\System\Clo
ck.cpp: No such file or directory
G__~1.EXE: fatal error: no input files
compilation terminated.
make.exe[2]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o] Error
1
make.exe[1]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/all] Error 2
make.exe: *** [all] Error 2

C_Make_SH was not found (and i dont know where is his directory).

Thank for any help, i dont know what i must do.
I use MinGW makesfiles.

EDIT : This work only without special character like é.
« Last Edit: February 05, 2014, 07:47:56 pm by Xotraz »

xuanzon

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Android and iOS ports available for testing
« Reply #82 on: February 10, 2014, 11:11:13 am »
Hi, i just test on my android device with...

build environment : windows 7 x64

build toolchain : android SDK & NDK x64

test device : sony xperia s lt26i

instructions: cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=9 -DANDROID_USE_STLPORT=TRUE -DCMAKE_TOOLCHAIN_FILE=D:\git\sfml\cmake\toolchains\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=c:\android\android-ndk-r9c\prebuilt\windows-x86_64\bin\make.exe ..\sfml

run result : an sfml icon black screen, then a white screen with birds sound.

I am new here, so i don't know the result is correct? :-[

Xotraz

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Android and iOS ports available for testing
« Reply #83 on: February 10, 2014, 04:56:49 pm »
No but i have exactly the same issue.

Ican use the program with a white screen and song.
In the logchat :
E/libEGL(930): called unimplemented OpenGL ES API

And when i use OpenGLES emulation :
failed to create/resize pbuffer
at start and it just crash.

I think Android wanted to use 2.0 OGL and SFML wanted to use 1.0 but didnt find how to solve this problem.
And i must check OpenGLES emulation.
« Last Edit: February 10, 2014, 05:14:53 pm by Xotraz »

nero81af

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #84 on: February 12, 2014, 02:48:21 pm »
try this patch

Window/EGLContext.cpp: line 86:
- EGLint attrib_list[] = { EGL_NONE };
+ EGLint attrib_list[] = { EGL_WIDTH,1,EGL_HEIGHT,1,EGL_NONE };

Xotraz

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Android and iOS ports available for testing
« Reply #85 on: February 13, 2014, 06:20:21 pm »
Thank you for this tips, but this change nothing for me  :-\

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: Android and iOS ports available for testing
« Reply #86 on: February 13, 2014, 07:46:09 pm »
Hi,

It's been quite a long time since I last answered here because I was busy with other stuff. I'll be back next  week to carry on working on the Android port and answer your technical questions. :)
Interested in using SFML with Python ? Try out its Python binding!

Dethska

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Android and iOS ports available for testing
« Reply #87 on: February 14, 2014, 10:04:16 pm »
try this patch

Window/EGLContext.cpp: line 86:
- EGLint attrib_list[] = { EGL_NONE };
+ EGLint attrib_list[] = { EGL_WIDTH,1,EGL_HEIGHT,1,EGL_NONE };

This was the key for me to get the example project working.  Thanks!

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Re: Android and iOS ports available for testing
« Reply #88 on: February 22, 2014, 02:36:41 pm »
One question. Is the audio working perfectly in IoS?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #89 on: February 22, 2014, 07:19:46 pm »
There's no audio on iOS. I'm still waiting for libsndfile :-\
Laurent Gomila - SFML developer

 

anything