![]() |
OpenGL ES SDK for Android
ARM Developer Center
|
#include <jni.h>#include <android/log.h>#include <GLES2/gl2.h>#include <GLES2/gl2ext.h>#include <cstdio>#include <cstdlib>#include <cmath>#include "Matrix.h"Go to the source code of this file.
Macros | |
| #define | LOG_TAG "libNative" |
| #define | LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) |
| #define | LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) |
Functions | |
| static GLuint | loadShader (GLenum shaderType, const char *shaderSource) |
| static GLuint | createProgram (const char *vertexSource, const char *fragmentSource) |
| static bool | setupGraphics (int width, int height) |
| static void | renderFrame () |
| JNIEXPORT void JNICALL | Java_com_arm_malideveloper_openglessdk_vbo_NativeLibrary_init (JNIEnv *env, jobject obj, jint width, jint height) |
| JNIEXPORT void JNICALL | Java_com_arm_malideveloper_openglessdk_vbo_NativeLibrary_step (JNIEnv *env, jobject obj) |
Variables | |
| static const char | glVertexShader [] |
| static const char | glFragmentShader [] |
| static GLuint | glProgram |
| static GLuint | vertexLocation |
| static GLuint | vertexColourLocation |
| static GLuint | projectionLocation |
| static GLuint | modelViewLocation |
| static GLuint | vboBufferIds [2] |
| static float | projectionMatrix [16] |
| static float | modelViewMatrix [16] |
| static float | angle = 0 |
| static GLfloat | cubeVertices [] |
| static GLushort | strideLength = 6 * sizeof(GLfloat) |
| static GLushort | vertexColourOffset = 3 * sizeof (GLfloat) |
| static GLushort | vertexBufferSize = 48 * 3 * sizeof (GLfloat) |
| static GLushort | elementBufferSize = 36 * sizeof(GLushort) |
| static GLushort | indices [] = {0, 2, 3, 0, 1, 3, 4, 6, 7, 4, 5, 7, 8, 9, 10, 11, 8, 10, 12, 13, 14, 15, 12, 14, 16, 17, 18, 16, 19, 18, 20, 21, 22, 20, 23, 22} |
| #define LOG_TAG "libNative" |
Definition at line 33 of file Native.cpp.
| #define LOGE | ( | ... | ) | __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) |
Definition at line 35 of file Native.cpp.
| #define LOGI | ( | ... | ) | __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) |
Definition at line 34 of file Native.cpp.
|
static |
Definition at line 95 of file Native.cpp.
| JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_vbo_NativeLibrary_init | ( | JNIEnv * | env, |
| jobject | obj, | ||
| jint | width, | ||
| jint | height | ||
| ) |
Definition at line 299 of file Native.cpp.
| JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_vbo_NativeLibrary_step | ( | JNIEnv * | env, |
| jobject | obj | ||
| ) |
Definition at line 305 of file Native.cpp.
Definition at line 60 of file Native.cpp.
Definition at line 256 of file Native.cpp.
Definition at line 223 of file Native.cpp.
|
static |
Definition at line 152 of file Native.cpp.
|
static |
Definition at line 155 of file Native.cpp.
|
static |
Definition at line 218 of file Native.cpp.
|
static |
Definition at line 51 of file Native.cpp.
|
static |
Definition at line 141 of file Native.cpp.
|
static |
Definition at line 39 of file Native.cpp.
|
static |
Definition at line 221 of file Native.cpp.
|
static |
Definition at line 145 of file Native.cpp.
|
static |
Definition at line 151 of file Native.cpp.
|
static |
Definition at line 144 of file Native.cpp.
|
static |
Definition at line 150 of file Native.cpp.
|
static |
Definition at line 207 of file Native.cpp.
|
static |
Definition at line 147 of file Native.cpp.
|
static |
Definition at line 215 of file Native.cpp.
|
static |
Definition at line 143 of file Native.cpp.
|
static |
Definition at line 211 of file Native.cpp.
|
static |
Definition at line 142 of file Native.cpp.