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"
#include "Texture.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 | |
GLuint | loadShader (GLenum shaderType, const char *shaderSource) |
GLuint | createProgram (const char *vertexSource, const char *fragmentSource) |
bool | setupGraphics (int width, int height) |
void | renderFrame () |
JNIEXPORT void JNICALL | Java_com_arm_malideveloper_openglessdk_mipmapping_NativeLibrary_init (JNIEnv *env, jobject obj, jint width, jint height) |
JNIEXPORT void JNICALL | Java_com_arm_malideveloper_openglessdk_mipmapping_NativeLibrary_step (JNIEnv *env, jobject obj) |
Variables | |
static const char | glVertexShader [] |
static const char | glFragmentShader [] |
GLuint | glProgram |
GLuint | vertexLocation |
GLuint | samplerLocation |
GLuint | projectionLocation |
GLuint | modelViewLocation |
GLuint | textureCordLocation |
GLuint | textureIds [2] |
float | projectionMatrix [16] |
float | modelViewMatrix [16] |
float | distance = 1 |
float | velocity = 0.1 |
GLuint | textureModeToggle = 0 |
GLfloat | squareVertices [] |
GLfloat | textureCords [] |
GLushort | indicies [] = {0, 2, 3, 0, 3, 1} |
#define LOG_TAG "libNative" |
Definition at line 34 of file Native.cpp.
#define LOGE | ( | ... | ) | __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) |
Definition at line 36 of file Native.cpp.
#define LOGI | ( | ... | ) | __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) |
Definition at line 35 of file Native.cpp.
GLuint createProgram | ( | const char * | vertexSource, |
const char * | fragmentSource | ||
) |
Definition at line 96 of file Native.cpp.
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_mipmapping_NativeLibrary_init | ( | JNIEnv * | env, |
jobject | obj, | ||
jint | width, | ||
jint | height | ||
) |
Definition at line 289 of file Native.cpp.
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_mipmapping_NativeLibrary_step | ( | JNIEnv * | env, |
jobject | obj | ||
) |
Definition at line 295 of file Native.cpp.
Definition at line 59 of file Native.cpp.
Definition at line 249 of file Native.cpp.
Definition at line 161 of file Native.cpp.
Definition at line 156 of file Native.cpp.
|
static |
Definition at line 50 of file Native.cpp.
GLuint glProgram |
Definition at line 145 of file Native.cpp.
|
static |
Definition at line 38 of file Native.cpp.
GLushort indicies[] = {0, 2, 3, 0, 3, 1} |
Definition at line 246 of file Native.cpp.
GLuint modelViewLocation |
Definition at line 149 of file Native.cpp.
float modelViewMatrix[16] |
Definition at line 154 of file Native.cpp.
GLuint projectionLocation |
Definition at line 148 of file Native.cpp.
float projectionMatrix[16] |
Definition at line 153 of file Native.cpp.
GLuint samplerLocation |
Definition at line 147 of file Native.cpp.
GLfloat squareVertices[] |
Definition at line 234 of file Native.cpp.
GLuint textureCordLocation |
Definition at line 150 of file Native.cpp.
GLfloat textureCords[] |
Definition at line 240 of file Native.cpp.
GLuint textureIds[2] |
Definition at line 151 of file Native.cpp.
GLuint textureModeToggle = 0 |
Definition at line 158 of file Native.cpp.
float velocity = 0.1 |
Definition at line 157 of file Native.cpp.
GLuint vertexLocation |
Definition at line 146 of file Native.cpp.