#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 <assimp/cimport.h>
#include <assimp/scene.h>
#include <vector>
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_assetloading_NativeLibrary_init |
( |
JNIEnv * |
env, |
|
|
jobject |
obj, |
|
|
jint |
width, |
|
|
jint |
height |
|
) |
| |
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_assetloading_NativeLibrary_step |
( |
JNIEnv * |
env, |
|
|
jobject |
obj |
|
) |
| |
GLuint loadShader |
( |
GLenum |
shaderType, |
|
|
const char * |
shaderSource |
|
) |
| |
bool setupGraphics |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
const char glFragmentShader[] |
|
static |
Initial value:=
"precision mediump float;\n"
"varying vec3 fragColour;\n"
"void main()\n"
"{\n"
" gl_FragColor = vec4(fragColour, 1.0);\n"
"}\n"
Definition at line 61 of file Native.cpp.
const char glVertexShader[] |
|
static |
Initial value:=
"attribute vec4 vertexPosition;\n"
"attribute vec3 vertexColour;\n"
"varying vec3 fragColour;\n"
"uniform mat4 projection;\n"
"uniform mat4 modelView;\n"
"void main()\n"
"{\n"
" gl_Position = projection * modelView * vertexPosition;\n"
" fragColour = vertexColour;\n"
"}\n"
Definition at line 49 of file Native.cpp.
float modelViewMatrix[16] |
float projectionMatrix[16] |
const struct aiScene* scene = NULL |