GLyphy Demo app on Android

198 views
Skip to first unread message

Behdad Esfahbod

unread,
Dec 15, 2013, 6:34:51 PM12/15/13
to gly...@googlegroups.com
Hi,

I've pushed out some code to build GLyphy Demo app for Android. Real
demo/android/README. It doesn't do much unless you connect a keyboard. But
at least you can see whether the hardware+software combo on a device can run
it. It runs on Nexus 4, Nexus 5, and Nexus 7 2013 with Android 4.4 for me,
and no other combination.

On Nexus 5, I get about 15fps when animating.

I've also uploaded an APK to:

http://behdad.org/glyphy/GLyphyDemo-debug.apk

Cheers,
--
behdad
http://behdad.org/

Imu Li

unread,
Nov 30, 2014, 8:34:36 PM11/30/14
to gly...@googlegroups.com
Hey folks,

This is mostly to say hello and inquire as to the best way to submit/discuss patches. I've built the android demo with freeglut 3.0.0-rc1 and current svn tip. It required a small change in two/three files:

diff --git a/demo/android/README b/demo/android/README
index a8b1fbc..6ed1b42 100644
--- a/demo/android/README
+++ b/demo/android/README
@@ -25,7 +25,7 @@ To build GLyphy Demo app on Android, follow these steps:
   cmake -D CMAKE_TOOLCHAIN_FILE=android_toolchain.cmake \
        -D CMAKE_INSTALL_PREFIX=$PLATFORM_PREFIX \
        -D CMAKE_BUILD_TYPE=Debug \
-       -D FREEGLUT_GLES2=ON \
+       -D FREEGLUT_GLES=ON \
        -D FREEGLUT_BUILD_DEMOS=NO \
        ..
   make install
diff --git a/demo/android/jni/Android.mk b/demo/android/jni/Android.mk
index 7f5ab98..4894213 100644
--- a/demo/android/jni/Android.mk
+++ b/demo/android/jni/Android.mk
@@ -26,7 +26,7 @@ include $(PREBUILT_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := glut
-LOCAL_SRC_FILES := $(PLATFORM_PREFIX)/lib/libfreeglut-gles2.a
+LOCAL_SRC_FILES := $(PLATFORM_PREFIX)/lib/libfreeglut-gles.a
 include $(PREBUILT_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -43,7 +43,7 @@ LOCAL_SRC_FILES := \
        ../../demo-view.cc \
        ../../glyphy-demo.cc \
        $(NULL)
-LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2 -lz
+LOCAL_LDLIBS := -llog -landroid -lGLESv1_CM -lEGL -lGLESv2 -lz
 LOCAL_WHOLE_STATIC_LIBRARIES := gnustl_static freetype glyphy glut
 include $(BUILD_SHARED_LIBRARY)
 
diff --git a/demo/android/jni/Application.mk b/demo/android/jni/Application.mk
index af5560e..6266158 100644
--- a/demo/android/jni/Application.mk
+++ b/demo/android/jni/Application.mk
@@ -7,5 +7,5 @@ APP_CPPFLAGS := \
        -I$(PLATFORM_PREFIX)/include/freetype2 \
        -I$(PLATFORM_PREFIX)/include/glyphy \
        -DDEFAULT_FONT='"/system/fonts/Roboto-Regular.ttf"' \
-       -DFREEGLUT_GLES2 \
+       -DFREEGLUT_GLES \
        $(NULL)

Note that freeglut 3.0.0-rc1 required modification: adding stubs for glutStrokeWidthf and glutStrokeLengthf (already in svn).

However, this only gets it to build. Instead of displaying text like the precompiled version, it merely displays a white screen.

That patch is required starting with freeglut svn 1687 <http://sourceforge.net/p/freeglut/code/1687/>, the version immediately previous doesn't require a patch and exhibits more or less proper behavior.

I'm not familiar with the code yet; I'd appreciate ideas. I'll get there eventually though.

Take care,
imuli

Behdad Esfahbod

unread,
Jan 2, 2015, 6:42:34 PM1/2/15
to gly...@googlegroups.com
Hi imuli,

Sorry for the late response.  Comments inline.

Ok, the build changes are understandable.  But that it doesn't work should perhaps be reported to freeglut.

Please report an issue, and perhaps send a github Pull Request if you can:


I might not merge it immediately, but will add a note to README such that people using freeglut3 can find your patches.

Thanks,
behdad
 
Take care,
imuli

--
You received this message because you are subscribed to the Google Groups "GLyphy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glyphy+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages