Re: Recreating Jogl2 Android demo projects in Eclipse
Posted by zeno on Aug 01, 2016; 1:25pm
URL: https://forum.jogamp.org/Recreating-Jogl2-Android-demo-projects-in-Eclipse-tp4027079p4037014.html
Hello all,
I played a bit more with these demos on android and came to solution, that is simple, debuggable and works well. LauncherUtil is bypassed so that jogl-test-android.jar and its tweaking is no longer needed.
So, following steps were enough for me to get it working:
1) Referenced libraries (jogl-all-android.jar, gluegen-rt-android.jar) put into android project ./libs/ folder.
2) Native libraries (libgluegen-rt.so, libjogl_mobile.so and libnewt.so) put into ./libs/armeabi/ subfolder (same for all other necessary architectures respectively).
3) Main activity extends NewtBaseActivity, configured directly as MAIN action and LAUNCHER category in project manifest.
4) Jogamp apk's are no longer needed at all.
If you want to use demo GL event listeners, just add jogl-test-android.jar reference to access its demo classes (RedSquareES2 etc.). But beware, this way demo shader codes must be put to your project ./assets/shader folder because we do not use LauncherUtil and gluegen's custom dex/asset/classloader utils which originally resolves and loads these resources. Application is also properly debuggable this way as main activity is launched directly.
Have a nice day.
Jan