#include <jni.h>
#include <android/log.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Go to the source code of this file.
|
#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__) |
|
#define LOG_TAG "libNative" |
#define LOGE |
( |
|
... | ) |
__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) |
#define LOGI |
( |
|
... | ) |
__android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) |
GLuint createProgram |
( |
const char * |
vertexSource, |
|
|
const char * |
fragmentSource |
|
) |
| |
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_simpletriangle_NativeLibrary_init |
( |
JNIEnv * |
env, |
|
|
jobject |
obj, |
|
|
jint |
width, |
|
|
jint |
height |
|
) |
| |
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_simpletriangle_NativeLibrary_step |
( |
JNIEnv * |
env, |
|
|
jobject |
obj |
|
) |
| |
GLuint loadShader |
( |
GLenum |
shaderType, |
|
|
const char * |
shaderSource |
|
) |
| |
bool setupGraphics |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
const char glFragmentShader[] |
|
static |
Initial value:=
"precision mediump float;\n"
"void main()\n"
"{\n"
" gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
"}\n"
Definition at line 47 of file Native.cpp.
const char glVertexShader[] |
|
static |
Initial value:=
"attribute vec4 vPosition;\n"
"void main()\n"
"{\n"
" gl_Position = vPosition;\n"
"}\n"
Definition at line 38 of file Native.cpp.
Initial value:= {
0.0f, 1.0f,
-1.0f, -1.0f,
1.0f, -1.0f
}
Definition at line 169 of file Native.cpp.