Skip to content

Commit 3fd7d3d

Browse files
Andrew HsiehGerrit Code Review
authored andcommitted
Merge "cleaned code, added pinch gesture detector, better opengl context handling, fixed issues"
2 parents 122d194 + 5d1c91f commit 3fd7d3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+6541
-760
lines changed

ndk/platforms/android-17/samples/Teapot/assets/Shaders/ShaderPlain.fsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void main()
2121
{
2222
#if USE_PHONG
2323
mediump vec3 halfVector = normalize(-vLight0 + position);
24-
mediump float NdotH = max(dot(normal, halfVector), 0.0);
24+
mediump float NdotH = max(dot(normalize(normal), halfVector), 0.0);
2525
mediump float fPower = vMaterialSpecular.w;
2626
mediump float specular = pow(NdotH, fPower);
2727

ndk/platforms/android-17/samples/Teapot/jni/Android.mk

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,16 @@ include $(CLEAR_VARS)
55
LOCAL_MODULE := NativeActivity
66
LOCAL_SRC_FILES := TeapotNativeActivity.cpp \
77
TeapotRenderer.cpp \
8-
NDKSupport/JNIHelper.cpp \
9-
NDKSupport/shader.cpp \
10-
NDKSupport/vecmath.cpp \
11-
NDKSupport/gestureDetector.cpp \
12-
NDKSupport/perfMonitor.cpp \
13-
NDKSupport/tapCamera.cpp \
148

15-
LOCAL_C_INCLUDES := $(LOCAL_PATH)/NDKSupport
9+
LOCAL_C_INCLUDES :=
1610

1711
LOCAL_CFLAGS :=
1812

1913
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2
20-
LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue
14+
LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue helper
2115

2216
include $(BUILD_SHARED_LIBRARY)
2317

18+
$(call import-module,android/helper)
2419
$(call import-module,android/native_app_glue)
25-
$(call import-module,android/cpufeatures)
20+
$(call import-module,android/cpufeatures)

ndk/platforms/android-17/samples/Teapot/jni/NDKSupport/gestureDetector.cpp

Lines changed: 0 additions & 130 deletions
This file was deleted.

ndk/platforms/android-17/samples/Teapot/jni/NDKSupport/gestureDetector.h

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)