Changeset 1684
- Timestamp:
- Jul 30, 2012, 2:25:20 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build/lol-build
r1679 r1684 80 80 # No bootstrapping needed 81 81 ;; 82 android-arm)83 # No bootstrapping needed84 ;;85 82 *) 86 83 PATH="$PATH" M4PATH="$M4PATH" ./bootstrap … … 157 154 ;; 158 155 android-arm) 159 cd monsterz/android 160 android update project --path . 156 ./configure --host=arm-linux-androideabi ac_cv_exeext=.so \ 157 CPPFLAGS="-Wno-psabi -I$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport -I$ANDROID_NDK_ROOT/sources/cxx-stl/gabi++/include -fpic -fno-exceptions -fno-rtti -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64" \ 158 CFLAGS="-march=armv5te -mtune=xscale -msoft-float -mthumb" \ 159 CXXFLAGS="-march=armv5te -mtune=xscale -msoft-float -mthumb" \ 160 LOL_LIBS="-L$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/armeabi -lstlport_shared -lm -fpic -XCClinker -shared" 161 # FIXME: is this needed? 162 # android update project --path . 163 # ndk-build 164 # ant compile 165 # ndk-build distclean 166 # ant clean 161 167 ;; 162 168 raspi-arm) … … 210 216 xcodebuild -configuration Release -sdk iphonesimulator4.3 211 217 ;; 212 android-arm)213 cd monsterz/android214 ndk-build215 ant compile216 ;;217 218 *) 218 219 make -j$LOL_PARALLEL … … 262 263 xcodebuild -configuration Release -sdk iphonesimulator4.3 clean 263 264 ;; 264 android-arm)265 cd monsterz/android266 ndk-build distclean267 ant clean268 ;;269 265 *) 270 266 make distclean -
trunk/configure.ac
r1678 r1684 197 197 if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then 198 198 AC_CHECK_HEADER(GLES2/gl2.h, 199 [AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) 200 ac_cv_my_have_gl="yes"]) 199 [ac_cv_my_have_gl="yes" 200 AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) 201 AC_CHECK_LIB(GLESv2, glEnable, 202 [GL_LIBS="${GL_LIBS} -lGLESv2"])]) 201 203 fi 202 204 … … 209 211 210 212 if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then 211 AC_CHECK_LIB(GL, gl LoadIdentity,213 AC_CHECK_LIB(GL, glEnable, 212 214 [ac_cv_my_have_gl="yes" 213 215 AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hackish … … 351 353 352 354 355 dnl Use Android? FIXME: super hacks! 356 ac_cv_my_have_android="no" 357 AC_CHECK_LIB(log, __android_log_vprint, 358 [ac_cv_my_have_android="yes" 359 LOL_LIBS="${LOL_LIBS} -llog -module"]) 360 AM_CONDITIONAL(USE_ANDROID, test "${ac_cv_my_have_android}" != "no") 361 362 353 363 dnl Use EGL? 354 364 ac_cv_my_have_egl="no" -
trunk/src/core.h
r1653 r1684 62 62 #endif 63 63 64 /* If using NaCl , override main() with our version */64 /* If using NaCl or Android, override main() with our version */ 65 65 #if defined __native_client__ 66 66 # define main lol_nacl_main 67 #elif defined __ANDROID__ 68 # define main lol_android_main 67 69 #endif 68 70 -
trunk/src/eglapp.cpp
r1674 r1684 13 13 #endif 14 14 15 #if defined USE_EGL 15 #if defined USE_EGL && !defined __ANDROID__ 16 16 # if defined HAVE_BCM_HOST_H 17 17 # include <bcm_host.h> … … 41 41 42 42 private: 43 #if defined USE_EGL 43 #if defined USE_EGL && !defined __ANDROID__ 44 44 EGLDisplay egl_dpy; 45 45 EGLContext egl_ctx; … … 62 62 data(new EglAppData()) 63 63 { 64 #if defined USE_EGL 64 #if defined USE_EGL && !defined __ANDROID__ 65 65 # if defined HAVE_BCM_HOST_H 66 66 bcm_host_init(); … … 231 231 /* Tick the renderer, show the frame and clamp to desired framerate. */ 232 232 Ticker::TickDraw(); 233 #if defined USE_EGL 233 #if defined USE_EGL && !defined __ANDROID__ 234 234 eglSwapBuffers(data->egl_dpy, data->egl_surf); 235 235 #endif … … 239 239 EglApp::~EglApp() 240 240 { 241 #if defined USE_EGL 241 #if defined USE_EGL && !defined __ANDROID__ 242 242 eglDestroyContext(data->egl_dpy, data->egl_ctx); 243 243 eglDestroySurface(data->egl_dpy, data->egl_surf); -
trunk/src/platform/android/androidapp.cpp
r1222 r1684 24 24 using namespace lol; 25 25 26 /* Monsterz-specific */ 27 #include "interface.h" 26 /* One of these wrappers will be overridden by the user's version */ 27 void lol_android_main(void) __attribute__((weak)); 28 void lol_android_main(void) {} 29 void lol_android_main(int argc, char **argv) __attribute__((weak)); 30 void lol_android_main(int argc, char **argv) {} 31 void lol_android_main(int argc, char **argv, char **envp) __attribute__((weak)); 32 void lol_android_main(int argc, char **argv, char **envp) {} 28 33 29 34 namespace lol … … 31 36 JavaVM *g_vm; 32 37 jobject g_activity; 38 Thread *g_main_thread; 33 39 34 40 AndroidApp::AndroidApp(char const *title, ivec2 res, float fps) : … … 48 54 Ticker::TickDraw(); 49 55 } 56 } 57 58 void *AndroidApp::MainRun(void *data) 59 { 60 int argc = 1; 61 char *argv[] = { "", NULL }; 62 char *env[] = { NULL }; 63 64 /* Call the user's main() function. One of these will work. */ 65 lol_android_main(); 66 lol_android_main(argc, argv); 67 lol_android_main(argc, argv, env); 68 69 return NULL; 50 70 } 51 71 … … 77 97 Video::Setup(ivec2(320, 200)); 78 98 79 new Interface(); 80 new DebugFps(20, 20); 99 g_main_thread = new Thread(lol::AndroidApp::MainRun, NULL);; 81 100 } 82 101 … … 93 112 { 94 113 /* FIXME: clean up */ 114 delete g_main_thread; 95 115 } 96 116 -
trunk/src/platform/android/androidapp.h
r1219 r1684 33 33 void Run(); 34 34 35 static void *MainRun(void *data); 36 35 37 private: 36 38 AndroidAppData *data; -
trunk/test/Makefile.am
r1594 r1684 18 18 EXTRA_DIST = data/gradient.png 19 19 20 noinst_PROGRAMS = quad benchsuite testsuitebtphystest20 noinst_PROGRAMS = quad benchsuite $(testsuite) btphystest 21 21 22 TESTS = testsuite 22 TESTS = $(testsuite) 23 24 # Conditionally built for now because of STLport issues 25 if !USE_ANDROID 26 testsuite = testsuite 27 endif 23 28 24 29 testsuite_SOURCES = testsuite.cpp \
Note: See TracChangeset
for help on using the changeset viewer.