| Huge problems with SDL 2.0 for x86 Android, and SDL archive |
|
Elmar Krieger
Guest
|
Hi Richard,
many thanks for your reply. I now got one step further and caught the emulator reproducibly overwriting parts of my application's memory as soon as the emulation uses OpenGL hardware acceleration, instead of software rendering. Since this is such a severe problem, my guess is that this affects my OS (Linux) only, but not Windows/MacOSX. Am I right that you are using Windows or MacOSX to develop your application? Best regards, Elmar P.S.: To stevo5800:
'emulator-arm' looks like the normal ARM emulator, not the Intel x86 On 08/06/2012 10:08 PM, Richard Tew wrote:
-- Elmar Krieger, PhD YASARA Biosciences GmbH & CMBI Outstation Austria Wagramer Strasse 25/3/45 1220 Vienna Austria/Europe www.YASARA.org _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||||||
|
|
||||||||||||||||||||
| Re: Huge problems with SDL 2.0 for x86 Android, and SDL arch |
|
stevo5800
|
So I would just need to download x86 emulator?
And I'm running on mac but I don't have SDL running yet just the examples the SDK came with would you know the steps to getting SDL off the ground? What I've done so fare is download the Android mac SDK, then Eclipse Mobile and installed the add ons. I comment out the 3 errors from SDL and compiled it with ./configure then make then sudo make install and everything seems to be in the local directory compiled no errors. Then in Eclipse I Create project from existing source and select the android-project folder that was in SDL SDK from mercurial. Not sure if I need more files or I'm not linking SDL? Maybe you would know the steps to settings this environment? not really in a hurry to get this going but would be nice I'm still working on iOS app but gonna port it to Android as soon as I'm done figured it wouldn't be a bad idea having a bit of practice
|
|||||||||||||||||||||
|
|
||||||||||||||||||||||
| Re: Huge problems with SDL 2.0 for x86 Android, and SDL arch |
|
stevo5800
|
ok nvm got this working now
here are my steps for future reference and I'm using OXS 10.8 download latest SDL from mercurial(got 3 errors and just comment them out and builds fine) Step 1 Download latest Android SDK package Download latest NDK package Download Eclipse Mobile -extract all the downloads above -access the Android-SDK folder from command prompt and change to the tools directory then type ./android -the SDL tool should come up and you will be able to install the tool and additional SDK/API package check mark all the ones you want to install -once you extract Eclipse you can run it then follow the steps from the webpage bellow to install the Android plugin -steps to install Eclipse plugin http://developer.android.com/sdk/installing/installing-adt.html required for Android development -Once you have Eclipse installed with new plugin you will need to tell the directory of the Android-SDK(wherever you saved it) Step 2: if you don't already have SDL on your system in command console type hg clone http://hg.libsdl.org/SDL cd ./SDL (or where ever you saved the SDL folder from mercurial) ./configure make sudo make install this will install SDL on your system Step 3: -then copy the android-project folder somewhere else found in SDL folder -add a c or cpp files in the <project>/jni/src directory -modify the Android.mk file in <project>/jni/src directory to point to your newly created c or cpp file -Copy the entire SDL folder into the <project>/jni folder -delete the android-project folder from the newly copied SDL folder -you can also add data folder for your data in <project>/jni folder note if you want to add SDL_Mixer, SDL_image, SDL_ttf or SDL_net the steps are the same just add the entire folder in the <project>/jni folder then modify the Android.mk file in <project>/jni/src directory example Android.mk file LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := main SDL_PATH := ../SDL LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/$(SDL_PATH)/include \ $(LOCAL_PATH)/../SDL_image \ $(LOCAL_PATH)/../SDL_mixer \ $(LOCAL_PATH)/../SDL_ttf # Add any compilation flags for your project here... LOCAL_CFLAGS := \ -DPLAY_MOD # Add your application source files here... LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.cpp \ YourProjectFile.c LOCAL_SHARED_LIBRARIES := SDL SDL_image SDL_mixer SDL_ttf LOCAL_LDLIBS := -lGLESv1_CM -llog include $(BUILD_SHARED_LIBRARY) Step 4: -In Eclipse go to File>New>Other then select Android Project From Existing Code -Then pick the android-project folder -You might get something like saying that its missing a build path -expand the project and select project.properties and add target=android-16(API-16 seems to be the latest one note API 4 did not work for me) or what ever target you downloaded pretty sure you will need API 7 or up to compile OpenGL ES 2.0 after that the errors should go away -dont run nothing yet -if you happen to run it, it will crash just make sure to clean the project next time you go to run it Step 5: -I renamed the Android-NDK folder to ndk then copy is to the android-project(your project folder) -Command prompt and change directory to the newly copied ndk folder then type ./ndk-build -Might take a few minutes since its gonna compile the entire SDL library -Once succeeded then just go back the Eclipse and run your project
|
|||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Huge problems with SDL 2.0 for x86 Android, and SDL archive |
|
Elmar Krieger
Guest
|
Hi Steven,
I'm using Linux only, and no Eclipse. I just followed the instructions in sdl-2.0.0/README.android, and this worked out of the box.
The x86 emulator is only for the new Intel Medfield Atom x86 CPU, which is sort of a niche in Android: http://www.anandtech.com/show/5770/lava-xolo-x900-review-the-first-intel-medfield-phone/ If you want to port your app from iOS, then just stay with normal ARM CPU based Android for the moment. BTW, in the mean time I could confirm the massive memory corruption on two computers with nVIDIA and AMD cards, and in both cases it disappeared when hardware acceleration was disabled. So this is not an SDL problem, but the Android emulator OpenGL acceleration is broken (at least in Linux). So while it is tempting to use accelerated OpenGL ES 2.0 in the emulator, it seems like software OpenGL ES 1.0 rendering is all we get at the moment. I reported the problem to Intel here: http://software.intel.com/en-us/forums/showthread.php?t=107090 (Maybe Intel one day posts a solution there...) Best regards, Elmar On 08/07/2012 02:03 AM, stevo5800 wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||||
|
|
||||||||||||||||||

