so I want to draw simple shapes (cylinders, spheres, and cones) in my Android app. Based on this question and answer, it seems like it is possible to port GLU into Android, which has exactly those functions I need. However, I am having trouble getting it to compile. So far I have tried the following:
- Download glues-1.4-bin-qnx.tar.gz from the glues download page
- Create a new module ("glues") in my Android project, with the include/ files from the download above and libGLUES_CM.a
- Include this module in my jni/Android.mk
Here is my glues/Android.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := glues
LOCAL_SRC_FILES := lib/libGLUES_CM.a
LOCAL_CFLAGS := -IC:/usr/src/android-ndk-r10c/platforms/android-9/arch-arm/usr/include \
-IC:/usr/src/android-ndk-r10c/platforms/android-9/arch-arm/usr/include/sys
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)
And my jni/Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := opengl
NDK_MODULE_PATH := $(LOCAL_PATH)/..
LOCAL_CPPFLAGS := -I/usr/include
LOCAL_STATIC_LIBRARIES := glues
LOCAL_SRC_FILES := com_wickhambros_charactercreator_OpenGlJniWrapper.cpp
LOCAL_LDLIBS := -llog -landroid -lGLESv2 -lGLESv1_CM -lEGL -lm
include $(BUILD_SHARED_LIBRARY)
$(call import-add-path,$(LOCAL_PATH)/..)
$(call import-module,glues)
When I build, I get this error: glues/include/glues.h:54:5: error: #error "Platform is unsupported"