2 * Copyright 2014 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 // This source file is automatically generated
19 #pragma GCC diagnostic ignored "-Wunused-variable"
20 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
21 #pragma GCC diagnostic ignored "-Wunused-function"
24 #include <GLES3/gl31.h>
27 #include <android_runtime/AndroidRuntime.h>
28 #include <utils/misc.h>
31 static int initialized = 0;
33 static jclass nioAccessClass;
34 static jclass bufferClass;
35 static jmethodID getBasePointerID;
36 static jmethodID getBaseArrayID;
37 static jmethodID getBaseArrayOffsetID;
38 static jfieldID positionID;
39 static jfieldID limitID;
40 static jfieldID elementSizeShiftID;
43 /* special calls implemented in Android's GLES wrapper used to more
44 * efficiently bound-check passed arrays */
46 #ifdef GL_VERSION_ES_CM_1_1
47 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
48 const GLvoid *ptr, GLsizei count);
49 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
50 const GLvoid *pointer, GLsizei count);
51 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
62 #ifdef GL_ES_VERSION_2_0
63 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
64 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
65 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
68 #ifdef GL_ES_VERSION_3_0
69 static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
70 GLsizei stride, const GLvoid *pointer, GLsizei count) {
71 glVertexAttribIPointer(indx, size, type, stride, pointer);
76 /* Cache method IDs each time the class is loaded. */
79 nativeClassInit(JNIEnv *_env, jclass glImplClass)
81 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
82 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
84 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
85 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
87 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
88 "getBasePointer", "(Ljava/nio/Buffer;)J");
89 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
90 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
91 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
94 positionID = _env->GetFieldID(bufferClass, "position", "I");
95 limitID = _env->GetFieldID(bufferClass, "limit", "I");
97 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
101 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
105 jint elementSizeShift;
108 position = _env->GetIntField(buffer, positionID);
109 limit = _env->GetIntField(buffer, limitID);
110 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
111 *remaining = (limit - position) << elementSizeShift;
112 pointer = _env->CallStaticLongMethod(nioAccessClass,
113 getBasePointerID, buffer);
116 return reinterpret_cast<void*>(pointer);
119 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
120 getBaseArrayID, buffer);
121 *offset = _env->CallStaticIntMethod(nioAccessClass,
122 getBaseArrayOffsetID, buffer);
127 class ByteArrayGetter {
129 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
130 return _env->GetByteArrayElements(array, is_copy);
133 class BooleanArrayGetter {
135 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
136 return _env->GetBooleanArrayElements(array, is_copy);
139 class CharArrayGetter {
141 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
142 return _env->GetCharArrayElements(array, is_copy);
145 class ShortArrayGetter {
147 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
148 return _env->GetShortArrayElements(array, is_copy);
151 class IntArrayGetter {
153 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
154 return _env->GetIntArrayElements(array, is_copy);
157 class LongArrayGetter {
159 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
160 return _env->GetLongArrayElements(array, is_copy);
163 class FloatArrayGetter {
165 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
166 return _env->GetFloatArrayElements(array, is_copy);
169 class DoubleArrayGetter {
171 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
172 return _env->GetDoubleArrayElements(array, is_copy);
176 template<typename JTYPEARRAY, typename ARRAYGETTER>
178 getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
179 return ARRAYGETTER::Get(_env, array, is_copy);
182 class ByteArrayReleaser {
184 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
185 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
188 class BooleanArrayReleaser {
190 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
191 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
194 class CharArrayReleaser {
196 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
197 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
200 class ShortArrayReleaser {
202 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
203 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
206 class IntArrayReleaser {
208 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
209 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
212 class LongArrayReleaser {
214 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
215 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
218 class FloatArrayReleaser {
220 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
221 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
224 class DoubleArrayReleaser {
226 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
227 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
231 template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
233 releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
234 ARRAYRELEASER::Release(_env, array, data, commit);
238 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
240 _env->ReleasePrimitiveArrayCritical(array, data,
241 commit ? 0 : JNI_ABORT);
245 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
246 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
248 jint position = _env->GetIntField(buffer, positionID);
249 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
250 buf += position << elementSizeShift;
252 jniThrowException(_env, "java/lang/IllegalArgumentException",
253 "Must use a native order direct Buffer");
258 // --------------------------------------------------------------------------
261 * returns the number of values glGet returns for a given pname.
263 * The code below is written such that pnames requiring only one values
264 * are the default (and are not explicitely tested for). This makes the
265 * checking code much shorter/readable/efficient.
267 * This means that unknown pnames (e.g.: extensions) will default to 1. If
268 * that unknown pname needs more than 1 value, then the validation check
269 * is incomplete and the app may crash if it passed the wrong number params.
271 static int getNeededCount(GLint pname) {
273 #ifdef GL_ES_VERSION_2_0
276 case GL_ALIASED_LINE_WIDTH_RANGE:
277 case GL_ALIASED_POINT_SIZE_RANGE:
282 case GL_COLOR_CLEAR_VALUE:
283 case GL_COLOR_WRITEMASK:
289 case GL_COMPRESSED_TEXTURE_FORMATS:
290 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
293 case GL_SHADER_BINARY_FORMATS:
294 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
299 #ifdef GL_VERSION_ES_CM_1_1
302 case GL_ALIASED_LINE_WIDTH_RANGE:
303 case GL_ALIASED_POINT_SIZE_RANGE:
305 case GL_SMOOTH_LINE_WIDTH_RANGE:
306 case GL_SMOOTH_POINT_SIZE_RANGE:
310 case GL_CURRENT_NORMAL:
311 case GL_POINT_DISTANCE_ATTENUATION:
315 case GL_COLOR_CLEAR_VALUE:
316 case GL_COLOR_WRITEMASK:
317 case GL_CURRENT_COLOR:
318 case GL_CURRENT_TEXTURE_COORDS:
320 case GL_LIGHT_MODEL_AMBIENT:
326 case GL_MODELVIEW_MATRIX:
327 case GL_PROJECTION_MATRIX:
328 case GL_TEXTURE_MATRIX:
332 case GL_COMPRESSED_TEXTURE_FORMATS:
333 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
340 template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
341 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
344 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
346 const char * _exceptionType;
347 const char * _exceptionMessage;
348 CTYPE *params_base = (CTYPE *) 0;
350 CTYPE *params = (CTYPE *) 0;
355 _exceptionType = "java/lang/IllegalArgumentException";
356 _exceptionMessage = "params == null";
361 _exceptionType = "java/lang/IllegalArgumentException";
362 _exceptionMessage = "offset < 0";
365 _remaining = _env->GetArrayLength(params_ref) - offset;
366 _needed = getNeededCount(pname);
367 // if we didn't find this pname, we just assume the user passed
368 // an array of the right size -- this might happen with extensions
369 // or if we forget an enum here.
370 if (_remaining < _needed) {
372 _exceptionType = "java/lang/IllegalArgumentException";
373 _exceptionMessage = "length - offset < needed";
376 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
377 _env, params_ref, (jboolean *)0);
378 params = params_base + offset;
387 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
388 _env, params_ref, params_base, !_exception);
391 jniThrowException(_env, _exceptionType, _exceptionMessage);
396 template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
397 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
400 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
402 const char * _exceptionType;
403 const char * _exceptionMessage;
404 JTYPEARRAY _array = (JTYPEARRAY) 0;
405 jint _bufferOffset = (jint) 0;
407 CTYPE *params = (CTYPE *) 0;
410 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
411 _remaining /= sizeof(CTYPE); // convert from bytes to item count
412 _needed = getNeededCount(pname);
413 // if we didn't find this pname, we just assume the user passed
414 // an array of the right size -- this might happen with extensions
415 // or if we forget an enum here.
416 if (_needed>0 && _remaining < _needed) {
418 _exceptionType = "java/lang/IllegalArgumentException";
419 _exceptionMessage = "remaining() < needed";
422 if (params == NULL) {
423 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
424 _env, _array, (jboolean *) 0);
425 params = (CTYPE *) (_paramsBase + _bufferOffset);
434 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
435 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
438 jniThrowException(_env, _exceptionType, _exceptionMessage);
442 // --------------------------------------------------------------------------
443 /* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */
445 android_glDispatchCompute__III
446 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) {
448 (GLuint)num_groups_x,
449 (GLuint)num_groups_y,
454 /* void glDispatchComputeIndirect ( GLintptr indirect ) */
455 static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
456 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
457 // Here we only need to check for successful 64-bit to 32-bit conversion.
458 // - jlong is a int64_t (jni.h)
459 // - GLintptr is a long (khrplatform.h)
460 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
461 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
464 glDispatchComputeIndirect((GLintptr)indirect);
467 /* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
468 static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
469 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
470 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
471 // to unsigned 32-bit conversion.
472 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
473 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
476 glDrawArraysIndirect(mode, (const void*)indirect);
479 /* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
480 static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
481 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
482 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
483 // to unsigned 32-bit conversion.
484 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
485 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
488 glDrawElementsIndirect(mode, type, (const void*)indirect);
491 /* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */
493 android_glFramebufferParameteri__III
494 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
495 glFramebufferParameteri(
502 /* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
504 android_glGetFramebufferParameteriv__II_3II
505 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
507 const char * _exceptionType = NULL;
508 const char * _exceptionMessage = NULL;
509 GLint *params_base = (GLint *) 0;
511 GLint *params = (GLint *) 0;
515 _exceptionType = "java/lang/IllegalArgumentException";
516 _exceptionMessage = "params == null";
521 _exceptionType = "java/lang/IllegalArgumentException";
522 _exceptionMessage = "offset < 0";
525 _remaining = _env->GetArrayLength(params_ref) - offset;
526 params_base = (GLint *)
527 _env->GetIntArrayElements(params_ref, (jboolean *)0);
528 params = params_base + offset;
530 glGetFramebufferParameteriv(
538 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
539 _exception ? JNI_ABORT: 0);
542 jniThrowException(_env, _exceptionType, _exceptionMessage);
546 /* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
548 android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2
549 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
550 jintArray _array = (jintArray) 0;
551 jint _bufferOffset = (jint) 0;
553 GLint *params = (GLint *) 0;
555 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
556 if (params == NULL) {
557 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
558 params = (GLint *) (_paramsBase + _bufferOffset);
560 glGetFramebufferParameteriv(
566 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
570 /* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
572 android_glGetProgramInterfaceiv__III_3II
573 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) {
575 const char * _exceptionType = NULL;
576 const char * _exceptionMessage = NULL;
577 GLint *params_base = (GLint *) 0;
579 GLint *params = (GLint *) 0;
583 _exceptionType = "java/lang/IllegalArgumentException";
584 _exceptionMessage = "params == null";
589 _exceptionType = "java/lang/IllegalArgumentException";
590 _exceptionMessage = "offset < 0";
593 _remaining = _env->GetArrayLength(params_ref) - offset;
594 params_base = (GLint *)
595 _env->GetIntArrayElements(params_ref, (jboolean *)0);
596 params = params_base + offset;
598 glGetProgramInterfaceiv(
600 (GLenum)programInterface,
607 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
608 _exception ? JNI_ABORT: 0);
611 jniThrowException(_env, _exceptionType, _exceptionMessage);
615 /* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
617 android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2
618 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) {
619 jintArray _array = (jintArray) 0;
620 jint _bufferOffset = (jint) 0;
622 GLint *params = (GLint *) 0;
624 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
625 if (params == NULL) {
626 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
627 params = (GLint *) (_paramsBase + _bufferOffset);
629 glGetProgramInterfaceiv(
631 (GLenum)programInterface,
636 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
640 /* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */
642 android_glGetProgramResourceIndex__IILjava_lang_String_2
643 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
645 const char * _exceptionType = NULL;
646 const char * _exceptionMessage = NULL;
647 GLuint _returnValue = 0;
648 const char* _nativename = 0;
652 _exceptionType = "java/lang/IllegalArgumentException";
653 _exceptionMessage = "name == null";
656 _nativename = _env->GetStringUTFChars(name, 0);
658 _returnValue = glGetProgramResourceIndex(
660 (GLenum)programInterface,
661 (GLchar *)_nativename
666 _env->ReleaseStringUTFChars(name, _nativename);
670 jniThrowException(_env, _exceptionType, _exceptionMessage);
672 return (jint)_returnValue;
675 /* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
677 android_glGetProgramResourceName
678 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
679 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
683 /* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
685 android_glGetProgramResourceiv__IIII_3III_3II_3II
686 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jintArray props_ref, jint propsOffset, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray params_ref, jint paramsOffset) {
688 const char * _exceptionType = NULL;
689 const char * _exceptionMessage = NULL;
690 GLenum *props_base = (GLenum *) 0;
691 jint _propsRemaining;
692 GLenum *props = (GLenum *) 0;
693 GLsizei *length_base = (GLsizei *) 0;
694 jint _lengthRemaining;
695 GLsizei *length = (GLsizei *) 0;
696 GLint *params_base = (GLint *) 0;
697 jint _paramsRemaining;
698 GLint *params = (GLint *) 0;
702 _exceptionType = "java/lang/IllegalArgumentException";
703 _exceptionMessage = "props == null";
706 if (propsOffset < 0) {
708 _exceptionType = "java/lang/IllegalArgumentException";
709 _exceptionMessage = "propsOffset < 0";
712 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset;
713 props_base = (GLenum *)
714 _env->GetIntArrayElements(props_ref, (jboolean *)0);
715 props = props_base + propsOffset;
718 if (lengthOffset < 0) {
720 _exceptionType = "java/lang/IllegalArgumentException";
721 _exceptionMessage = "lengthOffset < 0";
724 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
725 length_base = (GLsizei *)
726 _env->GetIntArrayElements(length_ref, (jboolean *)0);
727 length = length_base + lengthOffset;
732 _exceptionType = "java/lang/IllegalArgumentException";
733 _exceptionMessage = "params == null";
736 if (paramsOffset < 0) {
738 _exceptionType = "java/lang/IllegalArgumentException";
739 _exceptionMessage = "paramsOffset < 0";
742 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
743 params_base = (GLint *)
744 _env->GetIntArrayElements(params_ref, (jboolean *)0);
745 params = params_base + paramsOffset;
747 glGetProgramResourceiv(
749 (GLenum)programInterface,
760 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
761 _exception ? JNI_ABORT: 0);
764 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
765 _exception ? JNI_ABORT: 0);
768 _env->ReleaseIntArrayElements(props_ref, (jint*)props_base,
772 jniThrowException(_env, _exceptionType, _exceptionMessage);
776 /* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
778 android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
779 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jobject props_buf, jint bufSize, jobject length_buf, jobject params_buf) {
780 jintArray _propsArray = (jintArray) 0;
781 jint _propsBufferOffset = (jint) 0;
782 jintArray _lengthArray = (jintArray) 0;
783 jint _lengthBufferOffset = (jint) 0;
784 jintArray _paramsArray = (jintArray) 0;
785 jint _paramsBufferOffset = (jint) 0;
786 jint _propsRemaining;
787 GLenum *props = (GLenum *) 0;
788 jint _lengthRemaining;
789 GLsizei *length = (GLsizei *) 0;
790 jint _paramsRemaining;
791 GLint *params = (GLint *) 0;
793 props = (GLenum *)getPointer(_env, props_buf, (jarray*)&_propsArray, &_propsRemaining, &_propsBufferOffset);
795 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
797 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
799 char * _propsBase = (char *)_env->GetIntArrayElements(_propsArray, (jboolean *) 0);
800 props = (GLenum *) (_propsBase + _propsBufferOffset);
802 if (length_buf && length == NULL) {
803 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
804 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
806 if (params == NULL) {
807 char * _paramsBase = (char *)_env->GetIntArrayElements(_paramsArray, (jboolean *) 0);
808 params = (GLint *) (_paramsBase + _paramsBufferOffset);
810 glGetProgramResourceiv(
812 (GLenum)programInterface,
821 _env->ReleaseIntArrayElements(_paramsArray, (jint*)params, 0);
824 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, 0);
827 _env->ReleaseIntArrayElements(_propsArray, (jint*)props, JNI_ABORT);
831 /* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */
833 android_glGetProgramResourceLocation__IILjava_lang_String_2
834 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
836 const char * _exceptionType = NULL;
837 const char * _exceptionMessage = NULL;
838 GLint _returnValue = 0;
839 const char* _nativename = 0;
843 _exceptionType = "java/lang/IllegalArgumentException";
844 _exceptionMessage = "name == null";
847 _nativename = _env->GetStringUTFChars(name, 0);
849 _returnValue = glGetProgramResourceLocation(
851 (GLenum)programInterface,
852 (GLchar *)_nativename
857 _env->ReleaseStringUTFChars(name, _nativename);
861 jniThrowException(_env, _exceptionType, _exceptionMessage);
863 return (jint)_returnValue;
866 /* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */
868 android_glUseProgramStages__III
869 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) {
877 /* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */
879 android_glActiveShaderProgram__II
880 (JNIEnv *_env, jobject _this, jint pipeline, jint program) {
881 glActiveShaderProgram(
887 /* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
889 android_glCreateShaderProgramv
890 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
892 const char * _exceptionType = NULL;
893 const char * _exceptionMessage = NULL;
895 const GLchar** _strings = NULL;
896 jstring* _jstrings = NULL;
897 GLuint _returnValue = 0;
901 _exceptionType = "java/lang/IllegalArgumentException";
902 _exceptionMessage = "strings == null";
906 _count = _env->GetArrayLength(strings);
908 _strings = (const GLchar**) calloc(_count, sizeof(const GLchar*));
911 _exceptionType = "java/lang/OutOfMemoryError";
912 _exceptionMessage = "out of memory";
916 _jstrings = (jstring*) calloc(_count, sizeof(jstring));
919 _exceptionType = "java/lang/OutOfMemoryError";
920 _exceptionMessage = "out of memory";
924 for(int i = 0; i < _count; i++) {
925 _jstrings[i] = (jstring) _env->GetObjectArrayElement(strings, i);
928 _exceptionType = "java/lang/IllegalArgumentException";
929 _exceptionMessage = "strings == null";
932 _strings[i] = _env->GetStringUTFChars(_jstrings[i], 0);
935 _returnValue = glCreateShaderProgramv((GLenum)type, _count, _strings);
937 if (_strings && _jstrings) {
938 for(int i = 0; i < _count; i++) {
939 if (_strings[i] && _jstrings[i]) {
940 _env->ReleaseStringUTFChars(_jstrings[i], _strings[i]);
951 jniThrowException(_env, _exceptionType, _exceptionMessage);
953 return (jint)_returnValue;
955 /* void glBindProgramPipeline ( GLuint pipeline ) */
957 android_glBindProgramPipeline__I
958 (JNIEnv *_env, jobject _this, jint pipeline) {
959 glBindProgramPipeline(
964 /* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
966 android_glDeleteProgramPipelines__I_3II
967 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
969 const char * _exceptionType = NULL;
970 const char * _exceptionMessage = NULL;
971 GLuint *pipelines_base = (GLuint *) 0;
973 GLuint *pipelines = (GLuint *) 0;
975 if (!pipelines_ref) {
977 _exceptionType = "java/lang/IllegalArgumentException";
978 _exceptionMessage = "pipelines == null";
983 _exceptionType = "java/lang/IllegalArgumentException";
984 _exceptionMessage = "offset < 0";
987 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
988 pipelines_base = (GLuint *)
989 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
990 pipelines = pipelines_base + offset;
992 glDeleteProgramPipelines(
998 if (pipelines_base) {
999 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
1003 jniThrowException(_env, _exceptionType, _exceptionMessage);
1007 /* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1009 android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2
1010 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
1011 jintArray _array = (jintArray) 0;
1012 jint _bufferOffset = (jint) 0;
1014 GLuint *pipelines = (GLuint *) 0;
1016 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1017 if (pipelines == NULL) {
1018 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1019 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1021 glDeleteProgramPipelines(
1026 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, JNI_ABORT);
1030 /* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1032 android_glGenProgramPipelines__I_3II
1033 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1034 jint _exception = 0;
1035 const char * _exceptionType = NULL;
1036 const char * _exceptionMessage = NULL;
1037 GLuint *pipelines_base = (GLuint *) 0;
1039 GLuint *pipelines = (GLuint *) 0;
1041 if (!pipelines_ref) {
1043 _exceptionType = "java/lang/IllegalArgumentException";
1044 _exceptionMessage = "pipelines == null";
1049 _exceptionType = "java/lang/IllegalArgumentException";
1050 _exceptionMessage = "offset < 0";
1053 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1054 pipelines_base = (GLuint *)
1055 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
1056 pipelines = pipelines_base + offset;
1058 glGenProgramPipelines(
1064 if (pipelines_base) {
1065 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
1066 _exception ? JNI_ABORT: 0);
1069 jniThrowException(_env, _exceptionType, _exceptionMessage);
1073 /* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1075 android_glGenProgramPipelines__ILjava_nio_IntBuffer_2
1076 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
1077 jintArray _array = (jintArray) 0;
1078 jint _bufferOffset = (jint) 0;
1080 GLuint *pipelines = (GLuint *) 0;
1082 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1083 if (pipelines == NULL) {
1084 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1085 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1087 glGenProgramPipelines(
1092 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, 0);
1096 /* GLboolean glIsProgramPipeline ( GLuint pipeline ) */
1098 android_glIsProgramPipeline__I
1099 (JNIEnv *_env, jobject _this, jint pipeline) {
1100 GLboolean _returnValue;
1101 _returnValue = glIsProgramPipeline(
1104 return (jboolean)_returnValue;
1107 /* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1109 android_glGetProgramPipelineiv__II_3II
1110 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) {
1111 jint _exception = 0;
1112 const char * _exceptionType = NULL;
1113 const char * _exceptionMessage = NULL;
1114 GLint *params_base = (GLint *) 0;
1116 GLint *params = (GLint *) 0;
1120 _exceptionType = "java/lang/IllegalArgumentException";
1121 _exceptionMessage = "params == null";
1126 _exceptionType = "java/lang/IllegalArgumentException";
1127 _exceptionMessage = "offset < 0";
1130 _remaining = _env->GetArrayLength(params_ref) - offset;
1131 params_base = (GLint *)
1132 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1133 params = params_base + offset;
1135 glGetProgramPipelineiv(
1143 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1144 _exception ? JNI_ABORT: 0);
1147 jniThrowException(_env, _exceptionType, _exceptionMessage);
1151 /* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1153 android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2
1154 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) {
1155 jintArray _array = (jintArray) 0;
1156 jint _bufferOffset = (jint) 0;
1158 GLint *params = (GLint *) 0;
1160 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1161 if (params == NULL) {
1162 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1163 params = (GLint *) (_paramsBase + _bufferOffset);
1165 glGetProgramPipelineiv(
1171 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
1175 /* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */
1177 android_glProgramUniform1i__III
1178 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1186 /* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */
1188 android_glProgramUniform2i__IIII
1189 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1198 /* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */
1200 android_glProgramUniform3i__IIIII
1201 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1211 /* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */
1213 android_glProgramUniform4i__IIIIII
1214 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1225 /* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */
1227 android_glProgramUniform1ui__III
1228 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1229 glProgramUniform1ui(
1236 /* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */
1238 android_glProgramUniform2ui__IIII
1239 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1240 glProgramUniform2ui(
1248 /* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
1250 android_glProgramUniform3ui__IIIII
1251 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1252 glProgramUniform3ui(
1261 /* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
1263 android_glProgramUniform4ui__IIIIII
1264 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1265 glProgramUniform4ui(
1275 /* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */
1277 android_glProgramUniform1f__IIF
1278 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) {
1286 /* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */
1288 android_glProgramUniform2f__IIFF
1289 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) {
1298 /* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */
1300 android_glProgramUniform3f__IIFFF
1301 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) {
1311 /* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */
1313 android_glProgramUniform4f__IIFFFF
1314 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) {
1325 /* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1327 android_glProgramUniform1iv__III_3II
1328 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1329 jint _exception = 0;
1330 const char * _exceptionType = NULL;
1331 const char * _exceptionMessage = NULL;
1332 GLint *value_base = (GLint *) 0;
1334 GLint *value = (GLint *) 0;
1338 _exceptionType = "java/lang/IllegalArgumentException";
1339 _exceptionMessage = "value == null";
1344 _exceptionType = "java/lang/IllegalArgumentException";
1345 _exceptionMessage = "offset < 0";
1348 _remaining = _env->GetArrayLength(value_ref) - offset;
1349 value_base = (GLint *)
1350 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1351 value = value_base + offset;
1353 glProgramUniform1iv(
1362 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1366 jniThrowException(_env, _exceptionType, _exceptionMessage);
1370 /* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1372 android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2
1373 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1374 jintArray _array = (jintArray) 0;
1375 jint _bufferOffset = (jint) 0;
1377 GLint *value = (GLint *) 0;
1379 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1380 if (value == NULL) {
1381 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1382 value = (GLint *) (_valueBase + _bufferOffset);
1384 glProgramUniform1iv(
1391 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1395 /* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1397 android_glProgramUniform2iv__III_3II
1398 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1399 jint _exception = 0;
1400 const char * _exceptionType = NULL;
1401 const char * _exceptionMessage = NULL;
1402 GLint *value_base = (GLint *) 0;
1404 GLint *value = (GLint *) 0;
1408 _exceptionType = "java/lang/IllegalArgumentException";
1409 _exceptionMessage = "value == null";
1414 _exceptionType = "java/lang/IllegalArgumentException";
1415 _exceptionMessage = "offset < 0";
1418 _remaining = _env->GetArrayLength(value_ref) - offset;
1419 value_base = (GLint *)
1420 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1421 value = value_base + offset;
1423 glProgramUniform2iv(
1432 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1436 jniThrowException(_env, _exceptionType, _exceptionMessage);
1440 /* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1442 android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2
1443 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1444 jintArray _array = (jintArray) 0;
1445 jint _bufferOffset = (jint) 0;
1447 GLint *value = (GLint *) 0;
1449 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1450 if (value == NULL) {
1451 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1452 value = (GLint *) (_valueBase + _bufferOffset);
1454 glProgramUniform2iv(
1461 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1465 /* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1467 android_glProgramUniform3iv__III_3II
1468 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1469 jint _exception = 0;
1470 const char * _exceptionType = NULL;
1471 const char * _exceptionMessage = NULL;
1472 GLint *value_base = (GLint *) 0;
1474 GLint *value = (GLint *) 0;
1478 _exceptionType = "java/lang/IllegalArgumentException";
1479 _exceptionMessage = "value == null";
1484 _exceptionType = "java/lang/IllegalArgumentException";
1485 _exceptionMessage = "offset < 0";
1488 _remaining = _env->GetArrayLength(value_ref) - offset;
1489 value_base = (GLint *)
1490 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1491 value = value_base + offset;
1493 glProgramUniform3iv(
1502 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1506 jniThrowException(_env, _exceptionType, _exceptionMessage);
1510 /* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1512 android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2
1513 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1514 jintArray _array = (jintArray) 0;
1515 jint _bufferOffset = (jint) 0;
1517 GLint *value = (GLint *) 0;
1519 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1520 if (value == NULL) {
1521 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1522 value = (GLint *) (_valueBase + _bufferOffset);
1524 glProgramUniform3iv(
1531 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1535 /* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1537 android_glProgramUniform4iv__III_3II
1538 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1539 jint _exception = 0;
1540 const char * _exceptionType = NULL;
1541 const char * _exceptionMessage = NULL;
1542 GLint *value_base = (GLint *) 0;
1544 GLint *value = (GLint *) 0;
1548 _exceptionType = "java/lang/IllegalArgumentException";
1549 _exceptionMessage = "value == null";
1554 _exceptionType = "java/lang/IllegalArgumentException";
1555 _exceptionMessage = "offset < 0";
1558 _remaining = _env->GetArrayLength(value_ref) - offset;
1559 value_base = (GLint *)
1560 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1561 value = value_base + offset;
1563 glProgramUniform4iv(
1572 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1576 jniThrowException(_env, _exceptionType, _exceptionMessage);
1580 /* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1582 android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2
1583 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1584 jintArray _array = (jintArray) 0;
1585 jint _bufferOffset = (jint) 0;
1587 GLint *value = (GLint *) 0;
1589 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1590 if (value == NULL) {
1591 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1592 value = (GLint *) (_valueBase + _bufferOffset);
1594 glProgramUniform4iv(
1601 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1605 /* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1607 android_glProgramUniform1uiv__III_3II
1608 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1609 jint _exception = 0;
1610 const char * _exceptionType = NULL;
1611 const char * _exceptionMessage = NULL;
1612 GLuint *value_base = (GLuint *) 0;
1614 GLuint *value = (GLuint *) 0;
1618 _exceptionType = "java/lang/IllegalArgumentException";
1619 _exceptionMessage = "value == null";
1624 _exceptionType = "java/lang/IllegalArgumentException";
1625 _exceptionMessage = "offset < 0";
1628 _remaining = _env->GetArrayLength(value_ref) - offset;
1629 value_base = (GLuint *)
1630 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1631 value = value_base + offset;
1633 glProgramUniform1uiv(
1642 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1646 jniThrowException(_env, _exceptionType, _exceptionMessage);
1650 /* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1652 android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2
1653 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1654 jintArray _array = (jintArray) 0;
1655 jint _bufferOffset = (jint) 0;
1657 GLuint *value = (GLuint *) 0;
1659 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1660 if (value == NULL) {
1661 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1662 value = (GLuint *) (_valueBase + _bufferOffset);
1664 glProgramUniform1uiv(
1671 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1675 /* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1677 android_glProgramUniform2uiv__III_3II
1678 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1679 jint _exception = 0;
1680 const char * _exceptionType = NULL;
1681 const char * _exceptionMessage = NULL;
1682 GLuint *value_base = (GLuint *) 0;
1684 GLuint *value = (GLuint *) 0;
1688 _exceptionType = "java/lang/IllegalArgumentException";
1689 _exceptionMessage = "value == null";
1694 _exceptionType = "java/lang/IllegalArgumentException";
1695 _exceptionMessage = "offset < 0";
1698 _remaining = _env->GetArrayLength(value_ref) - offset;
1699 value_base = (GLuint *)
1700 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1701 value = value_base + offset;
1703 glProgramUniform2uiv(
1712 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1716 jniThrowException(_env, _exceptionType, _exceptionMessage);
1720 /* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1722 android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2
1723 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1724 jintArray _array = (jintArray) 0;
1725 jint _bufferOffset = (jint) 0;
1727 GLuint *value = (GLuint *) 0;
1729 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1730 if (value == NULL) {
1731 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1732 value = (GLuint *) (_valueBase + _bufferOffset);
1734 glProgramUniform2uiv(
1741 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1745 /* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1747 android_glProgramUniform3uiv__III_3II
1748 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1749 jint _exception = 0;
1750 const char * _exceptionType = NULL;
1751 const char * _exceptionMessage = NULL;
1752 GLuint *value_base = (GLuint *) 0;
1754 GLuint *value = (GLuint *) 0;
1758 _exceptionType = "java/lang/IllegalArgumentException";
1759 _exceptionMessage = "value == null";
1764 _exceptionType = "java/lang/IllegalArgumentException";
1765 _exceptionMessage = "offset < 0";
1768 _remaining = _env->GetArrayLength(value_ref) - offset;
1769 value_base = (GLuint *)
1770 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1771 value = value_base + offset;
1773 glProgramUniform3uiv(
1782 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1786 jniThrowException(_env, _exceptionType, _exceptionMessage);
1790 /* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1792 android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2
1793 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1794 jintArray _array = (jintArray) 0;
1795 jint _bufferOffset = (jint) 0;
1797 GLuint *value = (GLuint *) 0;
1799 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1800 if (value == NULL) {
1801 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1802 value = (GLuint *) (_valueBase + _bufferOffset);
1804 glProgramUniform3uiv(
1811 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1815 /* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1817 android_glProgramUniform4uiv__III_3II
1818 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1819 jint _exception = 0;
1820 const char * _exceptionType = NULL;
1821 const char * _exceptionMessage = NULL;
1822 GLuint *value_base = (GLuint *) 0;
1824 GLuint *value = (GLuint *) 0;
1828 _exceptionType = "java/lang/IllegalArgumentException";
1829 _exceptionMessage = "value == null";
1834 _exceptionType = "java/lang/IllegalArgumentException";
1835 _exceptionMessage = "offset < 0";
1838 _remaining = _env->GetArrayLength(value_ref) - offset;
1839 value_base = (GLuint *)
1840 _env->GetIntArrayElements(value_ref, (jboolean *)0);
1841 value = value_base + offset;
1843 glProgramUniform4uiv(
1852 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
1856 jniThrowException(_env, _exceptionType, _exceptionMessage);
1860 /* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1862 android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2
1863 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1864 jintArray _array = (jintArray) 0;
1865 jint _bufferOffset = (jint) 0;
1867 GLuint *value = (GLuint *) 0;
1869 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1870 if (value == NULL) {
1871 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1872 value = (GLuint *) (_valueBase + _bufferOffset);
1874 glProgramUniform4uiv(
1881 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
1885 /* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1887 android_glProgramUniform1fv__III_3FI
1888 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1889 jint _exception = 0;
1890 const char * _exceptionType = NULL;
1891 const char * _exceptionMessage = NULL;
1892 GLfloat *value_base = (GLfloat *) 0;
1894 GLfloat *value = (GLfloat *) 0;
1898 _exceptionType = "java/lang/IllegalArgumentException";
1899 _exceptionMessage = "value == null";
1904 _exceptionType = "java/lang/IllegalArgumentException";
1905 _exceptionMessage = "offset < 0";
1908 _remaining = _env->GetArrayLength(value_ref) - offset;
1909 value_base = (GLfloat *)
1910 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
1911 value = value_base + offset;
1913 glProgramUniform1fv(
1922 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
1926 jniThrowException(_env, _exceptionType, _exceptionMessage);
1930 /* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1932 android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2
1933 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1934 jfloatArray _array = (jfloatArray) 0;
1935 jint _bufferOffset = (jint) 0;
1937 GLfloat *value = (GLfloat *) 0;
1939 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1940 if (value == NULL) {
1941 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
1942 value = (GLfloat *) (_valueBase + _bufferOffset);
1944 glProgramUniform1fv(
1951 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
1955 /* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1957 android_glProgramUniform2fv__III_3FI
1958 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1959 jint _exception = 0;
1960 const char * _exceptionType = NULL;
1961 const char * _exceptionMessage = NULL;
1962 GLfloat *value_base = (GLfloat *) 0;
1964 GLfloat *value = (GLfloat *) 0;
1968 _exceptionType = "java/lang/IllegalArgumentException";
1969 _exceptionMessage = "value == null";
1974 _exceptionType = "java/lang/IllegalArgumentException";
1975 _exceptionMessage = "offset < 0";
1978 _remaining = _env->GetArrayLength(value_ref) - offset;
1979 value_base = (GLfloat *)
1980 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
1981 value = value_base + offset;
1983 glProgramUniform2fv(
1992 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
1996 jniThrowException(_env, _exceptionType, _exceptionMessage);
2000 /* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2002 android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2
2003 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
2004 jfloatArray _array = (jfloatArray) 0;
2005 jint _bufferOffset = (jint) 0;
2007 GLfloat *value = (GLfloat *) 0;
2009 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2010 if (value == NULL) {
2011 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2012 value = (GLfloat *) (_valueBase + _bufferOffset);
2014 glProgramUniform2fv(
2021 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2025 /* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2027 android_glProgramUniform3fv__III_3FI
2028 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2029 jint _exception = 0;
2030 const char * _exceptionType = NULL;
2031 const char * _exceptionMessage = NULL;
2032 GLfloat *value_base = (GLfloat *) 0;
2034 GLfloat *value = (GLfloat *) 0;
2038 _exceptionType = "java/lang/IllegalArgumentException";
2039 _exceptionMessage = "value == null";
2044 _exceptionType = "java/lang/IllegalArgumentException";
2045 _exceptionMessage = "offset < 0";
2048 _remaining = _env->GetArrayLength(value_ref) - offset;
2049 value_base = (GLfloat *)
2050 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2051 value = value_base + offset;
2053 glProgramUniform3fv(
2062 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2066 jniThrowException(_env, _exceptionType, _exceptionMessage);
2070 /* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2072 android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2
2073 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
2074 jfloatArray _array = (jfloatArray) 0;
2075 jint _bufferOffset = (jint) 0;
2077 GLfloat *value = (GLfloat *) 0;
2079 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2080 if (value == NULL) {
2081 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2082 value = (GLfloat *) (_valueBase + _bufferOffset);
2084 glProgramUniform3fv(
2091 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2095 /* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2097 android_glProgramUniform4fv__III_3FI
2098 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2099 jint _exception = 0;
2100 const char * _exceptionType = NULL;
2101 const char * _exceptionMessage = NULL;
2102 GLfloat *value_base = (GLfloat *) 0;
2104 GLfloat *value = (GLfloat *) 0;
2108 _exceptionType = "java/lang/IllegalArgumentException";
2109 _exceptionMessage = "value == null";
2114 _exceptionType = "java/lang/IllegalArgumentException";
2115 _exceptionMessage = "offset < 0";
2118 _remaining = _env->GetArrayLength(value_ref) - offset;
2119 value_base = (GLfloat *)
2120 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2121 value = value_base + offset;
2123 glProgramUniform4fv(
2132 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2136 jniThrowException(_env, _exceptionType, _exceptionMessage);
2140 /* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2142 android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2
2143 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
2144 jfloatArray _array = (jfloatArray) 0;
2145 jint _bufferOffset = (jint) 0;
2147 GLfloat *value = (GLfloat *) 0;
2149 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2150 if (value == NULL) {
2151 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2152 value = (GLfloat *) (_valueBase + _bufferOffset);
2154 glProgramUniform4fv(
2161 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2165 /* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2167 android_glProgramUniformMatrix2fv__IIIZ_3FI
2168 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2169 jint _exception = 0;
2170 const char * _exceptionType = NULL;
2171 const char * _exceptionMessage = NULL;
2172 GLfloat *value_base = (GLfloat *) 0;
2174 GLfloat *value = (GLfloat *) 0;
2178 _exceptionType = "java/lang/IllegalArgumentException";
2179 _exceptionMessage = "value == null";
2184 _exceptionType = "java/lang/IllegalArgumentException";
2185 _exceptionMessage = "offset < 0";
2188 _remaining = _env->GetArrayLength(value_ref) - offset;
2189 value_base = (GLfloat *)
2190 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2191 value = value_base + offset;
2193 glProgramUniformMatrix2fv(
2197 (GLboolean)transpose,
2203 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2207 jniThrowException(_env, _exceptionType, _exceptionMessage);
2211 /* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2213 android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2
2214 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2215 jfloatArray _array = (jfloatArray) 0;
2216 jint _bufferOffset = (jint) 0;
2218 GLfloat *value = (GLfloat *) 0;
2220 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2221 if (value == NULL) {
2222 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2223 value = (GLfloat *) (_valueBase + _bufferOffset);
2225 glProgramUniformMatrix2fv(
2229 (GLboolean)transpose,
2233 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2237 /* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2239 android_glProgramUniformMatrix3fv__IIIZ_3FI
2240 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2241 jint _exception = 0;
2242 const char * _exceptionType = NULL;
2243 const char * _exceptionMessage = NULL;
2244 GLfloat *value_base = (GLfloat *) 0;
2246 GLfloat *value = (GLfloat *) 0;
2250 _exceptionType = "java/lang/IllegalArgumentException";
2251 _exceptionMessage = "value == null";
2256 _exceptionType = "java/lang/IllegalArgumentException";
2257 _exceptionMessage = "offset < 0";
2260 _remaining = _env->GetArrayLength(value_ref) - offset;
2261 value_base = (GLfloat *)
2262 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2263 value = value_base + offset;
2265 glProgramUniformMatrix3fv(
2269 (GLboolean)transpose,
2275 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2279 jniThrowException(_env, _exceptionType, _exceptionMessage);
2283 /* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2285 android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2
2286 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2287 jfloatArray _array = (jfloatArray) 0;
2288 jint _bufferOffset = (jint) 0;
2290 GLfloat *value = (GLfloat *) 0;
2292 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2293 if (value == NULL) {
2294 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2295 value = (GLfloat *) (_valueBase + _bufferOffset);
2297 glProgramUniformMatrix3fv(
2301 (GLboolean)transpose,
2305 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2309 /* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2311 android_glProgramUniformMatrix4fv__IIIZ_3FI
2312 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2313 jint _exception = 0;
2314 const char * _exceptionType = NULL;
2315 const char * _exceptionMessage = NULL;
2316 GLfloat *value_base = (GLfloat *) 0;
2318 GLfloat *value = (GLfloat *) 0;
2322 _exceptionType = "java/lang/IllegalArgumentException";
2323 _exceptionMessage = "value == null";
2328 _exceptionType = "java/lang/IllegalArgumentException";
2329 _exceptionMessage = "offset < 0";
2332 _remaining = _env->GetArrayLength(value_ref) - offset;
2333 value_base = (GLfloat *)
2334 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2335 value = value_base + offset;
2337 glProgramUniformMatrix4fv(
2341 (GLboolean)transpose,
2347 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2351 jniThrowException(_env, _exceptionType, _exceptionMessage);
2355 /* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2357 android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2
2358 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2359 jfloatArray _array = (jfloatArray) 0;
2360 jint _bufferOffset = (jint) 0;
2362 GLfloat *value = (GLfloat *) 0;
2364 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2365 if (value == NULL) {
2366 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2367 value = (GLfloat *) (_valueBase + _bufferOffset);
2369 glProgramUniformMatrix4fv(
2373 (GLboolean)transpose,
2377 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2381 /* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2383 android_glProgramUniformMatrix2x3fv__IIIZ_3FI
2384 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2385 jint _exception = 0;
2386 const char * _exceptionType = NULL;
2387 const char * _exceptionMessage = NULL;
2388 GLfloat *value_base = (GLfloat *) 0;
2390 GLfloat *value = (GLfloat *) 0;
2394 _exceptionType = "java/lang/IllegalArgumentException";
2395 _exceptionMessage = "value == null";
2400 _exceptionType = "java/lang/IllegalArgumentException";
2401 _exceptionMessage = "offset < 0";
2404 _remaining = _env->GetArrayLength(value_ref) - offset;
2405 value_base = (GLfloat *)
2406 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2407 value = value_base + offset;
2409 glProgramUniformMatrix2x3fv(
2413 (GLboolean)transpose,
2419 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2423 jniThrowException(_env, _exceptionType, _exceptionMessage);
2427 /* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2429 android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2
2430 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2431 jfloatArray _array = (jfloatArray) 0;
2432 jint _bufferOffset = (jint) 0;
2434 GLfloat *value = (GLfloat *) 0;
2436 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2437 if (value == NULL) {
2438 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2439 value = (GLfloat *) (_valueBase + _bufferOffset);
2441 glProgramUniformMatrix2x3fv(
2445 (GLboolean)transpose,
2449 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2453 /* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2455 android_glProgramUniformMatrix3x2fv__IIIZ_3FI
2456 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2457 jint _exception = 0;
2458 const char * _exceptionType = NULL;
2459 const char * _exceptionMessage = NULL;
2460 GLfloat *value_base = (GLfloat *) 0;
2462 GLfloat *value = (GLfloat *) 0;
2466 _exceptionType = "java/lang/IllegalArgumentException";
2467 _exceptionMessage = "value == null";
2472 _exceptionType = "java/lang/IllegalArgumentException";
2473 _exceptionMessage = "offset < 0";
2476 _remaining = _env->GetArrayLength(value_ref) - offset;
2477 value_base = (GLfloat *)
2478 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2479 value = value_base + offset;
2481 glProgramUniformMatrix3x2fv(
2485 (GLboolean)transpose,
2491 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2495 jniThrowException(_env, _exceptionType, _exceptionMessage);
2499 /* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2501 android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2
2502 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2503 jfloatArray _array = (jfloatArray) 0;
2504 jint _bufferOffset = (jint) 0;
2506 GLfloat *value = (GLfloat *) 0;
2508 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2509 if (value == NULL) {
2510 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2511 value = (GLfloat *) (_valueBase + _bufferOffset);
2513 glProgramUniformMatrix3x2fv(
2517 (GLboolean)transpose,
2521 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2525 /* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2527 android_glProgramUniformMatrix2x4fv__IIIZ_3FI
2528 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2529 jint _exception = 0;
2530 const char * _exceptionType = NULL;
2531 const char * _exceptionMessage = NULL;
2532 GLfloat *value_base = (GLfloat *) 0;
2534 GLfloat *value = (GLfloat *) 0;
2538 _exceptionType = "java/lang/IllegalArgumentException";
2539 _exceptionMessage = "value == null";
2544 _exceptionType = "java/lang/IllegalArgumentException";
2545 _exceptionMessage = "offset < 0";
2548 _remaining = _env->GetArrayLength(value_ref) - offset;
2549 value_base = (GLfloat *)
2550 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2551 value = value_base + offset;
2553 glProgramUniformMatrix2x4fv(
2557 (GLboolean)transpose,
2563 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2567 jniThrowException(_env, _exceptionType, _exceptionMessage);
2571 /* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2573 android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2
2574 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2575 jfloatArray _array = (jfloatArray) 0;
2576 jint _bufferOffset = (jint) 0;
2578 GLfloat *value = (GLfloat *) 0;
2580 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2581 if (value == NULL) {
2582 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2583 value = (GLfloat *) (_valueBase + _bufferOffset);
2585 glProgramUniformMatrix2x4fv(
2589 (GLboolean)transpose,
2593 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2597 /* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2599 android_glProgramUniformMatrix4x2fv__IIIZ_3FI
2600 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2601 jint _exception = 0;
2602 const char * _exceptionType = NULL;
2603 const char * _exceptionMessage = NULL;
2604 GLfloat *value_base = (GLfloat *) 0;
2606 GLfloat *value = (GLfloat *) 0;
2610 _exceptionType = "java/lang/IllegalArgumentException";
2611 _exceptionMessage = "value == null";
2616 _exceptionType = "java/lang/IllegalArgumentException";
2617 _exceptionMessage = "offset < 0";
2620 _remaining = _env->GetArrayLength(value_ref) - offset;
2621 value_base = (GLfloat *)
2622 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2623 value = value_base + offset;
2625 glProgramUniformMatrix4x2fv(
2629 (GLboolean)transpose,
2635 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2639 jniThrowException(_env, _exceptionType, _exceptionMessage);
2643 /* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2645 android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2
2646 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2647 jfloatArray _array = (jfloatArray) 0;
2648 jint _bufferOffset = (jint) 0;
2650 GLfloat *value = (GLfloat *) 0;
2652 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2653 if (value == NULL) {
2654 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2655 value = (GLfloat *) (_valueBase + _bufferOffset);
2657 glProgramUniformMatrix4x2fv(
2661 (GLboolean)transpose,
2665 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2669 /* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2671 android_glProgramUniformMatrix3x4fv__IIIZ_3FI
2672 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2673 jint _exception = 0;
2674 const char * _exceptionType = NULL;
2675 const char * _exceptionMessage = NULL;
2676 GLfloat *value_base = (GLfloat *) 0;
2678 GLfloat *value = (GLfloat *) 0;
2682 _exceptionType = "java/lang/IllegalArgumentException";
2683 _exceptionMessage = "value == null";
2688 _exceptionType = "java/lang/IllegalArgumentException";
2689 _exceptionMessage = "offset < 0";
2692 _remaining = _env->GetArrayLength(value_ref) - offset;
2693 value_base = (GLfloat *)
2694 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2695 value = value_base + offset;
2697 glProgramUniformMatrix3x4fv(
2701 (GLboolean)transpose,
2707 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2711 jniThrowException(_env, _exceptionType, _exceptionMessage);
2715 /* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2717 android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2
2718 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2719 jfloatArray _array = (jfloatArray) 0;
2720 jint _bufferOffset = (jint) 0;
2722 GLfloat *value = (GLfloat *) 0;
2724 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2725 if (value == NULL) {
2726 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2727 value = (GLfloat *) (_valueBase + _bufferOffset);
2729 glProgramUniformMatrix3x4fv(
2733 (GLboolean)transpose,
2737 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2741 /* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2743 android_glProgramUniformMatrix4x3fv__IIIZ_3FI
2744 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2745 jint _exception = 0;
2746 const char * _exceptionType = NULL;
2747 const char * _exceptionMessage = NULL;
2748 GLfloat *value_base = (GLfloat *) 0;
2750 GLfloat *value = (GLfloat *) 0;
2754 _exceptionType = "java/lang/IllegalArgumentException";
2755 _exceptionMessage = "value == null";
2760 _exceptionType = "java/lang/IllegalArgumentException";
2761 _exceptionMessage = "offset < 0";
2764 _remaining = _env->GetArrayLength(value_ref) - offset;
2765 value_base = (GLfloat *)
2766 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
2767 value = value_base + offset;
2769 glProgramUniformMatrix4x3fv(
2773 (GLboolean)transpose,
2779 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
2783 jniThrowException(_env, _exceptionType, _exceptionMessage);
2787 /* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2789 android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2
2790 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2791 jfloatArray _array = (jfloatArray) 0;
2792 jint _bufferOffset = (jint) 0;
2794 GLfloat *value = (GLfloat *) 0;
2796 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2797 if (value == NULL) {
2798 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2799 value = (GLfloat *) (_valueBase + _bufferOffset);
2801 glProgramUniformMatrix4x3fv(
2805 (GLboolean)transpose,
2809 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
2813 /* void glValidateProgramPipeline ( GLuint pipeline ) */
2815 android_glValidateProgramPipeline__I
2816 (JNIEnv *_env, jobject _this, jint pipeline) {
2817 glValidateProgramPipeline(
2824 /* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
2825 static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
2827 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
2829 return _env->NewStringUTF("");
2831 char* buf = (char*) malloc(infoLen);
2833 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
2836 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
2837 jstring result = _env->NewStringUTF(buf);
2841 /* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */
2843 android_glBindImageTexture__IIIZIII
2844 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) {
2856 /* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
2858 android_glGetBooleani_v__II_3ZI
2859 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) {
2860 jint _exception = 0;
2861 const char * _exceptionType = NULL;
2862 const char * _exceptionMessage = NULL;
2863 GLboolean *data_base = (GLboolean *) 0;
2865 GLboolean *data = (GLboolean *) 0;
2869 _exceptionType = "java/lang/IllegalArgumentException";
2870 _exceptionMessage = "data == null";
2875 _exceptionType = "java/lang/IllegalArgumentException";
2876 _exceptionMessage = "offset < 0";
2879 _remaining = _env->GetArrayLength(data_ref) - offset;
2880 data_base = (GLboolean *)
2881 _env->GetBooleanArrayElements(data_ref, (jboolean *)0);
2882 data = data_base + offset;
2892 _env->ReleaseBooleanArrayElements(data_ref, (jboolean*)data_base,
2893 _exception ? JNI_ABORT: 0);
2896 jniThrowException(_env, _exceptionType, _exceptionMessage);
2900 /* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
2902 android_glGetBooleani_v__IILjava_nio_IntBuffer_2
2903 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
2904 jintArray _array = (jintArray) 0;
2905 jint _bufferOffset = (jint) 0;
2907 GLboolean *data = (GLboolean *) 0;
2909 data = (GLboolean *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2911 char * _dataBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2912 data = (GLboolean *) (_dataBase + _bufferOffset);
2920 _env->ReleaseIntArrayElements(_array, (jint*)data, 0);
2924 /* void glMemoryBarrier ( GLbitfield barriers ) */
2926 android_glMemoryBarrier__I
2927 (JNIEnv *_env, jobject _this, jint barriers) {
2929 (GLbitfield)barriers
2933 /* void glMemoryBarrierByRegion ( GLbitfield barriers ) */
2935 android_glMemoryBarrierByRegion__I
2936 (JNIEnv *_env, jobject _this, jint barriers) {
2937 glMemoryBarrierByRegion(
2938 (GLbitfield)barriers
2942 /* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */
2944 android_glTexStorage2DMultisample__IIIIIZ
2945 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) {
2946 glTexStorage2DMultisample(
2949 (GLenum)internalformat,
2952 (GLboolean)fixedsamplelocations
2956 /* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
2958 android_glGetMultisamplefv__II_3FI
2959 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) {
2960 jint _exception = 0;
2961 const char * _exceptionType = NULL;
2962 const char * _exceptionMessage = NULL;
2963 GLfloat *val_base = (GLfloat *) 0;
2965 GLfloat *val = (GLfloat *) 0;
2969 _exceptionType = "java/lang/IllegalArgumentException";
2970 _exceptionMessage = "val == null";
2975 _exceptionType = "java/lang/IllegalArgumentException";
2976 _exceptionMessage = "offset < 0";
2979 _remaining = _env->GetArrayLength(val_ref) - offset;
2980 val_base = (GLfloat *)
2981 _env->GetFloatArrayElements(val_ref, (jboolean *)0);
2982 val = val_base + offset;
2992 _env->ReleaseFloatArrayElements(val_ref, (jfloat*)val_base,
2993 _exception ? JNI_ABORT: 0);
2996 jniThrowException(_env, _exceptionType, _exceptionMessage);
3000 /* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3002 android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2
3003 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) {
3004 jfloatArray _array = (jfloatArray) 0;
3005 jint _bufferOffset = (jint) 0;
3007 GLfloat *val = (GLfloat *) 0;
3009 val = (GLfloat *)getPointer(_env, val_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3011 char * _valBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3012 val = (GLfloat *) (_valBase + _bufferOffset);
3020 _env->ReleaseFloatArrayElements(_array, (jfloat*)val, 0);
3024 /* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */
3026 android_glSampleMaski__II
3027 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) {
3034 /* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3036 android_glGetTexLevelParameteriv__III_3II
3037 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) {
3038 jint _exception = 0;
3039 const char * _exceptionType = NULL;
3040 const char * _exceptionMessage = NULL;
3041 GLint *params_base = (GLint *) 0;
3043 GLint *params = (GLint *) 0;
3047 _exceptionType = "java/lang/IllegalArgumentException";
3048 _exceptionMessage = "params == null";
3053 _exceptionType = "java/lang/IllegalArgumentException";
3054 _exceptionMessage = "offset < 0";
3057 _remaining = _env->GetArrayLength(params_ref) - offset;
3058 params_base = (GLint *)
3059 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3060 params = params_base + offset;
3062 glGetTexLevelParameteriv(
3071 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3072 _exception ? JNI_ABORT: 0);
3075 jniThrowException(_env, _exceptionType, _exceptionMessage);
3079 /* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3081 android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2
3082 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
3083 jintArray _array = (jintArray) 0;
3084 jint _bufferOffset = (jint) 0;
3086 GLint *params = (GLint *) 0;
3088 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3089 if (params == NULL) {
3090 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3091 params = (GLint *) (_paramsBase + _bufferOffset);
3093 glGetTexLevelParameteriv(
3100 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
3104 /* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3106 android_glGetTexLevelParameterfv__III_3FI
3107 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) {
3108 jint _exception = 0;
3109 const char * _exceptionType = NULL;
3110 const char * _exceptionMessage = NULL;
3111 GLfloat *params_base = (GLfloat *) 0;
3113 GLfloat *params = (GLfloat *) 0;
3117 _exceptionType = "java/lang/IllegalArgumentException";
3118 _exceptionMessage = "params == null";
3123 _exceptionType = "java/lang/IllegalArgumentException";
3124 _exceptionMessage = "offset < 0";
3127 _remaining = _env->GetArrayLength(params_ref) - offset;
3128 params_base = (GLfloat *)
3129 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3130 params = params_base + offset;
3132 glGetTexLevelParameterfv(
3141 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3142 _exception ? JNI_ABORT: 0);
3145 jniThrowException(_env, _exceptionType, _exceptionMessage);
3149 /* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3151 android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2
3152 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
3153 jfloatArray _array = (jfloatArray) 0;
3154 jint _bufferOffset = (jint) 0;
3156 GLfloat *params = (GLfloat *) 0;
3158 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3159 if (params == NULL) {
3160 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3161 params = (GLfloat *) (_paramsBase + _bufferOffset);
3163 glGetTexLevelParameterfv(
3170 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, 0);
3174 /* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
3176 android_glBindVertexBuffer__IIJI
3177 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
3178 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
3179 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
3183 (GLuint)bindingindex,
3189 /* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */
3191 android_glVertexAttribFormat__IIIZI
3192 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) {
3193 glVertexAttribFormat(
3194 (GLuint)attribindex,
3197 (GLboolean)normalized,
3198 (GLuint)relativeoffset
3202 /* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */
3204 android_glVertexAttribIFormat__IIII
3205 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) {
3206 glVertexAttribIFormat(
3207 (GLuint)attribindex,
3210 (GLuint)relativeoffset
3214 /* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */
3216 android_glVertexAttribBinding__II
3217 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) {
3218 glVertexAttribBinding(
3219 (GLuint)attribindex,
3220 (GLuint)bindingindex
3224 /* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */
3226 android_glVertexBindingDivisor__II
3227 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) {
3228 glVertexBindingDivisor(
3229 (GLuint)bindingindex,
3234 static const char *classPathName = "android/opengl/GLES31";
3236 static const JNINativeMethod methods[] = {
3237 {"_nativeClassInit", "()V", (void*)nativeClassInit },
3238 {"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III },
3239 {"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
3240 {"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
3241 {"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
3242 {"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III },
3243 {"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II },
3244 {"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 },
3245 {"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II },
3246 {"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 },
3247 {"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 },
3248 {"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
3249 {"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II },
3250 {"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
3251 {"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 },
3252 {"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III },
3253 {"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II },
3254 {"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
3255 {"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I },
3256 {"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II },
3257 {"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 },
3258 {"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II },
3259 {"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 },
3260 {"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I },
3261 {"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II },
3262 {"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 },
3263 {"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III },
3264 {"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII },
3265 {"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII },
3266 {"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII },
3267 {"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III },
3268 {"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII },
3269 {"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII },
3270 {"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII },
3271 {"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF },
3272 {"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF },
3273 {"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF },
3274 {"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF },
3275 {"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II },
3276 {"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 },
3277 {"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II },
3278 {"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 },
3279 {"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II },
3280 {"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 },
3281 {"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II },
3282 {"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 },
3283 {"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II },
3284 {"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 },
3285 {"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II },
3286 {"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 },
3287 {"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II },
3288 {"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 },
3289 {"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II },
3290 {"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 },
3291 {"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI },
3292 {"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 },
3293 {"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI },
3294 {"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 },
3295 {"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI },
3296 {"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 },
3297 {"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI },
3298 {"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 },
3299 {"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI },
3300 {"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 },
3301 {"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI },
3302 {"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 },
3303 {"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI },
3304 {"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 },
3305 {"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI },
3306 {"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 },
3307 {"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI },
3308 {"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 },
3309 {"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI },
3310 {"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 },
3311 {"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI },
3312 {"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 },
3313 {"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI },
3314 {"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 },
3315 {"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI },
3316 {"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 },
3317 {"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I },
3318 {"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
3319 {"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII },
3320 {"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI },
3321 {"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 },
3322 {"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I },
3323 {"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I },
3324 {"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ },
3325 {"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI },
3326 {"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 },
3327 {"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II },
3328 {"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II },
3329 {"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 },
3330 {"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI },
3331 {"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 },
3332 {"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
3333 {"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI },
3334 {"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII },
3335 {"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II },
3336 {"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II },
3339 int register_android_opengl_jni_GLES31(JNIEnv *_env)
3342 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));