22 #include <android/log.h>
24 #include <GLES3/gl3.h>
26 #include <EGL/eglext.h>
38 case 0:
return "NO_ERROR";
39 case 0x0500:
return "INVALID_ENUM";
40 case 0x0501:
return "INVALID_VALUE";
41 case 0x0502:
return "INVALID_OPERATION";
42 case 0x0503:
return "STACK_OVERFLOW";
43 case 0x0504:
return "STACK_UNDERFLOW";
44 case 0x0505:
return "OUT_OF_MEMORY";
45 case 0x0506:
return "INVALID_FRAMEBUFFER_OPERATION";
46 default:
return "UNKNOWN";
63 (JNIEnv *env, jclass jcls)
67 last_tick = curr_tick;
72 GLenum error = glGetError();
73 bool were_errors =
false;
74 while (error != GL_NO_ERROR)
80 if (were_errors) exit(1);
90 (JNIEnv * env, jobject obj, jfloat
x, jfloat
y)
96 (JNIEnv * env, jobject obj, jfloat x, jfloat y)
void on_pointer_down(float x, float y)
GLint GLsizei GLsizei height
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_computeparticles_ComputeParticles_onpointerdown(JNIEnv *env, jobject obj, jfloat x, jfloat y)
void on_pointer_up(float x, float y)
const char * get_gl_error_msg(GLenum code)
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_computeparticles_ComputeParticles_onpointerup(JNIEnv *env, jobject obj, jfloat x, jfloat y)
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_computeparticles_ComputeParticles_init(JNIEnv *env, jclass jcls, jint width, jint height)
void init_app(int width, int height)
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_computeparticles_ComputeParticles_step(JNIEnv *env, jclass jcls)
GLint GLint GLint GLint GLint x
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_computeparticles_ComputeParticles_uninit(JNIEnv *, jclass)
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
double get_elapsed_time()
void render_app(float dt)
void update_app(float dt)