From 48ef2fffdf406e94de143940c74111642f0c6f58 Mon Sep 17 00:00:00 2001 From: Julian Winkler Date: Sun, 18 Jun 2023 11:11:53 +0200 Subject: [PATCH] implement GLES20 java bindings These are just one to one bindings for the native OpenGL 2.0 APIs --- meson.build | 1 + src/api-impl-jni/android_opengl_GLES20.c | 236 ++ .../generated_headers/android_opengl_GLES20.h | 2161 +++++++++++++++++ src/api-impl/android/opengl/GLES20.java | 1922 +++++++++++++++ src/api-impl/android/opengl/Matrix.java | 983 ++++++++ src/api-impl/meson.build | 2 + 6 files changed, 5305 insertions(+) create mode 100644 src/api-impl-jni/android_opengl_GLES20.c create mode 100644 src/api-impl-jni/generated_headers/android_opengl_GLES20.h create mode 100644 src/api-impl/android/opengl/GLES20.java create mode 100644 src/api-impl/android/opengl/Matrix.java diff --git a/meson.build b/meson.build index 7594aedd..791f83bd 100644 --- a/meson.build +++ b/meson.build @@ -69,6 +69,7 @@ libtranslationlayer_so = shared_library('translation_layer_main', [ 'src/api-impl-jni/views/android_view_ViewGroup.c', 'src/api-impl-jni/android_graphics_Bitmap.c', 'src/api-impl-jni/android_app_NativeActivity.c', + 'src/api-impl-jni/android_opengl_GLES20.c', ] + marshal_files, install: true, install_dir : get_option('libdir') / 'java/dex/android_translation_layer/natives', diff --git a/src/api-impl-jni/android_opengl_GLES20.c b/src/api-impl-jni/android_opengl_GLES20.c new file mode 100644 index 00000000..5054894b --- /dev/null +++ b/src/api-impl-jni/android_opengl_GLES20.c @@ -0,0 +1,236 @@ +#include +#include +#include +#include "defines.h" + +#include "generated_headers/android_opengl_GLES20.h" + +static void *get_nio_buffer(JNIEnv *env, jobject buffer, jarray *array_ref, jbyte **array) { + jclass class; + void *pointer; + int elementSizeShift, position; + + if (!buffer) { + *array_ref = NULL; + return NULL; + } + class = _CLASS(buffer); + pointer = _PTR((*env)->GetLongField(env, buffer, _FIELD_ID(class, "address", "J"))); + elementSizeShift = (*env)->GetIntField(env, buffer, _FIELD_ID(class, "_elementSizeShift", "I")); + position = (*env)->GetIntField(env, buffer, _FIELD_ID(class, "position", "I")); + if (pointer) { // buffer is direct + *array_ref = NULL; + pointer += position << elementSizeShift; + } else { // buffer is indirect + *array_ref = (*env)->CallObjectMethod(env, buffer, _METHOD(class, "array", "()Ljava/lang/Object;")); + pointer = *array = (*env)->GetPrimitiveArrayCritical(env, *array_ref, NULL); + jint offset = (*env)->CallIntMethod(env, buffer, _METHOD(class, "arrayOffset", "()I")); + pointer += (offset + position) << elementSizeShift; + } + return pointer; +} + +static void release_nio_buffer(JNIEnv *env, jarray array_ref, jbyte *array) { + if (array_ref) + (*env)->ReleasePrimitiveArrayCritical(env, array_ref, array, 0); +} + +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetString(JNIEnv *env, jclass, jint name) { + const char* chars = (const char*) glGetString((GLenum) name); + return _JSTRING(chars); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetIntegerv__I_3II(JNIEnv *env, jclass, jint pname, jintArray params_ref, jint offset) { + jint *params = (*env)->GetIntArrayElements(env, params_ref, NULL); + glGetIntegerv((GLenum)pname, params + offset); + (*env)->ReleaseIntArrayElements(env, params_ref, params, 0); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glEnableVertexAttribArray(JNIEnv *env, jclass, jint index) { + glEnableVertexAttribArray((GLuint)index); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDisable(JNIEnv *env, jclass, jint cap) { + glDisable((GLenum)cap); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glEnable(JNIEnv *env, jclass, jint cap) { + glEnable((GLenum)cap); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glViewport(JNIEnv *env, jclass, jint x, jint y, jint width, jint height) { + glViewport((GLint)x, (GLint)y, (GLsizei)width, (GLsizei)height); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenTextures__I_3II(JNIEnv *env, jclass, jint n, jintArray textures_ref, jint offset) { + jint *textures = (*env)->GetIntArrayElements(env, textures_ref, NULL); + glGenTextures((GLsizei)n, (GLuint *)textures + offset); + (*env)->ReleaseIntArrayElements(env, textures_ref, textures, 0); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindTexture(JNIEnv *env, jclass, jint target, jint texture) { + glBindTexture((GLenum)target, (GLuint)texture); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexImage2D(JNIEnv *env, jclass, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) { + jarray array_ref; + jbyte *array; + GLvoid *pixels = get_nio_buffer(env, pixels_buf, &array_ref, &array); + glTexImage2D((GLenum)target, (GLint)level, (GLint)internalformat, (GLsizei)width, (GLsizei)height, (GLint)border, (GLenum)format, (GLenum)type, pixels); + release_nio_buffer(env, array_ref, array); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexSubImage2D(JNIEnv *env, jclass, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) { + jarray array_ref; + jbyte *array; + GLvoid *pixels = get_nio_buffer(env, pixels_buf, &array_ref, &array); + glTexSubImage2D((GLenum)target, (GLint)level, (GLint)xoffset, (GLint)yoffset, (GLsizei)width, (GLsizei)height, (GLenum)format, (GLenum)type, pixels); + release_nio_buffer(env, array_ref, array); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexParameterf(JNIEnv *env, jclass, jint target, jint pname, jfloat param) { + glTexParameterf((GLenum)target, (GLenum)pname, (GLfloat)param); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenBuffers__I_3II(JNIEnv *env, jclass, jint n, jintArray buffers_ref, jint offset) { + jint *buffers = (*env)->GetIntArrayElements(env, buffers_ref, NULL); + glGenBuffers((GLsizei)n, (GLuint *)buffers + offset); + (*env)->ReleaseIntArrayElements(env, buffers_ref, buffers, 0); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindBuffer(JNIEnv *env, jclass, jint target, jint buffer) { + glBindBuffer((GLenum)target, (GLuint)buffer); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBufferData(JNIEnv *env, jclass, jint target, jint size, jobject data_buf, jint usage) { + jarray array_ref; + jbyte *array; + GLvoid *data = get_nio_buffer(env, data_buf, &array_ref, &array); + glBufferData((GLenum)target, (GLsizeiptr)size, data, (GLenum)usage); + release_nio_buffer(env, array_ref, array); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDisableVertexAttribArray(JNIEnv *env, jclass, jint index) { + glDisableVertexAttribArray((GLuint)index); +} + +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glCreateShader(JNIEnv *env, jclass, jint type) { + return (jint)glCreateShader((GLenum)type); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glShaderSource(JNIEnv *env, jclass, jint shader, jstring string) { + const char* nativeString = (*env)->GetStringUTFChars(env, string, NULL); + const char* strings[] = {nativeString}; + glShaderSource(shader, 1, strings, 0); + (*env)->ReleaseStringUTFChars(env, string, nativeString); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glCompileShader(JNIEnv *env, jclass, jint shader) { + glCompileShader((GLuint)shader); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetShaderiv__II_3II(JNIEnv *env, jclass, jint shader, jint pname, jintArray params_ref, jint offset) { + jint *params = (*env)->GetIntArrayElements(env, params_ref, NULL); + glGetShaderiv((GLuint)shader, (GLenum)pname, params + offset); + (*env)->ReleaseIntArrayElements(env, params_ref, params, 0); +} + +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glCreateProgram(JNIEnv *env, jclass) { + return (jint)glCreateProgram(); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glAttachShader(JNIEnv *env, jclass, jint program, jint shader) { + glAttachShader((GLuint)program, (GLuint)shader); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindAttribLocation(JNIEnv *env, jclass, jint program, jint index, jstring name) { + const char* nativeName = (*env)->GetStringUTFChars(env, name, NULL); + glBindAttribLocation((GLuint)program, (GLuint)index, nativeName); + (*env)->ReleaseStringUTFChars(env, name, nativeName); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glLinkProgram(JNIEnv *env, jclass, jint program) { + glLinkProgram((GLuint)program); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetProgramiv__II_3II(JNIEnv *env, jclass, jint program, jint pname, jintArray params_ref, jint offset) { + jint *params = (*env)->GetIntArrayElements(env, params_ref, NULL); + glGetProgramiv((GLuint)program, (GLenum)pname, params + offset); + (*env)->ReleaseIntArrayElements(env, params_ref, params, 0); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetActiveAttrib__III_3II_3II_3II_3BI(JNIEnv *env, jclass, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) { + jint *length = (*env)->GetIntArrayElements(env, length_ref, NULL); + jint *size = (*env)->GetIntArrayElements(env, size_ref, NULL); + jint *type = (*env)->GetIntArrayElements(env, type_ref, NULL); + jbyte *name = (*env)->GetByteArrayElements(env, name_ref, NULL); + glGetActiveAttrib((GLuint)program, (GLuint)index, (GLsizei)bufsize, (GLsizei *)length+lengthOffset, (GLint *)size+sizeOffset, (GLenum *)type+typeOffset, (char *)name+nameOffset); + (*env)->ReleaseByteArrayElements(env, name_ref, name, 0); + (*env)->ReleaseIntArrayElements(env, type_ref, type, 0); + (*env)->ReleaseIntArrayElements(env, size_ref, size, 0); + (*env)->ReleaseIntArrayElements(env, length_ref, length, 0); +} + +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glGetAttribLocation(JNIEnv *env, jclass, jint program, jstring name) { + const char* nativeName = (*env)->GetStringUTFChars(env, name, NULL); + jint ret = glGetAttribLocation((GLuint)program, nativeName); + (*env)->ReleaseStringUTFChars(env, name, nativeName); + return ret; +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetActiveUniform__III_3II_3II_3II_3BI(JNIEnv *env, jclass, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) { + jint *length = (*env)->GetIntArrayElements(env, length_ref, NULL); + jint *size = (*env)->GetIntArrayElements(env, size_ref, NULL); + jint *type = (*env)->GetIntArrayElements(env, type_ref, NULL); + jbyte *name = (*env)->GetByteArrayElements(env, name_ref, NULL); + glGetActiveUniform((GLuint)program, (GLuint)index, (GLsizei)bufsize, (GLsizei *)length+lengthOffset, (GLint *)size+sizeOffset, (GLenum *)type+typeOffset, (char *)name+nameOffset); + (*env)->ReleaseByteArrayElements(env, name_ref, name, 0); + (*env)->ReleaseIntArrayElements(env, type_ref, type, 0); + (*env)->ReleaseIntArrayElements(env, size_ref, size, 0); + (*env)->ReleaseIntArrayElements(env, length_ref, length, 0); +} + +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glGetUniformLocation(JNIEnv *env, jclass, jint program, jstring name) { + const char* nativeName = (*env)->GetStringUTFChars(env, name, NULL); + jint ret = glGetUniformLocation((GLuint)program, nativeName); + (*env)->ReleaseStringUTFChars(env, name, nativeName); + return ret; +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteShader(JNIEnv *env, jclass, jint shader) { + glDeleteShader((GLuint)shader); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUseProgram(JNIEnv *env, jclass, jint program) { + glUseProgram((GLuint)program); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttribPointer(JNIEnv *env, jclass, jint indx, jint size, jint type, jboolean normalized, jint stride, jint offset) { + glVertexAttribPointer((GLuint)indx, (GLint)size, (GLenum)type, (GLboolean)normalized, (GLsizei)stride, (GLvoid *)(intptr_t)offset); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniformMatrix4fv__IIZ_3FI(JNIEnv *env, jclass, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { + jfloat *value = (*env)->GetFloatArrayElements(env, value_ref, NULL); + glUniformMatrix4fv((GLint)location, (GLsizei)count, (GLboolean)transpose, (GLfloat *)value); + (*env)->ReleaseFloatArrayElements(env, value_ref, value, 0); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform1i(JNIEnv *env, jclass, jint location, jint x) { + glUniform1i((GLint)location, (GLint)x); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDrawArrays(JNIEnv *env, jclass, jint mode, jint first, jint count) { + glDrawArrays((GLenum)mode, (GLint)first, (GLsizei)count); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glClearColor(JNIEnv *env, jclass, jfloat red, jfloat green, jfloat blue, jfloat alpha) { + glClearColor((GLclampf)red, (GLclampf)green, (GLclampf)blue, (GLclampf)alpha); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glClear(JNIEnv *env, jclass, jint mask) { + glClear((GLbitfield)mask); +} + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBlendFunc(JNIEnv *env, jclass, jint sfactor, jint dfactor) { + glBlendFunc((GLenum)sfactor, (GLenum)dfactor); +} diff --git a/src/api-impl-jni/generated_headers/android_opengl_GLES20.h b/src/api-impl-jni/generated_headers/android_opengl_GLES20.h new file mode 100644 index 00000000..61939add --- /dev/null +++ b/src/api-impl-jni/generated_headers/android_opengl_GLES20.h @@ -0,0 +1,2161 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class android_opengl_GLES20 */ + +#ifndef _Included_android_opengl_GLES20 +#define _Included_android_opengl_GLES20 +#ifdef __cplusplus +extern "C" { +#endif +#undef android_opengl_GLES20_GL_ACTIVE_TEXTURE +#define android_opengl_GLES20_GL_ACTIVE_TEXTURE 34016L +#undef android_opengl_GLES20_GL_DEPTH_BUFFER_BIT +#define android_opengl_GLES20_GL_DEPTH_BUFFER_BIT 256L +#undef android_opengl_GLES20_GL_STENCIL_BUFFER_BIT +#define android_opengl_GLES20_GL_STENCIL_BUFFER_BIT 1024L +#undef android_opengl_GLES20_GL_COLOR_BUFFER_BIT +#define android_opengl_GLES20_GL_COLOR_BUFFER_BIT 16384L +#undef android_opengl_GLES20_GL_FALSE +#define android_opengl_GLES20_GL_FALSE 0L +#undef android_opengl_GLES20_GL_TRUE +#define android_opengl_GLES20_GL_TRUE 1L +#undef android_opengl_GLES20_GL_POINTS +#define android_opengl_GLES20_GL_POINTS 0L +#undef android_opengl_GLES20_GL_LINES +#define android_opengl_GLES20_GL_LINES 1L +#undef android_opengl_GLES20_GL_LINE_LOOP +#define android_opengl_GLES20_GL_LINE_LOOP 2L +#undef android_opengl_GLES20_GL_LINE_STRIP +#define android_opengl_GLES20_GL_LINE_STRIP 3L +#undef android_opengl_GLES20_GL_TRIANGLES +#define android_opengl_GLES20_GL_TRIANGLES 4L +#undef android_opengl_GLES20_GL_TRIANGLE_STRIP +#define android_opengl_GLES20_GL_TRIANGLE_STRIP 5L +#undef android_opengl_GLES20_GL_TRIANGLE_FAN +#define android_opengl_GLES20_GL_TRIANGLE_FAN 6L +#undef android_opengl_GLES20_GL_ZERO +#define android_opengl_GLES20_GL_ZERO 0L +#undef android_opengl_GLES20_GL_ONE +#define android_opengl_GLES20_GL_ONE 1L +#undef android_opengl_GLES20_GL_SRC_COLOR +#define android_opengl_GLES20_GL_SRC_COLOR 768L +#undef android_opengl_GLES20_GL_ONE_MINUS_SRC_COLOR +#define android_opengl_GLES20_GL_ONE_MINUS_SRC_COLOR 769L +#undef android_opengl_GLES20_GL_SRC_ALPHA +#define android_opengl_GLES20_GL_SRC_ALPHA 770L +#undef android_opengl_GLES20_GL_ONE_MINUS_SRC_ALPHA +#define android_opengl_GLES20_GL_ONE_MINUS_SRC_ALPHA 771L +#undef android_opengl_GLES20_GL_DST_ALPHA +#define android_opengl_GLES20_GL_DST_ALPHA 772L +#undef android_opengl_GLES20_GL_ONE_MINUS_DST_ALPHA +#define android_opengl_GLES20_GL_ONE_MINUS_DST_ALPHA 773L +#undef android_opengl_GLES20_GL_DST_COLOR +#define android_opengl_GLES20_GL_DST_COLOR 774L +#undef android_opengl_GLES20_GL_ONE_MINUS_DST_COLOR +#define android_opengl_GLES20_GL_ONE_MINUS_DST_COLOR 775L +#undef android_opengl_GLES20_GL_SRC_ALPHA_SATURATE +#define android_opengl_GLES20_GL_SRC_ALPHA_SATURATE 776L +#undef android_opengl_GLES20_GL_FUNC_ADD +#define android_opengl_GLES20_GL_FUNC_ADD 32774L +#undef android_opengl_GLES20_GL_BLEND_EQUATION +#define android_opengl_GLES20_GL_BLEND_EQUATION 32777L +#undef android_opengl_GLES20_GL_BLEND_EQUATION_RGB +#define android_opengl_GLES20_GL_BLEND_EQUATION_RGB 32777L +#undef android_opengl_GLES20_GL_BLEND_EQUATION_ALPHA +#define android_opengl_GLES20_GL_BLEND_EQUATION_ALPHA 34877L +#undef android_opengl_GLES20_GL_FUNC_SUBTRACT +#define android_opengl_GLES20_GL_FUNC_SUBTRACT 32778L +#undef android_opengl_GLES20_GL_FUNC_REVERSE_SUBTRACT +#define android_opengl_GLES20_GL_FUNC_REVERSE_SUBTRACT 32779L +#undef android_opengl_GLES20_GL_BLEND_DST_RGB +#define android_opengl_GLES20_GL_BLEND_DST_RGB 32968L +#undef android_opengl_GLES20_GL_BLEND_SRC_RGB +#define android_opengl_GLES20_GL_BLEND_SRC_RGB 32969L +#undef android_opengl_GLES20_GL_BLEND_DST_ALPHA +#define android_opengl_GLES20_GL_BLEND_DST_ALPHA 32970L +#undef android_opengl_GLES20_GL_BLEND_SRC_ALPHA +#define android_opengl_GLES20_GL_BLEND_SRC_ALPHA 32971L +#undef android_opengl_GLES20_GL_CONSTANT_COLOR +#define android_opengl_GLES20_GL_CONSTANT_COLOR 32769L +#undef android_opengl_GLES20_GL_ONE_MINUS_CONSTANT_COLOR +#define android_opengl_GLES20_GL_ONE_MINUS_CONSTANT_COLOR 32770L +#undef android_opengl_GLES20_GL_CONSTANT_ALPHA +#define android_opengl_GLES20_GL_CONSTANT_ALPHA 32771L +#undef android_opengl_GLES20_GL_ONE_MINUS_CONSTANT_ALPHA +#define android_opengl_GLES20_GL_ONE_MINUS_CONSTANT_ALPHA 32772L +#undef android_opengl_GLES20_GL_BLEND_COLOR +#define android_opengl_GLES20_GL_BLEND_COLOR 32773L +#undef android_opengl_GLES20_GL_ARRAY_BUFFER +#define android_opengl_GLES20_GL_ARRAY_BUFFER 34962L +#undef android_opengl_GLES20_GL_ELEMENT_ARRAY_BUFFER +#define android_opengl_GLES20_GL_ELEMENT_ARRAY_BUFFER 34963L +#undef android_opengl_GLES20_GL_ARRAY_BUFFER_BINDING +#define android_opengl_GLES20_GL_ARRAY_BUFFER_BINDING 34964L +#undef android_opengl_GLES20_GL_ELEMENT_ARRAY_BUFFER_BINDING +#define android_opengl_GLES20_GL_ELEMENT_ARRAY_BUFFER_BINDING 34965L +#undef android_opengl_GLES20_GL_STREAM_DRAW +#define android_opengl_GLES20_GL_STREAM_DRAW 35040L +#undef android_opengl_GLES20_GL_STATIC_DRAW +#define android_opengl_GLES20_GL_STATIC_DRAW 35044L +#undef android_opengl_GLES20_GL_DYNAMIC_DRAW +#define android_opengl_GLES20_GL_DYNAMIC_DRAW 35048L +#undef android_opengl_GLES20_GL_BUFFER_SIZE +#define android_opengl_GLES20_GL_BUFFER_SIZE 34660L +#undef android_opengl_GLES20_GL_BUFFER_USAGE +#define android_opengl_GLES20_GL_BUFFER_USAGE 34661L +#undef android_opengl_GLES20_GL_CURRENT_VERTEX_ATTRIB +#define android_opengl_GLES20_GL_CURRENT_VERTEX_ATTRIB 34342L +#undef android_opengl_GLES20_GL_FRONT +#define android_opengl_GLES20_GL_FRONT 1028L +#undef android_opengl_GLES20_GL_BACK +#define android_opengl_GLES20_GL_BACK 1029L +#undef android_opengl_GLES20_GL_FRONT_AND_BACK +#define android_opengl_GLES20_GL_FRONT_AND_BACK 1032L +#undef android_opengl_GLES20_GL_TEXTURE_2D +#define android_opengl_GLES20_GL_TEXTURE_2D 3553L +#undef android_opengl_GLES20_GL_CULL_FACE +#define android_opengl_GLES20_GL_CULL_FACE 2884L +#undef android_opengl_GLES20_GL_BLEND +#define android_opengl_GLES20_GL_BLEND 3042L +#undef android_opengl_GLES20_GL_DITHER +#define android_opengl_GLES20_GL_DITHER 3024L +#undef android_opengl_GLES20_GL_STENCIL_TEST +#define android_opengl_GLES20_GL_STENCIL_TEST 2960L +#undef android_opengl_GLES20_GL_DEPTH_TEST +#define android_opengl_GLES20_GL_DEPTH_TEST 2929L +#undef android_opengl_GLES20_GL_SCISSOR_TEST +#define android_opengl_GLES20_GL_SCISSOR_TEST 3089L +#undef android_opengl_GLES20_GL_POLYGON_OFFSET_FILL +#define android_opengl_GLES20_GL_POLYGON_OFFSET_FILL 32823L +#undef android_opengl_GLES20_GL_SAMPLE_ALPHA_TO_COVERAGE +#define android_opengl_GLES20_GL_SAMPLE_ALPHA_TO_COVERAGE 32926L +#undef android_opengl_GLES20_GL_SAMPLE_COVERAGE +#define android_opengl_GLES20_GL_SAMPLE_COVERAGE 32928L +#undef android_opengl_GLES20_GL_NO_ERROR +#define android_opengl_GLES20_GL_NO_ERROR 0L +#undef android_opengl_GLES20_GL_INVALID_ENUM +#define android_opengl_GLES20_GL_INVALID_ENUM 1280L +#undef android_opengl_GLES20_GL_INVALID_VALUE +#define android_opengl_GLES20_GL_INVALID_VALUE 1281L +#undef android_opengl_GLES20_GL_INVALID_OPERATION +#define android_opengl_GLES20_GL_INVALID_OPERATION 1282L +#undef android_opengl_GLES20_GL_OUT_OF_MEMORY +#define android_opengl_GLES20_GL_OUT_OF_MEMORY 1285L +#undef android_opengl_GLES20_GL_CW +#define android_opengl_GLES20_GL_CW 2304L +#undef android_opengl_GLES20_GL_CCW +#define android_opengl_GLES20_GL_CCW 2305L +#undef android_opengl_GLES20_GL_LINE_WIDTH +#define android_opengl_GLES20_GL_LINE_WIDTH 2849L +#undef android_opengl_GLES20_GL_ALIASED_POINT_SIZE_RANGE +#define android_opengl_GLES20_GL_ALIASED_POINT_SIZE_RANGE 33901L +#undef android_opengl_GLES20_GL_ALIASED_LINE_WIDTH_RANGE +#define android_opengl_GLES20_GL_ALIASED_LINE_WIDTH_RANGE 33902L +#undef android_opengl_GLES20_GL_CULL_FACE_MODE +#define android_opengl_GLES20_GL_CULL_FACE_MODE 2885L +#undef android_opengl_GLES20_GL_FRONT_FACE +#define android_opengl_GLES20_GL_FRONT_FACE 2886L +#undef android_opengl_GLES20_GL_DEPTH_RANGE +#define android_opengl_GLES20_GL_DEPTH_RANGE 2928L +#undef android_opengl_GLES20_GL_DEPTH_WRITEMASK +#define android_opengl_GLES20_GL_DEPTH_WRITEMASK 2930L +#undef android_opengl_GLES20_GL_DEPTH_CLEAR_VALUE +#define android_opengl_GLES20_GL_DEPTH_CLEAR_VALUE 2931L +#undef android_opengl_GLES20_GL_DEPTH_FUNC +#define android_opengl_GLES20_GL_DEPTH_FUNC 2932L +#undef android_opengl_GLES20_GL_STENCIL_CLEAR_VALUE +#define android_opengl_GLES20_GL_STENCIL_CLEAR_VALUE 2961L +#undef android_opengl_GLES20_GL_STENCIL_FUNC +#define android_opengl_GLES20_GL_STENCIL_FUNC 2962L +#undef android_opengl_GLES20_GL_STENCIL_FAIL +#define android_opengl_GLES20_GL_STENCIL_FAIL 2964L +#undef android_opengl_GLES20_GL_STENCIL_PASS_DEPTH_FAIL +#define android_opengl_GLES20_GL_STENCIL_PASS_DEPTH_FAIL 2965L +#undef android_opengl_GLES20_GL_STENCIL_PASS_DEPTH_PASS +#define android_opengl_GLES20_GL_STENCIL_PASS_DEPTH_PASS 2966L +#undef android_opengl_GLES20_GL_STENCIL_REF +#define android_opengl_GLES20_GL_STENCIL_REF 2967L +#undef android_opengl_GLES20_GL_STENCIL_VALUE_MASK +#define android_opengl_GLES20_GL_STENCIL_VALUE_MASK 2963L +#undef android_opengl_GLES20_GL_STENCIL_WRITEMASK +#define android_opengl_GLES20_GL_STENCIL_WRITEMASK 2968L +#undef android_opengl_GLES20_GL_STENCIL_BACK_FUNC +#define android_opengl_GLES20_GL_STENCIL_BACK_FUNC 34816L +#undef android_opengl_GLES20_GL_STENCIL_BACK_FAIL +#define android_opengl_GLES20_GL_STENCIL_BACK_FAIL 34817L +#undef android_opengl_GLES20_GL_STENCIL_BACK_PASS_DEPTH_FAIL +#define android_opengl_GLES20_GL_STENCIL_BACK_PASS_DEPTH_FAIL 34818L +#undef android_opengl_GLES20_GL_STENCIL_BACK_PASS_DEPTH_PASS +#define android_opengl_GLES20_GL_STENCIL_BACK_PASS_DEPTH_PASS 34819L +#undef android_opengl_GLES20_GL_STENCIL_BACK_REF +#define android_opengl_GLES20_GL_STENCIL_BACK_REF 36003L +#undef android_opengl_GLES20_GL_STENCIL_BACK_VALUE_MASK +#define android_opengl_GLES20_GL_STENCIL_BACK_VALUE_MASK 36004L +#undef android_opengl_GLES20_GL_STENCIL_BACK_WRITEMASK +#define android_opengl_GLES20_GL_STENCIL_BACK_WRITEMASK 36005L +#undef android_opengl_GLES20_GL_VIEWPORT +#define android_opengl_GLES20_GL_VIEWPORT 2978L +#undef android_opengl_GLES20_GL_SCISSOR_BOX +#define android_opengl_GLES20_GL_SCISSOR_BOX 3088L +#undef android_opengl_GLES20_GL_COLOR_CLEAR_VALUE +#define android_opengl_GLES20_GL_COLOR_CLEAR_VALUE 3106L +#undef android_opengl_GLES20_GL_COLOR_WRITEMASK +#define android_opengl_GLES20_GL_COLOR_WRITEMASK 3107L +#undef android_opengl_GLES20_GL_UNPACK_ALIGNMENT +#define android_opengl_GLES20_GL_UNPACK_ALIGNMENT 3317L +#undef android_opengl_GLES20_GL_PACK_ALIGNMENT +#define android_opengl_GLES20_GL_PACK_ALIGNMENT 3333L +#undef android_opengl_GLES20_GL_MAX_TEXTURE_SIZE +#define android_opengl_GLES20_GL_MAX_TEXTURE_SIZE 3379L +#undef android_opengl_GLES20_GL_MAX_VIEWPORT_DIMS +#define android_opengl_GLES20_GL_MAX_VIEWPORT_DIMS 3386L +#undef android_opengl_GLES20_GL_SUBPIXEL_BITS +#define android_opengl_GLES20_GL_SUBPIXEL_BITS 3408L +#undef android_opengl_GLES20_GL_RED_BITS +#define android_opengl_GLES20_GL_RED_BITS 3410L +#undef android_opengl_GLES20_GL_GREEN_BITS +#define android_opengl_GLES20_GL_GREEN_BITS 3411L +#undef android_opengl_GLES20_GL_BLUE_BITS +#define android_opengl_GLES20_GL_BLUE_BITS 3412L +#undef android_opengl_GLES20_GL_ALPHA_BITS +#define android_opengl_GLES20_GL_ALPHA_BITS 3413L +#undef android_opengl_GLES20_GL_DEPTH_BITS +#define android_opengl_GLES20_GL_DEPTH_BITS 3414L +#undef android_opengl_GLES20_GL_STENCIL_BITS +#define android_opengl_GLES20_GL_STENCIL_BITS 3415L +#undef android_opengl_GLES20_GL_POLYGON_OFFSET_UNITS +#define android_opengl_GLES20_GL_POLYGON_OFFSET_UNITS 10752L +#undef android_opengl_GLES20_GL_POLYGON_OFFSET_FACTOR +#define android_opengl_GLES20_GL_POLYGON_OFFSET_FACTOR 32824L +#undef android_opengl_GLES20_GL_TEXTURE_BINDING_2D +#define android_opengl_GLES20_GL_TEXTURE_BINDING_2D 32873L +#undef android_opengl_GLES20_GL_SAMPLE_BUFFERS +#define android_opengl_GLES20_GL_SAMPLE_BUFFERS 32936L +#undef android_opengl_GLES20_GL_SAMPLES +#define android_opengl_GLES20_GL_SAMPLES 32937L +#undef android_opengl_GLES20_GL_SAMPLE_COVERAGE_VALUE +#define android_opengl_GLES20_GL_SAMPLE_COVERAGE_VALUE 32938L +#undef android_opengl_GLES20_GL_SAMPLE_COVERAGE_INVERT +#define android_opengl_GLES20_GL_SAMPLE_COVERAGE_INVERT 32939L +#undef android_opengl_GLES20_GL_NUM_COMPRESSED_TEXTURE_FORMATS +#define android_opengl_GLES20_GL_NUM_COMPRESSED_TEXTURE_FORMATS 34466L +#undef android_opengl_GLES20_GL_COMPRESSED_TEXTURE_FORMATS +#define android_opengl_GLES20_GL_COMPRESSED_TEXTURE_FORMATS 34467L +#undef android_opengl_GLES20_GL_DONT_CARE +#define android_opengl_GLES20_GL_DONT_CARE 4352L +#undef android_opengl_GLES20_GL_FASTEST +#define android_opengl_GLES20_GL_FASTEST 4353L +#undef android_opengl_GLES20_GL_NICEST +#define android_opengl_GLES20_GL_NICEST 4354L +#undef android_opengl_GLES20_GL_GENERATE_MIPMAP_HINT +#define android_opengl_GLES20_GL_GENERATE_MIPMAP_HINT 33170L +#undef android_opengl_GLES20_GL_BYTE +#define android_opengl_GLES20_GL_BYTE 5120L +#undef android_opengl_GLES20_GL_UNSIGNED_BYTE +#define android_opengl_GLES20_GL_UNSIGNED_BYTE 5121L +#undef android_opengl_GLES20_GL_SHORT +#define android_opengl_GLES20_GL_SHORT 5122L +#undef android_opengl_GLES20_GL_UNSIGNED_SHORT +#define android_opengl_GLES20_GL_UNSIGNED_SHORT 5123L +#undef android_opengl_GLES20_GL_INT +#define android_opengl_GLES20_GL_INT 5124L +#undef android_opengl_GLES20_GL_UNSIGNED_INT +#define android_opengl_GLES20_GL_UNSIGNED_INT 5125L +#undef android_opengl_GLES20_GL_FLOAT +#define android_opengl_GLES20_GL_FLOAT 5126L +#undef android_opengl_GLES20_GL_FIXED +#define android_opengl_GLES20_GL_FIXED 5132L +#undef android_opengl_GLES20_GL_DEPTH_COMPONENT +#define android_opengl_GLES20_GL_DEPTH_COMPONENT 6402L +#undef android_opengl_GLES20_GL_ALPHA +#define android_opengl_GLES20_GL_ALPHA 6406L +#undef android_opengl_GLES20_GL_RGB +#define android_opengl_GLES20_GL_RGB 6407L +#undef android_opengl_GLES20_GL_RGBA +#define android_opengl_GLES20_GL_RGBA 6408L +#undef android_opengl_GLES20_GL_LUMINANCE +#define android_opengl_GLES20_GL_LUMINANCE 6409L +#undef android_opengl_GLES20_GL_LUMINANCE_ALPHA +#define android_opengl_GLES20_GL_LUMINANCE_ALPHA 6410L +#undef android_opengl_GLES20_GL_UNSIGNED_SHORT_4_4_4_4 +#define android_opengl_GLES20_GL_UNSIGNED_SHORT_4_4_4_4 32819L +#undef android_opengl_GLES20_GL_UNSIGNED_SHORT_5_5_5_1 +#define android_opengl_GLES20_GL_UNSIGNED_SHORT_5_5_5_1 32820L +#undef android_opengl_GLES20_GL_UNSIGNED_SHORT_5_6_5 +#define android_opengl_GLES20_GL_UNSIGNED_SHORT_5_6_5 33635L +#undef android_opengl_GLES20_GL_FRAGMENT_SHADER +#define android_opengl_GLES20_GL_FRAGMENT_SHADER 35632L +#undef android_opengl_GLES20_GL_VERTEX_SHADER +#define android_opengl_GLES20_GL_VERTEX_SHADER 35633L +#undef android_opengl_GLES20_GL_MAX_VERTEX_ATTRIBS +#define android_opengl_GLES20_GL_MAX_VERTEX_ATTRIBS 34921L +#undef android_opengl_GLES20_GL_MAX_VERTEX_UNIFORM_VECTORS +#define android_opengl_GLES20_GL_MAX_VERTEX_UNIFORM_VECTORS 36347L +#undef android_opengl_GLES20_GL_MAX_VARYING_VECTORS +#define android_opengl_GLES20_GL_MAX_VARYING_VECTORS 36348L +#undef android_opengl_GLES20_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS +#define android_opengl_GLES20_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 35661L +#undef android_opengl_GLES20_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS +#define android_opengl_GLES20_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 35660L +#undef android_opengl_GLES20_GL_MAX_TEXTURE_IMAGE_UNITS +#define android_opengl_GLES20_GL_MAX_TEXTURE_IMAGE_UNITS 34930L +#undef android_opengl_GLES20_GL_MAX_FRAGMENT_UNIFORM_VECTORS +#define android_opengl_GLES20_GL_MAX_FRAGMENT_UNIFORM_VECTORS 36349L +#undef android_opengl_GLES20_GL_SHADER_TYPE +#define android_opengl_GLES20_GL_SHADER_TYPE 35663L +#undef android_opengl_GLES20_GL_DELETE_STATUS +#define android_opengl_GLES20_GL_DELETE_STATUS 35712L +#undef android_opengl_GLES20_GL_LINK_STATUS +#define android_opengl_GLES20_GL_LINK_STATUS 35714L +#undef android_opengl_GLES20_GL_VALIDATE_STATUS +#define android_opengl_GLES20_GL_VALIDATE_STATUS 35715L +#undef android_opengl_GLES20_GL_ATTACHED_SHADERS +#define android_opengl_GLES20_GL_ATTACHED_SHADERS 35717L +#undef android_opengl_GLES20_GL_ACTIVE_UNIFORMS +#define android_opengl_GLES20_GL_ACTIVE_UNIFORMS 35718L +#undef android_opengl_GLES20_GL_ACTIVE_UNIFORM_MAX_LENGTH +#define android_opengl_GLES20_GL_ACTIVE_UNIFORM_MAX_LENGTH 35719L +#undef android_opengl_GLES20_GL_ACTIVE_ATTRIBUTES +#define android_opengl_GLES20_GL_ACTIVE_ATTRIBUTES 35721L +#undef android_opengl_GLES20_GL_ACTIVE_ATTRIBUTE_MAX_LENGTH +#define android_opengl_GLES20_GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 35722L +#undef android_opengl_GLES20_GL_SHADING_LANGUAGE_VERSION +#define android_opengl_GLES20_GL_SHADING_LANGUAGE_VERSION 35724L +#undef android_opengl_GLES20_GL_CURRENT_PROGRAM +#define android_opengl_GLES20_GL_CURRENT_PROGRAM 35725L +#undef android_opengl_GLES20_GL_NEVER +#define android_opengl_GLES20_GL_NEVER 512L +#undef android_opengl_GLES20_GL_LESS +#define android_opengl_GLES20_GL_LESS 513L +#undef android_opengl_GLES20_GL_EQUAL +#define android_opengl_GLES20_GL_EQUAL 514L +#undef android_opengl_GLES20_GL_LEQUAL +#define android_opengl_GLES20_GL_LEQUAL 515L +#undef android_opengl_GLES20_GL_GREATER +#define android_opengl_GLES20_GL_GREATER 516L +#undef android_opengl_GLES20_GL_NOTEQUAL +#define android_opengl_GLES20_GL_NOTEQUAL 517L +#undef android_opengl_GLES20_GL_GEQUAL +#define android_opengl_GLES20_GL_GEQUAL 518L +#undef android_opengl_GLES20_GL_ALWAYS +#define android_opengl_GLES20_GL_ALWAYS 519L +#undef android_opengl_GLES20_GL_KEEP +#define android_opengl_GLES20_GL_KEEP 7680L +#undef android_opengl_GLES20_GL_REPLACE +#define android_opengl_GLES20_GL_REPLACE 7681L +#undef android_opengl_GLES20_GL_INCR +#define android_opengl_GLES20_GL_INCR 7682L +#undef android_opengl_GLES20_GL_DECR +#define android_opengl_GLES20_GL_DECR 7683L +#undef android_opengl_GLES20_GL_INVERT +#define android_opengl_GLES20_GL_INVERT 5386L +#undef android_opengl_GLES20_GL_INCR_WRAP +#define android_opengl_GLES20_GL_INCR_WRAP 34055L +#undef android_opengl_GLES20_GL_DECR_WRAP +#define android_opengl_GLES20_GL_DECR_WRAP 34056L +#undef android_opengl_GLES20_GL_VENDOR +#define android_opengl_GLES20_GL_VENDOR 7936L +#undef android_opengl_GLES20_GL_RENDERER +#define android_opengl_GLES20_GL_RENDERER 7937L +#undef android_opengl_GLES20_GL_VERSION +#define android_opengl_GLES20_GL_VERSION 7938L +#undef android_opengl_GLES20_GL_EXTENSIONS +#define android_opengl_GLES20_GL_EXTENSIONS 7939L +#undef android_opengl_GLES20_GL_NEAREST +#define android_opengl_GLES20_GL_NEAREST 9728L +#undef android_opengl_GLES20_GL_LINEAR +#define android_opengl_GLES20_GL_LINEAR 9729L +#undef android_opengl_GLES20_GL_NEAREST_MIPMAP_NEAREST +#define android_opengl_GLES20_GL_NEAREST_MIPMAP_NEAREST 9984L +#undef android_opengl_GLES20_GL_LINEAR_MIPMAP_NEAREST +#define android_opengl_GLES20_GL_LINEAR_MIPMAP_NEAREST 9985L +#undef android_opengl_GLES20_GL_NEAREST_MIPMAP_LINEAR +#define android_opengl_GLES20_GL_NEAREST_MIPMAP_LINEAR 9986L +#undef android_opengl_GLES20_GL_LINEAR_MIPMAP_LINEAR +#define android_opengl_GLES20_GL_LINEAR_MIPMAP_LINEAR 9987L +#undef android_opengl_GLES20_GL_TEXTURE_MAG_FILTER +#define android_opengl_GLES20_GL_TEXTURE_MAG_FILTER 10240L +#undef android_opengl_GLES20_GL_TEXTURE_MIN_FILTER +#define android_opengl_GLES20_GL_TEXTURE_MIN_FILTER 10241L +#undef android_opengl_GLES20_GL_TEXTURE_WRAP_S +#define android_opengl_GLES20_GL_TEXTURE_WRAP_S 10242L +#undef android_opengl_GLES20_GL_TEXTURE_WRAP_T +#define android_opengl_GLES20_GL_TEXTURE_WRAP_T 10243L +#undef android_opengl_GLES20_GL_TEXTURE +#define android_opengl_GLES20_GL_TEXTURE 5890L +#undef android_opengl_GLES20_GL_TEXTURE_CUBE_MAP +#define android_opengl_GLES20_GL_TEXTURE_CUBE_MAP 34067L +#undef android_opengl_GLES20_GL_TEXTURE_BINDING_CUBE_MAP +#define android_opengl_GLES20_GL_TEXTURE_BINDING_CUBE_MAP 34068L +#undef android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_POSITIVE_X +#define android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_POSITIVE_X 34069L +#undef android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_NEGATIVE_X +#define android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 34070L +#undef android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_POSITIVE_Y +#define android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 34071L +#undef android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y +#define android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 34072L +#undef android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_POSITIVE_Z +#define android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 34073L +#undef android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z +#define android_opengl_GLES20_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 34074L +#undef android_opengl_GLES20_GL_MAX_CUBE_MAP_TEXTURE_SIZE +#define android_opengl_GLES20_GL_MAX_CUBE_MAP_TEXTURE_SIZE 34076L +#undef android_opengl_GLES20_GL_TEXTURE0 +#define android_opengl_GLES20_GL_TEXTURE0 33984L +#undef android_opengl_GLES20_GL_TEXTURE1 +#define android_opengl_GLES20_GL_TEXTURE1 33985L +#undef android_opengl_GLES20_GL_TEXTURE2 +#define android_opengl_GLES20_GL_TEXTURE2 33986L +#undef android_opengl_GLES20_GL_TEXTURE3 +#define android_opengl_GLES20_GL_TEXTURE3 33987L +#undef android_opengl_GLES20_GL_TEXTURE4 +#define android_opengl_GLES20_GL_TEXTURE4 33988L +#undef android_opengl_GLES20_GL_TEXTURE5 +#define android_opengl_GLES20_GL_TEXTURE5 33989L +#undef android_opengl_GLES20_GL_TEXTURE6 +#define android_opengl_GLES20_GL_TEXTURE6 33990L +#undef android_opengl_GLES20_GL_TEXTURE7 +#define android_opengl_GLES20_GL_TEXTURE7 33991L +#undef android_opengl_GLES20_GL_TEXTURE8 +#define android_opengl_GLES20_GL_TEXTURE8 33992L +#undef android_opengl_GLES20_GL_TEXTURE9 +#define android_opengl_GLES20_GL_TEXTURE9 33993L +#undef android_opengl_GLES20_GL_TEXTURE10 +#define android_opengl_GLES20_GL_TEXTURE10 33994L +#undef android_opengl_GLES20_GL_TEXTURE11 +#define android_opengl_GLES20_GL_TEXTURE11 33995L +#undef android_opengl_GLES20_GL_TEXTURE12 +#define android_opengl_GLES20_GL_TEXTURE12 33996L +#undef android_opengl_GLES20_GL_TEXTURE13 +#define android_opengl_GLES20_GL_TEXTURE13 33997L +#undef android_opengl_GLES20_GL_TEXTURE14 +#define android_opengl_GLES20_GL_TEXTURE14 33998L +#undef android_opengl_GLES20_GL_TEXTURE15 +#define android_opengl_GLES20_GL_TEXTURE15 33999L +#undef android_opengl_GLES20_GL_TEXTURE16 +#define android_opengl_GLES20_GL_TEXTURE16 34000L +#undef android_opengl_GLES20_GL_TEXTURE17 +#define android_opengl_GLES20_GL_TEXTURE17 34001L +#undef android_opengl_GLES20_GL_TEXTURE18 +#define android_opengl_GLES20_GL_TEXTURE18 34002L +#undef android_opengl_GLES20_GL_TEXTURE19 +#define android_opengl_GLES20_GL_TEXTURE19 34003L +#undef android_opengl_GLES20_GL_TEXTURE20 +#define android_opengl_GLES20_GL_TEXTURE20 34004L +#undef android_opengl_GLES20_GL_TEXTURE21 +#define android_opengl_GLES20_GL_TEXTURE21 34005L +#undef android_opengl_GLES20_GL_TEXTURE22 +#define android_opengl_GLES20_GL_TEXTURE22 34006L +#undef android_opengl_GLES20_GL_TEXTURE23 +#define android_opengl_GLES20_GL_TEXTURE23 34007L +#undef android_opengl_GLES20_GL_TEXTURE24 +#define android_opengl_GLES20_GL_TEXTURE24 34008L +#undef android_opengl_GLES20_GL_TEXTURE25 +#define android_opengl_GLES20_GL_TEXTURE25 34009L +#undef android_opengl_GLES20_GL_TEXTURE26 +#define android_opengl_GLES20_GL_TEXTURE26 34010L +#undef android_opengl_GLES20_GL_TEXTURE27 +#define android_opengl_GLES20_GL_TEXTURE27 34011L +#undef android_opengl_GLES20_GL_TEXTURE28 +#define android_opengl_GLES20_GL_TEXTURE28 34012L +#undef android_opengl_GLES20_GL_TEXTURE29 +#define android_opengl_GLES20_GL_TEXTURE29 34013L +#undef android_opengl_GLES20_GL_TEXTURE30 +#define android_opengl_GLES20_GL_TEXTURE30 34014L +#undef android_opengl_GLES20_GL_TEXTURE31 +#define android_opengl_GLES20_GL_TEXTURE31 34015L +#undef android_opengl_GLES20_GL_REPEAT +#define android_opengl_GLES20_GL_REPEAT 10497L +#undef android_opengl_GLES20_GL_CLAMP_TO_EDGE +#define android_opengl_GLES20_GL_CLAMP_TO_EDGE 33071L +#undef android_opengl_GLES20_GL_MIRRORED_REPEAT +#define android_opengl_GLES20_GL_MIRRORED_REPEAT 33648L +#undef android_opengl_GLES20_GL_FLOAT_VEC2 +#define android_opengl_GLES20_GL_FLOAT_VEC2 35664L +#undef android_opengl_GLES20_GL_FLOAT_VEC3 +#define android_opengl_GLES20_GL_FLOAT_VEC3 35665L +#undef android_opengl_GLES20_GL_FLOAT_VEC4 +#define android_opengl_GLES20_GL_FLOAT_VEC4 35666L +#undef android_opengl_GLES20_GL_INT_VEC2 +#define android_opengl_GLES20_GL_INT_VEC2 35667L +#undef android_opengl_GLES20_GL_INT_VEC3 +#define android_opengl_GLES20_GL_INT_VEC3 35668L +#undef android_opengl_GLES20_GL_INT_VEC4 +#define android_opengl_GLES20_GL_INT_VEC4 35669L +#undef android_opengl_GLES20_GL_BOOL +#define android_opengl_GLES20_GL_BOOL 35670L +#undef android_opengl_GLES20_GL_BOOL_VEC2 +#define android_opengl_GLES20_GL_BOOL_VEC2 35671L +#undef android_opengl_GLES20_GL_BOOL_VEC3 +#define android_opengl_GLES20_GL_BOOL_VEC3 35672L +#undef android_opengl_GLES20_GL_BOOL_VEC4 +#define android_opengl_GLES20_GL_BOOL_VEC4 35673L +#undef android_opengl_GLES20_GL_FLOAT_MAT2 +#define android_opengl_GLES20_GL_FLOAT_MAT2 35674L +#undef android_opengl_GLES20_GL_FLOAT_MAT3 +#define android_opengl_GLES20_GL_FLOAT_MAT3 35675L +#undef android_opengl_GLES20_GL_FLOAT_MAT4 +#define android_opengl_GLES20_GL_FLOAT_MAT4 35676L +#undef android_opengl_GLES20_GL_SAMPLER_2D +#define android_opengl_GLES20_GL_SAMPLER_2D 35678L +#undef android_opengl_GLES20_GL_SAMPLER_CUBE +#define android_opengl_GLES20_GL_SAMPLER_CUBE 35680L +#undef android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_ENABLED +#define android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_ENABLED 34338L +#undef android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_SIZE +#define android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_SIZE 34339L +#undef android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_STRIDE +#define android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_STRIDE 34340L +#undef android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_TYPE +#define android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_TYPE 34341L +#undef android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_NORMALIZED +#define android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 34922L +#undef android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_POINTER +#define android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_POINTER 34373L +#undef android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING +#define android_opengl_GLES20_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 34975L +#undef android_opengl_GLES20_GL_IMPLEMENTATION_COLOR_READ_TYPE +#define android_opengl_GLES20_GL_IMPLEMENTATION_COLOR_READ_TYPE 35738L +#undef android_opengl_GLES20_GL_IMPLEMENTATION_COLOR_READ_FORMAT +#define android_opengl_GLES20_GL_IMPLEMENTATION_COLOR_READ_FORMAT 35739L +#undef android_opengl_GLES20_GL_COMPILE_STATUS +#define android_opengl_GLES20_GL_COMPILE_STATUS 35713L +#undef android_opengl_GLES20_GL_INFO_LOG_LENGTH +#define android_opengl_GLES20_GL_INFO_LOG_LENGTH 35716L +#undef android_opengl_GLES20_GL_SHADER_SOURCE_LENGTH +#define android_opengl_GLES20_GL_SHADER_SOURCE_LENGTH 35720L +#undef android_opengl_GLES20_GL_SHADER_COMPILER +#define android_opengl_GLES20_GL_SHADER_COMPILER 36346L +#undef android_opengl_GLES20_GL_SHADER_BINARY_FORMATS +#define android_opengl_GLES20_GL_SHADER_BINARY_FORMATS 36344L +#undef android_opengl_GLES20_GL_NUM_SHADER_BINARY_FORMATS +#define android_opengl_GLES20_GL_NUM_SHADER_BINARY_FORMATS 36345L +#undef android_opengl_GLES20_GL_LOW_FLOAT +#define android_opengl_GLES20_GL_LOW_FLOAT 36336L +#undef android_opengl_GLES20_GL_MEDIUM_FLOAT +#define android_opengl_GLES20_GL_MEDIUM_FLOAT 36337L +#undef android_opengl_GLES20_GL_HIGH_FLOAT +#define android_opengl_GLES20_GL_HIGH_FLOAT 36338L +#undef android_opengl_GLES20_GL_LOW_INT +#define android_opengl_GLES20_GL_LOW_INT 36339L +#undef android_opengl_GLES20_GL_MEDIUM_INT +#define android_opengl_GLES20_GL_MEDIUM_INT 36340L +#undef android_opengl_GLES20_GL_HIGH_INT +#define android_opengl_GLES20_GL_HIGH_INT 36341L +#undef android_opengl_GLES20_GL_FRAMEBUFFER +#define android_opengl_GLES20_GL_FRAMEBUFFER 36160L +#undef android_opengl_GLES20_GL_RENDERBUFFER +#define android_opengl_GLES20_GL_RENDERBUFFER 36161L +#undef android_opengl_GLES20_GL_RGBA4 +#define android_opengl_GLES20_GL_RGBA4 32854L +#undef android_opengl_GLES20_GL_RGB5_A1 +#define android_opengl_GLES20_GL_RGB5_A1 32855L +#undef android_opengl_GLES20_GL_RGB565 +#define android_opengl_GLES20_GL_RGB565 36194L +#undef android_opengl_GLES20_GL_DEPTH_COMPONENT16 +#define android_opengl_GLES20_GL_DEPTH_COMPONENT16 33189L +#undef android_opengl_GLES20_GL_STENCIL_INDEX +#define android_opengl_GLES20_GL_STENCIL_INDEX 6401L +#undef android_opengl_GLES20_GL_STENCIL_INDEX8 +#define android_opengl_GLES20_GL_STENCIL_INDEX8 36168L +#undef android_opengl_GLES20_GL_RENDERBUFFER_WIDTH +#define android_opengl_GLES20_GL_RENDERBUFFER_WIDTH 36162L +#undef android_opengl_GLES20_GL_RENDERBUFFER_HEIGHT +#define android_opengl_GLES20_GL_RENDERBUFFER_HEIGHT 36163L +#undef android_opengl_GLES20_GL_RENDERBUFFER_INTERNAL_FORMAT +#define android_opengl_GLES20_GL_RENDERBUFFER_INTERNAL_FORMAT 36164L +#undef android_opengl_GLES20_GL_RENDERBUFFER_RED_SIZE +#define android_opengl_GLES20_GL_RENDERBUFFER_RED_SIZE 36176L +#undef android_opengl_GLES20_GL_RENDERBUFFER_GREEN_SIZE +#define android_opengl_GLES20_GL_RENDERBUFFER_GREEN_SIZE 36177L +#undef android_opengl_GLES20_GL_RENDERBUFFER_BLUE_SIZE +#define android_opengl_GLES20_GL_RENDERBUFFER_BLUE_SIZE 36178L +#undef android_opengl_GLES20_GL_RENDERBUFFER_ALPHA_SIZE +#define android_opengl_GLES20_GL_RENDERBUFFER_ALPHA_SIZE 36179L +#undef android_opengl_GLES20_GL_RENDERBUFFER_DEPTH_SIZE +#define android_opengl_GLES20_GL_RENDERBUFFER_DEPTH_SIZE 36180L +#undef android_opengl_GLES20_GL_RENDERBUFFER_STENCIL_SIZE +#define android_opengl_GLES20_GL_RENDERBUFFER_STENCIL_SIZE 36181L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE +#define android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 36048L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME +#define android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 36049L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL +#define android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 36050L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE +#define android_opengl_GLES20_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 36051L +#undef android_opengl_GLES20_GL_COLOR_ATTACHMENT0 +#define android_opengl_GLES20_GL_COLOR_ATTACHMENT0 36064L +#undef android_opengl_GLES20_GL_DEPTH_ATTACHMENT +#define android_opengl_GLES20_GL_DEPTH_ATTACHMENT 36096L +#undef android_opengl_GLES20_GL_STENCIL_ATTACHMENT +#define android_opengl_GLES20_GL_STENCIL_ATTACHMENT 36128L +#undef android_opengl_GLES20_GL_NONE +#define android_opengl_GLES20_GL_NONE 0L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_COMPLETE +#define android_opengl_GLES20_GL_FRAMEBUFFER_COMPLETE 36053L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT +#define android_opengl_GLES20_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 36054L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT +#define android_opengl_GLES20_GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 36055L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS +#define android_opengl_GLES20_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 36057L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_UNSUPPORTED +#define android_opengl_GLES20_GL_FRAMEBUFFER_UNSUPPORTED 36061L +#undef android_opengl_GLES20_GL_FRAMEBUFFER_BINDING +#define android_opengl_GLES20_GL_FRAMEBUFFER_BINDING 36006L +#undef android_opengl_GLES20_GL_RENDERBUFFER_BINDING +#define android_opengl_GLES20_GL_RENDERBUFFER_BINDING 36007L +#undef android_opengl_GLES20_GL_MAX_RENDERBUFFER_SIZE +#define android_opengl_GLES20_GL_MAX_RENDERBUFFER_SIZE 34024L +#undef android_opengl_GLES20_GL_INVALID_FRAMEBUFFER_OPERATION +#define android_opengl_GLES20_GL_INVALID_FRAMEBUFFER_OPERATION 1286L +/* + * Class: android_opengl_GLES20 + * Method: glActiveTexture + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glActiveTexture + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glAttachShader + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glAttachShader + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBindAttribLocation + * Signature: (IILjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindAttribLocation + (JNIEnv *, jclass, jint, jint, jstring); + +/* + * Class: android_opengl_GLES20 + * Method: glBindBuffer + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindBuffer + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBindFramebuffer + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindFramebuffer + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBindRenderbuffer + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindRenderbuffer + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBindTexture + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBindTexture + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBlendColor + * Signature: (FFFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBlendColor + (JNIEnv *, jclass, jfloat, jfloat, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glBlendEquation + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBlendEquation + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBlendEquationSeparate + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBlendEquationSeparate + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBlendFunc + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBlendFunc + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBlendFuncSeparate + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBlendFuncSeparate + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBufferData + * Signature: (IILjava/nio/Buffer;I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBufferData + (JNIEnv *, jclass, jint, jint, jobject, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glBufferSubData + * Signature: (IIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glBufferSubData + (JNIEnv *, jclass, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glCheckFramebufferStatus + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glCheckFramebufferStatus + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glClear + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glClear + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glClearColor + * Signature: (FFFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glClearColor + (JNIEnv *, jclass, jfloat, jfloat, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glClearDepthf + * Signature: (F)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glClearDepthf + (JNIEnv *, jclass, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glClearStencil + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glClearStencil + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glColorMask + * Signature: (ZZZZ)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glColorMask + (JNIEnv *, jclass, jboolean, jboolean, jboolean, jboolean); + +/* + * Class: android_opengl_GLES20 + * Method: glCompileShader + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glCompileShader + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glCompressedTexImage2D + * Signature: (IIIIIIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glCompressedTexImage2D + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glCompressedTexSubImage2D + * Signature: (IIIIIIIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glCompressedTexSubImage2D + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glCopyTexImage2D + * Signature: (IIIIIIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glCopyTexImage2D + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glCopyTexSubImage2D + * Signature: (IIIIIIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glCopyTexSubImage2D + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glCreateProgram + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glCreateProgram + (JNIEnv *, jclass); + +/* + * Class: android_opengl_GLES20 + * Method: glCreateShader + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glCreateShader + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glCullFace + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glCullFace + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteBuffers + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteBuffers__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteBuffers + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteBuffers__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteFramebuffers + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteFramebuffers__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteFramebuffers + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteFramebuffers__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteProgram + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteProgram + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteRenderbuffers + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteRenderbuffers__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteRenderbuffers + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteShader + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteShader + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteTextures + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteTextures__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDeleteTextures + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDeleteTextures__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glDepthFunc + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDepthFunc + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDepthMask + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDepthMask + (JNIEnv *, jclass, jboolean); + +/* + * Class: android_opengl_GLES20 + * Method: glDepthRangef + * Signature: (FF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDepthRangef + (JNIEnv *, jclass, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glDetachShader + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDetachShader + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDisable + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDisable + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDisableVertexAttribArray + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDisableVertexAttribArray + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDrawArrays + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDrawArrays + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDrawElements + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDrawElements__IIII + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glDrawElements + * Signature: (IIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glDrawElements__IIILjava_nio_Buffer_2 + (JNIEnv *, jclass, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glEnable + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glEnable + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glEnableVertexAttribArray + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glEnableVertexAttribArray + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glFinish + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFinish + (JNIEnv *, jclass); + +/* + * Class: android_opengl_GLES20 + * Method: glFlush + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFlush + (JNIEnv *, jclass); + +/* + * Class: android_opengl_GLES20 + * Method: glFramebufferRenderbuffer + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFramebufferRenderbuffer + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glFramebufferTexture2D + * Signature: (IIIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFramebufferTexture2D + (JNIEnv *, jclass, jint, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glFrontFace + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFrontFace + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGenBuffers + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenBuffers__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGenBuffers + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenBuffers__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGenerateMipmap + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenerateMipmap + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGenFramebuffers + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenFramebuffers__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGenFramebuffers + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenFramebuffers__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGenRenderbuffers + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenRenderbuffers__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGenRenderbuffers + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenRenderbuffers__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGenTextures + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenTextures__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGenTextures + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGenTextures__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveAttrib + * Signature: (III[II[II[II[BI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetActiveAttrib__III_3II_3II_3II_3BI + (JNIEnv *, jclass, jint, jint, jint, jintArray, jint, jintArray, jint, jintArray, jint, jbyteArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveAttrib + * Signature: (IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B + (JNIEnv *, jclass, jint, jint, jint, jobject, jobject, jobject, jbyte); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveAttrib + * Signature: (II[II[II)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetActiveAttrib__II_3II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveAttrib + * Signature: (IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetActiveAttrib__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveUniform + * Signature: (III[II[II[II[BI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetActiveUniform__III_3II_3II_3II_3BI + (JNIEnv *, jclass, jint, jint, jint, jintArray, jint, jintArray, jint, jintArray, jint, jbyteArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveUniform + * Signature: (IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B + (JNIEnv *, jclass, jint, jint, jint, jobject, jobject, jobject, jbyte); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveUniform + * Signature: (II[II[II)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetActiveUniform__II_3II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetActiveUniform + * Signature: (IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetActiveUniform__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetAttachedShaders + * Signature: (II[II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetAttachedShaders__II_3II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetAttachedShaders + * Signature: (IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetAttribLocation + * Signature: (ILjava/lang/String;)I + */ +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glGetAttribLocation + (JNIEnv *, jclass, jint, jstring); + +/* + * Class: android_opengl_GLES20 + * Method: glGetBooleanv + * Signature: (I[ZI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetBooleanv__I_3ZI + (JNIEnv *, jclass, jint, jbooleanArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetBooleanv + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetBooleanv__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetBufferParameteriv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetBufferParameteriv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetBufferParameteriv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetError + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glGetError + (JNIEnv *, jclass); + +/* + * Class: android_opengl_GLES20 + * Method: glGetFloatv + * Signature: (I[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetFloatv__I_3FI + (JNIEnv *, jclass, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetFloatv + * Signature: (ILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetFloatv__ILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetFramebufferAttachmentParameteriv + * Signature: (III[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetFramebufferAttachmentParameteriv__III_3II + (JNIEnv *, jclass, jint, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetFramebufferAttachmentParameteriv + * Signature: (IIILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetIntegerv + * Signature: (I[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetIntegerv__I_3II + (JNIEnv *, jclass, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetIntegerv + * Signature: (ILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetIntegerv__ILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetProgramiv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetProgramiv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetProgramiv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetProgramiv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetProgramInfoLog + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetProgramInfoLog + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetRenderbufferParameteriv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetRenderbufferParameteriv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetRenderbufferParameteriv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderiv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetShaderiv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderiv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetShaderiv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderInfoLog + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetShaderInfoLog + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderPrecisionFormat + * Signature: (II[II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetShaderPrecisionFormat__II_3II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderPrecisionFormat + * Signature: (IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderSource + * Signature: (II[II[BI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetShaderSource__II_3II_3BI + (JNIEnv *, jclass, jint, jint, jintArray, jint, jbyteArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderSource + * Signature: (IILjava/nio/IntBuffer;B)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetShaderSource__IILjava_nio_IntBuffer_2B + (JNIEnv *, jclass, jint, jint, jobject, jbyte); + +/* + * Class: android_opengl_GLES20 + * Method: glGetShaderSource + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetShaderSource__I + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetString + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_android_opengl_GLES20_glGetString + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetTexParameterfv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetTexParameterfv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetTexParameterfv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetTexParameteriv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetTexParameteriv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetTexParameteriv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetTexParameteriv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetUniformfv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetUniformfv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetUniformfv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetUniformfv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetUniformiv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetUniformiv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetUniformiv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetUniformiv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetUniformLocation + * Signature: (ILjava/lang/String;)I + */ +JNIEXPORT jint JNICALL Java_android_opengl_GLES20_glGetUniformLocation + (JNIEnv *, jclass, jint, jstring); + +/* + * Class: android_opengl_GLES20 + * Method: glGetVertexAttribfv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetVertexAttribfv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetVertexAttribfv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glGetVertexAttribiv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetVertexAttribiv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glGetVertexAttribiv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetVertexAttribiv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glHint + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glHint + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glIsBuffer + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_android_opengl_GLES20_glIsBuffer + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glIsEnabled + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_android_opengl_GLES20_glIsEnabled + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glIsFramebuffer + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_android_opengl_GLES20_glIsFramebuffer + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glIsProgram + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_android_opengl_GLES20_glIsProgram + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glIsRenderbuffer + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_android_opengl_GLES20_glIsRenderbuffer + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glIsShader + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_android_opengl_GLES20_glIsShader + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glIsTexture + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_android_opengl_GLES20_glIsTexture + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glLineWidth + * Signature: (F)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glLineWidth + (JNIEnv *, jclass, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glLinkProgram + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glLinkProgram + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glPixelStorei + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glPixelStorei + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glPolygonOffset + * Signature: (FF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glPolygonOffset + (JNIEnv *, jclass, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glReadPixels + * Signature: (IIIIIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glReadPixels + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glReleaseShaderCompiler + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glReleaseShaderCompiler + (JNIEnv *, jclass); + +/* + * Class: android_opengl_GLES20 + * Method: glRenderbufferStorage + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glRenderbufferStorage + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glSampleCoverage + * Signature: (FZ)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glSampleCoverage + (JNIEnv *, jclass, jfloat, jboolean); + +/* + * Class: android_opengl_GLES20 + * Method: glScissor + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glScissor + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glShaderBinary + * Signature: (I[IIILjava/nio/Buffer;I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glShaderBinary__I_3IIILjava_nio_Buffer_2I + (JNIEnv *, jclass, jint, jintArray, jint, jint, jobject, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glShaderBinary + * Signature: (ILjava/nio/IntBuffer;ILjava/nio/Buffer;I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I + (JNIEnv *, jclass, jint, jobject, jint, jobject, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glShaderSource + * Signature: (ILjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glShaderSource + (JNIEnv *, jclass, jint, jstring); + +/* + * Class: android_opengl_GLES20 + * Method: glStencilFunc + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glStencilFunc + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glStencilFuncSeparate + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glStencilFuncSeparate + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glStencilMask + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glStencilMask + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glStencilMaskSeparate + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glStencilMaskSeparate + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glStencilOp + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glStencilOp + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glStencilOpSeparate + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glStencilOpSeparate + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glTexImage2D + * Signature: (IIIIIIIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexImage2D + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glTexParameterf + * Signature: (IIF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexParameterf + (JNIEnv *, jclass, jint, jint, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glTexParameterfv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexParameterfv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glTexParameterfv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexParameterfv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glTexParameteri + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexParameteri + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glTexParameteriv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexParameteriv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glTexParameteriv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexParameteriv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glTexSubImage2D + * Signature: (IIIIIIIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glTexSubImage2D + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform1f + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform1f + (JNIEnv *, jclass, jint, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform1fv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform1fv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform1fv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform1fv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform1i + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform1i + (JNIEnv *, jclass, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform1iv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform1iv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform1iv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform1iv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform2f + * Signature: (IFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform2f + (JNIEnv *, jclass, jint, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform2fv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform2fv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform2fv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform2fv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform2i + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform2i + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform2iv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform2iv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform2iv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform2iv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform3f + * Signature: (IFFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform3f + (JNIEnv *, jclass, jint, jfloat, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform3fv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform3fv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform3fv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform3fv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform3i + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform3i + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform3iv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform3iv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform3iv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform3iv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform4f + * Signature: (IFFFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform4f + (JNIEnv *, jclass, jint, jfloat, jfloat, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform4fv + * Signature: (II[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform4fv__II_3FI + (JNIEnv *, jclass, jint, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform4fv + * Signature: (IILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform4fv__IILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform4i + * Signature: (IIIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform4i + (JNIEnv *, jclass, jint, jint, jint, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform4iv + * Signature: (II[II)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform4iv__II_3II + (JNIEnv *, jclass, jint, jint, jintArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniform4iv + * Signature: (IILjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniform4iv__IILjava_nio_IntBuffer_2 + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniformMatrix2fv + * Signature: (IIZ[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniformMatrix2fv__IIZ_3FI + (JNIEnv *, jclass, jint, jint, jboolean, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniformMatrix2fv + * Signature: (IIZLjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jboolean, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniformMatrix3fv + * Signature: (IIZ[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniformMatrix3fv__IIZ_3FI + (JNIEnv *, jclass, jint, jint, jboolean, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniformMatrix3fv + * Signature: (IIZLjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jboolean, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUniformMatrix4fv + * Signature: (IIZ[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniformMatrix4fv__IIZ_3FI + (JNIEnv *, jclass, jint, jint, jboolean, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glUniformMatrix4fv + * Signature: (IIZLjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jint, jboolean, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glUseProgram + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glUseProgram + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glValidateProgram + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glValidateProgram + (JNIEnv *, jclass, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib1f + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib1f + (JNIEnv *, jclass, jint, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib1fv + * Signature: (I[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib1fv__I_3FI + (JNIEnv *, jclass, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib1fv + * Signature: (ILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib2f + * Signature: (IFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib2f + (JNIEnv *, jclass, jint, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib2fv + * Signature: (I[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib2fv__I_3FI + (JNIEnv *, jclass, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib2fv + * Signature: (ILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib3f + * Signature: (IFFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib3f + (JNIEnv *, jclass, jint, jfloat, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib3fv + * Signature: (I[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib3fv__I_3FI + (JNIEnv *, jclass, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib3fv + * Signature: (ILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib4f + * Signature: (IFFFF)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib4f + (JNIEnv *, jclass, jint, jfloat, jfloat, jfloat, jfloat); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib4fv + * Signature: (I[FI)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib4fv__I_3FI + (JNIEnv *, jclass, jint, jfloatArray, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttrib4fv + * Signature: (ILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttribPointer + * Signature: (IIIZII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttribPointer + (JNIEnv *, jclass, jint, jint, jint, jboolean, jint, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glVertexAttribPointerBounds + * Signature: (IIIZILjava/nio/Buffer;I)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glVertexAttribPointerBounds + (JNIEnv *, jclass, jint, jint, jint, jboolean, jint, jobject, jint); + +/* + * Class: android_opengl_GLES20 + * Method: glViewport + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glViewport + (JNIEnv *, jclass, jint, jint, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/api-impl/android/opengl/GLES20.java b/src/api-impl/android/opengl/GLES20.java new file mode 100644 index 00000000..a9a6fc3e --- /dev/null +++ b/src/api-impl/android/opengl/GLES20.java @@ -0,0 +1,1922 @@ +/* +** +** Copyright 2009, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +// This source file is automatically generated + +package android.opengl; + +/** OpenGL ES 2.0 + */ +public class GLES20 { + public static final int GL_ACTIVE_TEXTURE = 0x84E0; + public static final int GL_DEPTH_BUFFER_BIT = 0x00000100; + public static final int GL_STENCIL_BUFFER_BIT = 0x00000400; + public static final int GL_COLOR_BUFFER_BIT = 0x00004000; + public static final int GL_FALSE = 0; + public static final int GL_TRUE = 1; + public static final int GL_POINTS = 0x0000; + public static final int GL_LINES = 0x0001; + public static final int GL_LINE_LOOP = 0x0002; + public static final int GL_LINE_STRIP = 0x0003; + public static final int GL_TRIANGLES = 0x0004; + public static final int GL_TRIANGLE_STRIP = 0x0005; + public static final int GL_TRIANGLE_FAN = 0x0006; + public static final int GL_ZERO = 0; + public static final int GL_ONE = 1; + public static final int GL_SRC_COLOR = 0x0300; + public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301; + public static final int GL_SRC_ALPHA = 0x0302; + public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303; + public static final int GL_DST_ALPHA = 0x0304; + public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; + public static final int GL_DST_COLOR = 0x0306; + public static final int GL_ONE_MINUS_DST_COLOR = 0x0307; + public static final int GL_SRC_ALPHA_SATURATE = 0x0308; + public static final int GL_FUNC_ADD = 0x8006; + public static final int GL_BLEND_EQUATION = 0x8009; + public static final int GL_BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */ + public static final int GL_BLEND_EQUATION_ALPHA = 0x883D; + public static final int GL_FUNC_SUBTRACT = 0x800A; + public static final int GL_FUNC_REVERSE_SUBTRACT = 0x800B; + public static final int GL_BLEND_DST_RGB = 0x80C8; + public static final int GL_BLEND_SRC_RGB = 0x80C9; + public static final int GL_BLEND_DST_ALPHA = 0x80CA; + public static final int GL_BLEND_SRC_ALPHA = 0x80CB; + public static final int GL_CONSTANT_COLOR = 0x8001; + public static final int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; + public static final int GL_CONSTANT_ALPHA = 0x8003; + public static final int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; + public static final int GL_BLEND_COLOR = 0x8005; + public static final int GL_ARRAY_BUFFER = 0x8892; + public static final int GL_ELEMENT_ARRAY_BUFFER = 0x8893; + public static final int GL_ARRAY_BUFFER_BINDING = 0x8894; + public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; + public static final int GL_STREAM_DRAW = 0x88E0; + public static final int GL_STATIC_DRAW = 0x88E4; + public static final int GL_DYNAMIC_DRAW = 0x88E8; + public static final int GL_BUFFER_SIZE = 0x8764; + public static final int GL_BUFFER_USAGE = 0x8765; + public static final int GL_CURRENT_VERTEX_ATTRIB = 0x8626; + public static final int GL_FRONT = 0x0404; + public static final int GL_BACK = 0x0405; + public static final int GL_FRONT_AND_BACK = 0x0408; + public static final int GL_TEXTURE_2D = 0x0DE1; + public static final int GL_CULL_FACE = 0x0B44; + public static final int GL_BLEND = 0x0BE2; + public static final int GL_DITHER = 0x0BD0; + public static final int GL_STENCIL_TEST = 0x0B90; + public static final int GL_DEPTH_TEST = 0x0B71; + public static final int GL_SCISSOR_TEST = 0x0C11; + public static final int GL_POLYGON_OFFSET_FILL = 0x8037; + public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E; + public static final int GL_SAMPLE_COVERAGE = 0x80A0; + public static final int GL_NO_ERROR = 0; + public static final int GL_INVALID_ENUM = 0x0500; + public static final int GL_INVALID_VALUE = 0x0501; + public static final int GL_INVALID_OPERATION = 0x0502; + public static final int GL_OUT_OF_MEMORY = 0x0505; + public static final int GL_CW = 0x0900; + public static final int GL_CCW = 0x0901; + public static final int GL_LINE_WIDTH = 0x0B21; + public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; + public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; + public static final int GL_CULL_FACE_MODE = 0x0B45; + public static final int GL_FRONT_FACE = 0x0B46; + public static final int GL_DEPTH_RANGE = 0x0B70; + public static final int GL_DEPTH_WRITEMASK = 0x0B72; + public static final int GL_DEPTH_CLEAR_VALUE = 0x0B73; + public static final int GL_DEPTH_FUNC = 0x0B74; + public static final int GL_STENCIL_CLEAR_VALUE = 0x0B91; + public static final int GL_STENCIL_FUNC = 0x0B92; + public static final int GL_STENCIL_FAIL = 0x0B94; + public static final int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95; + public static final int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96; + public static final int GL_STENCIL_REF = 0x0B97; + public static final int GL_STENCIL_VALUE_MASK = 0x0B93; + public static final int GL_STENCIL_WRITEMASK = 0x0B98; + public static final int GL_STENCIL_BACK_FUNC = 0x8800; + public static final int GL_STENCIL_BACK_FAIL = 0x8801; + public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; + public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; + public static final int GL_STENCIL_BACK_REF = 0x8CA3; + public static final int GL_STENCIL_BACK_VALUE_MASK = 0x8CA4; + public static final int GL_STENCIL_BACK_WRITEMASK = 0x8CA5; + public static final int GL_VIEWPORT = 0x0BA2; + public static final int GL_SCISSOR_BOX = 0x0C10; + public static final int GL_COLOR_CLEAR_VALUE = 0x0C22; + public static final int GL_COLOR_WRITEMASK = 0x0C23; + public static final int GL_UNPACK_ALIGNMENT = 0x0CF5; + public static final int GL_PACK_ALIGNMENT = 0x0D05; + public static final int GL_MAX_TEXTURE_SIZE = 0x0D33; + public static final int GL_MAX_VIEWPORT_DIMS = 0x0D3A; + public static final int GL_SUBPIXEL_BITS = 0x0D50; + public static final int GL_RED_BITS = 0x0D52; + public static final int GL_GREEN_BITS = 0x0D53; + public static final int GL_BLUE_BITS = 0x0D54; + public static final int GL_ALPHA_BITS = 0x0D55; + public static final int GL_DEPTH_BITS = 0x0D56; + public static final int GL_STENCIL_BITS = 0x0D57; + public static final int GL_POLYGON_OFFSET_UNITS = 0x2A00; + public static final int GL_POLYGON_OFFSET_FACTOR = 0x8038; + public static final int GL_TEXTURE_BINDING_2D = 0x8069; + public static final int GL_SAMPLE_BUFFERS = 0x80A8; + public static final int GL_SAMPLES = 0x80A9; + public static final int GL_SAMPLE_COVERAGE_VALUE = 0x80AA; + public static final int GL_SAMPLE_COVERAGE_INVERT = 0x80AB; + public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; + public static final int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; + public static final int GL_DONT_CARE = 0x1100; + public static final int GL_FASTEST = 0x1101; + public static final int GL_NICEST = 0x1102; + public static final int GL_GENERATE_MIPMAP_HINT = 0x8192; + public static final int GL_BYTE = 0x1400; + public static final int GL_UNSIGNED_BYTE = 0x1401; + public static final int GL_SHORT = 0x1402; + public static final int GL_UNSIGNED_SHORT = 0x1403; + public static final int GL_INT = 0x1404; + public static final int GL_UNSIGNED_INT = 0x1405; + public static final int GL_FLOAT = 0x1406; + public static final int GL_FIXED = 0x140C; + public static final int GL_DEPTH_COMPONENT = 0x1902; + public static final int GL_ALPHA = 0x1906; + public static final int GL_RGB = 0x1907; + public static final int GL_RGBA = 0x1908; + public static final int GL_LUMINANCE = 0x1909; + public static final int GL_LUMINANCE_ALPHA = 0x190A; + public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; + public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; + public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + public static final int GL_FRAGMENT_SHADER = 0x8B30; + public static final int GL_VERTEX_SHADER = 0x8B31; + public static final int GL_MAX_VERTEX_ATTRIBS = 0x8869; + public static final int GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; + public static final int GL_MAX_VARYING_VECTORS = 0x8DFC; + public static final int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; + public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; + public static final int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872; + public static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; + public static final int GL_SHADER_TYPE = 0x8B4F; + public static final int GL_DELETE_STATUS = 0x8B80; + public static final int GL_LINK_STATUS = 0x8B82; + public static final int GL_VALIDATE_STATUS = 0x8B83; + public static final int GL_ATTACHED_SHADERS = 0x8B85; + public static final int GL_ACTIVE_UNIFORMS = 0x8B86; + public static final int GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87; + public static final int GL_ACTIVE_ATTRIBUTES = 0x8B89; + public static final int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A; + public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C; + public static final int GL_CURRENT_PROGRAM = 0x8B8D; + public static final int GL_NEVER = 0x0200; + public static final int GL_LESS = 0x0201; + public static final int GL_EQUAL = 0x0202; + public static final int GL_LEQUAL = 0x0203; + public static final int GL_GREATER = 0x0204; + public static final int GL_NOTEQUAL = 0x0205; + public static final int GL_GEQUAL = 0x0206; + public static final int GL_ALWAYS = 0x0207; + public static final int GL_KEEP = 0x1E00; + public static final int GL_REPLACE = 0x1E01; + public static final int GL_INCR = 0x1E02; + public static final int GL_DECR = 0x1E03; + public static final int GL_INVERT = 0x150A; + public static final int GL_INCR_WRAP = 0x8507; + public static final int GL_DECR_WRAP = 0x8508; + public static final int GL_VENDOR = 0x1F00; + public static final int GL_RENDERER = 0x1F01; + public static final int GL_VERSION = 0x1F02; + public static final int GL_EXTENSIONS = 0x1F03; + public static final int GL_NEAREST = 0x2600; + public static final int GL_LINEAR = 0x2601; + public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; + public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; + public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; + public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; + public static final int GL_TEXTURE_MAG_FILTER = 0x2800; + public static final int GL_TEXTURE_MIN_FILTER = 0x2801; + public static final int GL_TEXTURE_WRAP_S = 0x2802; + public static final int GL_TEXTURE_WRAP_T = 0x2803; + public static final int GL_TEXTURE = 0x1702; + public static final int GL_TEXTURE_CUBE_MAP = 0x8513; + public static final int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; + public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; + public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; + public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; + public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; + public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; + public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; + public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; + public static final int GL_TEXTURE0 = 0x84C0; + public static final int GL_TEXTURE1 = 0x84C1; + public static final int GL_TEXTURE2 = 0x84C2; + public static final int GL_TEXTURE3 = 0x84C3; + public static final int GL_TEXTURE4 = 0x84C4; + public static final int GL_TEXTURE5 = 0x84C5; + public static final int GL_TEXTURE6 = 0x84C6; + public static final int GL_TEXTURE7 = 0x84C7; + public static final int GL_TEXTURE8 = 0x84C8; + public static final int GL_TEXTURE9 = 0x84C9; + public static final int GL_TEXTURE10 = 0x84CA; + public static final int GL_TEXTURE11 = 0x84CB; + public static final int GL_TEXTURE12 = 0x84CC; + public static final int GL_TEXTURE13 = 0x84CD; + public static final int GL_TEXTURE14 = 0x84CE; + public static final int GL_TEXTURE15 = 0x84CF; + public static final int GL_TEXTURE16 = 0x84D0; + public static final int GL_TEXTURE17 = 0x84D1; + public static final int GL_TEXTURE18 = 0x84D2; + public static final int GL_TEXTURE19 = 0x84D3; + public static final int GL_TEXTURE20 = 0x84D4; + public static final int GL_TEXTURE21 = 0x84D5; + public static final int GL_TEXTURE22 = 0x84D6; + public static final int GL_TEXTURE23 = 0x84D7; + public static final int GL_TEXTURE24 = 0x84D8; + public static final int GL_TEXTURE25 = 0x84D9; + public static final int GL_TEXTURE26 = 0x84DA; + public static final int GL_TEXTURE27 = 0x84DB; + public static final int GL_TEXTURE28 = 0x84DC; + public static final int GL_TEXTURE29 = 0x84DD; + public static final int GL_TEXTURE30 = 0x84DE; + public static final int GL_TEXTURE31 = 0x84DF; + public static final int GL_REPEAT = 0x2901; + public static final int GL_CLAMP_TO_EDGE = 0x812F; + public static final int GL_MIRRORED_REPEAT = 0x8370; + public static final int GL_FLOAT_VEC2 = 0x8B50; + public static final int GL_FLOAT_VEC3 = 0x8B51; + public static final int GL_FLOAT_VEC4 = 0x8B52; + public static final int GL_INT_VEC2 = 0x8B53; + public static final int GL_INT_VEC3 = 0x8B54; + public static final int GL_INT_VEC4 = 0x8B55; + public static final int GL_BOOL = 0x8B56; + public static final int GL_BOOL_VEC2 = 0x8B57; + public static final int GL_BOOL_VEC3 = 0x8B58; + public static final int GL_BOOL_VEC4 = 0x8B59; + public static final int GL_FLOAT_MAT2 = 0x8B5A; + public static final int GL_FLOAT_MAT3 = 0x8B5B; + public static final int GL_FLOAT_MAT4 = 0x8B5C; + public static final int GL_SAMPLER_2D = 0x8B5E; + public static final int GL_SAMPLER_CUBE = 0x8B60; + public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; + public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; + public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; + public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; + public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; + public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; + public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; + public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A; + public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + public static final int GL_COMPILE_STATUS = 0x8B81; + public static final int GL_INFO_LOG_LENGTH = 0x8B84; + public static final int GL_SHADER_SOURCE_LENGTH = 0x8B88; + public static final int GL_SHADER_COMPILER = 0x8DFA; + public static final int GL_SHADER_BINARY_FORMATS = 0x8DF8; + public static final int GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9; + public static final int GL_LOW_FLOAT = 0x8DF0; + public static final int GL_MEDIUM_FLOAT = 0x8DF1; + public static final int GL_HIGH_FLOAT = 0x8DF2; + public static final int GL_LOW_INT = 0x8DF3; + public static final int GL_MEDIUM_INT = 0x8DF4; + public static final int GL_HIGH_INT = 0x8DF5; + public static final int GL_FRAMEBUFFER = 0x8D40; + public static final int GL_RENDERBUFFER = 0x8D41; + public static final int GL_RGBA4 = 0x8056; + public static final int GL_RGB5_A1 = 0x8057; + public static final int GL_RGB565 = 0x8D62; + public static final int GL_DEPTH_COMPONENT16 = 0x81A5; + // GL_STENCIL_INDEX does not appear in gl2.h or gl2ext.h, and there is no + // token with value 0x1901. + // + @Deprecated + public static final int GL_STENCIL_INDEX = 0x1901; + public static final int GL_STENCIL_INDEX8 = 0x8D48; + public static final int GL_RENDERBUFFER_WIDTH = 0x8D42; + public static final int GL_RENDERBUFFER_HEIGHT = 0x8D43; + public static final int GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; + public static final int GL_RENDERBUFFER_RED_SIZE = 0x8D50; + public static final int GL_RENDERBUFFER_GREEN_SIZE = 0x8D51; + public static final int GL_RENDERBUFFER_BLUE_SIZE = 0x8D52; + public static final int GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53; + public static final int GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54; + public static final int GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55; + public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; + public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; + public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; + public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; + public static final int GL_COLOR_ATTACHMENT0 = 0x8CE0; + public static final int GL_DEPTH_ATTACHMENT = 0x8D00; + public static final int GL_STENCIL_ATTACHMENT = 0x8D20; + public static final int GL_NONE = 0; + public static final int GL_FRAMEBUFFER_COMPLETE = 0x8CD5; + public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; + public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; + public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9; + public static final int GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD; + public static final int GL_FRAMEBUFFER_BINDING = 0x8CA6; + public static final int GL_RENDERBUFFER_BINDING = 0x8CA7; + public static final int GL_MAX_RENDERBUFFER_SIZE = 0x84E8; + public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; + + // C function void glActiveTexture ( GLenum texture ) + + public static native void glActiveTexture( + int texture + ); + + // C function void glAttachShader ( GLuint program, GLuint shader ) + + public static native void glAttachShader( + int program, + int shader + ); + + // C function void glBindAttribLocation ( GLuint program, GLuint index, const char *name ) + + public static native void glBindAttribLocation( + int program, + int index, + String name + ); + + // C function void glBindBuffer ( GLenum target, GLuint buffer ) + + public static native void glBindBuffer( + int target, + int buffer + ); + + // C function void glBindFramebuffer ( GLenum target, GLuint framebuffer ) + + public static native void glBindFramebuffer( + int target, + int framebuffer + ); + + // C function void glBindRenderbuffer ( GLenum target, GLuint renderbuffer ) + + public static native void glBindRenderbuffer( + int target, + int renderbuffer + ); + + // C function void glBindTexture ( GLenum target, GLuint texture ) + + public static native void glBindTexture( + int target, + int texture + ); + + // C function void glBlendColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) + + public static native void glBlendColor( + float red, + float green, + float blue, + float alpha + ); + + // C function void glBlendEquation ( GLenum mode ) + + public static native void glBlendEquation( + int mode + ); + + // C function void glBlendEquationSeparate ( GLenum modeRGB, GLenum modeAlpha ) + + public static native void glBlendEquationSeparate( + int modeRGB, + int modeAlpha + ); + + // C function void glBlendFunc ( GLenum sfactor, GLenum dfactor ) + + public static native void glBlendFunc( + int sfactor, + int dfactor + ); + + // C function void glBlendFuncSeparate ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) + + public static native void glBlendFuncSeparate( + int srcRGB, + int dstRGB, + int srcAlpha, + int dstAlpha + ); + + // C function void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) + + public static native void glBufferData( + int target, + int size, + java.nio.Buffer data, + int usage + ); + + // C function void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) + + public static native void glBufferSubData( + int target, + int offset, + int size, + java.nio.Buffer data + ); + + // C function GLenum glCheckFramebufferStatus ( GLenum target ) + + public static native int glCheckFramebufferStatus( + int target + ); + + // C function void glClear ( GLbitfield mask ) + + public static native void glClear( + int mask + ); + + // C function void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) + + public static native void glClearColor( + float red, + float green, + float blue, + float alpha + ); + + // C function void glClearDepthf ( GLclampf depth ) + + public static native void glClearDepthf( + float depth + ); + + // C function void glClearStencil ( GLint s ) + + public static native void glClearStencil( + int s + ); + + // C function void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) + + public static native void glColorMask( + boolean red, + boolean green, + boolean blue, + boolean alpha + ); + + // C function void glCompileShader ( GLuint shader ) + + public static native void glCompileShader( + int shader + ); + + // C function void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) + + public static native void glCompressedTexImage2D( + int target, + int level, + int internalformat, + int width, + int height, + int border, + int imageSize, + java.nio.Buffer data + ); + + // C function void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) + + public static native void glCompressedTexSubImage2D( + int target, + int level, + int xoffset, + int yoffset, + int width, + int height, + int format, + int imageSize, + java.nio.Buffer data + ); + + // C function void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) + + public static native void glCopyTexImage2D( + int target, + int level, + int internalformat, + int x, + int y, + int width, + int height, + int border + ); + + // C function void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) + + public static native void glCopyTexSubImage2D( + int target, + int level, + int xoffset, + int yoffset, + int x, + int y, + int width, + int height + ); + + // C function GLuint glCreateProgram ( void ) + + public static native int glCreateProgram( + ); + + // C function GLuint glCreateShader ( GLenum type ) + + public static native int glCreateShader( + int type + ); + + // C function void glCullFace ( GLenum mode ) + + public static native void glCullFace( + int mode + ); + + // C function void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) + + public static native void glDeleteBuffers( + int n, + int[] buffers, + int offset + ); + + // C function void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) + + public static native void glDeleteBuffers( + int n, + java.nio.IntBuffer buffers + ); + + // C function void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) + + public static native void glDeleteFramebuffers( + int n, + int[] framebuffers, + int offset + ); + + // C function void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) + + public static native void glDeleteFramebuffers( + int n, + java.nio.IntBuffer framebuffers + ); + + // C function void glDeleteProgram ( GLuint program ) + + public static native void glDeleteProgram( + int program + ); + + // C function void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) + + public static native void glDeleteRenderbuffers( + int n, + int[] renderbuffers, + int offset + ); + + // C function void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) + + public static native void glDeleteRenderbuffers( + int n, + java.nio.IntBuffer renderbuffers + ); + + // C function void glDeleteShader ( GLuint shader ) + + public static native void glDeleteShader( + int shader + ); + + // C function void glDeleteTextures ( GLsizei n, const GLuint *textures ) + + public static native void glDeleteTextures( + int n, + int[] textures, + int offset + ); + + // C function void glDeleteTextures ( GLsizei n, const GLuint *textures ) + + public static native void glDeleteTextures( + int n, + java.nio.IntBuffer textures + ); + + // C function void glDepthFunc ( GLenum func ) + + public static native void glDepthFunc( + int func + ); + + // C function void glDepthMask ( GLboolean flag ) + + public static native void glDepthMask( + boolean flag + ); + + // C function void glDepthRangef ( GLclampf zNear, GLclampf zFar ) + + public static native void glDepthRangef( + float zNear, + float zFar + ); + + // C function void glDetachShader ( GLuint program, GLuint shader ) + + public static native void glDetachShader( + int program, + int shader + ); + + // C function void glDisable ( GLenum cap ) + + public static native void glDisable( + int cap + ); + + // C function void glDisableVertexAttribArray ( GLuint index ) + + public static native void glDisableVertexAttribArray( + int index + ); + + // C function void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) + + public static native void glDrawArrays( + int mode, + int first, + int count + ); + + // C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) + + public static native void glDrawElements( + int mode, + int count, + int type, + int offset + ); + + // C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) + + public static native void glDrawElements( + int mode, + int count, + int type, + java.nio.Buffer indices + ); + + // C function void glEnable ( GLenum cap ) + + public static native void glEnable( + int cap + ); + + // C function void glEnableVertexAttribArray ( GLuint index ) + + public static native void glEnableVertexAttribArray( + int index + ); + + // C function void glFinish ( void ) + + public static native void glFinish( + ); + + // C function void glFlush ( void ) + + public static native void glFlush( + ); + + // C function void glFramebufferRenderbuffer ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) + + public static native void glFramebufferRenderbuffer( + int target, + int attachment, + int renderbuffertarget, + int renderbuffer + ); + + // C function void glFramebufferTexture2D ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) + + public static native void glFramebufferTexture2D( + int target, + int attachment, + int textarget, + int texture, + int level + ); + + // C function void glFrontFace ( GLenum mode ) + + public static native void glFrontFace( + int mode + ); + + // C function void glGenBuffers ( GLsizei n, GLuint *buffers ) + + public static native void glGenBuffers( + int n, + int[] buffers, + int offset + ); + + // C function void glGenBuffers ( GLsizei n, GLuint *buffers ) + + public static native void glGenBuffers( + int n, + java.nio.IntBuffer buffers + ); + + // C function void glGenerateMipmap ( GLenum target ) + + public static native void glGenerateMipmap( + int target + ); + + // C function void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) + + public static native void glGenFramebuffers( + int n, + int[] framebuffers, + int offset + ); + + // C function void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) + + public static native void glGenFramebuffers( + int n, + java.nio.IntBuffer framebuffers + ); + + // C function void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) + + public static native void glGenRenderbuffers( + int n, + int[] renderbuffers, + int offset + ); + + // C function void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) + + public static native void glGenRenderbuffers( + int n, + java.nio.IntBuffer renderbuffers + ); + + // C function void glGenTextures ( GLsizei n, GLuint *textures ) + + public static native void glGenTextures( + int n, + int[] textures, + int offset + ); + + // C function void glGenTextures ( GLsizei n, GLuint *textures ) + + public static native void glGenTextures( + int n, + java.nio.IntBuffer textures + ); + + // C function void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + public static native void glGetActiveAttrib( + int program, + int index, + int bufsize, + int[] length, + int lengthOffset, + int[] size, + int sizeOffset, + int[] type, + int typeOffset, + byte[] name, + int nameOffset + ); + + // C function void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + /** @hide Method is broken, but used to be public (b/6006380) */ + public static native void glGetActiveAttrib( + int program, + int index, + int bufsize, + java.nio.IntBuffer length, + java.nio.IntBuffer size, + java.nio.IntBuffer type, + byte name + ); + + // C function void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + public static native String glGetActiveAttrib( + int program, + int index, + int[] size, + int sizeOffset, + int[] type, + int typeOffset + ); + + // C function void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + public static native String glGetActiveAttrib( + int program, + int index, + java.nio.IntBuffer size, + java.nio.IntBuffer type + ); + // C function void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + public static native void glGetActiveUniform( + int program, + int index, + int bufsize, + int[] length, + int lengthOffset, + int[] size, + int sizeOffset, + int[] type, + int typeOffset, + byte[] name, + int nameOffset + ); + + // C function void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + /** @hide Method is broken, but used to be public (b/6006380) */ + public static native void glGetActiveUniform( + int program, + int index, + int bufsize, + java.nio.IntBuffer length, + java.nio.IntBuffer size, + java.nio.IntBuffer type, + byte name + ); + // C function void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + public static native String glGetActiveUniform( + int program, + int index, + int[] size, + int sizeOffset, + int[] type, + int typeOffset + ); + + // C function void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) + + public static native String glGetActiveUniform( + int program, + int index, + java.nio.IntBuffer size, + java.nio.IntBuffer type + ); + // C function void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) + + public static native void glGetAttachedShaders( + int program, + int maxcount, + int[] count, + int countOffset, + int[] shaders, + int shadersOffset + ); + + // C function void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) + + public static native void glGetAttachedShaders( + int program, + int maxcount, + java.nio.IntBuffer count, + java.nio.IntBuffer shaders + ); + + // C function GLint glGetAttribLocation ( GLuint program, const char *name ) + + public static native int glGetAttribLocation( + int program, + String name + ); + + // C function void glGetBooleanv ( GLenum pname, GLboolean *params ) + + public static native void glGetBooleanv( + int pname, + boolean[] params, + int offset + ); + + // C function void glGetBooleanv ( GLenum pname, GLboolean *params ) + + public static native void glGetBooleanv( + int pname, + java.nio.IntBuffer params + ); + + // C function void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) + + public static native void glGetBufferParameteriv( + int target, + int pname, + int[] params, + int offset + ); + + // C function void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) + + public static native void glGetBufferParameteriv( + int target, + int pname, + java.nio.IntBuffer params + ); + + // C function GLenum glGetError ( void ) + + public static native int glGetError( + ); + + // C function void glGetFloatv ( GLenum pname, GLfloat *params ) + + public static native void glGetFloatv( + int pname, + float[] params, + int offset + ); + + // C function void glGetFloatv ( GLenum pname, GLfloat *params ) + + public static native void glGetFloatv( + int pname, + java.nio.FloatBuffer params + ); + + // C function void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) + + public static native void glGetFramebufferAttachmentParameteriv( + int target, + int attachment, + int pname, + int[] params, + int offset + ); + + // C function void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) + + public static native void glGetFramebufferAttachmentParameteriv( + int target, + int attachment, + int pname, + java.nio.IntBuffer params + ); + + // C function void glGetIntegerv ( GLenum pname, GLint *params ) + + public static native void glGetIntegerv( + int pname, + int[] params, + int offset + ); + + // C function void glGetIntegerv ( GLenum pname, GLint *params ) + + public static native void glGetIntegerv( + int pname, + java.nio.IntBuffer params + ); + + // C function void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) + + public static native void glGetProgramiv( + int program, + int pname, + int[] params, + int offset + ); + + // C function void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) + + public static native void glGetProgramiv( + int program, + int pname, + java.nio.IntBuffer params + ); + + // C function void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei * length, + // GLchar * infoLog); + + public static native String glGetProgramInfoLog( + int program + ); + // C function void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) + + public static native void glGetRenderbufferParameteriv( + int target, + int pname, + int[] params, + int offset + ); + + // C function void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) + + public static native void glGetRenderbufferParameteriv( + int target, + int pname, + java.nio.IntBuffer params + ); + + // C function void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) + + public static native void glGetShaderiv( + int shader, + int pname, + int[] params, + int offset + ); + + // C function void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) + + public static native void glGetShaderiv( + int shader, + int pname, + java.nio.IntBuffer params + ); + + // C function void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei * length, + // GLchar * infoLog); + + public static native String glGetShaderInfoLog( + int shader + ); + // C function void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) + + public static native void glGetShaderPrecisionFormat( + int shadertype, + int precisiontype, + int[] range, + int rangeOffset, + int[] precision, + int precisionOffset + ); + + // C function void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) + + public static native void glGetShaderPrecisionFormat( + int shadertype, + int precisiontype, + java.nio.IntBuffer range, + java.nio.IntBuffer precision + ); + + // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) + + public static native void glGetShaderSource( + int shader, + int bufsize, + int[] length, + int lengthOffset, + byte[] source, + int sourceOffset + ); + + // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) + + /** @hide Method is broken, but used to be public (b/6006380) */ + public static native void glGetShaderSource( + int shader, + int bufsize, + java.nio.IntBuffer length, + byte source + ); + + // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) + + public static native String glGetShaderSource( + int shader + ); + // C function const GLubyte * glGetString ( GLenum name ) + + public static native String glGetString( + int name + ); + // C function void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) + + public static native void glGetTexParameterfv( + int target, + int pname, + float[] params, + int offset + ); + + // C function void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) + + public static native void glGetTexParameterfv( + int target, + int pname, + java.nio.FloatBuffer params + ); + + // C function void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) + + public static native void glGetTexParameteriv( + int target, + int pname, + int[] params, + int offset + ); + + // C function void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) + + public static native void glGetTexParameteriv( + int target, + int pname, + java.nio.IntBuffer params + ); + + // C function void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) + + public static native void glGetUniformfv( + int program, + int location, + float[] params, + int offset + ); + + // C function void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) + + public static native void glGetUniformfv( + int program, + int location, + java.nio.FloatBuffer params + ); + + // C function void glGetUniformiv ( GLuint program, GLint location, GLint *params ) + + public static native void glGetUniformiv( + int program, + int location, + int[] params, + int offset + ); + + // C function void glGetUniformiv ( GLuint program, GLint location, GLint *params ) + + public static native void glGetUniformiv( + int program, + int location, + java.nio.IntBuffer params + ); + + // C function GLint glGetUniformLocation ( GLuint program, const char *name ) + + public static native int glGetUniformLocation( + int program, + String name + ); + + // C function void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) + + public static native void glGetVertexAttribfv( + int index, + int pname, + float[] params, + int offset + ); + + // C function void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) + + public static native void glGetVertexAttribfv( + int index, + int pname, + java.nio.FloatBuffer params + ); + + // C function void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) + + public static native void glGetVertexAttribiv( + int index, + int pname, + int[] params, + int offset + ); + + // C function void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) + + public static native void glGetVertexAttribiv( + int index, + int pname, + java.nio.IntBuffer params + ); + + // C function void glHint ( GLenum target, GLenum mode ) + + public static native void glHint( + int target, + int mode + ); + + // C function GLboolean glIsBuffer ( GLuint buffer ) + + public static native boolean glIsBuffer( + int buffer + ); + + // C function GLboolean glIsEnabled ( GLenum cap ) + + public static native boolean glIsEnabled( + int cap + ); + + // C function GLboolean glIsFramebuffer ( GLuint framebuffer ) + + public static native boolean glIsFramebuffer( + int framebuffer + ); + + // C function GLboolean glIsProgram ( GLuint program ) + + public static native boolean glIsProgram( + int program + ); + + // C function GLboolean glIsRenderbuffer ( GLuint renderbuffer ) + + public static native boolean glIsRenderbuffer( + int renderbuffer + ); + + // C function GLboolean glIsShader ( GLuint shader ) + + public static native boolean glIsShader( + int shader + ); + + // C function GLboolean glIsTexture ( GLuint texture ) + + public static native boolean glIsTexture( + int texture + ); + + // C function void glLineWidth ( GLfloat width ) + + public static native void glLineWidth( + float width + ); + + // C function void glLinkProgram ( GLuint program ) + + public static native void glLinkProgram( + int program + ); + + // C function void glPixelStorei ( GLenum pname, GLint param ) + + public static native void glPixelStorei( + int pname, + int param + ); + + // C function void glPolygonOffset ( GLfloat factor, GLfloat units ) + + public static native void glPolygonOffset( + float factor, + float units + ); + + // C function void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) + + public static native void glReadPixels( + int x, + int y, + int width, + int height, + int format, + int type, + java.nio.Buffer pixels + ); + + // C function void glReleaseShaderCompiler ( void ) + + public static native void glReleaseShaderCompiler( + ); + + // C function void glRenderbufferStorage ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) + + public static native void glRenderbufferStorage( + int target, + int internalformat, + int width, + int height + ); + + // C function void glSampleCoverage ( GLclampf value, GLboolean invert ) + + public static native void glSampleCoverage( + float value, + boolean invert + ); + + // C function void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) + + public static native void glScissor( + int x, + int y, + int width, + int height + ); + + // C function void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) + + public static native void glShaderBinary( + int n, + int[] shaders, + int offset, + int binaryformat, + java.nio.Buffer binary, + int length + ); + + // C function void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) + + public static native void glShaderBinary( + int n, + java.nio.IntBuffer shaders, + int binaryformat, + java.nio.Buffer binary, + int length + ); + + // C function void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint* length ) + + public static native void glShaderSource( + int shader, + String string + ); + // C function void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) + + public static native void glStencilFunc( + int func, + int ref, + int mask + ); + + // C function void glStencilFuncSeparate ( GLenum face, GLenum func, GLint ref, GLuint mask ) + + public static native void glStencilFuncSeparate( + int face, + int func, + int ref, + int mask + ); + + // C function void glStencilMask ( GLuint mask ) + + public static native void glStencilMask( + int mask + ); + + // C function void glStencilMaskSeparate ( GLenum face, GLuint mask ) + + public static native void glStencilMaskSeparate( + int face, + int mask + ); + + // C function void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) + + public static native void glStencilOp( + int fail, + int zfail, + int zpass + ); + + // C function void glStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass ) + + public static native void glStencilOpSeparate( + int face, + int fail, + int zfail, + int zpass + ); + + // C function void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) + + public static native void glTexImage2D( + int target, + int level, + int internalformat, + int width, + int height, + int border, + int format, + int type, + java.nio.Buffer pixels + ); + + // C function void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) + + public static native void glTexParameterf( + int target, + int pname, + float param + ); + + // C function void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) + + public static native void glTexParameterfv( + int target, + int pname, + float[] params, + int offset + ); + + // C function void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) + + public static native void glTexParameterfv( + int target, + int pname, + java.nio.FloatBuffer params + ); + + // C function void glTexParameteri ( GLenum target, GLenum pname, GLint param ) + + public static native void glTexParameteri( + int target, + int pname, + int param + ); + + // C function void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) + + public static native void glTexParameteriv( + int target, + int pname, + int[] params, + int offset + ); + + // C function void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) + + public static native void glTexParameteriv( + int target, + int pname, + java.nio.IntBuffer params + ); + + // C function void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) + + public static native void glTexSubImage2D( + int target, + int level, + int xoffset, + int yoffset, + int width, + int height, + int format, + int type, + java.nio.Buffer pixels + ); + + // C function void glUniform1f ( GLint location, GLfloat x ) + + public static native void glUniform1f( + int location, + float x + ); + + // C function void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform1fv( + int location, + int count, + float[] v, + int offset + ); + + // C function void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform1fv( + int location, + int count, + java.nio.FloatBuffer v + ); + + // C function void glUniform1i ( GLint location, GLint x ) + + public static native void glUniform1i( + int location, + int x + ); + + // C function void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform1iv( + int location, + int count, + int[] v, + int offset + ); + + // C function void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform1iv( + int location, + int count, + java.nio.IntBuffer v + ); + + // C function void glUniform2f ( GLint location, GLfloat x, GLfloat y ) + + public static native void glUniform2f( + int location, + float x, + float y + ); + + // C function void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform2fv( + int location, + int count, + float[] v, + int offset + ); + + // C function void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform2fv( + int location, + int count, + java.nio.FloatBuffer v + ); + + // C function void glUniform2i ( GLint location, GLint x, GLint y ) + + public static native void glUniform2i( + int location, + int x, + int y + ); + + // C function void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform2iv( + int location, + int count, + int[] v, + int offset + ); + + // C function void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform2iv( + int location, + int count, + java.nio.IntBuffer v + ); + + // C function void glUniform3f ( GLint location, GLfloat x, GLfloat y, GLfloat z ) + + public static native void glUniform3f( + int location, + float x, + float y, + float z + ); + + // C function void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform3fv( + int location, + int count, + float[] v, + int offset + ); + + // C function void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform3fv( + int location, + int count, + java.nio.FloatBuffer v + ); + + // C function void glUniform3i ( GLint location, GLint x, GLint y, GLint z ) + + public static native void glUniform3i( + int location, + int x, + int y, + int z + ); + + // C function void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform3iv( + int location, + int count, + int[] v, + int offset + ); + + // C function void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform3iv( + int location, + int count, + java.nio.IntBuffer v + ); + + // C function void glUniform4f ( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) + + public static native void glUniform4f( + int location, + float x, + float y, + float z, + float w + ); + + // C function void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform4fv( + int location, + int count, + float[] v, + int offset + ); + + // C function void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) + + public static native void glUniform4fv( + int location, + int count, + java.nio.FloatBuffer v + ); + + // C function void glUniform4i ( GLint location, GLint x, GLint y, GLint z, GLint w ) + + public static native void glUniform4i( + int location, + int x, + int y, + int z, + int w + ); + + // C function void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform4iv( + int location, + int count, + int[] v, + int offset + ); + + // C function void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) + + public static native void glUniform4iv( + int location, + int count, + java.nio.IntBuffer v + ); + + // C function void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) + + public static native void glUniformMatrix2fv( + int location, + int count, + boolean transpose, + float[] value, + int offset + ); + + // C function void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) + + public static native void glUniformMatrix2fv( + int location, + int count, + boolean transpose, + java.nio.FloatBuffer value + ); + + // C function void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) + + public static native void glUniformMatrix3fv( + int location, + int count, + boolean transpose, + float[] value, + int offset + ); + + // C function void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) + + public static native void glUniformMatrix3fv( + int location, + int count, + boolean transpose, + java.nio.FloatBuffer value + ); + + // C function void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) + + public static native void glUniformMatrix4fv( + int location, + int count, + boolean transpose, + float[] value, + int offset + ); + + // C function void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) + + public static native void glUniformMatrix4fv( + int location, + int count, + boolean transpose, + java.nio.FloatBuffer value + ); + + // C function void glUseProgram ( GLuint program ) + + public static native void glUseProgram( + int program + ); + + // C function void glValidateProgram ( GLuint program ) + + public static native void glValidateProgram( + int program + ); + + // C function void glVertexAttrib1f ( GLuint indx, GLfloat x ) + + public static native void glVertexAttrib1f( + int indx, + float x + ); + + // C function void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib1fv( + int indx, + float[] values, + int offset + ); + + // C function void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib1fv( + int indx, + java.nio.FloatBuffer values + ); + + // C function void glVertexAttrib2f ( GLuint indx, GLfloat x, GLfloat y ) + + public static native void glVertexAttrib2f( + int indx, + float x, + float y + ); + + // C function void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib2fv( + int indx, + float[] values, + int offset + ); + + // C function void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib2fv( + int indx, + java.nio.FloatBuffer values + ); + + // C function void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z ) + + public static native void glVertexAttrib3f( + int indx, + float x, + float y, + float z + ); + + // C function void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib3fv( + int indx, + float[] values, + int offset + ); + + // C function void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib3fv( + int indx, + java.nio.FloatBuffer values + ); + + // C function void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) + + public static native void glVertexAttrib4f( + int indx, + float x, + float y, + float z, + float w + ); + + // C function void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib4fv( + int indx, + float[] values, + int offset + ); + + // C function void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) + + public static native void glVertexAttrib4fv( + int indx, + java.nio.FloatBuffer values + ); + + // C function void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset ) + + public static native void glVertexAttribPointer( + int indx, + int size, + int type, + boolean normalized, + int stride, + int offset + ); + + // C function void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) + + private static native void glVertexAttribPointerBounds( + int indx, + int size, + int type, + boolean normalized, + int stride, + java.nio.Buffer ptr, + int remaining + ); + + public static void glVertexAttribPointer( + int indx, + int size, + int type, + boolean normalized, + int stride, + java.nio.Buffer ptr + ) { + glVertexAttribPointerBounds( + indx, + size, + type, + normalized, + stride, + ptr, + ptr.remaining() + ); + } + + // C function void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) + + public static native void glViewport( + int x, + int y, + int width, + int height + ); + +} diff --git a/src/api-impl/android/opengl/Matrix.java b/src/api-impl/android/opengl/Matrix.java new file mode 100644 index 00000000..14a58b5a --- /dev/null +++ b/src/api-impl/android/opengl/Matrix.java @@ -0,0 +1,983 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.opengl; + +/** + * Matrix math utilities. These methods operate on OpenGL ES format + * matrices and vectors stored in float arrays. + *

+ * Matrices are 4 x 4 column-vector matrices stored in column-major + * order: + *

+ *  m[offset +  0] m[offset +  4] m[offset +  8] m[offset + 12]
+ *  m[offset +  1] m[offset +  5] m[offset +  9] m[offset + 13]
+ *  m[offset +  2] m[offset +  6] m[offset + 10] m[offset + 14]
+ *  m[offset +  3] m[offset +  7] m[offset + 11] m[offset + 15]
+ * + * Vectors are 4 x 1 column vectors stored in order: + *
+ * v[offset + 0]
+ * v[offset + 1]
+ * v[offset + 2]
+ * v[offset + 3]
+ */ +public class Matrix { + + /** Temporary memory for operations that need temporary matrix data. */ + private static final ThreadLocal ThreadTmp = new ThreadLocal() { + @Override protected float[] initialValue() { + return new float[32]; + } + }; + + /** + * @deprecated All methods are static, do not instantiate this class. + */ + @Deprecated + public Matrix() {} + + private static boolean overlap( + float[] a, int aStart, int aLength, float[] b, int bStart, int bLength) { + if (a != b) { + return false; + } + + if (aStart == bStart) { + return true; + } + + int aEnd = aStart + aLength; + int bEnd = bStart + bLength; + + if (aEnd == bEnd) { + return true; + } + + if (aStart < bStart && bStart < aEnd) { + return true; + } + if (aStart < bEnd && bEnd < aEnd) { + return true; + } + + if (bStart < aStart && aStart < bEnd) { + return true; + } + if (bStart < aEnd && aEnd < bEnd) { + return true; + } + + return false; + } + + /** + * Multiplies two 4x4 matrices together and stores the result in a third 4x4 + * matrix. In matrix notation: result = lhs x rhs. Due to the way + * matrix multiplication works, the result matrix will have the same + * effect as first multiplying by the rhs matrix, then multiplying by + * the lhs matrix. This is the opposite of what you might expect. + *

+ * The same float array may be passed for result, lhs, and/or rhs. This + * operation is expected to do the correct thing if the result elements + * overlap with either of the lhs or rhs elements. + * + * @param result The float array that holds the result. + * @param resultOffset The offset into the result array where the result is + * stored. + * @param lhs The float array that holds the left-hand-side matrix. + * @param lhsOffset The offset into the lhs array where the lhs is stored + * @param rhs The float array that holds the right-hand-side matrix. + * @param rhsOffset The offset into the rhs array where the rhs is stored. + * + * @throws IllegalArgumentException under any of the following conditions: + * result, lhs, or rhs are null; + * resultOffset + 16 > result.length + * or lhsOffset + 16 > lhs.length + * or rhsOffset + 16 > rhs.length; + * resultOffset < 0 or lhsOffset < 0 or rhsOffset < 0 + */ + public static void multiplyMM(float[] result, int resultOffset, + float[] lhs, int lhsOffset, float[] rhs, int rhsOffset) { + // error checking + if (result == null) { + throw new IllegalArgumentException("result == null"); + } + if (lhs == null) { + throw new IllegalArgumentException("lhs == null"); + } + if (rhs == null) { + throw new IllegalArgumentException("rhs == null"); + } + if (resultOffset < 0) { + throw new IllegalArgumentException("resultOffset < 0"); + } + if (lhsOffset < 0) { + throw new IllegalArgumentException("lhsOffset < 0"); + } + if (rhsOffset < 0) { + throw new IllegalArgumentException("rhsOffset < 0"); + } + if (result.length < resultOffset + 16) { + throw new IllegalArgumentException("result.length < resultOffset + 16"); + } + if (lhs.length < lhsOffset + 16) { + throw new IllegalArgumentException("lhs.length < lhsOffset + 16"); + } + if (rhs.length < rhsOffset + 16) { + throw new IllegalArgumentException("rhs.length < rhsOffset + 16"); + } + + // Check for overlap between rhs and result or lhs and result + if ( overlap(result, resultOffset, 16, lhs, lhsOffset, 16) + || overlap(result, resultOffset, 16, rhs, rhsOffset, 16) ) { + float[] tmp = ThreadTmp.get(); + for (int i=0; i<4; i++) { + final float rhs_i0 = rhs[ 4*i + 0 + rhsOffset ]; + float ri0 = lhs[ 0 + lhsOffset ] * rhs_i0; + float ri1 = lhs[ 1 + lhsOffset ] * rhs_i0; + float ri2 = lhs[ 2 + lhsOffset ] * rhs_i0; + float ri3 = lhs[ 3 + lhsOffset ] * rhs_i0; + for (int j=1; j<4; j++) { + final float rhs_ij = rhs[ 4*i + j + rhsOffset]; + ri0 += lhs[ 4*j + 0 + lhsOffset ] * rhs_ij; + ri1 += lhs[ 4*j + 1 + lhsOffset ] * rhs_ij; + ri2 += lhs[ 4*j + 2 + lhsOffset ] * rhs_ij; + ri3 += lhs[ 4*j + 3 + lhsOffset ] * rhs_ij; + } + tmp[ 4*i + 0 ] = ri0; + tmp[ 4*i + 1 ] = ri1; + tmp[ 4*i + 2 ] = ri2; + tmp[ 4*i + 3 ] = ri3; + } + + // copy from tmp to result + for (int i=0; i < 16; i++) { + result[ i + resultOffset ] = tmp[ i ]; + } + + } else { + for (int i=0; i<4; i++) { + final float rhs_i0 = rhs[ 4*i + 0 + rhsOffset ]; + float ri0 = lhs[ 0 + lhsOffset ] * rhs_i0; + float ri1 = lhs[ 1 + lhsOffset ] * rhs_i0; + float ri2 = lhs[ 2 + lhsOffset ] * rhs_i0; + float ri3 = lhs[ 3 + lhsOffset ] * rhs_i0; + for (int j=1; j<4; j++) { + final float rhs_ij = rhs[ 4*i + j + rhsOffset]; + ri0 += lhs[ 4*j + 0 + lhsOffset ] * rhs_ij; + ri1 += lhs[ 4*j + 1 + lhsOffset ] * rhs_ij; + ri2 += lhs[ 4*j + 2 + lhsOffset ] * rhs_ij; + ri3 += lhs[ 4*j + 3 + lhsOffset ] * rhs_ij; + } + result[ 4*i + 0 + resultOffset ] = ri0; + result[ 4*i + 1 + resultOffset ] = ri1; + result[ 4*i + 2 + resultOffset ] = ri2; + result[ 4*i + 3 + resultOffset ] = ri3; + } + } + } + + /** + * Multiplies a 4 element vector by a 4x4 matrix and stores the result in a + * 4-element column vector. In matrix notation: result = lhs x rhs + *

+ * The same float array may be passed for resultVec, lhsMat, and/or rhsVec. + * This operation is expected to do the correct thing if the result elements + * overlap with either of the lhs or rhs elements. + * + * @param resultVec The float array that holds the result vector. + * @param resultVecOffset The offset into the result array where the result + * vector is stored. + * @param lhsMat The float array that holds the left-hand-side matrix. + * @param lhsMatOffset The offset into the lhs array where the lhs is stored + * @param rhsVec The float array that holds the right-hand-side vector. + * @param rhsVecOffset The offset into the rhs vector where the rhs vector + * is stored. + * + * @throws IllegalArgumentException under any of the following conditions: + * resultVec, lhsMat, or rhsVec are null; + * resultVecOffset + 4 > resultVec.length + * or lhsMatOffset + 16 > lhsMat.length + * or rhsVecOffset + 4 > rhsVec.length; + * resultVecOffset < 0 or lhsMatOffset < 0 or rhsVecOffset < 0 + */ + public static void multiplyMV(float[] resultVec, + int resultVecOffset, float[] lhsMat, int lhsMatOffset, + float[] rhsVec, int rhsVecOffset) { + // error checking + if (resultVec == null) { + throw new IllegalArgumentException("resultVec == null"); + } + if (lhsMat == null) { + throw new IllegalArgumentException("lhsMat == null"); + } + if (rhsVec == null) { + throw new IllegalArgumentException("rhsVec == null"); + } + if (resultVecOffset < 0) { + throw new IllegalArgumentException("resultVecOffset < 0"); + } + if (lhsMatOffset < 0) { + throw new IllegalArgumentException("lhsMatOffset < 0"); + } + if (rhsVecOffset < 0) { + throw new IllegalArgumentException("rhsVecOffset < 0"); + } + if (resultVec.length < resultVecOffset + 4) { + throw new IllegalArgumentException("resultVec.length < resultVecOffset + 4"); + } + if (lhsMat.length < lhsMatOffset + 16) { + throw new IllegalArgumentException("lhsMat.length < lhsMatOffset + 16"); + } + if (rhsVec.length < rhsVecOffset + 4) { + throw new IllegalArgumentException("rhsVec.length < rhsVecOffset + 4"); + } + + float tmp0 = lhsMat[0 + 4 * 0 + lhsMatOffset] * rhsVec[0 + rhsVecOffset] + + lhsMat[0 + 4 * 1 + lhsMatOffset] * rhsVec[1 + rhsVecOffset] + + lhsMat[0 + 4 * 2 + lhsMatOffset] * rhsVec[2 + rhsVecOffset] + + lhsMat[0 + 4 * 3 + lhsMatOffset] * rhsVec[3 + rhsVecOffset]; + float tmp1 = lhsMat[1 + 4 * 0 + lhsMatOffset] * rhsVec[0 + rhsVecOffset] + + lhsMat[1 + 4 * 1 + lhsMatOffset] * rhsVec[1 + rhsVecOffset] + + lhsMat[1 + 4 * 2 + lhsMatOffset] * rhsVec[2 + rhsVecOffset] + + lhsMat[1 + 4 * 3 + lhsMatOffset] * rhsVec[3 + rhsVecOffset]; + float tmp2 = lhsMat[2 + 4 * 0 + lhsMatOffset] * rhsVec[0 + rhsVecOffset] + + lhsMat[2 + 4 * 1 + lhsMatOffset] * rhsVec[1 + rhsVecOffset] + + lhsMat[2 + 4 * 2 + lhsMatOffset] * rhsVec[2 + rhsVecOffset] + + lhsMat[2 + 4 * 3 + lhsMatOffset] * rhsVec[3 + rhsVecOffset]; + float tmp3 = lhsMat[3 + 4 * 0 + lhsMatOffset] * rhsVec[0 + rhsVecOffset] + + lhsMat[3 + 4 * 1 + lhsMatOffset] * rhsVec[1 + rhsVecOffset] + + lhsMat[3 + 4 * 2 + lhsMatOffset] * rhsVec[2 + rhsVecOffset] + + lhsMat[3 + 4 * 3 + lhsMatOffset] * rhsVec[3 + rhsVecOffset]; + + resultVec[ 0 + resultVecOffset ] = tmp0; + resultVec[ 1 + resultVecOffset ] = tmp1; + resultVec[ 2 + resultVecOffset ] = tmp2; + resultVec[ 3 + resultVecOffset ] = tmp3; + } + + /** + * Transposes a 4 x 4 matrix. + *

+ * mTrans and m must not overlap. + * + * @param mTrans the array that holds the output transposed matrix + * @param mTransOffset an offset into mTrans where the transposed matrix is + * stored. + * @param m the input array + * @param mOffset an offset into m where the input matrix is stored. + */ + public static void transposeM(float[] mTrans, int mTransOffset, float[] m, + int mOffset) { + for (int i = 0; i < 4; i++) { + int mBase = i * 4 + mOffset; + mTrans[i + mTransOffset] = m[mBase]; + mTrans[i + 4 + mTransOffset] = m[mBase + 1]; + mTrans[i + 8 + mTransOffset] = m[mBase + 2]; + mTrans[i + 12 + mTransOffset] = m[mBase + 3]; + } + } + + /** + * Inverts a 4 x 4 matrix. + *

+ * mInv and m must not overlap. + * + * @param mInv the array that holds the output inverted matrix + * @param mInvOffset an offset into mInv where the inverted matrix is + * stored. + * @param m the input array + * @param mOffset an offset into m where the input matrix is stored. + * @return true if the matrix could be inverted, false if it could not. + */ + public static boolean invertM(float[] mInv, int mInvOffset, float[] m, + int mOffset) { + // Invert a 4 x 4 matrix using Cramer's Rule + + // transpose matrix + final float src0 = m[mOffset + 0]; + final float src4 = m[mOffset + 1]; + final float src8 = m[mOffset + 2]; + final float src12 = m[mOffset + 3]; + + final float src1 = m[mOffset + 4]; + final float src5 = m[mOffset + 5]; + final float src9 = m[mOffset + 6]; + final float src13 = m[mOffset + 7]; + + final float src2 = m[mOffset + 8]; + final float src6 = m[mOffset + 9]; + final float src10 = m[mOffset + 10]; + final float src14 = m[mOffset + 11]; + + final float src3 = m[mOffset + 12]; + final float src7 = m[mOffset + 13]; + final float src11 = m[mOffset + 14]; + final float src15 = m[mOffset + 15]; + + // calculate pairs for first 8 elements (cofactors) + final float atmp0 = src10 * src15; + final float atmp1 = src11 * src14; + final float atmp2 = src9 * src15; + final float atmp3 = src11 * src13; + final float atmp4 = src9 * src14; + final float atmp5 = src10 * src13; + final float atmp6 = src8 * src15; + final float atmp7 = src11 * src12; + final float atmp8 = src8 * src14; + final float atmp9 = src10 * src12; + final float atmp10 = src8 * src13; + final float atmp11 = src9 * src12; + + // calculate first 8 elements (cofactors) + final float dst0 = (atmp0 * src5 + atmp3 * src6 + atmp4 * src7) + - (atmp1 * src5 + atmp2 * src6 + atmp5 * src7); + final float dst1 = (atmp1 * src4 + atmp6 * src6 + atmp9 * src7) + - (atmp0 * src4 + atmp7 * src6 + atmp8 * src7); + final float dst2 = (atmp2 * src4 + atmp7 * src5 + atmp10 * src7) + - (atmp3 * src4 + atmp6 * src5 + atmp11 * src7); + final float dst3 = (atmp5 * src4 + atmp8 * src5 + atmp11 * src6) + - (atmp4 * src4 + atmp9 * src5 + atmp10 * src6); + final float dst4 = (atmp1 * src1 + atmp2 * src2 + atmp5 * src3) + - (atmp0 * src1 + atmp3 * src2 + atmp4 * src3); + final float dst5 = (atmp0 * src0 + atmp7 * src2 + atmp8 * src3) + - (atmp1 * src0 + atmp6 * src2 + atmp9 * src3); + final float dst6 = (atmp3 * src0 + atmp6 * src1 + atmp11 * src3) + - (atmp2 * src0 + atmp7 * src1 + atmp10 * src3); + final float dst7 = (atmp4 * src0 + atmp9 * src1 + atmp10 * src2) + - (atmp5 * src0 + atmp8 * src1 + atmp11 * src2); + + // calculate pairs for second 8 elements (cofactors) + final float btmp0 = src2 * src7; + final float btmp1 = src3 * src6; + final float btmp2 = src1 * src7; + final float btmp3 = src3 * src5; + final float btmp4 = src1 * src6; + final float btmp5 = src2 * src5; + final float btmp6 = src0 * src7; + final float btmp7 = src3 * src4; + final float btmp8 = src0 * src6; + final float btmp9 = src2 * src4; + final float btmp10 = src0 * src5; + final float btmp11 = src1 * src4; + + // calculate second 8 elements (cofactors) + final float dst8 = (btmp0 * src13 + btmp3 * src14 + btmp4 * src15) + - (btmp1 * src13 + btmp2 * src14 + btmp5 * src15); + final float dst9 = (btmp1 * src12 + btmp6 * src14 + btmp9 * src15) + - (btmp0 * src12 + btmp7 * src14 + btmp8 * src15); + final float dst10 = (btmp2 * src12 + btmp7 * src13 + btmp10 * src15) + - (btmp3 * src12 + btmp6 * src13 + btmp11 * src15); + final float dst11 = (btmp5 * src12 + btmp8 * src13 + btmp11 * src14) + - (btmp4 * src12 + btmp9 * src13 + btmp10 * src14); + final float dst12 = (btmp2 * src10 + btmp5 * src11 + btmp1 * src9 ) + - (btmp4 * src11 + btmp0 * src9 + btmp3 * src10); + final float dst13 = (btmp8 * src11 + btmp0 * src8 + btmp7 * src10) + - (btmp6 * src10 + btmp9 * src11 + btmp1 * src8 ); + final float dst14 = (btmp6 * src9 + btmp11 * src11 + btmp3 * src8 ) + - (btmp10 * src11 + btmp2 * src8 + btmp7 * src9 ); + final float dst15 = (btmp10 * src10 + btmp4 * src8 + btmp9 * src9 ) + - (btmp8 * src9 + btmp11 * src10 + btmp5 * src8 ); + + // calculate determinant + final float det = + src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3; + + if (det == 0.0f) { + return false; + } + + // calculate matrix inverse + final float invdet = 1.0f / det; + mInv[ mInvOffset] = dst0 * invdet; + mInv[ 1 + mInvOffset] = dst1 * invdet; + mInv[ 2 + mInvOffset] = dst2 * invdet; + mInv[ 3 + mInvOffset] = dst3 * invdet; + + mInv[ 4 + mInvOffset] = dst4 * invdet; + mInv[ 5 + mInvOffset] = dst5 * invdet; + mInv[ 6 + mInvOffset] = dst6 * invdet; + mInv[ 7 + mInvOffset] = dst7 * invdet; + + mInv[ 8 + mInvOffset] = dst8 * invdet; + mInv[ 9 + mInvOffset] = dst9 * invdet; + mInv[10 + mInvOffset] = dst10 * invdet; + mInv[11 + mInvOffset] = dst11 * invdet; + + mInv[12 + mInvOffset] = dst12 * invdet; + mInv[13 + mInvOffset] = dst13 * invdet; + mInv[14 + mInvOffset] = dst14 * invdet; + mInv[15 + mInvOffset] = dst15 * invdet; + + return true; + } + + /** + * Computes an orthographic projection matrix. + * + * @param m returns the result + * @param mOffset + * @param left + * @param right + * @param bottom + * @param top + * @param near + * @param far + */ + public static void orthoM(float[] m, int mOffset, + float left, float right, float bottom, float top, + float near, float far) { + if (left == right) { + throw new IllegalArgumentException("left == right"); + } + if (bottom == top) { + throw new IllegalArgumentException("bottom == top"); + } + if (near == far) { + throw new IllegalArgumentException("near == far"); + } + + final float r_width = 1.0f / (right - left); + final float r_height = 1.0f / (top - bottom); + final float r_depth = 1.0f / (far - near); + final float x = 2.0f * (r_width); + final float y = 2.0f * (r_height); + final float z = -2.0f * (r_depth); + final float tx = -(right + left) * r_width; + final float ty = -(top + bottom) * r_height; + final float tz = -(far + near) * r_depth; + m[mOffset + 0] = x; + m[mOffset + 5] = y; + m[mOffset +10] = z; + m[mOffset +12] = tx; + m[mOffset +13] = ty; + m[mOffset +14] = tz; + m[mOffset +15] = 1.0f; + m[mOffset + 1] = 0.0f; + m[mOffset + 2] = 0.0f; + m[mOffset + 3] = 0.0f; + m[mOffset + 4] = 0.0f; + m[mOffset + 6] = 0.0f; + m[mOffset + 7] = 0.0f; + m[mOffset + 8] = 0.0f; + m[mOffset + 9] = 0.0f; + m[mOffset + 11] = 0.0f; + } + + + /** + * Defines a projection matrix in terms of six clip planes. + * + * @param m the float array that holds the output perspective matrix + * @param offset the offset into float array m where the perspective + * matrix data is written + * @param left + * @param right + * @param bottom + * @param top + * @param near + * @param far + */ + public static void frustumM(float[] m, int offset, + float left, float right, float bottom, float top, + float near, float far) { + if (left == right) { + throw new IllegalArgumentException("left == right"); + } + if (top == bottom) { + throw new IllegalArgumentException("top == bottom"); + } + if (near == far) { + throw new IllegalArgumentException("near == far"); + } + if (near <= 0.0f) { + throw new IllegalArgumentException("near <= 0.0f"); + } + if (far <= 0.0f) { + throw new IllegalArgumentException("far <= 0.0f"); + } + final float r_width = 1.0f / (right - left); + final float r_height = 1.0f / (top - bottom); + final float r_depth = 1.0f / (near - far); + final float x = 2.0f * (near * r_width); + final float y = 2.0f * (near * r_height); + final float A = (right + left) * r_width; + final float B = (top + bottom) * r_height; + final float C = (far + near) * r_depth; + final float D = 2.0f * (far * near * r_depth); + m[offset + 0] = x; + m[offset + 5] = y; + m[offset + 8] = A; + m[offset + 9] = B; + m[offset + 10] = C; + m[offset + 14] = D; + m[offset + 11] = -1.0f; + m[offset + 1] = 0.0f; + m[offset + 2] = 0.0f; + m[offset + 3] = 0.0f; + m[offset + 4] = 0.0f; + m[offset + 6] = 0.0f; + m[offset + 7] = 0.0f; + m[offset + 12] = 0.0f; + m[offset + 13] = 0.0f; + m[offset + 15] = 0.0f; + } + + /** + * Defines a projection matrix in terms of a field of view angle, an + * aspect ratio, and z clip planes. + * + * @param m the float array that holds the perspective matrix + * @param offset the offset into float array m where the perspective + * matrix data is written + * @param fovy field of view in y direction, in degrees + * @param aspect width to height aspect ratio of the viewport + * @param zNear + * @param zFar + */ + public static void perspectiveM(float[] m, int offset, + float fovy, float aspect, float zNear, float zFar) { + float f = 1.0f / (float) Math.tan(fovy * (Math.PI / 360.0)); + float rangeReciprocal = 1.0f / (zNear - zFar); + + m[offset + 0] = f / aspect; + m[offset + 1] = 0.0f; + m[offset + 2] = 0.0f; + m[offset + 3] = 0.0f; + + m[offset + 4] = 0.0f; + m[offset + 5] = f; + m[offset + 6] = 0.0f; + m[offset + 7] = 0.0f; + + m[offset + 8] = 0.0f; + m[offset + 9] = 0.0f; + m[offset + 10] = (zFar + zNear) * rangeReciprocal; + m[offset + 11] = -1.0f; + + m[offset + 12] = 0.0f; + m[offset + 13] = 0.0f; + m[offset + 14] = 2.0f * zFar * zNear * rangeReciprocal; + m[offset + 15] = 0.0f; + } + + /** + * Computes the length of a vector. + * + * @param x x coordinate of a vector + * @param y y coordinate of a vector + * @param z z coordinate of a vector + * @return the length of a vector + */ + public static float length(float x, float y, float z) { + return (float) Math.sqrt(x * x + y * y + z * z); + } + + /** + * Sets matrix m to the identity matrix. + * + * @param sm returns the result + * @param smOffset index into sm where the result matrix starts + */ + public static void setIdentityM(float[] sm, int smOffset) { + for (int i=0 ; i<16 ; i++) { + sm[smOffset + i] = 0; + } + for(int i = 0; i < 16; i += 5) { + sm[smOffset + i] = 1.0f; + } + } + + /** + * Scales matrix m by x, y, and z, putting the result in sm. + *

+ * m and sm must not overlap. + * + * @param sm returns the result + * @param smOffset index into sm where the result matrix starts + * @param m source matrix + * @param mOffset index into m where the source matrix starts + * @param x scale factor x + * @param y scale factor y + * @param z scale factor z + */ + public static void scaleM(float[] sm, int smOffset, + float[] m, int mOffset, + float x, float y, float z) { + for (int i=0 ; i<4 ; i++) { + int smi = smOffset + i; + int mi = mOffset + i; + sm[ smi] = m[ mi] * x; + sm[ 4 + smi] = m[ 4 + mi] * y; + sm[ 8 + smi] = m[ 8 + mi] * z; + sm[12 + smi] = m[12 + mi]; + } + } + + /** + * Scales matrix m in place by sx, sy, and sz. + * + * @param m matrix to scale + * @param mOffset index into m where the matrix starts + * @param x scale factor x + * @param y scale factor y + * @param z scale factor z + */ + public static void scaleM(float[] m, int mOffset, + float x, float y, float z) { + for (int i=0 ; i<4 ; i++) { + int mi = mOffset + i; + m[ mi] *= x; + m[ 4 + mi] *= y; + m[ 8 + mi] *= z; + } + } + + /** + * Translates matrix m by x, y, and z, putting the result in tm. + *

+ * m and tm must not overlap. + * + * @param tm returns the result + * @param tmOffset index into sm where the result matrix starts + * @param m source matrix + * @param mOffset index into m where the source matrix starts + * @param x translation factor x + * @param y translation factor y + * @param z translation factor z + */ + public static void translateM(float[] tm, int tmOffset, + float[] m, int mOffset, + float x, float y, float z) { + for (int i=0 ; i<12 ; i++) { + tm[tmOffset + i] = m[mOffset + i]; + } + for (int i=0 ; i<4 ; i++) { + int tmi = tmOffset + i; + int mi = mOffset + i; + tm[12 + tmi] = m[mi] * x + m[4 + mi] * y + m[8 + mi] * z + + m[12 + mi]; + } + } + + /** + * Translates matrix m by x, y, and z in place. + * + * @param m matrix + * @param mOffset index into m where the matrix starts + * @param x translation factor x + * @param y translation factor y + * @param z translation factor z + */ + public static void translateM( + float[] m, int mOffset, + float x, float y, float z) { + for (int i=0 ; i<4 ; i++) { + int mi = mOffset + i; + m[12 + mi] += m[mi] * x + m[4 + mi] * y + m[8 + mi] * z; + } + } + + /** + * Rotates matrix m by angle a (in degrees) around the axis (x, y, z). + *

+ * m and rm must not overlap. + * + * @param rm returns the result + * @param rmOffset index into rm where the result matrix starts + * @param m source matrix + * @param mOffset index into m where the source matrix starts + * @param a angle to rotate in degrees + * @param x X axis component + * @param y Y axis component + * @param z Z axis component + */ + public static void rotateM(float[] rm, int rmOffset, + float[] m, int mOffset, + float a, float x, float y, float z) { + float[] tmp = ThreadTmp.get(); + setRotateM(tmp, 16, a, x, y, z); + multiplyMM(rm, rmOffset, m, mOffset, tmp, 16); + } + + /** + * Rotates matrix m in place by angle a (in degrees) + * around the axis (x, y, z). + * + * @param m source matrix + * @param mOffset index into m where the matrix starts + * @param a angle to rotate in degrees + * @param x X axis component + * @param y Y axis component + * @param z Z axis component + */ + public static void rotateM(float[] m, int mOffset, + float a, float x, float y, float z) { + rotateM(m, mOffset, m, mOffset, a, x, y, z); + } + + /** + * Creates a matrix for rotation by angle a (in degrees) + * around the axis (x, y, z). + *

+ * An optimized path will be used for rotation about a major axis + * (e.g. x=1.0f y=0.0f z=0.0f). + * + * @param rm returns the result + * @param rmOffset index into rm where the result matrix starts + * @param a angle to rotate in degrees + * @param x X axis component + * @param y Y axis component + * @param z Z axis component + */ + public static void setRotateM(float[] rm, int rmOffset, + float a, float x, float y, float z) { + rm[rmOffset + 3] = 0; + rm[rmOffset + 7] = 0; + rm[rmOffset + 11]= 0; + rm[rmOffset + 12]= 0; + rm[rmOffset + 13]= 0; + rm[rmOffset + 14]= 0; + rm[rmOffset + 15]= 1; + a *= (float) (Math.PI / 180.0f); + float s = (float) Math.sin(a); + float c = (float) Math.cos(a); + if (1.0f == x && 0.0f == y && 0.0f == z) { + rm[rmOffset + 5] = c; rm[rmOffset + 10]= c; + rm[rmOffset + 6] = s; rm[rmOffset + 9] = -s; + rm[rmOffset + 1] = 0; rm[rmOffset + 2] = 0; + rm[rmOffset + 4] = 0; rm[rmOffset + 8] = 0; + rm[rmOffset + 0] = 1; + } else if (0.0f == x && 1.0f == y && 0.0f == z) { + rm[rmOffset + 0] = c; rm[rmOffset + 10]= c; + rm[rmOffset + 8] = s; rm[rmOffset + 2] = -s; + rm[rmOffset + 1] = 0; rm[rmOffset + 4] = 0; + rm[rmOffset + 6] = 0; rm[rmOffset + 9] = 0; + rm[rmOffset + 5] = 1; + } else if (0.0f == x && 0.0f == y && 1.0f == z) { + rm[rmOffset + 0] = c; rm[rmOffset + 5] = c; + rm[rmOffset + 1] = s; rm[rmOffset + 4] = -s; + rm[rmOffset + 2] = 0; rm[rmOffset + 6] = 0; + rm[rmOffset + 8] = 0; rm[rmOffset + 9] = 0; + rm[rmOffset + 10]= 1; + } else { + float len = length(x, y, z); + if (1.0f != len) { + float recipLen = 1.0f / len; + x *= recipLen; + y *= recipLen; + z *= recipLen; + } + float nc = 1.0f - c; + float xy = x * y; + float yz = y * z; + float zx = z * x; + float xs = x * s; + float ys = y * s; + float zs = z * s; + rm[rmOffset + 0] = x*x*nc + c; + rm[rmOffset + 4] = xy*nc - zs; + rm[rmOffset + 8] = zx*nc + ys; + rm[rmOffset + 1] = xy*nc + zs; + rm[rmOffset + 5] = y*y*nc + c; + rm[rmOffset + 9] = yz*nc - xs; + rm[rmOffset + 2] = zx*nc - ys; + rm[rmOffset + 6] = yz*nc + xs; + rm[rmOffset + 10] = z*z*nc + c; + } + } + + /** + * Converts Euler angles to a rotation matrix. + * + * @param rm returns the result + * @param rmOffset index into rm where the result matrix starts + * @param x angle of rotation, in degrees + * @param y is broken, do not use + * @param z angle of rotation, in degrees + * + * @deprecated This method is incorrect around the y axis. This method is + * deprecated and replaced (below) by setRotateEulerM2 which + * behaves correctly + */ + @Deprecated + public static void setRotateEulerM(float[] rm, int rmOffset, + float x, float y, float z) { + x *= (float) (Math.PI / 180.0f); + y *= (float) (Math.PI / 180.0f); + z *= (float) (Math.PI / 180.0f); + float cx = (float) Math.cos(x); + float sx = (float) Math.sin(x); + float cy = (float) Math.cos(y); + float sy = (float) Math.sin(y); + float cz = (float) Math.cos(z); + float sz = (float) Math.sin(z); + float cxsy = cx * sy; + float sxsy = sx * sy; + + rm[rmOffset + 0] = cy * cz; + rm[rmOffset + 1] = -cy * sz; + rm[rmOffset + 2] = sy; + rm[rmOffset + 3] = 0.0f; + + rm[rmOffset + 4] = cxsy * cz + cx * sz; + rm[rmOffset + 5] = -cxsy * sz + cx * cz; + rm[rmOffset + 6] = -sx * cy; + rm[rmOffset + 7] = 0.0f; + + rm[rmOffset + 8] = -sxsy * cz + sx * sz; + rm[rmOffset + 9] = sxsy * sz + sx * cz; + rm[rmOffset + 10] = cx * cy; + rm[rmOffset + 11] = 0.0f; + + rm[rmOffset + 12] = 0.0f; + rm[rmOffset + 13] = 0.0f; + rm[rmOffset + 14] = 0.0f; + rm[rmOffset + 15] = 1.0f; + } + + /** + * Converts Euler angles to a rotation matrix. + * + * @param rm returns the result + * @param rmOffset index into rm where the result matrix starts + * @param x angle of rotation, in degrees + * @param y angle of rotation, in degrees + * @param z angle of rotation, in degrees + * + * @throws IllegalArgumentException if rm is null; + * or if rmOffset + 16 > rm.length; + * rmOffset < 0 + */ + public static void setRotateEulerM2(float[] rm, int rmOffset, + float x, float y, float z) { + if (rm == null) { + throw new IllegalArgumentException("rm == null"); + } + if (rmOffset < 0) { + throw new IllegalArgumentException("rmOffset < 0"); + } + if (rm.length < rmOffset + 16) { + throw new IllegalArgumentException("rm.length < rmOffset + 16"); + } + + x *= (float) (Math.PI / 180.0f); + y *= (float) (Math.PI / 180.0f); + z *= (float) (Math.PI / 180.0f); + float cx = (float) Math.cos(x); + float sx = (float) Math.sin(x); + float cy = (float) Math.cos(y); + float sy = (float) Math.sin(y); + float cz = (float) Math.cos(z); + float sz = (float) Math.sin(z); + float cxsy = cx * sy; + float sxsy = sx * sy; + + rm[rmOffset + 0] = cy * cz; + rm[rmOffset + 1] = -cy * sz; + rm[rmOffset + 2] = sy; + rm[rmOffset + 3] = 0.0f; + + rm[rmOffset + 4] = sxsy * cz + cx * sz; + rm[rmOffset + 5] = -sxsy * sz + cx * cz; + rm[rmOffset + 6] = -sx * cy; + rm[rmOffset + 7] = 0.0f; + + rm[rmOffset + 8] = -cxsy * cz + sx * sz; + rm[rmOffset + 9] = cxsy * sz + sx * cz; + rm[rmOffset + 10] = cx * cy; + rm[rmOffset + 11] = 0.0f; + + rm[rmOffset + 12] = 0.0f; + rm[rmOffset + 13] = 0.0f; + rm[rmOffset + 14] = 0.0f; + rm[rmOffset + 15] = 1.0f; + } + + /** + * Defines a viewing transformation in terms of an eye point, a center of + * view, and an up vector. + * + * @param rm returns the result + * @param rmOffset index into rm where the result matrix starts + * @param eyeX eye point X + * @param eyeY eye point Y + * @param eyeZ eye point Z + * @param centerX center of view X + * @param centerY center of view Y + * @param centerZ center of view Z + * @param upX up vector X + * @param upY up vector Y + * @param upZ up vector Z + */ + public static void setLookAtM(float[] rm, int rmOffset, + float eyeX, float eyeY, float eyeZ, + float centerX, float centerY, float centerZ, float upX, float upY, + float upZ) { + + // See the OpenGL GLUT documentation for gluLookAt for a description + // of the algorithm. We implement it in a straightforward way: + + float fx = centerX - eyeX; + float fy = centerY - eyeY; + float fz = centerZ - eyeZ; + + // Normalize f + float rlf = 1.0f / Matrix.length(fx, fy, fz); + fx *= rlf; + fy *= rlf; + fz *= rlf; + + // compute s = f x up (x means "cross product") + float sx = fy * upZ - fz * upY; + float sy = fz * upX - fx * upZ; + float sz = fx * upY - fy * upX; + + // and normalize s + float rls = 1.0f / Matrix.length(sx, sy, sz); + sx *= rls; + sy *= rls; + sz *= rls; + + // compute u = s x f + float ux = sy * fz - sz * fy; + float uy = sz * fx - sx * fz; + float uz = sx * fy - sy * fx; + + rm[rmOffset + 0] = sx; + rm[rmOffset + 1] = ux; + rm[rmOffset + 2] = -fx; + rm[rmOffset + 3] = 0.0f; + + rm[rmOffset + 4] = sy; + rm[rmOffset + 5] = uy; + rm[rmOffset + 6] = -fy; + rm[rmOffset + 7] = 0.0f; + + rm[rmOffset + 8] = sz; + rm[rmOffset + 9] = uz; + rm[rmOffset + 10] = -fz; + rm[rmOffset + 11] = 0.0f; + + rm[rmOffset + 12] = 0.0f; + rm[rmOffset + 13] = 0.0f; + rm[rmOffset + 14] = 0.0f; + rm[rmOffset + 15] = 1.0f; + + translateM(rm, rmOffset, -eyeX, -eyeY, -eyeZ); + } +} diff --git a/src/api-impl/meson.build b/src/api-impl/meson.build index 55beb1d4..ddd0dbcd 100644 --- a/src/api-impl/meson.build +++ b/src/api-impl/meson.build @@ -110,7 +110,9 @@ hax_jar = jar('hax', [ 'android/net/Uri.java', 'android/opengl/EGLConfig.java', 'android/opengl/EGLObjectHandle.java', + 'android/opengl/GLES20.java', 'android/opengl/GLSurfaceView.java', + 'android/opengl/Matrix.java', 'android/os/AsyncTask.java', 'android/os/Binder.java', 'android/os/Build.java',