Skip to content

Commit

Permalink
Added Android NDK build folders for MRTs sample (chapter 11)
Browse files Browse the repository at this point in the history
NOTE: This sample is currently not working on Nexus 4 probably due to some issue with that device. It is still to be verified whether it works on any other Android device. 
It works fine with ARM Emulator v 1.3 and Adreno Emulator v 3.4.
  • Loading branch information
javedrabbani committed Nov 19, 2013
1 parent 5766506 commit 7d5db2c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Chapter_11/MRTs/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.openglesbook.MRTs">
<application
android:label="MRTs"
android:hasCode="false">
<activity android:name="android.app.NativeActivity"
android:label="MRTs"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:configChanges="orientation|keyboardHidden">
<meta-data android:name="android.app.lib_name"
android:value="MRTs" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-feature android:glEsVersion="0x00030000"/>
<uses-sdk android:minSdkVersion="18"/>
</manifest>
32 changes: 32 additions & 0 deletions Chapter_11/MRTs/Android/jni/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
LOCAL_PATH := $(call my-dir)
SRC_PATH := ../..
COMMON_PATH := $(SRC_PATH)/../../Common
COMMON_INC_PATH := $(COMMON_PATH)/Include
COMMON_SRC_PATH := $(COMMON_PATH)/Source

include $(CLEAR_VARS)

LOCAL_MODULE := MRTs
LOCAL_CFLAGS += -DANDROID


LOCAL_SRC_FILES := $(COMMON_SRC_PATH)/esShader.c \
$(COMMON_SRC_PATH)/esShapes.c \
$(COMMON_SRC_PATH)/esTransform.c \
$(COMMON_SRC_PATH)/esUtil.c \
$(COMMON_SRC_PATH)/Android/esUtil_Android.c \
$(SRC_PATH)/MRTs.c




LOCAL_C_INCLUDES := $(SRC_PATH) \
$(COMMON_INC_PATH)

LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv3

LOCAL_STATIC_LIBRARIES := android_native_app_glue

include $(BUILD_SHARED_LIBRARY)

$(call import-module,android/native_app_glue)
1 change: 1 addition & 0 deletions Chapter_11/MRTs/Android/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_PLATFORM := android-18

0 comments on commit 7d5db2c

Please sign in to comment.