blob: bc9fc5d6b43776dea63c40f4a819147479b460e0 [file] [log] [blame]
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001/*
2 * Copyright 2014 The Android Open Source Project
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17// This source file is automatically generated
18
19#include <stdint.h>
20#include <GLES3/gl31.h>
Jesse Hall9626f822014-05-19 20:57:49 -070021#include <jni.h>
22#include <JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070023#include <android_runtime/AndroidRuntime.h>
24#include <utils/misc.h>
25#include <assert.h>
26
27static int initialized = 0;
28
29static jclass nioAccessClass;
30static jclass bufferClass;
31static jmethodID getBasePointerID;
32static jmethodID getBaseArrayID;
33static jmethodID getBaseArrayOffsetID;
34static jfieldID positionID;
35static jfieldID limitID;
36static jfieldID elementSizeShiftID;
37
38
39/* special calls implemented in Android's GLES wrapper used to more
40 * efficiently bound-check passed arrays */
41extern "C" {
42#ifdef GL_VERSION_ES_CM_1_1
43GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
44 const GLvoid *ptr, GLsizei count);
45GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
46 const GLvoid *pointer, GLsizei count);
47GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
48 GLsizei stride, const GLvoid *pointer, GLsizei count);
49GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
50 GLsizei stride, const GLvoid *pointer, GLsizei count);
51GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57#endif
58#ifdef GL_ES_VERSION_2_0
59static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
60 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
61 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
62}
63#endif
64#ifdef GL_ES_VERSION_3_0
65static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
66 GLsizei stride, const GLvoid *pointer, GLsizei count) {
67 glVertexAttribIPointer(indx, size, type, stride, pointer);
68}
69#endif
70}
71
72/* Cache method IDs each time the class is loaded. */
73
74static void
75nativeClassInit(JNIEnv *_env, jclass glImplClass)
76{
77 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
78 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
79
80 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
81 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
82
83 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
84 "getBasePointer", "(Ljava/nio/Buffer;)J");
85 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
86 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
87 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
88 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
89
90 positionID = _env->GetFieldID(bufferClass, "position", "I");
91 limitID = _env->GetFieldID(bufferClass, "limit", "I");
92 elementSizeShiftID =
93 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
94}
95
96static void *
97getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
98{
99 jint position;
100 jint limit;
101 jint elementSizeShift;
102 jlong pointer;
103
104 position = _env->GetIntField(buffer, positionID);
105 limit = _env->GetIntField(buffer, limitID);
106 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
107 *remaining = (limit - position) << elementSizeShift;
108 pointer = _env->CallStaticLongMethod(nioAccessClass,
109 getBasePointerID, buffer);
110 if (pointer != 0L) {
111 *array = NULL;
112 return reinterpret_cast<void*>(pointer);
113 }
114
115 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
116 getBaseArrayID, buffer);
117 *offset = _env->CallStaticIntMethod(nioAccessClass,
118 getBaseArrayOffsetID, buffer);
119
120 return NULL;
121}
122
123static void
124releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
125{
126 _env->ReleasePrimitiveArrayCritical(array, data,
127 commit ? 0 : JNI_ABORT);
128}
129
130static void *
131getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
132 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
133 if (buf) {
134 jint position = _env->GetIntField(buffer, positionID);
135 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
136 buf += position << elementSizeShift;
137 } else {
138 jniThrowException(_env, "java/lang/IllegalArgumentException",
139 "Must use a native order direct Buffer");
140 }
141 return (void*) buf;
142}
143
144// --------------------------------------------------------------------------
145
146/*
147 * returns the number of values glGet returns for a given pname.
148 *
149 * The code below is written such that pnames requiring only one values
150 * are the default (and are not explicitely tested for). This makes the
151 * checking code much shorter/readable/efficient.
152 *
153 * This means that unknown pnames (e.g.: extensions) will default to 1. If
154 * that unknown pname needs more than 1 value, then the validation check
155 * is incomplete and the app may crash if it passed the wrong number params.
156 */
157static int getNeededCount(GLint pname) {
158 int needed = 1;
159#ifdef GL_ES_VERSION_2_0
160 // GLES 2.x pnames
161 switch (pname) {
162 case GL_ALIASED_LINE_WIDTH_RANGE:
163 case GL_ALIASED_POINT_SIZE_RANGE:
164 needed = 2;
165 break;
166
167 case GL_BLEND_COLOR:
168 case GL_COLOR_CLEAR_VALUE:
169 case GL_COLOR_WRITEMASK:
170 case GL_SCISSOR_BOX:
171 case GL_VIEWPORT:
172 needed = 4;
173 break;
174
175 case GL_COMPRESSED_TEXTURE_FORMATS:
176 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
177 break;
178
179 case GL_SHADER_BINARY_FORMATS:
180 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
181 break;
182 }
183#endif
184
185#ifdef GL_VERSION_ES_CM_1_1
186 // GLES 1.x pnames
187 switch (pname) {
188 case GL_ALIASED_LINE_WIDTH_RANGE:
189 case GL_ALIASED_POINT_SIZE_RANGE:
190 case GL_DEPTH_RANGE:
191 case GL_SMOOTH_LINE_WIDTH_RANGE:
192 case GL_SMOOTH_POINT_SIZE_RANGE:
193 needed = 2;
194 break;
195
196 case GL_CURRENT_NORMAL:
197 case GL_POINT_DISTANCE_ATTENUATION:
198 needed = 3;
199 break;
200
201 case GL_COLOR_CLEAR_VALUE:
202 case GL_COLOR_WRITEMASK:
203 case GL_CURRENT_COLOR:
204 case GL_CURRENT_TEXTURE_COORDS:
205 case GL_FOG_COLOR:
206 case GL_LIGHT_MODEL_AMBIENT:
207 case GL_SCISSOR_BOX:
208 case GL_VIEWPORT:
209 needed = 4;
210 break;
211
212 case GL_MODELVIEW_MATRIX:
213 case GL_PROJECTION_MATRIX:
214 case GL_TEXTURE_MATRIX:
215 needed = 16;
216 break;
217
218 case GL_COMPRESSED_TEXTURE_FORMATS:
219 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
220 break;
221 }
222#endif
223 return needed;
224}
225
226template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
227static void
228get
229 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
230 jint _exception = 0;
231 const char * _exceptionType;
232 const char * _exceptionMessage;
233 CTYPE *params_base = (CTYPE *) 0;
234 jint _remaining;
235 CTYPE *params = (CTYPE *) 0;
236 int _needed = 0;
237
238 if (!params_ref) {
239 _exception = 1;
240 _exceptionType = "java/lang/IllegalArgumentException";
241 _exceptionMessage = "params == null";
242 goto exit;
243 }
244 if (offset < 0) {
245 _exception = 1;
246 _exceptionType = "java/lang/IllegalArgumentException";
247 _exceptionMessage = "offset < 0";
248 goto exit;
249 }
250 _remaining = _env->GetArrayLength(params_ref) - offset;
251 _needed = getNeededCount(pname);
252 // if we didn't find this pname, we just assume the user passed
253 // an array of the right size -- this might happen with extensions
254 // or if we forget an enum here.
255 if (_remaining < _needed) {
256 _exception = 1;
257 _exceptionType = "java/lang/IllegalArgumentException";
258 _exceptionMessage = "length - offset < needed";
259 goto exit;
260 }
261 params_base = (CTYPE *)
262 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
263 params = params_base + offset;
264
265 GET(
266 (GLenum)pname,
267 (CTYPE *)params
268 );
269
270exit:
271 if (params_base) {
272 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
273 _exception ? JNI_ABORT: 0);
274 }
275 if (_exception) {
276 jniThrowException(_env, _exceptionType, _exceptionMessage);
277 }
278}
279
280
281template <typename CTYPE, void GET(GLenum, CTYPE*)>
282static void
283getarray
284 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
285 jint _exception = 0;
286 const char * _exceptionType;
287 const char * _exceptionMessage;
288 jarray _array = (jarray) 0;
289 jint _bufferOffset = (jint) 0;
290 jint _remaining;
291 CTYPE *params = (CTYPE *) 0;
292 int _needed = 0;
293
294 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
295 _remaining /= sizeof(CTYPE); // convert from bytes to item count
296 _needed = getNeededCount(pname);
297 // if we didn't find this pname, we just assume the user passed
298 // an array of the right size -- this might happen with extensions
299 // or if we forget an enum here.
300 if (_needed>0 && _remaining < _needed) {
301 _exception = 1;
302 _exceptionType = "java/lang/IllegalArgumentException";
303 _exceptionMessage = "remaining() < needed";
304 goto exit;
305 }
306 if (params == NULL) {
307 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
308 params = (CTYPE *) (_paramsBase + _bufferOffset);
309 }
310 GET(
311 (GLenum)pname,
312 (CTYPE *)params
313 );
314
315exit:
316 if (_array) {
317 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
318 }
319 if (_exception) {
320 jniThrowException(_env, _exceptionType, _exceptionMessage);
321 }
322}
323
324// --------------------------------------------------------------------------
325/* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */
326static void
327android_glDispatchCompute__III
328 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) {
329 glDispatchCompute(
330 (GLuint)num_groups_x,
331 (GLuint)num_groups_y,
332 (GLuint)num_groups_z
333 );
334}
335
336/* void glDispatchComputeIndirect ( GLintptr indirect ) */
337static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
338 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
339 // Here we only need to check for successful 64-bit to 32-bit conversion.
340 // - jlong is a int64_t (jni.h)
341 // - GLintptr is a long (khrplatform.h)
342 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
343 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
344 return;
345 }
346 glDispatchComputeIndirect((GLintptr)indirect);
347}
348
349/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
350static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
351 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
352 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
353 // to unsigned 32-bit conversion.
354 if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
355 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
356 return;
357 }
358 glDrawArraysIndirect(mode, (const void*)indirect);
359}
360
361/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
362static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
363 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
364 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
365 // to unsigned 32-bit conversion.
366 if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
367 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
368 return;
369 }
370 glDrawElementsIndirect(mode, type, (const void*)indirect);
371}
372
373/* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */
374static void
375android_glFramebufferParameteri__III
376 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
377 glFramebufferParameteri(
378 (GLenum)target,
379 (GLenum)pname,
380 (GLint)param
381 );
382}
383
384/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
385static void
386android_glGetFramebufferParameteriv__II_3II
387 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
388 jint _exception = 0;
389 const char * _exceptionType = NULL;
390 const char * _exceptionMessage = NULL;
391 GLint *params_base = (GLint *) 0;
392 jint _remaining;
393 GLint *params = (GLint *) 0;
394
395 if (!params_ref) {
396 _exception = 1;
397 _exceptionType = "java/lang/IllegalArgumentException";
398 _exceptionMessage = "params == null";
399 goto exit;
400 }
401 if (offset < 0) {
402 _exception = 1;
403 _exceptionType = "java/lang/IllegalArgumentException";
404 _exceptionMessage = "offset < 0";
405 goto exit;
406 }
407 _remaining = _env->GetArrayLength(params_ref) - offset;
408 params_base = (GLint *)
409 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
410 params = params_base + offset;
411
412 glGetFramebufferParameteriv(
413 (GLenum)target,
414 (GLenum)pname,
415 (GLint *)params
416 );
417
418exit:
419 if (params_base) {
420 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
421 _exception ? JNI_ABORT: 0);
422 }
423 if (_exception) {
424 jniThrowException(_env, _exceptionType, _exceptionMessage);
425 }
426}
427
428/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
429static void
430android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2
431 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
432 jarray _array = (jarray) 0;
433 jint _bufferOffset = (jint) 0;
434 jint _remaining;
435 GLint *params = (GLint *) 0;
436
437 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
438 if (params == NULL) {
439 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
440 params = (GLint *) (_paramsBase + _bufferOffset);
441 }
442 glGetFramebufferParameteriv(
443 (GLenum)target,
444 (GLenum)pname,
445 (GLint *)params
446 );
447 if (_array) {
448 releasePointer(_env, _array, params, JNI_TRUE);
449 }
450}
451
452/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
453static void
454android_glGetProgramInterfaceiv__III_3II
455 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) {
456 jint _exception = 0;
457 const char * _exceptionType = NULL;
458 const char * _exceptionMessage = NULL;
459 GLint *params_base = (GLint *) 0;
460 jint _remaining;
461 GLint *params = (GLint *) 0;
462
463 if (!params_ref) {
464 _exception = 1;
465 _exceptionType = "java/lang/IllegalArgumentException";
466 _exceptionMessage = "params == null";
467 goto exit;
468 }
469 if (offset < 0) {
470 _exception = 1;
471 _exceptionType = "java/lang/IllegalArgumentException";
472 _exceptionMessage = "offset < 0";
473 goto exit;
474 }
475 _remaining = _env->GetArrayLength(params_ref) - offset;
476 params_base = (GLint *)
477 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
478 params = params_base + offset;
479
480 glGetProgramInterfaceiv(
481 (GLuint)program,
482 (GLenum)programInterface,
483 (GLenum)pname,
484 (GLint *)params
485 );
486
487exit:
488 if (params_base) {
489 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
490 _exception ? JNI_ABORT: 0);
491 }
492 if (_exception) {
493 jniThrowException(_env, _exceptionType, _exceptionMessage);
494 }
495}
496
497/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
498static void
499android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2
500 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) {
501 jarray _array = (jarray) 0;
502 jint _bufferOffset = (jint) 0;
503 jint _remaining;
504 GLint *params = (GLint *) 0;
505
506 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
507 if (params == NULL) {
508 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
509 params = (GLint *) (_paramsBase + _bufferOffset);
510 }
511 glGetProgramInterfaceiv(
512 (GLuint)program,
513 (GLenum)programInterface,
514 (GLenum)pname,
515 (GLint *)params
516 );
517 if (_array) {
518 releasePointer(_env, _array, params, JNI_TRUE);
519 }
520}
521
522/* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */
523static jint
524android_glGetProgramResourceIndex__IILjava_lang_String_2
525 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
526 jint _exception = 0;
527 const char * _exceptionType = NULL;
528 const char * _exceptionMessage = NULL;
529 GLuint _returnValue = 0;
530 const char* _nativename = 0;
531
532 if (!name) {
533 _exception = 1;
534 _exceptionType = "java/lang/IllegalArgumentException";
535 _exceptionMessage = "name == null";
536 goto exit;
537 }
538 _nativename = _env->GetStringUTFChars(name, 0);
539
540 _returnValue = glGetProgramResourceIndex(
541 (GLuint)program,
542 (GLenum)programInterface,
543 (GLchar *)_nativename
544 );
545
546exit:
547 if (_nativename) {
548 _env->ReleaseStringUTFChars(name, _nativename);
549 }
550
551 if (_exception) {
552 jniThrowException(_env, _exceptionType, _exceptionMessage);
553 }
554 return (jint)_returnValue;
555}
556
557/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
558static jstring
559android_glGetProgramResourceName
560 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
561 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
562 return NULL;
563}
564
565/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
566static void
567android_glGetProgramResourceiv__IIII_3III_3II_3II
568 (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) {
569 jint _exception = 0;
570 const char * _exceptionType = NULL;
571 const char * _exceptionMessage = NULL;
572 GLenum *props_base = (GLenum *) 0;
573 jint _propsRemaining;
574 GLenum *props = (GLenum *) 0;
575 GLsizei *length_base = (GLsizei *) 0;
576 jint _lengthRemaining;
577 GLsizei *length = (GLsizei *) 0;
578 GLint *params_base = (GLint *) 0;
579 jint _paramsRemaining;
580 GLint *params = (GLint *) 0;
581
582 if (!props_ref) {
583 _exception = 1;
584 _exceptionType = "java/lang/IllegalArgumentException";
585 _exceptionMessage = "props == null";
586 goto exit;
587 }
588 if (propsOffset < 0) {
589 _exception = 1;
590 _exceptionType = "java/lang/IllegalArgumentException";
591 _exceptionMessage = "propsOffset < 0";
592 goto exit;
593 }
594 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset;
595 props_base = (GLenum *)
596 _env->GetPrimitiveArrayCritical(props_ref, (jboolean *)0);
597 props = props_base + propsOffset;
598
599 if (!length_ref) {
600 _exception = 1;
601 _exceptionType = "java/lang/IllegalArgumentException";
602 _exceptionMessage = "length == null";
603 goto exit;
604 }
605 if (lengthOffset < 0) {
606 _exception = 1;
607 _exceptionType = "java/lang/IllegalArgumentException";
608 _exceptionMessage = "lengthOffset < 0";
609 goto exit;
610 }
611 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
612 length_base = (GLsizei *)
613 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
614 length = length_base + lengthOffset;
615
616 if (!params_ref) {
617 _exception = 1;
618 _exceptionType = "java/lang/IllegalArgumentException";
619 _exceptionMessage = "params == null";
620 goto exit;
621 }
622 if (paramsOffset < 0) {
623 _exception = 1;
624 _exceptionType = "java/lang/IllegalArgumentException";
625 _exceptionMessage = "paramsOffset < 0";
626 goto exit;
627 }
628 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
629 params_base = (GLint *)
630 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
631 params = params_base + paramsOffset;
632
633 glGetProgramResourceiv(
634 (GLuint)program,
635 (GLenum)programInterface,
636 (GLuint)index,
637 (GLsizei)propCount,
638 (GLenum *)props,
639 (GLsizei)bufSize,
640 (GLsizei *)length,
641 (GLint *)params
642 );
643
644exit:
645 if (params_base) {
646 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
647 _exception ? JNI_ABORT: 0);
648 }
649 if (length_base) {
650 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
651 _exception ? JNI_ABORT: 0);
652 }
653 if (props_base) {
654 _env->ReleasePrimitiveArrayCritical(props_ref, props_base,
655 JNI_ABORT);
656 }
657 if (_exception) {
658 jniThrowException(_env, _exceptionType, _exceptionMessage);
659 }
660}
661
662/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
663static void
664android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
665 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jobject props_buf, jint bufSize, jobject length_buf, jobject params_buf) {
666 jarray _propsArray = (jarray) 0;
667 jint _propsBufferOffset = (jint) 0;
668 jarray _lengthArray = (jarray) 0;
669 jint _lengthBufferOffset = (jint) 0;
670 jarray _paramsArray = (jarray) 0;
671 jint _paramsBufferOffset = (jint) 0;
672 jint _propsRemaining;
673 GLenum *props = (GLenum *) 0;
674 jint _lengthRemaining;
675 GLsizei *length = (GLsizei *) 0;
676 jint _paramsRemaining;
677 GLint *params = (GLint *) 0;
678
679 props = (GLenum *)getPointer(_env, props_buf, &_propsArray, &_propsRemaining, &_propsBufferOffset);
680 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
681 params = (GLint *)getPointer(_env, params_buf, &_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
682 if (props == NULL) {
683 char * _propsBase = (char *)_env->GetPrimitiveArrayCritical(_propsArray, (jboolean *) 0);
684 props = (GLenum *) (_propsBase + _propsBufferOffset);
685 }
686 if (length == NULL) {
687 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
688 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
689 }
690 if (params == NULL) {
691 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_paramsArray, (jboolean *) 0);
692 params = (GLint *) (_paramsBase + _paramsBufferOffset);
693 }
694 glGetProgramResourceiv(
695 (GLuint)program,
696 (GLenum)programInterface,
697 (GLuint)index,
698 (GLsizei)propCount,
699 (GLenum *)props,
700 (GLsizei)bufSize,
701 (GLsizei *)length,
702 (GLint *)params
703 );
704 if (_paramsArray) {
705 releasePointer(_env, _paramsArray, params, JNI_TRUE);
706 }
707 if (_lengthArray) {
708 releasePointer(_env, _lengthArray, length, JNI_TRUE);
709 }
710 if (_propsArray) {
711 releasePointer(_env, _propsArray, props, JNI_FALSE);
712 }
713}
714
715/* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */
716static jint
717android_glGetProgramResourceLocation__IILjava_lang_String_2
718 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
719 jint _exception = 0;
720 const char * _exceptionType = NULL;
721 const char * _exceptionMessage = NULL;
722 GLint _returnValue = 0;
723 const char* _nativename = 0;
724
725 if (!name) {
726 _exception = 1;
727 _exceptionType = "java/lang/IllegalArgumentException";
728 _exceptionMessage = "name == null";
729 goto exit;
730 }
731 _nativename = _env->GetStringUTFChars(name, 0);
732
733 _returnValue = glGetProgramResourceLocation(
734 (GLuint)program,
735 (GLenum)programInterface,
736 (GLchar *)_nativename
737 );
738
739exit:
740 if (_nativename) {
741 _env->ReleaseStringUTFChars(name, _nativename);
742 }
743
744 if (_exception) {
745 jniThrowException(_env, _exceptionType, _exceptionMessage);
746 }
747 return (jint)_returnValue;
748}
749
750/* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */
751static void
752android_glUseProgramStages__III
753 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) {
754 glUseProgramStages(
755 (GLuint)pipeline,
756 (GLbitfield)stages,
757 (GLuint)program
758 );
759}
760
761/* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */
762static void
763android_glActiveShaderProgram__II
764 (JNIEnv *_env, jobject _this, jint pipeline, jint program) {
765 glActiveShaderProgram(
766 (GLuint)pipeline,
767 (GLuint)program
768 );
769}
770
771/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
772static jint
773android_glCreateShaderProgramv
774 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
775
776 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
777 return 0;
778}
779/* void glBindProgramPipeline ( GLuint pipeline ) */
780static void
781android_glBindProgramPipeline__I
782 (JNIEnv *_env, jobject _this, jint pipeline) {
783 glBindProgramPipeline(
784 (GLuint)pipeline
785 );
786}
787
788/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
789static void
790android_glDeleteProgramPipelines__I_3II
791 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
792 jint _exception = 0;
793 const char * _exceptionType = NULL;
794 const char * _exceptionMessage = NULL;
795 GLuint *pipelines_base = (GLuint *) 0;
796 jint _remaining;
797 GLuint *pipelines = (GLuint *) 0;
798
799 if (!pipelines_ref) {
800 _exception = 1;
801 _exceptionType = "java/lang/IllegalArgumentException";
802 _exceptionMessage = "pipelines == null";
803 goto exit;
804 }
805 if (offset < 0) {
806 _exception = 1;
807 _exceptionType = "java/lang/IllegalArgumentException";
808 _exceptionMessage = "offset < 0";
809 goto exit;
810 }
811 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
812 pipelines_base = (GLuint *)
813 _env->GetPrimitiveArrayCritical(pipelines_ref, (jboolean *)0);
814 pipelines = pipelines_base + offset;
815
816 glDeleteProgramPipelines(
817 (GLsizei)n,
818 (GLuint *)pipelines
819 );
820
821exit:
822 if (pipelines_base) {
823 _env->ReleasePrimitiveArrayCritical(pipelines_ref, pipelines_base,
824 JNI_ABORT);
825 }
826 if (_exception) {
827 jniThrowException(_env, _exceptionType, _exceptionMessage);
828 }
829}
830
831/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
832static void
833android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2
834 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
835 jarray _array = (jarray) 0;
836 jint _bufferOffset = (jint) 0;
837 jint _remaining;
838 GLuint *pipelines = (GLuint *) 0;
839
840 pipelines = (GLuint *)getPointer(_env, pipelines_buf, &_array, &_remaining, &_bufferOffset);
841 if (pipelines == NULL) {
842 char * _pipelinesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
843 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
844 }
845 glDeleteProgramPipelines(
846 (GLsizei)n,
847 (GLuint *)pipelines
848 );
849 if (_array) {
850 releasePointer(_env, _array, pipelines, JNI_FALSE);
851 }
852}
853
854/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
855static void
856android_glGenProgramPipelines__I_3II
857 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
858 jint _exception = 0;
859 const char * _exceptionType = NULL;
860 const char * _exceptionMessage = NULL;
861 GLuint *pipelines_base = (GLuint *) 0;
862 jint _remaining;
863 GLuint *pipelines = (GLuint *) 0;
864
865 if (!pipelines_ref) {
866 _exception = 1;
867 _exceptionType = "java/lang/IllegalArgumentException";
868 _exceptionMessage = "pipelines == null";
869 goto exit;
870 }
871 if (offset < 0) {
872 _exception = 1;
873 _exceptionType = "java/lang/IllegalArgumentException";
874 _exceptionMessage = "offset < 0";
875 goto exit;
876 }
877 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
878 pipelines_base = (GLuint *)
879 _env->GetPrimitiveArrayCritical(pipelines_ref, (jboolean *)0);
880 pipelines = pipelines_base + offset;
881
882 glGenProgramPipelines(
883 (GLsizei)n,
884 (GLuint *)pipelines
885 );
886
887exit:
888 if (pipelines_base) {
889 _env->ReleasePrimitiveArrayCritical(pipelines_ref, pipelines_base,
890 _exception ? JNI_ABORT: 0);
891 }
892 if (_exception) {
893 jniThrowException(_env, _exceptionType, _exceptionMessage);
894 }
895}
896
897/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
898static void
899android_glGenProgramPipelines__ILjava_nio_IntBuffer_2
900 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
901 jarray _array = (jarray) 0;
902 jint _bufferOffset = (jint) 0;
903 jint _remaining;
904 GLuint *pipelines = (GLuint *) 0;
905
906 pipelines = (GLuint *)getPointer(_env, pipelines_buf, &_array, &_remaining, &_bufferOffset);
907 if (pipelines == NULL) {
908 char * _pipelinesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
909 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
910 }
911 glGenProgramPipelines(
912 (GLsizei)n,
913 (GLuint *)pipelines
914 );
915 if (_array) {
916 releasePointer(_env, _array, pipelines, JNI_TRUE);
917 }
918}
919
920/* GLboolean glIsProgramPipeline ( GLuint pipeline ) */
921static jboolean
922android_glIsProgramPipeline__I
923 (JNIEnv *_env, jobject _this, jint pipeline) {
924 GLboolean _returnValue;
925 _returnValue = glIsProgramPipeline(
926 (GLuint)pipeline
927 );
928 return (jboolean)_returnValue;
929}
930
931/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
932static void
933android_glGetProgramPipelineiv__II_3II
934 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) {
935 jint _exception = 0;
936 const char * _exceptionType = NULL;
937 const char * _exceptionMessage = NULL;
938 GLint *params_base = (GLint *) 0;
939 jint _remaining;
940 GLint *params = (GLint *) 0;
941
942 if (!params_ref) {
943 _exception = 1;
944 _exceptionType = "java/lang/IllegalArgumentException";
945 _exceptionMessage = "params == null";
946 goto exit;
947 }
948 if (offset < 0) {
949 _exception = 1;
950 _exceptionType = "java/lang/IllegalArgumentException";
951 _exceptionMessage = "offset < 0";
952 goto exit;
953 }
954 _remaining = _env->GetArrayLength(params_ref) - offset;
955 params_base = (GLint *)
956 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
957 params = params_base + offset;
958
959 glGetProgramPipelineiv(
960 (GLuint)pipeline,
961 (GLenum)pname,
962 (GLint *)params
963 );
964
965exit:
966 if (params_base) {
967 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
968 _exception ? JNI_ABORT: 0);
969 }
970 if (_exception) {
971 jniThrowException(_env, _exceptionType, _exceptionMessage);
972 }
973}
974
975/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
976static void
977android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2
978 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) {
979 jarray _array = (jarray) 0;
980 jint _bufferOffset = (jint) 0;
981 jint _remaining;
982 GLint *params = (GLint *) 0;
983
984 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
985 if (params == NULL) {
986 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
987 params = (GLint *) (_paramsBase + _bufferOffset);
988 }
989 glGetProgramPipelineiv(
990 (GLuint)pipeline,
991 (GLenum)pname,
992 (GLint *)params
993 );
994 if (_array) {
995 releasePointer(_env, _array, params, JNI_TRUE);
996 }
997}
998
999/* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */
1000static void
1001android_glProgramUniform1i__III
1002 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1003 glProgramUniform1i(
1004 (GLuint)program,
1005 (GLint)location,
1006 (GLint)v0
1007 );
1008}
1009
1010/* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */
1011static void
1012android_glProgramUniform2i__IIII
1013 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1014 glProgramUniform2i(
1015 (GLuint)program,
1016 (GLint)location,
1017 (GLint)v0,
1018 (GLint)v1
1019 );
1020}
1021
1022/* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */
1023static void
1024android_glProgramUniform3i__IIIII
1025 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1026 glProgramUniform3i(
1027 (GLuint)program,
1028 (GLint)location,
1029 (GLint)v0,
1030 (GLint)v1,
1031 (GLint)v2
1032 );
1033}
1034
1035/* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */
1036static void
1037android_glProgramUniform4i__IIIIII
1038 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1039 glProgramUniform4i(
1040 (GLuint)program,
1041 (GLint)location,
1042 (GLint)v0,
1043 (GLint)v1,
1044 (GLint)v2,
1045 (GLint)v3
1046 );
1047}
1048
1049/* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */
1050static void
1051android_glProgramUniform1ui__III
1052 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1053 glProgramUniform1ui(
1054 (GLuint)program,
1055 (GLint)location,
1056 (GLuint)v0
1057 );
1058}
1059
1060/* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */
1061static void
1062android_glProgramUniform2ui__IIII
1063 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1064 glProgramUniform2ui(
1065 (GLuint)program,
1066 (GLint)location,
1067 (GLuint)v0,
1068 (GLuint)v1
1069 );
1070}
1071
1072/* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
1073static void
1074android_glProgramUniform3ui__IIIII
1075 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1076 glProgramUniform3ui(
1077 (GLuint)program,
1078 (GLint)location,
1079 (GLuint)v0,
1080 (GLuint)v1,
1081 (GLuint)v2
1082 );
1083}
1084
1085/* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
1086static void
1087android_glProgramUniform4ui__IIIIII
1088 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1089 glProgramUniform4ui(
1090 (GLuint)program,
1091 (GLint)location,
1092 (GLuint)v0,
1093 (GLuint)v1,
1094 (GLuint)v2,
1095 (GLuint)v3
1096 );
1097}
1098
1099/* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */
1100static void
1101android_glProgramUniform1f__IIF
1102 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) {
1103 glProgramUniform1f(
1104 (GLuint)program,
1105 (GLint)location,
1106 (GLfloat)v0
1107 );
1108}
1109
1110/* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */
1111static void
1112android_glProgramUniform2f__IIFF
1113 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) {
1114 glProgramUniform2f(
1115 (GLuint)program,
1116 (GLint)location,
1117 (GLfloat)v0,
1118 (GLfloat)v1
1119 );
1120}
1121
1122/* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */
1123static void
1124android_glProgramUniform3f__IIFFF
1125 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) {
1126 glProgramUniform3f(
1127 (GLuint)program,
1128 (GLint)location,
1129 (GLfloat)v0,
1130 (GLfloat)v1,
1131 (GLfloat)v2
1132 );
1133}
1134
1135/* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */
1136static void
1137android_glProgramUniform4f__IIFFFF
1138 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) {
1139 glProgramUniform4f(
1140 (GLuint)program,
1141 (GLint)location,
1142 (GLfloat)v0,
1143 (GLfloat)v1,
1144 (GLfloat)v2,
1145 (GLfloat)v3
1146 );
1147}
1148
1149/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1150static void
1151android_glProgramUniform1iv__III_3II
1152 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1153 jint _exception = 0;
1154 const char * _exceptionType = NULL;
1155 const char * _exceptionMessage = NULL;
1156 GLint *value_base = (GLint *) 0;
1157 jint _remaining;
1158 GLint *value = (GLint *) 0;
1159
1160 if (!value_ref) {
1161 _exception = 1;
1162 _exceptionType = "java/lang/IllegalArgumentException";
1163 _exceptionMessage = "value == null";
1164 goto exit;
1165 }
1166 if (offset < 0) {
1167 _exception = 1;
1168 _exceptionType = "java/lang/IllegalArgumentException";
1169 _exceptionMessage = "offset < 0";
1170 goto exit;
1171 }
1172 _remaining = _env->GetArrayLength(value_ref) - offset;
1173 value_base = (GLint *)
1174 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1175 value = value_base + offset;
1176
1177 glProgramUniform1iv(
1178 (GLuint)program,
1179 (GLint)location,
1180 (GLsizei)count,
1181 (GLint *)value
1182 );
1183
1184exit:
1185 if (value_base) {
1186 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1187 JNI_ABORT);
1188 }
1189 if (_exception) {
1190 jniThrowException(_env, _exceptionType, _exceptionMessage);
1191 }
1192}
1193
1194/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1195static void
1196android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2
1197 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1198 jarray _array = (jarray) 0;
1199 jint _bufferOffset = (jint) 0;
1200 jint _remaining;
1201 GLint *value = (GLint *) 0;
1202
1203 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1204 if (value == NULL) {
1205 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1206 value = (GLint *) (_valueBase + _bufferOffset);
1207 }
1208 glProgramUniform1iv(
1209 (GLuint)program,
1210 (GLint)location,
1211 (GLsizei)count,
1212 (GLint *)value
1213 );
1214 if (_array) {
1215 releasePointer(_env, _array, value, JNI_FALSE);
1216 }
1217}
1218
1219/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1220static void
1221android_glProgramUniform2iv__III_3II
1222 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1223 jint _exception = 0;
1224 const char * _exceptionType = NULL;
1225 const char * _exceptionMessage = NULL;
1226 GLint *value_base = (GLint *) 0;
1227 jint _remaining;
1228 GLint *value = (GLint *) 0;
1229
1230 if (!value_ref) {
1231 _exception = 1;
1232 _exceptionType = "java/lang/IllegalArgumentException";
1233 _exceptionMessage = "value == null";
1234 goto exit;
1235 }
1236 if (offset < 0) {
1237 _exception = 1;
1238 _exceptionType = "java/lang/IllegalArgumentException";
1239 _exceptionMessage = "offset < 0";
1240 goto exit;
1241 }
1242 _remaining = _env->GetArrayLength(value_ref) - offset;
1243 value_base = (GLint *)
1244 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1245 value = value_base + offset;
1246
1247 glProgramUniform2iv(
1248 (GLuint)program,
1249 (GLint)location,
1250 (GLsizei)count,
1251 (GLint *)value
1252 );
1253
1254exit:
1255 if (value_base) {
1256 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1257 JNI_ABORT);
1258 }
1259 if (_exception) {
1260 jniThrowException(_env, _exceptionType, _exceptionMessage);
1261 }
1262}
1263
1264/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1265static void
1266android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2
1267 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1268 jarray _array = (jarray) 0;
1269 jint _bufferOffset = (jint) 0;
1270 jint _remaining;
1271 GLint *value = (GLint *) 0;
1272
1273 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1274 if (value == NULL) {
1275 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1276 value = (GLint *) (_valueBase + _bufferOffset);
1277 }
1278 glProgramUniform2iv(
1279 (GLuint)program,
1280 (GLint)location,
1281 (GLsizei)count,
1282 (GLint *)value
1283 );
1284 if (_array) {
1285 releasePointer(_env, _array, value, JNI_FALSE);
1286 }
1287}
1288
1289/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1290static void
1291android_glProgramUniform3iv__III_3II
1292 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1293 jint _exception = 0;
1294 const char * _exceptionType = NULL;
1295 const char * _exceptionMessage = NULL;
1296 GLint *value_base = (GLint *) 0;
1297 jint _remaining;
1298 GLint *value = (GLint *) 0;
1299
1300 if (!value_ref) {
1301 _exception = 1;
1302 _exceptionType = "java/lang/IllegalArgumentException";
1303 _exceptionMessage = "value == null";
1304 goto exit;
1305 }
1306 if (offset < 0) {
1307 _exception = 1;
1308 _exceptionType = "java/lang/IllegalArgumentException";
1309 _exceptionMessage = "offset < 0";
1310 goto exit;
1311 }
1312 _remaining = _env->GetArrayLength(value_ref) - offset;
1313 value_base = (GLint *)
1314 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1315 value = value_base + offset;
1316
1317 glProgramUniform3iv(
1318 (GLuint)program,
1319 (GLint)location,
1320 (GLsizei)count,
1321 (GLint *)value
1322 );
1323
1324exit:
1325 if (value_base) {
1326 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1327 JNI_ABORT);
1328 }
1329 if (_exception) {
1330 jniThrowException(_env, _exceptionType, _exceptionMessage);
1331 }
1332}
1333
1334/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1335static void
1336android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2
1337 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1338 jarray _array = (jarray) 0;
1339 jint _bufferOffset = (jint) 0;
1340 jint _remaining;
1341 GLint *value = (GLint *) 0;
1342
1343 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1344 if (value == NULL) {
1345 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1346 value = (GLint *) (_valueBase + _bufferOffset);
1347 }
1348 glProgramUniform3iv(
1349 (GLuint)program,
1350 (GLint)location,
1351 (GLsizei)count,
1352 (GLint *)value
1353 );
1354 if (_array) {
1355 releasePointer(_env, _array, value, JNI_FALSE);
1356 }
1357}
1358
1359/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1360static void
1361android_glProgramUniform4iv__III_3II
1362 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1363 jint _exception = 0;
1364 const char * _exceptionType = NULL;
1365 const char * _exceptionMessage = NULL;
1366 GLint *value_base = (GLint *) 0;
1367 jint _remaining;
1368 GLint *value = (GLint *) 0;
1369
1370 if (!value_ref) {
1371 _exception = 1;
1372 _exceptionType = "java/lang/IllegalArgumentException";
1373 _exceptionMessage = "value == null";
1374 goto exit;
1375 }
1376 if (offset < 0) {
1377 _exception = 1;
1378 _exceptionType = "java/lang/IllegalArgumentException";
1379 _exceptionMessage = "offset < 0";
1380 goto exit;
1381 }
1382 _remaining = _env->GetArrayLength(value_ref) - offset;
1383 value_base = (GLint *)
1384 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1385 value = value_base + offset;
1386
1387 glProgramUniform4iv(
1388 (GLuint)program,
1389 (GLint)location,
1390 (GLsizei)count,
1391 (GLint *)value
1392 );
1393
1394exit:
1395 if (value_base) {
1396 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1397 JNI_ABORT);
1398 }
1399 if (_exception) {
1400 jniThrowException(_env, _exceptionType, _exceptionMessage);
1401 }
1402}
1403
1404/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1405static void
1406android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2
1407 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1408 jarray _array = (jarray) 0;
1409 jint _bufferOffset = (jint) 0;
1410 jint _remaining;
1411 GLint *value = (GLint *) 0;
1412
1413 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1414 if (value == NULL) {
1415 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1416 value = (GLint *) (_valueBase + _bufferOffset);
1417 }
1418 glProgramUniform4iv(
1419 (GLuint)program,
1420 (GLint)location,
1421 (GLsizei)count,
1422 (GLint *)value
1423 );
1424 if (_array) {
1425 releasePointer(_env, _array, value, JNI_FALSE);
1426 }
1427}
1428
1429/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1430static void
1431android_glProgramUniform1uiv__III_3II
1432 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1433 jint _exception = 0;
1434 const char * _exceptionType = NULL;
1435 const char * _exceptionMessage = NULL;
1436 GLuint *value_base = (GLuint *) 0;
1437 jint _remaining;
1438 GLuint *value = (GLuint *) 0;
1439
1440 if (!value_ref) {
1441 _exception = 1;
1442 _exceptionType = "java/lang/IllegalArgumentException";
1443 _exceptionMessage = "value == null";
1444 goto exit;
1445 }
1446 if (offset < 0) {
1447 _exception = 1;
1448 _exceptionType = "java/lang/IllegalArgumentException";
1449 _exceptionMessage = "offset < 0";
1450 goto exit;
1451 }
1452 _remaining = _env->GetArrayLength(value_ref) - offset;
1453 value_base = (GLuint *)
1454 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1455 value = value_base + offset;
1456
1457 glProgramUniform1uiv(
1458 (GLuint)program,
1459 (GLint)location,
1460 (GLsizei)count,
1461 (GLuint *)value
1462 );
1463
1464exit:
1465 if (value_base) {
1466 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1467 JNI_ABORT);
1468 }
1469 if (_exception) {
1470 jniThrowException(_env, _exceptionType, _exceptionMessage);
1471 }
1472}
1473
1474/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1475static void
1476android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2
1477 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1478 jarray _array = (jarray) 0;
1479 jint _bufferOffset = (jint) 0;
1480 jint _remaining;
1481 GLuint *value = (GLuint *) 0;
1482
1483 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1484 if (value == NULL) {
1485 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1486 value = (GLuint *) (_valueBase + _bufferOffset);
1487 }
1488 glProgramUniform1uiv(
1489 (GLuint)program,
1490 (GLint)location,
1491 (GLsizei)count,
1492 (GLuint *)value
1493 );
1494 if (_array) {
1495 releasePointer(_env, _array, value, JNI_FALSE);
1496 }
1497}
1498
1499/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1500static void
1501android_glProgramUniform2uiv__III_3II
1502 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1503 jint _exception = 0;
1504 const char * _exceptionType = NULL;
1505 const char * _exceptionMessage = NULL;
1506 GLuint *value_base = (GLuint *) 0;
1507 jint _remaining;
1508 GLuint *value = (GLuint *) 0;
1509
1510 if (!value_ref) {
1511 _exception = 1;
1512 _exceptionType = "java/lang/IllegalArgumentException";
1513 _exceptionMessage = "value == null";
1514 goto exit;
1515 }
1516 if (offset < 0) {
1517 _exception = 1;
1518 _exceptionType = "java/lang/IllegalArgumentException";
1519 _exceptionMessage = "offset < 0";
1520 goto exit;
1521 }
1522 _remaining = _env->GetArrayLength(value_ref) - offset;
1523 value_base = (GLuint *)
1524 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1525 value = value_base + offset;
1526
1527 glProgramUniform2uiv(
1528 (GLuint)program,
1529 (GLint)location,
1530 (GLsizei)count,
1531 (GLuint *)value
1532 );
1533
1534exit:
1535 if (value_base) {
1536 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1537 JNI_ABORT);
1538 }
1539 if (_exception) {
1540 jniThrowException(_env, _exceptionType, _exceptionMessage);
1541 }
1542}
1543
1544/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1545static void
1546android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2
1547 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1548 jarray _array = (jarray) 0;
1549 jint _bufferOffset = (jint) 0;
1550 jint _remaining;
1551 GLuint *value = (GLuint *) 0;
1552
1553 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1554 if (value == NULL) {
1555 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1556 value = (GLuint *) (_valueBase + _bufferOffset);
1557 }
1558 glProgramUniform2uiv(
1559 (GLuint)program,
1560 (GLint)location,
1561 (GLsizei)count,
1562 (GLuint *)value
1563 );
1564 if (_array) {
1565 releasePointer(_env, _array, value, JNI_FALSE);
1566 }
1567}
1568
1569/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1570static void
1571android_glProgramUniform3uiv__III_3II
1572 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1573 jint _exception = 0;
1574 const char * _exceptionType = NULL;
1575 const char * _exceptionMessage = NULL;
1576 GLuint *value_base = (GLuint *) 0;
1577 jint _remaining;
1578 GLuint *value = (GLuint *) 0;
1579
1580 if (!value_ref) {
1581 _exception = 1;
1582 _exceptionType = "java/lang/IllegalArgumentException";
1583 _exceptionMessage = "value == null";
1584 goto exit;
1585 }
1586 if (offset < 0) {
1587 _exception = 1;
1588 _exceptionType = "java/lang/IllegalArgumentException";
1589 _exceptionMessage = "offset < 0";
1590 goto exit;
1591 }
1592 _remaining = _env->GetArrayLength(value_ref) - offset;
1593 value_base = (GLuint *)
1594 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1595 value = value_base + offset;
1596
1597 glProgramUniform3uiv(
1598 (GLuint)program,
1599 (GLint)location,
1600 (GLsizei)count,
1601 (GLuint *)value
1602 );
1603
1604exit:
1605 if (value_base) {
1606 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1607 JNI_ABORT);
1608 }
1609 if (_exception) {
1610 jniThrowException(_env, _exceptionType, _exceptionMessage);
1611 }
1612}
1613
1614/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1615static void
1616android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2
1617 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1618 jarray _array = (jarray) 0;
1619 jint _bufferOffset = (jint) 0;
1620 jint _remaining;
1621 GLuint *value = (GLuint *) 0;
1622
1623 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1624 if (value == NULL) {
1625 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1626 value = (GLuint *) (_valueBase + _bufferOffset);
1627 }
1628 glProgramUniform3uiv(
1629 (GLuint)program,
1630 (GLint)location,
1631 (GLsizei)count,
1632 (GLuint *)value
1633 );
1634 if (_array) {
1635 releasePointer(_env, _array, value, JNI_FALSE);
1636 }
1637}
1638
1639/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1640static void
1641android_glProgramUniform4uiv__III_3II
1642 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1643 jint _exception = 0;
1644 const char * _exceptionType = NULL;
1645 const char * _exceptionMessage = NULL;
1646 GLuint *value_base = (GLuint *) 0;
1647 jint _remaining;
1648 GLuint *value = (GLuint *) 0;
1649
1650 if (!value_ref) {
1651 _exception = 1;
1652 _exceptionType = "java/lang/IllegalArgumentException";
1653 _exceptionMessage = "value == null";
1654 goto exit;
1655 }
1656 if (offset < 0) {
1657 _exception = 1;
1658 _exceptionType = "java/lang/IllegalArgumentException";
1659 _exceptionMessage = "offset < 0";
1660 goto exit;
1661 }
1662 _remaining = _env->GetArrayLength(value_ref) - offset;
1663 value_base = (GLuint *)
1664 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1665 value = value_base + offset;
1666
1667 glProgramUniform4uiv(
1668 (GLuint)program,
1669 (GLint)location,
1670 (GLsizei)count,
1671 (GLuint *)value
1672 );
1673
1674exit:
1675 if (value_base) {
1676 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1677 JNI_ABORT);
1678 }
1679 if (_exception) {
1680 jniThrowException(_env, _exceptionType, _exceptionMessage);
1681 }
1682}
1683
1684/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1685static void
1686android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2
1687 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1688 jarray _array = (jarray) 0;
1689 jint _bufferOffset = (jint) 0;
1690 jint _remaining;
1691 GLuint *value = (GLuint *) 0;
1692
1693 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1694 if (value == NULL) {
1695 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1696 value = (GLuint *) (_valueBase + _bufferOffset);
1697 }
1698 glProgramUniform4uiv(
1699 (GLuint)program,
1700 (GLint)location,
1701 (GLsizei)count,
1702 (GLuint *)value
1703 );
1704 if (_array) {
1705 releasePointer(_env, _array, value, JNI_FALSE);
1706 }
1707}
1708
1709/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1710static void
1711android_glProgramUniform1fv__III_3FI
1712 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1713 jint _exception = 0;
1714 const char * _exceptionType = NULL;
1715 const char * _exceptionMessage = NULL;
1716 GLfloat *value_base = (GLfloat *) 0;
1717 jint _remaining;
1718 GLfloat *value = (GLfloat *) 0;
1719
1720 if (!value_ref) {
1721 _exception = 1;
1722 _exceptionType = "java/lang/IllegalArgumentException";
1723 _exceptionMessage = "value == null";
1724 goto exit;
1725 }
1726 if (offset < 0) {
1727 _exception = 1;
1728 _exceptionType = "java/lang/IllegalArgumentException";
1729 _exceptionMessage = "offset < 0";
1730 goto exit;
1731 }
1732 _remaining = _env->GetArrayLength(value_ref) - offset;
1733 value_base = (GLfloat *)
1734 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1735 value = value_base + offset;
1736
1737 glProgramUniform1fv(
1738 (GLuint)program,
1739 (GLint)location,
1740 (GLsizei)count,
1741 (GLfloat *)value
1742 );
1743
1744exit:
1745 if (value_base) {
1746 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1747 JNI_ABORT);
1748 }
1749 if (_exception) {
1750 jniThrowException(_env, _exceptionType, _exceptionMessage);
1751 }
1752}
1753
1754/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1755static void
1756android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2
1757 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1758 jarray _array = (jarray) 0;
1759 jint _bufferOffset = (jint) 0;
1760 jint _remaining;
1761 GLfloat *value = (GLfloat *) 0;
1762
1763 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1764 if (value == NULL) {
1765 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1766 value = (GLfloat *) (_valueBase + _bufferOffset);
1767 }
1768 glProgramUniform1fv(
1769 (GLuint)program,
1770 (GLint)location,
1771 (GLsizei)count,
1772 (GLfloat *)value
1773 );
1774 if (_array) {
1775 releasePointer(_env, _array, value, JNI_FALSE);
1776 }
1777}
1778
1779/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1780static void
1781android_glProgramUniform2fv__III_3FI
1782 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1783 jint _exception = 0;
1784 const char * _exceptionType = NULL;
1785 const char * _exceptionMessage = NULL;
1786 GLfloat *value_base = (GLfloat *) 0;
1787 jint _remaining;
1788 GLfloat *value = (GLfloat *) 0;
1789
1790 if (!value_ref) {
1791 _exception = 1;
1792 _exceptionType = "java/lang/IllegalArgumentException";
1793 _exceptionMessage = "value == null";
1794 goto exit;
1795 }
1796 if (offset < 0) {
1797 _exception = 1;
1798 _exceptionType = "java/lang/IllegalArgumentException";
1799 _exceptionMessage = "offset < 0";
1800 goto exit;
1801 }
1802 _remaining = _env->GetArrayLength(value_ref) - offset;
1803 value_base = (GLfloat *)
1804 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1805 value = value_base + offset;
1806
1807 glProgramUniform2fv(
1808 (GLuint)program,
1809 (GLint)location,
1810 (GLsizei)count,
1811 (GLfloat *)value
1812 );
1813
1814exit:
1815 if (value_base) {
1816 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1817 JNI_ABORT);
1818 }
1819 if (_exception) {
1820 jniThrowException(_env, _exceptionType, _exceptionMessage);
1821 }
1822}
1823
1824/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1825static void
1826android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2
1827 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1828 jarray _array = (jarray) 0;
1829 jint _bufferOffset = (jint) 0;
1830 jint _remaining;
1831 GLfloat *value = (GLfloat *) 0;
1832
1833 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1834 if (value == NULL) {
1835 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1836 value = (GLfloat *) (_valueBase + _bufferOffset);
1837 }
1838 glProgramUniform2fv(
1839 (GLuint)program,
1840 (GLint)location,
1841 (GLsizei)count,
1842 (GLfloat *)value
1843 );
1844 if (_array) {
1845 releasePointer(_env, _array, value, JNI_FALSE);
1846 }
1847}
1848
1849/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1850static void
1851android_glProgramUniform3fv__III_3FI
1852 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1853 jint _exception = 0;
1854 const char * _exceptionType = NULL;
1855 const char * _exceptionMessage = NULL;
1856 GLfloat *value_base = (GLfloat *) 0;
1857 jint _remaining;
1858 GLfloat *value = (GLfloat *) 0;
1859
1860 if (!value_ref) {
1861 _exception = 1;
1862 _exceptionType = "java/lang/IllegalArgumentException";
1863 _exceptionMessage = "value == null";
1864 goto exit;
1865 }
1866 if (offset < 0) {
1867 _exception = 1;
1868 _exceptionType = "java/lang/IllegalArgumentException";
1869 _exceptionMessage = "offset < 0";
1870 goto exit;
1871 }
1872 _remaining = _env->GetArrayLength(value_ref) - offset;
1873 value_base = (GLfloat *)
1874 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1875 value = value_base + offset;
1876
1877 glProgramUniform3fv(
1878 (GLuint)program,
1879 (GLint)location,
1880 (GLsizei)count,
1881 (GLfloat *)value
1882 );
1883
1884exit:
1885 if (value_base) {
1886 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1887 JNI_ABORT);
1888 }
1889 if (_exception) {
1890 jniThrowException(_env, _exceptionType, _exceptionMessage);
1891 }
1892}
1893
1894/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1895static void
1896android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2
1897 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1898 jarray _array = (jarray) 0;
1899 jint _bufferOffset = (jint) 0;
1900 jint _remaining;
1901 GLfloat *value = (GLfloat *) 0;
1902
1903 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1904 if (value == NULL) {
1905 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1906 value = (GLfloat *) (_valueBase + _bufferOffset);
1907 }
1908 glProgramUniform3fv(
1909 (GLuint)program,
1910 (GLint)location,
1911 (GLsizei)count,
1912 (GLfloat *)value
1913 );
1914 if (_array) {
1915 releasePointer(_env, _array, value, JNI_FALSE);
1916 }
1917}
1918
1919/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1920static void
1921android_glProgramUniform4fv__III_3FI
1922 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1923 jint _exception = 0;
1924 const char * _exceptionType = NULL;
1925 const char * _exceptionMessage = NULL;
1926 GLfloat *value_base = (GLfloat *) 0;
1927 jint _remaining;
1928 GLfloat *value = (GLfloat *) 0;
1929
1930 if (!value_ref) {
1931 _exception = 1;
1932 _exceptionType = "java/lang/IllegalArgumentException";
1933 _exceptionMessage = "value == null";
1934 goto exit;
1935 }
1936 if (offset < 0) {
1937 _exception = 1;
1938 _exceptionType = "java/lang/IllegalArgumentException";
1939 _exceptionMessage = "offset < 0";
1940 goto exit;
1941 }
1942 _remaining = _env->GetArrayLength(value_ref) - offset;
1943 value_base = (GLfloat *)
1944 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1945 value = value_base + offset;
1946
1947 glProgramUniform4fv(
1948 (GLuint)program,
1949 (GLint)location,
1950 (GLsizei)count,
1951 (GLfloat *)value
1952 );
1953
1954exit:
1955 if (value_base) {
1956 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1957 JNI_ABORT);
1958 }
1959 if (_exception) {
1960 jniThrowException(_env, _exceptionType, _exceptionMessage);
1961 }
1962}
1963
1964/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1965static void
1966android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2
1967 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
1968 jarray _array = (jarray) 0;
1969 jint _bufferOffset = (jint) 0;
1970 jint _remaining;
1971 GLfloat *value = (GLfloat *) 0;
1972
1973 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1974 if (value == NULL) {
1975 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1976 value = (GLfloat *) (_valueBase + _bufferOffset);
1977 }
1978 glProgramUniform4fv(
1979 (GLuint)program,
1980 (GLint)location,
1981 (GLsizei)count,
1982 (GLfloat *)value
1983 );
1984 if (_array) {
1985 releasePointer(_env, _array, value, JNI_FALSE);
1986 }
1987}
1988
1989/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1990static void
1991android_glProgramUniformMatrix2fv__IIIZ_3FI
1992 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1993 jint _exception = 0;
1994 const char * _exceptionType = NULL;
1995 const char * _exceptionMessage = NULL;
1996 GLfloat *value_base = (GLfloat *) 0;
1997 jint _remaining;
1998 GLfloat *value = (GLfloat *) 0;
1999
2000 if (!value_ref) {
2001 _exception = 1;
2002 _exceptionType = "java/lang/IllegalArgumentException";
2003 _exceptionMessage = "value == null";
2004 goto exit;
2005 }
2006 if (offset < 0) {
2007 _exception = 1;
2008 _exceptionType = "java/lang/IllegalArgumentException";
2009 _exceptionMessage = "offset < 0";
2010 goto exit;
2011 }
2012 _remaining = _env->GetArrayLength(value_ref) - offset;
2013 value_base = (GLfloat *)
2014 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2015 value = value_base + offset;
2016
2017 glProgramUniformMatrix2fv(
2018 (GLuint)program,
2019 (GLint)location,
2020 (GLsizei)count,
2021 (GLboolean)transpose,
2022 (GLfloat *)value
2023 );
2024
2025exit:
2026 if (value_base) {
2027 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2028 JNI_ABORT);
2029 }
2030 if (_exception) {
2031 jniThrowException(_env, _exceptionType, _exceptionMessage);
2032 }
2033}
2034
2035/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2036static void
2037android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2
2038 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2039 jarray _array = (jarray) 0;
2040 jint _bufferOffset = (jint) 0;
2041 jint _remaining;
2042 GLfloat *value = (GLfloat *) 0;
2043
2044 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2045 if (value == NULL) {
2046 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2047 value = (GLfloat *) (_valueBase + _bufferOffset);
2048 }
2049 glProgramUniformMatrix2fv(
2050 (GLuint)program,
2051 (GLint)location,
2052 (GLsizei)count,
2053 (GLboolean)transpose,
2054 (GLfloat *)value
2055 );
2056 if (_array) {
2057 releasePointer(_env, _array, value, JNI_FALSE);
2058 }
2059}
2060
2061/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2062static void
2063android_glProgramUniformMatrix3fv__IIIZ_3FI
2064 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2065 jint _exception = 0;
2066 const char * _exceptionType = NULL;
2067 const char * _exceptionMessage = NULL;
2068 GLfloat *value_base = (GLfloat *) 0;
2069 jint _remaining;
2070 GLfloat *value = (GLfloat *) 0;
2071
2072 if (!value_ref) {
2073 _exception = 1;
2074 _exceptionType = "java/lang/IllegalArgumentException";
2075 _exceptionMessage = "value == null";
2076 goto exit;
2077 }
2078 if (offset < 0) {
2079 _exception = 1;
2080 _exceptionType = "java/lang/IllegalArgumentException";
2081 _exceptionMessage = "offset < 0";
2082 goto exit;
2083 }
2084 _remaining = _env->GetArrayLength(value_ref) - offset;
2085 value_base = (GLfloat *)
2086 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2087 value = value_base + offset;
2088
2089 glProgramUniformMatrix3fv(
2090 (GLuint)program,
2091 (GLint)location,
2092 (GLsizei)count,
2093 (GLboolean)transpose,
2094 (GLfloat *)value
2095 );
2096
2097exit:
2098 if (value_base) {
2099 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2100 JNI_ABORT);
2101 }
2102 if (_exception) {
2103 jniThrowException(_env, _exceptionType, _exceptionMessage);
2104 }
2105}
2106
2107/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2108static void
2109android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2
2110 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2111 jarray _array = (jarray) 0;
2112 jint _bufferOffset = (jint) 0;
2113 jint _remaining;
2114 GLfloat *value = (GLfloat *) 0;
2115
2116 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2117 if (value == NULL) {
2118 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2119 value = (GLfloat *) (_valueBase + _bufferOffset);
2120 }
2121 glProgramUniformMatrix3fv(
2122 (GLuint)program,
2123 (GLint)location,
2124 (GLsizei)count,
2125 (GLboolean)transpose,
2126 (GLfloat *)value
2127 );
2128 if (_array) {
2129 releasePointer(_env, _array, value, JNI_FALSE);
2130 }
2131}
2132
2133/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2134static void
2135android_glProgramUniformMatrix4fv__IIIZ_3FI
2136 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2137 jint _exception = 0;
2138 const char * _exceptionType = NULL;
2139 const char * _exceptionMessage = NULL;
2140 GLfloat *value_base = (GLfloat *) 0;
2141 jint _remaining;
2142 GLfloat *value = (GLfloat *) 0;
2143
2144 if (!value_ref) {
2145 _exception = 1;
2146 _exceptionType = "java/lang/IllegalArgumentException";
2147 _exceptionMessage = "value == null";
2148 goto exit;
2149 }
2150 if (offset < 0) {
2151 _exception = 1;
2152 _exceptionType = "java/lang/IllegalArgumentException";
2153 _exceptionMessage = "offset < 0";
2154 goto exit;
2155 }
2156 _remaining = _env->GetArrayLength(value_ref) - offset;
2157 value_base = (GLfloat *)
2158 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2159 value = value_base + offset;
2160
2161 glProgramUniformMatrix4fv(
2162 (GLuint)program,
2163 (GLint)location,
2164 (GLsizei)count,
2165 (GLboolean)transpose,
2166 (GLfloat *)value
2167 );
2168
2169exit:
2170 if (value_base) {
2171 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2172 JNI_ABORT);
2173 }
2174 if (_exception) {
2175 jniThrowException(_env, _exceptionType, _exceptionMessage);
2176 }
2177}
2178
2179/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2180static void
2181android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2
2182 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2183 jarray _array = (jarray) 0;
2184 jint _bufferOffset = (jint) 0;
2185 jint _remaining;
2186 GLfloat *value = (GLfloat *) 0;
2187
2188 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2189 if (value == NULL) {
2190 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2191 value = (GLfloat *) (_valueBase + _bufferOffset);
2192 }
2193 glProgramUniformMatrix4fv(
2194 (GLuint)program,
2195 (GLint)location,
2196 (GLsizei)count,
2197 (GLboolean)transpose,
2198 (GLfloat *)value
2199 );
2200 if (_array) {
2201 releasePointer(_env, _array, value, JNI_FALSE);
2202 }
2203}
2204
2205/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2206static void
2207android_glProgramUniformMatrix2x3fv__IIIZ_3FI
2208 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2209 jint _exception = 0;
2210 const char * _exceptionType = NULL;
2211 const char * _exceptionMessage = NULL;
2212 GLfloat *value_base = (GLfloat *) 0;
2213 jint _remaining;
2214 GLfloat *value = (GLfloat *) 0;
2215
2216 if (!value_ref) {
2217 _exception = 1;
2218 _exceptionType = "java/lang/IllegalArgumentException";
2219 _exceptionMessage = "value == null";
2220 goto exit;
2221 }
2222 if (offset < 0) {
2223 _exception = 1;
2224 _exceptionType = "java/lang/IllegalArgumentException";
2225 _exceptionMessage = "offset < 0";
2226 goto exit;
2227 }
2228 _remaining = _env->GetArrayLength(value_ref) - offset;
2229 value_base = (GLfloat *)
2230 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2231 value = value_base + offset;
2232
2233 glProgramUniformMatrix2x3fv(
2234 (GLuint)program,
2235 (GLint)location,
2236 (GLsizei)count,
2237 (GLboolean)transpose,
2238 (GLfloat *)value
2239 );
2240
2241exit:
2242 if (value_base) {
2243 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2244 JNI_ABORT);
2245 }
2246 if (_exception) {
2247 jniThrowException(_env, _exceptionType, _exceptionMessage);
2248 }
2249}
2250
2251/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2252static void
2253android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2
2254 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2255 jarray _array = (jarray) 0;
2256 jint _bufferOffset = (jint) 0;
2257 jint _remaining;
2258 GLfloat *value = (GLfloat *) 0;
2259
2260 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2261 if (value == NULL) {
2262 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2263 value = (GLfloat *) (_valueBase + _bufferOffset);
2264 }
2265 glProgramUniformMatrix2x3fv(
2266 (GLuint)program,
2267 (GLint)location,
2268 (GLsizei)count,
2269 (GLboolean)transpose,
2270 (GLfloat *)value
2271 );
2272 if (_array) {
2273 releasePointer(_env, _array, value, JNI_FALSE);
2274 }
2275}
2276
2277/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2278static void
2279android_glProgramUniformMatrix3x2fv__IIIZ_3FI
2280 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2281 jint _exception = 0;
2282 const char * _exceptionType = NULL;
2283 const char * _exceptionMessage = NULL;
2284 GLfloat *value_base = (GLfloat *) 0;
2285 jint _remaining;
2286 GLfloat *value = (GLfloat *) 0;
2287
2288 if (!value_ref) {
2289 _exception = 1;
2290 _exceptionType = "java/lang/IllegalArgumentException";
2291 _exceptionMessage = "value == null";
2292 goto exit;
2293 }
2294 if (offset < 0) {
2295 _exception = 1;
2296 _exceptionType = "java/lang/IllegalArgumentException";
2297 _exceptionMessage = "offset < 0";
2298 goto exit;
2299 }
2300 _remaining = _env->GetArrayLength(value_ref) - offset;
2301 value_base = (GLfloat *)
2302 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2303 value = value_base + offset;
2304
2305 glProgramUniformMatrix3x2fv(
2306 (GLuint)program,
2307 (GLint)location,
2308 (GLsizei)count,
2309 (GLboolean)transpose,
2310 (GLfloat *)value
2311 );
2312
2313exit:
2314 if (value_base) {
2315 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2316 JNI_ABORT);
2317 }
2318 if (_exception) {
2319 jniThrowException(_env, _exceptionType, _exceptionMessage);
2320 }
2321}
2322
2323/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2324static void
2325android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2
2326 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2327 jarray _array = (jarray) 0;
2328 jint _bufferOffset = (jint) 0;
2329 jint _remaining;
2330 GLfloat *value = (GLfloat *) 0;
2331
2332 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2333 if (value == NULL) {
2334 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2335 value = (GLfloat *) (_valueBase + _bufferOffset);
2336 }
2337 glProgramUniformMatrix3x2fv(
2338 (GLuint)program,
2339 (GLint)location,
2340 (GLsizei)count,
2341 (GLboolean)transpose,
2342 (GLfloat *)value
2343 );
2344 if (_array) {
2345 releasePointer(_env, _array, value, JNI_FALSE);
2346 }
2347}
2348
2349/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2350static void
2351android_glProgramUniformMatrix2x4fv__IIIZ_3FI
2352 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2353 jint _exception = 0;
2354 const char * _exceptionType = NULL;
2355 const char * _exceptionMessage = NULL;
2356 GLfloat *value_base = (GLfloat *) 0;
2357 jint _remaining;
2358 GLfloat *value = (GLfloat *) 0;
2359
2360 if (!value_ref) {
2361 _exception = 1;
2362 _exceptionType = "java/lang/IllegalArgumentException";
2363 _exceptionMessage = "value == null";
2364 goto exit;
2365 }
2366 if (offset < 0) {
2367 _exception = 1;
2368 _exceptionType = "java/lang/IllegalArgumentException";
2369 _exceptionMessage = "offset < 0";
2370 goto exit;
2371 }
2372 _remaining = _env->GetArrayLength(value_ref) - offset;
2373 value_base = (GLfloat *)
2374 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2375 value = value_base + offset;
2376
2377 glProgramUniformMatrix2x4fv(
2378 (GLuint)program,
2379 (GLint)location,
2380 (GLsizei)count,
2381 (GLboolean)transpose,
2382 (GLfloat *)value
2383 );
2384
2385exit:
2386 if (value_base) {
2387 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2388 JNI_ABORT);
2389 }
2390 if (_exception) {
2391 jniThrowException(_env, _exceptionType, _exceptionMessage);
2392 }
2393}
2394
2395/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2396static void
2397android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2
2398 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2399 jarray _array = (jarray) 0;
2400 jint _bufferOffset = (jint) 0;
2401 jint _remaining;
2402 GLfloat *value = (GLfloat *) 0;
2403
2404 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2405 if (value == NULL) {
2406 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2407 value = (GLfloat *) (_valueBase + _bufferOffset);
2408 }
2409 glProgramUniformMatrix2x4fv(
2410 (GLuint)program,
2411 (GLint)location,
2412 (GLsizei)count,
2413 (GLboolean)transpose,
2414 (GLfloat *)value
2415 );
2416 if (_array) {
2417 releasePointer(_env, _array, value, JNI_FALSE);
2418 }
2419}
2420
2421/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2422static void
2423android_glProgramUniformMatrix4x2fv__IIIZ_3FI
2424 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2425 jint _exception = 0;
2426 const char * _exceptionType = NULL;
2427 const char * _exceptionMessage = NULL;
2428 GLfloat *value_base = (GLfloat *) 0;
2429 jint _remaining;
2430 GLfloat *value = (GLfloat *) 0;
2431
2432 if (!value_ref) {
2433 _exception = 1;
2434 _exceptionType = "java/lang/IllegalArgumentException";
2435 _exceptionMessage = "value == null";
2436 goto exit;
2437 }
2438 if (offset < 0) {
2439 _exception = 1;
2440 _exceptionType = "java/lang/IllegalArgumentException";
2441 _exceptionMessage = "offset < 0";
2442 goto exit;
2443 }
2444 _remaining = _env->GetArrayLength(value_ref) - offset;
2445 value_base = (GLfloat *)
2446 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2447 value = value_base + offset;
2448
2449 glProgramUniformMatrix4x2fv(
2450 (GLuint)program,
2451 (GLint)location,
2452 (GLsizei)count,
2453 (GLboolean)transpose,
2454 (GLfloat *)value
2455 );
2456
2457exit:
2458 if (value_base) {
2459 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2460 JNI_ABORT);
2461 }
2462 if (_exception) {
2463 jniThrowException(_env, _exceptionType, _exceptionMessage);
2464 }
2465}
2466
2467/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2468static void
2469android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2
2470 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2471 jarray _array = (jarray) 0;
2472 jint _bufferOffset = (jint) 0;
2473 jint _remaining;
2474 GLfloat *value = (GLfloat *) 0;
2475
2476 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2477 if (value == NULL) {
2478 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2479 value = (GLfloat *) (_valueBase + _bufferOffset);
2480 }
2481 glProgramUniformMatrix4x2fv(
2482 (GLuint)program,
2483 (GLint)location,
2484 (GLsizei)count,
2485 (GLboolean)transpose,
2486 (GLfloat *)value
2487 );
2488 if (_array) {
2489 releasePointer(_env, _array, value, JNI_FALSE);
2490 }
2491}
2492
2493/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2494static void
2495android_glProgramUniformMatrix3x4fv__IIIZ_3FI
2496 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2497 jint _exception = 0;
2498 const char * _exceptionType = NULL;
2499 const char * _exceptionMessage = NULL;
2500 GLfloat *value_base = (GLfloat *) 0;
2501 jint _remaining;
2502 GLfloat *value = (GLfloat *) 0;
2503
2504 if (!value_ref) {
2505 _exception = 1;
2506 _exceptionType = "java/lang/IllegalArgumentException";
2507 _exceptionMessage = "value == null";
2508 goto exit;
2509 }
2510 if (offset < 0) {
2511 _exception = 1;
2512 _exceptionType = "java/lang/IllegalArgumentException";
2513 _exceptionMessage = "offset < 0";
2514 goto exit;
2515 }
2516 _remaining = _env->GetArrayLength(value_ref) - offset;
2517 value_base = (GLfloat *)
2518 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2519 value = value_base + offset;
2520
2521 glProgramUniformMatrix3x4fv(
2522 (GLuint)program,
2523 (GLint)location,
2524 (GLsizei)count,
2525 (GLboolean)transpose,
2526 (GLfloat *)value
2527 );
2528
2529exit:
2530 if (value_base) {
2531 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2532 JNI_ABORT);
2533 }
2534 if (_exception) {
2535 jniThrowException(_env, _exceptionType, _exceptionMessage);
2536 }
2537}
2538
2539/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2540static void
2541android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2
2542 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2543 jarray _array = (jarray) 0;
2544 jint _bufferOffset = (jint) 0;
2545 jint _remaining;
2546 GLfloat *value = (GLfloat *) 0;
2547
2548 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2549 if (value == NULL) {
2550 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2551 value = (GLfloat *) (_valueBase + _bufferOffset);
2552 }
2553 glProgramUniformMatrix3x4fv(
2554 (GLuint)program,
2555 (GLint)location,
2556 (GLsizei)count,
2557 (GLboolean)transpose,
2558 (GLfloat *)value
2559 );
2560 if (_array) {
2561 releasePointer(_env, _array, value, JNI_FALSE);
2562 }
2563}
2564
2565/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2566static void
2567android_glProgramUniformMatrix4x3fv__IIIZ_3FI
2568 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2569 jint _exception = 0;
2570 const char * _exceptionType = NULL;
2571 const char * _exceptionMessage = NULL;
2572 GLfloat *value_base = (GLfloat *) 0;
2573 jint _remaining;
2574 GLfloat *value = (GLfloat *) 0;
2575
2576 if (!value_ref) {
2577 _exception = 1;
2578 _exceptionType = "java/lang/IllegalArgumentException";
2579 _exceptionMessage = "value == null";
2580 goto exit;
2581 }
2582 if (offset < 0) {
2583 _exception = 1;
2584 _exceptionType = "java/lang/IllegalArgumentException";
2585 _exceptionMessage = "offset < 0";
2586 goto exit;
2587 }
2588 _remaining = _env->GetArrayLength(value_ref) - offset;
2589 value_base = (GLfloat *)
2590 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2591 value = value_base + offset;
2592
2593 glProgramUniformMatrix4x3fv(
2594 (GLuint)program,
2595 (GLint)location,
2596 (GLsizei)count,
2597 (GLboolean)transpose,
2598 (GLfloat *)value
2599 );
2600
2601exit:
2602 if (value_base) {
2603 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2604 JNI_ABORT);
2605 }
2606 if (_exception) {
2607 jniThrowException(_env, _exceptionType, _exceptionMessage);
2608 }
2609}
2610
2611/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2612static void
2613android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2
2614 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
2615 jarray _array = (jarray) 0;
2616 jint _bufferOffset = (jint) 0;
2617 jint _remaining;
2618 GLfloat *value = (GLfloat *) 0;
2619
2620 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2621 if (value == NULL) {
2622 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2623 value = (GLfloat *) (_valueBase + _bufferOffset);
2624 }
2625 glProgramUniformMatrix4x3fv(
2626 (GLuint)program,
2627 (GLint)location,
2628 (GLsizei)count,
2629 (GLboolean)transpose,
2630 (GLfloat *)value
2631 );
2632 if (_array) {
2633 releasePointer(_env, _array, value, JNI_FALSE);
2634 }
2635}
2636
2637/* void glValidateProgramPipeline ( GLuint pipeline ) */
2638static void
2639android_glValidateProgramPipeline__I
2640 (JNIEnv *_env, jobject _this, jint pipeline) {
2641 glValidateProgramPipeline(
2642 (GLuint)pipeline
2643 );
2644}
2645
2646#include <stdlib.h>
2647
2648/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
2649static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
2650 GLint infoLen = 0;
2651 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
2652 if (!infoLen) {
2653 return _env->NewStringUTF("");
2654 }
2655 char* buf = (char*) malloc(infoLen);
2656 if (buf == NULL) {
2657 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
2658 return NULL;
2659 }
2660 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
2661 jstring result = _env->NewStringUTF(buf);
2662 free(buf);
2663 return result;
2664}
2665/* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */
2666static void
2667android_glBindImageTexture__IIIZIII
2668 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) {
2669 glBindImageTexture(
2670 (GLuint)unit,
2671 (GLuint)texture,
2672 (GLint)level,
2673 (GLboolean)layered,
2674 (GLint)layer,
2675 (GLenum)access,
2676 (GLenum)format
2677 );
2678}
2679
2680/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
2681static void
2682android_glGetBooleani_v__II_3ZI
2683 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) {
2684 jint _exception = 0;
2685 const char * _exceptionType = NULL;
2686 const char * _exceptionMessage = NULL;
2687 GLboolean *data_base = (GLboolean *) 0;
2688 jint _remaining;
2689 GLboolean *data = (GLboolean *) 0;
2690
2691 if (!data_ref) {
2692 _exception = 1;
2693 _exceptionType = "java/lang/IllegalArgumentException";
2694 _exceptionMessage = "data == null";
2695 goto exit;
2696 }
2697 if (offset < 0) {
2698 _exception = 1;
2699 _exceptionType = "java/lang/IllegalArgumentException";
2700 _exceptionMessage = "offset < 0";
2701 goto exit;
2702 }
2703 _remaining = _env->GetArrayLength(data_ref) - offset;
2704 data_base = (GLboolean *)
2705 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
2706 data = data_base + offset;
2707
2708 glGetBooleani_v(
2709 (GLenum)target,
2710 (GLuint)index,
2711 (GLboolean *)data
2712 );
2713
2714exit:
2715 if (data_base) {
2716 _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
2717 _exception ? JNI_ABORT: 0);
2718 }
2719 if (_exception) {
2720 jniThrowException(_env, _exceptionType, _exceptionMessage);
2721 }
2722}
2723
2724/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
2725static void
2726android_glGetBooleani_v__IILjava_nio_IntBuffer_2
2727 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
2728 jarray _array = (jarray) 0;
2729 jint _bufferOffset = (jint) 0;
2730 jint _remaining;
2731 GLboolean *data = (GLboolean *) 0;
2732
2733 data = (GLboolean *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
2734 if (data == NULL) {
2735 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2736 data = (GLboolean *) (_dataBase + _bufferOffset);
2737 }
2738 glGetBooleani_v(
2739 (GLenum)target,
2740 (GLuint)index,
2741 (GLboolean *)data
2742 );
2743 if (_array) {
2744 releasePointer(_env, _array, data, JNI_TRUE);
2745 }
2746}
2747
2748/* void glMemoryBarrier ( GLbitfield barriers ) */
2749static void
2750android_glMemoryBarrier__I
2751 (JNIEnv *_env, jobject _this, jint barriers) {
2752 glMemoryBarrier(
2753 (GLbitfield)barriers
2754 );
2755}
2756
2757/* void glMemoryBarrierByRegion ( GLbitfield barriers ) */
2758static void
2759android_glMemoryBarrierByRegion__I
2760 (JNIEnv *_env, jobject _this, jint barriers) {
2761 glMemoryBarrierByRegion(
2762 (GLbitfield)barriers
2763 );
2764}
2765
2766/* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */
2767static void
2768android_glTexStorage2DMultisample__IIIIIZ
2769 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) {
2770 glTexStorage2DMultisample(
2771 (GLenum)target,
2772 (GLsizei)samples,
2773 (GLenum)internalformat,
2774 (GLsizei)width,
2775 (GLsizei)height,
2776 (GLboolean)fixedsamplelocations
2777 );
2778}
2779
2780/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
2781static void
2782android_glGetMultisamplefv__II_3FI
2783 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) {
2784 jint _exception = 0;
2785 const char * _exceptionType = NULL;
2786 const char * _exceptionMessage = NULL;
2787 GLfloat *val_base = (GLfloat *) 0;
2788 jint _remaining;
2789 GLfloat *val = (GLfloat *) 0;
2790
2791 if (!val_ref) {
2792 _exception = 1;
2793 _exceptionType = "java/lang/IllegalArgumentException";
2794 _exceptionMessage = "val == null";
2795 goto exit;
2796 }
2797 if (offset < 0) {
2798 _exception = 1;
2799 _exceptionType = "java/lang/IllegalArgumentException";
2800 _exceptionMessage = "offset < 0";
2801 goto exit;
2802 }
2803 _remaining = _env->GetArrayLength(val_ref) - offset;
2804 val_base = (GLfloat *)
2805 _env->GetPrimitiveArrayCritical(val_ref, (jboolean *)0);
2806 val = val_base + offset;
2807
2808 glGetMultisamplefv(
2809 (GLenum)pname,
2810 (GLuint)index,
2811 (GLfloat *)val
2812 );
2813
2814exit:
2815 if (val_base) {
2816 _env->ReleasePrimitiveArrayCritical(val_ref, val_base,
2817 _exception ? JNI_ABORT: 0);
2818 }
2819 if (_exception) {
2820 jniThrowException(_env, _exceptionType, _exceptionMessage);
2821 }
2822}
2823
2824/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
2825static void
2826android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2
2827 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) {
2828 jarray _array = (jarray) 0;
2829 jint _bufferOffset = (jint) 0;
2830 jint _remaining;
2831 GLfloat *val = (GLfloat *) 0;
2832
2833 val = (GLfloat *)getPointer(_env, val_buf, &_array, &_remaining, &_bufferOffset);
2834 if (val == NULL) {
2835 char * _valBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2836 val = (GLfloat *) (_valBase + _bufferOffset);
2837 }
2838 glGetMultisamplefv(
2839 (GLenum)pname,
2840 (GLuint)index,
2841 (GLfloat *)val
2842 );
2843 if (_array) {
2844 releasePointer(_env, _array, val, JNI_TRUE);
2845 }
2846}
2847
2848/* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */
2849static void
2850android_glSampleMaski__II
2851 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) {
2852 glSampleMaski(
2853 (GLuint)maskNumber,
2854 (GLbitfield)mask
2855 );
2856}
2857
2858/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
2859static void
2860android_glGetTexLevelParameteriv__III_3II
2861 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) {
2862 jint _exception = 0;
2863 const char * _exceptionType = NULL;
2864 const char * _exceptionMessage = NULL;
2865 GLint *params_base = (GLint *) 0;
2866 jint _remaining;
2867 GLint *params = (GLint *) 0;
2868
2869 if (!params_ref) {
2870 _exception = 1;
2871 _exceptionType = "java/lang/IllegalArgumentException";
2872 _exceptionMessage = "params == null";
2873 goto exit;
2874 }
2875 if (offset < 0) {
2876 _exception = 1;
2877 _exceptionType = "java/lang/IllegalArgumentException";
2878 _exceptionMessage = "offset < 0";
2879 goto exit;
2880 }
2881 _remaining = _env->GetArrayLength(params_ref) - offset;
2882 params_base = (GLint *)
2883 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2884 params = params_base + offset;
2885
2886 glGetTexLevelParameteriv(
2887 (GLenum)target,
2888 (GLint)level,
2889 (GLenum)pname,
2890 (GLint *)params
2891 );
2892
2893exit:
2894 if (params_base) {
2895 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2896 _exception ? JNI_ABORT: 0);
2897 }
2898 if (_exception) {
2899 jniThrowException(_env, _exceptionType, _exceptionMessage);
2900 }
2901}
2902
2903/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
2904static void
2905android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2
2906 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
2907 jarray _array = (jarray) 0;
2908 jint _bufferOffset = (jint) 0;
2909 jint _remaining;
2910 GLint *params = (GLint *) 0;
2911
2912 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2913 if (params == NULL) {
2914 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2915 params = (GLint *) (_paramsBase + _bufferOffset);
2916 }
2917 glGetTexLevelParameteriv(
2918 (GLenum)target,
2919 (GLint)level,
2920 (GLenum)pname,
2921 (GLint *)params
2922 );
2923 if (_array) {
2924 releasePointer(_env, _array, params, JNI_TRUE);
2925 }
2926}
2927
2928/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
2929static void
2930android_glGetTexLevelParameterfv__III_3FI
2931 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) {
2932 jint _exception = 0;
2933 const char * _exceptionType = NULL;
2934 const char * _exceptionMessage = NULL;
2935 GLfloat *params_base = (GLfloat *) 0;
2936 jint _remaining;
2937 GLfloat *params = (GLfloat *) 0;
2938
2939 if (!params_ref) {
2940 _exception = 1;
2941 _exceptionType = "java/lang/IllegalArgumentException";
2942 _exceptionMessage = "params == null";
2943 goto exit;
2944 }
2945 if (offset < 0) {
2946 _exception = 1;
2947 _exceptionType = "java/lang/IllegalArgumentException";
2948 _exceptionMessage = "offset < 0";
2949 goto exit;
2950 }
2951 _remaining = _env->GetArrayLength(params_ref) - offset;
2952 params_base = (GLfloat *)
2953 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2954 params = params_base + offset;
2955
2956 glGetTexLevelParameterfv(
2957 (GLenum)target,
2958 (GLint)level,
2959 (GLenum)pname,
2960 (GLfloat *)params
2961 );
2962
2963exit:
2964 if (params_base) {
2965 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2966 _exception ? JNI_ABORT: 0);
2967 }
2968 if (_exception) {
2969 jniThrowException(_env, _exceptionType, _exceptionMessage);
2970 }
2971}
2972
2973/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
2974static void
2975android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2
2976 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
2977 jarray _array = (jarray) 0;
2978 jint _bufferOffset = (jint) 0;
2979 jint _remaining;
2980 GLfloat *params = (GLfloat *) 0;
2981
2982 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2983 if (params == NULL) {
2984 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2985 params = (GLfloat *) (_paramsBase + _bufferOffset);
2986 }
2987 glGetTexLevelParameterfv(
2988 (GLenum)target,
2989 (GLint)level,
2990 (GLenum)pname,
2991 (GLfloat *)params
2992 );
2993 if (_array) {
2994 releasePointer(_env, _array, params, JNI_TRUE);
2995 }
2996}
2997
2998/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
2999static void
3000android_glBindVertexBuffer__IIJI
3001 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
3002 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
3003 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
3004 return;
3005 }
3006 glBindVertexBuffer(
3007 (GLuint)bindingindex,
3008 (GLuint)buffer,
3009 (GLintptr)offset,
3010 (GLsizei)stride
3011 );
3012}
3013/* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */
3014static void
3015android_glVertexAttribFormat__IIIZI
3016 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) {
3017 glVertexAttribFormat(
3018 (GLuint)attribindex,
3019 (GLint)size,
3020 (GLenum)type,
3021 (GLboolean)normalized,
3022 (GLuint)relativeoffset
3023 );
3024}
3025
3026/* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */
3027static void
3028android_glVertexAttribIFormat__IIII
3029 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) {
3030 glVertexAttribIFormat(
3031 (GLuint)attribindex,
3032 (GLint)size,
3033 (GLenum)type,
3034 (GLuint)relativeoffset
3035 );
3036}
3037
3038/* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */
3039static void
3040android_glVertexAttribBinding__II
3041 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) {
3042 glVertexAttribBinding(
3043 (GLuint)attribindex,
3044 (GLuint)bindingindex
3045 );
3046}
3047
3048/* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */
3049static void
3050android_glVertexBindingDivisor__II
3051 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) {
3052 glVertexBindingDivisor(
3053 (GLuint)bindingindex,
3054 (GLuint)divisor
3055 );
3056}
3057
3058static const char *classPathName = "android/opengl/GLES31";
3059
3060static JNINativeMethod methods[] = {
3061{"_nativeClassInit", "()V", (void*)nativeClassInit },
3062{"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III },
3063{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
3064{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
3065{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
3066{"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III },
3067{"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II },
3068{"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 },
3069{"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II },
3070{"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 },
3071{"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 },
3072{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
3073{"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II },
3074{"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
3075{"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 },
3076{"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III },
3077{"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II },
3078{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
3079{"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I },
3080{"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II },
3081{"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 },
3082{"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II },
3083{"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 },
3084{"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I },
3085{"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II },
3086{"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 },
3087{"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III },
3088{"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII },
3089{"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII },
3090{"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII },
3091{"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III },
3092{"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII },
3093{"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII },
3094{"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII },
3095{"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF },
3096{"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF },
3097{"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF },
3098{"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF },
3099{"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II },
3100{"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 },
3101{"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II },
3102{"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 },
3103{"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II },
3104{"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 },
3105{"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II },
3106{"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 },
3107{"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II },
3108{"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 },
3109{"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II },
3110{"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 },
3111{"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II },
3112{"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 },
3113{"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II },
3114{"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 },
3115{"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI },
3116{"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 },
3117{"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI },
3118{"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 },
3119{"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI },
3120{"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 },
3121{"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI },
3122{"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 },
3123{"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI },
3124{"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 },
3125{"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI },
3126{"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 },
3127{"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI },
3128{"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 },
3129{"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI },
3130{"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 },
3131{"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI },
3132{"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 },
3133{"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI },
3134{"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 },
3135{"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI },
3136{"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 },
3137{"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI },
3138{"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 },
3139{"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI },
3140{"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 },
3141{"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I },
3142{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
3143{"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII },
3144{"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI },
3145{"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 },
3146{"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I },
3147{"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I },
3148{"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ },
3149{"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI },
3150{"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 },
3151{"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II },
3152{"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II },
3153{"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 },
3154{"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI },
3155{"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 },
3156{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
3157{"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI },
3158{"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII },
3159{"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II },
3160{"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II },
3161};
3162
3163int register_android_opengl_jni_GLES31(JNIEnv *_env)
3164{
3165 int err;
3166 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3167 return err;
3168}