diff options
author | Jack Palevich <jackpal@google.com> | 2009-09-25 19:07:31 -0700 |
---|---|---|
committer | Jack Palevich <jackpal@google.com> | 2009-09-25 19:07:31 -0700 |
commit | aa3b0bee51e9e7c0d46f93bcdcfee62b004b3a78 (patch) | |
tree | 323772d6bf00f988ac0305f1862bcde2ce6312e5 /opengl/tests/gl2_jni/jni | |
parent | 2e26fc08aa1939c19e939d983bd608cdec050024 (diff) | |
download | frameworks_base-aa3b0bee51e9e7c0d46f93bcdcfee62b004b3a78.zip frameworks_base-aa3b0bee51e9e7c0d46f93bcdcfee62b004b3a78.tar.gz frameworks_base-aa3b0bee51e9e7c0d46f93bcdcfee62b004b3a78.tar.bz2 |
Tighten up sample code.
- Still fails to work; don't know why.
Diffstat (limited to 'opengl/tests/gl2_jni/jni')
-rw-r--r-- | opengl/tests/gl2_jni/jni/gl_code.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/opengl/tests/gl2_jni/jni/gl_code.cpp b/opengl/tests/gl2_jni/jni/gl_code.cpp index 146d52a..c2fabe6 100644 --- a/opengl/tests/gl2_jni/jni/gl_code.cpp +++ b/opengl/tests/gl2_jni/jni/gl_code.cpp @@ -3,12 +3,12 @@ #include <nativehelper/jni.h> #define LOG_TAG "GL2JNI gl_code.cpp" #include <utils/Log.h> -
+ #include <EGL/egl.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> -#include <stdio.h>
+#include <stdio.h> #include <stdlib.h> #include <math.h> @@ -23,7 +23,7 @@ static void checkGlError(const char* op) { LOGI("after %s() glError (0x%x)\n", op, error); } } -
+ static const char gVertexShader[] = "attribute vec4 vPosition;\n" "void main() {\n" " gl_Position = vPosition;\n" @@ -151,15 +151,15 @@ void renderFrame() { extern "C" { JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj, jint width, jint height); JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj); -};
-
+}; + JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj, jint width, jint height)
-{
- setupGraphics(width, height);
-}
- -JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj)
-{
- renderFrame();
-}
+{ + setupGraphics(width, height); +} + +JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj) +{ + renderFrame(); +} |