blob: e0750e4c8ee0a36cc5d0d2d2f94d4005a728cc14 [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
Andreas Gampebfe63332014-11-12 14:12:45 -080019#pragma GCC diagnostic ignored "-Wunused-variable"
20#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
21#pragma GCC diagnostic ignored "-Wunused-function"
22
Jesse Hall7ab63ac2014-05-19 15:13:41 -070023#include <stdint.h>
24#include <GLES3/gl31.h>
Jesse Hall9626f822014-05-19 20:57:49 -070025#include <jni.h>
26#include <JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070027#include <android_runtime/AndroidRuntime.h>
28#include <utils/misc.h>
29#include <assert.h>
30
31static int initialized = 0;
32
33static jclass nioAccessClass;
34static jclass bufferClass;
35static jmethodID getBasePointerID;
36static jmethodID getBaseArrayID;
37static jmethodID getBaseArrayOffsetID;
38static jfieldID positionID;
39static jfieldID limitID;
40static jfieldID elementSizeShiftID;
41
42
43/* special calls implemented in Android's GLES wrapper used to more
44 * efficiently bound-check passed arrays */
45extern "C" {
46#ifdef GL_VERSION_ES_CM_1_1
47GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
48 const GLvoid *ptr, GLsizei count);
49GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
50 const GLvoid *pointer, GLsizei count);
51GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
61#endif
62#ifdef GL_ES_VERSION_2_0
63static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
64 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
65 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
66}
67#endif
68#ifdef GL_ES_VERSION_3_0
69static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
70 GLsizei stride, const GLvoid *pointer, GLsizei count) {
71 glVertexAttribIPointer(indx, size, type, stride, pointer);
72}
73#endif
74}
75
76/* Cache method IDs each time the class is loaded. */
77
78static void
79nativeClassInit(JNIEnv *_env, jclass glImplClass)
80{
81 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
82 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
83
84 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
85 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
86
87 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
88 "getBasePointer", "(Ljava/nio/Buffer;)J");
89 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
90 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
91 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
93
94 positionID = _env->GetFieldID(bufferClass, "position", "I");
95 limitID = _env->GetFieldID(bufferClass, "limit", "I");
96 elementSizeShiftID =
97 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
98}
99
100static void *
101getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
102{
103 jint position;
104 jint limit;
105 jint elementSizeShift;
106 jlong pointer;
107
108 position = _env->GetIntField(buffer, positionID);
109 limit = _env->GetIntField(buffer, limitID);
110 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
111 *remaining = (limit - position) << elementSizeShift;
112 pointer = _env->CallStaticLongMethod(nioAccessClass,
113 getBasePointerID, buffer);
114 if (pointer != 0L) {
115 *array = NULL;
116 return reinterpret_cast<void*>(pointer);
117 }
118
119 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
120 getBaseArrayID, buffer);
121 *offset = _env->CallStaticIntMethod(nioAccessClass,
122 getBaseArrayOffsetID, buffer);
123
124 return NULL;
125}
126
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700127class ByteArrayGetter {
128public:
129 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
130 return _env->GetByteArrayElements(array, is_copy);
131 }
132};
133class BooleanArrayGetter {
134public:
135 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
136 return _env->GetBooleanArrayElements(array, is_copy);
137 }
138};
139class CharArrayGetter {
140public:
141 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
142 return _env->GetCharArrayElements(array, is_copy);
143 }
144};
145class ShortArrayGetter {
146public:
147 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
148 return _env->GetShortArrayElements(array, is_copy);
149 }
150};
151class IntArrayGetter {
152public:
153 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
154 return _env->GetIntArrayElements(array, is_copy);
155 }
156};
157class LongArrayGetter {
158public:
159 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
160 return _env->GetLongArrayElements(array, is_copy);
161 }
162};
163class FloatArrayGetter {
164public:
165 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
166 return _env->GetFloatArrayElements(array, is_copy);
167 }
168};
169class DoubleArrayGetter {
170public:
171 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
172 return _env->GetDoubleArrayElements(array, is_copy);
173 }
174};
175
176template<typename JTYPEARRAY, typename ARRAYGETTER>
177static void*
178getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
179 return ARRAYGETTER::Get(_env, array, is_copy);
180}
181
182class ByteArrayReleaser {
183public:
184 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
185 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
186 }
187};
188class BooleanArrayReleaser {
189public:
190 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
191 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
192 }
193};
194class CharArrayReleaser {
195public:
196 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
197 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
198 }
199};
200class ShortArrayReleaser {
201public:
202 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
203 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
204 }
205};
206class IntArrayReleaser {
207public:
208 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
209 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
210 }
211};
212class LongArrayReleaser {
213public:
214 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
215 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
216 }
217};
218class FloatArrayReleaser {
219public:
220 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
221 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
222 }
223};
224class DoubleArrayReleaser {
225public:
226 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
227 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
228 }
229};
230
231template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
232static void
233releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
234 ARRAYRELEASER::Release(_env, array, data, commit);
235}
236
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700237static void
238releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
239{
240 _env->ReleasePrimitiveArrayCritical(array, data,
241 commit ? 0 : JNI_ABORT);
242}
243
244static void *
245getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
246 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
247 if (buf) {
248 jint position = _env->GetIntField(buffer, positionID);
249 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
250 buf += position << elementSizeShift;
251 } else {
252 jniThrowException(_env, "java/lang/IllegalArgumentException",
253 "Must use a native order direct Buffer");
254 }
255 return (void*) buf;
256}
257
258// --------------------------------------------------------------------------
259
260/*
261 * returns the number of values glGet returns for a given pname.
262 *
263 * The code below is written such that pnames requiring only one values
264 * are the default (and are not explicitely tested for). This makes the
265 * checking code much shorter/readable/efficient.
266 *
267 * This means that unknown pnames (e.g.: extensions) will default to 1. If
268 * that unknown pname needs more than 1 value, then the validation check
269 * is incomplete and the app may crash if it passed the wrong number params.
270 */
271static int getNeededCount(GLint pname) {
272 int needed = 1;
Romain Guydc43a6c2017-02-17 19:54:25 -0800273#ifdef GL_ES_VERSION_3_0
274 // GLES 3.x pnames
275 switch (pname) {
276 case GL_MAX_VIEWPORT_DIMS:
277 needed = 2;
278 break;
279
280 case GL_PROGRAM_BINARY_FORMATS:
281 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
282 break;
283 }
284#endif
285
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700286#ifdef GL_ES_VERSION_2_0
287 // GLES 2.x pnames
288 switch (pname) {
289 case GL_ALIASED_LINE_WIDTH_RANGE:
290 case GL_ALIASED_POINT_SIZE_RANGE:
291 needed = 2;
292 break;
293
294 case GL_BLEND_COLOR:
295 case GL_COLOR_CLEAR_VALUE:
296 case GL_COLOR_WRITEMASK:
297 case GL_SCISSOR_BOX:
298 case GL_VIEWPORT:
299 needed = 4;
300 break;
301
302 case GL_COMPRESSED_TEXTURE_FORMATS:
303 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
304 break;
305
306 case GL_SHADER_BINARY_FORMATS:
307 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
308 break;
309 }
310#endif
311
312#ifdef GL_VERSION_ES_CM_1_1
313 // GLES 1.x pnames
314 switch (pname) {
315 case GL_ALIASED_LINE_WIDTH_RANGE:
316 case GL_ALIASED_POINT_SIZE_RANGE:
317 case GL_DEPTH_RANGE:
318 case GL_SMOOTH_LINE_WIDTH_RANGE:
319 case GL_SMOOTH_POINT_SIZE_RANGE:
320 needed = 2;
321 break;
322
323 case GL_CURRENT_NORMAL:
324 case GL_POINT_DISTANCE_ATTENUATION:
325 needed = 3;
326 break;
327
328 case GL_COLOR_CLEAR_VALUE:
329 case GL_COLOR_WRITEMASK:
330 case GL_CURRENT_COLOR:
331 case GL_CURRENT_TEXTURE_COORDS:
332 case GL_FOG_COLOR:
333 case GL_LIGHT_MODEL_AMBIENT:
334 case GL_SCISSOR_BOX:
335 case GL_VIEWPORT:
336 needed = 4;
337 break;
338
339 case GL_MODELVIEW_MATRIX:
340 case GL_PROJECTION_MATRIX:
341 case GL_TEXTURE_MATRIX:
342 needed = 16;
343 break;
344
345 case GL_COMPRESSED_TEXTURE_FORMATS:
346 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
347 break;
348 }
349#endif
350 return needed;
351}
352
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700353template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
354 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700355static void
356get
357 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
358 jint _exception = 0;
359 const char * _exceptionType;
360 const char * _exceptionMessage;
361 CTYPE *params_base = (CTYPE *) 0;
362 jint _remaining;
363 CTYPE *params = (CTYPE *) 0;
364 int _needed = 0;
365
366 if (!params_ref) {
367 _exception = 1;
368 _exceptionType = "java/lang/IllegalArgumentException";
369 _exceptionMessage = "params == null";
370 goto exit;
371 }
372 if (offset < 0) {
373 _exception = 1;
374 _exceptionType = "java/lang/IllegalArgumentException";
375 _exceptionMessage = "offset < 0";
376 goto exit;
377 }
378 _remaining = _env->GetArrayLength(params_ref) - offset;
379 _needed = getNeededCount(pname);
380 // if we didn't find this pname, we just assume the user passed
381 // an array of the right size -- this might happen with extensions
382 // or if we forget an enum here.
383 if (_remaining < _needed) {
384 _exception = 1;
385 _exceptionType = "java/lang/IllegalArgumentException";
386 _exceptionMessage = "length - offset < needed";
387 goto exit;
388 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700389 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
390 _env, params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700391 params = params_base + offset;
392
393 GET(
394 (GLenum)pname,
395 (CTYPE *)params
396 );
397
398exit:
399 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700400 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
401 _env, params_ref, params_base, !_exception);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700402 }
403 if (_exception) {
404 jniThrowException(_env, _exceptionType, _exceptionMessage);
405 }
406}
407
408
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700409template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
410 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700411static void
412getarray
413 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
414 jint _exception = 0;
415 const char * _exceptionType;
416 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700417 JTYPEARRAY _array = (JTYPEARRAY) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700418 jint _bufferOffset = (jint) 0;
419 jint _remaining;
420 CTYPE *params = (CTYPE *) 0;
421 int _needed = 0;
422
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700423 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700424 _remaining /= sizeof(CTYPE); // convert from bytes to item count
425 _needed = getNeededCount(pname);
426 // if we didn't find this pname, we just assume the user passed
427 // an array of the right size -- this might happen with extensions
428 // or if we forget an enum here.
429 if (_needed>0 && _remaining < _needed) {
430 _exception = 1;
431 _exceptionType = "java/lang/IllegalArgumentException";
432 _exceptionMessage = "remaining() < needed";
433 goto exit;
434 }
435 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700436 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
437 _env, _array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700438 params = (CTYPE *) (_paramsBase + _bufferOffset);
439 }
440 GET(
441 (GLenum)pname,
442 (CTYPE *)params
443 );
444
445exit:
446 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700447 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
448 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700449 }
450 if (_exception) {
451 jniThrowException(_env, _exceptionType, _exceptionMessage);
452 }
453}
454
455// --------------------------------------------------------------------------
456/* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */
457static void
458android_glDispatchCompute__III
459 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) {
460 glDispatchCompute(
461 (GLuint)num_groups_x,
462 (GLuint)num_groups_y,
463 (GLuint)num_groups_z
464 );
465}
466
467/* void glDispatchComputeIndirect ( GLintptr indirect ) */
468static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
469 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
470 // Here we only need to check for successful 64-bit to 32-bit conversion.
471 // - jlong is a int64_t (jni.h)
472 // - GLintptr is a long (khrplatform.h)
473 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
474 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
475 return;
476 }
477 glDispatchComputeIndirect((GLintptr)indirect);
478}
479
480/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
481static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
482 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
483 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
484 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800485 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700486 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
487 return;
488 }
489 glDrawArraysIndirect(mode, (const void*)indirect);
490}
491
492/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
493static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
494 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
495 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
496 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800497 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700498 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
499 return;
500 }
501 glDrawElementsIndirect(mode, type, (const void*)indirect);
502}
503
504/* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */
505static void
506android_glFramebufferParameteri__III
507 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
508 glFramebufferParameteri(
509 (GLenum)target,
510 (GLenum)pname,
511 (GLint)param
512 );
513}
514
515/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
516static void
517android_glGetFramebufferParameteriv__II_3II
518 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
519 jint _exception = 0;
520 const char * _exceptionType = NULL;
521 const char * _exceptionMessage = NULL;
522 GLint *params_base = (GLint *) 0;
523 jint _remaining;
524 GLint *params = (GLint *) 0;
525
526 if (!params_ref) {
527 _exception = 1;
528 _exceptionType = "java/lang/IllegalArgumentException";
529 _exceptionMessage = "params == null";
530 goto exit;
531 }
532 if (offset < 0) {
533 _exception = 1;
534 _exceptionType = "java/lang/IllegalArgumentException";
535 _exceptionMessage = "offset < 0";
536 goto exit;
537 }
538 _remaining = _env->GetArrayLength(params_ref) - offset;
539 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700540 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700541 params = params_base + offset;
542
543 glGetFramebufferParameteriv(
544 (GLenum)target,
545 (GLenum)pname,
546 (GLint *)params
547 );
548
549exit:
550 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700551 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700552 _exception ? JNI_ABORT: 0);
553 }
554 if (_exception) {
555 jniThrowException(_env, _exceptionType, _exceptionMessage);
556 }
557}
558
559/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
560static void
561android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2
562 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800563 jint _exception = 0;
564 const char * _exceptionType = NULL;
565 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700566 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700567 jint _bufferOffset = (jint) 0;
568 jint _remaining;
569 GLint *params = (GLint *) 0;
570
Romain Guy84cac202016-12-05 12:26:02 -0800571 if (!params_buf) {
572 _exception = 1;
573 _exceptionType = "java/lang/IllegalArgumentException";
574 _exceptionMessage = "params == null";
575 goto exit;
576 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700577 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700578 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700579 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700580 params = (GLint *) (_paramsBase + _bufferOffset);
581 }
582 glGetFramebufferParameteriv(
583 (GLenum)target,
584 (GLenum)pname,
585 (GLint *)params
586 );
Romain Guy84cac202016-12-05 12:26:02 -0800587
588exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700589 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800590 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
591 }
592 if (_exception) {
593 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700594 }
595}
596
597/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
598static void
599android_glGetProgramInterfaceiv__III_3II
600 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) {
601 jint _exception = 0;
602 const char * _exceptionType = NULL;
603 const char * _exceptionMessage = NULL;
604 GLint *params_base = (GLint *) 0;
605 jint _remaining;
606 GLint *params = (GLint *) 0;
607
608 if (!params_ref) {
609 _exception = 1;
610 _exceptionType = "java/lang/IllegalArgumentException";
611 _exceptionMessage = "params == null";
612 goto exit;
613 }
614 if (offset < 0) {
615 _exception = 1;
616 _exceptionType = "java/lang/IllegalArgumentException";
617 _exceptionMessage = "offset < 0";
618 goto exit;
619 }
620 _remaining = _env->GetArrayLength(params_ref) - offset;
621 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700622 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700623 params = params_base + offset;
624
625 glGetProgramInterfaceiv(
626 (GLuint)program,
627 (GLenum)programInterface,
628 (GLenum)pname,
629 (GLint *)params
630 );
631
632exit:
633 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700634 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700635 _exception ? JNI_ABORT: 0);
636 }
637 if (_exception) {
638 jniThrowException(_env, _exceptionType, _exceptionMessage);
639 }
640}
641
642/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
643static void
644android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2
645 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800646 jint _exception = 0;
647 const char * _exceptionType = NULL;
648 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700649 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700650 jint _bufferOffset = (jint) 0;
651 jint _remaining;
652 GLint *params = (GLint *) 0;
653
Romain Guy84cac202016-12-05 12:26:02 -0800654 if (!params_buf) {
655 _exception = 1;
656 _exceptionType = "java/lang/IllegalArgumentException";
657 _exceptionMessage = "params == null";
658 goto exit;
659 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700660 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700661 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700662 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700663 params = (GLint *) (_paramsBase + _bufferOffset);
664 }
665 glGetProgramInterfaceiv(
666 (GLuint)program,
667 (GLenum)programInterface,
668 (GLenum)pname,
669 (GLint *)params
670 );
Romain Guy84cac202016-12-05 12:26:02 -0800671
672exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700673 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800674 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
675 }
676 if (_exception) {
677 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700678 }
679}
680
681/* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */
682static jint
683android_glGetProgramResourceIndex__IILjava_lang_String_2
684 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
685 jint _exception = 0;
686 const char * _exceptionType = NULL;
687 const char * _exceptionMessage = NULL;
688 GLuint _returnValue = 0;
689 const char* _nativename = 0;
690
691 if (!name) {
692 _exception = 1;
693 _exceptionType = "java/lang/IllegalArgumentException";
694 _exceptionMessage = "name == null";
695 goto exit;
696 }
697 _nativename = _env->GetStringUTFChars(name, 0);
698
699 _returnValue = glGetProgramResourceIndex(
700 (GLuint)program,
701 (GLenum)programInterface,
702 (GLchar *)_nativename
703 );
704
705exit:
706 if (_nativename) {
707 _env->ReleaseStringUTFChars(name, _nativename);
708 }
709
710 if (_exception) {
711 jniThrowException(_env, _exceptionType, _exceptionMessage);
712 }
713 return (jint)_returnValue;
714}
715
716/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
717static jstring
718android_glGetProgramResourceName
719 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
720 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
721 return NULL;
722}
723
724/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
725static void
726android_glGetProgramResourceiv__IIII_3III_3II_3II
727 (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) {
728 jint _exception = 0;
729 const char * _exceptionType = NULL;
730 const char * _exceptionMessage = NULL;
731 GLenum *props_base = (GLenum *) 0;
732 jint _propsRemaining;
733 GLenum *props = (GLenum *) 0;
734 GLsizei *length_base = (GLsizei *) 0;
735 jint _lengthRemaining;
736 GLsizei *length = (GLsizei *) 0;
737 GLint *params_base = (GLint *) 0;
738 jint _paramsRemaining;
739 GLint *params = (GLint *) 0;
740
741 if (!props_ref) {
742 _exception = 1;
743 _exceptionType = "java/lang/IllegalArgumentException";
744 _exceptionMessage = "props == null";
745 goto exit;
746 }
747 if (propsOffset < 0) {
748 _exception = 1;
749 _exceptionType = "java/lang/IllegalArgumentException";
750 _exceptionMessage = "propsOffset < 0";
751 goto exit;
752 }
753 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset;
754 props_base = (GLenum *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700755 _env->GetIntArrayElements(props_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700756 props = props_base + propsOffset;
757
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700758 if (length_ref) {
759 if (lengthOffset < 0) {
760 _exception = 1;
761 _exceptionType = "java/lang/IllegalArgumentException";
762 _exceptionMessage = "lengthOffset < 0";
763 goto exit;
764 }
765 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
766 length_base = (GLsizei *)
767 _env->GetIntArrayElements(length_ref, (jboolean *)0);
768 length = length_base + lengthOffset;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700769 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700770
771 if (!params_ref) {
772 _exception = 1;
773 _exceptionType = "java/lang/IllegalArgumentException";
774 _exceptionMessage = "params == null";
775 goto exit;
776 }
777 if (paramsOffset < 0) {
778 _exception = 1;
779 _exceptionType = "java/lang/IllegalArgumentException";
780 _exceptionMessage = "paramsOffset < 0";
781 goto exit;
782 }
783 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
784 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700785 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700786 params = params_base + paramsOffset;
787
788 glGetProgramResourceiv(
789 (GLuint)program,
790 (GLenum)programInterface,
791 (GLuint)index,
792 (GLsizei)propCount,
793 (GLenum *)props,
794 (GLsizei)bufSize,
795 (GLsizei *)length,
796 (GLint *)params
797 );
798
799exit:
800 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700801 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700802 _exception ? JNI_ABORT: 0);
803 }
804 if (length_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700805 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700806 _exception ? JNI_ABORT: 0);
807 }
808 if (props_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700809 _env->ReleaseIntArrayElements(props_ref, (jint*)props_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700810 JNI_ABORT);
811 }
812 if (_exception) {
813 jniThrowException(_env, _exceptionType, _exceptionMessage);
814 }
815}
816
817/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
818static void
819android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
820 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jobject props_buf, jint bufSize, jobject length_buf, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800821 jint _exception = 0;
822 const char * _exceptionType = NULL;
823 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700824 jintArray _propsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700825 jint _propsBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700826 jintArray _lengthArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700827 jint _lengthBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700828 jintArray _paramsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700829 jint _paramsBufferOffset = (jint) 0;
830 jint _propsRemaining;
831 GLenum *props = (GLenum *) 0;
832 jint _lengthRemaining;
833 GLsizei *length = (GLsizei *) 0;
834 jint _paramsRemaining;
835 GLint *params = (GLint *) 0;
836
Romain Guy84cac202016-12-05 12:26:02 -0800837 if (!props_buf) {
838 _exception = 1;
839 _exceptionType = "java/lang/IllegalArgumentException";
840 _exceptionMessage = "props == null";
841 goto exit;
842 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700843 props = (GLenum *)getPointer(_env, props_buf, (jarray*)&_propsArray, &_propsRemaining, &_propsBufferOffset);
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700844 if (length_buf) {
845 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
846 }
Romain Guy84cac202016-12-05 12:26:02 -0800847 if (!params_buf) {
848 _exception = 1;
849 _exceptionType = "java/lang/IllegalArgumentException";
850 _exceptionMessage = "params == null";
851 goto exit;
852 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700853 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700854 if (props == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700855 char * _propsBase = (char *)_env->GetIntArrayElements(_propsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700856 props = (GLenum *) (_propsBase + _propsBufferOffset);
857 }
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700858 if (length_buf && length == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700859 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700860 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
861 }
862 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700863 char * _paramsBase = (char *)_env->GetIntArrayElements(_paramsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700864 params = (GLint *) (_paramsBase + _paramsBufferOffset);
865 }
866 glGetProgramResourceiv(
867 (GLuint)program,
868 (GLenum)programInterface,
869 (GLuint)index,
870 (GLsizei)propCount,
871 (GLenum *)props,
872 (GLsizei)bufSize,
873 (GLsizei *)length,
874 (GLint *)params
875 );
Romain Guy84cac202016-12-05 12:26:02 -0800876
877exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700878 if (_paramsArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800879 _env->ReleaseIntArrayElements(_paramsArray, (jint*)params, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700880 }
881 if (_lengthArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800882 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700883 }
884 if (_propsArray) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700885 _env->ReleaseIntArrayElements(_propsArray, (jint*)props, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700886 }
Romain Guy84cac202016-12-05 12:26:02 -0800887 if (_exception) {
888 jniThrowException(_env, _exceptionType, _exceptionMessage);
889 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700890}
891
892/* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */
893static jint
894android_glGetProgramResourceLocation__IILjava_lang_String_2
895 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
896 jint _exception = 0;
897 const char * _exceptionType = NULL;
898 const char * _exceptionMessage = NULL;
899 GLint _returnValue = 0;
900 const char* _nativename = 0;
901
902 if (!name) {
903 _exception = 1;
904 _exceptionType = "java/lang/IllegalArgumentException";
905 _exceptionMessage = "name == null";
906 goto exit;
907 }
908 _nativename = _env->GetStringUTFChars(name, 0);
909
910 _returnValue = glGetProgramResourceLocation(
911 (GLuint)program,
912 (GLenum)programInterface,
913 (GLchar *)_nativename
914 );
915
916exit:
917 if (_nativename) {
918 _env->ReleaseStringUTFChars(name, _nativename);
919 }
920
921 if (_exception) {
922 jniThrowException(_env, _exceptionType, _exceptionMessage);
923 }
924 return (jint)_returnValue;
925}
926
927/* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */
928static void
929android_glUseProgramStages__III
930 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) {
931 glUseProgramStages(
932 (GLuint)pipeline,
933 (GLbitfield)stages,
934 (GLuint)program
935 );
936}
937
938/* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */
939static void
940android_glActiveShaderProgram__II
941 (JNIEnv *_env, jobject _this, jint pipeline, jint program) {
942 glActiveShaderProgram(
943 (GLuint)pipeline,
944 (GLuint)program
945 );
946}
947
948/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
949static jint
950android_glCreateShaderProgramv
951 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800952 jint _exception = 0;
953 const char * _exceptionType = NULL;
954 const char * _exceptionMessage = NULL;
955 GLsizei _count;
956 const GLchar** _strings = NULL;
957 jstring* _jstrings = NULL;
958 GLuint _returnValue = 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700959
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800960 if (!strings) {
961 _exception = 1;
962 _exceptionType = "java/lang/IllegalArgumentException";
963 _exceptionMessage = "strings == null";
964 goto exit;
965 }
966
967 _count = _env->GetArrayLength(strings);
968
969 _strings = (const GLchar**) calloc(_count, sizeof(const GLchar*));
970 if (!_strings) {
971 _exception = 1;
972 _exceptionType = "java/lang/OutOfMemoryError";
973 _exceptionMessage = "out of memory";
974 goto exit;
975 }
976
977 _jstrings = (jstring*) calloc(_count, sizeof(jstring));
978 if (!_jstrings) {
979 _exception = 1;
980 _exceptionType = "java/lang/OutOfMemoryError";
981 _exceptionMessage = "out of memory";
982 goto exit;
983 }
984
985 for(int i = 0; i < _count; i++) {
986 _jstrings[i] = (jstring) _env->GetObjectArrayElement(strings, i);
987 if (!_jstrings[i]) {
988 _exception = 1;
989 _exceptionType = "java/lang/IllegalArgumentException";
990 _exceptionMessage = "strings == null";
991 goto exit;
992 }
993 _strings[i] = _env->GetStringUTFChars(_jstrings[i], 0);
994 }
995
996 _returnValue = glCreateShaderProgramv((GLenum)type, _count, _strings);
997exit:
998 if (_strings && _jstrings) {
999 for(int i = 0; i < _count; i++) {
1000 if (_strings[i] && _jstrings[i]) {
1001 _env->ReleaseStringUTFChars(_jstrings[i], _strings[i]);
1002 }
1003 }
1004 }
1005 if (_strings) {
1006 free(_strings);
1007 }
1008 if (_jstrings) {
1009 free(_jstrings);
1010 }
1011 if (_exception) {
1012 jniThrowException(_env, _exceptionType, _exceptionMessage);
1013 }
1014 return (jint)_returnValue;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001015}
1016/* void glBindProgramPipeline ( GLuint pipeline ) */
1017static void
1018android_glBindProgramPipeline__I
1019 (JNIEnv *_env, jobject _this, jint pipeline) {
1020 glBindProgramPipeline(
1021 (GLuint)pipeline
1022 );
1023}
1024
1025/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1026static void
1027android_glDeleteProgramPipelines__I_3II
1028 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1029 jint _exception = 0;
1030 const char * _exceptionType = NULL;
1031 const char * _exceptionMessage = NULL;
1032 GLuint *pipelines_base = (GLuint *) 0;
1033 jint _remaining;
1034 GLuint *pipelines = (GLuint *) 0;
1035
1036 if (!pipelines_ref) {
1037 _exception = 1;
1038 _exceptionType = "java/lang/IllegalArgumentException";
1039 _exceptionMessage = "pipelines == null";
1040 goto exit;
1041 }
1042 if (offset < 0) {
1043 _exception = 1;
1044 _exceptionType = "java/lang/IllegalArgumentException";
1045 _exceptionMessage = "offset < 0";
1046 goto exit;
1047 }
1048 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1049 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001050 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001051 pipelines = pipelines_base + offset;
1052
1053 glDeleteProgramPipelines(
1054 (GLsizei)n,
1055 (GLuint *)pipelines
1056 );
1057
1058exit:
1059 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001060 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001061 JNI_ABORT);
1062 }
1063 if (_exception) {
1064 jniThrowException(_env, _exceptionType, _exceptionMessage);
1065 }
1066}
1067
1068/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1069static void
1070android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2
1071 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001072 jint _exception = 0;
1073 const char * _exceptionType = NULL;
1074 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001075 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001076 jint _bufferOffset = (jint) 0;
1077 jint _remaining;
1078 GLuint *pipelines = (GLuint *) 0;
1079
Romain Guy84cac202016-12-05 12:26:02 -08001080 if (!pipelines_buf) {
1081 _exception = 1;
1082 _exceptionType = "java/lang/IllegalArgumentException";
1083 _exceptionMessage = "pipelines == null";
1084 goto exit;
1085 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001086 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001087 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001088 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001089 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1090 }
1091 glDeleteProgramPipelines(
1092 (GLsizei)n,
1093 (GLuint *)pipelines
1094 );
Romain Guy84cac202016-12-05 12:26:02 -08001095
1096exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001097 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001098 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001099 }
Romain Guy84cac202016-12-05 12:26:02 -08001100 if (_exception) {
1101 jniThrowException(_env, _exceptionType, _exceptionMessage);
1102 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001103}
1104
1105/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1106static void
1107android_glGenProgramPipelines__I_3II
1108 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1109 jint _exception = 0;
1110 const char * _exceptionType = NULL;
1111 const char * _exceptionMessage = NULL;
1112 GLuint *pipelines_base = (GLuint *) 0;
1113 jint _remaining;
1114 GLuint *pipelines = (GLuint *) 0;
1115
1116 if (!pipelines_ref) {
1117 _exception = 1;
1118 _exceptionType = "java/lang/IllegalArgumentException";
1119 _exceptionMessage = "pipelines == null";
1120 goto exit;
1121 }
1122 if (offset < 0) {
1123 _exception = 1;
1124 _exceptionType = "java/lang/IllegalArgumentException";
1125 _exceptionMessage = "offset < 0";
1126 goto exit;
1127 }
1128 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1129 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001130 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001131 pipelines = pipelines_base + offset;
1132
1133 glGenProgramPipelines(
1134 (GLsizei)n,
1135 (GLuint *)pipelines
1136 );
1137
1138exit:
1139 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001140 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001141 _exception ? JNI_ABORT: 0);
1142 }
1143 if (_exception) {
1144 jniThrowException(_env, _exceptionType, _exceptionMessage);
1145 }
1146}
1147
1148/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1149static void
1150android_glGenProgramPipelines__ILjava_nio_IntBuffer_2
1151 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001152 jint _exception = 0;
1153 const char * _exceptionType = NULL;
1154 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001155 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001156 jint _bufferOffset = (jint) 0;
1157 jint _remaining;
1158 GLuint *pipelines = (GLuint *) 0;
1159
Romain Guy84cac202016-12-05 12:26:02 -08001160 if (!pipelines_buf) {
1161 _exception = 1;
1162 _exceptionType = "java/lang/IllegalArgumentException";
1163 _exceptionMessage = "pipelines == null";
1164 goto exit;
1165 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001166 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001167 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001168 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001169 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1170 }
1171 glGenProgramPipelines(
1172 (GLsizei)n,
1173 (GLuint *)pipelines
1174 );
Romain Guy84cac202016-12-05 12:26:02 -08001175
1176exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001177 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001178 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, _exception ? JNI_ABORT : 0);
1179 }
1180 if (_exception) {
1181 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001182 }
1183}
1184
1185/* GLboolean glIsProgramPipeline ( GLuint pipeline ) */
1186static jboolean
1187android_glIsProgramPipeline__I
1188 (JNIEnv *_env, jobject _this, jint pipeline) {
1189 GLboolean _returnValue;
1190 _returnValue = glIsProgramPipeline(
1191 (GLuint)pipeline
1192 );
1193 return (jboolean)_returnValue;
1194}
1195
1196/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1197static void
1198android_glGetProgramPipelineiv__II_3II
1199 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) {
1200 jint _exception = 0;
1201 const char * _exceptionType = NULL;
1202 const char * _exceptionMessage = NULL;
1203 GLint *params_base = (GLint *) 0;
1204 jint _remaining;
1205 GLint *params = (GLint *) 0;
1206
1207 if (!params_ref) {
1208 _exception = 1;
1209 _exceptionType = "java/lang/IllegalArgumentException";
1210 _exceptionMessage = "params == null";
1211 goto exit;
1212 }
1213 if (offset < 0) {
1214 _exception = 1;
1215 _exceptionType = "java/lang/IllegalArgumentException";
1216 _exceptionMessage = "offset < 0";
1217 goto exit;
1218 }
1219 _remaining = _env->GetArrayLength(params_ref) - offset;
1220 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001221 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001222 params = params_base + offset;
1223
1224 glGetProgramPipelineiv(
1225 (GLuint)pipeline,
1226 (GLenum)pname,
1227 (GLint *)params
1228 );
1229
1230exit:
1231 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001232 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001233 _exception ? JNI_ABORT: 0);
1234 }
1235 if (_exception) {
1236 jniThrowException(_env, _exceptionType, _exceptionMessage);
1237 }
1238}
1239
1240/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1241static void
1242android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2
1243 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001244 jint _exception = 0;
1245 const char * _exceptionType = NULL;
1246 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001247 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001248 jint _bufferOffset = (jint) 0;
1249 jint _remaining;
1250 GLint *params = (GLint *) 0;
1251
Romain Guy84cac202016-12-05 12:26:02 -08001252 if (!params_buf) {
1253 _exception = 1;
1254 _exceptionType = "java/lang/IllegalArgumentException";
1255 _exceptionMessage = "params == null";
1256 goto exit;
1257 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001258 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001259 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001260 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001261 params = (GLint *) (_paramsBase + _bufferOffset);
1262 }
1263 glGetProgramPipelineiv(
1264 (GLuint)pipeline,
1265 (GLenum)pname,
1266 (GLint *)params
1267 );
Romain Guy84cac202016-12-05 12:26:02 -08001268
1269exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001270 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001271 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1272 }
1273 if (_exception) {
1274 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001275 }
1276}
1277
1278/* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */
1279static void
1280android_glProgramUniform1i__III
1281 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1282 glProgramUniform1i(
1283 (GLuint)program,
1284 (GLint)location,
1285 (GLint)v0
1286 );
1287}
1288
1289/* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */
1290static void
1291android_glProgramUniform2i__IIII
1292 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1293 glProgramUniform2i(
1294 (GLuint)program,
1295 (GLint)location,
1296 (GLint)v0,
1297 (GLint)v1
1298 );
1299}
1300
1301/* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */
1302static void
1303android_glProgramUniform3i__IIIII
1304 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1305 glProgramUniform3i(
1306 (GLuint)program,
1307 (GLint)location,
1308 (GLint)v0,
1309 (GLint)v1,
1310 (GLint)v2
1311 );
1312}
1313
1314/* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */
1315static void
1316android_glProgramUniform4i__IIIIII
1317 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1318 glProgramUniform4i(
1319 (GLuint)program,
1320 (GLint)location,
1321 (GLint)v0,
1322 (GLint)v1,
1323 (GLint)v2,
1324 (GLint)v3
1325 );
1326}
1327
1328/* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */
1329static void
1330android_glProgramUniform1ui__III
1331 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1332 glProgramUniform1ui(
1333 (GLuint)program,
1334 (GLint)location,
1335 (GLuint)v0
1336 );
1337}
1338
1339/* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */
1340static void
1341android_glProgramUniform2ui__IIII
1342 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1343 glProgramUniform2ui(
1344 (GLuint)program,
1345 (GLint)location,
1346 (GLuint)v0,
1347 (GLuint)v1
1348 );
1349}
1350
1351/* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
1352static void
1353android_glProgramUniform3ui__IIIII
1354 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1355 glProgramUniform3ui(
1356 (GLuint)program,
1357 (GLint)location,
1358 (GLuint)v0,
1359 (GLuint)v1,
1360 (GLuint)v2
1361 );
1362}
1363
1364/* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
1365static void
1366android_glProgramUniform4ui__IIIIII
1367 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1368 glProgramUniform4ui(
1369 (GLuint)program,
1370 (GLint)location,
1371 (GLuint)v0,
1372 (GLuint)v1,
1373 (GLuint)v2,
1374 (GLuint)v3
1375 );
1376}
1377
1378/* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */
1379static void
1380android_glProgramUniform1f__IIF
1381 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) {
1382 glProgramUniform1f(
1383 (GLuint)program,
1384 (GLint)location,
1385 (GLfloat)v0
1386 );
1387}
1388
1389/* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */
1390static void
1391android_glProgramUniform2f__IIFF
1392 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) {
1393 glProgramUniform2f(
1394 (GLuint)program,
1395 (GLint)location,
1396 (GLfloat)v0,
1397 (GLfloat)v1
1398 );
1399}
1400
1401/* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */
1402static void
1403android_glProgramUniform3f__IIFFF
1404 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) {
1405 glProgramUniform3f(
1406 (GLuint)program,
1407 (GLint)location,
1408 (GLfloat)v0,
1409 (GLfloat)v1,
1410 (GLfloat)v2
1411 );
1412}
1413
1414/* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */
1415static void
1416android_glProgramUniform4f__IIFFFF
1417 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) {
1418 glProgramUniform4f(
1419 (GLuint)program,
1420 (GLint)location,
1421 (GLfloat)v0,
1422 (GLfloat)v1,
1423 (GLfloat)v2,
1424 (GLfloat)v3
1425 );
1426}
1427
1428/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1429static void
1430android_glProgramUniform1iv__III_3II
1431 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1432 jint _exception = 0;
1433 const char * _exceptionType = NULL;
1434 const char * _exceptionMessage = NULL;
1435 GLint *value_base = (GLint *) 0;
1436 jint _remaining;
1437 GLint *value = (GLint *) 0;
1438
1439 if (!value_ref) {
1440 _exception = 1;
1441 _exceptionType = "java/lang/IllegalArgumentException";
1442 _exceptionMessage = "value == null";
1443 goto exit;
1444 }
1445 if (offset < 0) {
1446 _exception = 1;
1447 _exceptionType = "java/lang/IllegalArgumentException";
1448 _exceptionMessage = "offset < 0";
1449 goto exit;
1450 }
1451 _remaining = _env->GetArrayLength(value_ref) - offset;
1452 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001453 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001454 value = value_base + offset;
1455
1456 glProgramUniform1iv(
1457 (GLuint)program,
1458 (GLint)location,
1459 (GLsizei)count,
1460 (GLint *)value
1461 );
1462
1463exit:
1464 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001465 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001466 JNI_ABORT);
1467 }
1468 if (_exception) {
1469 jniThrowException(_env, _exceptionType, _exceptionMessage);
1470 }
1471}
1472
1473/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1474static void
1475android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2
1476 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001477 jint _exception = 0;
1478 const char * _exceptionType = NULL;
1479 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001480 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001481 jint _bufferOffset = (jint) 0;
1482 jint _remaining;
1483 GLint *value = (GLint *) 0;
1484
Romain Guy84cac202016-12-05 12:26:02 -08001485 if (!value_buf) {
1486 _exception = 1;
1487 _exceptionType = "java/lang/IllegalArgumentException";
1488 _exceptionMessage = "value == null";
1489 goto exit;
1490 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001491 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001492 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001493 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001494 value = (GLint *) (_valueBase + _bufferOffset);
1495 }
1496 glProgramUniform1iv(
1497 (GLuint)program,
1498 (GLint)location,
1499 (GLsizei)count,
1500 (GLint *)value
1501 );
Romain Guy84cac202016-12-05 12:26:02 -08001502
1503exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001504 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001505 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001506 }
Romain Guy84cac202016-12-05 12:26:02 -08001507 if (_exception) {
1508 jniThrowException(_env, _exceptionType, _exceptionMessage);
1509 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001510}
1511
1512/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1513static void
1514android_glProgramUniform2iv__III_3II
1515 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1516 jint _exception = 0;
1517 const char * _exceptionType = NULL;
1518 const char * _exceptionMessage = NULL;
1519 GLint *value_base = (GLint *) 0;
1520 jint _remaining;
1521 GLint *value = (GLint *) 0;
1522
1523 if (!value_ref) {
1524 _exception = 1;
1525 _exceptionType = "java/lang/IllegalArgumentException";
1526 _exceptionMessage = "value == null";
1527 goto exit;
1528 }
1529 if (offset < 0) {
1530 _exception = 1;
1531 _exceptionType = "java/lang/IllegalArgumentException";
1532 _exceptionMessage = "offset < 0";
1533 goto exit;
1534 }
1535 _remaining = _env->GetArrayLength(value_ref) - offset;
1536 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001537 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001538 value = value_base + offset;
1539
1540 glProgramUniform2iv(
1541 (GLuint)program,
1542 (GLint)location,
1543 (GLsizei)count,
1544 (GLint *)value
1545 );
1546
1547exit:
1548 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001549 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001550 JNI_ABORT);
1551 }
1552 if (_exception) {
1553 jniThrowException(_env, _exceptionType, _exceptionMessage);
1554 }
1555}
1556
1557/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1558static void
1559android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2
1560 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001561 jint _exception = 0;
1562 const char * _exceptionType = NULL;
1563 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001564 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001565 jint _bufferOffset = (jint) 0;
1566 jint _remaining;
1567 GLint *value = (GLint *) 0;
1568
Romain Guy84cac202016-12-05 12:26:02 -08001569 if (!value_buf) {
1570 _exception = 1;
1571 _exceptionType = "java/lang/IllegalArgumentException";
1572 _exceptionMessage = "value == null";
1573 goto exit;
1574 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001575 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001576 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001577 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001578 value = (GLint *) (_valueBase + _bufferOffset);
1579 }
1580 glProgramUniform2iv(
1581 (GLuint)program,
1582 (GLint)location,
1583 (GLsizei)count,
1584 (GLint *)value
1585 );
Romain Guy84cac202016-12-05 12:26:02 -08001586
1587exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001588 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001589 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001590 }
Romain Guy84cac202016-12-05 12:26:02 -08001591 if (_exception) {
1592 jniThrowException(_env, _exceptionType, _exceptionMessage);
1593 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001594}
1595
1596/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1597static void
1598android_glProgramUniform3iv__III_3II
1599 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1600 jint _exception = 0;
1601 const char * _exceptionType = NULL;
1602 const char * _exceptionMessage = NULL;
1603 GLint *value_base = (GLint *) 0;
1604 jint _remaining;
1605 GLint *value = (GLint *) 0;
1606
1607 if (!value_ref) {
1608 _exception = 1;
1609 _exceptionType = "java/lang/IllegalArgumentException";
1610 _exceptionMessage = "value == null";
1611 goto exit;
1612 }
1613 if (offset < 0) {
1614 _exception = 1;
1615 _exceptionType = "java/lang/IllegalArgumentException";
1616 _exceptionMessage = "offset < 0";
1617 goto exit;
1618 }
1619 _remaining = _env->GetArrayLength(value_ref) - offset;
1620 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001621 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001622 value = value_base + offset;
1623
1624 glProgramUniform3iv(
1625 (GLuint)program,
1626 (GLint)location,
1627 (GLsizei)count,
1628 (GLint *)value
1629 );
1630
1631exit:
1632 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001633 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001634 JNI_ABORT);
1635 }
1636 if (_exception) {
1637 jniThrowException(_env, _exceptionType, _exceptionMessage);
1638 }
1639}
1640
1641/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1642static void
1643android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2
1644 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001645 jint _exception = 0;
1646 const char * _exceptionType = NULL;
1647 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001648 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001649 jint _bufferOffset = (jint) 0;
1650 jint _remaining;
1651 GLint *value = (GLint *) 0;
1652
Romain Guy84cac202016-12-05 12:26:02 -08001653 if (!value_buf) {
1654 _exception = 1;
1655 _exceptionType = "java/lang/IllegalArgumentException";
1656 _exceptionMessage = "value == null";
1657 goto exit;
1658 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001659 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001660 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001661 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001662 value = (GLint *) (_valueBase + _bufferOffset);
1663 }
1664 glProgramUniform3iv(
1665 (GLuint)program,
1666 (GLint)location,
1667 (GLsizei)count,
1668 (GLint *)value
1669 );
Romain Guy84cac202016-12-05 12:26:02 -08001670
1671exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001672 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001673 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001674 }
Romain Guy84cac202016-12-05 12:26:02 -08001675 if (_exception) {
1676 jniThrowException(_env, _exceptionType, _exceptionMessage);
1677 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001678}
1679
1680/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1681static void
1682android_glProgramUniform4iv__III_3II
1683 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1684 jint _exception = 0;
1685 const char * _exceptionType = NULL;
1686 const char * _exceptionMessage = NULL;
1687 GLint *value_base = (GLint *) 0;
1688 jint _remaining;
1689 GLint *value = (GLint *) 0;
1690
1691 if (!value_ref) {
1692 _exception = 1;
1693 _exceptionType = "java/lang/IllegalArgumentException";
1694 _exceptionMessage = "value == null";
1695 goto exit;
1696 }
1697 if (offset < 0) {
1698 _exception = 1;
1699 _exceptionType = "java/lang/IllegalArgumentException";
1700 _exceptionMessage = "offset < 0";
1701 goto exit;
1702 }
1703 _remaining = _env->GetArrayLength(value_ref) - offset;
1704 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001705 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001706 value = value_base + offset;
1707
1708 glProgramUniform4iv(
1709 (GLuint)program,
1710 (GLint)location,
1711 (GLsizei)count,
1712 (GLint *)value
1713 );
1714
1715exit:
1716 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001717 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001718 JNI_ABORT);
1719 }
1720 if (_exception) {
1721 jniThrowException(_env, _exceptionType, _exceptionMessage);
1722 }
1723}
1724
1725/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1726static void
1727android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2
1728 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001729 jint _exception = 0;
1730 const char * _exceptionType = NULL;
1731 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001732 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001733 jint _bufferOffset = (jint) 0;
1734 jint _remaining;
1735 GLint *value = (GLint *) 0;
1736
Romain Guy84cac202016-12-05 12:26:02 -08001737 if (!value_buf) {
1738 _exception = 1;
1739 _exceptionType = "java/lang/IllegalArgumentException";
1740 _exceptionMessage = "value == null";
1741 goto exit;
1742 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001743 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001744 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001745 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001746 value = (GLint *) (_valueBase + _bufferOffset);
1747 }
1748 glProgramUniform4iv(
1749 (GLuint)program,
1750 (GLint)location,
1751 (GLsizei)count,
1752 (GLint *)value
1753 );
Romain Guy84cac202016-12-05 12:26:02 -08001754
1755exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001756 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001757 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001758 }
Romain Guy84cac202016-12-05 12:26:02 -08001759 if (_exception) {
1760 jniThrowException(_env, _exceptionType, _exceptionMessage);
1761 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001762}
1763
1764/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1765static void
1766android_glProgramUniform1uiv__III_3II
1767 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1768 jint _exception = 0;
1769 const char * _exceptionType = NULL;
1770 const char * _exceptionMessage = NULL;
1771 GLuint *value_base = (GLuint *) 0;
1772 jint _remaining;
1773 GLuint *value = (GLuint *) 0;
1774
1775 if (!value_ref) {
1776 _exception = 1;
1777 _exceptionType = "java/lang/IllegalArgumentException";
1778 _exceptionMessage = "value == null";
1779 goto exit;
1780 }
1781 if (offset < 0) {
1782 _exception = 1;
1783 _exceptionType = "java/lang/IllegalArgumentException";
1784 _exceptionMessage = "offset < 0";
1785 goto exit;
1786 }
1787 _remaining = _env->GetArrayLength(value_ref) - offset;
1788 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001789 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001790 value = value_base + offset;
1791
1792 glProgramUniform1uiv(
1793 (GLuint)program,
1794 (GLint)location,
1795 (GLsizei)count,
1796 (GLuint *)value
1797 );
1798
1799exit:
1800 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001801 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001802 JNI_ABORT);
1803 }
1804 if (_exception) {
1805 jniThrowException(_env, _exceptionType, _exceptionMessage);
1806 }
1807}
1808
1809/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1810static void
1811android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2
1812 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001813 jint _exception = 0;
1814 const char * _exceptionType = NULL;
1815 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001816 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001817 jint _bufferOffset = (jint) 0;
1818 jint _remaining;
1819 GLuint *value = (GLuint *) 0;
1820
Romain Guy84cac202016-12-05 12:26:02 -08001821 if (!value_buf) {
1822 _exception = 1;
1823 _exceptionType = "java/lang/IllegalArgumentException";
1824 _exceptionMessage = "value == null";
1825 goto exit;
1826 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001827 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001828 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001829 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001830 value = (GLuint *) (_valueBase + _bufferOffset);
1831 }
1832 glProgramUniform1uiv(
1833 (GLuint)program,
1834 (GLint)location,
1835 (GLsizei)count,
1836 (GLuint *)value
1837 );
Romain Guy84cac202016-12-05 12:26:02 -08001838
1839exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001840 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001841 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001842 }
Romain Guy84cac202016-12-05 12:26:02 -08001843 if (_exception) {
1844 jniThrowException(_env, _exceptionType, _exceptionMessage);
1845 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001846}
1847
1848/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1849static void
1850android_glProgramUniform2uiv__III_3II
1851 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1852 jint _exception = 0;
1853 const char * _exceptionType = NULL;
1854 const char * _exceptionMessage = NULL;
1855 GLuint *value_base = (GLuint *) 0;
1856 jint _remaining;
1857 GLuint *value = (GLuint *) 0;
1858
1859 if (!value_ref) {
1860 _exception = 1;
1861 _exceptionType = "java/lang/IllegalArgumentException";
1862 _exceptionMessage = "value == null";
1863 goto exit;
1864 }
1865 if (offset < 0) {
1866 _exception = 1;
1867 _exceptionType = "java/lang/IllegalArgumentException";
1868 _exceptionMessage = "offset < 0";
1869 goto exit;
1870 }
1871 _remaining = _env->GetArrayLength(value_ref) - offset;
1872 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001873 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001874 value = value_base + offset;
1875
1876 glProgramUniform2uiv(
1877 (GLuint)program,
1878 (GLint)location,
1879 (GLsizei)count,
1880 (GLuint *)value
1881 );
1882
1883exit:
1884 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001885 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001886 JNI_ABORT);
1887 }
1888 if (_exception) {
1889 jniThrowException(_env, _exceptionType, _exceptionMessage);
1890 }
1891}
1892
1893/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1894static void
1895android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2
1896 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001897 jint _exception = 0;
1898 const char * _exceptionType = NULL;
1899 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001900 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001901 jint _bufferOffset = (jint) 0;
1902 jint _remaining;
1903 GLuint *value = (GLuint *) 0;
1904
Romain Guy84cac202016-12-05 12:26:02 -08001905 if (!value_buf) {
1906 _exception = 1;
1907 _exceptionType = "java/lang/IllegalArgumentException";
1908 _exceptionMessage = "value == null";
1909 goto exit;
1910 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001911 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001912 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001913 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001914 value = (GLuint *) (_valueBase + _bufferOffset);
1915 }
1916 glProgramUniform2uiv(
1917 (GLuint)program,
1918 (GLint)location,
1919 (GLsizei)count,
1920 (GLuint *)value
1921 );
Romain Guy84cac202016-12-05 12:26:02 -08001922
1923exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001924 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001925 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001926 }
Romain Guy84cac202016-12-05 12:26:02 -08001927 if (_exception) {
1928 jniThrowException(_env, _exceptionType, _exceptionMessage);
1929 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001930}
1931
1932/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1933static void
1934android_glProgramUniform3uiv__III_3II
1935 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1936 jint _exception = 0;
1937 const char * _exceptionType = NULL;
1938 const char * _exceptionMessage = NULL;
1939 GLuint *value_base = (GLuint *) 0;
1940 jint _remaining;
1941 GLuint *value = (GLuint *) 0;
1942
1943 if (!value_ref) {
1944 _exception = 1;
1945 _exceptionType = "java/lang/IllegalArgumentException";
1946 _exceptionMessage = "value == null";
1947 goto exit;
1948 }
1949 if (offset < 0) {
1950 _exception = 1;
1951 _exceptionType = "java/lang/IllegalArgumentException";
1952 _exceptionMessage = "offset < 0";
1953 goto exit;
1954 }
1955 _remaining = _env->GetArrayLength(value_ref) - offset;
1956 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001957 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001958 value = value_base + offset;
1959
1960 glProgramUniform3uiv(
1961 (GLuint)program,
1962 (GLint)location,
1963 (GLsizei)count,
1964 (GLuint *)value
1965 );
1966
1967exit:
1968 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001969 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001970 JNI_ABORT);
1971 }
1972 if (_exception) {
1973 jniThrowException(_env, _exceptionType, _exceptionMessage);
1974 }
1975}
1976
1977/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1978static void
1979android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2
1980 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001981 jint _exception = 0;
1982 const char * _exceptionType = NULL;
1983 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001984 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001985 jint _bufferOffset = (jint) 0;
1986 jint _remaining;
1987 GLuint *value = (GLuint *) 0;
1988
Romain Guy84cac202016-12-05 12:26:02 -08001989 if (!value_buf) {
1990 _exception = 1;
1991 _exceptionType = "java/lang/IllegalArgumentException";
1992 _exceptionMessage = "value == null";
1993 goto exit;
1994 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001995 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001996 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001997 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001998 value = (GLuint *) (_valueBase + _bufferOffset);
1999 }
2000 glProgramUniform3uiv(
2001 (GLuint)program,
2002 (GLint)location,
2003 (GLsizei)count,
2004 (GLuint *)value
2005 );
Romain Guy84cac202016-12-05 12:26:02 -08002006
2007exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002008 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002009 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002010 }
Romain Guy84cac202016-12-05 12:26:02 -08002011 if (_exception) {
2012 jniThrowException(_env, _exceptionType, _exceptionMessage);
2013 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002014}
2015
2016/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
2017static void
2018android_glProgramUniform4uiv__III_3II
2019 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
2020 jint _exception = 0;
2021 const char * _exceptionType = NULL;
2022 const char * _exceptionMessage = NULL;
2023 GLuint *value_base = (GLuint *) 0;
2024 jint _remaining;
2025 GLuint *value = (GLuint *) 0;
2026
2027 if (!value_ref) {
2028 _exception = 1;
2029 _exceptionType = "java/lang/IllegalArgumentException";
2030 _exceptionMessage = "value == null";
2031 goto exit;
2032 }
2033 if (offset < 0) {
2034 _exception = 1;
2035 _exceptionType = "java/lang/IllegalArgumentException";
2036 _exceptionMessage = "offset < 0";
2037 goto exit;
2038 }
2039 _remaining = _env->GetArrayLength(value_ref) - offset;
2040 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002041 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002042 value = value_base + offset;
2043
2044 glProgramUniform4uiv(
2045 (GLuint)program,
2046 (GLint)location,
2047 (GLsizei)count,
2048 (GLuint *)value
2049 );
2050
2051exit:
2052 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002053 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002054 JNI_ABORT);
2055 }
2056 if (_exception) {
2057 jniThrowException(_env, _exceptionType, _exceptionMessage);
2058 }
2059}
2060
2061/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
2062static void
2063android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2
2064 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002065 jint _exception = 0;
2066 const char * _exceptionType = NULL;
2067 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002068 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002069 jint _bufferOffset = (jint) 0;
2070 jint _remaining;
2071 GLuint *value = (GLuint *) 0;
2072
Romain Guy84cac202016-12-05 12:26:02 -08002073 if (!value_buf) {
2074 _exception = 1;
2075 _exceptionType = "java/lang/IllegalArgumentException";
2076 _exceptionMessage = "value == null";
2077 goto exit;
2078 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002079 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002080 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002081 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002082 value = (GLuint *) (_valueBase + _bufferOffset);
2083 }
2084 glProgramUniform4uiv(
2085 (GLuint)program,
2086 (GLint)location,
2087 (GLsizei)count,
2088 (GLuint *)value
2089 );
Romain Guy84cac202016-12-05 12:26:02 -08002090
2091exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002092 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002093 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002094 }
Romain Guy84cac202016-12-05 12:26:02 -08002095 if (_exception) {
2096 jniThrowException(_env, _exceptionType, _exceptionMessage);
2097 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002098}
2099
2100/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2101static void
2102android_glProgramUniform1fv__III_3FI
2103 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2104 jint _exception = 0;
2105 const char * _exceptionType = NULL;
2106 const char * _exceptionMessage = NULL;
2107 GLfloat *value_base = (GLfloat *) 0;
2108 jint _remaining;
2109 GLfloat *value = (GLfloat *) 0;
2110
2111 if (!value_ref) {
2112 _exception = 1;
2113 _exceptionType = "java/lang/IllegalArgumentException";
2114 _exceptionMessage = "value == null";
2115 goto exit;
2116 }
2117 if (offset < 0) {
2118 _exception = 1;
2119 _exceptionType = "java/lang/IllegalArgumentException";
2120 _exceptionMessage = "offset < 0";
2121 goto exit;
2122 }
2123 _remaining = _env->GetArrayLength(value_ref) - offset;
2124 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002125 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002126 value = value_base + offset;
2127
2128 glProgramUniform1fv(
2129 (GLuint)program,
2130 (GLint)location,
2131 (GLsizei)count,
2132 (GLfloat *)value
2133 );
2134
2135exit:
2136 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002137 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002138 JNI_ABORT);
2139 }
2140 if (_exception) {
2141 jniThrowException(_env, _exceptionType, _exceptionMessage);
2142 }
2143}
2144
2145/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2146static void
2147android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2
2148 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002149 jint _exception = 0;
2150 const char * _exceptionType = NULL;
2151 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002152 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002153 jint _bufferOffset = (jint) 0;
2154 jint _remaining;
2155 GLfloat *value = (GLfloat *) 0;
2156
Romain Guy84cac202016-12-05 12:26:02 -08002157 if (!value_buf) {
2158 _exception = 1;
2159 _exceptionType = "java/lang/IllegalArgumentException";
2160 _exceptionMessage = "value == null";
2161 goto exit;
2162 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002163 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002164 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002165 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002166 value = (GLfloat *) (_valueBase + _bufferOffset);
2167 }
2168 glProgramUniform1fv(
2169 (GLuint)program,
2170 (GLint)location,
2171 (GLsizei)count,
2172 (GLfloat *)value
2173 );
Romain Guy84cac202016-12-05 12:26:02 -08002174
2175exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002176 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002177 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002178 }
Romain Guy84cac202016-12-05 12:26:02 -08002179 if (_exception) {
2180 jniThrowException(_env, _exceptionType, _exceptionMessage);
2181 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002182}
2183
2184/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2185static void
2186android_glProgramUniform2fv__III_3FI
2187 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2188 jint _exception = 0;
2189 const char * _exceptionType = NULL;
2190 const char * _exceptionMessage = NULL;
2191 GLfloat *value_base = (GLfloat *) 0;
2192 jint _remaining;
2193 GLfloat *value = (GLfloat *) 0;
2194
2195 if (!value_ref) {
2196 _exception = 1;
2197 _exceptionType = "java/lang/IllegalArgumentException";
2198 _exceptionMessage = "value == null";
2199 goto exit;
2200 }
2201 if (offset < 0) {
2202 _exception = 1;
2203 _exceptionType = "java/lang/IllegalArgumentException";
2204 _exceptionMessage = "offset < 0";
2205 goto exit;
2206 }
2207 _remaining = _env->GetArrayLength(value_ref) - offset;
2208 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002209 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002210 value = value_base + offset;
2211
2212 glProgramUniform2fv(
2213 (GLuint)program,
2214 (GLint)location,
2215 (GLsizei)count,
2216 (GLfloat *)value
2217 );
2218
2219exit:
2220 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002221 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002222 JNI_ABORT);
2223 }
2224 if (_exception) {
2225 jniThrowException(_env, _exceptionType, _exceptionMessage);
2226 }
2227}
2228
2229/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2230static void
2231android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2
2232 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002233 jint _exception = 0;
2234 const char * _exceptionType = NULL;
2235 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002236 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002237 jint _bufferOffset = (jint) 0;
2238 jint _remaining;
2239 GLfloat *value = (GLfloat *) 0;
2240
Romain Guy84cac202016-12-05 12:26:02 -08002241 if (!value_buf) {
2242 _exception = 1;
2243 _exceptionType = "java/lang/IllegalArgumentException";
2244 _exceptionMessage = "value == null";
2245 goto exit;
2246 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002247 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002248 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002249 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002250 value = (GLfloat *) (_valueBase + _bufferOffset);
2251 }
2252 glProgramUniform2fv(
2253 (GLuint)program,
2254 (GLint)location,
2255 (GLsizei)count,
2256 (GLfloat *)value
2257 );
Romain Guy84cac202016-12-05 12:26:02 -08002258
2259exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002260 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002261 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002262 }
Romain Guy84cac202016-12-05 12:26:02 -08002263 if (_exception) {
2264 jniThrowException(_env, _exceptionType, _exceptionMessage);
2265 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002266}
2267
2268/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2269static void
2270android_glProgramUniform3fv__III_3FI
2271 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2272 jint _exception = 0;
2273 const char * _exceptionType = NULL;
2274 const char * _exceptionMessage = NULL;
2275 GLfloat *value_base = (GLfloat *) 0;
2276 jint _remaining;
2277 GLfloat *value = (GLfloat *) 0;
2278
2279 if (!value_ref) {
2280 _exception = 1;
2281 _exceptionType = "java/lang/IllegalArgumentException";
2282 _exceptionMessage = "value == null";
2283 goto exit;
2284 }
2285 if (offset < 0) {
2286 _exception = 1;
2287 _exceptionType = "java/lang/IllegalArgumentException";
2288 _exceptionMessage = "offset < 0";
2289 goto exit;
2290 }
2291 _remaining = _env->GetArrayLength(value_ref) - offset;
2292 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002293 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002294 value = value_base + offset;
2295
2296 glProgramUniform3fv(
2297 (GLuint)program,
2298 (GLint)location,
2299 (GLsizei)count,
2300 (GLfloat *)value
2301 );
2302
2303exit:
2304 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002305 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002306 JNI_ABORT);
2307 }
2308 if (_exception) {
2309 jniThrowException(_env, _exceptionType, _exceptionMessage);
2310 }
2311}
2312
2313/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2314static void
2315android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2
2316 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002317 jint _exception = 0;
2318 const char * _exceptionType = NULL;
2319 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002320 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002321 jint _bufferOffset = (jint) 0;
2322 jint _remaining;
2323 GLfloat *value = (GLfloat *) 0;
2324
Romain Guy84cac202016-12-05 12:26:02 -08002325 if (!value_buf) {
2326 _exception = 1;
2327 _exceptionType = "java/lang/IllegalArgumentException";
2328 _exceptionMessage = "value == null";
2329 goto exit;
2330 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002331 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002332 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002333 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002334 value = (GLfloat *) (_valueBase + _bufferOffset);
2335 }
2336 glProgramUniform3fv(
2337 (GLuint)program,
2338 (GLint)location,
2339 (GLsizei)count,
2340 (GLfloat *)value
2341 );
Romain Guy84cac202016-12-05 12:26:02 -08002342
2343exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002344 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002345 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002346 }
Romain Guy84cac202016-12-05 12:26:02 -08002347 if (_exception) {
2348 jniThrowException(_env, _exceptionType, _exceptionMessage);
2349 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002350}
2351
2352/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2353static void
2354android_glProgramUniform4fv__III_3FI
2355 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2356 jint _exception = 0;
2357 const char * _exceptionType = NULL;
2358 const char * _exceptionMessage = NULL;
2359 GLfloat *value_base = (GLfloat *) 0;
2360 jint _remaining;
2361 GLfloat *value = (GLfloat *) 0;
2362
2363 if (!value_ref) {
2364 _exception = 1;
2365 _exceptionType = "java/lang/IllegalArgumentException";
2366 _exceptionMessage = "value == null";
2367 goto exit;
2368 }
2369 if (offset < 0) {
2370 _exception = 1;
2371 _exceptionType = "java/lang/IllegalArgumentException";
2372 _exceptionMessage = "offset < 0";
2373 goto exit;
2374 }
2375 _remaining = _env->GetArrayLength(value_ref) - offset;
2376 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002377 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002378 value = value_base + offset;
2379
2380 glProgramUniform4fv(
2381 (GLuint)program,
2382 (GLint)location,
2383 (GLsizei)count,
2384 (GLfloat *)value
2385 );
2386
2387exit:
2388 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002389 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002390 JNI_ABORT);
2391 }
2392 if (_exception) {
2393 jniThrowException(_env, _exceptionType, _exceptionMessage);
2394 }
2395}
2396
2397/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2398static void
2399android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2
2400 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002401 jint _exception = 0;
2402 const char * _exceptionType = NULL;
2403 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002404 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002405 jint _bufferOffset = (jint) 0;
2406 jint _remaining;
2407 GLfloat *value = (GLfloat *) 0;
2408
Romain Guy84cac202016-12-05 12:26:02 -08002409 if (!value_buf) {
2410 _exception = 1;
2411 _exceptionType = "java/lang/IllegalArgumentException";
2412 _exceptionMessage = "value == null";
2413 goto exit;
2414 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002415 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002416 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002417 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002418 value = (GLfloat *) (_valueBase + _bufferOffset);
2419 }
2420 glProgramUniform4fv(
2421 (GLuint)program,
2422 (GLint)location,
2423 (GLsizei)count,
2424 (GLfloat *)value
2425 );
Romain Guy84cac202016-12-05 12:26:02 -08002426
2427exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002428 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002429 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002430 }
Romain Guy84cac202016-12-05 12:26:02 -08002431 if (_exception) {
2432 jniThrowException(_env, _exceptionType, _exceptionMessage);
2433 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002434}
2435
2436/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2437static void
2438android_glProgramUniformMatrix2fv__IIIZ_3FI
2439 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2440 jint _exception = 0;
2441 const char * _exceptionType = NULL;
2442 const char * _exceptionMessage = NULL;
2443 GLfloat *value_base = (GLfloat *) 0;
2444 jint _remaining;
2445 GLfloat *value = (GLfloat *) 0;
2446
2447 if (!value_ref) {
2448 _exception = 1;
2449 _exceptionType = "java/lang/IllegalArgumentException";
2450 _exceptionMessage = "value == null";
2451 goto exit;
2452 }
2453 if (offset < 0) {
2454 _exception = 1;
2455 _exceptionType = "java/lang/IllegalArgumentException";
2456 _exceptionMessage = "offset < 0";
2457 goto exit;
2458 }
2459 _remaining = _env->GetArrayLength(value_ref) - offset;
2460 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002461 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002462 value = value_base + offset;
2463
2464 glProgramUniformMatrix2fv(
2465 (GLuint)program,
2466 (GLint)location,
2467 (GLsizei)count,
2468 (GLboolean)transpose,
2469 (GLfloat *)value
2470 );
2471
2472exit:
2473 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002474 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002475 JNI_ABORT);
2476 }
2477 if (_exception) {
2478 jniThrowException(_env, _exceptionType, _exceptionMessage);
2479 }
2480}
2481
2482/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2483static void
2484android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2
2485 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002486 jint _exception = 0;
2487 const char * _exceptionType = NULL;
2488 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002489 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002490 jint _bufferOffset = (jint) 0;
2491 jint _remaining;
2492 GLfloat *value = (GLfloat *) 0;
2493
Romain Guy84cac202016-12-05 12:26:02 -08002494 if (!value_buf) {
2495 _exception = 1;
2496 _exceptionType = "java/lang/IllegalArgumentException";
2497 _exceptionMessage = "value == null";
2498 goto exit;
2499 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002500 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002501 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002502 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002503 value = (GLfloat *) (_valueBase + _bufferOffset);
2504 }
2505 glProgramUniformMatrix2fv(
2506 (GLuint)program,
2507 (GLint)location,
2508 (GLsizei)count,
2509 (GLboolean)transpose,
2510 (GLfloat *)value
2511 );
Romain Guy84cac202016-12-05 12:26:02 -08002512
2513exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002514 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002515 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002516 }
Romain Guy84cac202016-12-05 12:26:02 -08002517 if (_exception) {
2518 jniThrowException(_env, _exceptionType, _exceptionMessage);
2519 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002520}
2521
2522/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2523static void
2524android_glProgramUniformMatrix3fv__IIIZ_3FI
2525 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2526 jint _exception = 0;
2527 const char * _exceptionType = NULL;
2528 const char * _exceptionMessage = NULL;
2529 GLfloat *value_base = (GLfloat *) 0;
2530 jint _remaining;
2531 GLfloat *value = (GLfloat *) 0;
2532
2533 if (!value_ref) {
2534 _exception = 1;
2535 _exceptionType = "java/lang/IllegalArgumentException";
2536 _exceptionMessage = "value == null";
2537 goto exit;
2538 }
2539 if (offset < 0) {
2540 _exception = 1;
2541 _exceptionType = "java/lang/IllegalArgumentException";
2542 _exceptionMessage = "offset < 0";
2543 goto exit;
2544 }
2545 _remaining = _env->GetArrayLength(value_ref) - offset;
2546 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002547 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002548 value = value_base + offset;
2549
2550 glProgramUniformMatrix3fv(
2551 (GLuint)program,
2552 (GLint)location,
2553 (GLsizei)count,
2554 (GLboolean)transpose,
2555 (GLfloat *)value
2556 );
2557
2558exit:
2559 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002560 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002561 JNI_ABORT);
2562 }
2563 if (_exception) {
2564 jniThrowException(_env, _exceptionType, _exceptionMessage);
2565 }
2566}
2567
2568/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2569static void
2570android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2
2571 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002572 jint _exception = 0;
2573 const char * _exceptionType = NULL;
2574 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002575 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002576 jint _bufferOffset = (jint) 0;
2577 jint _remaining;
2578 GLfloat *value = (GLfloat *) 0;
2579
Romain Guy84cac202016-12-05 12:26:02 -08002580 if (!value_buf) {
2581 _exception = 1;
2582 _exceptionType = "java/lang/IllegalArgumentException";
2583 _exceptionMessage = "value == null";
2584 goto exit;
2585 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002586 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002587 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002588 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002589 value = (GLfloat *) (_valueBase + _bufferOffset);
2590 }
2591 glProgramUniformMatrix3fv(
2592 (GLuint)program,
2593 (GLint)location,
2594 (GLsizei)count,
2595 (GLboolean)transpose,
2596 (GLfloat *)value
2597 );
Romain Guy84cac202016-12-05 12:26:02 -08002598
2599exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002600 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002601 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002602 }
Romain Guy84cac202016-12-05 12:26:02 -08002603 if (_exception) {
2604 jniThrowException(_env, _exceptionType, _exceptionMessage);
2605 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002606}
2607
2608/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2609static void
2610android_glProgramUniformMatrix4fv__IIIZ_3FI
2611 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2612 jint _exception = 0;
2613 const char * _exceptionType = NULL;
2614 const char * _exceptionMessage = NULL;
2615 GLfloat *value_base = (GLfloat *) 0;
2616 jint _remaining;
2617 GLfloat *value = (GLfloat *) 0;
2618
2619 if (!value_ref) {
2620 _exception = 1;
2621 _exceptionType = "java/lang/IllegalArgumentException";
2622 _exceptionMessage = "value == null";
2623 goto exit;
2624 }
2625 if (offset < 0) {
2626 _exception = 1;
2627 _exceptionType = "java/lang/IllegalArgumentException";
2628 _exceptionMessage = "offset < 0";
2629 goto exit;
2630 }
2631 _remaining = _env->GetArrayLength(value_ref) - offset;
2632 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002633 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002634 value = value_base + offset;
2635
2636 glProgramUniformMatrix4fv(
2637 (GLuint)program,
2638 (GLint)location,
2639 (GLsizei)count,
2640 (GLboolean)transpose,
2641 (GLfloat *)value
2642 );
2643
2644exit:
2645 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002646 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002647 JNI_ABORT);
2648 }
2649 if (_exception) {
2650 jniThrowException(_env, _exceptionType, _exceptionMessage);
2651 }
2652}
2653
2654/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2655static void
2656android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2
2657 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002658 jint _exception = 0;
2659 const char * _exceptionType = NULL;
2660 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002661 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002662 jint _bufferOffset = (jint) 0;
2663 jint _remaining;
2664 GLfloat *value = (GLfloat *) 0;
2665
Romain Guy84cac202016-12-05 12:26:02 -08002666 if (!value_buf) {
2667 _exception = 1;
2668 _exceptionType = "java/lang/IllegalArgumentException";
2669 _exceptionMessage = "value == null";
2670 goto exit;
2671 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002672 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002673 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002674 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002675 value = (GLfloat *) (_valueBase + _bufferOffset);
2676 }
2677 glProgramUniformMatrix4fv(
2678 (GLuint)program,
2679 (GLint)location,
2680 (GLsizei)count,
2681 (GLboolean)transpose,
2682 (GLfloat *)value
2683 );
Romain Guy84cac202016-12-05 12:26:02 -08002684
2685exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002686 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002687 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002688 }
Romain Guy84cac202016-12-05 12:26:02 -08002689 if (_exception) {
2690 jniThrowException(_env, _exceptionType, _exceptionMessage);
2691 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002692}
2693
2694/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2695static void
2696android_glProgramUniformMatrix2x3fv__IIIZ_3FI
2697 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2698 jint _exception = 0;
2699 const char * _exceptionType = NULL;
2700 const char * _exceptionMessage = NULL;
2701 GLfloat *value_base = (GLfloat *) 0;
2702 jint _remaining;
2703 GLfloat *value = (GLfloat *) 0;
2704
2705 if (!value_ref) {
2706 _exception = 1;
2707 _exceptionType = "java/lang/IllegalArgumentException";
2708 _exceptionMessage = "value == null";
2709 goto exit;
2710 }
2711 if (offset < 0) {
2712 _exception = 1;
2713 _exceptionType = "java/lang/IllegalArgumentException";
2714 _exceptionMessage = "offset < 0";
2715 goto exit;
2716 }
2717 _remaining = _env->GetArrayLength(value_ref) - offset;
2718 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002719 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002720 value = value_base + offset;
2721
2722 glProgramUniformMatrix2x3fv(
2723 (GLuint)program,
2724 (GLint)location,
2725 (GLsizei)count,
2726 (GLboolean)transpose,
2727 (GLfloat *)value
2728 );
2729
2730exit:
2731 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002732 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002733 JNI_ABORT);
2734 }
2735 if (_exception) {
2736 jniThrowException(_env, _exceptionType, _exceptionMessage);
2737 }
2738}
2739
2740/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2741static void
2742android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2
2743 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002744 jint _exception = 0;
2745 const char * _exceptionType = NULL;
2746 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002747 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002748 jint _bufferOffset = (jint) 0;
2749 jint _remaining;
2750 GLfloat *value = (GLfloat *) 0;
2751
Romain Guy84cac202016-12-05 12:26:02 -08002752 if (!value_buf) {
2753 _exception = 1;
2754 _exceptionType = "java/lang/IllegalArgumentException";
2755 _exceptionMessage = "value == null";
2756 goto exit;
2757 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002758 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002759 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002760 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002761 value = (GLfloat *) (_valueBase + _bufferOffset);
2762 }
2763 glProgramUniformMatrix2x3fv(
2764 (GLuint)program,
2765 (GLint)location,
2766 (GLsizei)count,
2767 (GLboolean)transpose,
2768 (GLfloat *)value
2769 );
Romain Guy84cac202016-12-05 12:26:02 -08002770
2771exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002772 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002773 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002774 }
Romain Guy84cac202016-12-05 12:26:02 -08002775 if (_exception) {
2776 jniThrowException(_env, _exceptionType, _exceptionMessage);
2777 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002778}
2779
2780/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2781static void
2782android_glProgramUniformMatrix3x2fv__IIIZ_3FI
2783 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2784 jint _exception = 0;
2785 const char * _exceptionType = NULL;
2786 const char * _exceptionMessage = NULL;
2787 GLfloat *value_base = (GLfloat *) 0;
2788 jint _remaining;
2789 GLfloat *value = (GLfloat *) 0;
2790
2791 if (!value_ref) {
2792 _exception = 1;
2793 _exceptionType = "java/lang/IllegalArgumentException";
2794 _exceptionMessage = "value == 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(value_ref) - offset;
2804 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002805 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002806 value = value_base + offset;
2807
2808 glProgramUniformMatrix3x2fv(
2809 (GLuint)program,
2810 (GLint)location,
2811 (GLsizei)count,
2812 (GLboolean)transpose,
2813 (GLfloat *)value
2814 );
2815
2816exit:
2817 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002818 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002819 JNI_ABORT);
2820 }
2821 if (_exception) {
2822 jniThrowException(_env, _exceptionType, _exceptionMessage);
2823 }
2824}
2825
2826/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2827static void
2828android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2
2829 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002830 jint _exception = 0;
2831 const char * _exceptionType = NULL;
2832 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002833 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002834 jint _bufferOffset = (jint) 0;
2835 jint _remaining;
2836 GLfloat *value = (GLfloat *) 0;
2837
Romain Guy84cac202016-12-05 12:26:02 -08002838 if (!value_buf) {
2839 _exception = 1;
2840 _exceptionType = "java/lang/IllegalArgumentException";
2841 _exceptionMessage = "value == null";
2842 goto exit;
2843 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002844 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002845 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002846 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002847 value = (GLfloat *) (_valueBase + _bufferOffset);
2848 }
2849 glProgramUniformMatrix3x2fv(
2850 (GLuint)program,
2851 (GLint)location,
2852 (GLsizei)count,
2853 (GLboolean)transpose,
2854 (GLfloat *)value
2855 );
Romain Guy84cac202016-12-05 12:26:02 -08002856
2857exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002858 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002859 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002860 }
Romain Guy84cac202016-12-05 12:26:02 -08002861 if (_exception) {
2862 jniThrowException(_env, _exceptionType, _exceptionMessage);
2863 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002864}
2865
2866/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2867static void
2868android_glProgramUniformMatrix2x4fv__IIIZ_3FI
2869 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2870 jint _exception = 0;
2871 const char * _exceptionType = NULL;
2872 const char * _exceptionMessage = NULL;
2873 GLfloat *value_base = (GLfloat *) 0;
2874 jint _remaining;
2875 GLfloat *value = (GLfloat *) 0;
2876
2877 if (!value_ref) {
2878 _exception = 1;
2879 _exceptionType = "java/lang/IllegalArgumentException";
2880 _exceptionMessage = "value == null";
2881 goto exit;
2882 }
2883 if (offset < 0) {
2884 _exception = 1;
2885 _exceptionType = "java/lang/IllegalArgumentException";
2886 _exceptionMessage = "offset < 0";
2887 goto exit;
2888 }
2889 _remaining = _env->GetArrayLength(value_ref) - offset;
2890 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002891 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002892 value = value_base + offset;
2893
2894 glProgramUniformMatrix2x4fv(
2895 (GLuint)program,
2896 (GLint)location,
2897 (GLsizei)count,
2898 (GLboolean)transpose,
2899 (GLfloat *)value
2900 );
2901
2902exit:
2903 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002904 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002905 JNI_ABORT);
2906 }
2907 if (_exception) {
2908 jniThrowException(_env, _exceptionType, _exceptionMessage);
2909 }
2910}
2911
2912/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2913static void
2914android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2
2915 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002916 jint _exception = 0;
2917 const char * _exceptionType = NULL;
2918 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002919 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002920 jint _bufferOffset = (jint) 0;
2921 jint _remaining;
2922 GLfloat *value = (GLfloat *) 0;
2923
Romain Guy84cac202016-12-05 12:26:02 -08002924 if (!value_buf) {
2925 _exception = 1;
2926 _exceptionType = "java/lang/IllegalArgumentException";
2927 _exceptionMessage = "value == null";
2928 goto exit;
2929 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002930 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002931 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002932 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002933 value = (GLfloat *) (_valueBase + _bufferOffset);
2934 }
2935 glProgramUniformMatrix2x4fv(
2936 (GLuint)program,
2937 (GLint)location,
2938 (GLsizei)count,
2939 (GLboolean)transpose,
2940 (GLfloat *)value
2941 );
Romain Guy84cac202016-12-05 12:26:02 -08002942
2943exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002944 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002945 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002946 }
Romain Guy84cac202016-12-05 12:26:02 -08002947 if (_exception) {
2948 jniThrowException(_env, _exceptionType, _exceptionMessage);
2949 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002950}
2951
2952/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2953static void
2954android_glProgramUniformMatrix4x2fv__IIIZ_3FI
2955 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2956 jint _exception = 0;
2957 const char * _exceptionType = NULL;
2958 const char * _exceptionMessage = NULL;
2959 GLfloat *value_base = (GLfloat *) 0;
2960 jint _remaining;
2961 GLfloat *value = (GLfloat *) 0;
2962
2963 if (!value_ref) {
2964 _exception = 1;
2965 _exceptionType = "java/lang/IllegalArgumentException";
2966 _exceptionMessage = "value == null";
2967 goto exit;
2968 }
2969 if (offset < 0) {
2970 _exception = 1;
2971 _exceptionType = "java/lang/IllegalArgumentException";
2972 _exceptionMessage = "offset < 0";
2973 goto exit;
2974 }
2975 _remaining = _env->GetArrayLength(value_ref) - offset;
2976 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002977 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002978 value = value_base + offset;
2979
2980 glProgramUniformMatrix4x2fv(
2981 (GLuint)program,
2982 (GLint)location,
2983 (GLsizei)count,
2984 (GLboolean)transpose,
2985 (GLfloat *)value
2986 );
2987
2988exit:
2989 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002990 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002991 JNI_ABORT);
2992 }
2993 if (_exception) {
2994 jniThrowException(_env, _exceptionType, _exceptionMessage);
2995 }
2996}
2997
2998/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2999static void
3000android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2
3001 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003002 jint _exception = 0;
3003 const char * _exceptionType = NULL;
3004 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003005 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003006 jint _bufferOffset = (jint) 0;
3007 jint _remaining;
3008 GLfloat *value = (GLfloat *) 0;
3009
Romain Guy84cac202016-12-05 12:26:02 -08003010 if (!value_buf) {
3011 _exception = 1;
3012 _exceptionType = "java/lang/IllegalArgumentException";
3013 _exceptionMessage = "value == null";
3014 goto exit;
3015 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003016 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003017 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003018 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003019 value = (GLfloat *) (_valueBase + _bufferOffset);
3020 }
3021 glProgramUniformMatrix4x2fv(
3022 (GLuint)program,
3023 (GLint)location,
3024 (GLsizei)count,
3025 (GLboolean)transpose,
3026 (GLfloat *)value
3027 );
Romain Guy84cac202016-12-05 12:26:02 -08003028
3029exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003030 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003031 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003032 }
Romain Guy84cac202016-12-05 12:26:02 -08003033 if (_exception) {
3034 jniThrowException(_env, _exceptionType, _exceptionMessage);
3035 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003036}
3037
3038/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3039static void
3040android_glProgramUniformMatrix3x4fv__IIIZ_3FI
3041 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3042 jint _exception = 0;
3043 const char * _exceptionType = NULL;
3044 const char * _exceptionMessage = NULL;
3045 GLfloat *value_base = (GLfloat *) 0;
3046 jint _remaining;
3047 GLfloat *value = (GLfloat *) 0;
3048
3049 if (!value_ref) {
3050 _exception = 1;
3051 _exceptionType = "java/lang/IllegalArgumentException";
3052 _exceptionMessage = "value == null";
3053 goto exit;
3054 }
3055 if (offset < 0) {
3056 _exception = 1;
3057 _exceptionType = "java/lang/IllegalArgumentException";
3058 _exceptionMessage = "offset < 0";
3059 goto exit;
3060 }
3061 _remaining = _env->GetArrayLength(value_ref) - offset;
3062 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003063 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003064 value = value_base + offset;
3065
3066 glProgramUniformMatrix3x4fv(
3067 (GLuint)program,
3068 (GLint)location,
3069 (GLsizei)count,
3070 (GLboolean)transpose,
3071 (GLfloat *)value
3072 );
3073
3074exit:
3075 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003076 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003077 JNI_ABORT);
3078 }
3079 if (_exception) {
3080 jniThrowException(_env, _exceptionType, _exceptionMessage);
3081 }
3082}
3083
3084/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3085static void
3086android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2
3087 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003088 jint _exception = 0;
3089 const char * _exceptionType = NULL;
3090 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003091 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003092 jint _bufferOffset = (jint) 0;
3093 jint _remaining;
3094 GLfloat *value = (GLfloat *) 0;
3095
Romain Guy84cac202016-12-05 12:26:02 -08003096 if (!value_buf) {
3097 _exception = 1;
3098 _exceptionType = "java/lang/IllegalArgumentException";
3099 _exceptionMessage = "value == null";
3100 goto exit;
3101 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003102 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003103 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003104 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003105 value = (GLfloat *) (_valueBase + _bufferOffset);
3106 }
3107 glProgramUniformMatrix3x4fv(
3108 (GLuint)program,
3109 (GLint)location,
3110 (GLsizei)count,
3111 (GLboolean)transpose,
3112 (GLfloat *)value
3113 );
Romain Guy84cac202016-12-05 12:26:02 -08003114
3115exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003116 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003117 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003118 }
Romain Guy84cac202016-12-05 12:26:02 -08003119 if (_exception) {
3120 jniThrowException(_env, _exceptionType, _exceptionMessage);
3121 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003122}
3123
3124/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3125static void
3126android_glProgramUniformMatrix4x3fv__IIIZ_3FI
3127 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3128 jint _exception = 0;
3129 const char * _exceptionType = NULL;
3130 const char * _exceptionMessage = NULL;
3131 GLfloat *value_base = (GLfloat *) 0;
3132 jint _remaining;
3133 GLfloat *value = (GLfloat *) 0;
3134
3135 if (!value_ref) {
3136 _exception = 1;
3137 _exceptionType = "java/lang/IllegalArgumentException";
3138 _exceptionMessage = "value == null";
3139 goto exit;
3140 }
3141 if (offset < 0) {
3142 _exception = 1;
3143 _exceptionType = "java/lang/IllegalArgumentException";
3144 _exceptionMessage = "offset < 0";
3145 goto exit;
3146 }
3147 _remaining = _env->GetArrayLength(value_ref) - offset;
3148 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003149 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003150 value = value_base + offset;
3151
3152 glProgramUniformMatrix4x3fv(
3153 (GLuint)program,
3154 (GLint)location,
3155 (GLsizei)count,
3156 (GLboolean)transpose,
3157 (GLfloat *)value
3158 );
3159
3160exit:
3161 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003162 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003163 JNI_ABORT);
3164 }
3165 if (_exception) {
3166 jniThrowException(_env, _exceptionType, _exceptionMessage);
3167 }
3168}
3169
3170/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3171static void
3172android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2
3173 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003174 jint _exception = 0;
3175 const char * _exceptionType = NULL;
3176 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003177 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003178 jint _bufferOffset = (jint) 0;
3179 jint _remaining;
3180 GLfloat *value = (GLfloat *) 0;
3181
Romain Guy84cac202016-12-05 12:26:02 -08003182 if (!value_buf) {
3183 _exception = 1;
3184 _exceptionType = "java/lang/IllegalArgumentException";
3185 _exceptionMessage = "value == null";
3186 goto exit;
3187 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003188 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003189 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003190 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003191 value = (GLfloat *) (_valueBase + _bufferOffset);
3192 }
3193 glProgramUniformMatrix4x3fv(
3194 (GLuint)program,
3195 (GLint)location,
3196 (GLsizei)count,
3197 (GLboolean)transpose,
3198 (GLfloat *)value
3199 );
Romain Guy84cac202016-12-05 12:26:02 -08003200
3201exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003202 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003203 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003204 }
Romain Guy84cac202016-12-05 12:26:02 -08003205 if (_exception) {
3206 jniThrowException(_env, _exceptionType, _exceptionMessage);
3207 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003208}
3209
3210/* void glValidateProgramPipeline ( GLuint pipeline ) */
3211static void
3212android_glValidateProgramPipeline__I
3213 (JNIEnv *_env, jobject _this, jint pipeline) {
3214 glValidateProgramPipeline(
3215 (GLuint)pipeline
3216 );
3217}
3218
3219#include <stdlib.h>
3220
3221/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
3222static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
3223 GLint infoLen = 0;
3224 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
3225 if (!infoLen) {
3226 return _env->NewStringUTF("");
3227 }
3228 char* buf = (char*) malloc(infoLen);
3229 if (buf == NULL) {
3230 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
3231 return NULL;
3232 }
3233 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
3234 jstring result = _env->NewStringUTF(buf);
3235 free(buf);
3236 return result;
3237}
3238/* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */
3239static void
3240android_glBindImageTexture__IIIZIII
3241 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) {
3242 glBindImageTexture(
3243 (GLuint)unit,
3244 (GLuint)texture,
3245 (GLint)level,
3246 (GLboolean)layered,
3247 (GLint)layer,
3248 (GLenum)access,
3249 (GLenum)format
3250 );
3251}
3252
3253/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3254static void
3255android_glGetBooleani_v__II_3ZI
3256 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) {
3257 jint _exception = 0;
3258 const char * _exceptionType = NULL;
3259 const char * _exceptionMessage = NULL;
3260 GLboolean *data_base = (GLboolean *) 0;
3261 jint _remaining;
3262 GLboolean *data = (GLboolean *) 0;
3263
3264 if (!data_ref) {
3265 _exception = 1;
3266 _exceptionType = "java/lang/IllegalArgumentException";
3267 _exceptionMessage = "data == null";
3268 goto exit;
3269 }
3270 if (offset < 0) {
3271 _exception = 1;
3272 _exceptionType = "java/lang/IllegalArgumentException";
3273 _exceptionMessage = "offset < 0";
3274 goto exit;
3275 }
3276 _remaining = _env->GetArrayLength(data_ref) - offset;
3277 data_base = (GLboolean *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003278 _env->GetBooleanArrayElements(data_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003279 data = data_base + offset;
3280
3281 glGetBooleani_v(
3282 (GLenum)target,
3283 (GLuint)index,
3284 (GLboolean *)data
3285 );
3286
3287exit:
3288 if (data_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003289 _env->ReleaseBooleanArrayElements(data_ref, (jboolean*)data_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003290 _exception ? JNI_ABORT: 0);
3291 }
3292 if (_exception) {
3293 jniThrowException(_env, _exceptionType, _exceptionMessage);
3294 }
3295}
3296
3297/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3298static void
3299android_glGetBooleani_v__IILjava_nio_IntBuffer_2
3300 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003301 jint _exception = 0;
3302 const char * _exceptionType = NULL;
3303 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003304 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003305 jint _bufferOffset = (jint) 0;
3306 jint _remaining;
3307 GLboolean *data = (GLboolean *) 0;
3308
Romain Guy84cac202016-12-05 12:26:02 -08003309 if (!data_buf) {
3310 _exception = 1;
3311 _exceptionType = "java/lang/IllegalArgumentException";
3312 _exceptionMessage = "data == null";
3313 goto exit;
3314 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003315 data = (GLboolean *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003316 if (data == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003317 char * _dataBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003318 data = (GLboolean *) (_dataBase + _bufferOffset);
3319 }
3320 glGetBooleani_v(
3321 (GLenum)target,
3322 (GLuint)index,
3323 (GLboolean *)data
3324 );
Romain Guy84cac202016-12-05 12:26:02 -08003325
3326exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003327 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003328 _env->ReleaseIntArrayElements(_array, (jint*)data, _exception ? JNI_ABORT : 0);
3329 }
3330 if (_exception) {
3331 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003332 }
3333}
3334
3335/* void glMemoryBarrier ( GLbitfield barriers ) */
3336static void
3337android_glMemoryBarrier__I
3338 (JNIEnv *_env, jobject _this, jint barriers) {
3339 glMemoryBarrier(
3340 (GLbitfield)barriers
3341 );
3342}
3343
3344/* void glMemoryBarrierByRegion ( GLbitfield barriers ) */
3345static void
3346android_glMemoryBarrierByRegion__I
3347 (JNIEnv *_env, jobject _this, jint barriers) {
3348 glMemoryBarrierByRegion(
3349 (GLbitfield)barriers
3350 );
3351}
3352
3353/* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */
3354static void
3355android_glTexStorage2DMultisample__IIIIIZ
3356 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) {
3357 glTexStorage2DMultisample(
3358 (GLenum)target,
3359 (GLsizei)samples,
3360 (GLenum)internalformat,
3361 (GLsizei)width,
3362 (GLsizei)height,
3363 (GLboolean)fixedsamplelocations
3364 );
3365}
3366
3367/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3368static void
3369android_glGetMultisamplefv__II_3FI
3370 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) {
3371 jint _exception = 0;
3372 const char * _exceptionType = NULL;
3373 const char * _exceptionMessage = NULL;
3374 GLfloat *val_base = (GLfloat *) 0;
3375 jint _remaining;
3376 GLfloat *val = (GLfloat *) 0;
3377
3378 if (!val_ref) {
3379 _exception = 1;
3380 _exceptionType = "java/lang/IllegalArgumentException";
3381 _exceptionMessage = "val == null";
3382 goto exit;
3383 }
3384 if (offset < 0) {
3385 _exception = 1;
3386 _exceptionType = "java/lang/IllegalArgumentException";
3387 _exceptionMessage = "offset < 0";
3388 goto exit;
3389 }
3390 _remaining = _env->GetArrayLength(val_ref) - offset;
3391 val_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003392 _env->GetFloatArrayElements(val_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003393 val = val_base + offset;
3394
3395 glGetMultisamplefv(
3396 (GLenum)pname,
3397 (GLuint)index,
3398 (GLfloat *)val
3399 );
3400
3401exit:
3402 if (val_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003403 _env->ReleaseFloatArrayElements(val_ref, (jfloat*)val_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003404 _exception ? JNI_ABORT: 0);
3405 }
3406 if (_exception) {
3407 jniThrowException(_env, _exceptionType, _exceptionMessage);
3408 }
3409}
3410
3411/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3412static void
3413android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2
3414 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003415 jint _exception = 0;
3416 const char * _exceptionType = NULL;
3417 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003418 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003419 jint _bufferOffset = (jint) 0;
3420 jint _remaining;
3421 GLfloat *val = (GLfloat *) 0;
3422
Romain Guy84cac202016-12-05 12:26:02 -08003423 if (!val_buf) {
3424 _exception = 1;
3425 _exceptionType = "java/lang/IllegalArgumentException";
3426 _exceptionMessage = "val == null";
3427 goto exit;
3428 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003429 val = (GLfloat *)getPointer(_env, val_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003430 if (val == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003431 char * _valBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003432 val = (GLfloat *) (_valBase + _bufferOffset);
3433 }
3434 glGetMultisamplefv(
3435 (GLenum)pname,
3436 (GLuint)index,
3437 (GLfloat *)val
3438 );
Romain Guy84cac202016-12-05 12:26:02 -08003439
3440exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003441 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003442 _env->ReleaseFloatArrayElements(_array, (jfloat*)val, _exception ? JNI_ABORT : 0);
3443 }
3444 if (_exception) {
3445 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003446 }
3447}
3448
3449/* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */
3450static void
3451android_glSampleMaski__II
3452 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) {
3453 glSampleMaski(
3454 (GLuint)maskNumber,
3455 (GLbitfield)mask
3456 );
3457}
3458
3459/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3460static void
3461android_glGetTexLevelParameteriv__III_3II
3462 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) {
3463 jint _exception = 0;
3464 const char * _exceptionType = NULL;
3465 const char * _exceptionMessage = NULL;
3466 GLint *params_base = (GLint *) 0;
3467 jint _remaining;
3468 GLint *params = (GLint *) 0;
3469
3470 if (!params_ref) {
3471 _exception = 1;
3472 _exceptionType = "java/lang/IllegalArgumentException";
3473 _exceptionMessage = "params == null";
3474 goto exit;
3475 }
3476 if (offset < 0) {
3477 _exception = 1;
3478 _exceptionType = "java/lang/IllegalArgumentException";
3479 _exceptionMessage = "offset < 0";
3480 goto exit;
3481 }
3482 _remaining = _env->GetArrayLength(params_ref) - offset;
3483 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003484 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003485 params = params_base + offset;
3486
3487 glGetTexLevelParameteriv(
3488 (GLenum)target,
3489 (GLint)level,
3490 (GLenum)pname,
3491 (GLint *)params
3492 );
3493
3494exit:
3495 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003496 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003497 _exception ? JNI_ABORT: 0);
3498 }
3499 if (_exception) {
3500 jniThrowException(_env, _exceptionType, _exceptionMessage);
3501 }
3502}
3503
3504/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3505static void
3506android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2
3507 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003508 jint _exception = 0;
3509 const char * _exceptionType = NULL;
3510 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003511 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003512 jint _bufferOffset = (jint) 0;
3513 jint _remaining;
3514 GLint *params = (GLint *) 0;
3515
Romain Guy84cac202016-12-05 12:26:02 -08003516 if (!params_buf) {
3517 _exception = 1;
3518 _exceptionType = "java/lang/IllegalArgumentException";
3519 _exceptionMessage = "params == null";
3520 goto exit;
3521 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003522 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003523 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003524 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003525 params = (GLint *) (_paramsBase + _bufferOffset);
3526 }
3527 glGetTexLevelParameteriv(
3528 (GLenum)target,
3529 (GLint)level,
3530 (GLenum)pname,
3531 (GLint *)params
3532 );
Romain Guy84cac202016-12-05 12:26:02 -08003533
3534exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003535 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003536 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3537 }
3538 if (_exception) {
3539 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003540 }
3541}
3542
3543/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3544static void
3545android_glGetTexLevelParameterfv__III_3FI
3546 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) {
3547 jint _exception = 0;
3548 const char * _exceptionType = NULL;
3549 const char * _exceptionMessage = NULL;
3550 GLfloat *params_base = (GLfloat *) 0;
3551 jint _remaining;
3552 GLfloat *params = (GLfloat *) 0;
3553
3554 if (!params_ref) {
3555 _exception = 1;
3556 _exceptionType = "java/lang/IllegalArgumentException";
3557 _exceptionMessage = "params == null";
3558 goto exit;
3559 }
3560 if (offset < 0) {
3561 _exception = 1;
3562 _exceptionType = "java/lang/IllegalArgumentException";
3563 _exceptionMessage = "offset < 0";
3564 goto exit;
3565 }
3566 _remaining = _env->GetArrayLength(params_ref) - offset;
3567 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003568 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003569 params = params_base + offset;
3570
3571 glGetTexLevelParameterfv(
3572 (GLenum)target,
3573 (GLint)level,
3574 (GLenum)pname,
3575 (GLfloat *)params
3576 );
3577
3578exit:
3579 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003580 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003581 _exception ? JNI_ABORT: 0);
3582 }
3583 if (_exception) {
3584 jniThrowException(_env, _exceptionType, _exceptionMessage);
3585 }
3586}
3587
3588/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3589static void
3590android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2
3591 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003592 jint _exception = 0;
3593 const char * _exceptionType = NULL;
3594 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003595 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003596 jint _bufferOffset = (jint) 0;
3597 jint _remaining;
3598 GLfloat *params = (GLfloat *) 0;
3599
Romain Guy84cac202016-12-05 12:26:02 -08003600 if (!params_buf) {
3601 _exception = 1;
3602 _exceptionType = "java/lang/IllegalArgumentException";
3603 _exceptionMessage = "params == null";
3604 goto exit;
3605 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003606 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003607 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003608 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003609 params = (GLfloat *) (_paramsBase + _bufferOffset);
3610 }
3611 glGetTexLevelParameterfv(
3612 (GLenum)target,
3613 (GLint)level,
3614 (GLenum)pname,
3615 (GLfloat *)params
3616 );
Romain Guy84cac202016-12-05 12:26:02 -08003617
3618exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003619 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003620 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3621 }
3622 if (_exception) {
3623 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003624 }
3625}
3626
3627/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
3628static void
3629android_glBindVertexBuffer__IIJI
3630 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
3631 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
3632 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
3633 return;
3634 }
3635 glBindVertexBuffer(
3636 (GLuint)bindingindex,
3637 (GLuint)buffer,
3638 (GLintptr)offset,
3639 (GLsizei)stride
3640 );
3641}
3642/* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */
3643static void
3644android_glVertexAttribFormat__IIIZI
3645 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) {
3646 glVertexAttribFormat(
3647 (GLuint)attribindex,
3648 (GLint)size,
3649 (GLenum)type,
3650 (GLboolean)normalized,
3651 (GLuint)relativeoffset
3652 );
3653}
3654
3655/* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */
3656static void
3657android_glVertexAttribIFormat__IIII
3658 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) {
3659 glVertexAttribIFormat(
3660 (GLuint)attribindex,
3661 (GLint)size,
3662 (GLenum)type,
3663 (GLuint)relativeoffset
3664 );
3665}
3666
3667/* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */
3668static void
3669android_glVertexAttribBinding__II
3670 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) {
3671 glVertexAttribBinding(
3672 (GLuint)attribindex,
3673 (GLuint)bindingindex
3674 );
3675}
3676
3677/* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */
3678static void
3679android_glVertexBindingDivisor__II
3680 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) {
3681 glVertexBindingDivisor(
3682 (GLuint)bindingindex,
3683 (GLuint)divisor
3684 );
3685}
3686
3687static const char *classPathName = "android/opengl/GLES31";
3688
Daniel Micay76f6a862015-09-19 17:31:01 -04003689static const JNINativeMethod methods[] = {
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003690{"_nativeClassInit", "()V", (void*)nativeClassInit },
3691{"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III },
3692{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
3693{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
3694{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
3695{"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III },
3696{"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II },
3697{"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 },
3698{"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II },
3699{"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 },
3700{"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 },
3701{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
3702{"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II },
3703{"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
3704{"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 },
3705{"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III },
3706{"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II },
3707{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
3708{"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I },
3709{"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II },
3710{"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 },
3711{"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II },
3712{"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 },
3713{"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I },
3714{"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II },
3715{"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 },
3716{"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III },
3717{"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII },
3718{"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII },
3719{"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII },
3720{"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III },
3721{"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII },
3722{"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII },
3723{"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII },
3724{"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF },
3725{"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF },
3726{"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF },
3727{"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF },
3728{"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II },
3729{"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 },
3730{"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II },
3731{"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 },
3732{"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II },
3733{"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 },
3734{"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II },
3735{"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 },
3736{"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II },
3737{"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 },
3738{"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II },
3739{"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 },
3740{"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II },
3741{"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 },
3742{"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II },
3743{"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 },
3744{"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI },
3745{"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 },
3746{"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI },
3747{"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 },
3748{"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI },
3749{"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 },
3750{"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI },
3751{"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 },
3752{"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI },
3753{"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 },
3754{"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI },
3755{"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 },
3756{"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI },
3757{"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 },
3758{"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI },
3759{"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 },
3760{"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI },
3761{"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 },
3762{"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI },
3763{"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 },
3764{"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI },
3765{"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 },
3766{"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI },
3767{"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 },
3768{"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI },
3769{"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 },
3770{"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I },
3771{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
3772{"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII },
3773{"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI },
3774{"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 },
3775{"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I },
3776{"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I },
3777{"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ },
3778{"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI },
3779{"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 },
3780{"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II },
3781{"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II },
3782{"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 },
3783{"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI },
3784{"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 },
3785{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
3786{"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI },
3787{"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII },
3788{"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II },
3789{"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II },
3790};
3791
3792int register_android_opengl_jni_GLES31(JNIEnv *_env)
3793{
3794 int err;
3795 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3796 return err;
3797}