summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/jni/Android.mk1
-rw-r--r--core/jni/android_opengl_GLES30.cpp5217
-rw-r--r--opengl/java/android/opengl/GLES20.java9
-rw-r--r--opengl/java/android/opengl/GLES30.java1795
4 files changed, 7019 insertions, 3 deletions
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 3e5586e..efb59ef 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -30,6 +30,7 @@ LOCAL_SRC_FILES:= \
android_opengl_GLES11.cpp \
android_opengl_GLES11Ext.cpp \
android_opengl_GLES20.cpp \
+ android_opengl_GLES30.cpp \
android_database_CursorWindow.cpp \
android_database_SQLiteCommon.cpp \
android_database_SQLiteConnection.cpp \
diff --git a/core/jni/android_opengl_GLES30.cpp b/core/jni/android_opengl_GLES30.cpp
new file mode 100644
index 0000000..ac294bd
--- /dev/null
+++ b/core/jni/android_opengl_GLES30.cpp
@@ -0,0 +1,5217 @@
+/*
+**
+** Copyright 2013, 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
+
+#include <GLES3/gl3.h>
+#include <GLES3/gl3ext.h>
+
+#include "jni.h"
+#include "JNIHelp.h"
+#include <android_runtime/AndroidRuntime.h>
+#include <utils/misc.h>
+#include <assert.h>
+
+static int initialized = 0;
+
+static jclass nioAccessClass;
+static jclass bufferClass;
+static jmethodID getBasePointerID;
+static jmethodID getBaseArrayID;
+static jmethodID getBaseArrayOffsetID;
+static jfieldID positionID;
+static jfieldID limitID;
+static jfieldID elementSizeShiftID;
+
+
+/* special calls implemented in Android's GLES wrapper used to more
+ * efficiently bound-check passed arrays */
+extern "C" {
+#ifdef GL_VERSION_ES_CM_1_1
+GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr, GLsizei count);
+GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
+ const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+#endif
+#ifdef GL_ES_VERSION_2_0
+static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
+ GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
+}
+#endif
+#ifdef GL_ES_VERSION_3_0
+static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ glVertexAttribIPointer(indx, size, type, stride, pointer);
+}
+#endif
+}
+
+/* Cache method IDs each time the class is loaded. */
+
+static void
+nativeClassInit(JNIEnv *_env, jclass glImplClass)
+{
+ jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
+ nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
+
+ jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
+ bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
+
+ getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
+ "getBasePointer", "(Ljava/nio/Buffer;)J");
+ getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
+ "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
+ getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
+ "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
+
+ positionID = _env->GetFieldID(bufferClass, "position", "I");
+ limitID = _env->GetFieldID(bufferClass, "limit", "I");
+ elementSizeShiftID =
+ _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
+}
+
+static void *
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
+{
+ jint position;
+ jint limit;
+ jint elementSizeShift;
+ jlong pointer;
+
+ position = _env->GetIntField(buffer, positionID);
+ limit = _env->GetIntField(buffer, limitID);
+ elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
+ *remaining = (limit - position) << elementSizeShift;
+ pointer = _env->CallStaticLongMethod(nioAccessClass,
+ getBasePointerID, buffer);
+ if (pointer != 0L) {
+ *array = NULL;
+ return (void *) (jint) pointer;
+ }
+
+ *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
+ getBaseArrayID, buffer);
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
+ getBaseArrayOffsetID, buffer);
+
+ return NULL;
+}
+
+static void
+releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
+{
+ _env->ReleasePrimitiveArrayCritical(array, data,
+ commit ? 0 : JNI_ABORT);
+}
+
+static void *
+getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
+ char* buf = (char*) _env->GetDirectBufferAddress(buffer);
+ if (buf) {
+ jint position = _env->GetIntField(buffer, positionID);
+ jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
+ buf += position << elementSizeShift;
+ } else {
+ jniThrowException(_env, "java/lang/IllegalArgumentException",
+ "Must use a native order direct Buffer");
+ }
+ return (void*) buf;
+}
+
+// --------------------------------------------------------------------------
+
+/*
+ * returns the number of values glGet returns for a given pname.
+ *
+ * The code below is written such that pnames requiring only one values
+ * are the default (and are not explicitely tested for). This makes the
+ * checking code much shorter/readable/efficient.
+ *
+ * This means that unknown pnames (e.g.: extensions) will default to 1. If
+ * that unknown pname needs more than 1 value, then the validation check
+ * is incomplete and the app may crash if it passed the wrong number params.
+ */
+static int getNeededCount(GLint pname) {
+ int needed = 1;
+#ifdef GL_ES_VERSION_2_0
+ // GLES 2.x pnames
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_ALIASED_POINT_SIZE_RANGE:
+ needed = 2;
+ break;
+
+ case GL_BLEND_COLOR:
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ needed = 4;
+ break;
+
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+ break;
+
+ case GL_SHADER_BINARY_FORMATS:
+ glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
+ break;
+ }
+#endif
+
+#ifdef GL_VERSION_ES_CM_1_1
+ // GLES 1.x pnames
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_ALIASED_POINT_SIZE_RANGE:
+ case GL_DEPTH_RANGE:
+ case GL_SMOOTH_LINE_WIDTH_RANGE:
+ case GL_SMOOTH_POINT_SIZE_RANGE:
+ needed = 2;
+ break;
+
+ case GL_CURRENT_NORMAL:
+ case GL_POINT_DISTANCE_ATTENUATION:
+ needed = 3;
+ break;
+
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_CURRENT_COLOR:
+ case GL_CURRENT_TEXTURE_COORDS:
+ case GL_FOG_COLOR:
+ case GL_LIGHT_MODEL_AMBIENT:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ needed = 4;
+ break;
+
+ case GL_MODELVIEW_MATRIX:
+ case GL_PROJECTION_MATRIX:
+ case GL_TEXTURE_MATRIX:
+ needed = 16;
+ break;
+
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+ break;
+ }
+#endif
+ return needed;
+}
+
+template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
+static void
+get
+ (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ CTYPE *params_base = (CTYPE *) 0;
+ jint _remaining;
+ CTYPE *params = (CTYPE *) 0;
+ int _needed = 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ _needed = getNeededCount(pname);
+ // if we didn't find this pname, we just assume the user passed
+ // an array of the right size -- this might happen with extensions
+ // or if we forget an enum here.
+ if (_remaining < _needed) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
+ goto exit;
+ }
+ params_base = (CTYPE *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ GET(
+ (GLenum)pname,
+ (CTYPE *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+
+template <typename CTYPE, void GET(GLenum, CTYPE*)>
+static void
+getarray
+ (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ CTYPE *params = (CTYPE *) 0;
+ int _needed = 0;
+
+ params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ _needed = getNeededCount(pname);
+ // if we didn't find this pname, we just assume the user passed
+ // an array of the right size -- this might happen with extensions
+ // or if we forget an enum here.
+ if (_needed>0 && _remaining < _needed) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
+ goto exit;
+ }
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (CTYPE *) (_paramsBase + _bufferOffset);
+ }
+ GET(
+ (GLenum)pname,
+ (CTYPE *)params
+ );
+
+exit:
+ if (_array) {
+ releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+// --------------------------------------------------------------------------
+/* void glReadBuffer ( GLenum mode ) */
+static void
+android_glReadBuffer__I
+ (JNIEnv *_env, jobject _this, jint mode) {
+ glReadBuffer(
+ (GLenum)mode
+ );
+}
+
+/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) */
+static void
+android_glDrawRangeElements__IIIIILjava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *indices = (GLvoid *) 0;
+
+ indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (GLvoid *) (_indicesBase + _bufferOffset);
+ }
+ glDrawRangeElements(
+ (GLenum)mode,
+ (GLuint)start,
+ (GLuint)end,
+ (GLsizei)count,
+ (GLenum)type,
+ (GLvoid *)indices
+ );
+ if (_array) {
+ releasePointer(_env, _array, indices, JNI_FALSE);
+ }
+}
+
+/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset ) */
+static void
+android_glDrawRangeElements__IIIIII
+ (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jint offset) {
+ glDrawRangeElements(
+ (GLenum)mode,
+ (GLuint)start,
+ (GLuint)end,
+ (GLsizei)count,
+ (GLenum)type,
+ (GLvoid *)offset
+ );
+}
+
+/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
+static void
+android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject pixels_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *pixels = (GLvoid *) 0;
+
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+ }
+ glTexImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLint)internalformat,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLint)border,
+ (GLenum)format,
+ (GLenum)type,
+ (GLvoid *)pixels
+ );
+ if (_array) {
+ releasePointer(_env, _array, pixels, JNI_FALSE);
+ }
+}
+
+/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset ) */
+static void
+android_glTexImage3D__IIIIIIIIII
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jint offset) {
+ glTexImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLint)internalformat,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLint)border,
+ (GLenum)format,
+ (GLenum)type,
+ (GLvoid *)offset
+ );
+}
+
+/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels ) */
+static void
+android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jobject pixels_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *pixels = (GLvoid *) 0;
+
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+ }
+ glTexSubImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLint)xoffset,
+ (GLint)yoffset,
+ (GLint)zoffset,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLenum)format,
+ (GLenum)type,
+ (GLvoid *)pixels
+ );
+ if (_array) {
+ releasePointer(_env, _array, pixels, JNI_FALSE);
+ }
+}
+
+/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset ) */
+static void
+android_glTexSubImage3D__IIIIIIIIIII
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jint offset) {
+ glTexSubImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLint)xoffset,
+ (GLint)yoffset,
+ (GLint)zoffset,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLenum)format,
+ (GLenum)type,
+ (GLvoid *)offset
+ );
+}
+
+/* void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
+static void
+android_glCopyTexSubImage3D__IIIIIIIII
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) {
+ glCopyTexSubImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLint)xoffset,
+ (GLint)yoffset,
+ (GLint)zoffset,
+ (GLint)x,
+ (GLint)y,
+ (GLsizei)width,
+ (GLsizei)height
+ );
+}
+
+/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ) */
+static void
+android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jobject data_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *data = (GLvoid *) 0;
+
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
+ glCompressedTexImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLenum)internalformat,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLint)border,
+ (GLsizei)imageSize,
+ (GLvoid *)data
+ );
+ if (_array) {
+ releasePointer(_env, _array, data, JNI_FALSE);
+ }
+}
+
+/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset ) */
+static void
+android_glCompressedTexImage3D__IIIIIIIII
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint offset) {
+ glCompressedTexImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLenum)internalformat,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLint)border,
+ (GLsizei)imageSize,
+ (GLvoid *)offset
+ );
+}
+
+/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ) */
+static void
+android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jobject data_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *data = (GLvoid *) 0;
+
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
+ glCompressedTexSubImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLint)xoffset,
+ (GLint)yoffset,
+ (GLint)zoffset,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLenum)format,
+ (GLsizei)imageSize,
+ (GLvoid *)data
+ );
+ if (_array) {
+ releasePointer(_env, _array, data, JNI_FALSE);
+ }
+}
+
+/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset ) */
+static void
+android_glCompressedTexSubImage3D__IIIIIIIIIII
+ (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jint offset) {
+ glCompressedTexSubImage3D(
+ (GLenum)target,
+ (GLint)level,
+ (GLint)xoffset,
+ (GLint)yoffset,
+ (GLint)zoffset,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth,
+ (GLenum)format,
+ (GLsizei)imageSize,
+ (GLvoid *)offset
+ );
+}
+
+/* void glGenQueries ( GLsizei n, GLuint *ids ) */
+static void
+android_glGenQueries__I_3II
+ (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *ids_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ if (!ids_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "ids == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(ids_ref) - offset;
+ ids_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
+ ids = ids_base + offset;
+
+ glGenQueries(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+
+exit:
+ if (ids_base) {
+ _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGenQueries ( GLsizei n, GLuint *ids ) */
+static void
+android_glGenQueries__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
+ if (ids == NULL) {
+ char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ ids = (GLuint *) (_idsBase + _bufferOffset);
+ }
+ glGenQueries(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+ if (_array) {
+ releasePointer(_env, _array, ids, JNI_TRUE);
+ }
+}
+
+/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
+static void
+android_glDeleteQueries__I_3II
+ (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *ids_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ if (!ids_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "ids == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(ids_ref) - offset;
+ ids_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
+ ids = ids_base + offset;
+
+ glDeleteQueries(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+
+exit:
+ if (ids_base) {
+ _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
+static void
+android_glDeleteQueries__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
+ if (ids == NULL) {
+ char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ ids = (GLuint *) (_idsBase + _bufferOffset);
+ }
+ glDeleteQueries(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+ if (_array) {
+ releasePointer(_env, _array, ids, JNI_FALSE);
+ }
+}
+
+/* GLboolean glIsQuery ( GLuint id ) */
+static jboolean
+android_glIsQuery__I
+ (JNIEnv *_env, jobject _this, jint id) {
+ GLboolean _returnValue;
+ _returnValue = glIsQuery(
+ (GLuint)id
+ );
+ return (jboolean)_returnValue;
+}
+
+/* void glBeginQuery ( GLenum target, GLuint id ) */
+static void
+android_glBeginQuery__II
+ (JNIEnv *_env, jobject _this, jint target, jint id) {
+ glBeginQuery(
+ (GLenum)target,
+ (GLuint)id
+ );
+}
+
+/* void glEndQuery ( GLenum target ) */
+static void
+android_glEndQuery__I
+ (JNIEnv *_env, jobject _this, jint target) {
+ glEndQuery(
+ (GLenum)target
+ );
+}
+
+/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
+static void
+android_glGetQueryiv__II_3II
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetQueryiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
+static void
+android_glGetQueryiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetQueryiv(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
+static void
+android_glGetQueryObjectuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint id, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *params_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetQueryObjectuiv(
+ (GLuint)id,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
+static void
+android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint id, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLuint *) (_paramsBase + _bufferOffset);
+ }
+ glGetQueryObjectuiv(
+ (GLuint)id,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* GLboolean glUnmapBuffer ( GLenum target ) */
+static jboolean
+android_glUnmapBuffer__I
+ (JNIEnv *_env, jobject _this, jint target) {
+ GLboolean _returnValue;
+ _returnValue = glUnmapBuffer(
+ (GLenum)target
+ );
+ return (jboolean)_returnValue;
+}
+
+/* void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) */
+static jobject
+android_glGetBufferPointerv__II
+ (JNIEnv *_env, jobject _this, jint target, jint pname) {
+ GLint64 _mapLength;
+ GLvoid* _p;
+ glGetBufferParameteri64v((GLenum)target, GL_BUFFER_MAP_LENGTH, &_mapLength);
+ glGetBufferPointerv((GLenum)target, (GLenum)pname, &_p);
+ return _env->NewDirectByteBuffer(_p, _mapLength);
+}
+
+/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
+static void
+android_glDrawBuffers__I_3II
+ (JNIEnv *_env, jobject _this, jint n, jintArray bufs_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLenum *bufs_base = (GLenum *) 0;
+ jint _remaining;
+ GLenum *bufs = (GLenum *) 0;
+
+ if (!bufs_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "bufs == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(bufs_ref) - offset;
+ bufs_base = (GLenum *)
+ _env->GetPrimitiveArrayCritical(bufs_ref, (jboolean *)0);
+ bufs = bufs_base + offset;
+
+ glDrawBuffers(
+ (GLsizei)n,
+ (GLenum *)bufs
+ );
+
+exit:
+ if (bufs_base) {
+ _env->ReleasePrimitiveArrayCritical(bufs_ref, bufs_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
+static void
+android_glDrawBuffers__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint n, jobject bufs_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLenum *bufs = (GLenum *) 0;
+
+ bufs = (GLenum *)getPointer(_env, bufs_buf, &_array, &_remaining, &_bufferOffset);
+ if (bufs == NULL) {
+ char * _bufsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ bufs = (GLenum *) (_bufsBase + _bufferOffset);
+ }
+ glDrawBuffers(
+ (GLsizei)n,
+ (GLenum *)bufs
+ );
+ if (_array) {
+ releasePointer(_env, _array, bufs, JNI_FALSE);
+ }
+}
+
+/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix2x3fv__IIZ_3FI
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *value_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniformMatrix2x3fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
+ glUniformMatrix2x3fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix3x2fv__IIZ_3FI
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *value_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniformMatrix3x2fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
+ glUniformMatrix3x2fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix2x4fv__IIZ_3FI
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *value_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniformMatrix2x4fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
+ glUniformMatrix2x4fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix4x2fv__IIZ_3FI
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *value_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniformMatrix4x2fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
+ glUniformMatrix4x2fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix3x4fv__IIZ_3FI
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *value_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniformMatrix3x4fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
+ glUniformMatrix3x4fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix4x3fv__IIZ_3FI
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *value_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniformMatrix4x3fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
+static void
+android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
+ glUniformMatrix4x3fv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLboolean)transpose,
+ (GLfloat *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) */
+static void
+android_glBlitFramebuffer__IIIIIIIIII
+ (JNIEnv *_env, jobject _this, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) {
+ glBlitFramebuffer(
+ (GLint)srcX0,
+ (GLint)srcY0,
+ (GLint)srcX1,
+ (GLint)srcY1,
+ (GLint)dstX0,
+ (GLint)dstY0,
+ (GLint)dstX1,
+ (GLint)dstY1,
+ (GLbitfield)mask,
+ (GLenum)filter
+ );
+}
+
+/* void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) */
+static void
+android_glRenderbufferStorageMultisample__IIIII
+ (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height) {
+ glRenderbufferStorageMultisample(
+ (GLenum)target,
+ (GLsizei)samples,
+ (GLenum)internalformat,
+ (GLsizei)width,
+ (GLsizei)height
+ );
+}
+
+/* void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) */
+static void
+android_glFramebufferTextureLayer__IIIII
+ (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level, jint layer) {
+ glFramebufferTextureLayer(
+ (GLenum)target,
+ (GLenum)attachment,
+ (GLuint)texture,
+ (GLint)level,
+ (GLint)layer
+ );
+}
+
+/* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */
+static jobject
+android_glMapBufferRange__IIII
+ (JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) {
+ GLvoid* _p = glMapBufferRange((GLenum)target,
+ (GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access);
+ jobject _buf = (jobject)0;
+ if (_p) {
+ _buf = _env->NewDirectByteBuffer(_p, length);
+ }
+ return _buf;
+}
+
+/* void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length ) */
+static void
+android_glFlushMappedBufferRange__III
+ (JNIEnv *_env, jobject _this, jint target, jint offset, jint length) {
+ glFlushMappedBufferRange(
+ (GLenum)target,
+ (GLintptr)offset,
+ (GLsizeiptr)length
+ );
+}
+
+/* void glBindVertexArray ( GLuint array ) */
+static void
+android_glBindVertexArray__I
+ (JNIEnv *_env, jobject _this, jint array) {
+ glBindVertexArray(
+ (GLuint)array
+ );
+}
+
+/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
+static void
+android_glDeleteVertexArrays__I_3II
+ (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *arrays_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *arrays = (GLuint *) 0;
+
+ if (!arrays_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "arrays == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(arrays_ref) - offset;
+ arrays_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
+ arrays = arrays_base + offset;
+
+ glDeleteVertexArrays(
+ (GLsizei)n,
+ (GLuint *)arrays
+ );
+
+exit:
+ if (arrays_base) {
+ _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
+static void
+android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *arrays = (GLuint *) 0;
+
+ arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
+ if (arrays == NULL) {
+ char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ arrays = (GLuint *) (_arraysBase + _bufferOffset);
+ }
+ glDeleteVertexArrays(
+ (GLsizei)n,
+ (GLuint *)arrays
+ );
+ if (_array) {
+ releasePointer(_env, _array, arrays, JNI_FALSE);
+ }
+}
+
+/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
+static void
+android_glGenVertexArrays__I_3II
+ (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *arrays_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *arrays = (GLuint *) 0;
+
+ if (!arrays_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "arrays == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(arrays_ref) - offset;
+ arrays_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
+ arrays = arrays_base + offset;
+
+ glGenVertexArrays(
+ (GLsizei)n,
+ (GLuint *)arrays
+ );
+
+exit:
+ if (arrays_base) {
+ _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
+static void
+android_glGenVertexArrays__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *arrays = (GLuint *) 0;
+
+ arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
+ if (arrays == NULL) {
+ char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ arrays = (GLuint *) (_arraysBase + _bufferOffset);
+ }
+ glGenVertexArrays(
+ (GLsizei)n,
+ (GLuint *)arrays
+ );
+ if (_array) {
+ releasePointer(_env, _array, arrays, JNI_TRUE);
+ }
+}
+
+/* GLboolean glIsVertexArray ( GLuint array ) */
+static jboolean
+android_glIsVertexArray__I
+ (JNIEnv *_env, jobject _this, jint array) {
+ GLboolean _returnValue;
+ _returnValue = glIsVertexArray(
+ (GLuint)array
+ );
+ return (jboolean)_returnValue;
+}
+
+/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
+static void
+android_glGetIntegeri_v__II_3II
+ (JNIEnv *_env, jobject _this, jint target, jint index, jintArray data_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *data_base = (GLint *) 0;
+ jint _remaining;
+ GLint *data = (GLint *) 0;
+
+ if (!data_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "data == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(data_ref) - offset;
+ data_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
+ data = data_base + offset;
+
+ glGetIntegeri_v(
+ (GLenum)target,
+ (GLuint)index,
+ (GLint *)data
+ );
+
+exit:
+ if (data_base) {
+ _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
+static void
+android_glGetIntegeri_v__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *data = (GLint *) 0;
+
+ data = (GLint *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLint *) (_dataBase + _bufferOffset);
+ }
+ glGetIntegeri_v(
+ (GLenum)target,
+ (GLuint)index,
+ (GLint *)data
+ );
+ if (_array) {
+ releasePointer(_env, _array, data, JNI_TRUE);
+ }
+}
+
+/* void glBeginTransformFeedback ( GLenum primitiveMode ) */
+static void
+android_glBeginTransformFeedback__I
+ (JNIEnv *_env, jobject _this, jint primitiveMode) {
+ glBeginTransformFeedback(
+ (GLenum)primitiveMode
+ );
+}
+
+/* void glEndTransformFeedback ( void ) */
+static void
+android_glEndTransformFeedback__
+ (JNIEnv *_env, jobject _this) {
+ glEndTransformFeedback();
+}
+
+/* void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
+static void
+android_glBindBufferRange__IIIII
+ (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer, jint offset, jint size) {
+ glBindBufferRange(
+ (GLenum)target,
+ (GLuint)index,
+ (GLuint)buffer,
+ (GLintptr)offset,
+ (GLsizeiptr)size
+ );
+}
+
+/* void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer ) */
+static void
+android_glBindBufferBase__III
+ (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer) {
+ glBindBufferBase(
+ (GLenum)target,
+ (GLuint)index,
+ (GLuint)buffer
+ );
+}
+
+/* void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) */
+static
+void
+android_glTransformFeedbackVaryings
+ (JNIEnv *_env, jobject _this, jint program, jobjectArray varyings_ref, jint bufferMode) {
+ jint _exception = 0;
+ const char* _exceptionType = NULL;
+ const char* _exceptionMessage = NULL;
+ jint _count = 0, _i;
+ const char** _varyings = NULL;
+ const char* _varying = NULL;
+
+ if (!varyings_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "varyings == null";
+ goto exit;
+ }
+
+ _count = _env->GetArrayLength(varyings_ref);
+ _varyings = (const char**)calloc(_count, sizeof(const char*));
+ for (_i = 0; _i < _count; _i++) {
+ jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
+ if (!_varying) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "null varyings element";
+ goto exit;
+ }
+ _varyings[_i] = _env->GetStringUTFChars(_varying, 0);
+ }
+
+ glTransformFeedbackVaryings(program, _count, _varyings, bufferMode);
+
+exit:
+ for (_i = _count - 1; _i >= 0; _i--) {
+ if (_varyings[_i]) {
+ jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
+ if (_varying) {
+ _env->ReleaseStringUTFChars(_varying, _varyings[_i]);
+ }
+ }
+ }
+ free(_varyings);
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
+static void
+android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI
+ (JNIEnv *_env, jobject _this, 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 _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ GLsizei *length_base = (GLsizei *) 0;
+ jint _lengthRemaining;
+ GLsizei *length = (GLsizei *) 0;
+ GLint *size_base = (GLint *) 0;
+ jint _sizeRemaining;
+ GLint *size = (GLint *) 0;
+ GLenum *type_base = (GLenum *) 0;
+ jint _typeRemaining;
+ GLenum *type = (GLenum *) 0;
+ char *name_base = (char *) 0;
+ jint _nameRemaining;
+ char *name = (char *) 0;
+
+ if (!length_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length == null";
+ goto exit;
+ }
+ if (lengthOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "lengthOffset < 0";
+ goto exit;
+ }
+ _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
+ length_base = (GLsizei *)
+ _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
+ length = length_base + lengthOffset;
+
+ if (!size_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "size == null";
+ goto exit;
+ }
+ if (sizeOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "sizeOffset < 0";
+ goto exit;
+ }
+ _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
+ size_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
+ size = size_base + sizeOffset;
+
+ if (!type_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "type == null";
+ goto exit;
+ }
+ if (typeOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "typeOffset < 0";
+ goto exit;
+ }
+ _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
+ type_base = (GLenum *)
+ _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
+ type = type_base + typeOffset;
+
+ if (!name_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "name == null";
+ goto exit;
+ }
+ if (nameOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "nameOffset < 0";
+ goto exit;
+ }
+ _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
+ name_base = (char *)
+ _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0);
+ name = name_base + nameOffset;
+
+ glGetTransformFeedbackVarying(
+ (GLuint)program,
+ (GLuint)index,
+ (GLsizei)bufsize,
+ (GLsizei *)length,
+ (GLint *)size,
+ (GLenum *)type,
+ (char *)name
+ );
+
+exit:
+ if (name_base) {
+ _env->ReleasePrimitiveArrayCritical(name_ref, name_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (type_base) {
+ _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (size_base) {
+ _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (length_base) {
+ _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
+static void
+android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
+ (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
+ jarray _lengthArray = (jarray) 0;
+ jint _lengthBufferOffset = (jint) 0;
+ jarray _sizeArray = (jarray) 0;
+ jint _sizeBufferOffset = (jint) 0;
+ jarray _typeArray = (jarray) 0;
+ jint _typeBufferOffset = (jint) 0;
+ jint _lengthRemaining;
+ GLsizei *length = (GLsizei *) 0;
+ jint _sizeRemaining;
+ GLint *size = (GLint *) 0;
+ jint _typeRemaining;
+ GLenum *type = (GLenum *) 0;
+
+ length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
+ size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
+ type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
+ if (length == NULL) {
+ char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
+ length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
+ }
+ if (size == NULL) {
+ char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
+ size = (GLint *) (_sizeBase + _sizeBufferOffset);
+ }
+ if (type == NULL) {
+ char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
+ type = (GLenum *) (_typeBase + _typeBufferOffset);
+ }
+ glGetTransformFeedbackVarying(
+ (GLuint)program,
+ (GLuint)index,
+ (GLsizei)bufsize,
+ (GLsizei *)length,
+ (GLint *)size,
+ (GLenum *)type,
+ (char *)name
+ );
+ if (_typeArray) {
+ releasePointer(_env, _typeArray, type, JNI_TRUE);
+ }
+ if (_sizeArray) {
+ releasePointer(_env, _sizeArray, size, JNI_TRUE);
+ }
+ if (_lengthArray) {
+ releasePointer(_env, _lengthArray, length, JNI_TRUE);
+ }
+}
+
+/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
+static jstring
+android_glGetTransformFeedbackVarying1
+ (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ GLint *size_base = (GLint *) 0;
+ jint _sizeRemaining;
+ GLint *size = (GLint *) 0;
+ GLenum *type_base = (GLenum *) 0;
+ jint _typeRemaining;
+ GLenum *type = (GLenum *) 0;
+
+ jstring result = 0;
+
+ GLint len = 0;
+ glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
+ if (!len) {
+ return _env->NewStringUTF("");
+ }
+ char* buf = (char*) malloc(len);
+
+ if (buf == NULL) {
+ jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
+ return NULL;
+ }
+ if (!size_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "size == null";
+ goto exit;
+ }
+ if (sizeOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "sizeOffset < 0";
+ goto exit;
+ }
+ _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
+ size_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
+ size = size_base + sizeOffset;
+
+ if (!type_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "type == null";
+ goto exit;
+ }
+ if (typeOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "typeOffset < 0";
+ goto exit;
+ }
+ _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
+ type_base = (GLenum *)
+ _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
+ type = type_base + typeOffset;
+
+ glGetTransformFeedbackVarying(
+ (GLuint)program,
+ (GLuint)index,
+ (GLsizei)len,
+ NULL,
+ (GLint *)size,
+ (GLenum *)type,
+ (char *)buf
+ );
+exit:
+ if (type_base) {
+ _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (size_base) {
+ _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception != 1) {
+ result = _env->NewStringUTF(buf);
+ }
+ if (buf) {
+ free(buf);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ if (result == 0) {
+ result = _env->NewStringUTF("");
+ }
+
+ return result;
+}
+
+/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
+static jstring
+android_glGetTransformFeedbackVarying2
+ (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) {
+ jarray _sizeArray = (jarray) 0;
+ jint _sizeBufferOffset = (jint) 0;
+ jarray _typeArray = (jarray) 0;
+ jint _typeBufferOffset = (jint) 0;
+ jint _lengthRemaining;
+ GLsizei *length = (GLsizei *) 0;
+ jint _sizeRemaining;
+ GLint *size = (GLint *) 0;
+ jint _typeRemaining;
+ GLenum *type = (GLenum *) 0;
+
+ jstring result = 0;
+
+ GLint len = 0;
+ glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
+ if (!len) {
+ return _env->NewStringUTF("");
+ }
+ char* buf = (char*) malloc(len);
+
+ if (buf == NULL) {
+ jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
+ return NULL;
+ }
+
+ size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
+ type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
+ if (size == NULL) {
+ char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
+ size = (GLint *) (_sizeBase + _sizeBufferOffset);
+ }
+ if (type == NULL) {
+ char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
+ type = (GLenum *) (_typeBase + _typeBufferOffset);
+ }
+ glGetTransformFeedbackVarying(
+ (GLuint)program,
+ (GLuint)index,
+ (GLsizei)len,
+ NULL,
+ (GLint *)size,
+ (GLenum *)type,
+ (char *)buf
+ );
+
+ if (_typeArray) {
+ releasePointer(_env, _typeArray, type, JNI_TRUE);
+ }
+ if (_sizeArray) {
+ releasePointer(_env, _sizeArray, size, JNI_TRUE);
+ }
+ result = _env->NewStringUTF(buf);
+ if (buf) {
+ free(buf);
+ }
+ return result;
+}
+/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
+static void
+android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I
+ (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *pointer = (GLvoid *) 0;
+
+ if (pointer_buf) {
+ pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
+ if ( ! pointer ) {
+ return;
+ }
+ }
+ glVertexAttribIPointerBounds(
+ (GLuint)index,
+ (GLint)size,
+ (GLenum)type,
+ (GLsizei)stride,
+ (GLvoid *)pointer,
+ (GLsizei)remaining
+ );
+}
+
+/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset ) */
+static void
+android_glVertexAttribIPointer__IIIII
+ (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jint offset) {
+ glVertexAttribIPointer(
+ (GLuint)index,
+ (GLint)size,
+ (GLenum)type,
+ (GLsizei)stride,
+ (GLvoid *)offset
+ );
+}
+
+/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
+static void
+android_glGetVertexAttribIiv__II_3II
+ (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetVertexAttribIiv(
+ (GLuint)index,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
+static void
+android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetVertexAttribIiv(
+ (GLuint)index,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
+static void
+android_glGetVertexAttribIuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *params_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetVertexAttribIuiv(
+ (GLuint)index,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
+static void
+android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLuint *) (_paramsBase + _bufferOffset);
+ }
+ glGetVertexAttribIuiv(
+ (GLuint)index,
+ (GLenum)pname,
+ (GLuint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w ) */
+static void
+android_glVertexAttribI4i__IIIII
+ (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
+ glVertexAttribI4i(
+ (GLuint)index,
+ (GLint)x,
+ (GLint)y,
+ (GLint)z,
+ (GLint)w
+ );
+}
+
+/* void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) */
+static void
+android_glVertexAttribI4ui__IIIII
+ (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
+ glVertexAttribI4ui(
+ (GLuint)index,
+ (GLuint)x,
+ (GLuint)y,
+ (GLuint)z,
+ (GLuint)w
+ );
+}
+
+/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
+static void
+android_glVertexAttribI4iv__I_3II
+ (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *v_base = (GLint *) 0;
+ jint _remaining;
+ GLint *v = (GLint *) 0;
+
+ if (!v_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(v_ref) - offset;
+ v_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
+ v = v_base + offset;
+
+ glVertexAttribI4iv(
+ (GLuint)index,
+ (GLint *)v
+ );
+
+exit:
+ if (v_base) {
+ _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
+static void
+android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *v = (GLint *) 0;
+
+ v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLint *) (_vBase + _bufferOffset);
+ }
+ glVertexAttribI4iv(
+ (GLuint)index,
+ (GLint *)v
+ );
+ if (_array) {
+ releasePointer(_env, _array, v, JNI_FALSE);
+ }
+}
+
+/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
+static void
+android_glVertexAttribI4uiv__I_3II
+ (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *v_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *v = (GLuint *) 0;
+
+ if (!v_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(v_ref) - offset;
+ v_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
+ v = v_base + offset;
+
+ glVertexAttribI4uiv(
+ (GLuint)index,
+ (GLuint *)v
+ );
+
+exit:
+ if (v_base) {
+ _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
+static void
+android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *v = (GLuint *) 0;
+
+ v = (GLuint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLuint *) (_vBase + _bufferOffset);
+ }
+ glVertexAttribI4uiv(
+ (GLuint)index,
+ (GLuint *)v
+ );
+ if (_array) {
+ releasePointer(_env, _array, v, JNI_FALSE);
+ }
+}
+
+/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
+static void
+android_glGetUniformuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *params_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetUniformuiv(
+ (GLuint)program,
+ (GLint)location,
+ (GLuint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
+static void
+android_glGetUniformuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *params = (GLuint *) 0;
+
+ params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLuint *) (_paramsBase + _bufferOffset);
+ }
+ glGetUniformuiv(
+ (GLuint)program,
+ (GLint)location,
+ (GLuint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* GLint glGetFragDataLocation ( GLuint program, const GLchar *name ) */
+static jint
+android_glGetFragDataLocation__ILjava_lang_String_2
+ (JNIEnv *_env, jobject _this, jint program, jstring name) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint _returnValue = 0;
+ const char* _nativename = 0;
+
+ if (!name) {
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "name == null";
+ goto exit;
+ }
+ _nativename = _env->GetStringUTFChars(name, 0);
+
+ _returnValue = glGetFragDataLocation(
+ (GLuint)program,
+ (GLchar *)_nativename
+ );
+
+exit:
+ if (_nativename) {
+ _env->ReleaseStringUTFChars(name, _nativename);
+ }
+
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return (jint)_returnValue;
+}
+
+/* void glUniform1ui ( GLint location, GLuint v0 ) */
+static void
+android_glUniform1ui__II
+ (JNIEnv *_env, jobject _this, jint location, jint v0) {
+ glUniform1ui(
+ (GLint)location,
+ (GLuint)v0
+ );
+}
+
+/* void glUniform2ui ( GLint location, GLuint v0, GLuint v1 ) */
+static void
+android_glUniform2ui__III
+ (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1) {
+ glUniform2ui(
+ (GLint)location,
+ (GLuint)v0,
+ (GLuint)v1
+ );
+}
+
+/* void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
+static void
+android_glUniform3ui__IIII
+ (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2) {
+ glUniform3ui(
+ (GLint)location,
+ (GLuint)v0,
+ (GLuint)v1,
+ (GLuint)v2
+ );
+}
+
+/* void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
+static void
+android_glUniform4ui__IIIII
+ (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2, jint v3) {
+ glUniform4ui(
+ (GLint)location,
+ (GLuint)v0,
+ (GLuint)v1,
+ (GLuint)v2,
+ (GLuint)v3
+ );
+}
+
+/* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform1uiv__II_3II
+ (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *value_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniform1uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform1uiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLuint *) (_valueBase + _bufferOffset);
+ }
+ glUniform1uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform2uiv__II_3II
+ (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *value_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniform2uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform2uiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLuint *) (_valueBase + _bufferOffset);
+ }
+ glUniform2uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform3uiv__II_3II
+ (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *value_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniform3uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform3uiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLuint *) (_valueBase + _bufferOffset);
+ }
+ glUniform3uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform4uiv__II_3II
+ (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *value_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glUniform4uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
+static void
+android_glUniform4uiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLuint *) (_valueBase + _bufferOffset);
+ }
+ glUniform4uiv(
+ (GLint)location,
+ (GLsizei)count,
+ (GLuint *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
+static void
+android_glClearBufferiv__II_3II
+ (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *value_base = (GLint *) 0;
+ jint _remaining;
+ GLint *value = (GLint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glClearBufferiv(
+ (GLenum)buffer,
+ (GLint)drawbuffer,
+ (GLint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
+static void
+android_glClearBufferiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *value = (GLint *) 0;
+
+ value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLint *) (_valueBase + _bufferOffset);
+ }
+ glClearBufferiv(
+ (GLenum)buffer,
+ (GLint)drawbuffer,
+ (GLint *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
+static void
+android_glClearBufferuiv__II_3II
+ (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *value_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glClearBufferuiv(
+ (GLenum)buffer,
+ (GLint)drawbuffer,
+ (GLuint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
+static void
+android_glClearBufferuiv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *value = (GLuint *) 0;
+
+ value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLuint *) (_valueBase + _bufferOffset);
+ }
+ glClearBufferuiv(
+ (GLenum)buffer,
+ (GLint)drawbuffer,
+ (GLuint *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
+static void
+android_glClearBufferfv__II_3FI
+ (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *value_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ value_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ glClearBufferfv(
+ (GLenum)buffer,
+ (GLint)drawbuffer,
+ (GLfloat *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
+static void
+android_glClearBufferfv__IILjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *value = (GLfloat *) 0;
+
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
+ glClearBufferfv(
+ (GLenum)buffer,
+ (GLint)drawbuffer,
+ (GLfloat *)value
+ );
+ if (_array) {
+ releasePointer(_env, _array, value, JNI_FALSE);
+ }
+}
+
+/* void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) */
+static void
+android_glClearBufferfi__IIFI
+ (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloat depth, jint stencil) {
+ glClearBufferfi(
+ (GLenum)buffer,
+ (GLint)drawbuffer,
+ (GLfloat)depth,
+ (GLint)stencil
+ );
+}
+
+/* const GLubyte * glGetStringi ( GLenum name, GLuint index ) */
+static jstring
+android_glGetStringi__II
+ (JNIEnv *_env, jobject _this, jint name, jint index) {
+ const GLubyte* _chars = glGetStringi((GLenum)name, (GLuint)index);
+ return _env->NewStringUTF((const char*)_chars);
+}
+
+/* void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) */
+static void
+android_glCopyBufferSubData__IIIII
+ (JNIEnv *_env, jobject _this, jint readTarget, jint writeTarget, jint readOffset, jint writeOffset, jint size) {
+ glCopyBufferSubData(
+ (GLenum)readTarget,
+ (GLenum)writeTarget,
+ (GLintptr)readOffset,
+ (GLintptr)writeOffset,
+ (GLsizeiptr)size
+ );
+}
+
+/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
+static
+void
+android_glGetUniformIndices_array
+ (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jintArray uniformIndices_ref, jint uniformIndicesOffset) {
+ jint _exception = 0;
+ const char* _exceptionType = NULL;
+ const char* _exceptionMessage = NULL;
+ jint _count = 0;
+ jint _i;
+ const char** _names = NULL;
+ GLuint* _indices_base = NULL;
+ GLuint* _indices = NULL;
+
+ if (!uniformNames_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformNames == null";
+ goto exit;
+ }
+ _count = _env->GetArrayLength(uniformNames_ref);
+ _names = (const char**)calloc(_count, sizeof(const char*));
+ for (_i = 0; _i < _count; _i++) {
+ jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
+ if (!_name) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "null uniformNames element";
+ goto exit;
+ }
+ _names[_i] = _env->GetStringUTFChars(_name, 0);
+ }
+
+ if (!uniformIndices_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformIndices == null";
+ goto exit;
+ }
+ if (uniformIndicesOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformIndicesOffset < 0";
+ goto exit;
+ }
+ if (_env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset < _count) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "not enough space in uniformIndices";
+ goto exit;
+ }
+ _indices_base = (GLuint*)_env->GetPrimitiveArrayCritical(
+ uniformIndices_ref, 0);
+ _indices = _indices_base + uniformIndicesOffset;
+
+ glGetUniformIndices(program, _count, _names, _indices);
+
+exit:
+ if (_indices_base) {
+ _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, _indices_base,
+ _exception ? JNI_ABORT : 0);
+ }
+ for (_i = _count - 1; _i >= 0; _i--) {
+ if (_names[_i]) {
+ jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
+ if (_name) {
+ _env->ReleaseStringUTFChars(_name, _names[_i]);
+ }
+ }
+ }
+ free(_names);
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
+static
+void
+android_glGetUniformIndices_buffer
+ (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jobject uniformIndices_buf) {
+ jint _exception = 0;
+ const char* _exceptionType = NULL;
+ const char* _exceptionMessage = NULL;
+ jint _count = 0;
+ jint _i;
+ const char** _names = NULL;
+ jarray _uniformIndicesArray = (jarray)0;
+ jint _uniformIndicesRemaining;
+ jint _uniformIndicesOffset = 0;
+ GLuint* _indices = NULL;
+ char* _indicesBase = NULL;
+
+ if (!uniformNames_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformNames == null";
+ goto exit;
+ }
+ if (!uniformIndices_buf) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformIndices == null";
+ goto exit;
+ }
+
+ _count = _env->GetArrayLength(uniformNames_ref);
+ _names = (const char**)calloc(_count, sizeof(const char*));
+ for (_i = 0; _i < _count; _i++) {
+ jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
+ if (!_name) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "null uniformNames element";
+ goto exit;
+ }
+ _names[_i] = _env->GetStringUTFChars(_name, 0);
+ }
+
+ _indices = (GLuint*)getPointer(_env, uniformIndices_buf,
+ &_uniformIndicesArray, &_uniformIndicesRemaining,
+ &_uniformIndicesOffset);
+ if (!_indices) {
+ _indicesBase = (char*)_env->GetPrimitiveArrayCritical(
+ _uniformIndicesArray, 0);
+ _indices = (GLuint*)(_indicesBase + _uniformIndicesOffset);
+ }
+ if (_uniformIndicesRemaining < _count) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "not enough space in uniformIndices";
+ goto exit;
+ }
+
+ glGetUniformIndices(program, _count, _names, _indices);
+
+exit:
+ if (_uniformIndicesArray) {
+ releasePointer(_env, _uniformIndicesArray, _indicesBase, JNI_TRUE);
+ }
+ for (_i = _count - 1; _i >= 0; _i--) {
+ if (_names[_i]) {
+ jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
+ if (_name) {
+ _env->ReleaseStringUTFChars(_name, _names[_i]);
+ }
+ }
+ }
+ free(_names);
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
+static void
+android_glGetActiveUniformsiv__II_3III_3II
+ (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jintArray uniformIndices_ref, jint uniformIndicesOffset, jint pname, jintArray params_ref, jint paramsOffset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *uniformIndices_base = (GLuint *) 0;
+ jint _uniformIndicesRemaining;
+ GLuint *uniformIndices = (GLuint *) 0;
+ GLint *params_base = (GLint *) 0;
+ jint _paramsRemaining;
+ GLint *params = (GLint *) 0;
+
+ if (!uniformIndices_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformIndices == null";
+ goto exit;
+ }
+ if (uniformIndicesOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformIndicesOffset < 0";
+ goto exit;
+ }
+ _uniformIndicesRemaining = _env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset;
+ uniformIndices_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(uniformIndices_ref, (jboolean *)0);
+ uniformIndices = uniformIndices_base + uniformIndicesOffset;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (paramsOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "paramsOffset < 0";
+ goto exit;
+ }
+ _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
+ params_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + paramsOffset;
+
+ glGetActiveUniformsiv(
+ (GLuint)program,
+ (GLsizei)uniformCount,
+ (GLuint *)uniformIndices,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (uniformIndices_base) {
+ _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, uniformIndices_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
+static void
+android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jobject uniformIndices_buf, jint pname, jobject params_buf) {
+ jarray _uniformIndicesArray = (jarray) 0;
+ jint _uniformIndicesBufferOffset = (jint) 0;
+ jarray _paramsArray = (jarray) 0;
+ jint _paramsBufferOffset = (jint) 0;
+ jint _uniformIndicesRemaining;
+ GLuint *uniformIndices = (GLuint *) 0;
+ jint _paramsRemaining;
+ GLint *params = (GLint *) 0;
+
+ uniformIndices = (GLuint *)getPointer(_env, uniformIndices_buf, &_uniformIndicesArray, &_uniformIndicesRemaining, &_uniformIndicesBufferOffset);
+ params = (GLint *)getPointer(_env, params_buf, &_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
+ if (uniformIndices == NULL) {
+ char * _uniformIndicesBase = (char *)_env->GetPrimitiveArrayCritical(_uniformIndicesArray, (jboolean *) 0);
+ uniformIndices = (GLuint *) (_uniformIndicesBase + _uniformIndicesBufferOffset);
+ }
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_paramsArray, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _paramsBufferOffset);
+ }
+ glGetActiveUniformsiv(
+ (GLuint)program,
+ (GLsizei)uniformCount,
+ (GLuint *)uniformIndices,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_paramsArray) {
+ releasePointer(_env, _paramsArray, params, JNI_TRUE);
+ }
+ if (_uniformIndicesArray) {
+ releasePointer(_env, _uniformIndicesArray, uniformIndices, JNI_FALSE);
+ }
+}
+
+/* GLuint glGetUniformBlockIndex ( GLuint program, const GLchar *uniformBlockName ) */
+static jint
+android_glGetUniformBlockIndex__ILjava_lang_String_2
+ (JNIEnv *_env, jobject _this, jint program, jstring uniformBlockName) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint _returnValue = 0;
+ const char* _nativeuniformBlockName = 0;
+
+ if (!uniformBlockName) {
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformBlockName == null";
+ goto exit;
+ }
+ _nativeuniformBlockName = _env->GetStringUTFChars(uniformBlockName, 0);
+
+ _returnValue = glGetUniformBlockIndex(
+ (GLuint)program,
+ (GLchar *)_nativeuniformBlockName
+ );
+
+exit:
+ if (_nativeuniformBlockName) {
+ _env->ReleaseStringUTFChars(uniformBlockName, _nativeuniformBlockName);
+ }
+
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return (jint)_returnValue;
+}
+
+/* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
+static void
+android_glGetActiveUniformBlockiv__III_3II
+ (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetActiveUniformBlockiv(
+ (GLuint)program,
+ (GLuint)uniformBlockIndex,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
+static void
+android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetActiveUniformBlockiv(
+ (GLuint)program,
+ (GLuint)uniformBlockIndex,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
+static void
+android_glGetActiveUniformBlockName_III_3II_3BI
+ (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, int bufSize, jintArray length_ref, jint lengthOffset, jbyteArray name_ref, jint nameOffset) {
+ jint _exception = 0;
+ const char* _exceptionType;
+ const char* _exceptionMessage;
+ GLsizei* _length_base = (GLsizei*)0;
+ jint _lengthRemaining;
+ GLsizei* _length = (GLsizei*)0;
+ GLchar* _name_base = (GLchar*)0;
+ jint _nameRemaining;
+ GLchar* _name = (GLchar*)0;
+
+ if (!length_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length == null";
+ goto exit;
+ }
+ if (lengthOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "lengthOffset < 0";
+ goto exit;
+ }
+ _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
+ _length_base = (GLsizei*)_env->GetPrimitiveArrayCritical(
+ length_ref, (jboolean*)0);
+ _length = _length_base + lengthOffset;
+
+ if (!name_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformBlockName == null";
+ goto exit;
+ }
+ if (nameOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "uniformBlockNameOffset < 0";
+ goto exit;
+ }
+ _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
+ _name_base = (GLchar*)_env->GetPrimitiveArrayCritical(
+ name_ref, (jboolean*)0);
+ _name = _name_base + nameOffset;
+
+ glGetActiveUniformBlockName(
+ (GLuint)program,
+ (GLuint)uniformBlockIndex,
+ (GLsizei)bufSize,
+ (GLsizei*)_length,
+ (GLchar*)_name
+ );
+
+exit:
+ if (_name_base) {
+ _env->ReleasePrimitiveArrayCritical(name_ref, _name_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_length_base) {
+ _env->ReleasePrimitiveArrayCritical(length_ref, _length_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
+static void
+android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2
+ (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, jobject length_buf, jobject uniformBlockName_buf) {
+ jint _exception = 0;
+ const char* _exceptionType;
+ const char* _exceptionMessage;
+ jarray _lengthArray = (jarray)0;
+ jint _lengthBufferOffset = (jint)0;
+ GLsizei* _length = (GLsizei*)0;
+ jint _lengthRemaining;
+ jarray _nameArray = (jarray)0;
+ jint _nameBufferOffset = (jint)0;
+ GLchar* _name = (GLchar*)0;
+ jint _nameRemaining;
+
+ _length = (GLsizei*)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
+ if (_length == NULL) {
+ GLsizei* _lengthBase = (GLsizei*)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean*)0);
+ _length = (GLsizei*)(_lengthBase + _lengthBufferOffset);
+ }
+
+ _name = (GLchar*)getPointer(_env, uniformBlockName_buf, &_nameArray, &_nameRemaining, &_nameBufferOffset);
+ if (_name == NULL) {
+ GLchar* _nameBase = (GLchar*)_env->GetPrimitiveArrayCritical(_nameArray, (jboolean*)0);
+ _name = (GLchar*)(_nameBase + _nameBufferOffset);
+ }
+
+ glGetActiveUniformBlockName(
+ (GLuint)program,
+ (GLuint)uniformBlockIndex,
+ (GLsizei)_nameRemaining,
+ _length, _name
+ );
+ if (_nameArray) {
+ releasePointer(_env, _nameArray, _name, JNI_TRUE);
+ }
+ if (_lengthArray) {
+ releasePointer(_env, _lengthArray, _length, JNI_TRUE);
+ }
+}
+
+/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
+static jstring
+android_glGetActiveUniformBlockName_II
+ (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex) {
+ GLint len = 0;
+ glGetActiveUniformBlockiv((GLuint)program, (GLuint)uniformBlockIndex,
+ GL_UNIFORM_BLOCK_NAME_LENGTH, &len);
+ GLchar* name = (GLchar*)malloc(len);
+ glGetActiveUniformBlockName((GLuint)program, (GLuint)uniformBlockIndex,
+ len, NULL, name);
+ jstring result = _env->NewStringUTF(name);
+ free(name);
+ return result;
+}
+
+/* void glUniformBlockBinding ( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) */
+static void
+android_glUniformBlockBinding__III
+ (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint uniformBlockBinding) {
+ glUniformBlockBinding(
+ (GLuint)program,
+ (GLuint)uniformBlockIndex,
+ (GLuint)uniformBlockBinding
+ );
+}
+
+/* void glDrawArraysInstanced ( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) */
+static void
+android_glDrawArraysInstanced__IIII
+ (JNIEnv *_env, jobject _this, jint mode, jint first, jint count, jint instanceCount) {
+ glDrawArraysInstanced(
+ (GLenum)mode,
+ (GLint)first,
+ (GLsizei)count,
+ (GLsizei)instanceCount
+ );
+}
+
+/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
+static void
+android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I
+ (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *indices = (GLvoid *) 0;
+
+ indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (GLvoid *) (_indicesBase + _bufferOffset);
+ }
+ glDrawElementsInstanced(
+ (GLenum)mode,
+ (GLsizei)count,
+ (GLenum)type,
+ (GLvoid *)indices,
+ (GLsizei)instanceCount
+ );
+ if (_array) {
+ releasePointer(_env, _array, indices, JNI_FALSE);
+ }
+}
+
+/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
+static void
+android_glDrawElementsInstanced__IIIII
+ (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount) {
+ glDrawElementsInstanced(
+ (GLenum)mode,
+ (GLsizei)count,
+ (GLenum)type,
+ (GLvoid *)indicesOffset,
+ (GLsizei)instanceCount
+ );
+}
+
+/* GLsync glFenceSync ( GLenum condition, GLbitfield flags ) */
+static jlong
+android_glFenceSync__II
+ (JNIEnv *_env, jobject _this, jint condition, jint flags) {
+ GLsync _returnValue;
+ _returnValue = glFenceSync(
+ (GLenum)condition,
+ (GLbitfield)flags
+ );
+ return (jlong)_returnValue;
+}
+
+/* GLboolean glIsSync ( GLsync sync ) */
+static jboolean
+android_glIsSync__J
+ (JNIEnv *_env, jobject _this, jlong sync) {
+ GLboolean _returnValue;
+ _returnValue = glIsSync(
+ (GLsync)sync
+ );
+ return (jboolean)_returnValue;
+}
+
+/* void glDeleteSync ( GLsync sync ) */
+static void
+android_glDeleteSync__J
+ (JNIEnv *_env, jobject _this, jlong sync) {
+ glDeleteSync(
+ (GLsync)sync
+ );
+}
+
+/* GLenum glClientWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
+static jint
+android_glClientWaitSync__JIJ
+ (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
+ GLenum _returnValue;
+ _returnValue = glClientWaitSync(
+ (GLsync)sync,
+ (GLbitfield)flags,
+ (GLuint64)timeout
+ );
+ return (jint)_returnValue;
+}
+
+/* void glWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
+static void
+android_glWaitSync__JIJ
+ (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
+ glWaitSync(
+ (GLsync)sync,
+ (GLbitfield)flags,
+ (GLuint64)timeout
+ );
+}
+
+/* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
+static void
+android_glGetInteger64v__I_3JI
+ (JNIEnv *_env, jobject _this, jint pname, jlongArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint64 *params_base = (GLint64 *) 0;
+ jint _remaining;
+ GLint64 *params = (GLint64 *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint64 *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetInteger64v(
+ (GLenum)pname,
+ (GLint64 *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
+static void
+android_glGetInteger64v__ILjava_nio_LongBuffer_2
+ (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint64 *params = (GLint64 *) 0;
+
+ params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint64 *) (_paramsBase + _bufferOffset);
+ }
+ glGetInteger64v(
+ (GLenum)pname,
+ (GLint64 *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
+static void
+android_glGetSynciv__JII_3II_3II
+ (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray values_ref, jint valuesOffset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLsizei *length_base = (GLsizei *) 0;
+ jint _lengthRemaining;
+ GLsizei *length = (GLsizei *) 0;
+ GLint *values_base = (GLint *) 0;
+ jint _valuesRemaining;
+ GLint *values = (GLint *) 0;
+
+ if (!length_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length == null";
+ goto exit;
+ }
+ if (lengthOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "lengthOffset < 0";
+ goto exit;
+ }
+ _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
+ length_base = (GLsizei *)
+ _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
+ length = length_base + lengthOffset;
+
+ if (!values_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "values == null";
+ goto exit;
+ }
+ if (valuesOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "valuesOffset < 0";
+ goto exit;
+ }
+ _valuesRemaining = _env->GetArrayLength(values_ref) - valuesOffset;
+ values_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
+ values = values_base + valuesOffset;
+
+ glGetSynciv(
+ (GLsync)sync,
+ (GLenum)pname,
+ (GLsizei)bufSize,
+ (GLsizei *)length,
+ (GLint *)values
+ );
+
+exit:
+ if (values_base) {
+ _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (length_base) {
+ _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
+static void
+android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jobject length_buf, jobject values_buf) {
+ jarray _lengthArray = (jarray) 0;
+ jint _lengthBufferOffset = (jint) 0;
+ jarray _valuesArray = (jarray) 0;
+ jint _valuesBufferOffset = (jint) 0;
+ jint _lengthRemaining;
+ GLsizei *length = (GLsizei *) 0;
+ jint _valuesRemaining;
+ GLint *values = (GLint *) 0;
+
+ length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
+ values = (GLint *)getPointer(_env, values_buf, &_valuesArray, &_valuesRemaining, &_valuesBufferOffset);
+ if (length == NULL) {
+ char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
+ length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
+ }
+ if (values == NULL) {
+ char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_valuesArray, (jboolean *) 0);
+ values = (GLint *) (_valuesBase + _valuesBufferOffset);
+ }
+ glGetSynciv(
+ (GLsync)sync,
+ (GLenum)pname,
+ (GLsizei)bufSize,
+ (GLsizei *)length,
+ (GLint *)values
+ );
+ if (_valuesArray) {
+ releasePointer(_env, _valuesArray, values, JNI_TRUE);
+ }
+ if (_lengthArray) {
+ releasePointer(_env, _lengthArray, length, JNI_TRUE);
+ }
+}
+
+/* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
+static void
+android_glGetInteger64i_v__II_3JI
+ (JNIEnv *_env, jobject _this, jint target, jint index, jlongArray data_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint64 *data_base = (GLint64 *) 0;
+ jint _remaining;
+ GLint64 *data = (GLint64 *) 0;
+
+ if (!data_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "data == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(data_ref) - offset;
+ data_base = (GLint64 *)
+ _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
+ data = data_base + offset;
+
+ glGetInteger64i_v(
+ (GLenum)target,
+ (GLuint)index,
+ (GLint64 *)data
+ );
+
+exit:
+ if (data_base) {
+ _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
+static void
+android_glGetInteger64i_v__IILjava_nio_LongBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint64 *data = (GLint64 *) 0;
+
+ data = (GLint64 *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLint64 *) (_dataBase + _bufferOffset);
+ }
+ glGetInteger64i_v(
+ (GLenum)target,
+ (GLuint)index,
+ (GLint64 *)data
+ );
+ if (_array) {
+ releasePointer(_env, _array, data, JNI_TRUE);
+ }
+}
+
+/* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
+static void
+android_glGetBufferParameteri64v__II_3JI
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jlongArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint64 *params_base = (GLint64 *) 0;
+ jint _remaining;
+ GLint64 *params = (GLint64 *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint64 *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetBufferParameteri64v(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint64 *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
+static void
+android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint64 *params = (GLint64 *) 0;
+
+ params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint64 *) (_paramsBase + _bufferOffset);
+ }
+ glGetBufferParameteri64v(
+ (GLenum)target,
+ (GLenum)pname,
+ (GLint64 *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
+static void
+android_glGenSamplers__I_3II
+ (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *samplers_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *samplers = (GLuint *) 0;
+
+ if (!samplers_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "samplers == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(samplers_ref) - offset;
+ samplers_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
+ samplers = samplers_base + offset;
+
+ glGenSamplers(
+ (GLsizei)count,
+ (GLuint *)samplers
+ );
+
+exit:
+ if (samplers_base) {
+ _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
+static void
+android_glGenSamplers__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *samplers = (GLuint *) 0;
+
+ samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
+ if (samplers == NULL) {
+ char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ samplers = (GLuint *) (_samplersBase + _bufferOffset);
+ }
+ glGenSamplers(
+ (GLsizei)count,
+ (GLuint *)samplers
+ );
+ if (_array) {
+ releasePointer(_env, _array, samplers, JNI_TRUE);
+ }
+}
+
+/* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
+static void
+android_glDeleteSamplers__I_3II
+ (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *samplers_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *samplers = (GLuint *) 0;
+
+ if (!samplers_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "samplers == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(samplers_ref) - offset;
+ samplers_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
+ samplers = samplers_base + offset;
+
+ glDeleteSamplers(
+ (GLsizei)count,
+ (GLuint *)samplers
+ );
+
+exit:
+ if (samplers_base) {
+ _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
+static void
+android_glDeleteSamplers__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *samplers = (GLuint *) 0;
+
+ samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
+ if (samplers == NULL) {
+ char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ samplers = (GLuint *) (_samplersBase + _bufferOffset);
+ }
+ glDeleteSamplers(
+ (GLsizei)count,
+ (GLuint *)samplers
+ );
+ if (_array) {
+ releasePointer(_env, _array, samplers, JNI_FALSE);
+ }
+}
+
+/* GLboolean glIsSampler ( GLuint sampler ) */
+static jboolean
+android_glIsSampler__I
+ (JNIEnv *_env, jobject _this, jint sampler) {
+ GLboolean _returnValue;
+ _returnValue = glIsSampler(
+ (GLuint)sampler
+ );
+ return (jboolean)_returnValue;
+}
+
+/* void glBindSampler ( GLuint unit, GLuint sampler ) */
+static void
+android_glBindSampler__II
+ (JNIEnv *_env, jobject _this, jint unit, jint sampler) {
+ glBindSampler(
+ (GLuint)unit,
+ (GLuint)sampler
+ );
+}
+
+/* void glSamplerParameteri ( GLuint sampler, GLenum pname, GLint param ) */
+static void
+android_glSamplerParameteri__III
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jint param) {
+ glSamplerParameteri(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint)param
+ );
+}
+
+/* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
+static void
+android_glSamplerParameteriv__II_3II
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *param_base = (GLint *) 0;
+ jint _remaining;
+ GLint *param = (GLint *) 0;
+
+ if (!param_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "param == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(param_ref) - offset;
+ param_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
+ param = param_base + offset;
+
+ glSamplerParameteriv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)param
+ );
+
+exit:
+ if (param_base) {
+ _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
+static void
+android_glSamplerParameteriv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *param = (GLint *) 0;
+
+ param = (GLint *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
+ if (param == NULL) {
+ char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ param = (GLint *) (_paramBase + _bufferOffset);
+ }
+ glSamplerParameteriv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)param
+ );
+ if (_array) {
+ releasePointer(_env, _array, param, JNI_FALSE);
+ }
+}
+
+/* void glSamplerParameterf ( GLuint sampler, GLenum pname, GLfloat param ) */
+static void
+android_glSamplerParameterf__IIF
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloat param) {
+ glSamplerParameterf(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLfloat)param
+ );
+}
+
+/* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
+static void
+android_glSamplerParameterfv__II_3FI
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray param_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *param_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *param = (GLfloat *) 0;
+
+ if (!param_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "param == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(param_ref) - offset;
+ param_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
+ param = param_base + offset;
+
+ glSamplerParameterfv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLfloat *)param
+ );
+
+exit:
+ if (param_base) {
+ _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
+static void
+android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *param = (GLfloat *) 0;
+
+ param = (GLfloat *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
+ if (param == NULL) {
+ char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ param = (GLfloat *) (_paramBase + _bufferOffset);
+ }
+ glSamplerParameterfv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLfloat *)param
+ );
+ if (_array) {
+ releasePointer(_env, _array, param, JNI_FALSE);
+ }
+}
+
+/* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
+static void
+android_glGetSamplerParameteriv__II_3II
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetSamplerParameteriv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
+static void
+android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetSamplerParameteriv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
+static void
+android_glGetSamplerParameterfv__II_3FI
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLfloat *params_base = (GLfloat *) 0;
+ jint _remaining;
+ GLfloat *params = (GLfloat *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLfloat *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetSamplerParameterfv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLfloat *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
+static void
+android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2
+ (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLfloat *params = (GLfloat *) 0;
+
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
+ glGetSamplerParameterfv(
+ (GLuint)sampler,
+ (GLenum)pname,
+ (GLfloat *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+/* void glVertexAttribDivisor ( GLuint index, GLuint divisor ) */
+static void
+android_glVertexAttribDivisor__II
+ (JNIEnv *_env, jobject _this, jint index, jint divisor) {
+ glVertexAttribDivisor(
+ (GLuint)index,
+ (GLuint)divisor
+ );
+}
+
+/* void glBindTransformFeedback ( GLenum target, GLuint id ) */
+static void
+android_glBindTransformFeedback__II
+ (JNIEnv *_env, jobject _this, jint target, jint id) {
+ glBindTransformFeedback(
+ (GLenum)target,
+ (GLuint)id
+ );
+}
+
+/* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
+static void
+android_glDeleteTransformFeedbacks__I_3II
+ (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *ids_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ if (!ids_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "ids == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(ids_ref) - offset;
+ ids_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
+ ids = ids_base + offset;
+
+ glDeleteTransformFeedbacks(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+
+exit:
+ if (ids_base) {
+ _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
+static void
+android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
+ if (ids == NULL) {
+ char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ ids = (GLuint *) (_idsBase + _bufferOffset);
+ }
+ glDeleteTransformFeedbacks(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+ if (_array) {
+ releasePointer(_env, _array, ids, JNI_FALSE);
+ }
+}
+
+/* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
+static void
+android_glGenTransformFeedbacks__I_3II
+ (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLuint *ids_base = (GLuint *) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ if (!ids_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "ids == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(ids_ref) - offset;
+ ids_base = (GLuint *)
+ _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
+ ids = ids_base + offset;
+
+ glGenTransformFeedbacks(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+
+exit:
+ if (ids_base) {
+ _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
+static void
+android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLuint *ids = (GLuint *) 0;
+
+ ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
+ if (ids == NULL) {
+ char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ ids = (GLuint *) (_idsBase + _bufferOffset);
+ }
+ glGenTransformFeedbacks(
+ (GLsizei)n,
+ (GLuint *)ids
+ );
+ if (_array) {
+ releasePointer(_env, _array, ids, JNI_TRUE);
+ }
+}
+
+/* GLboolean glIsTransformFeedback ( GLuint id ) */
+static jboolean
+android_glIsTransformFeedback__I
+ (JNIEnv *_env, jobject _this, jint id) {
+ GLboolean _returnValue;
+ _returnValue = glIsTransformFeedback(
+ (GLuint)id
+ );
+ return (jboolean)_returnValue;
+}
+
+/* void glPauseTransformFeedback ( void ) */
+static void
+android_glPauseTransformFeedback__
+ (JNIEnv *_env, jobject _this) {
+ glPauseTransformFeedback();
+}
+
+/* void glResumeTransformFeedback ( void ) */
+static void
+android_glResumeTransformFeedback__
+ (JNIEnv *_env, jobject _this) {
+ glResumeTransformFeedback();
+}
+
+/* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
+static void
+android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray binaryFormat_ref, jint binaryFormatOffset, jobject binary_buf) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ GLsizei *length_base = (GLsizei *) 0;
+ jint _lengthRemaining;
+ GLsizei *length = (GLsizei *) 0;
+ GLenum *binaryFormat_base = (GLenum *) 0;
+ jint _binaryFormatRemaining;
+ GLenum *binaryFormat = (GLenum *) 0;
+ jint _binaryRemaining;
+ GLvoid *binary = (GLvoid *) 0;
+
+ if (!length_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length == null";
+ goto exit;
+ }
+ if (lengthOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "lengthOffset < 0";
+ goto exit;
+ }
+ _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
+ length_base = (GLsizei *)
+ _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
+ length = length_base + lengthOffset;
+
+ if (!binaryFormat_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "binaryFormat == null";
+ goto exit;
+ }
+ if (binaryFormatOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "binaryFormatOffset < 0";
+ goto exit;
+ }
+ _binaryFormatRemaining = _env->GetArrayLength(binaryFormat_ref) - binaryFormatOffset;
+ binaryFormat_base = (GLenum *)
+ _env->GetPrimitiveArrayCritical(binaryFormat_ref, (jboolean *)0);
+ binaryFormat = binaryFormat_base + binaryFormatOffset;
+
+ binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining, &_bufferOffset);
+ if (binary == NULL) {
+ char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ binary = (GLvoid *) (_binaryBase + _bufferOffset);
+ }
+ glGetProgramBinary(
+ (GLuint)program,
+ (GLsizei)bufSize,
+ (GLsizei *)length,
+ (GLenum *)binaryFormat,
+ (GLvoid *)binary
+ );
+
+exit:
+ if (_array) {
+ releasePointer(_env, _array, binary, _exception ? JNI_FALSE : JNI_TRUE);
+ }
+ if (binaryFormat_base) {
+ _env->ReleasePrimitiveArrayCritical(binaryFormat_ref, binaryFormat_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (length_base) {
+ _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
+static void
+android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2
+ (JNIEnv *_env, jobject _this, jint program, jint bufSize, jobject length_buf, jobject binaryFormat_buf, jobject binary_buf) {
+ jarray _lengthArray = (jarray) 0;
+ jint _lengthBufferOffset = (jint) 0;
+ jarray _binaryFormatArray = (jarray) 0;
+ jint _binaryFormatBufferOffset = (jint) 0;
+ jarray _binaryArray = (jarray) 0;
+ jint _binaryBufferOffset = (jint) 0;
+ jint _lengthRemaining;
+ GLsizei *length = (GLsizei *) 0;
+ jint _binaryFormatRemaining;
+ GLenum *binaryFormat = (GLenum *) 0;
+ jint _binaryRemaining;
+ GLvoid *binary = (GLvoid *) 0;
+
+ length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
+ binaryFormat = (GLenum *)getPointer(_env, binaryFormat_buf, &_binaryFormatArray, &_binaryFormatRemaining, &_binaryFormatBufferOffset);
+ binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining, &_binaryBufferOffset);
+ if (length == NULL) {
+ char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
+ length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
+ }
+ if (binaryFormat == NULL) {
+ char * _binaryFormatBase = (char *)_env->GetPrimitiveArrayCritical(_binaryFormatArray, (jboolean *) 0);
+ binaryFormat = (GLenum *) (_binaryFormatBase + _binaryFormatBufferOffset);
+ }
+ if (binary == NULL) {
+ char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_binaryArray, (jboolean *) 0);
+ binary = (GLvoid *) (_binaryBase + _binaryBufferOffset);
+ }
+ glGetProgramBinary(
+ (GLuint)program,
+ (GLsizei)bufSize,
+ (GLsizei *)length,
+ (GLenum *)binaryFormat,
+ (GLvoid *)binary
+ );
+ if (_binaryArray) {
+ releasePointer(_env, _binaryArray, binary, JNI_TRUE);
+ }
+ if (_binaryFormatArray) {
+ releasePointer(_env, _binaryFormatArray, binaryFormat, JNI_TRUE);
+ }
+ if (_lengthArray) {
+ releasePointer(_env, _lengthArray, length, JNI_TRUE);
+ }
+}
+
+/* void glProgramBinary ( GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length ) */
+static void
+android_glProgramBinary__IILjava_nio_Buffer_2I
+ (JNIEnv *_env, jobject _this, jint program, jint binaryFormat, jobject binary_buf, jint length) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLvoid *binary = (GLvoid *) 0;
+
+ binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_remaining, &_bufferOffset);
+ if (binary == NULL) {
+ char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ binary = (GLvoid *) (_binaryBase + _bufferOffset);
+ }
+ glProgramBinary(
+ (GLuint)program,
+ (GLenum)binaryFormat,
+ (GLvoid *)binary,
+ (GLsizei)length
+ );
+ if (_array) {
+ releasePointer(_env, _array, binary, JNI_FALSE);
+ }
+}
+
+/* void glProgramParameteri ( GLuint program, GLenum pname, GLint value ) */
+static void
+android_glProgramParameteri__III
+ (JNIEnv *_env, jobject _this, jint program, jint pname, jint value) {
+ glProgramParameteri(
+ (GLuint)program,
+ (GLenum)pname,
+ (GLint)value
+ );
+}
+
+/* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
+static void
+android_glInvalidateFramebuffer__II_3II
+ (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLenum *attachments_base = (GLenum *) 0;
+ jint _remaining;
+ GLenum *attachments = (GLenum *) 0;
+
+ if (!attachments_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attachments == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(attachments_ref) - offset;
+ attachments_base = (GLenum *)
+ _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
+ attachments = attachments_base + offset;
+
+ glInvalidateFramebuffer(
+ (GLenum)target,
+ (GLsizei)numAttachments,
+ (GLenum *)attachments
+ );
+
+exit:
+ if (attachments_base) {
+ _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
+static void
+android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLenum *attachments = (GLenum *) 0;
+
+ attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
+ if (attachments == NULL) {
+ char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
+ }
+ glInvalidateFramebuffer(
+ (GLenum)target,
+ (GLsizei)numAttachments,
+ (GLenum *)attachments
+ );
+ if (_array) {
+ releasePointer(_env, _array, attachments, JNI_FALSE);
+ }
+}
+
+/* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
+static void
+android_glInvalidateSubFramebuffer__II_3IIIIII
+ (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset, jint x, jint y, jint width, jint height) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLenum *attachments_base = (GLenum *) 0;
+ jint _remaining;
+ GLenum *attachments = (GLenum *) 0;
+
+ if (!attachments_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attachments == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(attachments_ref) - offset;
+ attachments_base = (GLenum *)
+ _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
+ attachments = attachments_base + offset;
+
+ glInvalidateSubFramebuffer(
+ (GLenum)target,
+ (GLsizei)numAttachments,
+ (GLenum *)attachments,
+ (GLint)x,
+ (GLint)y,
+ (GLsizei)width,
+ (GLsizei)height
+ );
+
+exit:
+ if (attachments_base) {
+ _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
+static void
+android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII
+ (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf, jint x, jint y, jint width, jint height) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLenum *attachments = (GLenum *) 0;
+
+ attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
+ if (attachments == NULL) {
+ char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
+ }
+ glInvalidateSubFramebuffer(
+ (GLenum)target,
+ (GLsizei)numAttachments,
+ (GLenum *)attachments,
+ (GLint)x,
+ (GLint)y,
+ (GLsizei)width,
+ (GLsizei)height
+ );
+ if (_array) {
+ releasePointer(_env, _array, attachments, JNI_FALSE);
+ }
+}
+
+/* void glTexStorage2D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) */
+static void
+android_glTexStorage2D__IIIII
+ (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height) {
+ glTexStorage2D(
+ (GLenum)target,
+ (GLsizei)levels,
+ (GLenum)internalformat,
+ (GLsizei)width,
+ (GLsizei)height
+ );
+}
+
+/* void glTexStorage3D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) */
+static void
+android_glTexStorage3D__IIIIII
+ (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) {
+ glTexStorage3D(
+ (GLenum)target,
+ (GLsizei)levels,
+ (GLenum)internalformat,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLsizei)depth
+ );
+}
+
+/* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
+static void
+android_glGetInternalformativ__IIII_3II
+ (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
+ GLint *params_base = (GLint *) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ params_base = (GLint *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ glGetInternalformativ(
+ (GLenum)target,
+ (GLenum)internalformat,
+ (GLenum)pname,
+ (GLsizei)bufSize,
+ (GLint *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+/* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
+static void
+android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2
+ (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jobject params_buf) {
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ GLint *params = (GLint *) 0;
+
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
+ glGetInternalformativ(
+ (GLenum)target,
+ (GLenum)internalformat,
+ (GLenum)pname,
+ (GLsizei)bufSize,
+ (GLint *)params
+ );
+ if (_array) {
+ releasePointer(_env, _array, params, JNI_TRUE);
+ }
+}
+
+static const char *classPathName = "android/opengl/GLES30";
+
+static JNINativeMethod methods[] = {
+{"_nativeClassInit", "()V", (void*)nativeClassInit },
+{"glReadBuffer", "(I)V", (void *) android_glReadBuffer__I },
+{"glDrawRangeElements", "(IIIIILjava/nio/Buffer;)V", (void *) android_glDrawRangeElements__IIIIILjava_nio_Buffer_2 },
+{"glDrawRangeElements", "(IIIIII)V", (void *) android_glDrawRangeElements__IIIIII },
+{"glTexImage3D", "(IIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2 },
+{"glTexImage3D", "(IIIIIIIIII)V", (void *) android_glTexImage3D__IIIIIIIIII },
+{"glTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
+{"glTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glTexSubImage3D__IIIIIIIIIII },
+{"glCopyTexSubImage3D", "(IIIIIIIII)V", (void *) android_glCopyTexSubImage3D__IIIIIIIII },
+{"glCompressedTexImage3D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2 },
+{"glCompressedTexImage3D", "(IIIIIIIII)V", (void *) android_glCompressedTexImage3D__IIIIIIIII },
+{"glCompressedTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
+{"glCompressedTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIII },
+{"glGenQueries", "(I[II)V", (void *) android_glGenQueries__I_3II },
+{"glGenQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenQueries__ILjava_nio_IntBuffer_2 },
+{"glDeleteQueries", "(I[II)V", (void *) android_glDeleteQueries__I_3II },
+{"glDeleteQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteQueries__ILjava_nio_IntBuffer_2 },
+{"glIsQuery", "(I)Z", (void *) android_glIsQuery__I },
+{"glBeginQuery", "(II)V", (void *) android_glBeginQuery__II },
+{"glEndQuery", "(I)V", (void *) android_glEndQuery__I },
+{"glGetQueryiv", "(II[II)V", (void *) android_glGetQueryiv__II_3II },
+{"glGetQueryiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryiv__IILjava_nio_IntBuffer_2 },
+{"glGetQueryObjectuiv", "(II[II)V", (void *) android_glGetQueryObjectuiv__II_3II },
+{"glGetQueryObjectuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2 },
+{"glUnmapBuffer", "(I)Z", (void *) android_glUnmapBuffer__I },
+{"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II },
+{"glDrawBuffers", "(I[II)V", (void *) android_glDrawBuffers__I_3II },
+{"glDrawBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDrawBuffers__ILjava_nio_IntBuffer_2 },
+{"glUniformMatrix2x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x3fv__IIZ_3FI },
+{"glUniformMatrix2x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2 },
+{"glUniformMatrix3x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x2fv__IIZ_3FI },
+{"glUniformMatrix3x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2 },
+{"glUniformMatrix2x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x4fv__IIZ_3FI },
+{"glUniformMatrix2x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2 },
+{"glUniformMatrix4x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x2fv__IIZ_3FI },
+{"glUniformMatrix4x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2 },
+{"glUniformMatrix3x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x4fv__IIZ_3FI },
+{"glUniformMatrix3x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2 },
+{"glUniformMatrix4x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x3fv__IIZ_3FI },
+{"glUniformMatrix4x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2 },
+{"glBlitFramebuffer", "(IIIIIIIIII)V", (void *) android_glBlitFramebuffer__IIIIIIIIII },
+{"glRenderbufferStorageMultisample", "(IIIII)V", (void *) android_glRenderbufferStorageMultisample__IIIII },
+{"glFramebufferTextureLayer", "(IIIII)V", (void *) android_glFramebufferTextureLayer__IIIII },
+{"glMapBufferRange", "(IIII)Ljava/nio/Buffer;", (void *) android_glMapBufferRange__IIII },
+{"glFlushMappedBufferRange", "(III)V", (void *) android_glFlushMappedBufferRange__III },
+{"glBindVertexArray", "(I)V", (void *) android_glBindVertexArray__I },
+{"glDeleteVertexArrays", "(I[II)V", (void *) android_glDeleteVertexArrays__I_3II },
+{"glDeleteVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2 },
+{"glGenVertexArrays", "(I[II)V", (void *) android_glGenVertexArrays__I_3II },
+{"glGenVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenVertexArrays__ILjava_nio_IntBuffer_2 },
+{"glIsVertexArray", "(I)Z", (void *) android_glIsVertexArray__I },
+{"glGetIntegeri_v", "(II[II)V", (void *) android_glGetIntegeri_v__II_3II },
+{"glGetIntegeri_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetIntegeri_v__IILjava_nio_IntBuffer_2 },
+{"glBeginTransformFeedback", "(I)V", (void *) android_glBeginTransformFeedback__I },
+{"glEndTransformFeedback", "()V", (void *) android_glEndTransformFeedback__ },
+{"glBindBufferRange", "(IIIII)V", (void *) android_glBindBufferRange__IIIII },
+{"glBindBufferBase", "(III)V", (void *) android_glBindBufferBase__III },
+{"glTransformFeedbackVaryings", "(I[Ljava/lang/String;I)V", (void *) android_glTransformFeedbackVaryings },
+{"glGetTransformFeedbackVarying", "(III[II[II[II[BI)V", (void *) android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI },
+{"glGetTransformFeedbackVarying", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B },
+{"glGetTransformFeedbackVarying", "(II[II[II)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying1 },
+{"glGetTransformFeedbackVarying", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying2 },
+{"glVertexAttribIPointerBounds", "(IIIILjava/nio/Buffer;I)V", (void *) android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I },
+{"glVertexAttribIPointer", "(IIIII)V", (void *) android_glVertexAttribIPointer__IIIII },
+{"glGetVertexAttribIiv", "(II[II)V", (void *) android_glGetVertexAttribIiv__II_3II },
+{"glGetVertexAttribIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2 },
+{"glGetVertexAttribIuiv", "(II[II)V", (void *) android_glGetVertexAttribIuiv__II_3II },
+{"glGetVertexAttribIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2 },
+{"glVertexAttribI4i", "(IIIII)V", (void *) android_glVertexAttribI4i__IIIII },
+{"glVertexAttribI4ui", "(IIIII)V", (void *) android_glVertexAttribI4ui__IIIII },
+{"glVertexAttribI4iv", "(I[II)V", (void *) android_glVertexAttribI4iv__I_3II },
+{"glVertexAttribI4iv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2 },
+{"glVertexAttribI4uiv", "(I[II)V", (void *) android_glVertexAttribI4uiv__I_3II },
+{"glVertexAttribI4uiv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2 },
+{"glGetUniformuiv", "(II[II)V", (void *) android_glGetUniformuiv__II_3II },
+{"glGetUniformuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformuiv__IILjava_nio_IntBuffer_2 },
+{"glGetFragDataLocation", "(ILjava/lang/String;)I", (void *) android_glGetFragDataLocation__ILjava_lang_String_2 },
+{"glUniform1ui", "(II)V", (void *) android_glUniform1ui__II },
+{"glUniform2ui", "(III)V", (void *) android_glUniform2ui__III },
+{"glUniform3ui", "(IIII)V", (void *) android_glUniform3ui__IIII },
+{"glUniform4ui", "(IIIII)V", (void *) android_glUniform4ui__IIIII },
+{"glUniform1uiv", "(II[II)V", (void *) android_glUniform1uiv__II_3II },
+{"glUniform1uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1uiv__IILjava_nio_IntBuffer_2 },
+{"glUniform2uiv", "(II[II)V", (void *) android_glUniform2uiv__II_3II },
+{"glUniform2uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2uiv__IILjava_nio_IntBuffer_2 },
+{"glUniform3uiv", "(II[II)V", (void *) android_glUniform3uiv__II_3II },
+{"glUniform3uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3uiv__IILjava_nio_IntBuffer_2 },
+{"glUniform4uiv", "(II[II)V", (void *) android_glUniform4uiv__II_3II },
+{"glUniform4uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4uiv__IILjava_nio_IntBuffer_2 },
+{"glClearBufferiv", "(II[II)V", (void *) android_glClearBufferiv__II_3II },
+{"glClearBufferiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferiv__IILjava_nio_IntBuffer_2 },
+{"glClearBufferuiv", "(II[II)V", (void *) android_glClearBufferuiv__II_3II },
+{"glClearBufferuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferuiv__IILjava_nio_IntBuffer_2 },
+{"glClearBufferfv", "(II[FI)V", (void *) android_glClearBufferfv__II_3FI },
+{"glClearBufferfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glClearBufferfv__IILjava_nio_FloatBuffer_2 },
+{"glClearBufferfi", "(IIFI)V", (void *) android_glClearBufferfi__IIFI },
+{"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II },
+{"glCopyBufferSubData", "(IIIII)V", (void *) android_glCopyBufferSubData__IIIII },
+{"glGetUniformIndices", "(I[Ljava/lang/String;[II)V", (void *) android_glGetUniformIndices_array },
+{"glGetUniformIndices", "(I[Ljava/lang/String;[Ljava/nio/IntBuffer)V", (void *) android_glGetUniformIndices_buffer },
+{"glGetActiveUniformsiv", "(II[III[II)V", (void *) android_glGetActiveUniformsiv__II_3III_3II },
+{"glGetActiveUniformsiv", "(IILjava/nio/IntBuffer;ILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2 },
+{"glGetUniformBlockIndex", "(ILjava/lang/String;)I", (void *) android_glGetUniformBlockIndex__ILjava_lang_String_2 },
+{"glGetActiveUniformBlockiv", "(III[II)V", (void *) android_glGetActiveUniformBlockiv__III_3II },
+{"glGetActiveUniformBlockiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2 },
+{"glGetActiveUniformBlockName", "(III[II[BI)V", (void *) android_glGetActiveUniformBlockName_III_3II_3BI },
+{"glGetActiveUniformBlockName", "(IILjava/nio/Buffer;Ljava/nio/Buffer;)V", (void *) android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 },
+{"glGetActiveUniformBlockName", "(II)Ljava/lang/String;", (void *) android_glGetActiveUniformBlockName_II },
+{"glUniformBlockBinding", "(III)V", (void *) android_glUniformBlockBinding__III },
+{"glDrawArraysInstanced", "(IIII)V", (void *) android_glDrawArraysInstanced__IIII },
+{"glDrawElementsInstanced", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I },
+{"glDrawElementsInstanced", "(IIIII)V", (void *) android_glDrawElementsInstanced__IIIII },
+{"glFenceSync", "(II)J", (void *) android_glFenceSync__II },
+{"glIsSync", "(J)Z", (void *) android_glIsSync__J },
+{"glDeleteSync", "(J)V", (void *) android_glDeleteSync__J },
+{"glClientWaitSync", "(JIJ)I", (void *) android_glClientWaitSync__JIJ },
+{"glWaitSync", "(JIJ)V", (void *) android_glWaitSync__JIJ },
+{"glGetInteger64v", "(I[JI)V", (void *) android_glGetInteger64v__I_3JI },
+{"glGetInteger64v", "(ILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64v__ILjava_nio_LongBuffer_2 },
+{"glGetSynciv", "(JII[II[II)V", (void *) android_glGetSynciv__JII_3II_3II },
+{"glGetSynciv", "(JIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
+{"glGetInteger64i_v", "(II[JI)V", (void *) android_glGetInteger64i_v__II_3JI },
+{"glGetInteger64i_v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64i_v__IILjava_nio_LongBuffer_2 },
+{"glGetBufferParameteri64v", "(II[JI)V", (void *) android_glGetBufferParameteri64v__II_3JI },
+{"glGetBufferParameteri64v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2 },
+{"glGenSamplers", "(I[II)V", (void *) android_glGenSamplers__I_3II },
+{"glGenSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenSamplers__ILjava_nio_IntBuffer_2 },
+{"glDeleteSamplers", "(I[II)V", (void *) android_glDeleteSamplers__I_3II },
+{"glDeleteSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteSamplers__ILjava_nio_IntBuffer_2 },
+{"glIsSampler", "(I)Z", (void *) android_glIsSampler__I },
+{"glBindSampler", "(II)V", (void *) android_glBindSampler__II },
+{"glSamplerParameteri", "(III)V", (void *) android_glSamplerParameteri__III },
+{"glSamplerParameteriv", "(II[II)V", (void *) android_glSamplerParameteriv__II_3II },
+{"glSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameteriv__IILjava_nio_IntBuffer_2 },
+{"glSamplerParameterf", "(IIF)V", (void *) android_glSamplerParameterf__IIF },
+{"glSamplerParameterfv", "(II[FI)V", (void *) android_glSamplerParameterfv__II_3FI },
+{"glSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
+{"glGetSamplerParameteriv", "(II[II)V", (void *) android_glGetSamplerParameteriv__II_3II },
+{"glGetSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2 },
+{"glGetSamplerParameterfv", "(II[FI)V", (void *) android_glGetSamplerParameterfv__II_3FI },
+{"glGetSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
+{"glVertexAttribDivisor", "(II)V", (void *) android_glVertexAttribDivisor__II },
+{"glBindTransformFeedback", "(II)V", (void *) android_glBindTransformFeedback__II },
+{"glDeleteTransformFeedbacks", "(I[II)V", (void *) android_glDeleteTransformFeedbacks__I_3II },
+{"glDeleteTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2 },
+{"glGenTransformFeedbacks", "(I[II)V", (void *) android_glGenTransformFeedbacks__I_3II },
+{"glGenTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2 },
+{"glIsTransformFeedback", "(I)Z", (void *) android_glIsTransformFeedback__I },
+{"glPauseTransformFeedback", "()V", (void *) android_glPauseTransformFeedback__ },
+{"glResumeTransformFeedback", "()V", (void *) android_glResumeTransformFeedback__ },
+{"glGetProgramBinary", "(II[II[IILjava/nio/Buffer;)V", (void *) android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2 },
+{"glGetProgramBinary", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/Buffer;)V", (void *) android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2 },
+{"glProgramBinary", "(IILjava/nio/Buffer;I)V", (void *) android_glProgramBinary__IILjava_nio_Buffer_2I },
+{"glProgramParameteri", "(III)V", (void *) android_glProgramParameteri__III },
+{"glInvalidateFramebuffer", "(II[II)V", (void *) android_glInvalidateFramebuffer__II_3II },
+{"glInvalidateFramebuffer", "(IILjava/nio/IntBuffer;)V", (void *) android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2 },
+{"glInvalidateSubFramebuffer", "(II[IIIIII)V", (void *) android_glInvalidateSubFramebuffer__II_3IIIIII },
+{"glInvalidateSubFramebuffer", "(IILjava/nio/IntBuffer;IIII)V", (void *) android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII },
+{"glTexStorage2D", "(IIIII)V", (void *) android_glTexStorage2D__IIIII },
+{"glTexStorage3D", "(IIIIII)V", (void *) android_glTexStorage3D__IIIIII },
+{"glGetInternalformativ", "(IIII[II)V", (void *) android_glGetInternalformativ__IIII_3II },
+{"glGetInternalformativ", "(IIIILjava/nio/IntBuffer;)V", (void *) android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2 },
+};
+
+int register_android_opengl_jni_GLES30(JNIEnv *_env)
+{
+ int err;
+ err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
+ return err;
+}
diff --git a/opengl/java/android/opengl/GLES20.java b/opengl/java/android/opengl/GLES20.java
index dd9f8b8..14abb87 100644
--- a/opengl/java/android/opengl/GLES20.java
+++ b/opengl/java/android/opengl/GLES20.java
@@ -296,6 +296,9 @@ public class GLES20 {
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.
+ //
public static final int GL_STENCIL_INDEX = 0x1901;
public static final int GL_STENCIL_INDEX8 = 0x8D48;
public static final int GL_RENDERBUFFER_WIDTH = 0x8D42;
@@ -327,7 +330,7 @@ public class GLES20 {
native private static void _nativeClassInit();
static {
- _nativeClassInit();
+ _nativeClassInit();
}
// C function void glActiveTexture ( GLenum texture )
@@ -1025,7 +1028,7 @@ public class GLES20 {
);
// C function void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei * length,
- // GLchar * infoLog);
+ // GLchar * infoLog);
public static native String glGetProgramInfoLog(
int program
@@ -1065,7 +1068,7 @@ public class GLES20 {
);
// C function void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei * length,
- // GLchar * infoLog);
+ // GLchar * infoLog);
public static native String glGetShaderInfoLog(
int shader
diff --git a/opengl/java/android/opengl/GLES30.java b/opengl/java/android/opengl/GLES30.java
new file mode 100644
index 0000000..ecc96af
--- /dev/null
+++ b/opengl/java/android/opengl/GLES30.java
@@ -0,0 +1,1795 @@
+/*
+**
+** Copyright 2013, 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 3.0
+ * @hide
+ */
+public class GLES30 extends GLES20 {
+ public static final int GL_READ_BUFFER = 0x0C02;
+ public static final int GL_UNPACK_ROW_LENGTH = 0x0CF2;
+ public static final int GL_UNPACK_SKIP_ROWS = 0x0CF3;
+ public static final int GL_UNPACK_SKIP_PIXELS = 0x0CF4;
+ public static final int GL_PACK_ROW_LENGTH = 0x0D02;
+ public static final int GL_PACK_SKIP_ROWS = 0x0D03;
+ public static final int GL_PACK_SKIP_PIXELS = 0x0D04;
+ public static final int GL_COLOR = 0x1800;
+ public static final int GL_DEPTH = 0x1801;
+ public static final int GL_STENCIL = 0x1802;
+ public static final int GL_RED = 0x1903;
+ public static final int GL_RGB8 = 0x8051;
+ public static final int GL_RGBA8 = 0x8058;
+ public static final int GL_RGB10_A2 = 0x8059;
+ public static final int GL_TEXTURE_BINDING_3D = 0x806A;
+ public static final int GL_UNPACK_SKIP_IMAGES = 0x806D;
+ public static final int GL_UNPACK_IMAGE_HEIGHT = 0x806E;
+ public static final int GL_TEXTURE_3D = 0x806F;
+ public static final int GL_TEXTURE_WRAP_R = 0x8072;
+ public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073;
+ public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368;
+ public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8;
+ public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9;
+ public static final int GL_TEXTURE_MIN_LOD = 0x813A;
+ public static final int GL_TEXTURE_MAX_LOD = 0x813B;
+ public static final int GL_TEXTURE_BASE_LEVEL = 0x813C;
+ public static final int GL_TEXTURE_MAX_LEVEL = 0x813D;
+ public static final int GL_MIN = 0x8007;
+ public static final int GL_MAX = 0x8008;
+ public static final int GL_DEPTH_COMPONENT24 = 0x81A6;
+ public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD;
+ public static final int GL_TEXTURE_COMPARE_MODE = 0x884C;
+ public static final int GL_TEXTURE_COMPARE_FUNC = 0x884D;
+ public static final int GL_CURRENT_QUERY = 0x8865;
+ public static final int GL_QUERY_RESULT = 0x8866;
+ public static final int GL_QUERY_RESULT_AVAILABLE = 0x8867;
+ public static final int GL_BUFFER_MAPPED = 0x88BC;
+ public static final int GL_BUFFER_MAP_POINTER = 0x88BD;
+ public static final int GL_STREAM_READ = 0x88E1;
+ public static final int GL_STREAM_COPY = 0x88E2;
+ public static final int GL_STATIC_READ = 0x88E5;
+ public static final int GL_STATIC_COPY = 0x88E6;
+ public static final int GL_DYNAMIC_READ = 0x88E9;
+ public static final int GL_DYNAMIC_COPY = 0x88EA;
+ public static final int GL_MAX_DRAW_BUFFERS = 0x8824;
+ public static final int GL_DRAW_BUFFER0 = 0x8825;
+ public static final int GL_DRAW_BUFFER1 = 0x8826;
+ public static final int GL_DRAW_BUFFER2 = 0x8827;
+ public static final int GL_DRAW_BUFFER3 = 0x8828;
+ public static final int GL_DRAW_BUFFER4 = 0x8829;
+ public static final int GL_DRAW_BUFFER5 = 0x882A;
+ public static final int GL_DRAW_BUFFER6 = 0x882B;
+ public static final int GL_DRAW_BUFFER7 = 0x882C;
+ public static final int GL_DRAW_BUFFER8 = 0x882D;
+ public static final int GL_DRAW_BUFFER9 = 0x882E;
+ public static final int GL_DRAW_BUFFER10 = 0x882F;
+ public static final int GL_DRAW_BUFFER11 = 0x8830;
+ public static final int GL_DRAW_BUFFER12 = 0x8831;
+ public static final int GL_DRAW_BUFFER13 = 0x8832;
+ public static final int GL_DRAW_BUFFER14 = 0x8833;
+ public static final int GL_DRAW_BUFFER15 = 0x8834;
+ public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
+ public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
+ public static final int GL_SAMPLER_3D = 0x8B5F;
+ public static final int GL_SAMPLER_2D_SHADOW = 0x8B62;
+ public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
+ public static final int GL_PIXEL_PACK_BUFFER = 0x88EB;
+ public static final int GL_PIXEL_UNPACK_BUFFER = 0x88EC;
+ public static final int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED;
+ public static final int GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF;
+ public static final int GL_FLOAT_MAT2x3 = 0x8B65;
+ public static final int GL_FLOAT_MAT2x4 = 0x8B66;
+ public static final int GL_FLOAT_MAT3x2 = 0x8B67;
+ public static final int GL_FLOAT_MAT3x4 = 0x8B68;
+ public static final int GL_FLOAT_MAT4x2 = 0x8B69;
+ public static final int GL_FLOAT_MAT4x3 = 0x8B6A;
+ public static final int GL_SRGB = 0x8C40;
+ public static final int GL_SRGB8 = 0x8C41;
+ public static final int GL_SRGB8_ALPHA8 = 0x8C43;
+ public static final int GL_COMPARE_REF_TO_TEXTURE = 0x884E;
+ public static final int GL_MAJOR_VERSION = 0x821B;
+ public static final int GL_MINOR_VERSION = 0x821C;
+ public static final int GL_NUM_EXTENSIONS = 0x821D;
+ public static final int GL_RGBA32F = 0x8814;
+ public static final int GL_RGB32F = 0x8815;
+ public static final int GL_RGBA16F = 0x881A;
+ public static final int GL_RGB16F = 0x881B;
+ public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
+ public static final int GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF;
+ public static final int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
+ public static final int GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
+ public static final int GL_MAX_VARYING_COMPONENTS = 0x8B4B;
+ public static final int GL_TEXTURE_2D_ARRAY = 0x8C1A;
+ public static final int GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D;
+ public static final int GL_R11F_G11F_B10F = 0x8C3A;
+ public static final int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B;
+ public static final int GL_RGB9_E5 = 0x8C3D;
+ public static final int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E;
+ public static final int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76;
+ public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
+ public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80;
+ public static final int GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
+ public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
+ public static final int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
+ public static final int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
+ public static final int GL_RASTERIZER_DISCARD = 0x8C89;
+ public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
+ public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
+ public static final int GL_INTERLEAVED_ATTRIBS = 0x8C8C;
+ public static final int GL_SEPARATE_ATTRIBS = 0x8C8D;
+ public static final int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
+ public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
+ public static final int GL_RGBA32UI = 0x8D70;
+ public static final int GL_RGB32UI = 0x8D71;
+ public static final int GL_RGBA16UI = 0x8D76;
+ public static final int GL_RGB16UI = 0x8D77;
+ public static final int GL_RGBA8UI = 0x8D7C;
+ public static final int GL_RGB8UI = 0x8D7D;
+ public static final int GL_RGBA32I = 0x8D82;
+ public static final int GL_RGB32I = 0x8D83;
+ public static final int GL_RGBA16I = 0x8D88;
+ public static final int GL_RGB16I = 0x8D89;
+ public static final int GL_RGBA8I = 0x8D8E;
+ public static final int GL_RGB8I = 0x8D8F;
+ public static final int GL_RED_INTEGER = 0x8D94;
+ public static final int GL_RGB_INTEGER = 0x8D98;
+ public static final int GL_RGBA_INTEGER = 0x8D99;
+ public static final int GL_SAMPLER_2D_ARRAY = 0x8DC1;
+ public static final int GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
+ public static final int GL_SAMPLER_CUBE_SHADOW = 0x8DC5;
+ public static final int GL_UNSIGNED_INT_VEC2 = 0x8DC6;
+ public static final int GL_UNSIGNED_INT_VEC3 = 0x8DC7;
+ public static final int GL_UNSIGNED_INT_VEC4 = 0x8DC8;
+ public static final int GL_INT_SAMPLER_2D = 0x8DCA;
+ public static final int GL_INT_SAMPLER_3D = 0x8DCB;
+ public static final int GL_INT_SAMPLER_CUBE = 0x8DCC;
+ public static final int GL_INT_SAMPLER_2D_ARRAY = 0x8DCF;
+ public static final int GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
+ public static final int GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
+ public static final int GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
+ public static final int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
+ public static final int GL_BUFFER_ACCESS_FLAGS = 0x911F;
+ public static final int GL_BUFFER_MAP_LENGTH = 0x9120;
+ public static final int GL_BUFFER_MAP_OFFSET = 0x9121;
+ public static final int GL_DEPTH_COMPONENT32F = 0x8CAC;
+ public static final int GL_DEPTH32F_STENCIL8 = 0x8CAD;
+ public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217;
+ public static final int GL_FRAMEBUFFER_DEFAULT = 0x8218;
+ public static final int GL_FRAMEBUFFER_UNDEFINED = 0x8219;
+ public static final int GL_DEPTH_STENCIL_ATTACHMENT = 0x821A;
+ public static final int GL_DEPTH_STENCIL = 0x84F9;
+ public static final int GL_UNSIGNED_INT_24_8 = 0x84FA;
+ public static final int GL_DEPTH24_STENCIL8 = 0x88F0;
+ public static final int GL_UNSIGNED_NORMALIZED = 0x8C17;
+ public static final int GL_DRAW_FRAMEBUFFER_BINDING = GL_FRAMEBUFFER_BINDING;
+ public static final int GL_READ_FRAMEBUFFER = 0x8CA8;
+ public static final int GL_DRAW_FRAMEBUFFER = 0x8CA9;
+ public static final int GL_READ_FRAMEBUFFER_BINDING = 0x8CAA;
+ public static final int GL_RENDERBUFFER_SAMPLES = 0x8CAB;
+ public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4;
+ public static final int GL_MAX_COLOR_ATTACHMENTS = 0x8CDF;
+ public static final int GL_COLOR_ATTACHMENT1 = 0x8CE1;
+ public static final int GL_COLOR_ATTACHMENT2 = 0x8CE2;
+ public static final int GL_COLOR_ATTACHMENT3 = 0x8CE3;
+ public static final int GL_COLOR_ATTACHMENT4 = 0x8CE4;
+ public static final int GL_COLOR_ATTACHMENT5 = 0x8CE5;
+ public static final int GL_COLOR_ATTACHMENT6 = 0x8CE6;
+ public static final int GL_COLOR_ATTACHMENT7 = 0x8CE7;
+ public static final int GL_COLOR_ATTACHMENT8 = 0x8CE8;
+ public static final int GL_COLOR_ATTACHMENT9 = 0x8CE9;
+ public static final int GL_COLOR_ATTACHMENT10 = 0x8CEA;
+ public static final int GL_COLOR_ATTACHMENT11 = 0x8CEB;
+ public static final int GL_COLOR_ATTACHMENT12 = 0x8CEC;
+ public static final int GL_COLOR_ATTACHMENT13 = 0x8CED;
+ public static final int GL_COLOR_ATTACHMENT14 = 0x8CEE;
+ public static final int GL_COLOR_ATTACHMENT15 = 0x8CEF;
+ public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56;
+ public static final int GL_MAX_SAMPLES = 0x8D57;
+ public static final int GL_HALF_FLOAT = 0x140B;
+ public static final int GL_MAP_READ_BIT = 0x0001;
+ public static final int GL_MAP_WRITE_BIT = 0x0002;
+ public static final int GL_MAP_INVALIDATE_RANGE_BIT = 0x0004;
+ public static final int GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008;
+ public static final int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010;
+ public static final int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020;
+ public static final int GL_RG = 0x8227;
+ public static final int GL_RG_INTEGER = 0x8228;
+ public static final int GL_R8 = 0x8229;
+ public static final int GL_RG8 = 0x822B;
+ public static final int GL_R16F = 0x822D;
+ public static final int GL_R32F = 0x822E;
+ public static final int GL_RG16F = 0x822F;
+ public static final int GL_RG32F = 0x8230;
+ public static final int GL_R8I = 0x8231;
+ public static final int GL_R8UI = 0x8232;
+ public static final int GL_R16I = 0x8233;
+ public static final int GL_R16UI = 0x8234;
+ public static final int GL_R32I = 0x8235;
+ public static final int GL_R32UI = 0x8236;
+ public static final int GL_RG8I = 0x8237;
+ public static final int GL_RG8UI = 0x8238;
+ public static final int GL_RG16I = 0x8239;
+ public static final int GL_RG16UI = 0x823A;
+ public static final int GL_RG32I = 0x823B;
+ public static final int GL_RG32UI = 0x823C;
+ public static final int GL_VERTEX_ARRAY_BINDING = 0x85B5;
+ public static final int GL_R8_SNORM = 0x8F94;
+ public static final int GL_RG8_SNORM = 0x8F95;
+ public static final int GL_RGB8_SNORM = 0x8F96;
+ public static final int GL_RGBA8_SNORM = 0x8F97;
+ public static final int GL_SIGNED_NORMALIZED = 0x8F9C;
+ public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69;
+ public static final int GL_COPY_READ_BUFFER = 0x8F36;
+ public static final int GL_COPY_WRITE_BUFFER = 0x8F37;
+ public static final int GL_COPY_READ_BUFFER_BINDING = GL_COPY_READ_BUFFER;
+ public static final int GL_COPY_WRITE_BUFFER_BINDING = GL_COPY_WRITE_BUFFER;
+ public static final int GL_UNIFORM_BUFFER = 0x8A11;
+ public static final int GL_UNIFORM_BUFFER_BINDING = 0x8A28;
+ public static final int GL_UNIFORM_BUFFER_START = 0x8A29;
+ public static final int GL_UNIFORM_BUFFER_SIZE = 0x8A2A;
+ public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B;
+ public static final int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D;
+ public static final int GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E;
+ public static final int GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F;
+ public static final int GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30;
+ public static final int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31;
+ public static final int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33;
+ public static final int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34;
+ public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35;
+ public static final int GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36;
+ public static final int GL_UNIFORM_TYPE = 0x8A37;
+ public static final int GL_UNIFORM_SIZE = 0x8A38;
+ public static final int GL_UNIFORM_NAME_LENGTH = 0x8A39;
+ public static final int GL_UNIFORM_BLOCK_INDEX = 0x8A3A;
+ public static final int GL_UNIFORM_OFFSET = 0x8A3B;
+ public static final int GL_UNIFORM_ARRAY_STRIDE = 0x8A3C;
+ public static final int GL_UNIFORM_MATRIX_STRIDE = 0x8A3D;
+ public static final int GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E;
+ public static final int GL_UNIFORM_BLOCK_BINDING = 0x8A3F;
+ public static final int GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40;
+ public static final int GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41;
+ public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42;
+ public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43;
+ public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44;
+ public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46;
+ // GL_INVALID_INDEX is defined as 0xFFFFFFFFu in C.
+ public static final int GL_INVALID_INDEX = -1;
+ public static final int GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122;
+ public static final int GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125;
+ public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111;
+ public static final int GL_OBJECT_TYPE = 0x9112;
+ public static final int GL_SYNC_CONDITION = 0x9113;
+ public static final int GL_SYNC_STATUS = 0x9114;
+ public static final int GL_SYNC_FLAGS = 0x9115;
+ public static final int GL_SYNC_FENCE = 0x9116;
+ public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117;
+ public static final int GL_UNSIGNALED = 0x9118;
+ public static final int GL_SIGNALED = 0x9119;
+ public static final int GL_ALREADY_SIGNALED = 0x911A;
+ public static final int GL_TIMEOUT_EXPIRED = 0x911B;
+ public static final int GL_CONDITION_SATISFIED = 0x911C;
+ public static final int GL_WAIT_FAILED = 0x911D;
+ public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001;
+ // GL_TIMEOUT_IGNORED is defined as 0xFFFFFFFFFFFFFFFFull in C.
+ public static final long GL_TIMEOUT_IGNORED = -1;
+ public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
+ public static final int GL_ANY_SAMPLES_PASSED = 0x8C2F;
+ public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
+ public static final int GL_SAMPLER_BINDING = 0x8919;
+ public static final int GL_RGB10_A2UI = 0x906F;
+ public static final int GL_TEXTURE_SWIZZLE_R = 0x8E42;
+ public static final int GL_TEXTURE_SWIZZLE_G = 0x8E43;
+ public static final int GL_TEXTURE_SWIZZLE_B = 0x8E44;
+ public static final int GL_TEXTURE_SWIZZLE_A = 0x8E45;
+ public static final int GL_GREEN = 0x1904;
+ public static final int GL_BLUE = 0x1905;
+ public static final int GL_INT_2_10_10_10_REV = 0x8D9F;
+ public static final int GL_TRANSFORM_FEEDBACK = 0x8E22;
+ public static final int GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23;
+ public static final int GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24;
+ public static final int GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25;
+ public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257;
+ public static final int GL_PROGRAM_BINARY_LENGTH = 0x8741;
+ public static final int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE;
+ public static final int GL_PROGRAM_BINARY_FORMATS = 0x87FF;
+ public static final int GL_COMPRESSED_R11_EAC = 0x9270;
+ public static final int GL_COMPRESSED_SIGNED_R11_EAC = 0x9271;
+ public static final int GL_COMPRESSED_RG11_EAC = 0x9272;
+ public static final int GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273;
+ public static final int GL_COMPRESSED_RGB8_ETC2 = 0x9274;
+ public static final int GL_COMPRESSED_SRGB8_ETC2 = 0x9275;
+ public static final int GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276;
+ public static final int GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
+ public static final int GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278;
+ public static final int GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279;
+ public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F;
+ public static final int GL_MAX_ELEMENT_INDEX = 0x8D6B;
+ public static final int GL_NUM_SAMPLE_COUNTS = 0x9380;
+ public static final int GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF;
+
+ native private static void _nativeClassInit();
+ static {
+ _nativeClassInit();
+ }
+
+ // C function void glReadBuffer ( GLenum mode )
+
+ public static native void glReadBuffer(
+ int mode
+ );
+
+ // C function void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices )
+
+ public static native void glDrawRangeElements(
+ int mode,
+ int start,
+ int end,
+ int count,
+ int type,
+ java.nio.Buffer indices
+ );
+
+ // C function void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset )
+
+ public static native void glDrawRangeElements(
+ int mode,
+ int start,
+ int end,
+ int count,
+ int type,
+ int offset
+ );
+
+ // C function void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels )
+
+ public static native void glTexImage3D(
+ int target,
+ int level,
+ int internalformat,
+ int width,
+ int height,
+ int depth,
+ int border,
+ int format,
+ int type,
+ java.nio.Buffer pixels
+ );
+
+ // C function void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset )
+
+ public static native void glTexImage3D(
+ int target,
+ int level,
+ int internalformat,
+ int width,
+ int height,
+ int depth,
+ int border,
+ int format,
+ int type,
+ int offset
+ );
+
+ // C function void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels )
+
+ public static native void glTexSubImage3D(
+ int target,
+ int level,
+ int xoffset,
+ int yoffset,
+ int zoffset,
+ int width,
+ int height,
+ int depth,
+ int format,
+ int type,
+ java.nio.Buffer pixels
+ );
+
+ // C function void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset )
+
+ public static native void glTexSubImage3D(
+ int target,
+ int level,
+ int xoffset,
+ int yoffset,
+ int zoffset,
+ int width,
+ int height,
+ int depth,
+ int format,
+ int type,
+ int offset
+ );
+
+ // C function void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height )
+
+ public static native void glCopyTexSubImage3D(
+ int target,
+ int level,
+ int xoffset,
+ int yoffset,
+ int zoffset,
+ int x,
+ int y,
+ int width,
+ int height
+ );
+
+ // C function void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data )
+
+ public static native void glCompressedTexImage3D(
+ int target,
+ int level,
+ int internalformat,
+ int width,
+ int height,
+ int depth,
+ int border,
+ int imageSize,
+ java.nio.Buffer data
+ );
+
+ // C function void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset )
+
+ public static native void glCompressedTexImage3D(
+ int target,
+ int level,
+ int internalformat,
+ int width,
+ int height,
+ int depth,
+ int border,
+ int imageSize,
+ int offset
+ );
+
+ // C function void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data )
+
+ public static native void glCompressedTexSubImage3D(
+ int target,
+ int level,
+ int xoffset,
+ int yoffset,
+ int zoffset,
+ int width,
+ int height,
+ int depth,
+ int format,
+ int imageSize,
+ java.nio.Buffer data
+ );
+
+ // C function void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset )
+
+ public static native void glCompressedTexSubImage3D(
+ int target,
+ int level,
+ int xoffset,
+ int yoffset,
+ int zoffset,
+ int width,
+ int height,
+ int depth,
+ int format,
+ int imageSize,
+ int offset
+ );
+
+ // C function void glGenQueries ( GLsizei n, GLuint *ids )
+
+ public static native void glGenQueries(
+ int n,
+ int[] ids,
+ int offset
+ );
+
+ // C function void glGenQueries ( GLsizei n, GLuint *ids )
+
+ public static native void glGenQueries(
+ int n,
+ java.nio.IntBuffer ids
+ );
+
+ // C function void glDeleteQueries ( GLsizei n, const GLuint *ids )
+
+ public static native void glDeleteQueries(
+ int n,
+ int[] ids,
+ int offset
+ );
+
+ // C function void glDeleteQueries ( GLsizei n, const GLuint *ids )
+
+ public static native void glDeleteQueries(
+ int n,
+ java.nio.IntBuffer ids
+ );
+
+ // C function GLboolean glIsQuery ( GLuint id )
+
+ public static native boolean glIsQuery(
+ int id
+ );
+
+ // C function void glBeginQuery ( GLenum target, GLuint id )
+
+ public static native void glBeginQuery(
+ int target,
+ int id
+ );
+
+ // C function void glEndQuery ( GLenum target )
+
+ public static native void glEndQuery(
+ int target
+ );
+
+ // C function void glGetQueryiv ( GLenum target, GLenum pname, GLint *params )
+
+ public static native void glGetQueryiv(
+ int target,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetQueryiv ( GLenum target, GLenum pname, GLint *params )
+
+ public static native void glGetQueryiv(
+ int target,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params )
+
+ public static native void glGetQueryObjectuiv(
+ int id,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params )
+
+ public static native void glGetQueryObjectuiv(
+ int id,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function GLboolean glUnmapBuffer ( GLenum target )
+
+ public static native boolean glUnmapBuffer(
+ int target
+ );
+
+ // C function void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params )
+
+ public static native java.nio.Buffer glGetBufferPointerv(
+ int target,
+ int pname
+ );
+
+ // C function void glDrawBuffers ( GLsizei n, const GLenum *bufs )
+
+ public static native void glDrawBuffers(
+ int n,
+ int[] bufs,
+ int offset
+ );
+
+ // C function void glDrawBuffers ( GLsizei n, const GLenum *bufs )
+
+ public static native void glDrawBuffers(
+ int n,
+ java.nio.IntBuffer bufs
+ );
+
+ // C function void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix2x3fv(
+ int location,
+ int count,
+ boolean transpose,
+ float[] value,
+ int offset
+ );
+
+ // C function void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix2x3fv(
+ int location,
+ int count,
+ boolean transpose,
+ java.nio.FloatBuffer value
+ );
+
+ // C function void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix3x2fv(
+ int location,
+ int count,
+ boolean transpose,
+ float[] value,
+ int offset
+ );
+
+ // C function void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix3x2fv(
+ int location,
+ int count,
+ boolean transpose,
+ java.nio.FloatBuffer value
+ );
+
+ // C function void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix2x4fv(
+ int location,
+ int count,
+ boolean transpose,
+ float[] value,
+ int offset
+ );
+
+ // C function void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix2x4fv(
+ int location,
+ int count,
+ boolean transpose,
+ java.nio.FloatBuffer value
+ );
+
+ // C function void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix4x2fv(
+ int location,
+ int count,
+ boolean transpose,
+ float[] value,
+ int offset
+ );
+
+ // C function void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix4x2fv(
+ int location,
+ int count,
+ boolean transpose,
+ java.nio.FloatBuffer value
+ );
+
+ // C function void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix3x4fv(
+ int location,
+ int count,
+ boolean transpose,
+ float[] value,
+ int offset
+ );
+
+ // C function void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix3x4fv(
+ int location,
+ int count,
+ boolean transpose,
+ java.nio.FloatBuffer value
+ );
+
+ // C function void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix4x3fv(
+ int location,
+ int count,
+ boolean transpose,
+ float[] value,
+ int offset
+ );
+
+ // C function void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+
+ public static native void glUniformMatrix4x3fv(
+ int location,
+ int count,
+ boolean transpose,
+ java.nio.FloatBuffer value
+ );
+
+ // C function void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter )
+
+ public static native void glBlitFramebuffer(
+ int srcX0,
+ int srcY0,
+ int srcX1,
+ int srcY1,
+ int dstX0,
+ int dstY0,
+ int dstX1,
+ int dstY1,
+ int mask,
+ int filter
+ );
+
+ // C function void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height )
+
+ public static native void glRenderbufferStorageMultisample(
+ int target,
+ int samples,
+ int internalformat,
+ int width,
+ int height
+ );
+
+ // C function void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer )
+
+ public static native void glFramebufferTextureLayer(
+ int target,
+ int attachment,
+ int texture,
+ int level,
+ int layer
+ );
+
+ // C function GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access )
+
+ public static native java.nio.Buffer glMapBufferRange(
+ int target,
+ int offset,
+ int length,
+ int access
+ );
+
+ // C function void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length )
+
+ public static native void glFlushMappedBufferRange(
+ int target,
+ int offset,
+ int length
+ );
+
+ // C function void glBindVertexArray ( GLuint array )
+
+ public static native void glBindVertexArray(
+ int array
+ );
+
+ // C function void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays )
+
+ public static native void glDeleteVertexArrays(
+ int n,
+ int[] arrays,
+ int offset
+ );
+
+ // C function void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays )
+
+ public static native void glDeleteVertexArrays(
+ int n,
+ java.nio.IntBuffer arrays
+ );
+
+ // C function void glGenVertexArrays ( GLsizei n, GLuint *arrays )
+
+ public static native void glGenVertexArrays(
+ int n,
+ int[] arrays,
+ int offset
+ );
+
+ // C function void glGenVertexArrays ( GLsizei n, GLuint *arrays )
+
+ public static native void glGenVertexArrays(
+ int n,
+ java.nio.IntBuffer arrays
+ );
+
+ // C function GLboolean glIsVertexArray ( GLuint array )
+
+ public static native boolean glIsVertexArray(
+ int array
+ );
+
+ // C function void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data )
+
+ public static native void glGetIntegeri_v(
+ int target,
+ int index,
+ int[] data,
+ int offset
+ );
+
+ // C function void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data )
+
+ public static native void glGetIntegeri_v(
+ int target,
+ int index,
+ java.nio.IntBuffer data
+ );
+
+ // C function void glBeginTransformFeedback ( GLenum primitiveMode )
+
+ public static native void glBeginTransformFeedback(
+ int primitiveMode
+ );
+
+ // C function void glEndTransformFeedback ( void )
+
+ public static native void glEndTransformFeedback(
+ );
+
+ // C function void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size )
+
+ public static native void glBindBufferRange(
+ int target,
+ int index,
+ int buffer,
+ int offset,
+ int size
+ );
+
+ // C function void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer )
+
+ public static native void glBindBufferBase(
+ int target,
+ int index,
+ int buffer
+ );
+
+ // C function void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode )
+
+ public static native void glTransformFeedbackVaryings(
+ int program,
+ String[] varyings,
+ int bufferMode
+ );
+
+ // C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name )
+
+ public static native void glGetTransformFeedbackVarying(
+ 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 glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name )
+
+ public static native void glGetTransformFeedbackVarying(
+ int program,
+ int index,
+ int bufsize,
+ java.nio.IntBuffer length,
+ java.nio.IntBuffer size,
+ java.nio.IntBuffer type,
+ byte name
+ );
+
+ // C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name )
+
+ public static native String glGetTransformFeedbackVarying(
+ int program,
+ int index,
+ int[] size,
+ int sizeOffset,
+ int[] type,
+ int typeOffset
+ );
+
+ // C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name )
+
+ public static native String glGetTransformFeedbackVarying(
+ int program,
+ int index,
+ java.nio.IntBuffer size,
+ java.nio.IntBuffer type
+ );
+
+ // C function void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
+
+ private static native void glVertexAttribIPointerBounds(
+ int index,
+ int size,
+ int type,
+ int stride,
+ java.nio.Buffer pointer,
+ int remaining
+ );
+
+ public static void glVertexAttribIPointer(
+ int index,
+ int size,
+ int type,
+ int stride,
+ java.nio.Buffer pointer
+ ) {
+ glVertexAttribIPointerBounds(
+ index,
+ size,
+ type,
+ stride,
+ pointer,
+ pointer.remaining()
+ );
+ }
+
+ // C function void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset )
+
+ public static native void glVertexAttribIPointer(
+ int index,
+ int size,
+ int type,
+ int stride,
+ int offset
+ );
+
+ // C function void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params )
+
+ public static native void glGetVertexAttribIiv(
+ int index,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params )
+
+ public static native void glGetVertexAttribIiv(
+ int index,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params )
+
+ public static native void glGetVertexAttribIuiv(
+ int index,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params )
+
+ public static native void glGetVertexAttribIuiv(
+ int index,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w )
+
+ public static native void glVertexAttribI4i(
+ int index,
+ int x,
+ int y,
+ int z,
+ int w
+ );
+
+ // C function void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w )
+
+ public static native void glVertexAttribI4ui(
+ int index,
+ int x,
+ int y,
+ int z,
+ int w
+ );
+
+ // C function void glVertexAttribI4iv ( GLuint index, const GLint *v )
+
+ public static native void glVertexAttribI4iv(
+ int index,
+ int[] v,
+ int offset
+ );
+
+ // C function void glVertexAttribI4iv ( GLuint index, const GLint *v )
+
+ public static native void glVertexAttribI4iv(
+ int index,
+ java.nio.IntBuffer v
+ );
+
+ // C function void glVertexAttribI4uiv ( GLuint index, const GLuint *v )
+
+ public static native void glVertexAttribI4uiv(
+ int index,
+ int[] v,
+ int offset
+ );
+
+ // C function void glVertexAttribI4uiv ( GLuint index, const GLuint *v )
+
+ public static native void glVertexAttribI4uiv(
+ int index,
+ java.nio.IntBuffer v
+ );
+
+ // C function void glGetUniformuiv ( GLuint program, GLint location, GLuint *params )
+
+ public static native void glGetUniformuiv(
+ int program,
+ int location,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetUniformuiv ( GLuint program, GLint location, GLuint *params )
+
+ public static native void glGetUniformuiv(
+ int program,
+ int location,
+ java.nio.IntBuffer params
+ );
+
+ // C function GLint glGetFragDataLocation ( GLuint program, const GLchar *name )
+
+ public static native int glGetFragDataLocation(
+ int program,
+ String name
+ );
+
+ // C function void glUniform1ui ( GLint location, GLuint v0 )
+
+ public static native void glUniform1ui(
+ int location,
+ int v0
+ );
+
+ // C function void glUniform2ui ( GLint location, GLuint v0, GLuint v1 )
+
+ public static native void glUniform2ui(
+ int location,
+ int v0,
+ int v1
+ );
+
+ // C function void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 )
+
+ public static native void glUniform3ui(
+ int location,
+ int v0,
+ int v1,
+ int v2
+ );
+
+ // C function void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 )
+
+ public static native void glUniform4ui(
+ int location,
+ int v0,
+ int v1,
+ int v2,
+ int v3
+ );
+
+ // C function void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform1uiv(
+ int location,
+ int count,
+ int[] value,
+ int offset
+ );
+
+ // C function void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform1uiv(
+ int location,
+ int count,
+ java.nio.IntBuffer value
+ );
+
+ // C function void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform2uiv(
+ int location,
+ int count,
+ int[] value,
+ int offset
+ );
+
+ // C function void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform2uiv(
+ int location,
+ int count,
+ java.nio.IntBuffer value
+ );
+
+ // C function void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform3uiv(
+ int location,
+ int count,
+ int[] value,
+ int offset
+ );
+
+ // C function void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform3uiv(
+ int location,
+ int count,
+ java.nio.IntBuffer value
+ );
+
+ // C function void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform4uiv(
+ int location,
+ int count,
+ int[] value,
+ int offset
+ );
+
+ // C function void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value )
+
+ public static native void glUniform4uiv(
+ int location,
+ int count,
+ java.nio.IntBuffer value
+ );
+
+ // C function void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value )
+
+ public static native void glClearBufferiv(
+ int buffer,
+ int drawbuffer,
+ int[] value,
+ int offset
+ );
+
+ // C function void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value )
+
+ public static native void glClearBufferiv(
+ int buffer,
+ int drawbuffer,
+ java.nio.IntBuffer value
+ );
+
+ // C function void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value )
+
+ public static native void glClearBufferuiv(
+ int buffer,
+ int drawbuffer,
+ int[] value,
+ int offset
+ );
+
+ // C function void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value )
+
+ public static native void glClearBufferuiv(
+ int buffer,
+ int drawbuffer,
+ java.nio.IntBuffer value
+ );
+
+ // C function void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value )
+
+ public static native void glClearBufferfv(
+ int buffer,
+ int drawbuffer,
+ float[] value,
+ int offset
+ );
+
+ // C function void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value )
+
+ public static native void glClearBufferfv(
+ int buffer,
+ int drawbuffer,
+ java.nio.FloatBuffer value
+ );
+
+ // C function void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil )
+
+ public static native void glClearBufferfi(
+ int buffer,
+ int drawbuffer,
+ float depth,
+ int stencil
+ );
+
+ // C function const GLubyte * glGetStringi ( GLenum name, GLuint index )
+
+ public static native String glGetStringi(
+ int name,
+ int index
+ );
+
+ // C function void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size )
+
+ public static native void glCopyBufferSubData(
+ int readTarget,
+ int writeTarget,
+ int readOffset,
+ int writeOffset,
+ int size
+ );
+
+ // C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )
+
+ public static native void glGetUniformIndices(
+ int program,
+ String[] uniformNames,
+ int[] uniformIndices,
+ int uniformIndicesOffset
+ );
+
+ // C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )
+
+ public static native void glGetUniformIndices(
+ int program,
+ String[] uniformNames,
+ java.nio.IntBuffer uniformIndices
+ );
+
+ // C function void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params )
+
+ public static native void glGetActiveUniformsiv(
+ int program,
+ int uniformCount,
+ int[] uniformIndices,
+ int uniformIndicesOffset,
+ int pname,
+ int[] params,
+ int paramsOffset
+ );
+
+ // C function void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params )
+
+ public static native void glGetActiveUniformsiv(
+ int program,
+ int uniformCount,
+ java.nio.IntBuffer uniformIndices,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function GLuint glGetUniformBlockIndex ( GLuint program, const GLchar *uniformBlockName )
+
+ public static native int glGetUniformBlockIndex(
+ int program,
+ String uniformBlockName
+ );
+
+ // C function void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params )
+
+ public static native void glGetActiveUniformBlockiv(
+ int program,
+ int uniformBlockIndex,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params )
+
+ public static native void glGetActiveUniformBlockiv(
+ int program,
+ int uniformBlockIndex,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName )
+
+ public static native void glGetActiveUniformBlockName(
+ int program,
+ int uniformBlockIndex,
+ int bufSize,
+ int[] length,
+ int lengthOffset,
+ byte[] uniformBlockName,
+ int uniformBlockNameOffset
+ );
+
+ // C function void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName )
+
+ public static native void glGetActiveUniformBlockName(
+ int program,
+ int uniformBlockIndex,
+ java.nio.Buffer length,
+ java.nio.Buffer uniformBlockName
+ );
+
+ // C function void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName )
+
+ public static native String glGetActiveUniformBlockName(
+ int program,
+ int uniformBlockIndex
+ );
+
+ // C function void glUniformBlockBinding ( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding )
+
+ public static native void glUniformBlockBinding(
+ int program,
+ int uniformBlockIndex,
+ int uniformBlockBinding
+ );
+
+ // C function void glDrawArraysInstanced ( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount )
+
+ public static native void glDrawArraysInstanced(
+ int mode,
+ int first,
+ int count,
+ int instanceCount
+ );
+
+ // C function void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount )
+
+ public static native void glDrawElementsInstanced(
+ int mode,
+ int count,
+ int type,
+ java.nio.Buffer indices,
+ int instanceCount
+ );
+
+ // C function void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount )
+
+ public static native void glDrawElementsInstanced(
+ int mode,
+ int count,
+ int type,
+ int indicesOffset,
+ int instanceCount
+ );
+
+ // C function GLsync glFenceSync ( GLenum condition, GLbitfield flags )
+
+ public static native long glFenceSync(
+ int condition,
+ int flags
+ );
+
+ // C function GLboolean glIsSync ( GLsync sync )
+
+ public static native boolean glIsSync(
+ long sync
+ );
+
+ // C function void glDeleteSync ( GLsync sync )
+
+ public static native void glDeleteSync(
+ long sync
+ );
+
+ // C function GLenum glClientWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout )
+
+ public static native int glClientWaitSync(
+ long sync,
+ int flags,
+ long timeout
+ );
+
+ // C function void glWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout )
+
+ public static native void glWaitSync(
+ long sync,
+ int flags,
+ long timeout
+ );
+
+ // C function void glGetInteger64v ( GLenum pname, GLint64 *params )
+
+ public static native void glGetInteger64v(
+ int pname,
+ long[] params,
+ int offset
+ );
+
+ // C function void glGetInteger64v ( GLenum pname, GLint64 *params )
+
+ public static native void glGetInteger64v(
+ int pname,
+ java.nio.LongBuffer params
+ );
+
+ // C function void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values )
+
+ public static native void glGetSynciv(
+ long sync,
+ int pname,
+ int bufSize,
+ int[] length,
+ int lengthOffset,
+ int[] values,
+ int valuesOffset
+ );
+
+ // C function void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values )
+
+ public static native void glGetSynciv(
+ long sync,
+ int pname,
+ int bufSize,
+ java.nio.IntBuffer length,
+ java.nio.IntBuffer values
+ );
+
+ // C function void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data )
+
+ public static native void glGetInteger64i_v(
+ int target,
+ int index,
+ long[] data,
+ int offset
+ );
+
+ // C function void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data )
+
+ public static native void glGetInteger64i_v(
+ int target,
+ int index,
+ java.nio.LongBuffer data
+ );
+
+ // C function void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params )
+
+ public static native void glGetBufferParameteri64v(
+ int target,
+ int pname,
+ long[] params,
+ int offset
+ );
+
+ // C function void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params )
+
+ public static native void glGetBufferParameteri64v(
+ int target,
+ int pname,
+ java.nio.LongBuffer params
+ );
+
+ // C function void glGenSamplers ( GLsizei count, GLuint *samplers )
+
+ public static native void glGenSamplers(
+ int count,
+ int[] samplers,
+ int offset
+ );
+
+ // C function void glGenSamplers ( GLsizei count, GLuint *samplers )
+
+ public static native void glGenSamplers(
+ int count,
+ java.nio.IntBuffer samplers
+ );
+
+ // C function void glDeleteSamplers ( GLsizei count, const GLuint *samplers )
+
+ public static native void glDeleteSamplers(
+ int count,
+ int[] samplers,
+ int offset
+ );
+
+ // C function void glDeleteSamplers ( GLsizei count, const GLuint *samplers )
+
+ public static native void glDeleteSamplers(
+ int count,
+ java.nio.IntBuffer samplers
+ );
+
+ // C function GLboolean glIsSampler ( GLuint sampler )
+
+ public static native boolean glIsSampler(
+ int sampler
+ );
+
+ // C function void glBindSampler ( GLuint unit, GLuint sampler )
+
+ public static native void glBindSampler(
+ int unit,
+ int sampler
+ );
+
+ // C function void glSamplerParameteri ( GLuint sampler, GLenum pname, GLint param )
+
+ public static native void glSamplerParameteri(
+ int sampler,
+ int pname,
+ int param
+ );
+
+ // C function void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param )
+
+ public static native void glSamplerParameteriv(
+ int sampler,
+ int pname,
+ int[] param,
+ int offset
+ );
+
+ // C function void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param )
+
+ public static native void glSamplerParameteriv(
+ int sampler,
+ int pname,
+ java.nio.IntBuffer param
+ );
+
+ // C function void glSamplerParameterf ( GLuint sampler, GLenum pname, GLfloat param )
+
+ public static native void glSamplerParameterf(
+ int sampler,
+ int pname,
+ float param
+ );
+
+ // C function void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param )
+
+ public static native void glSamplerParameterfv(
+ int sampler,
+ int pname,
+ float[] param,
+ int offset
+ );
+
+ // C function void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param )
+
+ public static native void glSamplerParameterfv(
+ int sampler,
+ int pname,
+ java.nio.FloatBuffer param
+ );
+
+ // C function void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params )
+
+ public static native void glGetSamplerParameteriv(
+ int sampler,
+ int pname,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params )
+
+ public static native void glGetSamplerParameteriv(
+ int sampler,
+ int pname,
+ java.nio.IntBuffer params
+ );
+
+ // C function void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params )
+
+ public static native void glGetSamplerParameterfv(
+ int sampler,
+ int pname,
+ float[] params,
+ int offset
+ );
+
+ // C function void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params )
+
+ public static native void glGetSamplerParameterfv(
+ int sampler,
+ int pname,
+ java.nio.FloatBuffer params
+ );
+
+ // C function void glVertexAttribDivisor ( GLuint index, GLuint divisor )
+
+ public static native void glVertexAttribDivisor(
+ int index,
+ int divisor
+ );
+
+ // C function void glBindTransformFeedback ( GLenum target, GLuint id )
+
+ public static native void glBindTransformFeedback(
+ int target,
+ int id
+ );
+
+ // C function void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids )
+
+ public static native void glDeleteTransformFeedbacks(
+ int n,
+ int[] ids,
+ int offset
+ );
+
+ // C function void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids )
+
+ public static native void glDeleteTransformFeedbacks(
+ int n,
+ java.nio.IntBuffer ids
+ );
+
+ // C function void glGenTransformFeedbacks ( GLsizei n, GLuint *ids )
+
+ public static native void glGenTransformFeedbacks(
+ int n,
+ int[] ids,
+ int offset
+ );
+
+ // C function void glGenTransformFeedbacks ( GLsizei n, GLuint *ids )
+
+ public static native void glGenTransformFeedbacks(
+ int n,
+ java.nio.IntBuffer ids
+ );
+
+ // C function GLboolean glIsTransformFeedback ( GLuint id )
+
+ public static native boolean glIsTransformFeedback(
+ int id
+ );
+
+ // C function void glPauseTransformFeedback ( void )
+
+ public static native void glPauseTransformFeedback(
+ );
+
+ // C function void glResumeTransformFeedback ( void )
+
+ public static native void glResumeTransformFeedback(
+ );
+
+ // C function void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary )
+
+ public static native void glGetProgramBinary(
+ int program,
+ int bufSize,
+ int[] length,
+ int lengthOffset,
+ int[] binaryFormat,
+ int binaryFormatOffset,
+ java.nio.Buffer binary
+ );
+
+ // C function void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary )
+
+ public static native void glGetProgramBinary(
+ int program,
+ int bufSize,
+ java.nio.IntBuffer length,
+ java.nio.IntBuffer binaryFormat,
+ java.nio.Buffer binary
+ );
+
+ // C function void glProgramBinary ( GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length )
+
+ public static native void glProgramBinary(
+ int program,
+ int binaryFormat,
+ java.nio.Buffer binary,
+ int length
+ );
+
+ // C function void glProgramParameteri ( GLuint program, GLenum pname, GLint value )
+
+ public static native void glProgramParameteri(
+ int program,
+ int pname,
+ int value
+ );
+
+ // C function void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments )
+
+ public static native void glInvalidateFramebuffer(
+ int target,
+ int numAttachments,
+ int[] attachments,
+ int offset
+ );
+
+ // C function void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments )
+
+ public static native void glInvalidateFramebuffer(
+ int target,
+ int numAttachments,
+ java.nio.IntBuffer attachments
+ );
+
+ // C function void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height )
+
+ public static native void glInvalidateSubFramebuffer(
+ int target,
+ int numAttachments,
+ int[] attachments,
+ int offset,
+ int x,
+ int y,
+ int width,
+ int height
+ );
+
+ // C function void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height )
+
+ public static native void glInvalidateSubFramebuffer(
+ int target,
+ int numAttachments,
+ java.nio.IntBuffer attachments,
+ int x,
+ int y,
+ int width,
+ int height
+ );
+
+ // C function void glTexStorage2D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height )
+
+ public static native void glTexStorage2D(
+ int target,
+ int levels,
+ int internalformat,
+ int width,
+ int height
+ );
+
+ // C function void glTexStorage3D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth )
+
+ public static native void glTexStorage3D(
+ int target,
+ int levels,
+ int internalformat,
+ int width,
+ int height,
+ int depth
+ );
+
+ // C function void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params )
+
+ public static native void glGetInternalformativ(
+ int target,
+ int internalformat,
+ int pname,
+ int bufSize,
+ int[] params,
+ int offset
+ );
+
+ // C function void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params )
+
+ public static native void glGetInternalformativ(
+ int target,
+ int internalformat,
+ int pname,
+ int bufSize,
+ java.nio.IntBuffer params
+ );
+
+}