I\'ve just started learning OpenGL ES on android (using this book) and came across an issue of adopting source code from chapter 5 to existing methods of using jni in android (a
I just added
#include
to cube.c & cuberenderer.c
Changed
(*g_VM)->AttachCurrentThread (g_VM, (void **) &env, NULL);
to
(*g_VM)->AttachCurrentThread (g_VM, (const struct JNINativeInterface ***) &env, NULL);
My Android.mk:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libgltest_jni
LOCAL_CFLAGS := -Werror
LOCAL_SRC_FILES := cube.c cuberenderer.c
LOCAL_LDLIBS := -llog
-lGLESv1_CM
include $(BUILD_SHARED_LIBRARY)
My Application.mk:
# The ARMv7 is significanly faster due to the use of the hardware FPU
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-9
And built it on android-ndk-r6