3 ** Copyright 2013, The Android Open Source Project
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
9 ** http://www.apache.org/licenses/LICENSE-2.0
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
18 // This source file is automatically generated
20 #pragma GCC diagnostic ignored "-Wunused-variable"
21 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
22 #pragma GCC diagnostic ignored "-Wunused-function"
24 #include <GLES3/gl3.h>
25 #include <GLES3/gl3ext.h>
29 #include <android_runtime/AndroidRuntime.h>
30 #include <utils/misc.h>
33 static int initialized = 0;
35 static jclass nioAccessClass;
36 static jclass bufferClass;
37 static jmethodID getBasePointerID;
38 static jmethodID getBaseArrayID;
39 static jmethodID getBaseArrayOffsetID;
40 static jfieldID positionID;
41 static jfieldID limitID;
42 static jfieldID elementSizeShiftID;
45 /* special calls implemented in Android's GLES wrapper used to more
46 * efficiently bound-check passed arrays */
48 #ifdef GL_VERSION_ES_CM_1_1
49 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
50 const GLvoid *ptr, GLsizei count);
51 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
52 const GLvoid *pointer, GLsizei count);
53 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
61 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
62 GLsizei stride, const GLvoid *pointer, GLsizei count);
64 #ifdef GL_ES_VERSION_2_0
65 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
66 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
67 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
70 #ifdef GL_ES_VERSION_3_0
71 static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
72 GLsizei stride, const GLvoid *pointer, GLsizei count) {
73 glVertexAttribIPointer(indx, size, type, stride, pointer);
78 /* Cache method IDs each time the class is loaded. */
81 nativeClassInit(JNIEnv *_env, jclass glImplClass)
83 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
84 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
86 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
87 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
89 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
90 "getBasePointer", "(Ljava/nio/Buffer;)J");
91 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
93 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
94 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
96 positionID = _env->GetFieldID(bufferClass, "position", "I");
97 limitID = _env->GetFieldID(bufferClass, "limit", "I");
99 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
103 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
107 jint elementSizeShift;
110 position = _env->GetIntField(buffer, positionID);
111 limit = _env->GetIntField(buffer, limitID);
112 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
113 *remaining = (limit - position) << elementSizeShift;
114 pointer = _env->CallStaticLongMethod(nioAccessClass,
115 getBasePointerID, buffer);
118 return reinterpret_cast<void*>(pointer);
121 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
122 getBaseArrayID, buffer);
123 *offset = _env->CallStaticIntMethod(nioAccessClass,
124 getBaseArrayOffsetID, buffer);
130 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
132 _env->ReleasePrimitiveArrayCritical(array, data,
133 commit ? 0 : JNI_ABORT);
137 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
138 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
140 jint position = _env->GetIntField(buffer, positionID);
141 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
142 buf += position << elementSizeShift;
144 jniThrowException(_env, "java/lang/IllegalArgumentException",
145 "Must use a native order direct Buffer");
150 // --------------------------------------------------------------------------
153 * returns the number of values glGet returns for a given pname.
155 * The code below is written such that pnames requiring only one values
156 * are the default (and are not explicitely tested for). This makes the
157 * checking code much shorter/readable/efficient.
159 * This means that unknown pnames (e.g.: extensions) will default to 1. If
160 * that unknown pname needs more than 1 value, then the validation check
161 * is incomplete and the app may crash if it passed the wrong number params.
163 static int getNeededCount(GLint pname) {
165 #ifdef GL_ES_VERSION_2_0
168 case GL_ALIASED_LINE_WIDTH_RANGE:
169 case GL_ALIASED_POINT_SIZE_RANGE:
174 case GL_COLOR_CLEAR_VALUE:
175 case GL_COLOR_WRITEMASK:
181 case GL_COMPRESSED_TEXTURE_FORMATS:
182 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
185 case GL_SHADER_BINARY_FORMATS:
186 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
191 #ifdef GL_VERSION_ES_CM_1_1
194 case GL_ALIASED_LINE_WIDTH_RANGE:
195 case GL_ALIASED_POINT_SIZE_RANGE:
197 case GL_SMOOTH_LINE_WIDTH_RANGE:
198 case GL_SMOOTH_POINT_SIZE_RANGE:
202 case GL_CURRENT_NORMAL:
203 case GL_POINT_DISTANCE_ATTENUATION:
207 case GL_COLOR_CLEAR_VALUE:
208 case GL_COLOR_WRITEMASK:
209 case GL_CURRENT_COLOR:
210 case GL_CURRENT_TEXTURE_COORDS:
212 case GL_LIGHT_MODEL_AMBIENT:
218 case GL_MODELVIEW_MATRIX:
219 case GL_PROJECTION_MATRIX:
220 case GL_TEXTURE_MATRIX:
224 case GL_COMPRESSED_TEXTURE_FORMATS:
225 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
232 template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
235 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
237 const char * _exceptionType;
238 const char * _exceptionMessage;
239 CTYPE *params_base = (CTYPE *) 0;
241 CTYPE *params = (CTYPE *) 0;
246 _exceptionType = "java/lang/IllegalArgumentException";
247 _exceptionMessage = "params == null";
252 _exceptionType = "java/lang/IllegalArgumentException";
253 _exceptionMessage = "offset < 0";
256 _remaining = _env->GetArrayLength(params_ref) - offset;
257 _needed = getNeededCount(pname);
258 // if we didn't find this pname, we just assume the user passed
259 // an array of the right size -- this might happen with extensions
260 // or if we forget an enum here.
261 if (_remaining < _needed) {
263 _exceptionType = "java/lang/IllegalArgumentException";
264 _exceptionMessage = "length - offset < needed";
267 params_base = (CTYPE *)
268 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
269 params = params_base + offset;
278 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
279 _exception ? JNI_ABORT: 0);
282 jniThrowException(_env, _exceptionType, _exceptionMessage);
287 template <typename CTYPE, void GET(GLenum, CTYPE*)>
290 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
292 const char * _exceptionType;
293 const char * _exceptionMessage;
294 jarray _array = (jarray) 0;
295 jint _bufferOffset = (jint) 0;
297 CTYPE *params = (CTYPE *) 0;
300 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
301 _remaining /= sizeof(CTYPE); // convert from bytes to item count
302 _needed = getNeededCount(pname);
303 // if we didn't find this pname, we just assume the user passed
304 // an array of the right size -- this might happen with extensions
305 // or if we forget an enum here.
306 if (_needed>0 && _remaining < _needed) {
308 _exceptionType = "java/lang/IllegalArgumentException";
309 _exceptionMessage = "remaining() < needed";
312 if (params == NULL) {
313 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
314 params = (CTYPE *) (_paramsBase + _bufferOffset);
323 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
326 jniThrowException(_env, _exceptionType, _exceptionMessage);
330 // --------------------------------------------------------------------------
331 /* void glReadBuffer ( GLenum mode ) */
333 android_glReadBuffer__I
334 (JNIEnv *_env, jobject _this, jint mode) {
340 /* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) */
342 android_glDrawRangeElements__IIIIILjava_nio_Buffer_2
343 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf) {
344 jarray _array = (jarray) 0;
345 jint _bufferOffset = (jint) 0;
347 GLvoid *indices = (GLvoid *) 0;
349 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
350 if (indices == NULL) {
351 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
352 indices = (GLvoid *) (_indicesBase + _bufferOffset);
363 releasePointer(_env, _array, indices, JNI_FALSE);
367 /* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset ) */
369 android_glDrawRangeElements__IIIIII
370 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jint offset) {
377 reinterpret_cast<GLvoid *>(offset)
381 /* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
383 android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2
384 (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) {
385 jarray _array = (jarray) 0;
386 jint _bufferOffset = (jint) 0;
388 GLvoid *pixels = (GLvoid *) 0;
390 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
391 if (pixels == NULL) {
392 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
393 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
398 (GLint)internalformat,
408 releasePointer(_env, _array, pixels, JNI_FALSE);
412 /* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset ) */
414 android_glTexImage3D__IIIIIIIIII
415 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jint offset) {
419 (GLint)internalformat,
426 reinterpret_cast<GLvoid *>(offset)
430 /* 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 ) */
432 android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
433 (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) {
434 jarray _array = (jarray) 0;
435 jint _bufferOffset = (jint) 0;
437 GLvoid *pixels = (GLvoid *) 0;
439 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
440 if (pixels == NULL) {
441 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
442 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
458 releasePointer(_env, _array, pixels, JNI_FALSE);
462 /* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset ) */
464 android_glTexSubImage3D__IIIIIIIIIII
465 (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) {
477 reinterpret_cast<GLvoid *>(offset)
481 /* void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
483 android_glCopyTexSubImage3D__IIIIIIIII
484 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) {
498 /* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ) */
500 android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2
501 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jobject data_buf) {
502 jarray _array = (jarray) 0;
503 jint _bufferOffset = (jint) 0;
505 GLvoid *data = (GLvoid *) 0;
507 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
509 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
510 data = (GLvoid *) (_dataBase + _bufferOffset);
512 glCompressedTexImage3D(
515 (GLenum)internalformat,
524 releasePointer(_env, _array, data, JNI_FALSE);
528 /* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset ) */
530 android_glCompressedTexImage3D__IIIIIIIII
531 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint offset) {
532 glCompressedTexImage3D(
535 (GLenum)internalformat,
541 reinterpret_cast<GLvoid *>(offset)
545 /* 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 ) */
547 android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
548 (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) {
549 jarray _array = (jarray) 0;
550 jint _bufferOffset = (jint) 0;
552 GLvoid *data = (GLvoid *) 0;
554 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
556 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
557 data = (GLvoid *) (_dataBase + _bufferOffset);
559 glCompressedTexSubImage3D(
573 releasePointer(_env, _array, data, JNI_FALSE);
577 /* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset ) */
579 android_glCompressedTexSubImage3D__IIIIIIIIIII
580 (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) {
581 glCompressedTexSubImage3D(
592 reinterpret_cast<GLvoid *>(offset)
596 /* void glGenQueries ( GLsizei n, GLuint *ids ) */
598 android_glGenQueries__I_3II
599 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
601 const char * _exceptionType = NULL;
602 const char * _exceptionMessage = NULL;
603 GLuint *ids_base = (GLuint *) 0;
605 GLuint *ids = (GLuint *) 0;
609 _exceptionType = "java/lang/IllegalArgumentException";
610 _exceptionMessage = "ids == null";
615 _exceptionType = "java/lang/IllegalArgumentException";
616 _exceptionMessage = "offset < 0";
619 _remaining = _env->GetArrayLength(ids_ref) - offset;
620 ids_base = (GLuint *)
621 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
622 ids = ids_base + offset;
631 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
632 _exception ? JNI_ABORT: 0);
635 jniThrowException(_env, _exceptionType, _exceptionMessage);
639 /* void glGenQueries ( GLsizei n, GLuint *ids ) */
641 android_glGenQueries__ILjava_nio_IntBuffer_2
642 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
643 jarray _array = (jarray) 0;
644 jint _bufferOffset = (jint) 0;
646 GLuint *ids = (GLuint *) 0;
648 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
650 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
651 ids = (GLuint *) (_idsBase + _bufferOffset);
658 releasePointer(_env, _array, ids, JNI_TRUE);
662 /* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
664 android_glDeleteQueries__I_3II
665 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
667 const char * _exceptionType = NULL;
668 const char * _exceptionMessage = NULL;
669 GLuint *ids_base = (GLuint *) 0;
671 GLuint *ids = (GLuint *) 0;
675 _exceptionType = "java/lang/IllegalArgumentException";
676 _exceptionMessage = "ids == null";
681 _exceptionType = "java/lang/IllegalArgumentException";
682 _exceptionMessage = "offset < 0";
685 _remaining = _env->GetArrayLength(ids_ref) - offset;
686 ids_base = (GLuint *)
687 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
688 ids = ids_base + offset;
697 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
701 jniThrowException(_env, _exceptionType, _exceptionMessage);
705 /* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
707 android_glDeleteQueries__ILjava_nio_IntBuffer_2
708 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
709 jarray _array = (jarray) 0;
710 jint _bufferOffset = (jint) 0;
712 GLuint *ids = (GLuint *) 0;
714 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
716 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
717 ids = (GLuint *) (_idsBase + _bufferOffset);
724 releasePointer(_env, _array, ids, JNI_FALSE);
728 /* GLboolean glIsQuery ( GLuint id ) */
731 (JNIEnv *_env, jobject _this, jint id) {
732 GLboolean _returnValue;
733 _returnValue = glIsQuery(
736 return (jboolean)_returnValue;
739 /* void glBeginQuery ( GLenum target, GLuint id ) */
741 android_glBeginQuery__II
742 (JNIEnv *_env, jobject _this, jint target, jint id) {
749 /* void glEndQuery ( GLenum target ) */
751 android_glEndQuery__I
752 (JNIEnv *_env, jobject _this, jint target) {
758 /* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
760 android_glGetQueryiv__II_3II
761 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
763 const char * _exceptionType = NULL;
764 const char * _exceptionMessage = NULL;
765 GLint *params_base = (GLint *) 0;
767 GLint *params = (GLint *) 0;
771 _exceptionType = "java/lang/IllegalArgumentException";
772 _exceptionMessage = "params == null";
777 _exceptionType = "java/lang/IllegalArgumentException";
778 _exceptionMessage = "offset < 0";
781 _remaining = _env->GetArrayLength(params_ref) - offset;
782 params_base = (GLint *)
783 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
784 params = params_base + offset;
794 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
795 _exception ? JNI_ABORT: 0);
798 jniThrowException(_env, _exceptionType, _exceptionMessage);
802 /* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
804 android_glGetQueryiv__IILjava_nio_IntBuffer_2
805 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
806 jarray _array = (jarray) 0;
807 jint _bufferOffset = (jint) 0;
809 GLint *params = (GLint *) 0;
811 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
812 if (params == NULL) {
813 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
814 params = (GLint *) (_paramsBase + _bufferOffset);
822 releasePointer(_env, _array, params, JNI_TRUE);
826 /* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
828 android_glGetQueryObjectuiv__II_3II
829 (JNIEnv *_env, jobject _this, jint id, jint pname, jintArray params_ref, jint offset) {
831 const char * _exceptionType = NULL;
832 const char * _exceptionMessage = NULL;
833 GLuint *params_base = (GLuint *) 0;
835 GLuint *params = (GLuint *) 0;
839 _exceptionType = "java/lang/IllegalArgumentException";
840 _exceptionMessage = "params == null";
845 _exceptionType = "java/lang/IllegalArgumentException";
846 _exceptionMessage = "offset < 0";
849 _remaining = _env->GetArrayLength(params_ref) - offset;
850 params_base = (GLuint *)
851 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
852 params = params_base + offset;
862 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
863 _exception ? JNI_ABORT: 0);
866 jniThrowException(_env, _exceptionType, _exceptionMessage);
870 /* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
872 android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2
873 (JNIEnv *_env, jobject _this, jint id, jint pname, jobject params_buf) {
874 jarray _array = (jarray) 0;
875 jint _bufferOffset = (jint) 0;
877 GLuint *params = (GLuint *) 0;
879 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
880 if (params == NULL) {
881 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
882 params = (GLuint *) (_paramsBase + _bufferOffset);
890 releasePointer(_env, _array, params, JNI_TRUE);
894 /* GLboolean glUnmapBuffer ( GLenum target ) */
896 android_glUnmapBuffer__I
897 (JNIEnv *_env, jobject _this, jint target) {
898 GLboolean _returnValue;
899 _returnValue = glUnmapBuffer(
902 return (jboolean)_returnValue;
905 /* void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) */
907 android_glGetBufferPointerv__II
908 (JNIEnv *_env, jobject _this, jint target, jint pname) {
911 glGetBufferParameteri64v((GLenum)target, GL_BUFFER_MAP_LENGTH, &_mapLength);
912 glGetBufferPointerv((GLenum)target, (GLenum)pname, &_p);
913 return _env->NewDirectByteBuffer(_p, _mapLength);
916 /* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
918 android_glDrawBuffers__I_3II
919 (JNIEnv *_env, jobject _this, jint n, jintArray bufs_ref, jint offset) {
921 const char * _exceptionType = NULL;
922 const char * _exceptionMessage = NULL;
923 GLenum *bufs_base = (GLenum *) 0;
925 GLenum *bufs = (GLenum *) 0;
929 _exceptionType = "java/lang/IllegalArgumentException";
930 _exceptionMessage = "bufs == null";
935 _exceptionType = "java/lang/IllegalArgumentException";
936 _exceptionMessage = "offset < 0";
939 _remaining = _env->GetArrayLength(bufs_ref) - offset;
940 bufs_base = (GLenum *)
941 _env->GetPrimitiveArrayCritical(bufs_ref, (jboolean *)0);
942 bufs = bufs_base + offset;
951 _env->ReleasePrimitiveArrayCritical(bufs_ref, bufs_base,
955 jniThrowException(_env, _exceptionType, _exceptionMessage);
959 /* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
961 android_glDrawBuffers__ILjava_nio_IntBuffer_2
962 (JNIEnv *_env, jobject _this, jint n, jobject bufs_buf) {
963 jarray _array = (jarray) 0;
964 jint _bufferOffset = (jint) 0;
966 GLenum *bufs = (GLenum *) 0;
968 bufs = (GLenum *)getPointer(_env, bufs_buf, &_array, &_remaining, &_bufferOffset);
970 char * _bufsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
971 bufs = (GLenum *) (_bufsBase + _bufferOffset);
978 releasePointer(_env, _array, bufs, JNI_FALSE);
982 /* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
984 android_glUniformMatrix2x3fv__IIZ_3FI
985 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
987 const char * _exceptionType = NULL;
988 const char * _exceptionMessage = NULL;
989 GLfloat *value_base = (GLfloat *) 0;
991 GLfloat *value = (GLfloat *) 0;
995 _exceptionType = "java/lang/IllegalArgumentException";
996 _exceptionMessage = "value == null";
1001 _exceptionType = "java/lang/IllegalArgumentException";
1002 _exceptionMessage = "offset < 0";
1005 _remaining = _env->GetArrayLength(value_ref) - offset;
1006 value_base = (GLfloat *)
1007 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1008 value = value_base + offset;
1010 glUniformMatrix2x3fv(
1013 (GLboolean)transpose,
1019 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1023 jniThrowException(_env, _exceptionType, _exceptionMessage);
1027 /* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1029 android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2
1030 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1031 jarray _array = (jarray) 0;
1032 jint _bufferOffset = (jint) 0;
1034 GLfloat *value = (GLfloat *) 0;
1036 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1037 if (value == NULL) {
1038 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1039 value = (GLfloat *) (_valueBase + _bufferOffset);
1041 glUniformMatrix2x3fv(
1044 (GLboolean)transpose,
1048 releasePointer(_env, _array, value, JNI_FALSE);
1052 /* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1054 android_glUniformMatrix3x2fv__IIZ_3FI
1055 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1056 jint _exception = 0;
1057 const char * _exceptionType = NULL;
1058 const char * _exceptionMessage = NULL;
1059 GLfloat *value_base = (GLfloat *) 0;
1061 GLfloat *value = (GLfloat *) 0;
1065 _exceptionType = "java/lang/IllegalArgumentException";
1066 _exceptionMessage = "value == null";
1071 _exceptionType = "java/lang/IllegalArgumentException";
1072 _exceptionMessage = "offset < 0";
1075 _remaining = _env->GetArrayLength(value_ref) - offset;
1076 value_base = (GLfloat *)
1077 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1078 value = value_base + offset;
1080 glUniformMatrix3x2fv(
1083 (GLboolean)transpose,
1089 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1093 jniThrowException(_env, _exceptionType, _exceptionMessage);
1097 /* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1099 android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2
1100 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1101 jarray _array = (jarray) 0;
1102 jint _bufferOffset = (jint) 0;
1104 GLfloat *value = (GLfloat *) 0;
1106 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1107 if (value == NULL) {
1108 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1109 value = (GLfloat *) (_valueBase + _bufferOffset);
1111 glUniformMatrix3x2fv(
1114 (GLboolean)transpose,
1118 releasePointer(_env, _array, value, JNI_FALSE);
1122 /* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1124 android_glUniformMatrix2x4fv__IIZ_3FI
1125 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1126 jint _exception = 0;
1127 const char * _exceptionType = NULL;
1128 const char * _exceptionMessage = NULL;
1129 GLfloat *value_base = (GLfloat *) 0;
1131 GLfloat *value = (GLfloat *) 0;
1135 _exceptionType = "java/lang/IllegalArgumentException";
1136 _exceptionMessage = "value == null";
1141 _exceptionType = "java/lang/IllegalArgumentException";
1142 _exceptionMessage = "offset < 0";
1145 _remaining = _env->GetArrayLength(value_ref) - offset;
1146 value_base = (GLfloat *)
1147 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1148 value = value_base + offset;
1150 glUniformMatrix2x4fv(
1153 (GLboolean)transpose,
1159 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1163 jniThrowException(_env, _exceptionType, _exceptionMessage);
1167 /* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1169 android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2
1170 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1171 jarray _array = (jarray) 0;
1172 jint _bufferOffset = (jint) 0;
1174 GLfloat *value = (GLfloat *) 0;
1176 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1177 if (value == NULL) {
1178 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1179 value = (GLfloat *) (_valueBase + _bufferOffset);
1181 glUniformMatrix2x4fv(
1184 (GLboolean)transpose,
1188 releasePointer(_env, _array, value, JNI_FALSE);
1192 /* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1194 android_glUniformMatrix4x2fv__IIZ_3FI
1195 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1196 jint _exception = 0;
1197 const char * _exceptionType = NULL;
1198 const char * _exceptionMessage = NULL;
1199 GLfloat *value_base = (GLfloat *) 0;
1201 GLfloat *value = (GLfloat *) 0;
1205 _exceptionType = "java/lang/IllegalArgumentException";
1206 _exceptionMessage = "value == null";
1211 _exceptionType = "java/lang/IllegalArgumentException";
1212 _exceptionMessage = "offset < 0";
1215 _remaining = _env->GetArrayLength(value_ref) - offset;
1216 value_base = (GLfloat *)
1217 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1218 value = value_base + offset;
1220 glUniformMatrix4x2fv(
1223 (GLboolean)transpose,
1229 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1233 jniThrowException(_env, _exceptionType, _exceptionMessage);
1237 /* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1239 android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2
1240 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1241 jarray _array = (jarray) 0;
1242 jint _bufferOffset = (jint) 0;
1244 GLfloat *value = (GLfloat *) 0;
1246 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1247 if (value == NULL) {
1248 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1249 value = (GLfloat *) (_valueBase + _bufferOffset);
1251 glUniformMatrix4x2fv(
1254 (GLboolean)transpose,
1258 releasePointer(_env, _array, value, JNI_FALSE);
1262 /* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1264 android_glUniformMatrix3x4fv__IIZ_3FI
1265 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1266 jint _exception = 0;
1267 const char * _exceptionType = NULL;
1268 const char * _exceptionMessage = NULL;
1269 GLfloat *value_base = (GLfloat *) 0;
1271 GLfloat *value = (GLfloat *) 0;
1275 _exceptionType = "java/lang/IllegalArgumentException";
1276 _exceptionMessage = "value == null";
1281 _exceptionType = "java/lang/IllegalArgumentException";
1282 _exceptionMessage = "offset < 0";
1285 _remaining = _env->GetArrayLength(value_ref) - offset;
1286 value_base = (GLfloat *)
1287 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1288 value = value_base + offset;
1290 glUniformMatrix3x4fv(
1293 (GLboolean)transpose,
1299 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1303 jniThrowException(_env, _exceptionType, _exceptionMessage);
1307 /* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1309 android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2
1310 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1311 jarray _array = (jarray) 0;
1312 jint _bufferOffset = (jint) 0;
1314 GLfloat *value = (GLfloat *) 0;
1316 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1317 if (value == NULL) {
1318 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1319 value = (GLfloat *) (_valueBase + _bufferOffset);
1321 glUniformMatrix3x4fv(
1324 (GLboolean)transpose,
1328 releasePointer(_env, _array, value, JNI_FALSE);
1332 /* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1334 android_glUniformMatrix4x3fv__IIZ_3FI
1335 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1336 jint _exception = 0;
1337 const char * _exceptionType = NULL;
1338 const char * _exceptionMessage = NULL;
1339 GLfloat *value_base = (GLfloat *) 0;
1341 GLfloat *value = (GLfloat *) 0;
1345 _exceptionType = "java/lang/IllegalArgumentException";
1346 _exceptionMessage = "value == null";
1351 _exceptionType = "java/lang/IllegalArgumentException";
1352 _exceptionMessage = "offset < 0";
1355 _remaining = _env->GetArrayLength(value_ref) - offset;
1356 value_base = (GLfloat *)
1357 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1358 value = value_base + offset;
1360 glUniformMatrix4x3fv(
1363 (GLboolean)transpose,
1369 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1373 jniThrowException(_env, _exceptionType, _exceptionMessage);
1377 /* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1379 android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2
1380 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1381 jarray _array = (jarray) 0;
1382 jint _bufferOffset = (jint) 0;
1384 GLfloat *value = (GLfloat *) 0;
1386 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1387 if (value == NULL) {
1388 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1389 value = (GLfloat *) (_valueBase + _bufferOffset);
1391 glUniformMatrix4x3fv(
1394 (GLboolean)transpose,
1398 releasePointer(_env, _array, value, JNI_FALSE);
1402 /* void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) */
1404 android_glBlitFramebuffer__IIIIIIIIII
1405 (JNIEnv *_env, jobject _this, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) {
1420 /* void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) */
1422 android_glRenderbufferStorageMultisample__IIIII
1423 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height) {
1424 glRenderbufferStorageMultisample(
1427 (GLenum)internalformat,
1433 /* void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) */
1435 android_glFramebufferTextureLayer__IIIII
1436 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level, jint layer) {
1437 glFramebufferTextureLayer(
1446 /* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */
1448 android_glMapBufferRange__IIII
1449 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) {
1450 GLvoid* _p = glMapBufferRange((GLenum)target,
1451 (GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access);
1452 jobject _buf = (jobject)0;
1454 _buf = _env->NewDirectByteBuffer(_p, length);
1459 /* void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length ) */
1461 android_glFlushMappedBufferRange__III
1462 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length) {
1463 glFlushMappedBufferRange(
1470 /* void glBindVertexArray ( GLuint array ) */
1472 android_glBindVertexArray__I
1473 (JNIEnv *_env, jobject _this, jint array) {
1479 /* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
1481 android_glDeleteVertexArrays__I_3II
1482 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
1483 jint _exception = 0;
1484 const char * _exceptionType = NULL;
1485 const char * _exceptionMessage = NULL;
1486 GLuint *arrays_base = (GLuint *) 0;
1488 GLuint *arrays = (GLuint *) 0;
1492 _exceptionType = "java/lang/IllegalArgumentException";
1493 _exceptionMessage = "arrays == null";
1498 _exceptionType = "java/lang/IllegalArgumentException";
1499 _exceptionMessage = "offset < 0";
1502 _remaining = _env->GetArrayLength(arrays_ref) - offset;
1503 arrays_base = (GLuint *)
1504 _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
1505 arrays = arrays_base + offset;
1507 glDeleteVertexArrays(
1514 _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
1518 jniThrowException(_env, _exceptionType, _exceptionMessage);
1522 /* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
1524 android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2
1525 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
1526 jarray _array = (jarray) 0;
1527 jint _bufferOffset = (jint) 0;
1529 GLuint *arrays = (GLuint *) 0;
1531 arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
1532 if (arrays == NULL) {
1533 char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1534 arrays = (GLuint *) (_arraysBase + _bufferOffset);
1536 glDeleteVertexArrays(
1541 releasePointer(_env, _array, arrays, JNI_FALSE);
1545 /* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
1547 android_glGenVertexArrays__I_3II
1548 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
1549 jint _exception = 0;
1550 const char * _exceptionType = NULL;
1551 const char * _exceptionMessage = NULL;
1552 GLuint *arrays_base = (GLuint *) 0;
1554 GLuint *arrays = (GLuint *) 0;
1558 _exceptionType = "java/lang/IllegalArgumentException";
1559 _exceptionMessage = "arrays == null";
1564 _exceptionType = "java/lang/IllegalArgumentException";
1565 _exceptionMessage = "offset < 0";
1568 _remaining = _env->GetArrayLength(arrays_ref) - offset;
1569 arrays_base = (GLuint *)
1570 _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
1571 arrays = arrays_base + offset;
1580 _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
1581 _exception ? JNI_ABORT: 0);
1584 jniThrowException(_env, _exceptionType, _exceptionMessage);
1588 /* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
1590 android_glGenVertexArrays__ILjava_nio_IntBuffer_2
1591 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
1592 jarray _array = (jarray) 0;
1593 jint _bufferOffset = (jint) 0;
1595 GLuint *arrays = (GLuint *) 0;
1597 arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
1598 if (arrays == NULL) {
1599 char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1600 arrays = (GLuint *) (_arraysBase + _bufferOffset);
1607 releasePointer(_env, _array, arrays, JNI_TRUE);
1611 /* GLboolean glIsVertexArray ( GLuint array ) */
1613 android_glIsVertexArray__I
1614 (JNIEnv *_env, jobject _this, jint array) {
1615 GLboolean _returnValue;
1616 _returnValue = glIsVertexArray(
1619 return (jboolean)_returnValue;
1622 /* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
1624 android_glGetIntegeri_v__II_3II
1625 (JNIEnv *_env, jobject _this, jint target, jint index, jintArray data_ref, jint offset) {
1626 jint _exception = 0;
1627 const char * _exceptionType = NULL;
1628 const char * _exceptionMessage = NULL;
1629 GLint *data_base = (GLint *) 0;
1631 GLint *data = (GLint *) 0;
1635 _exceptionType = "java/lang/IllegalArgumentException";
1636 _exceptionMessage = "data == null";
1641 _exceptionType = "java/lang/IllegalArgumentException";
1642 _exceptionMessage = "offset < 0";
1645 _remaining = _env->GetArrayLength(data_ref) - offset;
1646 data_base = (GLint *)
1647 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
1648 data = data_base + offset;
1658 _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
1659 _exception ? JNI_ABORT: 0);
1662 jniThrowException(_env, _exceptionType, _exceptionMessage);
1666 /* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
1668 android_glGetIntegeri_v__IILjava_nio_IntBuffer_2
1669 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
1670 jarray _array = (jarray) 0;
1671 jint _bufferOffset = (jint) 0;
1673 GLint *data = (GLint *) 0;
1675 data = (GLint *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
1677 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1678 data = (GLint *) (_dataBase + _bufferOffset);
1686 releasePointer(_env, _array, data, JNI_TRUE);
1690 /* void glBeginTransformFeedback ( GLenum primitiveMode ) */
1692 android_glBeginTransformFeedback__I
1693 (JNIEnv *_env, jobject _this, jint primitiveMode) {
1694 glBeginTransformFeedback(
1695 (GLenum)primitiveMode
1699 /* void glEndTransformFeedback ( void ) */
1701 android_glEndTransformFeedback__
1702 (JNIEnv *_env, jobject _this) {
1703 glEndTransformFeedback();
1706 /* void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
1708 android_glBindBufferRange__IIIII
1709 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer, jint offset, jint size) {
1719 /* void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer ) */
1721 android_glBindBufferBase__III
1722 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer) {
1730 /* void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) */
1733 android_glTransformFeedbackVaryings
1734 (JNIEnv *_env, jobject _this, jint program, jobjectArray varyings_ref, jint bufferMode) {
1735 jint _exception = 0;
1736 const char* _exceptionType = NULL;
1737 const char* _exceptionMessage = NULL;
1738 jint _count = 0, _i;
1739 const char** _varyings = NULL;
1740 const char* _varying = NULL;
1742 if (!varyings_ref) {
1744 _exceptionType = "java/lang/IllegalArgumentException";
1745 _exceptionMessage = "varyings == null";
1749 _count = _env->GetArrayLength(varyings_ref);
1750 _varyings = (const char**)calloc(_count, sizeof(const char*));
1751 for (_i = 0; _i < _count; _i++) {
1752 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
1755 _exceptionType = "java/lang/IllegalArgumentException";
1756 _exceptionMessage = "null varyings element";
1759 _varyings[_i] = _env->GetStringUTFChars(_varying, 0);
1762 glTransformFeedbackVaryings(program, _count, _varyings, bufferMode);
1765 for (_i = _count - 1; _i >= 0; _i--) {
1766 if (_varyings[_i]) {
1767 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
1769 _env->ReleaseStringUTFChars(_varying, _varyings[_i]);
1775 jniThrowException(_env, _exceptionType, _exceptionMessage);
1779 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1781 android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI
1782 (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) {
1783 jint _exception = 0;
1784 const char * _exceptionType;
1785 const char * _exceptionMessage;
1786 GLsizei *length_base = (GLsizei *) 0;
1787 jint _lengthRemaining;
1788 GLsizei *length = (GLsizei *) 0;
1789 GLint *size_base = (GLint *) 0;
1790 jint _sizeRemaining;
1791 GLint *size = (GLint *) 0;
1792 GLenum *type_base = (GLenum *) 0;
1793 jint _typeRemaining;
1794 GLenum *type = (GLenum *) 0;
1795 char *name_base = (char *) 0;
1796 jint _nameRemaining;
1797 char *name = (char *) 0;
1801 _exceptionType = "java/lang/IllegalArgumentException";
1802 _exceptionMessage = "length == null";
1805 if (lengthOffset < 0) {
1807 _exceptionType = "java/lang/IllegalArgumentException";
1808 _exceptionMessage = "lengthOffset < 0";
1811 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
1812 length_base = (GLsizei *)
1813 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
1814 length = length_base + lengthOffset;
1818 _exceptionType = "java/lang/IllegalArgumentException";
1819 _exceptionMessage = "size == null";
1822 if (sizeOffset < 0) {
1824 _exceptionType = "java/lang/IllegalArgumentException";
1825 _exceptionMessage = "sizeOffset < 0";
1828 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1829 size_base = (GLint *)
1830 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1831 size = size_base + sizeOffset;
1835 _exceptionType = "java/lang/IllegalArgumentException";
1836 _exceptionMessage = "type == null";
1839 if (typeOffset < 0) {
1841 _exceptionType = "java/lang/IllegalArgumentException";
1842 _exceptionMessage = "typeOffset < 0";
1845 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
1846 type_base = (GLenum *)
1847 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
1848 type = type_base + typeOffset;
1852 _exceptionType = "java/lang/IllegalArgumentException";
1853 _exceptionMessage = "name == null";
1856 if (nameOffset < 0) {
1858 _exceptionType = "java/lang/IllegalArgumentException";
1859 _exceptionMessage = "nameOffset < 0";
1862 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
1863 name_base = (char *)
1864 _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0);
1865 name = name_base + nameOffset;
1867 glGetTransformFeedbackVarying(
1879 _env->ReleasePrimitiveArrayCritical(name_ref, name_base,
1880 _exception ? JNI_ABORT: 0);
1883 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
1884 _exception ? JNI_ABORT: 0);
1887 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
1888 _exception ? JNI_ABORT: 0);
1891 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
1892 _exception ? JNI_ABORT: 0);
1895 jniThrowException(_env, _exceptionType, _exceptionMessage);
1899 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1901 android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
1902 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
1903 jarray _lengthArray = (jarray) 0;
1904 jint _lengthBufferOffset = (jint) 0;
1905 jarray _sizeArray = (jarray) 0;
1906 jint _sizeBufferOffset = (jint) 0;
1907 jarray _typeArray = (jarray) 0;
1908 jint _typeBufferOffset = (jint) 0;
1909 jint _lengthRemaining;
1910 GLsizei *length = (GLsizei *) 0;
1911 jint _sizeRemaining;
1912 GLint *size = (GLint *) 0;
1913 jint _typeRemaining;
1914 GLenum *type = (GLenum *) 0;
1916 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
1917 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
1918 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
1919 if (length == NULL) {
1920 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
1921 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
1924 char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
1925 size = (GLint *) (_sizeBase + _sizeBufferOffset);
1928 char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
1929 type = (GLenum *) (_typeBase + _typeBufferOffset);
1931 glGetTransformFeedbackVarying(
1938 // The cast below is incorrect. The driver will end up writing to the
1939 // address specified by name, which will always crash the process since
1940 // it is guaranteed to be in low memory. The additional static_cast
1941 // suppresses the warning for now. http://b/19478262
1942 (char *)static_cast<uintptr_t>(name)
1945 releasePointer(_env, _typeArray, type, JNI_TRUE);
1948 releasePointer(_env, _sizeArray, size, JNI_TRUE);
1951 releasePointer(_env, _lengthArray, length, JNI_TRUE);
1955 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1957 android_glGetTransformFeedbackVarying1
1958 (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) {
1959 jint _exception = 0;
1960 const char * _exceptionType;
1961 const char * _exceptionMessage;
1962 GLint *size_base = (GLint *) 0;
1963 jint _sizeRemaining;
1964 GLint *size = (GLint *) 0;
1965 GLenum *type_base = (GLenum *) 0;
1966 jint _typeRemaining;
1967 GLenum *type = (GLenum *) 0;
1972 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
1974 return _env->NewStringUTF("");
1976 char* buf = (char*) malloc(len);
1979 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
1984 _exceptionType = "java/lang/IllegalArgumentException";
1985 _exceptionMessage = "size == null";
1988 if (sizeOffset < 0) {
1990 _exceptionType = "java/lang/IllegalArgumentException";
1991 _exceptionMessage = "sizeOffset < 0";
1994 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1995 size_base = (GLint *)
1996 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1997 size = size_base + sizeOffset;
2001 _exceptionType = "java/lang/IllegalArgumentException";
2002 _exceptionMessage = "type == null";
2005 if (typeOffset < 0) {
2007 _exceptionType = "java/lang/IllegalArgumentException";
2008 _exceptionMessage = "typeOffset < 0";
2011 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
2012 type_base = (GLenum *)
2013 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
2014 type = type_base + typeOffset;
2016 glGetTransformFeedbackVarying(
2027 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
2028 _exception ? JNI_ABORT: 0);
2031 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
2032 _exception ? JNI_ABORT: 0);
2034 if (_exception != 1) {
2035 result = _env->NewStringUTF(buf);
2041 jniThrowException(_env, _exceptionType, _exceptionMessage);
2044 result = _env->NewStringUTF("");
2050 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
2052 android_glGetTransformFeedbackVarying2
2053 (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) {
2054 jarray _sizeArray = (jarray) 0;
2055 jint _sizeBufferOffset = (jint) 0;
2056 jarray _typeArray = (jarray) 0;
2057 jint _typeBufferOffset = (jint) 0;
2058 jint _lengthRemaining;
2059 GLsizei *length = (GLsizei *) 0;
2060 jint _sizeRemaining;
2061 GLint *size = (GLint *) 0;
2062 jint _typeRemaining;
2063 GLenum *type = (GLenum *) 0;
2068 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
2070 return _env->NewStringUTF("");
2072 char* buf = (char*) malloc(len);
2075 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
2079 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
2080 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
2082 char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
2083 size = (GLint *) (_sizeBase + _sizeBufferOffset);
2086 char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
2087 type = (GLenum *) (_typeBase + _typeBufferOffset);
2089 glGetTransformFeedbackVarying(
2100 releasePointer(_env, _typeArray, type, JNI_TRUE);
2103 releasePointer(_env, _sizeArray, size, JNI_TRUE);
2105 result = _env->NewStringUTF(buf);
2111 /* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2113 android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I
2114 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2115 jarray _array = (jarray) 0;
2116 jint _bufferOffset = (jint) 0;
2118 GLvoid *pointer = (GLvoid *) 0;
2121 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2126 glVertexAttribIPointerBounds(
2136 /* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset ) */
2138 android_glVertexAttribIPointer__IIIII
2139 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jint offset) {
2140 glVertexAttribIPointer(
2145 reinterpret_cast<GLvoid *>(offset)
2149 /* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
2151 android_glGetVertexAttribIiv__II_3II
2152 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
2153 jint _exception = 0;
2154 const char * _exceptionType = NULL;
2155 const char * _exceptionMessage = NULL;
2156 GLint *params_base = (GLint *) 0;
2158 GLint *params = (GLint *) 0;
2162 _exceptionType = "java/lang/IllegalArgumentException";
2163 _exceptionMessage = "params == null";
2168 _exceptionType = "java/lang/IllegalArgumentException";
2169 _exceptionMessage = "offset < 0";
2172 _remaining = _env->GetArrayLength(params_ref) - offset;
2173 params_base = (GLint *)
2174 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2175 params = params_base + offset;
2177 glGetVertexAttribIiv(
2185 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2186 _exception ? JNI_ABORT: 0);
2189 jniThrowException(_env, _exceptionType, _exceptionMessage);
2193 /* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
2195 android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2
2196 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
2197 jarray _array = (jarray) 0;
2198 jint _bufferOffset = (jint) 0;
2200 GLint *params = (GLint *) 0;
2202 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2203 if (params == NULL) {
2204 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2205 params = (GLint *) (_paramsBase + _bufferOffset);
2207 glGetVertexAttribIiv(
2213 releasePointer(_env, _array, params, JNI_TRUE);
2217 /* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
2219 android_glGetVertexAttribIuiv__II_3II
2220 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
2221 jint _exception = 0;
2222 const char * _exceptionType = NULL;
2223 const char * _exceptionMessage = NULL;
2224 GLuint *params_base = (GLuint *) 0;
2226 GLuint *params = (GLuint *) 0;
2230 _exceptionType = "java/lang/IllegalArgumentException";
2231 _exceptionMessage = "params == null";
2236 _exceptionType = "java/lang/IllegalArgumentException";
2237 _exceptionMessage = "offset < 0";
2240 _remaining = _env->GetArrayLength(params_ref) - offset;
2241 params_base = (GLuint *)
2242 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2243 params = params_base + offset;
2245 glGetVertexAttribIuiv(
2253 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2254 _exception ? JNI_ABORT: 0);
2257 jniThrowException(_env, _exceptionType, _exceptionMessage);
2261 /* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
2263 android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2
2264 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
2265 jarray _array = (jarray) 0;
2266 jint _bufferOffset = (jint) 0;
2268 GLuint *params = (GLuint *) 0;
2270 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2271 if (params == NULL) {
2272 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2273 params = (GLuint *) (_paramsBase + _bufferOffset);
2275 glGetVertexAttribIuiv(
2281 releasePointer(_env, _array, params, JNI_TRUE);
2285 /* void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w ) */
2287 android_glVertexAttribI4i__IIIII
2288 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
2298 /* void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) */
2300 android_glVertexAttribI4ui__IIIII
2301 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
2311 /* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
2313 android_glVertexAttribI4iv__I_3II
2314 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
2315 jint _exception = 0;
2316 const char * _exceptionType = NULL;
2317 const char * _exceptionMessage = NULL;
2318 GLint *v_base = (GLint *) 0;
2320 GLint *v = (GLint *) 0;
2324 _exceptionType = "java/lang/IllegalArgumentException";
2325 _exceptionMessage = "v == null";
2330 _exceptionType = "java/lang/IllegalArgumentException";
2331 _exceptionMessage = "offset < 0";
2334 _remaining = _env->GetArrayLength(v_ref) - offset;
2336 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
2337 v = v_base + offset;
2346 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
2350 jniThrowException(_env, _exceptionType, _exceptionMessage);
2354 /* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
2356 android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2
2357 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
2358 jarray _array = (jarray) 0;
2359 jint _bufferOffset = (jint) 0;
2361 GLint *v = (GLint *) 0;
2363 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
2365 char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2366 v = (GLint *) (_vBase + _bufferOffset);
2373 releasePointer(_env, _array, v, JNI_FALSE);
2377 /* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
2379 android_glVertexAttribI4uiv__I_3II
2380 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
2381 jint _exception = 0;
2382 const char * _exceptionType = NULL;
2383 const char * _exceptionMessage = NULL;
2384 GLuint *v_base = (GLuint *) 0;
2386 GLuint *v = (GLuint *) 0;
2390 _exceptionType = "java/lang/IllegalArgumentException";
2391 _exceptionMessage = "v == null";
2396 _exceptionType = "java/lang/IllegalArgumentException";
2397 _exceptionMessage = "offset < 0";
2400 _remaining = _env->GetArrayLength(v_ref) - offset;
2402 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
2403 v = v_base + offset;
2405 glVertexAttribI4uiv(
2412 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
2416 jniThrowException(_env, _exceptionType, _exceptionMessage);
2420 /* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
2422 android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2
2423 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
2424 jarray _array = (jarray) 0;
2425 jint _bufferOffset = (jint) 0;
2427 GLuint *v = (GLuint *) 0;
2429 v = (GLuint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
2431 char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2432 v = (GLuint *) (_vBase + _bufferOffset);
2434 glVertexAttribI4uiv(
2439 releasePointer(_env, _array, v, JNI_FALSE);
2443 /* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
2445 android_glGetUniformuiv__II_3II
2446 (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
2447 jint _exception = 0;
2448 const char * _exceptionType = NULL;
2449 const char * _exceptionMessage = NULL;
2450 GLuint *params_base = (GLuint *) 0;
2452 GLuint *params = (GLuint *) 0;
2456 _exceptionType = "java/lang/IllegalArgumentException";
2457 _exceptionMessage = "params == null";
2462 _exceptionType = "java/lang/IllegalArgumentException";
2463 _exceptionMessage = "offset < 0";
2466 _remaining = _env->GetArrayLength(params_ref) - offset;
2467 params_base = (GLuint *)
2468 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2469 params = params_base + offset;
2479 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2480 _exception ? JNI_ABORT: 0);
2483 jniThrowException(_env, _exceptionType, _exceptionMessage);
2487 /* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
2489 android_glGetUniformuiv__IILjava_nio_IntBuffer_2
2490 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
2491 jarray _array = (jarray) 0;
2492 jint _bufferOffset = (jint) 0;
2494 GLuint *params = (GLuint *) 0;
2496 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2497 if (params == NULL) {
2498 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2499 params = (GLuint *) (_paramsBase + _bufferOffset);
2507 releasePointer(_env, _array, params, JNI_TRUE);
2511 /* GLint glGetFragDataLocation ( GLuint program, const GLchar *name ) */
2513 android_glGetFragDataLocation__ILjava_lang_String_2
2514 (JNIEnv *_env, jobject _this, jint program, jstring name) {
2515 jint _exception = 0;
2516 const char * _exceptionType = NULL;
2517 const char * _exceptionMessage = NULL;
2518 GLint _returnValue = 0;
2519 const char* _nativename = 0;
2523 _exceptionType = "java/lang/IllegalArgumentException";
2524 _exceptionMessage = "name == null";
2527 _nativename = _env->GetStringUTFChars(name, 0);
2529 _returnValue = glGetFragDataLocation(
2531 (GLchar *)_nativename
2536 _env->ReleaseStringUTFChars(name, _nativename);
2540 jniThrowException(_env, _exceptionType, _exceptionMessage);
2542 return (jint)_returnValue;
2545 /* void glUniform1ui ( GLint location, GLuint v0 ) */
2547 android_glUniform1ui__II
2548 (JNIEnv *_env, jobject _this, jint location, jint v0) {
2555 /* void glUniform2ui ( GLint location, GLuint v0, GLuint v1 ) */
2557 android_glUniform2ui__III
2558 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1) {
2566 /* void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
2568 android_glUniform3ui__IIII
2569 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2) {
2578 /* void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
2580 android_glUniform4ui__IIIII
2581 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2, jint v3) {
2591 /* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
2593 android_glUniform1uiv__II_3II
2594 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2595 jint _exception = 0;
2596 const char * _exceptionType = NULL;
2597 const char * _exceptionMessage = NULL;
2598 GLuint *value_base = (GLuint *) 0;
2600 GLuint *value = (GLuint *) 0;
2604 _exceptionType = "java/lang/IllegalArgumentException";
2605 _exceptionMessage = "value == null";
2610 _exceptionType = "java/lang/IllegalArgumentException";
2611 _exceptionMessage = "offset < 0";
2614 _remaining = _env->GetArrayLength(value_ref) - offset;
2615 value_base = (GLuint *)
2616 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2617 value = value_base + offset;
2627 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2631 jniThrowException(_env, _exceptionType, _exceptionMessage);
2635 /* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
2637 android_glUniform1uiv__IILjava_nio_IntBuffer_2
2638 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2639 jarray _array = (jarray) 0;
2640 jint _bufferOffset = (jint) 0;
2642 GLuint *value = (GLuint *) 0;
2644 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2645 if (value == NULL) {
2646 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2647 value = (GLuint *) (_valueBase + _bufferOffset);
2655 releasePointer(_env, _array, value, JNI_FALSE);
2659 /* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
2661 android_glUniform2uiv__II_3II
2662 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2663 jint _exception = 0;
2664 const char * _exceptionType = NULL;
2665 const char * _exceptionMessage = NULL;
2666 GLuint *value_base = (GLuint *) 0;
2668 GLuint *value = (GLuint *) 0;
2672 _exceptionType = "java/lang/IllegalArgumentException";
2673 _exceptionMessage = "value == null";
2678 _exceptionType = "java/lang/IllegalArgumentException";
2679 _exceptionMessage = "offset < 0";
2682 _remaining = _env->GetArrayLength(value_ref) - offset;
2683 value_base = (GLuint *)
2684 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2685 value = value_base + offset;
2695 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2699 jniThrowException(_env, _exceptionType, _exceptionMessage);
2703 /* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
2705 android_glUniform2uiv__IILjava_nio_IntBuffer_2
2706 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2707 jarray _array = (jarray) 0;
2708 jint _bufferOffset = (jint) 0;
2710 GLuint *value = (GLuint *) 0;
2712 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2713 if (value == NULL) {
2714 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2715 value = (GLuint *) (_valueBase + _bufferOffset);
2723 releasePointer(_env, _array, value, JNI_FALSE);
2727 /* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
2729 android_glUniform3uiv__II_3II
2730 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2731 jint _exception = 0;
2732 const char * _exceptionType = NULL;
2733 const char * _exceptionMessage = NULL;
2734 GLuint *value_base = (GLuint *) 0;
2736 GLuint *value = (GLuint *) 0;
2740 _exceptionType = "java/lang/IllegalArgumentException";
2741 _exceptionMessage = "value == null";
2746 _exceptionType = "java/lang/IllegalArgumentException";
2747 _exceptionMessage = "offset < 0";
2750 _remaining = _env->GetArrayLength(value_ref) - offset;
2751 value_base = (GLuint *)
2752 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2753 value = value_base + offset;
2763 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2767 jniThrowException(_env, _exceptionType, _exceptionMessage);
2771 /* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
2773 android_glUniform3uiv__IILjava_nio_IntBuffer_2
2774 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2775 jarray _array = (jarray) 0;
2776 jint _bufferOffset = (jint) 0;
2778 GLuint *value = (GLuint *) 0;
2780 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2781 if (value == NULL) {
2782 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2783 value = (GLuint *) (_valueBase + _bufferOffset);
2791 releasePointer(_env, _array, value, JNI_FALSE);
2795 /* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
2797 android_glUniform4uiv__II_3II
2798 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2799 jint _exception = 0;
2800 const char * _exceptionType = NULL;
2801 const char * _exceptionMessage = NULL;
2802 GLuint *value_base = (GLuint *) 0;
2804 GLuint *value = (GLuint *) 0;
2808 _exceptionType = "java/lang/IllegalArgumentException";
2809 _exceptionMessage = "value == null";
2814 _exceptionType = "java/lang/IllegalArgumentException";
2815 _exceptionMessage = "offset < 0";
2818 _remaining = _env->GetArrayLength(value_ref) - offset;
2819 value_base = (GLuint *)
2820 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2821 value = value_base + offset;
2831 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2835 jniThrowException(_env, _exceptionType, _exceptionMessage);
2839 /* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
2841 android_glUniform4uiv__IILjava_nio_IntBuffer_2
2842 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2843 jarray _array = (jarray) 0;
2844 jint _bufferOffset = (jint) 0;
2846 GLuint *value = (GLuint *) 0;
2848 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2849 if (value == NULL) {
2850 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2851 value = (GLuint *) (_valueBase + _bufferOffset);
2859 releasePointer(_env, _array, value, JNI_FALSE);
2863 /* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
2865 android_glClearBufferiv__II_3II
2866 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
2867 jint _exception = 0;
2868 const char * _exceptionType = NULL;
2869 const char * _exceptionMessage = NULL;
2870 GLint *value_base = (GLint *) 0;
2872 GLint *value = (GLint *) 0;
2876 _exceptionType = "java/lang/IllegalArgumentException";
2877 _exceptionMessage = "value == null";
2882 _exceptionType = "java/lang/IllegalArgumentException";
2883 _exceptionMessage = "offset < 0";
2886 _remaining = _env->GetArrayLength(value_ref) - offset;
2887 value_base = (GLint *)
2888 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2889 value = value_base + offset;
2899 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2903 jniThrowException(_env, _exceptionType, _exceptionMessage);
2907 /* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
2909 android_glClearBufferiv__IILjava_nio_IntBuffer_2
2910 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
2911 jarray _array = (jarray) 0;
2912 jint _bufferOffset = (jint) 0;
2914 GLint *value = (GLint *) 0;
2916 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2917 if (value == NULL) {
2918 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2919 value = (GLint *) (_valueBase + _bufferOffset);
2927 releasePointer(_env, _array, value, JNI_FALSE);
2931 /* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
2933 android_glClearBufferuiv__II_3II
2934 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
2935 jint _exception = 0;
2936 const char * _exceptionType = NULL;
2937 const char * _exceptionMessage = NULL;
2938 GLuint *value_base = (GLuint *) 0;
2940 GLuint *value = (GLuint *) 0;
2944 _exceptionType = "java/lang/IllegalArgumentException";
2945 _exceptionMessage = "value == null";
2950 _exceptionType = "java/lang/IllegalArgumentException";
2951 _exceptionMessage = "offset < 0";
2954 _remaining = _env->GetArrayLength(value_ref) - offset;
2955 value_base = (GLuint *)
2956 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2957 value = value_base + offset;
2967 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2971 jniThrowException(_env, _exceptionType, _exceptionMessage);
2975 /* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
2977 android_glClearBufferuiv__IILjava_nio_IntBuffer_2
2978 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
2979 jarray _array = (jarray) 0;
2980 jint _bufferOffset = (jint) 0;
2982 GLuint *value = (GLuint *) 0;
2984 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2985 if (value == NULL) {
2986 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2987 value = (GLuint *) (_valueBase + _bufferOffset);
2995 releasePointer(_env, _array, value, JNI_FALSE);
2999 /* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
3001 android_glClearBufferfv__II_3FI
3002 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloatArray value_ref, jint offset) {
3003 jint _exception = 0;
3004 const char * _exceptionType = NULL;
3005 const char * _exceptionMessage = NULL;
3006 GLfloat *value_base = (GLfloat *) 0;
3008 GLfloat *value = (GLfloat *) 0;
3012 _exceptionType = "java/lang/IllegalArgumentException";
3013 _exceptionMessage = "value == null";
3018 _exceptionType = "java/lang/IllegalArgumentException";
3019 _exceptionMessage = "offset < 0";
3022 _remaining = _env->GetArrayLength(value_ref) - offset;
3023 value_base = (GLfloat *)
3024 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
3025 value = value_base + offset;
3035 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
3039 jniThrowException(_env, _exceptionType, _exceptionMessage);
3043 /* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
3045 android_glClearBufferfv__IILjava_nio_FloatBuffer_2
3046 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
3047 jarray _array = (jarray) 0;
3048 jint _bufferOffset = (jint) 0;
3050 GLfloat *value = (GLfloat *) 0;
3052 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
3053 if (value == NULL) {
3054 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3055 value = (GLfloat *) (_valueBase + _bufferOffset);
3063 releasePointer(_env, _array, value, JNI_FALSE);
3067 /* void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) */
3069 android_glClearBufferfi__IIFI
3070 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloat depth, jint stencil) {
3079 /* const GLubyte * glGetStringi ( GLenum name, GLuint index ) */
3081 android_glGetStringi__II
3082 (JNIEnv *_env, jobject _this, jint name, jint index) {
3083 const GLubyte* _chars = glGetStringi((GLenum)name, (GLuint)index);
3084 return _env->NewStringUTF((const char*)_chars);
3087 /* void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) */
3089 android_glCopyBufferSubData__IIIII
3090 (JNIEnv *_env, jobject _this, jint readTarget, jint writeTarget, jint readOffset, jint writeOffset, jint size) {
3091 glCopyBufferSubData(
3093 (GLenum)writeTarget,
3094 (GLintptr)readOffset,
3095 (GLintptr)writeOffset,
3100 /* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
3103 android_glGetUniformIndices_array
3104 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jintArray uniformIndices_ref, jint uniformIndicesOffset) {
3105 jint _exception = 0;
3106 const char* _exceptionType = NULL;
3107 const char* _exceptionMessage = NULL;
3110 const char** _names = NULL;
3111 GLuint* _indices_base = NULL;
3112 GLuint* _indices = NULL;
3114 if (!uniformNames_ref) {
3116 _exceptionType = "java/lang/IllegalArgumentException";
3117 _exceptionMessage = "uniformNames == null";
3120 _count = _env->GetArrayLength(uniformNames_ref);
3121 _names = (const char**)calloc(_count, sizeof(const char*));
3122 for (_i = 0; _i < _count; _i++) {
3123 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3126 _exceptionType = "java/lang/IllegalArgumentException";
3127 _exceptionMessage = "null uniformNames element";
3130 _names[_i] = _env->GetStringUTFChars(_name, 0);
3133 if (!uniformIndices_ref) {
3135 _exceptionType = "java/lang/IllegalArgumentException";
3136 _exceptionMessage = "uniformIndices == null";
3139 if (uniformIndicesOffset < 0) {
3141 _exceptionType = "java/lang/IllegalArgumentException";
3142 _exceptionMessage = "uniformIndicesOffset < 0";
3145 if (_env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset < _count) {
3147 _exceptionType = "java/lang/IllegalArgumentException";
3148 _exceptionMessage = "not enough space in uniformIndices";
3151 _indices_base = (GLuint*)_env->GetPrimitiveArrayCritical(
3152 uniformIndices_ref, 0);
3153 _indices = _indices_base + uniformIndicesOffset;
3155 glGetUniformIndices(program, _count, _names, _indices);
3158 if (_indices_base) {
3159 _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, _indices_base,
3160 _exception ? JNI_ABORT : 0);
3162 for (_i = _count - 1; _i >= 0; _i--) {
3164 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3166 _env->ReleaseStringUTFChars(_name, _names[_i]);
3172 jniThrowException(_env, _exceptionType, _exceptionMessage);
3176 /* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
3179 android_glGetUniformIndices_buffer
3180 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jobject uniformIndices_buf) {
3181 jint _exception = 0;
3182 const char* _exceptionType = NULL;
3183 const char* _exceptionMessage = NULL;
3186 const char** _names = NULL;
3187 jarray _uniformIndicesArray = (jarray)0;
3188 jint _uniformIndicesRemaining;
3189 jint _uniformIndicesOffset = 0;
3190 GLuint* _indices = NULL;
3191 char* _indicesBase = NULL;
3193 if (!uniformNames_ref) {
3195 _exceptionType = "java/lang/IllegalArgumentException";
3196 _exceptionMessage = "uniformNames == null";
3199 if (!uniformIndices_buf) {
3201 _exceptionType = "java/lang/IllegalArgumentException";
3202 _exceptionMessage = "uniformIndices == null";
3206 _count = _env->GetArrayLength(uniformNames_ref);
3207 _names = (const char**)calloc(_count, sizeof(const char*));
3208 for (_i = 0; _i < _count; _i++) {
3209 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3212 _exceptionType = "java/lang/IllegalArgumentException";
3213 _exceptionMessage = "null uniformNames element";
3216 _names[_i] = _env->GetStringUTFChars(_name, 0);
3219 _indices = (GLuint*)getPointer(_env, uniformIndices_buf,
3220 &_uniformIndicesArray, &_uniformIndicesRemaining,
3221 &_uniformIndicesOffset);
3223 _indicesBase = (char*)_env->GetPrimitiveArrayCritical(
3224 _uniformIndicesArray, 0);
3225 _indices = (GLuint*)(_indicesBase + _uniformIndicesOffset);
3227 if (_uniformIndicesRemaining < _count) {
3229 _exceptionType = "java/lang/IllegalArgumentException";
3230 _exceptionMessage = "not enough space in uniformIndices";
3234 glGetUniformIndices(program, _count, _names, _indices);
3237 if (_uniformIndicesArray) {
3238 releasePointer(_env, _uniformIndicesArray, _indicesBase, JNI_TRUE);
3240 for (_i = _count - 1; _i >= 0; _i--) {
3242 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3244 _env->ReleaseStringUTFChars(_name, _names[_i]);
3250 jniThrowException(_env, _exceptionType, _exceptionMessage);
3254 /* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
3256 android_glGetActiveUniformsiv__II_3III_3II
3257 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jintArray uniformIndices_ref, jint uniformIndicesOffset, jint pname, jintArray params_ref, jint paramsOffset) {
3258 jint _exception = 0;
3259 const char * _exceptionType = NULL;
3260 const char * _exceptionMessage = NULL;
3261 GLuint *uniformIndices_base = (GLuint *) 0;
3262 jint _uniformIndicesRemaining;
3263 GLuint *uniformIndices = (GLuint *) 0;
3264 GLint *params_base = (GLint *) 0;
3265 jint _paramsRemaining;
3266 GLint *params = (GLint *) 0;
3268 if (!uniformIndices_ref) {
3270 _exceptionType = "java/lang/IllegalArgumentException";
3271 _exceptionMessage = "uniformIndices == null";
3274 if (uniformIndicesOffset < 0) {
3276 _exceptionType = "java/lang/IllegalArgumentException";
3277 _exceptionMessage = "uniformIndicesOffset < 0";
3280 _uniformIndicesRemaining = _env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset;
3281 uniformIndices_base = (GLuint *)
3282 _env->GetPrimitiveArrayCritical(uniformIndices_ref, (jboolean *)0);
3283 uniformIndices = uniformIndices_base + uniformIndicesOffset;
3287 _exceptionType = "java/lang/IllegalArgumentException";
3288 _exceptionMessage = "params == null";
3291 if (paramsOffset < 0) {
3293 _exceptionType = "java/lang/IllegalArgumentException";
3294 _exceptionMessage = "paramsOffset < 0";
3297 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
3298 params_base = (GLint *)
3299 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3300 params = params_base + paramsOffset;
3302 glGetActiveUniformsiv(
3304 (GLsizei)uniformCount,
3305 (GLuint *)uniformIndices,
3312 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3313 _exception ? JNI_ABORT: 0);
3315 if (uniformIndices_base) {
3316 _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, uniformIndices_base,
3320 jniThrowException(_env, _exceptionType, _exceptionMessage);
3324 /* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
3326 android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2
3327 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jobject uniformIndices_buf, jint pname, jobject params_buf) {
3328 jarray _uniformIndicesArray = (jarray) 0;
3329 jint _uniformIndicesBufferOffset = (jint) 0;
3330 jarray _paramsArray = (jarray) 0;
3331 jint _paramsBufferOffset = (jint) 0;
3332 jint _uniformIndicesRemaining;
3333 GLuint *uniformIndices = (GLuint *) 0;
3334 jint _paramsRemaining;
3335 GLint *params = (GLint *) 0;
3337 uniformIndices = (GLuint *)getPointer(_env, uniformIndices_buf, &_uniformIndicesArray, &_uniformIndicesRemaining, &_uniformIndicesBufferOffset);
3338 params = (GLint *)getPointer(_env, params_buf, &_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
3339 if (uniformIndices == NULL) {
3340 char * _uniformIndicesBase = (char *)_env->GetPrimitiveArrayCritical(_uniformIndicesArray, (jboolean *) 0);
3341 uniformIndices = (GLuint *) (_uniformIndicesBase + _uniformIndicesBufferOffset);
3343 if (params == NULL) {
3344 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_paramsArray, (jboolean *) 0);
3345 params = (GLint *) (_paramsBase + _paramsBufferOffset);
3347 glGetActiveUniformsiv(
3349 (GLsizei)uniformCount,
3350 (GLuint *)uniformIndices,
3355 releasePointer(_env, _paramsArray, params, JNI_TRUE);
3357 if (_uniformIndicesArray) {
3358 releasePointer(_env, _uniformIndicesArray, uniformIndices, JNI_FALSE);
3362 /* GLuint glGetUniformBlockIndex ( GLuint program, const GLchar *uniformBlockName ) */
3364 android_glGetUniformBlockIndex__ILjava_lang_String_2
3365 (JNIEnv *_env, jobject _this, jint program, jstring uniformBlockName) {
3366 jint _exception = 0;
3367 const char * _exceptionType = NULL;
3368 const char * _exceptionMessage = NULL;
3369 GLuint _returnValue = 0;
3370 const char* _nativeuniformBlockName = 0;
3372 if (!uniformBlockName) {
3374 _exceptionType = "java/lang/IllegalArgumentException";
3375 _exceptionMessage = "uniformBlockName == null";
3378 _nativeuniformBlockName = _env->GetStringUTFChars(uniformBlockName, 0);
3380 _returnValue = glGetUniformBlockIndex(
3382 (GLchar *)_nativeuniformBlockName
3386 if (_nativeuniformBlockName) {
3387 _env->ReleaseStringUTFChars(uniformBlockName, _nativeuniformBlockName);
3391 jniThrowException(_env, _exceptionType, _exceptionMessage);
3393 return (jint)_returnValue;
3396 /* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
3398 android_glGetActiveUniformBlockiv__III_3II
3399 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jintArray params_ref, jint offset) {
3400 jint _exception = 0;
3401 const char * _exceptionType = NULL;
3402 const char * _exceptionMessage = NULL;
3403 GLint *params_base = (GLint *) 0;
3405 GLint *params = (GLint *) 0;
3409 _exceptionType = "java/lang/IllegalArgumentException";
3410 _exceptionMessage = "params == null";
3415 _exceptionType = "java/lang/IllegalArgumentException";
3416 _exceptionMessage = "offset < 0";
3419 _remaining = _env->GetArrayLength(params_ref) - offset;
3420 params_base = (GLint *)
3421 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3422 params = params_base + offset;
3424 glGetActiveUniformBlockiv(
3426 (GLuint)uniformBlockIndex,
3433 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3434 _exception ? JNI_ABORT: 0);
3437 jniThrowException(_env, _exceptionType, _exceptionMessage);
3441 /* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
3443 android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2
3444 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jobject params_buf) {
3445 jarray _array = (jarray) 0;
3446 jint _bufferOffset = (jint) 0;
3448 GLint *params = (GLint *) 0;
3450 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3451 if (params == NULL) {
3452 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3453 params = (GLint *) (_paramsBase + _bufferOffset);
3455 glGetActiveUniformBlockiv(
3457 (GLuint)uniformBlockIndex,
3462 releasePointer(_env, _array, params, JNI_TRUE);
3466 /* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3468 android_glGetActiveUniformBlockName_III_3II_3BI
3469 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, int bufSize, jintArray length_ref, jint lengthOffset, jbyteArray name_ref, jint nameOffset) {
3470 jint _exception = 0;
3471 const char* _exceptionType;
3472 const char* _exceptionMessage;
3473 GLsizei* _length_base = (GLsizei*)0;
3474 jint _lengthRemaining;
3475 GLsizei* _length = (GLsizei*)0;
3476 GLchar* _name_base = (GLchar*)0;
3477 jint _nameRemaining;
3478 GLchar* _name = (GLchar*)0;
3482 _exceptionType = "java/lang/IllegalArgumentException";
3483 _exceptionMessage = "length == null";
3486 if (lengthOffset < 0) {
3488 _exceptionType = "java/lang/IllegalArgumentException";
3489 _exceptionMessage = "lengthOffset < 0";
3492 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
3493 _length_base = (GLsizei*)_env->GetPrimitiveArrayCritical(
3494 length_ref, (jboolean*)0);
3495 _length = _length_base + lengthOffset;
3499 _exceptionType = "java/lang/IllegalArgumentException";
3500 _exceptionMessage = "uniformBlockName == null";
3503 if (nameOffset < 0) {
3505 _exceptionType = "java/lang/IllegalArgumentException";
3506 _exceptionMessage = "uniformBlockNameOffset < 0";
3509 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
3510 _name_base = (GLchar*)_env->GetPrimitiveArrayCritical(
3511 name_ref, (jboolean*)0);
3512 _name = _name_base + nameOffset;
3514 glGetActiveUniformBlockName(
3516 (GLuint)uniformBlockIndex,
3524 _env->ReleasePrimitiveArrayCritical(name_ref, _name_base,
3525 _exception ? JNI_ABORT: 0);
3528 _env->ReleasePrimitiveArrayCritical(length_ref, _length_base,
3529 _exception ? JNI_ABORT: 0);
3532 jniThrowException(_env, _exceptionType, _exceptionMessage);
3536 /* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3538 android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2
3539 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, jobject length_buf, jobject uniformBlockName_buf) {
3540 jint _exception = 0;
3541 const char* _exceptionType;
3542 const char* _exceptionMessage;
3543 jarray _lengthArray = (jarray)0;
3544 jint _lengthBufferOffset = (jint)0;
3545 GLsizei* _length = (GLsizei*)0;
3546 jint _lengthRemaining;
3547 jarray _nameArray = (jarray)0;
3548 jint _nameBufferOffset = (jint)0;
3549 GLchar* _name = (GLchar*)0;
3550 jint _nameRemaining;
3552 _length = (GLsizei*)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
3553 if (_length == NULL) {
3554 GLsizei* _lengthBase = (GLsizei*)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean*)0);
3555 _length = (GLsizei*)(_lengthBase + _lengthBufferOffset);
3558 _name = (GLchar*)getPointer(_env, uniformBlockName_buf, &_nameArray, &_nameRemaining, &_nameBufferOffset);
3559 if (_name == NULL) {
3560 GLchar* _nameBase = (GLchar*)_env->GetPrimitiveArrayCritical(_nameArray, (jboolean*)0);
3561 _name = (GLchar*)(_nameBase + _nameBufferOffset);
3564 glGetActiveUniformBlockName(
3566 (GLuint)uniformBlockIndex,
3567 (GLsizei)_nameRemaining,
3571 releasePointer(_env, _nameArray, _name, JNI_TRUE);
3574 releasePointer(_env, _lengthArray, _length, JNI_TRUE);
3578 /* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3580 android_glGetActiveUniformBlockName_II
3581 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex) {
3583 glGetActiveUniformBlockiv((GLuint)program, (GLuint)uniformBlockIndex,
3584 GL_UNIFORM_BLOCK_NAME_LENGTH, &len);
3585 GLchar* name = (GLchar*)malloc(len);
3586 glGetActiveUniformBlockName((GLuint)program, (GLuint)uniformBlockIndex,
3588 jstring result = _env->NewStringUTF(name);
3593 /* void glUniformBlockBinding ( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) */
3595 android_glUniformBlockBinding__III
3596 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint uniformBlockBinding) {
3597 glUniformBlockBinding(
3599 (GLuint)uniformBlockIndex,
3600 (GLuint)uniformBlockBinding
3604 /* void glDrawArraysInstanced ( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) */
3606 android_glDrawArraysInstanced__IIII
3607 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count, jint instanceCount) {
3608 glDrawArraysInstanced(
3612 (GLsizei)instanceCount
3616 /* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
3618 android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I
3619 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount) {
3620 jarray _array = (jarray) 0;
3621 jint _bufferOffset = (jint) 0;
3623 GLvoid *indices = (GLvoid *) 0;
3625 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
3626 if (indices == NULL) {
3627 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3628 indices = (GLvoid *) (_indicesBase + _bufferOffset);
3630 glDrawElementsInstanced(
3635 (GLsizei)instanceCount
3638 releasePointer(_env, _array, indices, JNI_FALSE);
3642 /* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
3644 android_glDrawElementsInstanced__IIIII
3645 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount) {
3646 glDrawElementsInstanced(
3650 (GLvoid *)static_cast<uintptr_t>(indicesOffset),
3651 (GLsizei)instanceCount
3655 /* GLsync glFenceSync ( GLenum condition, GLbitfield flags ) */
3657 android_glFenceSync__II
3658 (JNIEnv *_env, jobject _this, jint condition, jint flags) {
3659 GLsync _returnValue;
3660 _returnValue = glFenceSync(
3664 return (jlong)_returnValue;
3667 /* GLboolean glIsSync ( GLsync sync ) */
3670 (JNIEnv *_env, jobject _this, jlong sync) {
3671 GLboolean _returnValue;
3672 _returnValue = glIsSync(
3675 return (jboolean)_returnValue;
3678 /* void glDeleteSync ( GLsync sync ) */
3680 android_glDeleteSync__J
3681 (JNIEnv *_env, jobject _this, jlong sync) {
3687 /* GLenum glClientWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
3689 android_glClientWaitSync__JIJ
3690 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
3691 GLenum _returnValue;
3692 _returnValue = glClientWaitSync(
3697 return (jint)_returnValue;
3700 /* void glWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
3702 android_glWaitSync__JIJ
3703 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
3711 /* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
3713 android_glGetInteger64v__I_3JI
3714 (JNIEnv *_env, jobject _this, jint pname, jlongArray params_ref, jint offset) {
3715 jint _exception = 0;
3716 const char * _exceptionType = NULL;
3717 const char * _exceptionMessage = NULL;
3718 GLint64 *params_base = (GLint64 *) 0;
3720 GLint64 *params = (GLint64 *) 0;
3724 _exceptionType = "java/lang/IllegalArgumentException";
3725 _exceptionMessage = "params == null";
3730 _exceptionType = "java/lang/IllegalArgumentException";
3731 _exceptionMessage = "offset < 0";
3734 _remaining = _env->GetArrayLength(params_ref) - offset;
3735 params_base = (GLint64 *)
3736 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3737 params = params_base + offset;
3746 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3747 _exception ? JNI_ABORT: 0);
3750 jniThrowException(_env, _exceptionType, _exceptionMessage);
3754 /* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
3756 android_glGetInteger64v__ILjava_nio_LongBuffer_2
3757 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
3758 jarray _array = (jarray) 0;
3759 jint _bufferOffset = (jint) 0;
3761 GLint64 *params = (GLint64 *) 0;
3763 params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3764 if (params == NULL) {
3765 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3766 params = (GLint64 *) (_paramsBase + _bufferOffset);
3773 releasePointer(_env, _array, params, JNI_TRUE);
3777 /* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
3779 android_glGetSynciv__JII_3II_3II
3780 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray values_ref, jint valuesOffset) {
3781 jint _exception = 0;
3782 const char * _exceptionType = NULL;
3783 const char * _exceptionMessage = NULL;
3784 GLsizei *length_base = (GLsizei *) 0;
3785 jint _lengthRemaining;
3786 GLsizei *length = (GLsizei *) 0;
3787 GLint *values_base = (GLint *) 0;
3788 jint _valuesRemaining;
3789 GLint *values = (GLint *) 0;
3793 _exceptionType = "java/lang/IllegalArgumentException";
3794 _exceptionMessage = "length == null";
3797 if (lengthOffset < 0) {
3799 _exceptionType = "java/lang/IllegalArgumentException";
3800 _exceptionMessage = "lengthOffset < 0";
3803 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
3804 length_base = (GLsizei *)
3805 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
3806 length = length_base + lengthOffset;
3810 _exceptionType = "java/lang/IllegalArgumentException";
3811 _exceptionMessage = "values == null";
3814 if (valuesOffset < 0) {
3816 _exceptionType = "java/lang/IllegalArgumentException";
3817 _exceptionMessage = "valuesOffset < 0";
3820 _valuesRemaining = _env->GetArrayLength(values_ref) - valuesOffset;
3821 values_base = (GLint *)
3822 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
3823 values = values_base + valuesOffset;
3835 _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
3836 _exception ? JNI_ABORT: 0);
3839 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
3840 _exception ? JNI_ABORT: 0);
3843 jniThrowException(_env, _exceptionType, _exceptionMessage);
3847 /* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
3849 android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
3850 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jobject length_buf, jobject values_buf) {
3851 jarray _lengthArray = (jarray) 0;
3852 jint _lengthBufferOffset = (jint) 0;
3853 jarray _valuesArray = (jarray) 0;
3854 jint _valuesBufferOffset = (jint) 0;
3855 jint _lengthRemaining;
3856 GLsizei *length = (GLsizei *) 0;
3857 jint _valuesRemaining;
3858 GLint *values = (GLint *) 0;
3860 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
3861 values = (GLint *)getPointer(_env, values_buf, &_valuesArray, &_valuesRemaining, &_valuesBufferOffset);
3862 if (length == NULL) {
3863 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
3864 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
3866 if (values == NULL) {
3867 char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_valuesArray, (jboolean *) 0);
3868 values = (GLint *) (_valuesBase + _valuesBufferOffset);
3878 releasePointer(_env, _valuesArray, values, JNI_TRUE);
3881 releasePointer(_env, _lengthArray, length, JNI_TRUE);
3885 /* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
3887 android_glGetInteger64i_v__II_3JI
3888 (JNIEnv *_env, jobject _this, jint target, jint index, jlongArray data_ref, jint offset) {
3889 jint _exception = 0;
3890 const char * _exceptionType = NULL;
3891 const char * _exceptionMessage = NULL;
3892 GLint64 *data_base = (GLint64 *) 0;
3894 GLint64 *data = (GLint64 *) 0;
3898 _exceptionType = "java/lang/IllegalArgumentException";
3899 _exceptionMessage = "data == null";
3904 _exceptionType = "java/lang/IllegalArgumentException";
3905 _exceptionMessage = "offset < 0";
3908 _remaining = _env->GetArrayLength(data_ref) - offset;
3909 data_base = (GLint64 *)
3910 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
3911 data = data_base + offset;
3921 _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
3922 _exception ? JNI_ABORT: 0);
3925 jniThrowException(_env, _exceptionType, _exceptionMessage);
3929 /* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
3931 android_glGetInteger64i_v__IILjava_nio_LongBuffer_2
3932 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
3933 jarray _array = (jarray) 0;
3934 jint _bufferOffset = (jint) 0;
3936 GLint64 *data = (GLint64 *) 0;
3938 data = (GLint64 *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
3940 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3941 data = (GLint64 *) (_dataBase + _bufferOffset);
3949 releasePointer(_env, _array, data, JNI_TRUE);
3953 /* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
3955 android_glGetBufferParameteri64v__II_3JI
3956 (JNIEnv *_env, jobject _this, jint target, jint pname, jlongArray params_ref, jint offset) {
3957 jint _exception = 0;
3958 const char * _exceptionType = NULL;
3959 const char * _exceptionMessage = NULL;
3960 GLint64 *params_base = (GLint64 *) 0;
3962 GLint64 *params = (GLint64 *) 0;
3966 _exceptionType = "java/lang/IllegalArgumentException";
3967 _exceptionMessage = "params == null";
3972 _exceptionType = "java/lang/IllegalArgumentException";
3973 _exceptionMessage = "offset < 0";
3976 _remaining = _env->GetArrayLength(params_ref) - offset;
3977 params_base = (GLint64 *)
3978 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3979 params = params_base + offset;
3981 glGetBufferParameteri64v(
3989 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3990 _exception ? JNI_ABORT: 0);
3993 jniThrowException(_env, _exceptionType, _exceptionMessage);
3997 /* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
3999 android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2
4000 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
4001 jarray _array = (jarray) 0;
4002 jint _bufferOffset = (jint) 0;
4004 GLint64 *params = (GLint64 *) 0;
4006 params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
4007 if (params == NULL) {
4008 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4009 params = (GLint64 *) (_paramsBase + _bufferOffset);
4011 glGetBufferParameteri64v(
4017 releasePointer(_env, _array, params, JNI_TRUE);
4021 /* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
4023 android_glGenSamplers__I_3II
4024 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
4025 jint _exception = 0;
4026 const char * _exceptionType = NULL;
4027 const char * _exceptionMessage = NULL;
4028 GLuint *samplers_base = (GLuint *) 0;
4030 GLuint *samplers = (GLuint *) 0;
4032 if (!samplers_ref) {
4034 _exceptionType = "java/lang/IllegalArgumentException";
4035 _exceptionMessage = "samplers == null";
4040 _exceptionType = "java/lang/IllegalArgumentException";
4041 _exceptionMessage = "offset < 0";
4044 _remaining = _env->GetArrayLength(samplers_ref) - offset;
4045 samplers_base = (GLuint *)
4046 _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
4047 samplers = samplers_base + offset;
4055 if (samplers_base) {
4056 _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
4057 _exception ? JNI_ABORT: 0);
4060 jniThrowException(_env, _exceptionType, _exceptionMessage);
4064 /* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
4066 android_glGenSamplers__ILjava_nio_IntBuffer_2
4067 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
4068 jarray _array = (jarray) 0;
4069 jint _bufferOffset = (jint) 0;
4071 GLuint *samplers = (GLuint *) 0;
4073 samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
4074 if (samplers == NULL) {
4075 char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4076 samplers = (GLuint *) (_samplersBase + _bufferOffset);
4083 releasePointer(_env, _array, samplers, JNI_TRUE);
4087 /* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
4089 android_glDeleteSamplers__I_3II
4090 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
4091 jint _exception = 0;
4092 const char * _exceptionType = NULL;
4093 const char * _exceptionMessage = NULL;
4094 GLuint *samplers_base = (GLuint *) 0;
4096 GLuint *samplers = (GLuint *) 0;
4098 if (!samplers_ref) {
4100 _exceptionType = "java/lang/IllegalArgumentException";
4101 _exceptionMessage = "samplers == null";
4106 _exceptionType = "java/lang/IllegalArgumentException";
4107 _exceptionMessage = "offset < 0";
4110 _remaining = _env->GetArrayLength(samplers_ref) - offset;
4111 samplers_base = (GLuint *)
4112 _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
4113 samplers = samplers_base + offset;
4121 if (samplers_base) {
4122 _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
4126 jniThrowException(_env, _exceptionType, _exceptionMessage);
4130 /* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
4132 android_glDeleteSamplers__ILjava_nio_IntBuffer_2
4133 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
4134 jarray _array = (jarray) 0;
4135 jint _bufferOffset = (jint) 0;
4137 GLuint *samplers = (GLuint *) 0;
4139 samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
4140 if (samplers == NULL) {
4141 char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4142 samplers = (GLuint *) (_samplersBase + _bufferOffset);
4149 releasePointer(_env, _array, samplers, JNI_FALSE);
4153 /* GLboolean glIsSampler ( GLuint sampler ) */
4155 android_glIsSampler__I
4156 (JNIEnv *_env, jobject _this, jint sampler) {
4157 GLboolean _returnValue;
4158 _returnValue = glIsSampler(
4161 return (jboolean)_returnValue;
4164 /* void glBindSampler ( GLuint unit, GLuint sampler ) */
4166 android_glBindSampler__II
4167 (JNIEnv *_env, jobject _this, jint unit, jint sampler) {
4174 /* void glSamplerParameteri ( GLuint sampler, GLenum pname, GLint param ) */
4176 android_glSamplerParameteri__III
4177 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jint param) {
4178 glSamplerParameteri(
4185 /* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
4187 android_glSamplerParameteriv__II_3II
4188 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
4189 jint _exception = 0;
4190 const char * _exceptionType = NULL;
4191 const char * _exceptionMessage = NULL;
4192 GLint *param_base = (GLint *) 0;
4194 GLint *param = (GLint *) 0;
4198 _exceptionType = "java/lang/IllegalArgumentException";
4199 _exceptionMessage = "param == null";
4204 _exceptionType = "java/lang/IllegalArgumentException";
4205 _exceptionMessage = "offset < 0";
4208 _remaining = _env->GetArrayLength(param_ref) - offset;
4209 param_base = (GLint *)
4210 _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
4211 param = param_base + offset;
4213 glSamplerParameteriv(
4221 _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
4225 jniThrowException(_env, _exceptionType, _exceptionMessage);
4229 /* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
4231 android_glSamplerParameteriv__IILjava_nio_IntBuffer_2
4232 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
4233 jarray _array = (jarray) 0;
4234 jint _bufferOffset = (jint) 0;
4236 GLint *param = (GLint *) 0;
4238 param = (GLint *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
4239 if (param == NULL) {
4240 char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4241 param = (GLint *) (_paramBase + _bufferOffset);
4243 glSamplerParameteriv(
4249 releasePointer(_env, _array, param, JNI_FALSE);
4253 /* void glSamplerParameterf ( GLuint sampler, GLenum pname, GLfloat param ) */
4255 android_glSamplerParameterf__IIF
4256 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloat param) {
4257 glSamplerParameterf(
4264 /* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
4266 android_glSamplerParameterfv__II_3FI
4267 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray param_ref, jint offset) {
4268 jint _exception = 0;
4269 const char * _exceptionType = NULL;
4270 const char * _exceptionMessage = NULL;
4271 GLfloat *param_base = (GLfloat *) 0;
4273 GLfloat *param = (GLfloat *) 0;
4277 _exceptionType = "java/lang/IllegalArgumentException";
4278 _exceptionMessage = "param == null";
4283 _exceptionType = "java/lang/IllegalArgumentException";
4284 _exceptionMessage = "offset < 0";
4287 _remaining = _env->GetArrayLength(param_ref) - offset;
4288 param_base = (GLfloat *)
4289 _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
4290 param = param_base + offset;
4292 glSamplerParameterfv(
4300 _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
4304 jniThrowException(_env, _exceptionType, _exceptionMessage);
4308 /* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
4310 android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2
4311 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
4312 jarray _array = (jarray) 0;
4313 jint _bufferOffset = (jint) 0;
4315 GLfloat *param = (GLfloat *) 0;
4317 param = (GLfloat *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
4318 if (param == NULL) {
4319 char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4320 param = (GLfloat *) (_paramBase + _bufferOffset);
4322 glSamplerParameterfv(
4328 releasePointer(_env, _array, param, JNI_FALSE);
4332 /* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
4334 android_glGetSamplerParameteriv__II_3II
4335 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
4336 jint _exception = 0;
4337 const char * _exceptionType = NULL;
4338 const char * _exceptionMessage = NULL;
4339 GLint *params_base = (GLint *) 0;
4341 GLint *params = (GLint *) 0;
4345 _exceptionType = "java/lang/IllegalArgumentException";
4346 _exceptionMessage = "params == null";
4351 _exceptionType = "java/lang/IllegalArgumentException";
4352 _exceptionMessage = "offset < 0";
4355 _remaining = _env->GetArrayLength(params_ref) - offset;
4356 params_base = (GLint *)
4357 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4358 params = params_base + offset;
4360 glGetSamplerParameteriv(
4368 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4369 _exception ? JNI_ABORT: 0);
4372 jniThrowException(_env, _exceptionType, _exceptionMessage);
4376 /* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
4378 android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2
4379 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
4380 jarray _array = (jarray) 0;
4381 jint _bufferOffset = (jint) 0;
4383 GLint *params = (GLint *) 0;
4385 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
4386 if (params == NULL) {
4387 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4388 params = (GLint *) (_paramsBase + _bufferOffset);
4390 glGetSamplerParameteriv(
4396 releasePointer(_env, _array, params, JNI_TRUE);
4400 /* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
4402 android_glGetSamplerParameterfv__II_3FI
4403 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray params_ref, jint offset) {
4404 jint _exception = 0;
4405 const char * _exceptionType = NULL;
4406 const char * _exceptionMessage = NULL;
4407 GLfloat *params_base = (GLfloat *) 0;
4409 GLfloat *params = (GLfloat *) 0;
4413 _exceptionType = "java/lang/IllegalArgumentException";
4414 _exceptionMessage = "params == null";
4419 _exceptionType = "java/lang/IllegalArgumentException";
4420 _exceptionMessage = "offset < 0";
4423 _remaining = _env->GetArrayLength(params_ref) - offset;
4424 params_base = (GLfloat *)
4425 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4426 params = params_base + offset;
4428 glGetSamplerParameterfv(
4436 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4437 _exception ? JNI_ABORT: 0);
4440 jniThrowException(_env, _exceptionType, _exceptionMessage);
4444 /* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
4446 android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2
4447 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
4448 jarray _array = (jarray) 0;
4449 jint _bufferOffset = (jint) 0;
4451 GLfloat *params = (GLfloat *) 0;
4453 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
4454 if (params == NULL) {
4455 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4456 params = (GLfloat *) (_paramsBase + _bufferOffset);
4458 glGetSamplerParameterfv(
4464 releasePointer(_env, _array, params, JNI_TRUE);
4468 /* void glVertexAttribDivisor ( GLuint index, GLuint divisor ) */
4470 android_glVertexAttribDivisor__II
4471 (JNIEnv *_env, jobject _this, jint index, jint divisor) {
4472 glVertexAttribDivisor(
4478 /* void glBindTransformFeedback ( GLenum target, GLuint id ) */
4480 android_glBindTransformFeedback__II
4481 (JNIEnv *_env, jobject _this, jint target, jint id) {
4482 glBindTransformFeedback(
4488 /* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
4490 android_glDeleteTransformFeedbacks__I_3II
4491 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
4492 jint _exception = 0;
4493 const char * _exceptionType = NULL;
4494 const char * _exceptionMessage = NULL;
4495 GLuint *ids_base = (GLuint *) 0;
4497 GLuint *ids = (GLuint *) 0;
4501 _exceptionType = "java/lang/IllegalArgumentException";
4502 _exceptionMessage = "ids == null";
4507 _exceptionType = "java/lang/IllegalArgumentException";
4508 _exceptionMessage = "offset < 0";
4511 _remaining = _env->GetArrayLength(ids_ref) - offset;
4512 ids_base = (GLuint *)
4513 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
4514 ids = ids_base + offset;
4516 glDeleteTransformFeedbacks(
4523 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
4527 jniThrowException(_env, _exceptionType, _exceptionMessage);
4531 /* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
4533 android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2
4534 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
4535 jarray _array = (jarray) 0;
4536 jint _bufferOffset = (jint) 0;
4538 GLuint *ids = (GLuint *) 0;
4540 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
4542 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4543 ids = (GLuint *) (_idsBase + _bufferOffset);
4545 glDeleteTransformFeedbacks(
4550 releasePointer(_env, _array, ids, JNI_FALSE);
4554 /* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
4556 android_glGenTransformFeedbacks__I_3II
4557 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
4558 jint _exception = 0;
4559 const char * _exceptionType = NULL;
4560 const char * _exceptionMessage = NULL;
4561 GLuint *ids_base = (GLuint *) 0;
4563 GLuint *ids = (GLuint *) 0;
4567 _exceptionType = "java/lang/IllegalArgumentException";
4568 _exceptionMessage = "ids == null";
4573 _exceptionType = "java/lang/IllegalArgumentException";
4574 _exceptionMessage = "offset < 0";
4577 _remaining = _env->GetArrayLength(ids_ref) - offset;
4578 ids_base = (GLuint *)
4579 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
4580 ids = ids_base + offset;
4582 glGenTransformFeedbacks(
4589 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
4590 _exception ? JNI_ABORT: 0);
4593 jniThrowException(_env, _exceptionType, _exceptionMessage);
4597 /* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
4599 android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2
4600 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
4601 jarray _array = (jarray) 0;
4602 jint _bufferOffset = (jint) 0;
4604 GLuint *ids = (GLuint *) 0;
4606 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
4608 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4609 ids = (GLuint *) (_idsBase + _bufferOffset);
4611 glGenTransformFeedbacks(
4616 releasePointer(_env, _array, ids, JNI_TRUE);
4620 /* GLboolean glIsTransformFeedback ( GLuint id ) */
4622 android_glIsTransformFeedback__I
4623 (JNIEnv *_env, jobject _this, jint id) {
4624 GLboolean _returnValue;
4625 _returnValue = glIsTransformFeedback(
4628 return (jboolean)_returnValue;
4631 /* void glPauseTransformFeedback ( void ) */
4633 android_glPauseTransformFeedback__
4634 (JNIEnv *_env, jobject _this) {
4635 glPauseTransformFeedback();
4638 /* void glResumeTransformFeedback ( void ) */
4640 android_glResumeTransformFeedback__
4641 (JNIEnv *_env, jobject _this) {
4642 glResumeTransformFeedback();
4645 /* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
4647 android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2
4648 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray binaryFormat_ref, jint binaryFormatOffset, jobject binary_buf) {
4649 jint _exception = 0;
4650 const char * _exceptionType = NULL;
4651 const char * _exceptionMessage = NULL;
4652 jarray _array = (jarray) 0;
4653 jint _bufferOffset = (jint) 0;
4654 GLsizei *length_base = (GLsizei *) 0;
4655 jint _lengthRemaining;
4656 GLsizei *length = (GLsizei *) 0;
4657 GLenum *binaryFormat_base = (GLenum *) 0;
4658 jint _binaryFormatRemaining;
4659 GLenum *binaryFormat = (GLenum *) 0;
4660 jint _binaryRemaining;
4661 GLvoid *binary = (GLvoid *) 0;
4665 _exceptionType = "java/lang/IllegalArgumentException";
4666 _exceptionMessage = "length == null";
4669 if (lengthOffset < 0) {
4671 _exceptionType = "java/lang/IllegalArgumentException";
4672 _exceptionMessage = "lengthOffset < 0";
4675 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
4676 length_base = (GLsizei *)
4677 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
4678 length = length_base + lengthOffset;
4680 if (!binaryFormat_ref) {
4682 _exceptionType = "java/lang/IllegalArgumentException";
4683 _exceptionMessage = "binaryFormat == null";
4686 if (binaryFormatOffset < 0) {
4688 _exceptionType = "java/lang/IllegalArgumentException";
4689 _exceptionMessage = "binaryFormatOffset < 0";
4692 _binaryFormatRemaining = _env->GetArrayLength(binaryFormat_ref) - binaryFormatOffset;
4693 binaryFormat_base = (GLenum *)
4694 _env->GetPrimitiveArrayCritical(binaryFormat_ref, (jboolean *)0);
4695 binaryFormat = binaryFormat_base + binaryFormatOffset;
4697 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining, &_bufferOffset);
4698 if (binary == NULL) {
4699 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4700 binary = (GLvoid *) (_binaryBase + _bufferOffset);
4706 (GLenum *)binaryFormat,
4712 releasePointer(_env, _array, binary, _exception ? JNI_FALSE : JNI_TRUE);
4714 if (binaryFormat_base) {
4715 _env->ReleasePrimitiveArrayCritical(binaryFormat_ref, binaryFormat_base,
4716 _exception ? JNI_ABORT: 0);
4719 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
4720 _exception ? JNI_ABORT: 0);
4723 jniThrowException(_env, _exceptionType, _exceptionMessage);
4727 /* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
4729 android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2
4730 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jobject length_buf, jobject binaryFormat_buf, jobject binary_buf) {
4731 jarray _lengthArray = (jarray) 0;
4732 jint _lengthBufferOffset = (jint) 0;
4733 jarray _binaryFormatArray = (jarray) 0;
4734 jint _binaryFormatBufferOffset = (jint) 0;
4735 jarray _binaryArray = (jarray) 0;
4736 jint _binaryBufferOffset = (jint) 0;
4737 jint _lengthRemaining;
4738 GLsizei *length = (GLsizei *) 0;
4739 jint _binaryFormatRemaining;
4740 GLenum *binaryFormat = (GLenum *) 0;
4741 jint _binaryRemaining;
4742 GLvoid *binary = (GLvoid *) 0;
4744 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
4745 binaryFormat = (GLenum *)getPointer(_env, binaryFormat_buf, &_binaryFormatArray, &_binaryFormatRemaining, &_binaryFormatBufferOffset);
4746 binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining, &_binaryBufferOffset);
4747 if (length == NULL) {
4748 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
4749 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
4751 if (binaryFormat == NULL) {
4752 char * _binaryFormatBase = (char *)_env->GetPrimitiveArrayCritical(_binaryFormatArray, (jboolean *) 0);
4753 binaryFormat = (GLenum *) (_binaryFormatBase + _binaryFormatBufferOffset);
4755 if (binary == NULL) {
4756 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_binaryArray, (jboolean *) 0);
4757 binary = (GLvoid *) (_binaryBase + _binaryBufferOffset);
4763 (GLenum *)binaryFormat,
4767 releasePointer(_env, _binaryArray, binary, JNI_TRUE);
4769 if (_binaryFormatArray) {
4770 releasePointer(_env, _binaryFormatArray, binaryFormat, JNI_TRUE);
4773 releasePointer(_env, _lengthArray, length, JNI_TRUE);
4777 /* void glProgramBinary ( GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length ) */
4779 android_glProgramBinary__IILjava_nio_Buffer_2I
4780 (JNIEnv *_env, jobject _this, jint program, jint binaryFormat, jobject binary_buf, jint length) {
4781 jarray _array = (jarray) 0;
4782 jint _bufferOffset = (jint) 0;
4784 GLvoid *binary = (GLvoid *) 0;
4786 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_remaining, &_bufferOffset);
4787 if (binary == NULL) {
4788 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4789 binary = (GLvoid *) (_binaryBase + _bufferOffset);
4793 (GLenum)binaryFormat,
4798 releasePointer(_env, _array, binary, JNI_FALSE);
4802 /* void glProgramParameteri ( GLuint program, GLenum pname, GLint value ) */
4804 android_glProgramParameteri__III
4805 (JNIEnv *_env, jobject _this, jint program, jint pname, jint value) {
4806 glProgramParameteri(
4813 /* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
4815 android_glInvalidateFramebuffer__II_3II
4816 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset) {
4817 jint _exception = 0;
4818 const char * _exceptionType = NULL;
4819 const char * _exceptionMessage = NULL;
4820 GLenum *attachments_base = (GLenum *) 0;
4822 GLenum *attachments = (GLenum *) 0;
4824 if (!attachments_ref) {
4826 _exceptionType = "java/lang/IllegalArgumentException";
4827 _exceptionMessage = "attachments == null";
4832 _exceptionType = "java/lang/IllegalArgumentException";
4833 _exceptionMessage = "offset < 0";
4836 _remaining = _env->GetArrayLength(attachments_ref) - offset;
4837 attachments_base = (GLenum *)
4838 _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
4839 attachments = attachments_base + offset;
4841 glInvalidateFramebuffer(
4843 (GLsizei)numAttachments,
4844 (GLenum *)attachments
4848 if (attachments_base) {
4849 _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
4853 jniThrowException(_env, _exceptionType, _exceptionMessage);
4857 /* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
4859 android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2
4860 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf) {
4861 jarray _array = (jarray) 0;
4862 jint _bufferOffset = (jint) 0;
4864 GLenum *attachments = (GLenum *) 0;
4866 attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
4867 if (attachments == NULL) {
4868 char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4869 attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
4871 glInvalidateFramebuffer(
4873 (GLsizei)numAttachments,
4874 (GLenum *)attachments
4877 releasePointer(_env, _array, attachments, JNI_FALSE);
4881 /* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
4883 android_glInvalidateSubFramebuffer__II_3IIIIII
4884 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset, jint x, jint y, jint width, jint height) {
4885 jint _exception = 0;
4886 const char * _exceptionType = NULL;
4887 const char * _exceptionMessage = NULL;
4888 GLenum *attachments_base = (GLenum *) 0;
4890 GLenum *attachments = (GLenum *) 0;
4892 if (!attachments_ref) {
4894 _exceptionType = "java/lang/IllegalArgumentException";
4895 _exceptionMessage = "attachments == null";
4900 _exceptionType = "java/lang/IllegalArgumentException";
4901 _exceptionMessage = "offset < 0";
4904 _remaining = _env->GetArrayLength(attachments_ref) - offset;
4905 attachments_base = (GLenum *)
4906 _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
4907 attachments = attachments_base + offset;
4909 glInvalidateSubFramebuffer(
4911 (GLsizei)numAttachments,
4912 (GLenum *)attachments,
4920 if (attachments_base) {
4921 _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
4925 jniThrowException(_env, _exceptionType, _exceptionMessage);
4929 /* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
4931 android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII
4932 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf, jint x, jint y, jint width, jint height) {
4933 jarray _array = (jarray) 0;
4934 jint _bufferOffset = (jint) 0;
4936 GLenum *attachments = (GLenum *) 0;
4938 attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
4939 if (attachments == NULL) {
4940 char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4941 attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
4943 glInvalidateSubFramebuffer(
4945 (GLsizei)numAttachments,
4946 (GLenum *)attachments,
4953 releasePointer(_env, _array, attachments, JNI_FALSE);
4957 /* void glTexStorage2D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) */
4959 android_glTexStorage2D__IIIII
4960 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height) {
4964 (GLenum)internalformat,
4970 /* void glTexStorage3D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) */
4972 android_glTexStorage3D__IIIIII
4973 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) {
4977 (GLenum)internalformat,
4984 /* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
4986 android_glGetInternalformativ__IIII_3II
4987 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jintArray params_ref, jint offset) {
4988 jint _exception = 0;
4989 const char * _exceptionType = NULL;
4990 const char * _exceptionMessage = NULL;
4991 GLint *params_base = (GLint *) 0;
4993 GLint *params = (GLint *) 0;
4997 _exceptionType = "java/lang/IllegalArgumentException";
4998 _exceptionMessage = "params == null";
5003 _exceptionType = "java/lang/IllegalArgumentException";
5004 _exceptionMessage = "offset < 0";
5007 _remaining = _env->GetArrayLength(params_ref) - offset;
5008 params_base = (GLint *)
5009 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5010 params = params_base + offset;
5012 glGetInternalformativ(
5014 (GLenum)internalformat,
5022 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5023 _exception ? JNI_ABORT: 0);
5026 jniThrowException(_env, _exceptionType, _exceptionMessage);
5030 /* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
5032 android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2
5033 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jobject params_buf) {
5034 jarray _array = (jarray) 0;
5035 jint _bufferOffset = (jint) 0;
5037 GLint *params = (GLint *) 0;
5039 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
5040 if (params == NULL) {
5041 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
5042 params = (GLint *) (_paramsBase + _bufferOffset);
5044 glGetInternalformativ(
5046 (GLenum)internalformat,
5052 releasePointer(_env, _array, params, JNI_TRUE);
5056 static const char *classPathName = "android/opengl/GLES30";
5058 static JNINativeMethod methods[] = {
5059 {"_nativeClassInit", "()V", (void*)nativeClassInit },
5060 {"glReadBuffer", "(I)V", (void *) android_glReadBuffer__I },
5061 {"glDrawRangeElements", "(IIIIILjava/nio/Buffer;)V", (void *) android_glDrawRangeElements__IIIIILjava_nio_Buffer_2 },
5062 {"glDrawRangeElements", "(IIIIII)V", (void *) android_glDrawRangeElements__IIIIII },
5063 {"glTexImage3D", "(IIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2 },
5064 {"glTexImage3D", "(IIIIIIIIII)V", (void *) android_glTexImage3D__IIIIIIIIII },
5065 {"glTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
5066 {"glTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glTexSubImage3D__IIIIIIIIIII },
5067 {"glCopyTexSubImage3D", "(IIIIIIIII)V", (void *) android_glCopyTexSubImage3D__IIIIIIIII },
5068 {"glCompressedTexImage3D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2 },
5069 {"glCompressedTexImage3D", "(IIIIIIIII)V", (void *) android_glCompressedTexImage3D__IIIIIIIII },
5070 {"glCompressedTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
5071 {"glCompressedTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIII },
5072 {"glGenQueries", "(I[II)V", (void *) android_glGenQueries__I_3II },
5073 {"glGenQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenQueries__ILjava_nio_IntBuffer_2 },
5074 {"glDeleteQueries", "(I[II)V", (void *) android_glDeleteQueries__I_3II },
5075 {"glDeleteQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteQueries__ILjava_nio_IntBuffer_2 },
5076 {"glIsQuery", "(I)Z", (void *) android_glIsQuery__I },
5077 {"glBeginQuery", "(II)V", (void *) android_glBeginQuery__II },
5078 {"glEndQuery", "(I)V", (void *) android_glEndQuery__I },
5079 {"glGetQueryiv", "(II[II)V", (void *) android_glGetQueryiv__II_3II },
5080 {"glGetQueryiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryiv__IILjava_nio_IntBuffer_2 },
5081 {"glGetQueryObjectuiv", "(II[II)V", (void *) android_glGetQueryObjectuiv__II_3II },
5082 {"glGetQueryObjectuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2 },
5083 {"glUnmapBuffer", "(I)Z", (void *) android_glUnmapBuffer__I },
5084 {"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II },
5085 {"glDrawBuffers", "(I[II)V", (void *) android_glDrawBuffers__I_3II },
5086 {"glDrawBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDrawBuffers__ILjava_nio_IntBuffer_2 },
5087 {"glUniformMatrix2x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x3fv__IIZ_3FI },
5088 {"glUniformMatrix2x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2 },
5089 {"glUniformMatrix3x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x2fv__IIZ_3FI },
5090 {"glUniformMatrix3x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2 },
5091 {"glUniformMatrix2x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x4fv__IIZ_3FI },
5092 {"glUniformMatrix2x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2 },
5093 {"glUniformMatrix4x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x2fv__IIZ_3FI },
5094 {"glUniformMatrix4x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2 },
5095 {"glUniformMatrix3x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x4fv__IIZ_3FI },
5096 {"glUniformMatrix3x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2 },
5097 {"glUniformMatrix4x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x3fv__IIZ_3FI },
5098 {"glUniformMatrix4x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2 },
5099 {"glBlitFramebuffer", "(IIIIIIIIII)V", (void *) android_glBlitFramebuffer__IIIIIIIIII },
5100 {"glRenderbufferStorageMultisample", "(IIIII)V", (void *) android_glRenderbufferStorageMultisample__IIIII },
5101 {"glFramebufferTextureLayer", "(IIIII)V", (void *) android_glFramebufferTextureLayer__IIIII },
5102 {"glMapBufferRange", "(IIII)Ljava/nio/Buffer;", (void *) android_glMapBufferRange__IIII },
5103 {"glFlushMappedBufferRange", "(III)V", (void *) android_glFlushMappedBufferRange__III },
5104 {"glBindVertexArray", "(I)V", (void *) android_glBindVertexArray__I },
5105 {"glDeleteVertexArrays", "(I[II)V", (void *) android_glDeleteVertexArrays__I_3II },
5106 {"glDeleteVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2 },
5107 {"glGenVertexArrays", "(I[II)V", (void *) android_glGenVertexArrays__I_3II },
5108 {"glGenVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenVertexArrays__ILjava_nio_IntBuffer_2 },
5109 {"glIsVertexArray", "(I)Z", (void *) android_glIsVertexArray__I },
5110 {"glGetIntegeri_v", "(II[II)V", (void *) android_glGetIntegeri_v__II_3II },
5111 {"glGetIntegeri_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetIntegeri_v__IILjava_nio_IntBuffer_2 },
5112 {"glBeginTransformFeedback", "(I)V", (void *) android_glBeginTransformFeedback__I },
5113 {"glEndTransformFeedback", "()V", (void *) android_glEndTransformFeedback__ },
5114 {"glBindBufferRange", "(IIIII)V", (void *) android_glBindBufferRange__IIIII },
5115 {"glBindBufferBase", "(III)V", (void *) android_glBindBufferBase__III },
5116 {"glTransformFeedbackVaryings", "(I[Ljava/lang/String;I)V", (void *) android_glTransformFeedbackVaryings },
5117 {"glGetTransformFeedbackVarying", "(III[II[II[II[BI)V", (void *) android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI },
5118 {"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 },
5119 {"glGetTransformFeedbackVarying", "(II[II[II)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying1 },
5120 {"glGetTransformFeedbackVarying", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying2 },
5121 {"glVertexAttribIPointerBounds", "(IIIILjava/nio/Buffer;I)V", (void *) android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I },
5122 {"glVertexAttribIPointer", "(IIIII)V", (void *) android_glVertexAttribIPointer__IIIII },
5123 {"glGetVertexAttribIiv", "(II[II)V", (void *) android_glGetVertexAttribIiv__II_3II },
5124 {"glGetVertexAttribIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2 },
5125 {"glGetVertexAttribIuiv", "(II[II)V", (void *) android_glGetVertexAttribIuiv__II_3II },
5126 {"glGetVertexAttribIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2 },
5127 {"glVertexAttribI4i", "(IIIII)V", (void *) android_glVertexAttribI4i__IIIII },
5128 {"glVertexAttribI4ui", "(IIIII)V", (void *) android_glVertexAttribI4ui__IIIII },
5129 {"glVertexAttribI4iv", "(I[II)V", (void *) android_glVertexAttribI4iv__I_3II },
5130 {"glVertexAttribI4iv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2 },
5131 {"glVertexAttribI4uiv", "(I[II)V", (void *) android_glVertexAttribI4uiv__I_3II },
5132 {"glVertexAttribI4uiv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2 },
5133 {"glGetUniformuiv", "(II[II)V", (void *) android_glGetUniformuiv__II_3II },
5134 {"glGetUniformuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformuiv__IILjava_nio_IntBuffer_2 },
5135 {"glGetFragDataLocation", "(ILjava/lang/String;)I", (void *) android_glGetFragDataLocation__ILjava_lang_String_2 },
5136 {"glUniform1ui", "(II)V", (void *) android_glUniform1ui__II },
5137 {"glUniform2ui", "(III)V", (void *) android_glUniform2ui__III },
5138 {"glUniform3ui", "(IIII)V", (void *) android_glUniform3ui__IIII },
5139 {"glUniform4ui", "(IIIII)V", (void *) android_glUniform4ui__IIIII },
5140 {"glUniform1uiv", "(II[II)V", (void *) android_glUniform1uiv__II_3II },
5141 {"glUniform1uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1uiv__IILjava_nio_IntBuffer_2 },
5142 {"glUniform2uiv", "(II[II)V", (void *) android_glUniform2uiv__II_3II },
5143 {"glUniform2uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2uiv__IILjava_nio_IntBuffer_2 },
5144 {"glUniform3uiv", "(II[II)V", (void *) android_glUniform3uiv__II_3II },
5145 {"glUniform3uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3uiv__IILjava_nio_IntBuffer_2 },
5146 {"glUniform4uiv", "(II[II)V", (void *) android_glUniform4uiv__II_3II },
5147 {"glUniform4uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4uiv__IILjava_nio_IntBuffer_2 },
5148 {"glClearBufferiv", "(II[II)V", (void *) android_glClearBufferiv__II_3II },
5149 {"glClearBufferiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferiv__IILjava_nio_IntBuffer_2 },
5150 {"glClearBufferuiv", "(II[II)V", (void *) android_glClearBufferuiv__II_3II },
5151 {"glClearBufferuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferuiv__IILjava_nio_IntBuffer_2 },
5152 {"glClearBufferfv", "(II[FI)V", (void *) android_glClearBufferfv__II_3FI },
5153 {"glClearBufferfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glClearBufferfv__IILjava_nio_FloatBuffer_2 },
5154 {"glClearBufferfi", "(IIFI)V", (void *) android_glClearBufferfi__IIFI },
5155 {"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II },
5156 {"glCopyBufferSubData", "(IIIII)V", (void *) android_glCopyBufferSubData__IIIII },
5157 {"glGetUniformIndices", "(I[Ljava/lang/String;[II)V", (void *) android_glGetUniformIndices_array },
5158 {"glGetUniformIndices", "(I[Ljava/lang/String;Ljava/nio/IntBuffer;)V", (void *) android_glGetUniformIndices_buffer },
5159 {"glGetActiveUniformsiv", "(II[III[II)V", (void *) android_glGetActiveUniformsiv__II_3III_3II },
5160 {"glGetActiveUniformsiv", "(IILjava/nio/IntBuffer;ILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2 },
5161 {"glGetUniformBlockIndex", "(ILjava/lang/String;)I", (void *) android_glGetUniformBlockIndex__ILjava_lang_String_2 },
5162 {"glGetActiveUniformBlockiv", "(III[II)V", (void *) android_glGetActiveUniformBlockiv__III_3II },
5163 {"glGetActiveUniformBlockiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2 },
5164 {"glGetActiveUniformBlockName", "(III[II[BI)V", (void *) android_glGetActiveUniformBlockName_III_3II_3BI },
5165 {"glGetActiveUniformBlockName", "(IILjava/nio/Buffer;Ljava/nio/Buffer;)V", (void *) android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 },
5166 {"glGetActiveUniformBlockName", "(II)Ljava/lang/String;", (void *) android_glGetActiveUniformBlockName_II },
5167 {"glUniformBlockBinding", "(III)V", (void *) android_glUniformBlockBinding__III },
5168 {"glDrawArraysInstanced", "(IIII)V", (void *) android_glDrawArraysInstanced__IIII },
5169 {"glDrawElementsInstanced", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I },
5170 {"glDrawElementsInstanced", "(IIIII)V", (void *) android_glDrawElementsInstanced__IIIII },
5171 {"glFenceSync", "(II)J", (void *) android_glFenceSync__II },
5172 {"glIsSync", "(J)Z", (void *) android_glIsSync__J },
5173 {"glDeleteSync", "(J)V", (void *) android_glDeleteSync__J },
5174 {"glClientWaitSync", "(JIJ)I", (void *) android_glClientWaitSync__JIJ },
5175 {"glWaitSync", "(JIJ)V", (void *) android_glWaitSync__JIJ },
5176 {"glGetInteger64v", "(I[JI)V", (void *) android_glGetInteger64v__I_3JI },
5177 {"glGetInteger64v", "(ILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64v__ILjava_nio_LongBuffer_2 },
5178 {"glGetSynciv", "(JII[II[II)V", (void *) android_glGetSynciv__JII_3II_3II },
5179 {"glGetSynciv", "(JIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
5180 {"glGetInteger64i_v", "(II[JI)V", (void *) android_glGetInteger64i_v__II_3JI },
5181 {"glGetInteger64i_v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64i_v__IILjava_nio_LongBuffer_2 },
5182 {"glGetBufferParameteri64v", "(II[JI)V", (void *) android_glGetBufferParameteri64v__II_3JI },
5183 {"glGetBufferParameteri64v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2 },
5184 {"glGenSamplers", "(I[II)V", (void *) android_glGenSamplers__I_3II },
5185 {"glGenSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenSamplers__ILjava_nio_IntBuffer_2 },
5186 {"glDeleteSamplers", "(I[II)V", (void *) android_glDeleteSamplers__I_3II },
5187 {"glDeleteSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteSamplers__ILjava_nio_IntBuffer_2 },
5188 {"glIsSampler", "(I)Z", (void *) android_glIsSampler__I },
5189 {"glBindSampler", "(II)V", (void *) android_glBindSampler__II },
5190 {"glSamplerParameteri", "(III)V", (void *) android_glSamplerParameteri__III },
5191 {"glSamplerParameteriv", "(II[II)V", (void *) android_glSamplerParameteriv__II_3II },
5192 {"glSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameteriv__IILjava_nio_IntBuffer_2 },
5193 {"glSamplerParameterf", "(IIF)V", (void *) android_glSamplerParameterf__IIF },
5194 {"glSamplerParameterfv", "(II[FI)V", (void *) android_glSamplerParameterfv__II_3FI },
5195 {"glSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
5196 {"glGetSamplerParameteriv", "(II[II)V", (void *) android_glGetSamplerParameteriv__II_3II },
5197 {"glGetSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2 },
5198 {"glGetSamplerParameterfv", "(II[FI)V", (void *) android_glGetSamplerParameterfv__II_3FI },
5199 {"glGetSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
5200 {"glVertexAttribDivisor", "(II)V", (void *) android_glVertexAttribDivisor__II },
5201 {"glBindTransformFeedback", "(II)V", (void *) android_glBindTransformFeedback__II },
5202 {"glDeleteTransformFeedbacks", "(I[II)V", (void *) android_glDeleteTransformFeedbacks__I_3II },
5203 {"glDeleteTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2 },
5204 {"glGenTransformFeedbacks", "(I[II)V", (void *) android_glGenTransformFeedbacks__I_3II },
5205 {"glGenTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2 },
5206 {"glIsTransformFeedback", "(I)Z", (void *) android_glIsTransformFeedback__I },
5207 {"glPauseTransformFeedback", "()V", (void *) android_glPauseTransformFeedback__ },
5208 {"glResumeTransformFeedback", "()V", (void *) android_glResumeTransformFeedback__ },
5209 {"glGetProgramBinary", "(II[II[IILjava/nio/Buffer;)V", (void *) android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2 },
5210 {"glGetProgramBinary", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/Buffer;)V", (void *) android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2 },
5211 {"glProgramBinary", "(IILjava/nio/Buffer;I)V", (void *) android_glProgramBinary__IILjava_nio_Buffer_2I },
5212 {"glProgramParameteri", "(III)V", (void *) android_glProgramParameteri__III },
5213 {"glInvalidateFramebuffer", "(II[II)V", (void *) android_glInvalidateFramebuffer__II_3II },
5214 {"glInvalidateFramebuffer", "(IILjava/nio/IntBuffer;)V", (void *) android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2 },
5215 {"glInvalidateSubFramebuffer", "(II[IIIIII)V", (void *) android_glInvalidateSubFramebuffer__II_3IIIIII },
5216 {"glInvalidateSubFramebuffer", "(IILjava/nio/IntBuffer;IIII)V", (void *) android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII },
5217 {"glTexStorage2D", "(IIIII)V", (void *) android_glTexStorage2D__IIIII },
5218 {"glTexStorage3D", "(IIIIII)V", (void *) android_glTexStorage3D__IIIIII },
5219 {"glGetInternalformativ", "(IIII[II)V", (void *) android_glGetInternalformativ__IIII_3II },
5220 {"glGetInternalformativ", "(IIIILjava/nio/IntBuffer;)V", (void *) android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2 },
5223 int register_android_opengl_jni_GLES30(JNIEnv *_env)
5226 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));