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 #include <GLES3/gl3.h>
21 #include <GLES3/gl3ext.h>
25 #include <android_runtime/AndroidRuntime.h>
26 #include <utils/misc.h>
29 static int initialized = 0;
31 static jclass nioAccessClass;
32 static jclass bufferClass;
33 static jmethodID getBasePointerID;
34 static jmethodID getBaseArrayID;
35 static jmethodID getBaseArrayOffsetID;
36 static jfieldID positionID;
37 static jfieldID limitID;
38 static jfieldID elementSizeShiftID;
41 /* special calls implemented in Android's GLES wrapper used to more
42 * efficiently bound-check passed arrays */
44 #ifdef GL_VERSION_ES_CM_1_1
45 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
46 const GLvoid *ptr, GLsizei count);
47 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
48 const GLvoid *pointer, GLsizei count);
49 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
50 GLsizei stride, const GLvoid *pointer, GLsizei count);
51 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
60 #ifdef GL_ES_VERSION_2_0
61 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
62 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
63 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
66 #ifdef GL_ES_VERSION_3_0
67 static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
68 GLsizei stride, const GLvoid *pointer, GLsizei count) {
69 glVertexAttribIPointer(indx, size, type, stride, pointer);
74 /* Cache method IDs each time the class is loaded. */
77 nativeClassInit(JNIEnv *_env, jclass glImplClass)
79 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
80 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
82 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
83 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
85 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
86 "getBasePointer", "(Ljava/nio/Buffer;)J");
87 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
88 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
89 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
90 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
92 positionID = _env->GetFieldID(bufferClass, "position", "I");
93 limitID = _env->GetFieldID(bufferClass, "limit", "I");
95 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
99 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
103 jint elementSizeShift;
106 position = _env->GetIntField(buffer, positionID);
107 limit = _env->GetIntField(buffer, limitID);
108 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
109 *remaining = (limit - position) << elementSizeShift;
110 pointer = _env->CallStaticLongMethod(nioAccessClass,
111 getBasePointerID, buffer);
114 return reinterpret_cast<void*>(pointer);
117 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
118 getBaseArrayID, buffer);
119 *offset = _env->CallStaticIntMethod(nioAccessClass,
120 getBaseArrayOffsetID, buffer);
126 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
128 _env->ReleasePrimitiveArrayCritical(array, data,
129 commit ? 0 : JNI_ABORT);
133 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
134 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
136 jint position = _env->GetIntField(buffer, positionID);
137 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
138 buf += position << elementSizeShift;
140 jniThrowException(_env, "java/lang/IllegalArgumentException",
141 "Must use a native order direct Buffer");
146 // --------------------------------------------------------------------------
149 * returns the number of values glGet returns for a given pname.
151 * The code below is written such that pnames requiring only one values
152 * are the default (and are not explicitely tested for). This makes the
153 * checking code much shorter/readable/efficient.
155 * This means that unknown pnames (e.g.: extensions) will default to 1. If
156 * that unknown pname needs more than 1 value, then the validation check
157 * is incomplete and the app may crash if it passed the wrong number params.
159 static int getNeededCount(GLint pname) {
161 #ifdef GL_ES_VERSION_2_0
164 case GL_ALIASED_LINE_WIDTH_RANGE:
165 case GL_ALIASED_POINT_SIZE_RANGE:
170 case GL_COLOR_CLEAR_VALUE:
171 case GL_COLOR_WRITEMASK:
177 case GL_COMPRESSED_TEXTURE_FORMATS:
178 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
181 case GL_SHADER_BINARY_FORMATS:
182 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
187 #ifdef GL_VERSION_ES_CM_1_1
190 case GL_ALIASED_LINE_WIDTH_RANGE:
191 case GL_ALIASED_POINT_SIZE_RANGE:
193 case GL_SMOOTH_LINE_WIDTH_RANGE:
194 case GL_SMOOTH_POINT_SIZE_RANGE:
198 case GL_CURRENT_NORMAL:
199 case GL_POINT_DISTANCE_ATTENUATION:
203 case GL_COLOR_CLEAR_VALUE:
204 case GL_COLOR_WRITEMASK:
205 case GL_CURRENT_COLOR:
206 case GL_CURRENT_TEXTURE_COORDS:
208 case GL_LIGHT_MODEL_AMBIENT:
214 case GL_MODELVIEW_MATRIX:
215 case GL_PROJECTION_MATRIX:
216 case GL_TEXTURE_MATRIX:
220 case GL_COMPRESSED_TEXTURE_FORMATS:
221 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
228 template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
231 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
233 const char * _exceptionType;
234 const char * _exceptionMessage;
235 CTYPE *params_base = (CTYPE *) 0;
237 CTYPE *params = (CTYPE *) 0;
242 _exceptionType = "java/lang/IllegalArgumentException";
243 _exceptionMessage = "params == null";
248 _exceptionType = "java/lang/IllegalArgumentException";
249 _exceptionMessage = "offset < 0";
252 _remaining = _env->GetArrayLength(params_ref) - offset;
253 _needed = getNeededCount(pname);
254 // if we didn't find this pname, we just assume the user passed
255 // an array of the right size -- this might happen with extensions
256 // or if we forget an enum here.
257 if (_remaining < _needed) {
259 _exceptionType = "java/lang/IllegalArgumentException";
260 _exceptionMessage = "length - offset < needed";
263 params_base = (CTYPE *)
264 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
265 params = params_base + offset;
274 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
275 _exception ? JNI_ABORT: 0);
278 jniThrowException(_env, _exceptionType, _exceptionMessage);
283 template <typename CTYPE, void GET(GLenum, CTYPE*)>
286 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
288 const char * _exceptionType;
289 const char * _exceptionMessage;
290 jarray _array = (jarray) 0;
291 jint _bufferOffset = (jint) 0;
293 CTYPE *params = (CTYPE *) 0;
296 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
297 _remaining /= sizeof(CTYPE); // convert from bytes to item count
298 _needed = getNeededCount(pname);
299 // if we didn't find this pname, we just assume the user passed
300 // an array of the right size -- this might happen with extensions
301 // or if we forget an enum here.
302 if (_needed>0 && _remaining < _needed) {
304 _exceptionType = "java/lang/IllegalArgumentException";
305 _exceptionMessage = "remaining() < needed";
308 if (params == NULL) {
309 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
310 params = (CTYPE *) (_paramsBase + _bufferOffset);
319 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
322 jniThrowException(_env, _exceptionType, _exceptionMessage);
326 // --------------------------------------------------------------------------
327 /* void glReadBuffer ( GLenum mode ) */
329 android_glReadBuffer__I
330 (JNIEnv *_env, jobject _this, jint mode) {
336 /* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) */
338 android_glDrawRangeElements__IIIIILjava_nio_Buffer_2
339 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf) {
340 jarray _array = (jarray) 0;
341 jint _bufferOffset = (jint) 0;
343 GLvoid *indices = (GLvoid *) 0;
345 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
346 if (indices == NULL) {
347 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
348 indices = (GLvoid *) (_indicesBase + _bufferOffset);
359 releasePointer(_env, _array, indices, JNI_FALSE);
363 /* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset ) */
365 android_glDrawRangeElements__IIIIII
366 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jint offset) {
373 reinterpret_cast<GLvoid *>(offset)
377 /* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
379 android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2
380 (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) {
381 jarray _array = (jarray) 0;
382 jint _bufferOffset = (jint) 0;
384 GLvoid *pixels = (GLvoid *) 0;
386 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
387 if (pixels == NULL) {
388 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
389 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
394 (GLint)internalformat,
404 releasePointer(_env, _array, pixels, JNI_FALSE);
408 /* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset ) */
410 android_glTexImage3D__IIIIIIIIII
411 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jint offset) {
415 (GLint)internalformat,
422 reinterpret_cast<GLvoid *>(offset)
426 /* 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 ) */
428 android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
429 (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) {
430 jarray _array = (jarray) 0;
431 jint _bufferOffset = (jint) 0;
433 GLvoid *pixels = (GLvoid *) 0;
435 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
436 if (pixels == NULL) {
437 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
438 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
454 releasePointer(_env, _array, pixels, JNI_FALSE);
458 /* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset ) */
460 android_glTexSubImage3D__IIIIIIIIIII
461 (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) {
473 reinterpret_cast<GLvoid *>(offset)
477 /* void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
479 android_glCopyTexSubImage3D__IIIIIIIII
480 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) {
494 /* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ) */
496 android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2
497 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jobject data_buf) {
498 jarray _array = (jarray) 0;
499 jint _bufferOffset = (jint) 0;
501 GLvoid *data = (GLvoid *) 0;
503 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
505 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
506 data = (GLvoid *) (_dataBase + _bufferOffset);
508 glCompressedTexImage3D(
511 (GLenum)internalformat,
520 releasePointer(_env, _array, data, JNI_FALSE);
524 /* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset ) */
526 android_glCompressedTexImage3D__IIIIIIIII
527 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint offset) {
528 glCompressedTexImage3D(
531 (GLenum)internalformat,
537 reinterpret_cast<GLvoid *>(offset)
541 /* 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 ) */
543 android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
544 (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) {
545 jarray _array = (jarray) 0;
546 jint _bufferOffset = (jint) 0;
548 GLvoid *data = (GLvoid *) 0;
550 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
552 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
553 data = (GLvoid *) (_dataBase + _bufferOffset);
555 glCompressedTexSubImage3D(
569 releasePointer(_env, _array, data, JNI_FALSE);
573 /* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset ) */
575 android_glCompressedTexSubImage3D__IIIIIIIIIII
576 (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) {
577 glCompressedTexSubImage3D(
588 reinterpret_cast<GLvoid *>(offset)
592 /* void glGenQueries ( GLsizei n, GLuint *ids ) */
594 android_glGenQueries__I_3II
595 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
597 const char * _exceptionType = NULL;
598 const char * _exceptionMessage = NULL;
599 GLuint *ids_base = (GLuint *) 0;
601 GLuint *ids = (GLuint *) 0;
605 _exceptionType = "java/lang/IllegalArgumentException";
606 _exceptionMessage = "ids == null";
611 _exceptionType = "java/lang/IllegalArgumentException";
612 _exceptionMessage = "offset < 0";
615 _remaining = _env->GetArrayLength(ids_ref) - offset;
616 ids_base = (GLuint *)
617 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
618 ids = ids_base + offset;
627 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
628 _exception ? JNI_ABORT: 0);
631 jniThrowException(_env, _exceptionType, _exceptionMessage);
635 /* void glGenQueries ( GLsizei n, GLuint *ids ) */
637 android_glGenQueries__ILjava_nio_IntBuffer_2
638 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
639 jarray _array = (jarray) 0;
640 jint _bufferOffset = (jint) 0;
642 GLuint *ids = (GLuint *) 0;
644 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
646 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
647 ids = (GLuint *) (_idsBase + _bufferOffset);
654 releasePointer(_env, _array, ids, JNI_TRUE);
658 /* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
660 android_glDeleteQueries__I_3II
661 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
663 const char * _exceptionType = NULL;
664 const char * _exceptionMessage = NULL;
665 GLuint *ids_base = (GLuint *) 0;
667 GLuint *ids = (GLuint *) 0;
671 _exceptionType = "java/lang/IllegalArgumentException";
672 _exceptionMessage = "ids == null";
677 _exceptionType = "java/lang/IllegalArgumentException";
678 _exceptionMessage = "offset < 0";
681 _remaining = _env->GetArrayLength(ids_ref) - offset;
682 ids_base = (GLuint *)
683 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
684 ids = ids_base + offset;
693 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
697 jniThrowException(_env, _exceptionType, _exceptionMessage);
701 /* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
703 android_glDeleteQueries__ILjava_nio_IntBuffer_2
704 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
705 jarray _array = (jarray) 0;
706 jint _bufferOffset = (jint) 0;
708 GLuint *ids = (GLuint *) 0;
710 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
712 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
713 ids = (GLuint *) (_idsBase + _bufferOffset);
720 releasePointer(_env, _array, ids, JNI_FALSE);
724 /* GLboolean glIsQuery ( GLuint id ) */
727 (JNIEnv *_env, jobject _this, jint id) {
728 GLboolean _returnValue;
729 _returnValue = glIsQuery(
732 return (jboolean)_returnValue;
735 /* void glBeginQuery ( GLenum target, GLuint id ) */
737 android_glBeginQuery__II
738 (JNIEnv *_env, jobject _this, jint target, jint id) {
745 /* void glEndQuery ( GLenum target ) */
747 android_glEndQuery__I
748 (JNIEnv *_env, jobject _this, jint target) {
754 /* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
756 android_glGetQueryiv__II_3II
757 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
759 const char * _exceptionType = NULL;
760 const char * _exceptionMessage = NULL;
761 GLint *params_base = (GLint *) 0;
763 GLint *params = (GLint *) 0;
767 _exceptionType = "java/lang/IllegalArgumentException";
768 _exceptionMessage = "params == null";
773 _exceptionType = "java/lang/IllegalArgumentException";
774 _exceptionMessage = "offset < 0";
777 _remaining = _env->GetArrayLength(params_ref) - offset;
778 params_base = (GLint *)
779 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
780 params = params_base + offset;
790 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
791 _exception ? JNI_ABORT: 0);
794 jniThrowException(_env, _exceptionType, _exceptionMessage);
798 /* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
800 android_glGetQueryiv__IILjava_nio_IntBuffer_2
801 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
802 jarray _array = (jarray) 0;
803 jint _bufferOffset = (jint) 0;
805 GLint *params = (GLint *) 0;
807 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
808 if (params == NULL) {
809 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
810 params = (GLint *) (_paramsBase + _bufferOffset);
818 releasePointer(_env, _array, params, JNI_TRUE);
822 /* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
824 android_glGetQueryObjectuiv__II_3II
825 (JNIEnv *_env, jobject _this, jint id, jint pname, jintArray params_ref, jint offset) {
827 const char * _exceptionType = NULL;
828 const char * _exceptionMessage = NULL;
829 GLuint *params_base = (GLuint *) 0;
831 GLuint *params = (GLuint *) 0;
835 _exceptionType = "java/lang/IllegalArgumentException";
836 _exceptionMessage = "params == null";
841 _exceptionType = "java/lang/IllegalArgumentException";
842 _exceptionMessage = "offset < 0";
845 _remaining = _env->GetArrayLength(params_ref) - offset;
846 params_base = (GLuint *)
847 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
848 params = params_base + offset;
858 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
859 _exception ? JNI_ABORT: 0);
862 jniThrowException(_env, _exceptionType, _exceptionMessage);
866 /* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
868 android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2
869 (JNIEnv *_env, jobject _this, jint id, jint pname, jobject params_buf) {
870 jarray _array = (jarray) 0;
871 jint _bufferOffset = (jint) 0;
873 GLuint *params = (GLuint *) 0;
875 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
876 if (params == NULL) {
877 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
878 params = (GLuint *) (_paramsBase + _bufferOffset);
886 releasePointer(_env, _array, params, JNI_TRUE);
890 /* GLboolean glUnmapBuffer ( GLenum target ) */
892 android_glUnmapBuffer__I
893 (JNIEnv *_env, jobject _this, jint target) {
894 GLboolean _returnValue;
895 _returnValue = glUnmapBuffer(
898 return (jboolean)_returnValue;
901 /* void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) */
903 android_glGetBufferPointerv__II
904 (JNIEnv *_env, jobject _this, jint target, jint pname) {
907 glGetBufferParameteri64v((GLenum)target, GL_BUFFER_MAP_LENGTH, &_mapLength);
908 glGetBufferPointerv((GLenum)target, (GLenum)pname, &_p);
909 return _env->NewDirectByteBuffer(_p, _mapLength);
912 /* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
914 android_glDrawBuffers__I_3II
915 (JNIEnv *_env, jobject _this, jint n, jintArray bufs_ref, jint offset) {
917 const char * _exceptionType = NULL;
918 const char * _exceptionMessage = NULL;
919 GLenum *bufs_base = (GLenum *) 0;
921 GLenum *bufs = (GLenum *) 0;
925 _exceptionType = "java/lang/IllegalArgumentException";
926 _exceptionMessage = "bufs == null";
931 _exceptionType = "java/lang/IllegalArgumentException";
932 _exceptionMessage = "offset < 0";
935 _remaining = _env->GetArrayLength(bufs_ref) - offset;
936 bufs_base = (GLenum *)
937 _env->GetPrimitiveArrayCritical(bufs_ref, (jboolean *)0);
938 bufs = bufs_base + offset;
947 _env->ReleasePrimitiveArrayCritical(bufs_ref, bufs_base,
951 jniThrowException(_env, _exceptionType, _exceptionMessage);
955 /* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
957 android_glDrawBuffers__ILjava_nio_IntBuffer_2
958 (JNIEnv *_env, jobject _this, jint n, jobject bufs_buf) {
959 jarray _array = (jarray) 0;
960 jint _bufferOffset = (jint) 0;
962 GLenum *bufs = (GLenum *) 0;
964 bufs = (GLenum *)getPointer(_env, bufs_buf, &_array, &_remaining, &_bufferOffset);
966 char * _bufsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
967 bufs = (GLenum *) (_bufsBase + _bufferOffset);
974 releasePointer(_env, _array, bufs, JNI_FALSE);
978 /* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
980 android_glUniformMatrix2x3fv__IIZ_3FI
981 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
983 const char * _exceptionType = NULL;
984 const char * _exceptionMessage = NULL;
985 GLfloat *value_base = (GLfloat *) 0;
987 GLfloat *value = (GLfloat *) 0;
991 _exceptionType = "java/lang/IllegalArgumentException";
992 _exceptionMessage = "value == null";
997 _exceptionType = "java/lang/IllegalArgumentException";
998 _exceptionMessage = "offset < 0";
1001 _remaining = _env->GetArrayLength(value_ref) - offset;
1002 value_base = (GLfloat *)
1003 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1004 value = value_base + offset;
1006 glUniformMatrix2x3fv(
1009 (GLboolean)transpose,
1015 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1019 jniThrowException(_env, _exceptionType, _exceptionMessage);
1023 /* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1025 android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2
1026 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1027 jarray _array = (jarray) 0;
1028 jint _bufferOffset = (jint) 0;
1030 GLfloat *value = (GLfloat *) 0;
1032 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1033 if (value == NULL) {
1034 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1035 value = (GLfloat *) (_valueBase + _bufferOffset);
1037 glUniformMatrix2x3fv(
1040 (GLboolean)transpose,
1044 releasePointer(_env, _array, value, JNI_FALSE);
1048 /* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1050 android_glUniformMatrix3x2fv__IIZ_3FI
1051 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1052 jint _exception = 0;
1053 const char * _exceptionType = NULL;
1054 const char * _exceptionMessage = NULL;
1055 GLfloat *value_base = (GLfloat *) 0;
1057 GLfloat *value = (GLfloat *) 0;
1061 _exceptionType = "java/lang/IllegalArgumentException";
1062 _exceptionMessage = "value == null";
1067 _exceptionType = "java/lang/IllegalArgumentException";
1068 _exceptionMessage = "offset < 0";
1071 _remaining = _env->GetArrayLength(value_ref) - offset;
1072 value_base = (GLfloat *)
1073 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1074 value = value_base + offset;
1076 glUniformMatrix3x2fv(
1079 (GLboolean)transpose,
1085 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1089 jniThrowException(_env, _exceptionType, _exceptionMessage);
1093 /* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1095 android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2
1096 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1097 jarray _array = (jarray) 0;
1098 jint _bufferOffset = (jint) 0;
1100 GLfloat *value = (GLfloat *) 0;
1102 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1103 if (value == NULL) {
1104 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1105 value = (GLfloat *) (_valueBase + _bufferOffset);
1107 glUniformMatrix3x2fv(
1110 (GLboolean)transpose,
1114 releasePointer(_env, _array, value, JNI_FALSE);
1118 /* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1120 android_glUniformMatrix2x4fv__IIZ_3FI
1121 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1122 jint _exception = 0;
1123 const char * _exceptionType = NULL;
1124 const char * _exceptionMessage = NULL;
1125 GLfloat *value_base = (GLfloat *) 0;
1127 GLfloat *value = (GLfloat *) 0;
1131 _exceptionType = "java/lang/IllegalArgumentException";
1132 _exceptionMessage = "value == null";
1137 _exceptionType = "java/lang/IllegalArgumentException";
1138 _exceptionMessage = "offset < 0";
1141 _remaining = _env->GetArrayLength(value_ref) - offset;
1142 value_base = (GLfloat *)
1143 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1144 value = value_base + offset;
1146 glUniformMatrix2x4fv(
1149 (GLboolean)transpose,
1155 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1159 jniThrowException(_env, _exceptionType, _exceptionMessage);
1163 /* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1165 android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2
1166 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1167 jarray _array = (jarray) 0;
1168 jint _bufferOffset = (jint) 0;
1170 GLfloat *value = (GLfloat *) 0;
1172 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1173 if (value == NULL) {
1174 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1175 value = (GLfloat *) (_valueBase + _bufferOffset);
1177 glUniformMatrix2x4fv(
1180 (GLboolean)transpose,
1184 releasePointer(_env, _array, value, JNI_FALSE);
1188 /* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1190 android_glUniformMatrix4x2fv__IIZ_3FI
1191 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1192 jint _exception = 0;
1193 const char * _exceptionType = NULL;
1194 const char * _exceptionMessage = NULL;
1195 GLfloat *value_base = (GLfloat *) 0;
1197 GLfloat *value = (GLfloat *) 0;
1201 _exceptionType = "java/lang/IllegalArgumentException";
1202 _exceptionMessage = "value == null";
1207 _exceptionType = "java/lang/IllegalArgumentException";
1208 _exceptionMessage = "offset < 0";
1211 _remaining = _env->GetArrayLength(value_ref) - offset;
1212 value_base = (GLfloat *)
1213 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1214 value = value_base + offset;
1216 glUniformMatrix4x2fv(
1219 (GLboolean)transpose,
1225 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1229 jniThrowException(_env, _exceptionType, _exceptionMessage);
1233 /* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1235 android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2
1236 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1237 jarray _array = (jarray) 0;
1238 jint _bufferOffset = (jint) 0;
1240 GLfloat *value = (GLfloat *) 0;
1242 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1243 if (value == NULL) {
1244 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1245 value = (GLfloat *) (_valueBase + _bufferOffset);
1247 glUniformMatrix4x2fv(
1250 (GLboolean)transpose,
1254 releasePointer(_env, _array, value, JNI_FALSE);
1258 /* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1260 android_glUniformMatrix3x4fv__IIZ_3FI
1261 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1262 jint _exception = 0;
1263 const char * _exceptionType = NULL;
1264 const char * _exceptionMessage = NULL;
1265 GLfloat *value_base = (GLfloat *) 0;
1267 GLfloat *value = (GLfloat *) 0;
1271 _exceptionType = "java/lang/IllegalArgumentException";
1272 _exceptionMessage = "value == null";
1277 _exceptionType = "java/lang/IllegalArgumentException";
1278 _exceptionMessage = "offset < 0";
1281 _remaining = _env->GetArrayLength(value_ref) - offset;
1282 value_base = (GLfloat *)
1283 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1284 value = value_base + offset;
1286 glUniformMatrix3x4fv(
1289 (GLboolean)transpose,
1295 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1299 jniThrowException(_env, _exceptionType, _exceptionMessage);
1303 /* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1305 android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2
1306 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1307 jarray _array = (jarray) 0;
1308 jint _bufferOffset = (jint) 0;
1310 GLfloat *value = (GLfloat *) 0;
1312 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1313 if (value == NULL) {
1314 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1315 value = (GLfloat *) (_valueBase + _bufferOffset);
1317 glUniformMatrix3x4fv(
1320 (GLboolean)transpose,
1324 releasePointer(_env, _array, value, JNI_FALSE);
1328 /* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1330 android_glUniformMatrix4x3fv__IIZ_3FI
1331 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1332 jint _exception = 0;
1333 const char * _exceptionType = NULL;
1334 const char * _exceptionMessage = NULL;
1335 GLfloat *value_base = (GLfloat *) 0;
1337 GLfloat *value = (GLfloat *) 0;
1341 _exceptionType = "java/lang/IllegalArgumentException";
1342 _exceptionMessage = "value == null";
1347 _exceptionType = "java/lang/IllegalArgumentException";
1348 _exceptionMessage = "offset < 0";
1351 _remaining = _env->GetArrayLength(value_ref) - offset;
1352 value_base = (GLfloat *)
1353 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1354 value = value_base + offset;
1356 glUniformMatrix4x3fv(
1359 (GLboolean)transpose,
1365 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1369 jniThrowException(_env, _exceptionType, _exceptionMessage);
1373 /* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1375 android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2
1376 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1377 jarray _array = (jarray) 0;
1378 jint _bufferOffset = (jint) 0;
1380 GLfloat *value = (GLfloat *) 0;
1382 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1383 if (value == NULL) {
1384 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1385 value = (GLfloat *) (_valueBase + _bufferOffset);
1387 glUniformMatrix4x3fv(
1390 (GLboolean)transpose,
1394 releasePointer(_env, _array, value, JNI_FALSE);
1398 /* void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) */
1400 android_glBlitFramebuffer__IIIIIIIIII
1401 (JNIEnv *_env, jobject _this, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) {
1416 /* void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) */
1418 android_glRenderbufferStorageMultisample__IIIII
1419 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height) {
1420 glRenderbufferStorageMultisample(
1423 (GLenum)internalformat,
1429 /* void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) */
1431 android_glFramebufferTextureLayer__IIIII
1432 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level, jint layer) {
1433 glFramebufferTextureLayer(
1442 /* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */
1444 android_glMapBufferRange__IIII
1445 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) {
1446 GLvoid* _p = glMapBufferRange((GLenum)target,
1447 (GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access);
1448 jobject _buf = (jobject)0;
1450 _buf = _env->NewDirectByteBuffer(_p, length);
1455 /* void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length ) */
1457 android_glFlushMappedBufferRange__III
1458 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length) {
1459 glFlushMappedBufferRange(
1466 /* void glBindVertexArray ( GLuint array ) */
1468 android_glBindVertexArray__I
1469 (JNIEnv *_env, jobject _this, jint array) {
1475 /* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
1477 android_glDeleteVertexArrays__I_3II
1478 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
1479 jint _exception = 0;
1480 const char * _exceptionType = NULL;
1481 const char * _exceptionMessage = NULL;
1482 GLuint *arrays_base = (GLuint *) 0;
1484 GLuint *arrays = (GLuint *) 0;
1488 _exceptionType = "java/lang/IllegalArgumentException";
1489 _exceptionMessage = "arrays == null";
1494 _exceptionType = "java/lang/IllegalArgumentException";
1495 _exceptionMessage = "offset < 0";
1498 _remaining = _env->GetArrayLength(arrays_ref) - offset;
1499 arrays_base = (GLuint *)
1500 _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
1501 arrays = arrays_base + offset;
1503 glDeleteVertexArrays(
1510 _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
1514 jniThrowException(_env, _exceptionType, _exceptionMessage);
1518 /* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
1520 android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2
1521 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
1522 jarray _array = (jarray) 0;
1523 jint _bufferOffset = (jint) 0;
1525 GLuint *arrays = (GLuint *) 0;
1527 arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
1528 if (arrays == NULL) {
1529 char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1530 arrays = (GLuint *) (_arraysBase + _bufferOffset);
1532 glDeleteVertexArrays(
1537 releasePointer(_env, _array, arrays, JNI_FALSE);
1541 /* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
1543 android_glGenVertexArrays__I_3II
1544 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
1545 jint _exception = 0;
1546 const char * _exceptionType = NULL;
1547 const char * _exceptionMessage = NULL;
1548 GLuint *arrays_base = (GLuint *) 0;
1550 GLuint *arrays = (GLuint *) 0;
1554 _exceptionType = "java/lang/IllegalArgumentException";
1555 _exceptionMessage = "arrays == null";
1560 _exceptionType = "java/lang/IllegalArgumentException";
1561 _exceptionMessage = "offset < 0";
1564 _remaining = _env->GetArrayLength(arrays_ref) - offset;
1565 arrays_base = (GLuint *)
1566 _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
1567 arrays = arrays_base + offset;
1576 _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
1577 _exception ? JNI_ABORT: 0);
1580 jniThrowException(_env, _exceptionType, _exceptionMessage);
1584 /* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
1586 android_glGenVertexArrays__ILjava_nio_IntBuffer_2
1587 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
1588 jarray _array = (jarray) 0;
1589 jint _bufferOffset = (jint) 0;
1591 GLuint *arrays = (GLuint *) 0;
1593 arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
1594 if (arrays == NULL) {
1595 char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1596 arrays = (GLuint *) (_arraysBase + _bufferOffset);
1603 releasePointer(_env, _array, arrays, JNI_TRUE);
1607 /* GLboolean glIsVertexArray ( GLuint array ) */
1609 android_glIsVertexArray__I
1610 (JNIEnv *_env, jobject _this, jint array) {
1611 GLboolean _returnValue;
1612 _returnValue = glIsVertexArray(
1615 return (jboolean)_returnValue;
1618 /* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
1620 android_glGetIntegeri_v__II_3II
1621 (JNIEnv *_env, jobject _this, jint target, jint index, jintArray data_ref, jint offset) {
1622 jint _exception = 0;
1623 const char * _exceptionType = NULL;
1624 const char * _exceptionMessage = NULL;
1625 GLint *data_base = (GLint *) 0;
1627 GLint *data = (GLint *) 0;
1631 _exceptionType = "java/lang/IllegalArgumentException";
1632 _exceptionMessage = "data == null";
1637 _exceptionType = "java/lang/IllegalArgumentException";
1638 _exceptionMessage = "offset < 0";
1641 _remaining = _env->GetArrayLength(data_ref) - offset;
1642 data_base = (GLint *)
1643 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
1644 data = data_base + offset;
1654 _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
1655 _exception ? JNI_ABORT: 0);
1658 jniThrowException(_env, _exceptionType, _exceptionMessage);
1662 /* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
1664 android_glGetIntegeri_v__IILjava_nio_IntBuffer_2
1665 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
1666 jarray _array = (jarray) 0;
1667 jint _bufferOffset = (jint) 0;
1669 GLint *data = (GLint *) 0;
1671 data = (GLint *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
1673 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1674 data = (GLint *) (_dataBase + _bufferOffset);
1682 releasePointer(_env, _array, data, JNI_TRUE);
1686 /* void glBeginTransformFeedback ( GLenum primitiveMode ) */
1688 android_glBeginTransformFeedback__I
1689 (JNIEnv *_env, jobject _this, jint primitiveMode) {
1690 glBeginTransformFeedback(
1691 (GLenum)primitiveMode
1695 /* void glEndTransformFeedback ( void ) */
1697 android_glEndTransformFeedback__
1698 (JNIEnv *_env, jobject _this) {
1699 glEndTransformFeedback();
1702 /* void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
1704 android_glBindBufferRange__IIIII
1705 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer, jint offset, jint size) {
1715 /* void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer ) */
1717 android_glBindBufferBase__III
1718 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer) {
1726 /* void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) */
1729 android_glTransformFeedbackVaryings
1730 (JNIEnv *_env, jobject _this, jint program, jobjectArray varyings_ref, jint bufferMode) {
1731 jint _exception = 0;
1732 const char* _exceptionType = NULL;
1733 const char* _exceptionMessage = NULL;
1734 jint _count = 0, _i;
1735 const char** _varyings = NULL;
1736 const char* _varying = NULL;
1738 if (!varyings_ref) {
1740 _exceptionType = "java/lang/IllegalArgumentException";
1741 _exceptionMessage = "varyings == null";
1745 _count = _env->GetArrayLength(varyings_ref);
1746 _varyings = (const char**)calloc(_count, sizeof(const char*));
1747 for (_i = 0; _i < _count; _i++) {
1748 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
1751 _exceptionType = "java/lang/IllegalArgumentException";
1752 _exceptionMessage = "null varyings element";
1755 _varyings[_i] = _env->GetStringUTFChars(_varying, 0);
1758 glTransformFeedbackVaryings(program, _count, _varyings, bufferMode);
1761 for (_i = _count - 1; _i >= 0; _i--) {
1762 if (_varyings[_i]) {
1763 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
1765 _env->ReleaseStringUTFChars(_varying, _varyings[_i]);
1771 jniThrowException(_env, _exceptionType, _exceptionMessage);
1775 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1777 android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI
1778 (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) {
1779 jint _exception = 0;
1780 const char * _exceptionType;
1781 const char * _exceptionMessage;
1782 GLsizei *length_base = (GLsizei *) 0;
1783 jint _lengthRemaining;
1784 GLsizei *length = (GLsizei *) 0;
1785 GLint *size_base = (GLint *) 0;
1786 jint _sizeRemaining;
1787 GLint *size = (GLint *) 0;
1788 GLenum *type_base = (GLenum *) 0;
1789 jint _typeRemaining;
1790 GLenum *type = (GLenum *) 0;
1791 char *name_base = (char *) 0;
1792 jint _nameRemaining;
1793 char *name = (char *) 0;
1797 _exceptionType = "java/lang/IllegalArgumentException";
1798 _exceptionMessage = "length == null";
1801 if (lengthOffset < 0) {
1803 _exceptionType = "java/lang/IllegalArgumentException";
1804 _exceptionMessage = "lengthOffset < 0";
1807 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
1808 length_base = (GLsizei *)
1809 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
1810 length = length_base + lengthOffset;
1814 _exceptionType = "java/lang/IllegalArgumentException";
1815 _exceptionMessage = "size == null";
1818 if (sizeOffset < 0) {
1820 _exceptionType = "java/lang/IllegalArgumentException";
1821 _exceptionMessage = "sizeOffset < 0";
1824 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1825 size_base = (GLint *)
1826 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1827 size = size_base + sizeOffset;
1831 _exceptionType = "java/lang/IllegalArgumentException";
1832 _exceptionMessage = "type == null";
1835 if (typeOffset < 0) {
1837 _exceptionType = "java/lang/IllegalArgumentException";
1838 _exceptionMessage = "typeOffset < 0";
1841 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
1842 type_base = (GLenum *)
1843 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
1844 type = type_base + typeOffset;
1848 _exceptionType = "java/lang/IllegalArgumentException";
1849 _exceptionMessage = "name == null";
1852 if (nameOffset < 0) {
1854 _exceptionType = "java/lang/IllegalArgumentException";
1855 _exceptionMessage = "nameOffset < 0";
1858 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
1859 name_base = (char *)
1860 _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0);
1861 name = name_base + nameOffset;
1863 glGetTransformFeedbackVarying(
1875 _env->ReleasePrimitiveArrayCritical(name_ref, name_base,
1876 _exception ? JNI_ABORT: 0);
1879 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
1880 _exception ? JNI_ABORT: 0);
1883 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
1884 _exception ? JNI_ABORT: 0);
1887 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
1888 _exception ? JNI_ABORT: 0);
1891 jniThrowException(_env, _exceptionType, _exceptionMessage);
1895 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1897 android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
1898 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
1899 jarray _lengthArray = (jarray) 0;
1900 jint _lengthBufferOffset = (jint) 0;
1901 jarray _sizeArray = (jarray) 0;
1902 jint _sizeBufferOffset = (jint) 0;
1903 jarray _typeArray = (jarray) 0;
1904 jint _typeBufferOffset = (jint) 0;
1905 jint _lengthRemaining;
1906 GLsizei *length = (GLsizei *) 0;
1907 jint _sizeRemaining;
1908 GLint *size = (GLint *) 0;
1909 jint _typeRemaining;
1910 GLenum *type = (GLenum *) 0;
1912 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
1913 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
1914 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
1915 if (length == NULL) {
1916 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
1917 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
1920 char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
1921 size = (GLint *) (_sizeBase + _sizeBufferOffset);
1924 char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
1925 type = (GLenum *) (_typeBase + _typeBufferOffset);
1927 glGetTransformFeedbackVarying(
1937 releasePointer(_env, _typeArray, type, JNI_TRUE);
1940 releasePointer(_env, _sizeArray, size, JNI_TRUE);
1943 releasePointer(_env, _lengthArray, length, JNI_TRUE);
1947 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1949 android_glGetTransformFeedbackVarying1
1950 (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) {
1951 jint _exception = 0;
1952 const char * _exceptionType;
1953 const char * _exceptionMessage;
1954 GLint *size_base = (GLint *) 0;
1955 jint _sizeRemaining;
1956 GLint *size = (GLint *) 0;
1957 GLenum *type_base = (GLenum *) 0;
1958 jint _typeRemaining;
1959 GLenum *type = (GLenum *) 0;
1964 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
1966 return _env->NewStringUTF("");
1968 char* buf = (char*) malloc(len);
1971 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
1976 _exceptionType = "java/lang/IllegalArgumentException";
1977 _exceptionMessage = "size == null";
1980 if (sizeOffset < 0) {
1982 _exceptionType = "java/lang/IllegalArgumentException";
1983 _exceptionMessage = "sizeOffset < 0";
1986 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1987 size_base = (GLint *)
1988 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1989 size = size_base + sizeOffset;
1993 _exceptionType = "java/lang/IllegalArgumentException";
1994 _exceptionMessage = "type == null";
1997 if (typeOffset < 0) {
1999 _exceptionType = "java/lang/IllegalArgumentException";
2000 _exceptionMessage = "typeOffset < 0";
2003 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
2004 type_base = (GLenum *)
2005 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
2006 type = type_base + typeOffset;
2008 glGetTransformFeedbackVarying(
2019 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
2020 _exception ? JNI_ABORT: 0);
2023 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
2024 _exception ? JNI_ABORT: 0);
2026 if (_exception != 1) {
2027 result = _env->NewStringUTF(buf);
2033 jniThrowException(_env, _exceptionType, _exceptionMessage);
2036 result = _env->NewStringUTF("");
2042 /* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
2044 android_glGetTransformFeedbackVarying2
2045 (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) {
2046 jarray _sizeArray = (jarray) 0;
2047 jint _sizeBufferOffset = (jint) 0;
2048 jarray _typeArray = (jarray) 0;
2049 jint _typeBufferOffset = (jint) 0;
2050 jint _lengthRemaining;
2051 GLsizei *length = (GLsizei *) 0;
2052 jint _sizeRemaining;
2053 GLint *size = (GLint *) 0;
2054 jint _typeRemaining;
2055 GLenum *type = (GLenum *) 0;
2060 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
2062 return _env->NewStringUTF("");
2064 char* buf = (char*) malloc(len);
2067 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
2071 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
2072 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
2074 char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
2075 size = (GLint *) (_sizeBase + _sizeBufferOffset);
2078 char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
2079 type = (GLenum *) (_typeBase + _typeBufferOffset);
2081 glGetTransformFeedbackVarying(
2092 releasePointer(_env, _typeArray, type, JNI_TRUE);
2095 releasePointer(_env, _sizeArray, size, JNI_TRUE);
2097 result = _env->NewStringUTF(buf);
2103 /* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2105 android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I
2106 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2107 jarray _array = (jarray) 0;
2108 jint _bufferOffset = (jint) 0;
2110 GLvoid *pointer = (GLvoid *) 0;
2113 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2118 glVertexAttribIPointerBounds(
2128 /* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset ) */
2130 android_glVertexAttribIPointer__IIIII
2131 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jint offset) {
2132 glVertexAttribIPointer(
2137 reinterpret_cast<GLvoid *>(offset)
2141 /* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
2143 android_glGetVertexAttribIiv__II_3II
2144 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
2145 jint _exception = 0;
2146 const char * _exceptionType = NULL;
2147 const char * _exceptionMessage = NULL;
2148 GLint *params_base = (GLint *) 0;
2150 GLint *params = (GLint *) 0;
2154 _exceptionType = "java/lang/IllegalArgumentException";
2155 _exceptionMessage = "params == null";
2160 _exceptionType = "java/lang/IllegalArgumentException";
2161 _exceptionMessage = "offset < 0";
2164 _remaining = _env->GetArrayLength(params_ref) - offset;
2165 params_base = (GLint *)
2166 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2167 params = params_base + offset;
2169 glGetVertexAttribIiv(
2177 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2178 _exception ? JNI_ABORT: 0);
2181 jniThrowException(_env, _exceptionType, _exceptionMessage);
2185 /* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
2187 android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2
2188 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
2189 jarray _array = (jarray) 0;
2190 jint _bufferOffset = (jint) 0;
2192 GLint *params = (GLint *) 0;
2194 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2195 if (params == NULL) {
2196 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2197 params = (GLint *) (_paramsBase + _bufferOffset);
2199 glGetVertexAttribIiv(
2205 releasePointer(_env, _array, params, JNI_TRUE);
2209 /* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
2211 android_glGetVertexAttribIuiv__II_3II
2212 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
2213 jint _exception = 0;
2214 const char * _exceptionType = NULL;
2215 const char * _exceptionMessage = NULL;
2216 GLuint *params_base = (GLuint *) 0;
2218 GLuint *params = (GLuint *) 0;
2222 _exceptionType = "java/lang/IllegalArgumentException";
2223 _exceptionMessage = "params == null";
2228 _exceptionType = "java/lang/IllegalArgumentException";
2229 _exceptionMessage = "offset < 0";
2232 _remaining = _env->GetArrayLength(params_ref) - offset;
2233 params_base = (GLuint *)
2234 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2235 params = params_base + offset;
2237 glGetVertexAttribIuiv(
2245 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2246 _exception ? JNI_ABORT: 0);
2249 jniThrowException(_env, _exceptionType, _exceptionMessage);
2253 /* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
2255 android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2
2256 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
2257 jarray _array = (jarray) 0;
2258 jint _bufferOffset = (jint) 0;
2260 GLuint *params = (GLuint *) 0;
2262 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2263 if (params == NULL) {
2264 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2265 params = (GLuint *) (_paramsBase + _bufferOffset);
2267 glGetVertexAttribIuiv(
2273 releasePointer(_env, _array, params, JNI_TRUE);
2277 /* void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w ) */
2279 android_glVertexAttribI4i__IIIII
2280 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
2290 /* void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) */
2292 android_glVertexAttribI4ui__IIIII
2293 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
2303 /* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
2305 android_glVertexAttribI4iv__I_3II
2306 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
2307 jint _exception = 0;
2308 const char * _exceptionType = NULL;
2309 const char * _exceptionMessage = NULL;
2310 GLint *v_base = (GLint *) 0;
2312 GLint *v = (GLint *) 0;
2316 _exceptionType = "java/lang/IllegalArgumentException";
2317 _exceptionMessage = "v == null";
2322 _exceptionType = "java/lang/IllegalArgumentException";
2323 _exceptionMessage = "offset < 0";
2326 _remaining = _env->GetArrayLength(v_ref) - offset;
2328 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
2329 v = v_base + offset;
2338 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
2342 jniThrowException(_env, _exceptionType, _exceptionMessage);
2346 /* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
2348 android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2
2349 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
2350 jarray _array = (jarray) 0;
2351 jint _bufferOffset = (jint) 0;
2353 GLint *v = (GLint *) 0;
2355 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
2357 char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2358 v = (GLint *) (_vBase + _bufferOffset);
2365 releasePointer(_env, _array, v, JNI_FALSE);
2369 /* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
2371 android_glVertexAttribI4uiv__I_3II
2372 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
2373 jint _exception = 0;
2374 const char * _exceptionType = NULL;
2375 const char * _exceptionMessage = NULL;
2376 GLuint *v_base = (GLuint *) 0;
2378 GLuint *v = (GLuint *) 0;
2382 _exceptionType = "java/lang/IllegalArgumentException";
2383 _exceptionMessage = "v == null";
2388 _exceptionType = "java/lang/IllegalArgumentException";
2389 _exceptionMessage = "offset < 0";
2392 _remaining = _env->GetArrayLength(v_ref) - offset;
2394 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
2395 v = v_base + offset;
2397 glVertexAttribI4uiv(
2404 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
2408 jniThrowException(_env, _exceptionType, _exceptionMessage);
2412 /* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
2414 android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2
2415 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
2416 jarray _array = (jarray) 0;
2417 jint _bufferOffset = (jint) 0;
2419 GLuint *v = (GLuint *) 0;
2421 v = (GLuint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
2423 char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2424 v = (GLuint *) (_vBase + _bufferOffset);
2426 glVertexAttribI4uiv(
2431 releasePointer(_env, _array, v, JNI_FALSE);
2435 /* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
2437 android_glGetUniformuiv__II_3II
2438 (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
2439 jint _exception = 0;
2440 const char * _exceptionType = NULL;
2441 const char * _exceptionMessage = NULL;
2442 GLuint *params_base = (GLuint *) 0;
2444 GLuint *params = (GLuint *) 0;
2448 _exceptionType = "java/lang/IllegalArgumentException";
2449 _exceptionMessage = "params == null";
2454 _exceptionType = "java/lang/IllegalArgumentException";
2455 _exceptionMessage = "offset < 0";
2458 _remaining = _env->GetArrayLength(params_ref) - offset;
2459 params_base = (GLuint *)
2460 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2461 params = params_base + offset;
2471 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2472 _exception ? JNI_ABORT: 0);
2475 jniThrowException(_env, _exceptionType, _exceptionMessage);
2479 /* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
2481 android_glGetUniformuiv__IILjava_nio_IntBuffer_2
2482 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
2483 jarray _array = (jarray) 0;
2484 jint _bufferOffset = (jint) 0;
2486 GLuint *params = (GLuint *) 0;
2488 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2489 if (params == NULL) {
2490 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2491 params = (GLuint *) (_paramsBase + _bufferOffset);
2499 releasePointer(_env, _array, params, JNI_TRUE);
2503 /* GLint glGetFragDataLocation ( GLuint program, const GLchar *name ) */
2505 android_glGetFragDataLocation__ILjava_lang_String_2
2506 (JNIEnv *_env, jobject _this, jint program, jstring name) {
2507 jint _exception = 0;
2508 const char * _exceptionType = NULL;
2509 const char * _exceptionMessage = NULL;
2510 GLint _returnValue = 0;
2511 const char* _nativename = 0;
2515 _exceptionType = "java/lang/IllegalArgumentException";
2516 _exceptionMessage = "name == null";
2519 _nativename = _env->GetStringUTFChars(name, 0);
2521 _returnValue = glGetFragDataLocation(
2523 (GLchar *)_nativename
2528 _env->ReleaseStringUTFChars(name, _nativename);
2532 jniThrowException(_env, _exceptionType, _exceptionMessage);
2534 return (jint)_returnValue;
2537 /* void glUniform1ui ( GLint location, GLuint v0 ) */
2539 android_glUniform1ui__II
2540 (JNIEnv *_env, jobject _this, jint location, jint v0) {
2547 /* void glUniform2ui ( GLint location, GLuint v0, GLuint v1 ) */
2549 android_glUniform2ui__III
2550 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1) {
2558 /* void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
2560 android_glUniform3ui__IIII
2561 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2) {
2570 /* void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
2572 android_glUniform4ui__IIIII
2573 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2, jint v3) {
2583 /* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
2585 android_glUniform1uiv__II_3II
2586 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2587 jint _exception = 0;
2588 const char * _exceptionType = NULL;
2589 const char * _exceptionMessage = NULL;
2590 GLuint *value_base = (GLuint *) 0;
2592 GLuint *value = (GLuint *) 0;
2596 _exceptionType = "java/lang/IllegalArgumentException";
2597 _exceptionMessage = "value == null";
2602 _exceptionType = "java/lang/IllegalArgumentException";
2603 _exceptionMessage = "offset < 0";
2606 _remaining = _env->GetArrayLength(value_ref) - offset;
2607 value_base = (GLuint *)
2608 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2609 value = value_base + offset;
2619 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2623 jniThrowException(_env, _exceptionType, _exceptionMessage);
2627 /* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
2629 android_glUniform1uiv__IILjava_nio_IntBuffer_2
2630 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2631 jarray _array = (jarray) 0;
2632 jint _bufferOffset = (jint) 0;
2634 GLuint *value = (GLuint *) 0;
2636 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2637 if (value == NULL) {
2638 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2639 value = (GLuint *) (_valueBase + _bufferOffset);
2647 releasePointer(_env, _array, value, JNI_FALSE);
2651 /* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
2653 android_glUniform2uiv__II_3II
2654 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2655 jint _exception = 0;
2656 const char * _exceptionType = NULL;
2657 const char * _exceptionMessage = NULL;
2658 GLuint *value_base = (GLuint *) 0;
2660 GLuint *value = (GLuint *) 0;
2664 _exceptionType = "java/lang/IllegalArgumentException";
2665 _exceptionMessage = "value == null";
2670 _exceptionType = "java/lang/IllegalArgumentException";
2671 _exceptionMessage = "offset < 0";
2674 _remaining = _env->GetArrayLength(value_ref) - offset;
2675 value_base = (GLuint *)
2676 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2677 value = value_base + offset;
2687 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2691 jniThrowException(_env, _exceptionType, _exceptionMessage);
2695 /* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
2697 android_glUniform2uiv__IILjava_nio_IntBuffer_2
2698 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2699 jarray _array = (jarray) 0;
2700 jint _bufferOffset = (jint) 0;
2702 GLuint *value = (GLuint *) 0;
2704 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2705 if (value == NULL) {
2706 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2707 value = (GLuint *) (_valueBase + _bufferOffset);
2715 releasePointer(_env, _array, value, JNI_FALSE);
2719 /* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
2721 android_glUniform3uiv__II_3II
2722 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2723 jint _exception = 0;
2724 const char * _exceptionType = NULL;
2725 const char * _exceptionMessage = NULL;
2726 GLuint *value_base = (GLuint *) 0;
2728 GLuint *value = (GLuint *) 0;
2732 _exceptionType = "java/lang/IllegalArgumentException";
2733 _exceptionMessage = "value == null";
2738 _exceptionType = "java/lang/IllegalArgumentException";
2739 _exceptionMessage = "offset < 0";
2742 _remaining = _env->GetArrayLength(value_ref) - offset;
2743 value_base = (GLuint *)
2744 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2745 value = value_base + offset;
2755 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2759 jniThrowException(_env, _exceptionType, _exceptionMessage);
2763 /* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
2765 android_glUniform3uiv__IILjava_nio_IntBuffer_2
2766 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2767 jarray _array = (jarray) 0;
2768 jint _bufferOffset = (jint) 0;
2770 GLuint *value = (GLuint *) 0;
2772 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2773 if (value == NULL) {
2774 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2775 value = (GLuint *) (_valueBase + _bufferOffset);
2783 releasePointer(_env, _array, value, JNI_FALSE);
2787 /* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
2789 android_glUniform4uiv__II_3II
2790 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2791 jint _exception = 0;
2792 const char * _exceptionType = NULL;
2793 const char * _exceptionMessage = NULL;
2794 GLuint *value_base = (GLuint *) 0;
2796 GLuint *value = (GLuint *) 0;
2800 _exceptionType = "java/lang/IllegalArgumentException";
2801 _exceptionMessage = "value == null";
2806 _exceptionType = "java/lang/IllegalArgumentException";
2807 _exceptionMessage = "offset < 0";
2810 _remaining = _env->GetArrayLength(value_ref) - offset;
2811 value_base = (GLuint *)
2812 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2813 value = value_base + offset;
2823 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2827 jniThrowException(_env, _exceptionType, _exceptionMessage);
2831 /* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
2833 android_glUniform4uiv__IILjava_nio_IntBuffer_2
2834 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2835 jarray _array = (jarray) 0;
2836 jint _bufferOffset = (jint) 0;
2838 GLuint *value = (GLuint *) 0;
2840 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2841 if (value == NULL) {
2842 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2843 value = (GLuint *) (_valueBase + _bufferOffset);
2851 releasePointer(_env, _array, value, JNI_FALSE);
2855 /* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
2857 android_glClearBufferiv__II_3II
2858 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
2859 jint _exception = 0;
2860 const char * _exceptionType = NULL;
2861 const char * _exceptionMessage = NULL;
2862 GLint *value_base = (GLint *) 0;
2864 GLint *value = (GLint *) 0;
2868 _exceptionType = "java/lang/IllegalArgumentException";
2869 _exceptionMessage = "value == null";
2874 _exceptionType = "java/lang/IllegalArgumentException";
2875 _exceptionMessage = "offset < 0";
2878 _remaining = _env->GetArrayLength(value_ref) - offset;
2879 value_base = (GLint *)
2880 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2881 value = value_base + offset;
2891 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2895 jniThrowException(_env, _exceptionType, _exceptionMessage);
2899 /* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
2901 android_glClearBufferiv__IILjava_nio_IntBuffer_2
2902 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
2903 jarray _array = (jarray) 0;
2904 jint _bufferOffset = (jint) 0;
2906 GLint *value = (GLint *) 0;
2908 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2909 if (value == NULL) {
2910 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2911 value = (GLint *) (_valueBase + _bufferOffset);
2919 releasePointer(_env, _array, value, JNI_FALSE);
2923 /* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
2925 android_glClearBufferuiv__II_3II
2926 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
2927 jint _exception = 0;
2928 const char * _exceptionType = NULL;
2929 const char * _exceptionMessage = NULL;
2930 GLuint *value_base = (GLuint *) 0;
2932 GLuint *value = (GLuint *) 0;
2936 _exceptionType = "java/lang/IllegalArgumentException";
2937 _exceptionMessage = "value == null";
2942 _exceptionType = "java/lang/IllegalArgumentException";
2943 _exceptionMessage = "offset < 0";
2946 _remaining = _env->GetArrayLength(value_ref) - offset;
2947 value_base = (GLuint *)
2948 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2949 value = value_base + offset;
2959 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2963 jniThrowException(_env, _exceptionType, _exceptionMessage);
2967 /* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
2969 android_glClearBufferuiv__IILjava_nio_IntBuffer_2
2970 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
2971 jarray _array = (jarray) 0;
2972 jint _bufferOffset = (jint) 0;
2974 GLuint *value = (GLuint *) 0;
2976 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2977 if (value == NULL) {
2978 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2979 value = (GLuint *) (_valueBase + _bufferOffset);
2987 releasePointer(_env, _array, value, JNI_FALSE);
2991 /* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
2993 android_glClearBufferfv__II_3FI
2994 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloatArray value_ref, jint offset) {
2995 jint _exception = 0;
2996 const char * _exceptionType = NULL;
2997 const char * _exceptionMessage = NULL;
2998 GLfloat *value_base = (GLfloat *) 0;
3000 GLfloat *value = (GLfloat *) 0;
3004 _exceptionType = "java/lang/IllegalArgumentException";
3005 _exceptionMessage = "value == null";
3010 _exceptionType = "java/lang/IllegalArgumentException";
3011 _exceptionMessage = "offset < 0";
3014 _remaining = _env->GetArrayLength(value_ref) - offset;
3015 value_base = (GLfloat *)
3016 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
3017 value = value_base + offset;
3027 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
3031 jniThrowException(_env, _exceptionType, _exceptionMessage);
3035 /* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
3037 android_glClearBufferfv__IILjava_nio_FloatBuffer_2
3038 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
3039 jarray _array = (jarray) 0;
3040 jint _bufferOffset = (jint) 0;
3042 GLfloat *value = (GLfloat *) 0;
3044 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
3045 if (value == NULL) {
3046 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3047 value = (GLfloat *) (_valueBase + _bufferOffset);
3055 releasePointer(_env, _array, value, JNI_FALSE);
3059 /* void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) */
3061 android_glClearBufferfi__IIFI
3062 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloat depth, jint stencil) {
3071 /* const GLubyte * glGetStringi ( GLenum name, GLuint index ) */
3073 android_glGetStringi__II
3074 (JNIEnv *_env, jobject _this, jint name, jint index) {
3075 const GLubyte* _chars = glGetStringi((GLenum)name, (GLuint)index);
3076 return _env->NewStringUTF((const char*)_chars);
3079 /* void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) */
3081 android_glCopyBufferSubData__IIIII
3082 (JNIEnv *_env, jobject _this, jint readTarget, jint writeTarget, jint readOffset, jint writeOffset, jint size) {
3083 glCopyBufferSubData(
3085 (GLenum)writeTarget,
3086 (GLintptr)readOffset,
3087 (GLintptr)writeOffset,
3092 /* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
3095 android_glGetUniformIndices_array
3096 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jintArray uniformIndices_ref, jint uniformIndicesOffset) {
3097 jint _exception = 0;
3098 const char* _exceptionType = NULL;
3099 const char* _exceptionMessage = NULL;
3102 const char** _names = NULL;
3103 GLuint* _indices_base = NULL;
3104 GLuint* _indices = NULL;
3106 if (!uniformNames_ref) {
3108 _exceptionType = "java/lang/IllegalArgumentException";
3109 _exceptionMessage = "uniformNames == null";
3112 _count = _env->GetArrayLength(uniformNames_ref);
3113 _names = (const char**)calloc(_count, sizeof(const char*));
3114 for (_i = 0; _i < _count; _i++) {
3115 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3118 _exceptionType = "java/lang/IllegalArgumentException";
3119 _exceptionMessage = "null uniformNames element";
3122 _names[_i] = _env->GetStringUTFChars(_name, 0);
3125 if (!uniformIndices_ref) {
3127 _exceptionType = "java/lang/IllegalArgumentException";
3128 _exceptionMessage = "uniformIndices == null";
3131 if (uniformIndicesOffset < 0) {
3133 _exceptionType = "java/lang/IllegalArgumentException";
3134 _exceptionMessage = "uniformIndicesOffset < 0";
3137 if (_env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset < _count) {
3139 _exceptionType = "java/lang/IllegalArgumentException";
3140 _exceptionMessage = "not enough space in uniformIndices";
3143 _indices_base = (GLuint*)_env->GetPrimitiveArrayCritical(
3144 uniformIndices_ref, 0);
3145 _indices = _indices_base + uniformIndicesOffset;
3147 glGetUniformIndices(program, _count, _names, _indices);
3150 if (_indices_base) {
3151 _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, _indices_base,
3152 _exception ? JNI_ABORT : 0);
3154 for (_i = _count - 1; _i >= 0; _i--) {
3156 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3158 _env->ReleaseStringUTFChars(_name, _names[_i]);
3164 jniThrowException(_env, _exceptionType, _exceptionMessage);
3168 /* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
3171 android_glGetUniformIndices_buffer
3172 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jobject uniformIndices_buf) {
3173 jint _exception = 0;
3174 const char* _exceptionType = NULL;
3175 const char* _exceptionMessage = NULL;
3178 const char** _names = NULL;
3179 jarray _uniformIndicesArray = (jarray)0;
3180 jint _uniformIndicesRemaining;
3181 jint _uniformIndicesOffset = 0;
3182 GLuint* _indices = NULL;
3183 char* _indicesBase = NULL;
3185 if (!uniformNames_ref) {
3187 _exceptionType = "java/lang/IllegalArgumentException";
3188 _exceptionMessage = "uniformNames == null";
3191 if (!uniformIndices_buf) {
3193 _exceptionType = "java/lang/IllegalArgumentException";
3194 _exceptionMessage = "uniformIndices == null";
3198 _count = _env->GetArrayLength(uniformNames_ref);
3199 _names = (const char**)calloc(_count, sizeof(const char*));
3200 for (_i = 0; _i < _count; _i++) {
3201 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3204 _exceptionType = "java/lang/IllegalArgumentException";
3205 _exceptionMessage = "null uniformNames element";
3208 _names[_i] = _env->GetStringUTFChars(_name, 0);
3211 _indices = (GLuint*)getPointer(_env, uniformIndices_buf,
3212 &_uniformIndicesArray, &_uniformIndicesRemaining,
3213 &_uniformIndicesOffset);
3215 _indicesBase = (char*)_env->GetPrimitiveArrayCritical(
3216 _uniformIndicesArray, 0);
3217 _indices = (GLuint*)(_indicesBase + _uniformIndicesOffset);
3219 if (_uniformIndicesRemaining < _count) {
3221 _exceptionType = "java/lang/IllegalArgumentException";
3222 _exceptionMessage = "not enough space in uniformIndices";
3226 glGetUniformIndices(program, _count, _names, _indices);
3229 if (_uniformIndicesArray) {
3230 releasePointer(_env, _uniformIndicesArray, _indicesBase, JNI_TRUE);
3232 for (_i = _count - 1; _i >= 0; _i--) {
3234 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3236 _env->ReleaseStringUTFChars(_name, _names[_i]);
3242 jniThrowException(_env, _exceptionType, _exceptionMessage);
3246 /* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
3248 android_glGetActiveUniformsiv__II_3III_3II
3249 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jintArray uniformIndices_ref, jint uniformIndicesOffset, jint pname, jintArray params_ref, jint paramsOffset) {
3250 jint _exception = 0;
3251 const char * _exceptionType = NULL;
3252 const char * _exceptionMessage = NULL;
3253 GLuint *uniformIndices_base = (GLuint *) 0;
3254 jint _uniformIndicesRemaining;
3255 GLuint *uniformIndices = (GLuint *) 0;
3256 GLint *params_base = (GLint *) 0;
3257 jint _paramsRemaining;
3258 GLint *params = (GLint *) 0;
3260 if (!uniformIndices_ref) {
3262 _exceptionType = "java/lang/IllegalArgumentException";
3263 _exceptionMessage = "uniformIndices == null";
3266 if (uniformIndicesOffset < 0) {
3268 _exceptionType = "java/lang/IllegalArgumentException";
3269 _exceptionMessage = "uniformIndicesOffset < 0";
3272 _uniformIndicesRemaining = _env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset;
3273 uniformIndices_base = (GLuint *)
3274 _env->GetPrimitiveArrayCritical(uniformIndices_ref, (jboolean *)0);
3275 uniformIndices = uniformIndices_base + uniformIndicesOffset;
3279 _exceptionType = "java/lang/IllegalArgumentException";
3280 _exceptionMessage = "params == null";
3283 if (paramsOffset < 0) {
3285 _exceptionType = "java/lang/IllegalArgumentException";
3286 _exceptionMessage = "paramsOffset < 0";
3289 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
3290 params_base = (GLint *)
3291 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3292 params = params_base + paramsOffset;
3294 glGetActiveUniformsiv(
3296 (GLsizei)uniformCount,
3297 (GLuint *)uniformIndices,
3304 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3305 _exception ? JNI_ABORT: 0);
3307 if (uniformIndices_base) {
3308 _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, uniformIndices_base,
3312 jniThrowException(_env, _exceptionType, _exceptionMessage);
3316 /* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
3318 android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2
3319 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jobject uniformIndices_buf, jint pname, jobject params_buf) {
3320 jarray _uniformIndicesArray = (jarray) 0;
3321 jint _uniformIndicesBufferOffset = (jint) 0;
3322 jarray _paramsArray = (jarray) 0;
3323 jint _paramsBufferOffset = (jint) 0;
3324 jint _uniformIndicesRemaining;
3325 GLuint *uniformIndices = (GLuint *) 0;
3326 jint _paramsRemaining;
3327 GLint *params = (GLint *) 0;
3329 uniformIndices = (GLuint *)getPointer(_env, uniformIndices_buf, &_uniformIndicesArray, &_uniformIndicesRemaining, &_uniformIndicesBufferOffset);
3330 params = (GLint *)getPointer(_env, params_buf, &_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
3331 if (uniformIndices == NULL) {
3332 char * _uniformIndicesBase = (char *)_env->GetPrimitiveArrayCritical(_uniformIndicesArray, (jboolean *) 0);
3333 uniformIndices = (GLuint *) (_uniformIndicesBase + _uniformIndicesBufferOffset);
3335 if (params == NULL) {
3336 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_paramsArray, (jboolean *) 0);
3337 params = (GLint *) (_paramsBase + _paramsBufferOffset);
3339 glGetActiveUniformsiv(
3341 (GLsizei)uniformCount,
3342 (GLuint *)uniformIndices,
3347 releasePointer(_env, _paramsArray, params, JNI_TRUE);
3349 if (_uniformIndicesArray) {
3350 releasePointer(_env, _uniformIndicesArray, uniformIndices, JNI_FALSE);
3354 /* GLuint glGetUniformBlockIndex ( GLuint program, const GLchar *uniformBlockName ) */
3356 android_glGetUniformBlockIndex__ILjava_lang_String_2
3357 (JNIEnv *_env, jobject _this, jint program, jstring uniformBlockName) {
3358 jint _exception = 0;
3359 const char * _exceptionType = NULL;
3360 const char * _exceptionMessage = NULL;
3361 GLuint _returnValue = 0;
3362 const char* _nativeuniformBlockName = 0;
3364 if (!uniformBlockName) {
3366 _exceptionType = "java/lang/IllegalArgumentException";
3367 _exceptionMessage = "uniformBlockName == null";
3370 _nativeuniformBlockName = _env->GetStringUTFChars(uniformBlockName, 0);
3372 _returnValue = glGetUniformBlockIndex(
3374 (GLchar *)_nativeuniformBlockName
3378 if (_nativeuniformBlockName) {
3379 _env->ReleaseStringUTFChars(uniformBlockName, _nativeuniformBlockName);
3383 jniThrowException(_env, _exceptionType, _exceptionMessage);
3385 return (jint)_returnValue;
3388 /* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
3390 android_glGetActiveUniformBlockiv__III_3II
3391 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jintArray params_ref, jint offset) {
3392 jint _exception = 0;
3393 const char * _exceptionType = NULL;
3394 const char * _exceptionMessage = NULL;
3395 GLint *params_base = (GLint *) 0;
3397 GLint *params = (GLint *) 0;
3401 _exceptionType = "java/lang/IllegalArgumentException";
3402 _exceptionMessage = "params == null";
3407 _exceptionType = "java/lang/IllegalArgumentException";
3408 _exceptionMessage = "offset < 0";
3411 _remaining = _env->GetArrayLength(params_ref) - offset;
3412 params_base = (GLint *)
3413 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3414 params = params_base + offset;
3416 glGetActiveUniformBlockiv(
3418 (GLuint)uniformBlockIndex,
3425 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3426 _exception ? JNI_ABORT: 0);
3429 jniThrowException(_env, _exceptionType, _exceptionMessage);
3433 /* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
3435 android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2
3436 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jobject params_buf) {
3437 jarray _array = (jarray) 0;
3438 jint _bufferOffset = (jint) 0;
3440 GLint *params = (GLint *) 0;
3442 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3443 if (params == NULL) {
3444 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3445 params = (GLint *) (_paramsBase + _bufferOffset);
3447 glGetActiveUniformBlockiv(
3449 (GLuint)uniformBlockIndex,
3454 releasePointer(_env, _array, params, JNI_TRUE);
3458 /* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3460 android_glGetActiveUniformBlockName_III_3II_3BI
3461 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, int bufSize, jintArray length_ref, jint lengthOffset, jbyteArray name_ref, jint nameOffset) {
3462 jint _exception = 0;
3463 const char* _exceptionType;
3464 const char* _exceptionMessage;
3465 GLsizei* _length_base = (GLsizei*)0;
3466 jint _lengthRemaining;
3467 GLsizei* _length = (GLsizei*)0;
3468 GLchar* _name_base = (GLchar*)0;
3469 jint _nameRemaining;
3470 GLchar* _name = (GLchar*)0;
3474 _exceptionType = "java/lang/IllegalArgumentException";
3475 _exceptionMessage = "length == null";
3478 if (lengthOffset < 0) {
3480 _exceptionType = "java/lang/IllegalArgumentException";
3481 _exceptionMessage = "lengthOffset < 0";
3484 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
3485 _length_base = (GLsizei*)_env->GetPrimitiveArrayCritical(
3486 length_ref, (jboolean*)0);
3487 _length = _length_base + lengthOffset;
3491 _exceptionType = "java/lang/IllegalArgumentException";
3492 _exceptionMessage = "uniformBlockName == null";
3495 if (nameOffset < 0) {
3497 _exceptionType = "java/lang/IllegalArgumentException";
3498 _exceptionMessage = "uniformBlockNameOffset < 0";
3501 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
3502 _name_base = (GLchar*)_env->GetPrimitiveArrayCritical(
3503 name_ref, (jboolean*)0);
3504 _name = _name_base + nameOffset;
3506 glGetActiveUniformBlockName(
3508 (GLuint)uniformBlockIndex,
3516 _env->ReleasePrimitiveArrayCritical(name_ref, _name_base,
3517 _exception ? JNI_ABORT: 0);
3520 _env->ReleasePrimitiveArrayCritical(length_ref, _length_base,
3521 _exception ? JNI_ABORT: 0);
3524 jniThrowException(_env, _exceptionType, _exceptionMessage);
3528 /* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3530 android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2
3531 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, jobject length_buf, jobject uniformBlockName_buf) {
3532 jint _exception = 0;
3533 const char* _exceptionType;
3534 const char* _exceptionMessage;
3535 jarray _lengthArray = (jarray)0;
3536 jint _lengthBufferOffset = (jint)0;
3537 GLsizei* _length = (GLsizei*)0;
3538 jint _lengthRemaining;
3539 jarray _nameArray = (jarray)0;
3540 jint _nameBufferOffset = (jint)0;
3541 GLchar* _name = (GLchar*)0;
3542 jint _nameRemaining;
3544 _length = (GLsizei*)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
3545 if (_length == NULL) {
3546 GLsizei* _lengthBase = (GLsizei*)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean*)0);
3547 _length = (GLsizei*)(_lengthBase + _lengthBufferOffset);
3550 _name = (GLchar*)getPointer(_env, uniformBlockName_buf, &_nameArray, &_nameRemaining, &_nameBufferOffset);
3551 if (_name == NULL) {
3552 GLchar* _nameBase = (GLchar*)_env->GetPrimitiveArrayCritical(_nameArray, (jboolean*)0);
3553 _name = (GLchar*)(_nameBase + _nameBufferOffset);
3556 glGetActiveUniformBlockName(
3558 (GLuint)uniformBlockIndex,
3559 (GLsizei)_nameRemaining,
3563 releasePointer(_env, _nameArray, _name, JNI_TRUE);
3566 releasePointer(_env, _lengthArray, _length, JNI_TRUE);
3570 /* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3572 android_glGetActiveUniformBlockName_II
3573 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex) {
3575 glGetActiveUniformBlockiv((GLuint)program, (GLuint)uniformBlockIndex,
3576 GL_UNIFORM_BLOCK_NAME_LENGTH, &len);
3577 GLchar* name = (GLchar*)malloc(len);
3578 glGetActiveUniformBlockName((GLuint)program, (GLuint)uniformBlockIndex,
3580 jstring result = _env->NewStringUTF(name);
3585 /* void glUniformBlockBinding ( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) */
3587 android_glUniformBlockBinding__III
3588 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint uniformBlockBinding) {
3589 glUniformBlockBinding(
3591 (GLuint)uniformBlockIndex,
3592 (GLuint)uniformBlockBinding
3596 /* void glDrawArraysInstanced ( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) */
3598 android_glDrawArraysInstanced__IIII
3599 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count, jint instanceCount) {
3600 glDrawArraysInstanced(
3604 (GLsizei)instanceCount
3608 /* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
3610 android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I
3611 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount) {
3612 jarray _array = (jarray) 0;
3613 jint _bufferOffset = (jint) 0;
3615 GLvoid *indices = (GLvoid *) 0;
3617 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
3618 if (indices == NULL) {
3619 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3620 indices = (GLvoid *) (_indicesBase + _bufferOffset);
3622 glDrawElementsInstanced(
3627 (GLsizei)instanceCount
3630 releasePointer(_env, _array, indices, JNI_FALSE);
3634 /* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
3636 android_glDrawElementsInstanced__IIIII
3637 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount) {
3638 glDrawElementsInstanced(
3642 (GLvoid *)indicesOffset,
3643 (GLsizei)instanceCount
3647 /* GLsync glFenceSync ( GLenum condition, GLbitfield flags ) */
3649 android_glFenceSync__II
3650 (JNIEnv *_env, jobject _this, jint condition, jint flags) {
3651 GLsync _returnValue;
3652 _returnValue = glFenceSync(
3656 return (jlong)_returnValue;
3659 /* GLboolean glIsSync ( GLsync sync ) */
3662 (JNIEnv *_env, jobject _this, jlong sync) {
3663 GLboolean _returnValue;
3664 _returnValue = glIsSync(
3667 return (jboolean)_returnValue;
3670 /* void glDeleteSync ( GLsync sync ) */
3672 android_glDeleteSync__J
3673 (JNIEnv *_env, jobject _this, jlong sync) {
3679 /* GLenum glClientWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
3681 android_glClientWaitSync__JIJ
3682 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
3683 GLenum _returnValue;
3684 _returnValue = glClientWaitSync(
3689 return (jint)_returnValue;
3692 /* void glWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
3694 android_glWaitSync__JIJ
3695 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
3703 /* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
3705 android_glGetInteger64v__I_3JI
3706 (JNIEnv *_env, jobject _this, jint pname, jlongArray params_ref, jint offset) {
3707 jint _exception = 0;
3708 const char * _exceptionType = NULL;
3709 const char * _exceptionMessage = NULL;
3710 GLint64 *params_base = (GLint64 *) 0;
3712 GLint64 *params = (GLint64 *) 0;
3716 _exceptionType = "java/lang/IllegalArgumentException";
3717 _exceptionMessage = "params == null";
3722 _exceptionType = "java/lang/IllegalArgumentException";
3723 _exceptionMessage = "offset < 0";
3726 _remaining = _env->GetArrayLength(params_ref) - offset;
3727 params_base = (GLint64 *)
3728 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3729 params = params_base + offset;
3738 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3739 _exception ? JNI_ABORT: 0);
3742 jniThrowException(_env, _exceptionType, _exceptionMessage);
3746 /* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
3748 android_glGetInteger64v__ILjava_nio_LongBuffer_2
3749 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
3750 jarray _array = (jarray) 0;
3751 jint _bufferOffset = (jint) 0;
3753 GLint64 *params = (GLint64 *) 0;
3755 params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3756 if (params == NULL) {
3757 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3758 params = (GLint64 *) (_paramsBase + _bufferOffset);
3765 releasePointer(_env, _array, params, JNI_TRUE);
3769 /* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
3771 android_glGetSynciv__JII_3II_3II
3772 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray values_ref, jint valuesOffset) {
3773 jint _exception = 0;
3774 const char * _exceptionType = NULL;
3775 const char * _exceptionMessage = NULL;
3776 GLsizei *length_base = (GLsizei *) 0;
3777 jint _lengthRemaining;
3778 GLsizei *length = (GLsizei *) 0;
3779 GLint *values_base = (GLint *) 0;
3780 jint _valuesRemaining;
3781 GLint *values = (GLint *) 0;
3785 _exceptionType = "java/lang/IllegalArgumentException";
3786 _exceptionMessage = "length == null";
3789 if (lengthOffset < 0) {
3791 _exceptionType = "java/lang/IllegalArgumentException";
3792 _exceptionMessage = "lengthOffset < 0";
3795 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
3796 length_base = (GLsizei *)
3797 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
3798 length = length_base + lengthOffset;
3802 _exceptionType = "java/lang/IllegalArgumentException";
3803 _exceptionMessage = "values == null";
3806 if (valuesOffset < 0) {
3808 _exceptionType = "java/lang/IllegalArgumentException";
3809 _exceptionMessage = "valuesOffset < 0";
3812 _valuesRemaining = _env->GetArrayLength(values_ref) - valuesOffset;
3813 values_base = (GLint *)
3814 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
3815 values = values_base + valuesOffset;
3827 _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
3828 _exception ? JNI_ABORT: 0);
3831 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
3832 _exception ? JNI_ABORT: 0);
3835 jniThrowException(_env, _exceptionType, _exceptionMessage);
3839 /* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
3841 android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
3842 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jobject length_buf, jobject values_buf) {
3843 jarray _lengthArray = (jarray) 0;
3844 jint _lengthBufferOffset = (jint) 0;
3845 jarray _valuesArray = (jarray) 0;
3846 jint _valuesBufferOffset = (jint) 0;
3847 jint _lengthRemaining;
3848 GLsizei *length = (GLsizei *) 0;
3849 jint _valuesRemaining;
3850 GLint *values = (GLint *) 0;
3852 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
3853 values = (GLint *)getPointer(_env, values_buf, &_valuesArray, &_valuesRemaining, &_valuesBufferOffset);
3854 if (length == NULL) {
3855 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
3856 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
3858 if (values == NULL) {
3859 char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_valuesArray, (jboolean *) 0);
3860 values = (GLint *) (_valuesBase + _valuesBufferOffset);
3870 releasePointer(_env, _valuesArray, values, JNI_TRUE);
3873 releasePointer(_env, _lengthArray, length, JNI_TRUE);
3877 /* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
3879 android_glGetInteger64i_v__II_3JI
3880 (JNIEnv *_env, jobject _this, jint target, jint index, jlongArray data_ref, jint offset) {
3881 jint _exception = 0;
3882 const char * _exceptionType = NULL;
3883 const char * _exceptionMessage = NULL;
3884 GLint64 *data_base = (GLint64 *) 0;
3886 GLint64 *data = (GLint64 *) 0;
3890 _exceptionType = "java/lang/IllegalArgumentException";
3891 _exceptionMessage = "data == null";
3896 _exceptionType = "java/lang/IllegalArgumentException";
3897 _exceptionMessage = "offset < 0";
3900 _remaining = _env->GetArrayLength(data_ref) - offset;
3901 data_base = (GLint64 *)
3902 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
3903 data = data_base + offset;
3913 _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
3914 _exception ? JNI_ABORT: 0);
3917 jniThrowException(_env, _exceptionType, _exceptionMessage);
3921 /* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
3923 android_glGetInteger64i_v__IILjava_nio_LongBuffer_2
3924 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
3925 jarray _array = (jarray) 0;
3926 jint _bufferOffset = (jint) 0;
3928 GLint64 *data = (GLint64 *) 0;
3930 data = (GLint64 *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
3932 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3933 data = (GLint64 *) (_dataBase + _bufferOffset);
3941 releasePointer(_env, _array, data, JNI_TRUE);
3945 /* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
3947 android_glGetBufferParameteri64v__II_3JI
3948 (JNIEnv *_env, jobject _this, jint target, jint pname, jlongArray params_ref, jint offset) {
3949 jint _exception = 0;
3950 const char * _exceptionType = NULL;
3951 const char * _exceptionMessage = NULL;
3952 GLint64 *params_base = (GLint64 *) 0;
3954 GLint64 *params = (GLint64 *) 0;
3958 _exceptionType = "java/lang/IllegalArgumentException";
3959 _exceptionMessage = "params == null";
3964 _exceptionType = "java/lang/IllegalArgumentException";
3965 _exceptionMessage = "offset < 0";
3968 _remaining = _env->GetArrayLength(params_ref) - offset;
3969 params_base = (GLint64 *)
3970 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3971 params = params_base + offset;
3973 glGetBufferParameteri64v(
3981 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3982 _exception ? JNI_ABORT: 0);
3985 jniThrowException(_env, _exceptionType, _exceptionMessage);
3989 /* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
3991 android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2
3992 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3993 jarray _array = (jarray) 0;
3994 jint _bufferOffset = (jint) 0;
3996 GLint64 *params = (GLint64 *) 0;
3998 params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3999 if (params == NULL) {
4000 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4001 params = (GLint64 *) (_paramsBase + _bufferOffset);
4003 glGetBufferParameteri64v(
4009 releasePointer(_env, _array, params, JNI_TRUE);
4013 /* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
4015 android_glGenSamplers__I_3II
4016 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
4017 jint _exception = 0;
4018 const char * _exceptionType = NULL;
4019 const char * _exceptionMessage = NULL;
4020 GLuint *samplers_base = (GLuint *) 0;
4022 GLuint *samplers = (GLuint *) 0;
4024 if (!samplers_ref) {
4026 _exceptionType = "java/lang/IllegalArgumentException";
4027 _exceptionMessage = "samplers == null";
4032 _exceptionType = "java/lang/IllegalArgumentException";
4033 _exceptionMessage = "offset < 0";
4036 _remaining = _env->GetArrayLength(samplers_ref) - offset;
4037 samplers_base = (GLuint *)
4038 _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
4039 samplers = samplers_base + offset;
4047 if (samplers_base) {
4048 _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
4049 _exception ? JNI_ABORT: 0);
4052 jniThrowException(_env, _exceptionType, _exceptionMessage);
4056 /* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
4058 android_glGenSamplers__ILjava_nio_IntBuffer_2
4059 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
4060 jarray _array = (jarray) 0;
4061 jint _bufferOffset = (jint) 0;
4063 GLuint *samplers = (GLuint *) 0;
4065 samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
4066 if (samplers == NULL) {
4067 char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4068 samplers = (GLuint *) (_samplersBase + _bufferOffset);
4075 releasePointer(_env, _array, samplers, JNI_TRUE);
4079 /* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
4081 android_glDeleteSamplers__I_3II
4082 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
4083 jint _exception = 0;
4084 const char * _exceptionType = NULL;
4085 const char * _exceptionMessage = NULL;
4086 GLuint *samplers_base = (GLuint *) 0;
4088 GLuint *samplers = (GLuint *) 0;
4090 if (!samplers_ref) {
4092 _exceptionType = "java/lang/IllegalArgumentException";
4093 _exceptionMessage = "samplers == null";
4098 _exceptionType = "java/lang/IllegalArgumentException";
4099 _exceptionMessage = "offset < 0";
4102 _remaining = _env->GetArrayLength(samplers_ref) - offset;
4103 samplers_base = (GLuint *)
4104 _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
4105 samplers = samplers_base + offset;
4113 if (samplers_base) {
4114 _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
4118 jniThrowException(_env, _exceptionType, _exceptionMessage);
4122 /* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
4124 android_glDeleteSamplers__ILjava_nio_IntBuffer_2
4125 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
4126 jarray _array = (jarray) 0;
4127 jint _bufferOffset = (jint) 0;
4129 GLuint *samplers = (GLuint *) 0;
4131 samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
4132 if (samplers == NULL) {
4133 char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4134 samplers = (GLuint *) (_samplersBase + _bufferOffset);
4141 releasePointer(_env, _array, samplers, JNI_FALSE);
4145 /* GLboolean glIsSampler ( GLuint sampler ) */
4147 android_glIsSampler__I
4148 (JNIEnv *_env, jobject _this, jint sampler) {
4149 GLboolean _returnValue;
4150 _returnValue = glIsSampler(
4153 return (jboolean)_returnValue;
4156 /* void glBindSampler ( GLuint unit, GLuint sampler ) */
4158 android_glBindSampler__II
4159 (JNIEnv *_env, jobject _this, jint unit, jint sampler) {
4166 /* void glSamplerParameteri ( GLuint sampler, GLenum pname, GLint param ) */
4168 android_glSamplerParameteri__III
4169 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jint param) {
4170 glSamplerParameteri(
4177 /* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
4179 android_glSamplerParameteriv__II_3II
4180 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
4181 jint _exception = 0;
4182 const char * _exceptionType = NULL;
4183 const char * _exceptionMessage = NULL;
4184 GLint *param_base = (GLint *) 0;
4186 GLint *param = (GLint *) 0;
4190 _exceptionType = "java/lang/IllegalArgumentException";
4191 _exceptionMessage = "param == null";
4196 _exceptionType = "java/lang/IllegalArgumentException";
4197 _exceptionMessage = "offset < 0";
4200 _remaining = _env->GetArrayLength(param_ref) - offset;
4201 param_base = (GLint *)
4202 _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
4203 param = param_base + offset;
4205 glSamplerParameteriv(
4213 _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
4217 jniThrowException(_env, _exceptionType, _exceptionMessage);
4221 /* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
4223 android_glSamplerParameteriv__IILjava_nio_IntBuffer_2
4224 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
4225 jarray _array = (jarray) 0;
4226 jint _bufferOffset = (jint) 0;
4228 GLint *param = (GLint *) 0;
4230 param = (GLint *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
4231 if (param == NULL) {
4232 char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4233 param = (GLint *) (_paramBase + _bufferOffset);
4235 glSamplerParameteriv(
4241 releasePointer(_env, _array, param, JNI_FALSE);
4245 /* void glSamplerParameterf ( GLuint sampler, GLenum pname, GLfloat param ) */
4247 android_glSamplerParameterf__IIF
4248 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloat param) {
4249 glSamplerParameterf(
4256 /* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
4258 android_glSamplerParameterfv__II_3FI
4259 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray param_ref, jint offset) {
4260 jint _exception = 0;
4261 const char * _exceptionType = NULL;
4262 const char * _exceptionMessage = NULL;
4263 GLfloat *param_base = (GLfloat *) 0;
4265 GLfloat *param = (GLfloat *) 0;
4269 _exceptionType = "java/lang/IllegalArgumentException";
4270 _exceptionMessage = "param == null";
4275 _exceptionType = "java/lang/IllegalArgumentException";
4276 _exceptionMessage = "offset < 0";
4279 _remaining = _env->GetArrayLength(param_ref) - offset;
4280 param_base = (GLfloat *)
4281 _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
4282 param = param_base + offset;
4284 glSamplerParameterfv(
4292 _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
4296 jniThrowException(_env, _exceptionType, _exceptionMessage);
4300 /* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
4302 android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2
4303 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
4304 jarray _array = (jarray) 0;
4305 jint _bufferOffset = (jint) 0;
4307 GLfloat *param = (GLfloat *) 0;
4309 param = (GLfloat *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
4310 if (param == NULL) {
4311 char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4312 param = (GLfloat *) (_paramBase + _bufferOffset);
4314 glSamplerParameterfv(
4320 releasePointer(_env, _array, param, JNI_FALSE);
4324 /* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
4326 android_glGetSamplerParameteriv__II_3II
4327 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
4328 jint _exception = 0;
4329 const char * _exceptionType = NULL;
4330 const char * _exceptionMessage = NULL;
4331 GLint *params_base = (GLint *) 0;
4333 GLint *params = (GLint *) 0;
4337 _exceptionType = "java/lang/IllegalArgumentException";
4338 _exceptionMessage = "params == null";
4343 _exceptionType = "java/lang/IllegalArgumentException";
4344 _exceptionMessage = "offset < 0";
4347 _remaining = _env->GetArrayLength(params_ref) - offset;
4348 params_base = (GLint *)
4349 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4350 params = params_base + offset;
4352 glGetSamplerParameteriv(
4360 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4361 _exception ? JNI_ABORT: 0);
4364 jniThrowException(_env, _exceptionType, _exceptionMessage);
4368 /* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
4370 android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2
4371 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
4372 jarray _array = (jarray) 0;
4373 jint _bufferOffset = (jint) 0;
4375 GLint *params = (GLint *) 0;
4377 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
4378 if (params == NULL) {
4379 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4380 params = (GLint *) (_paramsBase + _bufferOffset);
4382 glGetSamplerParameteriv(
4388 releasePointer(_env, _array, params, JNI_TRUE);
4392 /* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
4394 android_glGetSamplerParameterfv__II_3FI
4395 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray params_ref, jint offset) {
4396 jint _exception = 0;
4397 const char * _exceptionType = NULL;
4398 const char * _exceptionMessage = NULL;
4399 GLfloat *params_base = (GLfloat *) 0;
4401 GLfloat *params = (GLfloat *) 0;
4405 _exceptionType = "java/lang/IllegalArgumentException";
4406 _exceptionMessage = "params == null";
4411 _exceptionType = "java/lang/IllegalArgumentException";
4412 _exceptionMessage = "offset < 0";
4415 _remaining = _env->GetArrayLength(params_ref) - offset;
4416 params_base = (GLfloat *)
4417 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4418 params = params_base + offset;
4420 glGetSamplerParameterfv(
4428 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4429 _exception ? JNI_ABORT: 0);
4432 jniThrowException(_env, _exceptionType, _exceptionMessage);
4436 /* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
4438 android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2
4439 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
4440 jarray _array = (jarray) 0;
4441 jint _bufferOffset = (jint) 0;
4443 GLfloat *params = (GLfloat *) 0;
4445 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
4446 if (params == NULL) {
4447 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4448 params = (GLfloat *) (_paramsBase + _bufferOffset);
4450 glGetSamplerParameterfv(
4456 releasePointer(_env, _array, params, JNI_TRUE);
4460 /* void glVertexAttribDivisor ( GLuint index, GLuint divisor ) */
4462 android_glVertexAttribDivisor__II
4463 (JNIEnv *_env, jobject _this, jint index, jint divisor) {
4464 glVertexAttribDivisor(
4470 /* void glBindTransformFeedback ( GLenum target, GLuint id ) */
4472 android_glBindTransformFeedback__II
4473 (JNIEnv *_env, jobject _this, jint target, jint id) {
4474 glBindTransformFeedback(
4480 /* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
4482 android_glDeleteTransformFeedbacks__I_3II
4483 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
4484 jint _exception = 0;
4485 const char * _exceptionType = NULL;
4486 const char * _exceptionMessage = NULL;
4487 GLuint *ids_base = (GLuint *) 0;
4489 GLuint *ids = (GLuint *) 0;
4493 _exceptionType = "java/lang/IllegalArgumentException";
4494 _exceptionMessage = "ids == null";
4499 _exceptionType = "java/lang/IllegalArgumentException";
4500 _exceptionMessage = "offset < 0";
4503 _remaining = _env->GetArrayLength(ids_ref) - offset;
4504 ids_base = (GLuint *)
4505 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
4506 ids = ids_base + offset;
4508 glDeleteTransformFeedbacks(
4515 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
4519 jniThrowException(_env, _exceptionType, _exceptionMessage);
4523 /* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
4525 android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2
4526 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
4527 jarray _array = (jarray) 0;
4528 jint _bufferOffset = (jint) 0;
4530 GLuint *ids = (GLuint *) 0;
4532 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
4534 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4535 ids = (GLuint *) (_idsBase + _bufferOffset);
4537 glDeleteTransformFeedbacks(
4542 releasePointer(_env, _array, ids, JNI_FALSE);
4546 /* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
4548 android_glGenTransformFeedbacks__I_3II
4549 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
4550 jint _exception = 0;
4551 const char * _exceptionType = NULL;
4552 const char * _exceptionMessage = NULL;
4553 GLuint *ids_base = (GLuint *) 0;
4555 GLuint *ids = (GLuint *) 0;
4559 _exceptionType = "java/lang/IllegalArgumentException";
4560 _exceptionMessage = "ids == null";
4565 _exceptionType = "java/lang/IllegalArgumentException";
4566 _exceptionMessage = "offset < 0";
4569 _remaining = _env->GetArrayLength(ids_ref) - offset;
4570 ids_base = (GLuint *)
4571 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
4572 ids = ids_base + offset;
4574 glGenTransformFeedbacks(
4581 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
4582 _exception ? JNI_ABORT: 0);
4585 jniThrowException(_env, _exceptionType, _exceptionMessage);
4589 /* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
4591 android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2
4592 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
4593 jarray _array = (jarray) 0;
4594 jint _bufferOffset = (jint) 0;
4596 GLuint *ids = (GLuint *) 0;
4598 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
4600 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4601 ids = (GLuint *) (_idsBase + _bufferOffset);
4603 glGenTransformFeedbacks(
4608 releasePointer(_env, _array, ids, JNI_TRUE);
4612 /* GLboolean glIsTransformFeedback ( GLuint id ) */
4614 android_glIsTransformFeedback__I
4615 (JNIEnv *_env, jobject _this, jint id) {
4616 GLboolean _returnValue;
4617 _returnValue = glIsTransformFeedback(
4620 return (jboolean)_returnValue;
4623 /* void glPauseTransformFeedback ( void ) */
4625 android_glPauseTransformFeedback__
4626 (JNIEnv *_env, jobject _this) {
4627 glPauseTransformFeedback();
4630 /* void glResumeTransformFeedback ( void ) */
4632 android_glResumeTransformFeedback__
4633 (JNIEnv *_env, jobject _this) {
4634 glResumeTransformFeedback();
4637 /* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
4639 android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2
4640 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray binaryFormat_ref, jint binaryFormatOffset, jobject binary_buf) {
4641 jint _exception = 0;
4642 const char * _exceptionType = NULL;
4643 const char * _exceptionMessage = NULL;
4644 jarray _array = (jarray) 0;
4645 jint _bufferOffset = (jint) 0;
4646 GLsizei *length_base = (GLsizei *) 0;
4647 jint _lengthRemaining;
4648 GLsizei *length = (GLsizei *) 0;
4649 GLenum *binaryFormat_base = (GLenum *) 0;
4650 jint _binaryFormatRemaining;
4651 GLenum *binaryFormat = (GLenum *) 0;
4652 jint _binaryRemaining;
4653 GLvoid *binary = (GLvoid *) 0;
4657 _exceptionType = "java/lang/IllegalArgumentException";
4658 _exceptionMessage = "length == null";
4661 if (lengthOffset < 0) {
4663 _exceptionType = "java/lang/IllegalArgumentException";
4664 _exceptionMessage = "lengthOffset < 0";
4667 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
4668 length_base = (GLsizei *)
4669 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
4670 length = length_base + lengthOffset;
4672 if (!binaryFormat_ref) {
4674 _exceptionType = "java/lang/IllegalArgumentException";
4675 _exceptionMessage = "binaryFormat == null";
4678 if (binaryFormatOffset < 0) {
4680 _exceptionType = "java/lang/IllegalArgumentException";
4681 _exceptionMessage = "binaryFormatOffset < 0";
4684 _binaryFormatRemaining = _env->GetArrayLength(binaryFormat_ref) - binaryFormatOffset;
4685 binaryFormat_base = (GLenum *)
4686 _env->GetPrimitiveArrayCritical(binaryFormat_ref, (jboolean *)0);
4687 binaryFormat = binaryFormat_base + binaryFormatOffset;
4689 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining, &_bufferOffset);
4690 if (binary == NULL) {
4691 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4692 binary = (GLvoid *) (_binaryBase + _bufferOffset);
4698 (GLenum *)binaryFormat,
4704 releasePointer(_env, _array, binary, _exception ? JNI_FALSE : JNI_TRUE);
4706 if (binaryFormat_base) {
4707 _env->ReleasePrimitiveArrayCritical(binaryFormat_ref, binaryFormat_base,
4708 _exception ? JNI_ABORT: 0);
4711 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
4712 _exception ? JNI_ABORT: 0);
4715 jniThrowException(_env, _exceptionType, _exceptionMessage);
4719 /* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
4721 android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2
4722 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jobject length_buf, jobject binaryFormat_buf, jobject binary_buf) {
4723 jarray _lengthArray = (jarray) 0;
4724 jint _lengthBufferOffset = (jint) 0;
4725 jarray _binaryFormatArray = (jarray) 0;
4726 jint _binaryFormatBufferOffset = (jint) 0;
4727 jarray _binaryArray = (jarray) 0;
4728 jint _binaryBufferOffset = (jint) 0;
4729 jint _lengthRemaining;
4730 GLsizei *length = (GLsizei *) 0;
4731 jint _binaryFormatRemaining;
4732 GLenum *binaryFormat = (GLenum *) 0;
4733 jint _binaryRemaining;
4734 GLvoid *binary = (GLvoid *) 0;
4736 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
4737 binaryFormat = (GLenum *)getPointer(_env, binaryFormat_buf, &_binaryFormatArray, &_binaryFormatRemaining, &_binaryFormatBufferOffset);
4738 binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining, &_binaryBufferOffset);
4739 if (length == NULL) {
4740 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
4741 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
4743 if (binaryFormat == NULL) {
4744 char * _binaryFormatBase = (char *)_env->GetPrimitiveArrayCritical(_binaryFormatArray, (jboolean *) 0);
4745 binaryFormat = (GLenum *) (_binaryFormatBase + _binaryFormatBufferOffset);
4747 if (binary == NULL) {
4748 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_binaryArray, (jboolean *) 0);
4749 binary = (GLvoid *) (_binaryBase + _binaryBufferOffset);
4755 (GLenum *)binaryFormat,
4759 releasePointer(_env, _binaryArray, binary, JNI_TRUE);
4761 if (_binaryFormatArray) {
4762 releasePointer(_env, _binaryFormatArray, binaryFormat, JNI_TRUE);
4765 releasePointer(_env, _lengthArray, length, JNI_TRUE);
4769 /* void glProgramBinary ( GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length ) */
4771 android_glProgramBinary__IILjava_nio_Buffer_2I
4772 (JNIEnv *_env, jobject _this, jint program, jint binaryFormat, jobject binary_buf, jint length) {
4773 jarray _array = (jarray) 0;
4774 jint _bufferOffset = (jint) 0;
4776 GLvoid *binary = (GLvoid *) 0;
4778 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_remaining, &_bufferOffset);
4779 if (binary == NULL) {
4780 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4781 binary = (GLvoid *) (_binaryBase + _bufferOffset);
4785 (GLenum)binaryFormat,
4790 releasePointer(_env, _array, binary, JNI_FALSE);
4794 /* void glProgramParameteri ( GLuint program, GLenum pname, GLint value ) */
4796 android_glProgramParameteri__III
4797 (JNIEnv *_env, jobject _this, jint program, jint pname, jint value) {
4798 glProgramParameteri(
4805 /* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
4807 android_glInvalidateFramebuffer__II_3II
4808 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset) {
4809 jint _exception = 0;
4810 const char * _exceptionType = NULL;
4811 const char * _exceptionMessage = NULL;
4812 GLenum *attachments_base = (GLenum *) 0;
4814 GLenum *attachments = (GLenum *) 0;
4816 if (!attachments_ref) {
4818 _exceptionType = "java/lang/IllegalArgumentException";
4819 _exceptionMessage = "attachments == null";
4824 _exceptionType = "java/lang/IllegalArgumentException";
4825 _exceptionMessage = "offset < 0";
4828 _remaining = _env->GetArrayLength(attachments_ref) - offset;
4829 attachments_base = (GLenum *)
4830 _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
4831 attachments = attachments_base + offset;
4833 glInvalidateFramebuffer(
4835 (GLsizei)numAttachments,
4836 (GLenum *)attachments
4840 if (attachments_base) {
4841 _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
4845 jniThrowException(_env, _exceptionType, _exceptionMessage);
4849 /* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
4851 android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2
4852 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf) {
4853 jarray _array = (jarray) 0;
4854 jint _bufferOffset = (jint) 0;
4856 GLenum *attachments = (GLenum *) 0;
4858 attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
4859 if (attachments == NULL) {
4860 char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4861 attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
4863 glInvalidateFramebuffer(
4865 (GLsizei)numAttachments,
4866 (GLenum *)attachments
4869 releasePointer(_env, _array, attachments, JNI_FALSE);
4873 /* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
4875 android_glInvalidateSubFramebuffer__II_3IIIIII
4876 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset, jint x, jint y, jint width, jint height) {
4877 jint _exception = 0;
4878 const char * _exceptionType = NULL;
4879 const char * _exceptionMessage = NULL;
4880 GLenum *attachments_base = (GLenum *) 0;
4882 GLenum *attachments = (GLenum *) 0;
4884 if (!attachments_ref) {
4886 _exceptionType = "java/lang/IllegalArgumentException";
4887 _exceptionMessage = "attachments == null";
4892 _exceptionType = "java/lang/IllegalArgumentException";
4893 _exceptionMessage = "offset < 0";
4896 _remaining = _env->GetArrayLength(attachments_ref) - offset;
4897 attachments_base = (GLenum *)
4898 _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
4899 attachments = attachments_base + offset;
4901 glInvalidateSubFramebuffer(
4903 (GLsizei)numAttachments,
4904 (GLenum *)attachments,
4912 if (attachments_base) {
4913 _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
4917 jniThrowException(_env, _exceptionType, _exceptionMessage);
4921 /* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
4923 android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII
4924 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf, jint x, jint y, jint width, jint height) {
4925 jarray _array = (jarray) 0;
4926 jint _bufferOffset = (jint) 0;
4928 GLenum *attachments = (GLenum *) 0;
4930 attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
4931 if (attachments == NULL) {
4932 char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4933 attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
4935 glInvalidateSubFramebuffer(
4937 (GLsizei)numAttachments,
4938 (GLenum *)attachments,
4945 releasePointer(_env, _array, attachments, JNI_FALSE);
4949 /* void glTexStorage2D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) */
4951 android_glTexStorage2D__IIIII
4952 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height) {
4956 (GLenum)internalformat,
4962 /* void glTexStorage3D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) */
4964 android_glTexStorage3D__IIIIII
4965 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) {
4969 (GLenum)internalformat,
4976 /* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
4978 android_glGetInternalformativ__IIII_3II
4979 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jintArray params_ref, jint offset) {
4980 jint _exception = 0;
4981 const char * _exceptionType = NULL;
4982 const char * _exceptionMessage = NULL;
4983 GLint *params_base = (GLint *) 0;
4985 GLint *params = (GLint *) 0;
4989 _exceptionType = "java/lang/IllegalArgumentException";
4990 _exceptionMessage = "params == null";
4995 _exceptionType = "java/lang/IllegalArgumentException";
4996 _exceptionMessage = "offset < 0";
4999 _remaining = _env->GetArrayLength(params_ref) - offset;
5000 params_base = (GLint *)
5001 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5002 params = params_base + offset;
5004 glGetInternalformativ(
5006 (GLenum)internalformat,
5014 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5015 _exception ? JNI_ABORT: 0);
5018 jniThrowException(_env, _exceptionType, _exceptionMessage);
5022 /* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
5024 android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2
5025 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jobject params_buf) {
5026 jarray _array = (jarray) 0;
5027 jint _bufferOffset = (jint) 0;
5029 GLint *params = (GLint *) 0;
5031 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
5032 if (params == NULL) {
5033 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
5034 params = (GLint *) (_paramsBase + _bufferOffset);
5036 glGetInternalformativ(
5038 (GLenum)internalformat,
5044 releasePointer(_env, _array, params, JNI_TRUE);
5048 static const char *classPathName = "android/opengl/GLES30";
5050 static JNINativeMethod methods[] = {
5051 {"_nativeClassInit", "()V", (void*)nativeClassInit },
5052 {"glReadBuffer", "(I)V", (void *) android_glReadBuffer__I },
5053 {"glDrawRangeElements", "(IIIIILjava/nio/Buffer;)V", (void *) android_glDrawRangeElements__IIIIILjava_nio_Buffer_2 },
5054 {"glDrawRangeElements", "(IIIIII)V", (void *) android_glDrawRangeElements__IIIIII },
5055 {"glTexImage3D", "(IIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2 },
5056 {"glTexImage3D", "(IIIIIIIIII)V", (void *) android_glTexImage3D__IIIIIIIIII },
5057 {"glTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
5058 {"glTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glTexSubImage3D__IIIIIIIIIII },
5059 {"glCopyTexSubImage3D", "(IIIIIIIII)V", (void *) android_glCopyTexSubImage3D__IIIIIIIII },
5060 {"glCompressedTexImage3D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2 },
5061 {"glCompressedTexImage3D", "(IIIIIIIII)V", (void *) android_glCompressedTexImage3D__IIIIIIIII },
5062 {"glCompressedTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
5063 {"glCompressedTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIII },
5064 {"glGenQueries", "(I[II)V", (void *) android_glGenQueries__I_3II },
5065 {"glGenQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenQueries__ILjava_nio_IntBuffer_2 },
5066 {"glDeleteQueries", "(I[II)V", (void *) android_glDeleteQueries__I_3II },
5067 {"glDeleteQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteQueries__ILjava_nio_IntBuffer_2 },
5068 {"glIsQuery", "(I)Z", (void *) android_glIsQuery__I },
5069 {"glBeginQuery", "(II)V", (void *) android_glBeginQuery__II },
5070 {"glEndQuery", "(I)V", (void *) android_glEndQuery__I },
5071 {"glGetQueryiv", "(II[II)V", (void *) android_glGetQueryiv__II_3II },
5072 {"glGetQueryiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryiv__IILjava_nio_IntBuffer_2 },
5073 {"glGetQueryObjectuiv", "(II[II)V", (void *) android_glGetQueryObjectuiv__II_3II },
5074 {"glGetQueryObjectuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2 },
5075 {"glUnmapBuffer", "(I)Z", (void *) android_glUnmapBuffer__I },
5076 {"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II },
5077 {"glDrawBuffers", "(I[II)V", (void *) android_glDrawBuffers__I_3II },
5078 {"glDrawBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDrawBuffers__ILjava_nio_IntBuffer_2 },
5079 {"glUniformMatrix2x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x3fv__IIZ_3FI },
5080 {"glUniformMatrix2x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2 },
5081 {"glUniformMatrix3x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x2fv__IIZ_3FI },
5082 {"glUniformMatrix3x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2 },
5083 {"glUniformMatrix2x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x4fv__IIZ_3FI },
5084 {"glUniformMatrix2x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2 },
5085 {"glUniformMatrix4x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x2fv__IIZ_3FI },
5086 {"glUniformMatrix4x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2 },
5087 {"glUniformMatrix3x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x4fv__IIZ_3FI },
5088 {"glUniformMatrix3x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2 },
5089 {"glUniformMatrix4x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x3fv__IIZ_3FI },
5090 {"glUniformMatrix4x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2 },
5091 {"glBlitFramebuffer", "(IIIIIIIIII)V", (void *) android_glBlitFramebuffer__IIIIIIIIII },
5092 {"glRenderbufferStorageMultisample", "(IIIII)V", (void *) android_glRenderbufferStorageMultisample__IIIII },
5093 {"glFramebufferTextureLayer", "(IIIII)V", (void *) android_glFramebufferTextureLayer__IIIII },
5094 {"glMapBufferRange", "(IIII)Ljava/nio/Buffer;", (void *) android_glMapBufferRange__IIII },
5095 {"glFlushMappedBufferRange", "(III)V", (void *) android_glFlushMappedBufferRange__III },
5096 {"glBindVertexArray", "(I)V", (void *) android_glBindVertexArray__I },
5097 {"glDeleteVertexArrays", "(I[II)V", (void *) android_glDeleteVertexArrays__I_3II },
5098 {"glDeleteVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2 },
5099 {"glGenVertexArrays", "(I[II)V", (void *) android_glGenVertexArrays__I_3II },
5100 {"glGenVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenVertexArrays__ILjava_nio_IntBuffer_2 },
5101 {"glIsVertexArray", "(I)Z", (void *) android_glIsVertexArray__I },
5102 {"glGetIntegeri_v", "(II[II)V", (void *) android_glGetIntegeri_v__II_3II },
5103 {"glGetIntegeri_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetIntegeri_v__IILjava_nio_IntBuffer_2 },
5104 {"glBeginTransformFeedback", "(I)V", (void *) android_glBeginTransformFeedback__I },
5105 {"glEndTransformFeedback", "()V", (void *) android_glEndTransformFeedback__ },
5106 {"glBindBufferRange", "(IIIII)V", (void *) android_glBindBufferRange__IIIII },
5107 {"glBindBufferBase", "(III)V", (void *) android_glBindBufferBase__III },
5108 {"glTransformFeedbackVaryings", "(I[Ljava/lang/String;I)V", (void *) android_glTransformFeedbackVaryings },
5109 {"glGetTransformFeedbackVarying", "(III[II[II[II[BI)V", (void *) android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI },
5110 {"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 },
5111 {"glGetTransformFeedbackVarying", "(II[II[II)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying1 },
5112 {"glGetTransformFeedbackVarying", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying2 },
5113 {"glVertexAttribIPointerBounds", "(IIIILjava/nio/Buffer;I)V", (void *) android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I },
5114 {"glVertexAttribIPointer", "(IIIII)V", (void *) android_glVertexAttribIPointer__IIIII },
5115 {"glGetVertexAttribIiv", "(II[II)V", (void *) android_glGetVertexAttribIiv__II_3II },
5116 {"glGetVertexAttribIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2 },
5117 {"glGetVertexAttribIuiv", "(II[II)V", (void *) android_glGetVertexAttribIuiv__II_3II },
5118 {"glGetVertexAttribIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2 },
5119 {"glVertexAttribI4i", "(IIIII)V", (void *) android_glVertexAttribI4i__IIIII },
5120 {"glVertexAttribI4ui", "(IIIII)V", (void *) android_glVertexAttribI4ui__IIIII },
5121 {"glVertexAttribI4iv", "(I[II)V", (void *) android_glVertexAttribI4iv__I_3II },
5122 {"glVertexAttribI4iv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2 },
5123 {"glVertexAttribI4uiv", "(I[II)V", (void *) android_glVertexAttribI4uiv__I_3II },
5124 {"glVertexAttribI4uiv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2 },
5125 {"glGetUniformuiv", "(II[II)V", (void *) android_glGetUniformuiv__II_3II },
5126 {"glGetUniformuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformuiv__IILjava_nio_IntBuffer_2 },
5127 {"glGetFragDataLocation", "(ILjava/lang/String;)I", (void *) android_glGetFragDataLocation__ILjava_lang_String_2 },
5128 {"glUniform1ui", "(II)V", (void *) android_glUniform1ui__II },
5129 {"glUniform2ui", "(III)V", (void *) android_glUniform2ui__III },
5130 {"glUniform3ui", "(IIII)V", (void *) android_glUniform3ui__IIII },
5131 {"glUniform4ui", "(IIIII)V", (void *) android_glUniform4ui__IIIII },
5132 {"glUniform1uiv", "(II[II)V", (void *) android_glUniform1uiv__II_3II },
5133 {"glUniform1uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1uiv__IILjava_nio_IntBuffer_2 },
5134 {"glUniform2uiv", "(II[II)V", (void *) android_glUniform2uiv__II_3II },
5135 {"glUniform2uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2uiv__IILjava_nio_IntBuffer_2 },
5136 {"glUniform3uiv", "(II[II)V", (void *) android_glUniform3uiv__II_3II },
5137 {"glUniform3uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3uiv__IILjava_nio_IntBuffer_2 },
5138 {"glUniform4uiv", "(II[II)V", (void *) android_glUniform4uiv__II_3II },
5139 {"glUniform4uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4uiv__IILjava_nio_IntBuffer_2 },
5140 {"glClearBufferiv", "(II[II)V", (void *) android_glClearBufferiv__II_3II },
5141 {"glClearBufferiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferiv__IILjava_nio_IntBuffer_2 },
5142 {"glClearBufferuiv", "(II[II)V", (void *) android_glClearBufferuiv__II_3II },
5143 {"glClearBufferuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferuiv__IILjava_nio_IntBuffer_2 },
5144 {"glClearBufferfv", "(II[FI)V", (void *) android_glClearBufferfv__II_3FI },
5145 {"glClearBufferfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glClearBufferfv__IILjava_nio_FloatBuffer_2 },
5146 {"glClearBufferfi", "(IIFI)V", (void *) android_glClearBufferfi__IIFI },
5147 {"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II },
5148 {"glCopyBufferSubData", "(IIIII)V", (void *) android_glCopyBufferSubData__IIIII },
5149 {"glGetUniformIndices", "(I[Ljava/lang/String;[II)V", (void *) android_glGetUniformIndices_array },
5150 {"glGetUniformIndices", "(I[Ljava/lang/String;Ljava/nio/IntBuffer;)V", (void *) android_glGetUniformIndices_buffer },
5151 {"glGetActiveUniformsiv", "(II[III[II)V", (void *) android_glGetActiveUniformsiv__II_3III_3II },
5152 {"glGetActiveUniformsiv", "(IILjava/nio/IntBuffer;ILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2 },
5153 {"glGetUniformBlockIndex", "(ILjava/lang/String;)I", (void *) android_glGetUniformBlockIndex__ILjava_lang_String_2 },
5154 {"glGetActiveUniformBlockiv", "(III[II)V", (void *) android_glGetActiveUniformBlockiv__III_3II },
5155 {"glGetActiveUniformBlockiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2 },
5156 {"glGetActiveUniformBlockName", "(III[II[BI)V", (void *) android_glGetActiveUniformBlockName_III_3II_3BI },
5157 {"glGetActiveUniformBlockName", "(IILjava/nio/Buffer;Ljava/nio/Buffer;)V", (void *) android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 },
5158 {"glGetActiveUniformBlockName", "(II)Ljava/lang/String;", (void *) android_glGetActiveUniformBlockName_II },
5159 {"glUniformBlockBinding", "(III)V", (void *) android_glUniformBlockBinding__III },
5160 {"glDrawArraysInstanced", "(IIII)V", (void *) android_glDrawArraysInstanced__IIII },
5161 {"glDrawElementsInstanced", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I },
5162 {"glDrawElementsInstanced", "(IIIII)V", (void *) android_glDrawElementsInstanced__IIIII },
5163 {"glFenceSync", "(II)J", (void *) android_glFenceSync__II },
5164 {"glIsSync", "(J)Z", (void *) android_glIsSync__J },
5165 {"glDeleteSync", "(J)V", (void *) android_glDeleteSync__J },
5166 {"glClientWaitSync", "(JIJ)I", (void *) android_glClientWaitSync__JIJ },
5167 {"glWaitSync", "(JIJ)V", (void *) android_glWaitSync__JIJ },
5168 {"glGetInteger64v", "(I[JI)V", (void *) android_glGetInteger64v__I_3JI },
5169 {"glGetInteger64v", "(ILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64v__ILjava_nio_LongBuffer_2 },
5170 {"glGetSynciv", "(JII[II[II)V", (void *) android_glGetSynciv__JII_3II_3II },
5171 {"glGetSynciv", "(JIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
5172 {"glGetInteger64i_v", "(II[JI)V", (void *) android_glGetInteger64i_v__II_3JI },
5173 {"glGetInteger64i_v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64i_v__IILjava_nio_LongBuffer_2 },
5174 {"glGetBufferParameteri64v", "(II[JI)V", (void *) android_glGetBufferParameteri64v__II_3JI },
5175 {"glGetBufferParameteri64v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2 },
5176 {"glGenSamplers", "(I[II)V", (void *) android_glGenSamplers__I_3II },
5177 {"glGenSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenSamplers__ILjava_nio_IntBuffer_2 },
5178 {"glDeleteSamplers", "(I[II)V", (void *) android_glDeleteSamplers__I_3II },
5179 {"glDeleteSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteSamplers__ILjava_nio_IntBuffer_2 },
5180 {"glIsSampler", "(I)Z", (void *) android_glIsSampler__I },
5181 {"glBindSampler", "(II)V", (void *) android_glBindSampler__II },
5182 {"glSamplerParameteri", "(III)V", (void *) android_glSamplerParameteri__III },
5183 {"glSamplerParameteriv", "(II[II)V", (void *) android_glSamplerParameteriv__II_3II },
5184 {"glSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameteriv__IILjava_nio_IntBuffer_2 },
5185 {"glSamplerParameterf", "(IIF)V", (void *) android_glSamplerParameterf__IIF },
5186 {"glSamplerParameterfv", "(II[FI)V", (void *) android_glSamplerParameterfv__II_3FI },
5187 {"glSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
5188 {"glGetSamplerParameteriv", "(II[II)V", (void *) android_glGetSamplerParameteriv__II_3II },
5189 {"glGetSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2 },
5190 {"glGetSamplerParameterfv", "(II[FI)V", (void *) android_glGetSamplerParameterfv__II_3FI },
5191 {"glGetSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
5192 {"glVertexAttribDivisor", "(II)V", (void *) android_glVertexAttribDivisor__II },
5193 {"glBindTransformFeedback", "(II)V", (void *) android_glBindTransformFeedback__II },
5194 {"glDeleteTransformFeedbacks", "(I[II)V", (void *) android_glDeleteTransformFeedbacks__I_3II },
5195 {"glDeleteTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2 },
5196 {"glGenTransformFeedbacks", "(I[II)V", (void *) android_glGenTransformFeedbacks__I_3II },
5197 {"glGenTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2 },
5198 {"glIsTransformFeedback", "(I)Z", (void *) android_glIsTransformFeedback__I },
5199 {"glPauseTransformFeedback", "()V", (void *) android_glPauseTransformFeedback__ },
5200 {"glResumeTransformFeedback", "()V", (void *) android_glResumeTransformFeedback__ },
5201 {"glGetProgramBinary", "(II[II[IILjava/nio/Buffer;)V", (void *) android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2 },
5202 {"glGetProgramBinary", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/Buffer;)V", (void *) android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2 },
5203 {"glProgramBinary", "(IILjava/nio/Buffer;I)V", (void *) android_glProgramBinary__IILjava_nio_Buffer_2I },
5204 {"glProgramParameteri", "(III)V", (void *) android_glProgramParameteri__III },
5205 {"glInvalidateFramebuffer", "(II[II)V", (void *) android_glInvalidateFramebuffer__II_3II },
5206 {"glInvalidateFramebuffer", "(IILjava/nio/IntBuffer;)V", (void *) android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2 },
5207 {"glInvalidateSubFramebuffer", "(II[IIIIII)V", (void *) android_glInvalidateSubFramebuffer__II_3IIIIII },
5208 {"glInvalidateSubFramebuffer", "(IILjava/nio/IntBuffer;IIII)V", (void *) android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII },
5209 {"glTexStorage2D", "(IIIII)V", (void *) android_glTexStorage2D__IIIII },
5210 {"glTexStorage3D", "(IIIIII)V", (void *) android_glTexStorage3D__IIIIII },
5211 {"glGetInternalformativ", "(IIII[II)V", (void *) android_glGetInternalformativ__IIII_3II },
5212 {"glGetInternalformativ", "(IIIILjava/nio/IntBuffer;)V", (void *) android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2 },
5215 int register_android_opengl_jni_GLES30(JNIEnv *_env)
5218 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));