OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
main.cpp File Reference
#include <jni.h>
#include <stdlib.h>
#include <time.h>
#include <android/log.h>
#include <GLES3/gl3.h>
#include <GLES3/gl31.h>
#include <GLES2/gl2ext.h>
#include "geometry.cpp"
#include "loader.cpp"
#include <sys/time.h>

Go to the source code of this file.

Macros

#define LOG_TAG   "ProceduralGeometry"
 
#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 LOGD(...)   __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
 
#define GL_GLEXT_PROTOTYPES
 
#define GL_GEOMETRY_SHADER   GL_GEOMETRY_SHADER_EXT
 
#define BASE_ASSET_PATH   "/data/data/com.arm.malideveloper.openglessdk.proceduralgeometry/files/"
 
#define TEXTURE_PATH(name)   BASE_ASSET_PATH name
 
#define SHADER_PATH(name)   BASE_ASSET_PATH name
 

Functions

const char * get_gl_error_msg (GLenum code)
 
void gl_check_error ()
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_init (JNIEnv *env, jobject obj)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_resize (JNIEnv *env, jobject obj, jint width, jint height)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_step (JNIEnv *env, jobject obj)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_onpointerdown (JNIEnv *env, jobject obj, jfloat x, jfloat y)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_onpointerup (JNIEnv *env, jobject obj, jfloat x, jfloat y)
 

Variables

static timeval start_time
 
static App app
 

Macro Definition Documentation

#define BASE_ASSET_PATH   "/data/data/com.arm.malideveloper.openglessdk.proceduralgeometry/files/"

Definition at line 38 of file main.cpp.

#define GL_GEOMETRY_SHADER   GL_GEOMETRY_SHADER_EXT

Definition at line 32 of file main.cpp.

#define GL_GLEXT_PROTOTYPES

Definition at line 31 of file main.cpp.

#define LOG_TAG   "ProceduralGeometry"

Definition at line 26 of file main.cpp.

#define LOGD (   ...)    __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)

Definition at line 29 of file main.cpp.

#define LOGE (   ...)    __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)

Definition at line 28 of file main.cpp.

#define LOGI (   ...)    __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)

Definition at line 27 of file main.cpp.

#define SHADER_PATH (   name)    BASE_ASSET_PATH name

Definition at line 40 of file main.cpp.

#define TEXTURE_PATH (   name)    BASE_ASSET_PATH name

Definition at line 39 of file main.cpp.

Function Documentation

const char* get_gl_error_msg ( GLenum  code)

Definition at line 47 of file main.cpp.

void gl_check_error ( )

Definition at line 63 of file main.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_init ( JNIEnv *  env,
jobject  obj 
)

Definition at line 75 of file main.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_onpointerdown ( JNIEnv *  env,
jobject  obj,
jfloat  x,
jfloat  y 
)

Definition at line 112 of file main.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_onpointerup ( JNIEnv *  env,
jobject  obj,
jfloat  x,
jfloat  y 
)

Definition at line 119 of file main.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_resize ( JNIEnv *  env,
jobject  obj,
jint  width,
jint  height 
)

Definition at line 87 of file main.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_proceduralgeometry_ProceduralGeometry_step ( JNIEnv *  env,
jobject  obj 
)

Definition at line 96 of file main.cpp.

Variable Documentation

App app
static

Definition at line 45 of file main.cpp.

timeval start_time
static

Definition at line 44 of file main.cpp.