blob: 512f562062e6d55ebb1de2863afec28bdc9543f1 [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"
Andreas Gampebfe63332014-11-12 14:12:45 -080020#pragma GCC diagnostic ignored "-Wunused-function"
21
Jesse Hall7ab63ac2014-05-19 15:13:41 -070022#include <stdint.h>
23#include <GLES3/gl31.h>
Jesse Hall9626f822014-05-19 20:57:49 -070024#include <jni.h>
Steven Moreland2279b252017-07-19 09:50:45 -070025#include <nativehelper/JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070026#include <android_runtime/AndroidRuntime.h>
27#include <utils/misc.h>
28#include <assert.h>
29
30static int initialized = 0;
31
32static jclass nioAccessClass;
33static jclass bufferClass;
34static jmethodID getBasePointerID;
35static jmethodID getBaseArrayID;
36static jmethodID getBaseArrayOffsetID;
37static jfieldID positionID;
38static jfieldID limitID;
39static jfieldID elementSizeShiftID;
40
41
42/* special calls implemented in Android's GLES wrapper used to more
43 * efficiently bound-check passed arrays */
44extern "C" {
45#ifdef GL_VERSION_ES_CM_1_1
46GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
47 const GLvoid *ptr, GLsizei count);
48GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
49 const GLvoid *pointer, GLsizei count);
50GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
51 GLsizei stride, const GLvoid *pointer, GLsizei count);
52GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
53 GLsizei stride, const GLvoid *pointer, GLsizei count);
54GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
55 GLsizei stride, const GLvoid *pointer, GLsizei count);
56GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
57 GLsizei stride, const GLvoid *pointer, GLsizei count);
58GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
59 GLsizei stride, const GLvoid *pointer, GLsizei count);
60#endif
61#ifdef GL_ES_VERSION_2_0
62static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
63 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
64 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
65}
66#endif
67#ifdef GL_ES_VERSION_3_0
68static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
69 GLsizei stride, const GLvoid *pointer, GLsizei count) {
70 glVertexAttribIPointer(indx, size, type, stride, pointer);
71}
72#endif
73}
74
75/* Cache method IDs each time the class is loaded. */
76
77static void
78nativeClassInit(JNIEnv *_env, jclass glImplClass)
79{
80 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
81 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
82
83 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
84 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
85
86 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
87 "getBasePointer", "(Ljava/nio/Buffer;)J");
88 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
89 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
90 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
91 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
92
93 positionID = _env->GetFieldID(bufferClass, "position", "I");
94 limitID = _env->GetFieldID(bufferClass, "limit", "I");
95 elementSizeShiftID =
96 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
97}
98
99static void *
100getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
101{
102 jint position;
103 jint limit;
104 jint elementSizeShift;
105 jlong pointer;
106
107 position = _env->GetIntField(buffer, positionID);
108 limit = _env->GetIntField(buffer, limitID);
109 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
110 *remaining = (limit - position) << elementSizeShift;
111 pointer = _env->CallStaticLongMethod(nioAccessClass,
112 getBasePointerID, buffer);
113 if (pointer != 0L) {
114 *array = NULL;
115 return reinterpret_cast<void*>(pointer);
116 }
117
118 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
119 getBaseArrayID, buffer);
120 *offset = _env->CallStaticIntMethod(nioAccessClass,
121 getBaseArrayOffsetID, buffer);
122
123 return NULL;
124}
125
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700126class ByteArrayGetter {
127public:
128 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
129 return _env->GetByteArrayElements(array, is_copy);
130 }
131};
132class BooleanArrayGetter {
133public:
134 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
135 return _env->GetBooleanArrayElements(array, is_copy);
136 }
137};
138class CharArrayGetter {
139public:
140 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
141 return _env->GetCharArrayElements(array, is_copy);
142 }
143};
144class ShortArrayGetter {
145public:
146 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
147 return _env->GetShortArrayElements(array, is_copy);
148 }
149};
150class IntArrayGetter {
151public:
152 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
153 return _env->GetIntArrayElements(array, is_copy);
154 }
155};
156class LongArrayGetter {
157public:
158 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
159 return _env->GetLongArrayElements(array, is_copy);
160 }
161};
162class FloatArrayGetter {
163public:
164 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
165 return _env->GetFloatArrayElements(array, is_copy);
166 }
167};
168class DoubleArrayGetter {
169public:
170 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
171 return _env->GetDoubleArrayElements(array, is_copy);
172 }
173};
174
175template<typename JTYPEARRAY, typename ARRAYGETTER>
176static void*
177getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
178 return ARRAYGETTER::Get(_env, array, is_copy);
179}
180
181class ByteArrayReleaser {
182public:
183 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
184 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
185 }
186};
187class BooleanArrayReleaser {
188public:
189 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
190 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
191 }
192};
193class CharArrayReleaser {
194public:
195 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
196 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
197 }
198};
199class ShortArrayReleaser {
200public:
201 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
202 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
203 }
204};
205class IntArrayReleaser {
206public:
207 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
208 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
209 }
210};
211class LongArrayReleaser {
212public:
213 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
214 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
215 }
216};
217class FloatArrayReleaser {
218public:
219 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
220 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
221 }
222};
223class DoubleArrayReleaser {
224public:
225 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
226 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
227 }
228};
229
230template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
231static void
232releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
233 ARRAYRELEASER::Release(_env, array, data, commit);
234}
235
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700236static void
237releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
238{
239 _env->ReleasePrimitiveArrayCritical(array, data,
240 commit ? 0 : JNI_ABORT);
241}
242
243static void *
244getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
245 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
246 if (buf) {
247 jint position = _env->GetIntField(buffer, positionID);
248 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
249 buf += position << elementSizeShift;
250 } else {
251 jniThrowException(_env, "java/lang/IllegalArgumentException",
252 "Must use a native order direct Buffer");
253 }
254 return (void*) buf;
255}
256
257// --------------------------------------------------------------------------
258
259/*
260 * returns the number of values glGet returns for a given pname.
261 *
262 * The code below is written such that pnames requiring only one values
263 * are the default (and are not explicitely tested for). This makes the
264 * checking code much shorter/readable/efficient.
265 *
266 * This means that unknown pnames (e.g.: extensions) will default to 1. If
267 * that unknown pname needs more than 1 value, then the validation check
268 * is incomplete and the app may crash if it passed the wrong number params.
269 */
270static int getNeededCount(GLint pname) {
271 int needed = 1;
Romain Guydc43a6c2017-02-17 19:54:25 -0800272#ifdef GL_ES_VERSION_3_0
273 // GLES 3.x pnames
274 switch (pname) {
275 case GL_MAX_VIEWPORT_DIMS:
276 needed = 2;
277 break;
278
279 case GL_PROGRAM_BINARY_FORMATS:
280 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
281 break;
282 }
283#endif
284
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700285#ifdef GL_ES_VERSION_2_0
286 // GLES 2.x pnames
287 switch (pname) {
288 case GL_ALIASED_LINE_WIDTH_RANGE:
289 case GL_ALIASED_POINT_SIZE_RANGE:
290 needed = 2;
291 break;
292
293 case GL_BLEND_COLOR:
294 case GL_COLOR_CLEAR_VALUE:
295 case GL_COLOR_WRITEMASK:
296 case GL_SCISSOR_BOX:
297 case GL_VIEWPORT:
298 needed = 4;
299 break;
300
301 case GL_COMPRESSED_TEXTURE_FORMATS:
302 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
303 break;
304
305 case GL_SHADER_BINARY_FORMATS:
306 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
307 break;
308 }
309#endif
310
311#ifdef GL_VERSION_ES_CM_1_1
312 // GLES 1.x pnames
313 switch (pname) {
314 case GL_ALIASED_LINE_WIDTH_RANGE:
315 case GL_ALIASED_POINT_SIZE_RANGE:
316 case GL_DEPTH_RANGE:
317 case GL_SMOOTH_LINE_WIDTH_RANGE:
318 case GL_SMOOTH_POINT_SIZE_RANGE:
319 needed = 2;
320 break;
321
322 case GL_CURRENT_NORMAL:
323 case GL_POINT_DISTANCE_ATTENUATION:
324 needed = 3;
325 break;
326
327 case GL_COLOR_CLEAR_VALUE:
328 case GL_COLOR_WRITEMASK:
329 case GL_CURRENT_COLOR:
330 case GL_CURRENT_TEXTURE_COORDS:
331 case GL_FOG_COLOR:
332 case GL_LIGHT_MODEL_AMBIENT:
333 case GL_SCISSOR_BOX:
334 case GL_VIEWPORT:
335 needed = 4;
336 break;
337
338 case GL_MODELVIEW_MATRIX:
339 case GL_PROJECTION_MATRIX:
340 case GL_TEXTURE_MATRIX:
341 needed = 16;
342 break;
343
344 case GL_COMPRESSED_TEXTURE_FORMATS:
345 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
346 break;
347 }
348#endif
349 return needed;
350}
351
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700352template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
353 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700354static void
355get
356 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
357 jint _exception = 0;
358 const char * _exceptionType;
359 const char * _exceptionMessage;
360 CTYPE *params_base = (CTYPE *) 0;
361 jint _remaining;
362 CTYPE *params = (CTYPE *) 0;
363 int _needed = 0;
364
365 if (!params_ref) {
366 _exception = 1;
367 _exceptionType = "java/lang/IllegalArgumentException";
368 _exceptionMessage = "params == null";
369 goto exit;
370 }
371 if (offset < 0) {
372 _exception = 1;
373 _exceptionType = "java/lang/IllegalArgumentException";
374 _exceptionMessage = "offset < 0";
375 goto exit;
376 }
377 _remaining = _env->GetArrayLength(params_ref) - offset;
378 _needed = getNeededCount(pname);
379 // if we didn't find this pname, we just assume the user passed
380 // an array of the right size -- this might happen with extensions
381 // or if we forget an enum here.
382 if (_remaining < _needed) {
383 _exception = 1;
384 _exceptionType = "java/lang/IllegalArgumentException";
385 _exceptionMessage = "length - offset < needed";
386 goto exit;
387 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700388 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
389 _env, params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700390 params = params_base + offset;
391
392 GET(
393 (GLenum)pname,
394 (CTYPE *)params
395 );
396
397exit:
398 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700399 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
400 _env, params_ref, params_base, !_exception);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700401 }
402 if (_exception) {
403 jniThrowException(_env, _exceptionType, _exceptionMessage);
404 }
405}
406
407
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700408template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
409 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700410static void
411getarray
412 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
413 jint _exception = 0;
414 const char * _exceptionType;
415 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700416 JTYPEARRAY _array = (JTYPEARRAY) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700417 jint _bufferOffset = (jint) 0;
418 jint _remaining;
419 CTYPE *params = (CTYPE *) 0;
420 int _needed = 0;
421
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700422 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700423 _remaining /= sizeof(CTYPE); // convert from bytes to item count
424 _needed = getNeededCount(pname);
425 // if we didn't find this pname, we just assume the user passed
426 // an array of the right size -- this might happen with extensions
427 // or if we forget an enum here.
428 if (_needed>0 && _remaining < _needed) {
429 _exception = 1;
430 _exceptionType = "java/lang/IllegalArgumentException";
431 _exceptionMessage = "remaining() < needed";
432 goto exit;
433 }
434 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700435 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
436 _env, _array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700437 params = (CTYPE *) (_paramsBase + _bufferOffset);
438 }
439 GET(
440 (GLenum)pname,
441 (CTYPE *)params
442 );
443
444exit:
445 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700446 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
447 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700448 }
449 if (_exception) {
450 jniThrowException(_env, _exceptionType, _exceptionMessage);
451 }
452}
453
454// --------------------------------------------------------------------------
455/* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */
456static void
457android_glDispatchCompute__III
458 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) {
459 glDispatchCompute(
460 (GLuint)num_groups_x,
461 (GLuint)num_groups_y,
462 (GLuint)num_groups_z
463 );
464}
465
466/* void glDispatchComputeIndirect ( GLintptr indirect ) */
467static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
468 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
469 // Here we only need to check for successful 64-bit to 32-bit conversion.
470 // - jlong is a int64_t (jni.h)
471 // - GLintptr is a long (khrplatform.h)
472 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
473 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
474 return;
475 }
476 glDispatchComputeIndirect((GLintptr)indirect);
477}
478
479/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
480static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
481 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
482 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
483 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800484 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700485 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
486 return;
487 }
488 glDrawArraysIndirect(mode, (const void*)indirect);
489}
490
491/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
492static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
493 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
494 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
495 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800496 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700497 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
498 return;
499 }
500 glDrawElementsIndirect(mode, type, (const void*)indirect);
501}
502
503/* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */
504static void
505android_glFramebufferParameteri__III
506 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
507 glFramebufferParameteri(
508 (GLenum)target,
509 (GLenum)pname,
510 (GLint)param
511 );
512}
513
514/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
515static void
516android_glGetFramebufferParameteriv__II_3II
517 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
518 jint _exception = 0;
519 const char * _exceptionType = NULL;
520 const char * _exceptionMessage = NULL;
521 GLint *params_base = (GLint *) 0;
522 jint _remaining;
523 GLint *params = (GLint *) 0;
524
525 if (!params_ref) {
526 _exception = 1;
527 _exceptionType = "java/lang/IllegalArgumentException";
528 _exceptionMessage = "params == null";
529 goto exit;
530 }
531 if (offset < 0) {
532 _exception = 1;
533 _exceptionType = "java/lang/IllegalArgumentException";
534 _exceptionMessage = "offset < 0";
535 goto exit;
536 }
537 _remaining = _env->GetArrayLength(params_ref) - offset;
538 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700539 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700540 params = params_base + offset;
541
542 glGetFramebufferParameteriv(
543 (GLenum)target,
544 (GLenum)pname,
545 (GLint *)params
546 );
547
548exit:
549 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700550 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700551 _exception ? JNI_ABORT: 0);
552 }
553 if (_exception) {
554 jniThrowException(_env, _exceptionType, _exceptionMessage);
555 }
556}
557
558/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
559static void
560android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2
561 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800562 jint _exception = 0;
563 const char * _exceptionType = NULL;
564 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700565 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700566 jint _bufferOffset = (jint) 0;
567 jint _remaining;
568 GLint *params = (GLint *) 0;
569
Romain Guy84cac202016-12-05 12:26:02 -0800570 if (!params_buf) {
571 _exception = 1;
572 _exceptionType = "java/lang/IllegalArgumentException";
573 _exceptionMessage = "params == null";
574 goto exit;
575 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700576 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700577 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700578 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700579 params = (GLint *) (_paramsBase + _bufferOffset);
580 }
581 glGetFramebufferParameteriv(
582 (GLenum)target,
583 (GLenum)pname,
584 (GLint *)params
585 );
Romain Guy84cac202016-12-05 12:26:02 -0800586
587exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700588 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800589 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
590 }
591 if (_exception) {
592 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700593 }
594}
595
596/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
597static void
598android_glGetProgramInterfaceiv__III_3II
599 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) {
600 jint _exception = 0;
601 const char * _exceptionType = NULL;
602 const char * _exceptionMessage = NULL;
603 GLint *params_base = (GLint *) 0;
604 jint _remaining;
605 GLint *params = (GLint *) 0;
606
607 if (!params_ref) {
608 _exception = 1;
609 _exceptionType = "java/lang/IllegalArgumentException";
610 _exceptionMessage = "params == null";
611 goto exit;
612 }
613 if (offset < 0) {
614 _exception = 1;
615 _exceptionType = "java/lang/IllegalArgumentException";
616 _exceptionMessage = "offset < 0";
617 goto exit;
618 }
619 _remaining = _env->GetArrayLength(params_ref) - offset;
620 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700621 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700622 params = params_base + offset;
623
624 glGetProgramInterfaceiv(
625 (GLuint)program,
626 (GLenum)programInterface,
627 (GLenum)pname,
628 (GLint *)params
629 );
630
631exit:
632 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700633 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700634 _exception ? JNI_ABORT: 0);
635 }
636 if (_exception) {
637 jniThrowException(_env, _exceptionType, _exceptionMessage);
638 }
639}
640
641/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
642static void
643android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2
644 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800645 jint _exception = 0;
646 const char * _exceptionType = NULL;
647 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700648 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700649 jint _bufferOffset = (jint) 0;
650 jint _remaining;
651 GLint *params = (GLint *) 0;
652
Romain Guy84cac202016-12-05 12:26:02 -0800653 if (!params_buf) {
654 _exception = 1;
655 _exceptionType = "java/lang/IllegalArgumentException";
656 _exceptionMessage = "params == null";
657 goto exit;
658 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700659 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700660 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700661 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700662 params = (GLint *) (_paramsBase + _bufferOffset);
663 }
664 glGetProgramInterfaceiv(
665 (GLuint)program,
666 (GLenum)programInterface,
667 (GLenum)pname,
668 (GLint *)params
669 );
Romain Guy84cac202016-12-05 12:26:02 -0800670
671exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700672 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800673 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
674 }
675 if (_exception) {
676 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700677 }
678}
679
680/* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */
681static jint
682android_glGetProgramResourceIndex__IILjava_lang_String_2
683 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
684 jint _exception = 0;
685 const char * _exceptionType = NULL;
686 const char * _exceptionMessage = NULL;
687 GLuint _returnValue = 0;
688 const char* _nativename = 0;
689
690 if (!name) {
691 _exception = 1;
692 _exceptionType = "java/lang/IllegalArgumentException";
693 _exceptionMessage = "name == null";
694 goto exit;
695 }
696 _nativename = _env->GetStringUTFChars(name, 0);
697
698 _returnValue = glGetProgramResourceIndex(
699 (GLuint)program,
700 (GLenum)programInterface,
701 (GLchar *)_nativename
702 );
703
704exit:
705 if (_nativename) {
706 _env->ReleaseStringUTFChars(name, _nativename);
707 }
708
709 if (_exception) {
710 jniThrowException(_env, _exceptionType, _exceptionMessage);
711 }
712 return (jint)_returnValue;
713}
714
715/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
716static jstring
717android_glGetProgramResourceName
718 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
719 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
720 return NULL;
721}
722
723/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
724static void
725android_glGetProgramResourceiv__IIII_3III_3II_3II
726 (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) {
727 jint _exception = 0;
728 const char * _exceptionType = NULL;
729 const char * _exceptionMessage = NULL;
730 GLenum *props_base = (GLenum *) 0;
731 jint _propsRemaining;
732 GLenum *props = (GLenum *) 0;
733 GLsizei *length_base = (GLsizei *) 0;
734 jint _lengthRemaining;
735 GLsizei *length = (GLsizei *) 0;
736 GLint *params_base = (GLint *) 0;
737 jint _paramsRemaining;
738 GLint *params = (GLint *) 0;
739
740 if (!props_ref) {
741 _exception = 1;
742 _exceptionType = "java/lang/IllegalArgumentException";
743 _exceptionMessage = "props == null";
744 goto exit;
745 }
746 if (propsOffset < 0) {
747 _exception = 1;
748 _exceptionType = "java/lang/IllegalArgumentException";
749 _exceptionMessage = "propsOffset < 0";
750 goto exit;
751 }
752 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset;
753 props_base = (GLenum *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700754 _env->GetIntArrayElements(props_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700755 props = props_base + propsOffset;
756
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700757 if (length_ref) {
758 if (lengthOffset < 0) {
759 _exception = 1;
760 _exceptionType = "java/lang/IllegalArgumentException";
761 _exceptionMessage = "lengthOffset < 0";
762 goto exit;
763 }
764 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
765 length_base = (GLsizei *)
766 _env->GetIntArrayElements(length_ref, (jboolean *)0);
767 length = length_base + lengthOffset;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700768 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700769
770 if (!params_ref) {
771 _exception = 1;
772 _exceptionType = "java/lang/IllegalArgumentException";
773 _exceptionMessage = "params == null";
774 goto exit;
775 }
776 if (paramsOffset < 0) {
777 _exception = 1;
778 _exceptionType = "java/lang/IllegalArgumentException";
779 _exceptionMessage = "paramsOffset < 0";
780 goto exit;
781 }
782 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
783 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700784 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700785 params = params_base + paramsOffset;
786
787 glGetProgramResourceiv(
788 (GLuint)program,
789 (GLenum)programInterface,
790 (GLuint)index,
791 (GLsizei)propCount,
792 (GLenum *)props,
793 (GLsizei)bufSize,
794 (GLsizei *)length,
795 (GLint *)params
796 );
797
798exit:
799 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700800 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700801 _exception ? JNI_ABORT: 0);
802 }
803 if (length_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700804 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700805 _exception ? JNI_ABORT: 0);
806 }
807 if (props_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700808 _env->ReleaseIntArrayElements(props_ref, (jint*)props_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700809 JNI_ABORT);
810 }
811 if (_exception) {
812 jniThrowException(_env, _exceptionType, _exceptionMessage);
813 }
814}
815
816/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
817static void
818android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
819 (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 -0800820 jint _exception = 0;
821 const char * _exceptionType = NULL;
822 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700823 jintArray _propsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700824 jint _propsBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700825 jintArray _lengthArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700826 jint _lengthBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700827 jintArray _paramsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700828 jint _paramsBufferOffset = (jint) 0;
829 jint _propsRemaining;
830 GLenum *props = (GLenum *) 0;
831 jint _lengthRemaining;
832 GLsizei *length = (GLsizei *) 0;
833 jint _paramsRemaining;
834 GLint *params = (GLint *) 0;
835
Romain Guy84cac202016-12-05 12:26:02 -0800836 if (!props_buf) {
837 _exception = 1;
838 _exceptionType = "java/lang/IllegalArgumentException";
839 _exceptionMessage = "props == null";
840 goto exit;
841 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700842 props = (GLenum *)getPointer(_env, props_buf, (jarray*)&_propsArray, &_propsRemaining, &_propsBufferOffset);
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700843 if (length_buf) {
844 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
845 }
Romain Guy84cac202016-12-05 12:26:02 -0800846 if (!params_buf) {
847 _exception = 1;
848 _exceptionType = "java/lang/IllegalArgumentException";
849 _exceptionMessage = "params == null";
850 goto exit;
851 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700852 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700853 if (props == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700854 char * _propsBase = (char *)_env->GetIntArrayElements(_propsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700855 props = (GLenum *) (_propsBase + _propsBufferOffset);
856 }
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700857 if (length_buf && length == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700858 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700859 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
860 }
861 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700862 char * _paramsBase = (char *)_env->GetIntArrayElements(_paramsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700863 params = (GLint *) (_paramsBase + _paramsBufferOffset);
864 }
865 glGetProgramResourceiv(
866 (GLuint)program,
867 (GLenum)programInterface,
868 (GLuint)index,
869 (GLsizei)propCount,
870 (GLenum *)props,
871 (GLsizei)bufSize,
872 (GLsizei *)length,
873 (GLint *)params
874 );
Romain Guy84cac202016-12-05 12:26:02 -0800875
876exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700877 if (_paramsArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800878 _env->ReleaseIntArrayElements(_paramsArray, (jint*)params, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700879 }
880 if (_lengthArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800881 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700882 }
883 if (_propsArray) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700884 _env->ReleaseIntArrayElements(_propsArray, (jint*)props, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700885 }
Romain Guy84cac202016-12-05 12:26:02 -0800886 if (_exception) {
887 jniThrowException(_env, _exceptionType, _exceptionMessage);
888 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700889}
890
891/* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */
892static jint
893android_glGetProgramResourceLocation__IILjava_lang_String_2
894 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
895 jint _exception = 0;
896 const char * _exceptionType = NULL;
897 const char * _exceptionMessage = NULL;
898 GLint _returnValue = 0;
899 const char* _nativename = 0;
900
901 if (!name) {
902 _exception = 1;
903 _exceptionType = "java/lang/IllegalArgumentException";
904 _exceptionMessage = "name == null";
905 goto exit;
906 }
907 _nativename = _env->GetStringUTFChars(name, 0);
908
909 _returnValue = glGetProgramResourceLocation(
910 (GLuint)program,
911 (GLenum)programInterface,
912 (GLchar *)_nativename
913 );
914
915exit:
916 if (_nativename) {
917 _env->ReleaseStringUTFChars(name, _nativename);
918 }
919
920 if (_exception) {
921 jniThrowException(_env, _exceptionType, _exceptionMessage);
922 }
923 return (jint)_returnValue;
924}
925
926/* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */
927static void
928android_glUseProgramStages__III
929 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) {
930 glUseProgramStages(
931 (GLuint)pipeline,
932 (GLbitfield)stages,
933 (GLuint)program
934 );
935}
936
937/* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */
938static void
939android_glActiveShaderProgram__II
940 (JNIEnv *_env, jobject _this, jint pipeline, jint program) {
941 glActiveShaderProgram(
942 (GLuint)pipeline,
943 (GLuint)program
944 );
945}
946
947/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
948static jint
949android_glCreateShaderProgramv
950 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800951 jint _exception = 0;
952 const char * _exceptionType = NULL;
953 const char * _exceptionMessage = NULL;
954 GLsizei _count;
955 const GLchar** _strings = NULL;
956 jstring* _jstrings = NULL;
957 GLuint _returnValue = 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700958
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800959 if (!strings) {
960 _exception = 1;
961 _exceptionType = "java/lang/IllegalArgumentException";
962 _exceptionMessage = "strings == null";
963 goto exit;
964 }
965
966 _count = _env->GetArrayLength(strings);
967
968 _strings = (const GLchar**) calloc(_count, sizeof(const GLchar*));
969 if (!_strings) {
970 _exception = 1;
971 _exceptionType = "java/lang/OutOfMemoryError";
972 _exceptionMessage = "out of memory";
973 goto exit;
974 }
975
976 _jstrings = (jstring*) calloc(_count, sizeof(jstring));
977 if (!_jstrings) {
978 _exception = 1;
979 _exceptionType = "java/lang/OutOfMemoryError";
980 _exceptionMessage = "out of memory";
981 goto exit;
982 }
983
984 for(int i = 0; i < _count; i++) {
985 _jstrings[i] = (jstring) _env->GetObjectArrayElement(strings, i);
986 if (!_jstrings[i]) {
987 _exception = 1;
988 _exceptionType = "java/lang/IllegalArgumentException";
989 _exceptionMessage = "strings == null";
990 goto exit;
991 }
992 _strings[i] = _env->GetStringUTFChars(_jstrings[i], 0);
993 }
994
995 _returnValue = glCreateShaderProgramv((GLenum)type, _count, _strings);
996exit:
997 if (_strings && _jstrings) {
998 for(int i = 0; i < _count; i++) {
999 if (_strings[i] && _jstrings[i]) {
1000 _env->ReleaseStringUTFChars(_jstrings[i], _strings[i]);
1001 }
1002 }
1003 }
1004 if (_strings) {
1005 free(_strings);
1006 }
1007 if (_jstrings) {
1008 free(_jstrings);
1009 }
1010 if (_exception) {
1011 jniThrowException(_env, _exceptionType, _exceptionMessage);
1012 }
1013 return (jint)_returnValue;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001014}
1015/* void glBindProgramPipeline ( GLuint pipeline ) */
1016static void
1017android_glBindProgramPipeline__I
1018 (JNIEnv *_env, jobject _this, jint pipeline) {
1019 glBindProgramPipeline(
1020 (GLuint)pipeline
1021 );
1022}
1023
1024/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1025static void
1026android_glDeleteProgramPipelines__I_3II
1027 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1028 jint _exception = 0;
1029 const char * _exceptionType = NULL;
1030 const char * _exceptionMessage = NULL;
1031 GLuint *pipelines_base = (GLuint *) 0;
1032 jint _remaining;
1033 GLuint *pipelines = (GLuint *) 0;
1034
1035 if (!pipelines_ref) {
1036 _exception = 1;
1037 _exceptionType = "java/lang/IllegalArgumentException";
1038 _exceptionMessage = "pipelines == null";
1039 goto exit;
1040 }
1041 if (offset < 0) {
1042 _exception = 1;
1043 _exceptionType = "java/lang/IllegalArgumentException";
1044 _exceptionMessage = "offset < 0";
1045 goto exit;
1046 }
1047 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1048 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001049 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001050 pipelines = pipelines_base + offset;
1051
1052 glDeleteProgramPipelines(
1053 (GLsizei)n,
1054 (GLuint *)pipelines
1055 );
1056
1057exit:
1058 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001059 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001060 JNI_ABORT);
1061 }
1062 if (_exception) {
1063 jniThrowException(_env, _exceptionType, _exceptionMessage);
1064 }
1065}
1066
1067/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1068static void
1069android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2
1070 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001071 jint _exception = 0;
1072 const char * _exceptionType = NULL;
1073 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001074 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001075 jint _bufferOffset = (jint) 0;
1076 jint _remaining;
1077 GLuint *pipelines = (GLuint *) 0;
1078
Romain Guy84cac202016-12-05 12:26:02 -08001079 if (!pipelines_buf) {
1080 _exception = 1;
1081 _exceptionType = "java/lang/IllegalArgumentException";
1082 _exceptionMessage = "pipelines == null";
1083 goto exit;
1084 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001085 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001086 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001087 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001088 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1089 }
1090 glDeleteProgramPipelines(
1091 (GLsizei)n,
1092 (GLuint *)pipelines
1093 );
Romain Guy84cac202016-12-05 12:26:02 -08001094
1095exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001096 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001097 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001098 }
Romain Guy84cac202016-12-05 12:26:02 -08001099 if (_exception) {
1100 jniThrowException(_env, _exceptionType, _exceptionMessage);
1101 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001102}
1103
1104/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1105static void
1106android_glGenProgramPipelines__I_3II
1107 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1108 jint _exception = 0;
1109 const char * _exceptionType = NULL;
1110 const char * _exceptionMessage = NULL;
1111 GLuint *pipelines_base = (GLuint *) 0;
1112 jint _remaining;
1113 GLuint *pipelines = (GLuint *) 0;
1114
1115 if (!pipelines_ref) {
1116 _exception = 1;
1117 _exceptionType = "java/lang/IllegalArgumentException";
1118 _exceptionMessage = "pipelines == null";
1119 goto exit;
1120 }
1121 if (offset < 0) {
1122 _exception = 1;
1123 _exceptionType = "java/lang/IllegalArgumentException";
1124 _exceptionMessage = "offset < 0";
1125 goto exit;
1126 }
1127 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1128 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001129 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001130 pipelines = pipelines_base + offset;
1131
1132 glGenProgramPipelines(
1133 (GLsizei)n,
1134 (GLuint *)pipelines
1135 );
1136
1137exit:
1138 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001139 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001140 _exception ? JNI_ABORT: 0);
1141 }
1142 if (_exception) {
1143 jniThrowException(_env, _exceptionType, _exceptionMessage);
1144 }
1145}
1146
1147/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1148static void
1149android_glGenProgramPipelines__ILjava_nio_IntBuffer_2
1150 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001151 jint _exception = 0;
1152 const char * _exceptionType = NULL;
1153 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001154 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001155 jint _bufferOffset = (jint) 0;
1156 jint _remaining;
1157 GLuint *pipelines = (GLuint *) 0;
1158
Romain Guy84cac202016-12-05 12:26:02 -08001159 if (!pipelines_buf) {
1160 _exception = 1;
1161 _exceptionType = "java/lang/IllegalArgumentException";
1162 _exceptionMessage = "pipelines == null";
1163 goto exit;
1164 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001165 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001166 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001167 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001168 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1169 }
1170 glGenProgramPipelines(
1171 (GLsizei)n,
1172 (GLuint *)pipelines
1173 );
Romain Guy84cac202016-12-05 12:26:02 -08001174
1175exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001176 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001177 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, _exception ? JNI_ABORT : 0);
1178 }
1179 if (_exception) {
1180 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001181 }
1182}
1183
1184/* GLboolean glIsProgramPipeline ( GLuint pipeline ) */
1185static jboolean
1186android_glIsProgramPipeline__I
1187 (JNIEnv *_env, jobject _this, jint pipeline) {
1188 GLboolean _returnValue;
1189 _returnValue = glIsProgramPipeline(
1190 (GLuint)pipeline
1191 );
1192 return (jboolean)_returnValue;
1193}
1194
1195/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1196static void
1197android_glGetProgramPipelineiv__II_3II
1198 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) {
1199 jint _exception = 0;
1200 const char * _exceptionType = NULL;
1201 const char * _exceptionMessage = NULL;
1202 GLint *params_base = (GLint *) 0;
1203 jint _remaining;
1204 GLint *params = (GLint *) 0;
1205
1206 if (!params_ref) {
1207 _exception = 1;
1208 _exceptionType = "java/lang/IllegalArgumentException";
1209 _exceptionMessage = "params == null";
1210 goto exit;
1211 }
1212 if (offset < 0) {
1213 _exception = 1;
1214 _exceptionType = "java/lang/IllegalArgumentException";
1215 _exceptionMessage = "offset < 0";
1216 goto exit;
1217 }
1218 _remaining = _env->GetArrayLength(params_ref) - offset;
1219 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001220 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001221 params = params_base + offset;
1222
1223 glGetProgramPipelineiv(
1224 (GLuint)pipeline,
1225 (GLenum)pname,
1226 (GLint *)params
1227 );
1228
1229exit:
1230 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001231 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001232 _exception ? JNI_ABORT: 0);
1233 }
1234 if (_exception) {
1235 jniThrowException(_env, _exceptionType, _exceptionMessage);
1236 }
1237}
1238
1239/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1240static void
1241android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2
1242 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001243 jint _exception = 0;
1244 const char * _exceptionType = NULL;
1245 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001246 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001247 jint _bufferOffset = (jint) 0;
1248 jint _remaining;
1249 GLint *params = (GLint *) 0;
1250
Romain Guy84cac202016-12-05 12:26:02 -08001251 if (!params_buf) {
1252 _exception = 1;
1253 _exceptionType = "java/lang/IllegalArgumentException";
1254 _exceptionMessage = "params == null";
1255 goto exit;
1256 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001257 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001258 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001259 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001260 params = (GLint *) (_paramsBase + _bufferOffset);
1261 }
1262 glGetProgramPipelineiv(
1263 (GLuint)pipeline,
1264 (GLenum)pname,
1265 (GLint *)params
1266 );
Romain Guy84cac202016-12-05 12:26:02 -08001267
1268exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001269 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001270 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1271 }
1272 if (_exception) {
1273 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001274 }
1275}
1276
1277/* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */
1278static void
1279android_glProgramUniform1i__III
1280 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1281 glProgramUniform1i(
1282 (GLuint)program,
1283 (GLint)location,
1284 (GLint)v0
1285 );
1286}
1287
1288/* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */
1289static void
1290android_glProgramUniform2i__IIII
1291 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1292 glProgramUniform2i(
1293 (GLuint)program,
1294 (GLint)location,
1295 (GLint)v0,
1296 (GLint)v1
1297 );
1298}
1299
1300/* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */
1301static void
1302android_glProgramUniform3i__IIIII
1303 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1304 glProgramUniform3i(
1305 (GLuint)program,
1306 (GLint)location,
1307 (GLint)v0,
1308 (GLint)v1,
1309 (GLint)v2
1310 );
1311}
1312
1313/* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */
1314static void
1315android_glProgramUniform4i__IIIIII
1316 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1317 glProgramUniform4i(
1318 (GLuint)program,
1319 (GLint)location,
1320 (GLint)v0,
1321 (GLint)v1,
1322 (GLint)v2,
1323 (GLint)v3
1324 );
1325}
1326
1327/* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */
1328static void
1329android_glProgramUniform1ui__III
1330 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1331 glProgramUniform1ui(
1332 (GLuint)program,
1333 (GLint)location,
1334 (GLuint)v0
1335 );
1336}
1337
1338/* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */
1339static void
1340android_glProgramUniform2ui__IIII
1341 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1342 glProgramUniform2ui(
1343 (GLuint)program,
1344 (GLint)location,
1345 (GLuint)v0,
1346 (GLuint)v1
1347 );
1348}
1349
1350/* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
1351static void
1352android_glProgramUniform3ui__IIIII
1353 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1354 glProgramUniform3ui(
1355 (GLuint)program,
1356 (GLint)location,
1357 (GLuint)v0,
1358 (GLuint)v1,
1359 (GLuint)v2
1360 );
1361}
1362
1363/* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
1364static void
1365android_glProgramUniform4ui__IIIIII
1366 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1367 glProgramUniform4ui(
1368 (GLuint)program,
1369 (GLint)location,
1370 (GLuint)v0,
1371 (GLuint)v1,
1372 (GLuint)v2,
1373 (GLuint)v3
1374 );
1375}
1376
1377/* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */
1378static void
1379android_glProgramUniform1f__IIF
1380 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) {
1381 glProgramUniform1f(
1382 (GLuint)program,
1383 (GLint)location,
1384 (GLfloat)v0
1385 );
1386}
1387
1388/* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */
1389static void
1390android_glProgramUniform2f__IIFF
1391 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) {
1392 glProgramUniform2f(
1393 (GLuint)program,
1394 (GLint)location,
1395 (GLfloat)v0,
1396 (GLfloat)v1
1397 );
1398}
1399
1400/* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */
1401static void
1402android_glProgramUniform3f__IIFFF
1403 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) {
1404 glProgramUniform3f(
1405 (GLuint)program,
1406 (GLint)location,
1407 (GLfloat)v0,
1408 (GLfloat)v1,
1409 (GLfloat)v2
1410 );
1411}
1412
1413/* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */
1414static void
1415android_glProgramUniform4f__IIFFFF
1416 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) {
1417 glProgramUniform4f(
1418 (GLuint)program,
1419 (GLint)location,
1420 (GLfloat)v0,
1421 (GLfloat)v1,
1422 (GLfloat)v2,
1423 (GLfloat)v3
1424 );
1425}
1426
1427/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1428static void
1429android_glProgramUniform1iv__III_3II
1430 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1431 jint _exception = 0;
1432 const char * _exceptionType = NULL;
1433 const char * _exceptionMessage = NULL;
1434 GLint *value_base = (GLint *) 0;
1435 jint _remaining;
1436 GLint *value = (GLint *) 0;
1437
1438 if (!value_ref) {
1439 _exception = 1;
1440 _exceptionType = "java/lang/IllegalArgumentException";
1441 _exceptionMessage = "value == null";
1442 goto exit;
1443 }
1444 if (offset < 0) {
1445 _exception = 1;
1446 _exceptionType = "java/lang/IllegalArgumentException";
1447 _exceptionMessage = "offset < 0";
1448 goto exit;
1449 }
1450 _remaining = _env->GetArrayLength(value_ref) - offset;
1451 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001452 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001453 value = value_base + offset;
1454
1455 glProgramUniform1iv(
1456 (GLuint)program,
1457 (GLint)location,
1458 (GLsizei)count,
1459 (GLint *)value
1460 );
1461
1462exit:
1463 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001464 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001465 JNI_ABORT);
1466 }
1467 if (_exception) {
1468 jniThrowException(_env, _exceptionType, _exceptionMessage);
1469 }
1470}
1471
1472/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1473static void
1474android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2
1475 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001476 jint _exception = 0;
1477 const char * _exceptionType = NULL;
1478 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001479 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001480 jint _bufferOffset = (jint) 0;
1481 jint _remaining;
1482 GLint *value = (GLint *) 0;
1483
Romain Guy84cac202016-12-05 12:26:02 -08001484 if (!value_buf) {
1485 _exception = 1;
1486 _exceptionType = "java/lang/IllegalArgumentException";
1487 _exceptionMessage = "value == null";
1488 goto exit;
1489 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001490 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001491 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001492 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001493 value = (GLint *) (_valueBase + _bufferOffset);
1494 }
1495 glProgramUniform1iv(
1496 (GLuint)program,
1497 (GLint)location,
1498 (GLsizei)count,
1499 (GLint *)value
1500 );
Romain Guy84cac202016-12-05 12:26:02 -08001501
1502exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001503 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001504 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001505 }
Romain Guy84cac202016-12-05 12:26:02 -08001506 if (_exception) {
1507 jniThrowException(_env, _exceptionType, _exceptionMessage);
1508 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001509}
1510
1511/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1512static void
1513android_glProgramUniform2iv__III_3II
1514 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1515 jint _exception = 0;
1516 const char * _exceptionType = NULL;
1517 const char * _exceptionMessage = NULL;
1518 GLint *value_base = (GLint *) 0;
1519 jint _remaining;
1520 GLint *value = (GLint *) 0;
1521
1522 if (!value_ref) {
1523 _exception = 1;
1524 _exceptionType = "java/lang/IllegalArgumentException";
1525 _exceptionMessage = "value == null";
1526 goto exit;
1527 }
1528 if (offset < 0) {
1529 _exception = 1;
1530 _exceptionType = "java/lang/IllegalArgumentException";
1531 _exceptionMessage = "offset < 0";
1532 goto exit;
1533 }
1534 _remaining = _env->GetArrayLength(value_ref) - offset;
1535 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001536 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001537 value = value_base + offset;
1538
1539 glProgramUniform2iv(
1540 (GLuint)program,
1541 (GLint)location,
1542 (GLsizei)count,
1543 (GLint *)value
1544 );
1545
1546exit:
1547 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001548 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001549 JNI_ABORT);
1550 }
1551 if (_exception) {
1552 jniThrowException(_env, _exceptionType, _exceptionMessage);
1553 }
1554}
1555
1556/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1557static void
1558android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2
1559 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001560 jint _exception = 0;
1561 const char * _exceptionType = NULL;
1562 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001563 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001564 jint _bufferOffset = (jint) 0;
1565 jint _remaining;
1566 GLint *value = (GLint *) 0;
1567
Romain Guy84cac202016-12-05 12:26:02 -08001568 if (!value_buf) {
1569 _exception = 1;
1570 _exceptionType = "java/lang/IllegalArgumentException";
1571 _exceptionMessage = "value == null";
1572 goto exit;
1573 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001574 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001575 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001576 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001577 value = (GLint *) (_valueBase + _bufferOffset);
1578 }
1579 glProgramUniform2iv(
1580 (GLuint)program,
1581 (GLint)location,
1582 (GLsizei)count,
1583 (GLint *)value
1584 );
Romain Guy84cac202016-12-05 12:26:02 -08001585
1586exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001587 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001588 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001589 }
Romain Guy84cac202016-12-05 12:26:02 -08001590 if (_exception) {
1591 jniThrowException(_env, _exceptionType, _exceptionMessage);
1592 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001593}
1594
1595/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1596static void
1597android_glProgramUniform3iv__III_3II
1598 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1599 jint _exception = 0;
1600 const char * _exceptionType = NULL;
1601 const char * _exceptionMessage = NULL;
1602 GLint *value_base = (GLint *) 0;
1603 jint _remaining;
1604 GLint *value = (GLint *) 0;
1605
1606 if (!value_ref) {
1607 _exception = 1;
1608 _exceptionType = "java/lang/IllegalArgumentException";
1609 _exceptionMessage = "value == null";
1610 goto exit;
1611 }
1612 if (offset < 0) {
1613 _exception = 1;
1614 _exceptionType = "java/lang/IllegalArgumentException";
1615 _exceptionMessage = "offset < 0";
1616 goto exit;
1617 }
1618 _remaining = _env->GetArrayLength(value_ref) - offset;
1619 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001620 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001621 value = value_base + offset;
1622
1623 glProgramUniform3iv(
1624 (GLuint)program,
1625 (GLint)location,
1626 (GLsizei)count,
1627 (GLint *)value
1628 );
1629
1630exit:
1631 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001632 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001633 JNI_ABORT);
1634 }
1635 if (_exception) {
1636 jniThrowException(_env, _exceptionType, _exceptionMessage);
1637 }
1638}
1639
1640/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1641static void
1642android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2
1643 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001644 jint _exception = 0;
1645 const char * _exceptionType = NULL;
1646 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001647 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001648 jint _bufferOffset = (jint) 0;
1649 jint _remaining;
1650 GLint *value = (GLint *) 0;
1651
Romain Guy84cac202016-12-05 12:26:02 -08001652 if (!value_buf) {
1653 _exception = 1;
1654 _exceptionType = "java/lang/IllegalArgumentException";
1655 _exceptionMessage = "value == null";
1656 goto exit;
1657 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001658 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001659 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001660 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001661 value = (GLint *) (_valueBase + _bufferOffset);
1662 }
1663 glProgramUniform3iv(
1664 (GLuint)program,
1665 (GLint)location,
1666 (GLsizei)count,
1667 (GLint *)value
1668 );
Romain Guy84cac202016-12-05 12:26:02 -08001669
1670exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001671 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001672 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001673 }
Romain Guy84cac202016-12-05 12:26:02 -08001674 if (_exception) {
1675 jniThrowException(_env, _exceptionType, _exceptionMessage);
1676 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001677}
1678
1679/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1680static void
1681android_glProgramUniform4iv__III_3II
1682 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1683 jint _exception = 0;
1684 const char * _exceptionType = NULL;
1685 const char * _exceptionMessage = NULL;
1686 GLint *value_base = (GLint *) 0;
1687 jint _remaining;
1688 GLint *value = (GLint *) 0;
1689
1690 if (!value_ref) {
1691 _exception = 1;
1692 _exceptionType = "java/lang/IllegalArgumentException";
1693 _exceptionMessage = "value == null";
1694 goto exit;
1695 }
1696 if (offset < 0) {
1697 _exception = 1;
1698 _exceptionType = "java/lang/IllegalArgumentException";
1699 _exceptionMessage = "offset < 0";
1700 goto exit;
1701 }
1702 _remaining = _env->GetArrayLength(value_ref) - offset;
1703 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001704 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001705 value = value_base + offset;
1706
1707 glProgramUniform4iv(
1708 (GLuint)program,
1709 (GLint)location,
1710 (GLsizei)count,
1711 (GLint *)value
1712 );
1713
1714exit:
1715 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001716 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001717 JNI_ABORT);
1718 }
1719 if (_exception) {
1720 jniThrowException(_env, _exceptionType, _exceptionMessage);
1721 }
1722}
1723
1724/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1725static void
1726android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2
1727 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001728 jint _exception = 0;
1729 const char * _exceptionType = NULL;
1730 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001731 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001732 jint _bufferOffset = (jint) 0;
1733 jint _remaining;
1734 GLint *value = (GLint *) 0;
1735
Romain Guy84cac202016-12-05 12:26:02 -08001736 if (!value_buf) {
1737 _exception = 1;
1738 _exceptionType = "java/lang/IllegalArgumentException";
1739 _exceptionMessage = "value == null";
1740 goto exit;
1741 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001742 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001743 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001744 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001745 value = (GLint *) (_valueBase + _bufferOffset);
1746 }
1747 glProgramUniform4iv(
1748 (GLuint)program,
1749 (GLint)location,
1750 (GLsizei)count,
1751 (GLint *)value
1752 );
Romain Guy84cac202016-12-05 12:26:02 -08001753
1754exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001755 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001756 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001757 }
Romain Guy84cac202016-12-05 12:26:02 -08001758 if (_exception) {
1759 jniThrowException(_env, _exceptionType, _exceptionMessage);
1760 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001761}
1762
1763/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1764static void
1765android_glProgramUniform1uiv__III_3II
1766 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1767 jint _exception = 0;
1768 const char * _exceptionType = NULL;
1769 const char * _exceptionMessage = NULL;
1770 GLuint *value_base = (GLuint *) 0;
1771 jint _remaining;
1772 GLuint *value = (GLuint *) 0;
1773
1774 if (!value_ref) {
1775 _exception = 1;
1776 _exceptionType = "java/lang/IllegalArgumentException";
1777 _exceptionMessage = "value == null";
1778 goto exit;
1779 }
1780 if (offset < 0) {
1781 _exception = 1;
1782 _exceptionType = "java/lang/IllegalArgumentException";
1783 _exceptionMessage = "offset < 0";
1784 goto exit;
1785 }
1786 _remaining = _env->GetArrayLength(value_ref) - offset;
1787 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001788 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001789 value = value_base + offset;
1790
1791 glProgramUniform1uiv(
1792 (GLuint)program,
1793 (GLint)location,
1794 (GLsizei)count,
1795 (GLuint *)value
1796 );
1797
1798exit:
1799 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001800 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001801 JNI_ABORT);
1802 }
1803 if (_exception) {
1804 jniThrowException(_env, _exceptionType, _exceptionMessage);
1805 }
1806}
1807
1808/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1809static void
1810android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2
1811 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001812 jint _exception = 0;
1813 const char * _exceptionType = NULL;
1814 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001815 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001816 jint _bufferOffset = (jint) 0;
1817 jint _remaining;
1818 GLuint *value = (GLuint *) 0;
1819
Romain Guy84cac202016-12-05 12:26:02 -08001820 if (!value_buf) {
1821 _exception = 1;
1822 _exceptionType = "java/lang/IllegalArgumentException";
1823 _exceptionMessage = "value == null";
1824 goto exit;
1825 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001826 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001827 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001828 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001829 value = (GLuint *) (_valueBase + _bufferOffset);
1830 }
1831 glProgramUniform1uiv(
1832 (GLuint)program,
1833 (GLint)location,
1834 (GLsizei)count,
1835 (GLuint *)value
1836 );
Romain Guy84cac202016-12-05 12:26:02 -08001837
1838exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001839 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001840 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001841 }
Romain Guy84cac202016-12-05 12:26:02 -08001842 if (_exception) {
1843 jniThrowException(_env, _exceptionType, _exceptionMessage);
1844 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001845}
1846
1847/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1848static void
1849android_glProgramUniform2uiv__III_3II
1850 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1851 jint _exception = 0;
1852 const char * _exceptionType = NULL;
1853 const char * _exceptionMessage = NULL;
1854 GLuint *value_base = (GLuint *) 0;
1855 jint _remaining;
1856 GLuint *value = (GLuint *) 0;
1857
1858 if (!value_ref) {
1859 _exception = 1;
1860 _exceptionType = "java/lang/IllegalArgumentException";
1861 _exceptionMessage = "value == null";
1862 goto exit;
1863 }
1864 if (offset < 0) {
1865 _exception = 1;
1866 _exceptionType = "java/lang/IllegalArgumentException";
1867 _exceptionMessage = "offset < 0";
1868 goto exit;
1869 }
1870 _remaining = _env->GetArrayLength(value_ref) - offset;
1871 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001872 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001873 value = value_base + offset;
1874
1875 glProgramUniform2uiv(
1876 (GLuint)program,
1877 (GLint)location,
1878 (GLsizei)count,
1879 (GLuint *)value
1880 );
1881
1882exit:
1883 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001884 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001885 JNI_ABORT);
1886 }
1887 if (_exception) {
1888 jniThrowException(_env, _exceptionType, _exceptionMessage);
1889 }
1890}
1891
1892/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1893static void
1894android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2
1895 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001896 jint _exception = 0;
1897 const char * _exceptionType = NULL;
1898 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001899 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001900 jint _bufferOffset = (jint) 0;
1901 jint _remaining;
1902 GLuint *value = (GLuint *) 0;
1903
Romain Guy84cac202016-12-05 12:26:02 -08001904 if (!value_buf) {
1905 _exception = 1;
1906 _exceptionType = "java/lang/IllegalArgumentException";
1907 _exceptionMessage = "value == null";
1908 goto exit;
1909 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001910 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001911 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001912 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001913 value = (GLuint *) (_valueBase + _bufferOffset);
1914 }
1915 glProgramUniform2uiv(
1916 (GLuint)program,
1917 (GLint)location,
1918 (GLsizei)count,
1919 (GLuint *)value
1920 );
Romain Guy84cac202016-12-05 12:26:02 -08001921
1922exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001923 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001924 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001925 }
Romain Guy84cac202016-12-05 12:26:02 -08001926 if (_exception) {
1927 jniThrowException(_env, _exceptionType, _exceptionMessage);
1928 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001929}
1930
1931/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1932static void
1933android_glProgramUniform3uiv__III_3II
1934 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1935 jint _exception = 0;
1936 const char * _exceptionType = NULL;
1937 const char * _exceptionMessage = NULL;
1938 GLuint *value_base = (GLuint *) 0;
1939 jint _remaining;
1940 GLuint *value = (GLuint *) 0;
1941
1942 if (!value_ref) {
1943 _exception = 1;
1944 _exceptionType = "java/lang/IllegalArgumentException";
1945 _exceptionMessage = "value == null";
1946 goto exit;
1947 }
1948 if (offset < 0) {
1949 _exception = 1;
1950 _exceptionType = "java/lang/IllegalArgumentException";
1951 _exceptionMessage = "offset < 0";
1952 goto exit;
1953 }
1954 _remaining = _env->GetArrayLength(value_ref) - offset;
1955 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001956 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001957 value = value_base + offset;
1958
1959 glProgramUniform3uiv(
1960 (GLuint)program,
1961 (GLint)location,
1962 (GLsizei)count,
1963 (GLuint *)value
1964 );
1965
1966exit:
1967 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001968 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001969 JNI_ABORT);
1970 }
1971 if (_exception) {
1972 jniThrowException(_env, _exceptionType, _exceptionMessage);
1973 }
1974}
1975
1976/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1977static void
1978android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2
1979 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001980 jint _exception = 0;
1981 const char * _exceptionType = NULL;
1982 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001983 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001984 jint _bufferOffset = (jint) 0;
1985 jint _remaining;
1986 GLuint *value = (GLuint *) 0;
1987
Romain Guy84cac202016-12-05 12:26:02 -08001988 if (!value_buf) {
1989 _exception = 1;
1990 _exceptionType = "java/lang/IllegalArgumentException";
1991 _exceptionMessage = "value == null";
1992 goto exit;
1993 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001994 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001995 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001996 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001997 value = (GLuint *) (_valueBase + _bufferOffset);
1998 }
1999 glProgramUniform3uiv(
2000 (GLuint)program,
2001 (GLint)location,
2002 (GLsizei)count,
2003 (GLuint *)value
2004 );
Romain Guy84cac202016-12-05 12:26:02 -08002005
2006exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002007 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002008 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002009 }
Romain Guy84cac202016-12-05 12:26:02 -08002010 if (_exception) {
2011 jniThrowException(_env, _exceptionType, _exceptionMessage);
2012 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002013}
2014
2015/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
2016static void
2017android_glProgramUniform4uiv__III_3II
2018 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
2019 jint _exception = 0;
2020 const char * _exceptionType = NULL;
2021 const char * _exceptionMessage = NULL;
2022 GLuint *value_base = (GLuint *) 0;
2023 jint _remaining;
2024 GLuint *value = (GLuint *) 0;
2025
2026 if (!value_ref) {
2027 _exception = 1;
2028 _exceptionType = "java/lang/IllegalArgumentException";
2029 _exceptionMessage = "value == null";
2030 goto exit;
2031 }
2032 if (offset < 0) {
2033 _exception = 1;
2034 _exceptionType = "java/lang/IllegalArgumentException";
2035 _exceptionMessage = "offset < 0";
2036 goto exit;
2037 }
2038 _remaining = _env->GetArrayLength(value_ref) - offset;
2039 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002040 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002041 value = value_base + offset;
2042
2043 glProgramUniform4uiv(
2044 (GLuint)program,
2045 (GLint)location,
2046 (GLsizei)count,
2047 (GLuint *)value
2048 );
2049
2050exit:
2051 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002052 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002053 JNI_ABORT);
2054 }
2055 if (_exception) {
2056 jniThrowException(_env, _exceptionType, _exceptionMessage);
2057 }
2058}
2059
2060/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
2061static void
2062android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2
2063 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002064 jint _exception = 0;
2065 const char * _exceptionType = NULL;
2066 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002067 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002068 jint _bufferOffset = (jint) 0;
2069 jint _remaining;
2070 GLuint *value = (GLuint *) 0;
2071
Romain Guy84cac202016-12-05 12:26:02 -08002072 if (!value_buf) {
2073 _exception = 1;
2074 _exceptionType = "java/lang/IllegalArgumentException";
2075 _exceptionMessage = "value == null";
2076 goto exit;
2077 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002078 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002079 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002080 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002081 value = (GLuint *) (_valueBase + _bufferOffset);
2082 }
2083 glProgramUniform4uiv(
2084 (GLuint)program,
2085 (GLint)location,
2086 (GLsizei)count,
2087 (GLuint *)value
2088 );
Romain Guy84cac202016-12-05 12:26:02 -08002089
2090exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002091 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002092 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002093 }
Romain Guy84cac202016-12-05 12:26:02 -08002094 if (_exception) {
2095 jniThrowException(_env, _exceptionType, _exceptionMessage);
2096 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002097}
2098
2099/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2100static void
2101android_glProgramUniform1fv__III_3FI
2102 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2103 jint _exception = 0;
2104 const char * _exceptionType = NULL;
2105 const char * _exceptionMessage = NULL;
2106 GLfloat *value_base = (GLfloat *) 0;
2107 jint _remaining;
2108 GLfloat *value = (GLfloat *) 0;
2109
2110 if (!value_ref) {
2111 _exception = 1;
2112 _exceptionType = "java/lang/IllegalArgumentException";
2113 _exceptionMessage = "value == null";
2114 goto exit;
2115 }
2116 if (offset < 0) {
2117 _exception = 1;
2118 _exceptionType = "java/lang/IllegalArgumentException";
2119 _exceptionMessage = "offset < 0";
2120 goto exit;
2121 }
2122 _remaining = _env->GetArrayLength(value_ref) - offset;
2123 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002124 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002125 value = value_base + offset;
2126
2127 glProgramUniform1fv(
2128 (GLuint)program,
2129 (GLint)location,
2130 (GLsizei)count,
2131 (GLfloat *)value
2132 );
2133
2134exit:
2135 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002136 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002137 JNI_ABORT);
2138 }
2139 if (_exception) {
2140 jniThrowException(_env, _exceptionType, _exceptionMessage);
2141 }
2142}
2143
2144/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2145static void
2146android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2
2147 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002148 jint _exception = 0;
2149 const char * _exceptionType = NULL;
2150 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002151 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002152 jint _bufferOffset = (jint) 0;
2153 jint _remaining;
2154 GLfloat *value = (GLfloat *) 0;
2155
Romain Guy84cac202016-12-05 12:26:02 -08002156 if (!value_buf) {
2157 _exception = 1;
2158 _exceptionType = "java/lang/IllegalArgumentException";
2159 _exceptionMessage = "value == null";
2160 goto exit;
2161 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002162 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002163 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002164 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002165 value = (GLfloat *) (_valueBase + _bufferOffset);
2166 }
2167 glProgramUniform1fv(
2168 (GLuint)program,
2169 (GLint)location,
2170 (GLsizei)count,
2171 (GLfloat *)value
2172 );
Romain Guy84cac202016-12-05 12:26:02 -08002173
2174exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002175 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002176 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002177 }
Romain Guy84cac202016-12-05 12:26:02 -08002178 if (_exception) {
2179 jniThrowException(_env, _exceptionType, _exceptionMessage);
2180 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002181}
2182
2183/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2184static void
2185android_glProgramUniform2fv__III_3FI
2186 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2187 jint _exception = 0;
2188 const char * _exceptionType = NULL;
2189 const char * _exceptionMessage = NULL;
2190 GLfloat *value_base = (GLfloat *) 0;
2191 jint _remaining;
2192 GLfloat *value = (GLfloat *) 0;
2193
2194 if (!value_ref) {
2195 _exception = 1;
2196 _exceptionType = "java/lang/IllegalArgumentException";
2197 _exceptionMessage = "value == null";
2198 goto exit;
2199 }
2200 if (offset < 0) {
2201 _exception = 1;
2202 _exceptionType = "java/lang/IllegalArgumentException";
2203 _exceptionMessage = "offset < 0";
2204 goto exit;
2205 }
2206 _remaining = _env->GetArrayLength(value_ref) - offset;
2207 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002208 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002209 value = value_base + offset;
2210
2211 glProgramUniform2fv(
2212 (GLuint)program,
2213 (GLint)location,
2214 (GLsizei)count,
2215 (GLfloat *)value
2216 );
2217
2218exit:
2219 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002220 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002221 JNI_ABORT);
2222 }
2223 if (_exception) {
2224 jniThrowException(_env, _exceptionType, _exceptionMessage);
2225 }
2226}
2227
2228/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2229static void
2230android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2
2231 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002232 jint _exception = 0;
2233 const char * _exceptionType = NULL;
2234 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002235 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002236 jint _bufferOffset = (jint) 0;
2237 jint _remaining;
2238 GLfloat *value = (GLfloat *) 0;
2239
Romain Guy84cac202016-12-05 12:26:02 -08002240 if (!value_buf) {
2241 _exception = 1;
2242 _exceptionType = "java/lang/IllegalArgumentException";
2243 _exceptionMessage = "value == null";
2244 goto exit;
2245 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002246 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002247 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002248 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002249 value = (GLfloat *) (_valueBase + _bufferOffset);
2250 }
2251 glProgramUniform2fv(
2252 (GLuint)program,
2253 (GLint)location,
2254 (GLsizei)count,
2255 (GLfloat *)value
2256 );
Romain Guy84cac202016-12-05 12:26:02 -08002257
2258exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002259 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002260 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002261 }
Romain Guy84cac202016-12-05 12:26:02 -08002262 if (_exception) {
2263 jniThrowException(_env, _exceptionType, _exceptionMessage);
2264 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002265}
2266
2267/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2268static void
2269android_glProgramUniform3fv__III_3FI
2270 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2271 jint _exception = 0;
2272 const char * _exceptionType = NULL;
2273 const char * _exceptionMessage = NULL;
2274 GLfloat *value_base = (GLfloat *) 0;
2275 jint _remaining;
2276 GLfloat *value = (GLfloat *) 0;
2277
2278 if (!value_ref) {
2279 _exception = 1;
2280 _exceptionType = "java/lang/IllegalArgumentException";
2281 _exceptionMessage = "value == null";
2282 goto exit;
2283 }
2284 if (offset < 0) {
2285 _exception = 1;
2286 _exceptionType = "java/lang/IllegalArgumentException";
2287 _exceptionMessage = "offset < 0";
2288 goto exit;
2289 }
2290 _remaining = _env->GetArrayLength(value_ref) - offset;
2291 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002292 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002293 value = value_base + offset;
2294
2295 glProgramUniform3fv(
2296 (GLuint)program,
2297 (GLint)location,
2298 (GLsizei)count,
2299 (GLfloat *)value
2300 );
2301
2302exit:
2303 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002304 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002305 JNI_ABORT);
2306 }
2307 if (_exception) {
2308 jniThrowException(_env, _exceptionType, _exceptionMessage);
2309 }
2310}
2311
2312/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2313static void
2314android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2
2315 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002316 jint _exception = 0;
2317 const char * _exceptionType = NULL;
2318 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002319 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002320 jint _bufferOffset = (jint) 0;
2321 jint _remaining;
2322 GLfloat *value = (GLfloat *) 0;
2323
Romain Guy84cac202016-12-05 12:26:02 -08002324 if (!value_buf) {
2325 _exception = 1;
2326 _exceptionType = "java/lang/IllegalArgumentException";
2327 _exceptionMessage = "value == null";
2328 goto exit;
2329 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002330 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002331 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002332 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002333 value = (GLfloat *) (_valueBase + _bufferOffset);
2334 }
2335 glProgramUniform3fv(
2336 (GLuint)program,
2337 (GLint)location,
2338 (GLsizei)count,
2339 (GLfloat *)value
2340 );
Romain Guy84cac202016-12-05 12:26:02 -08002341
2342exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002343 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002344 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002345 }
Romain Guy84cac202016-12-05 12:26:02 -08002346 if (_exception) {
2347 jniThrowException(_env, _exceptionType, _exceptionMessage);
2348 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002349}
2350
2351/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2352static void
2353android_glProgramUniform4fv__III_3FI
2354 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2355 jint _exception = 0;
2356 const char * _exceptionType = NULL;
2357 const char * _exceptionMessage = NULL;
2358 GLfloat *value_base = (GLfloat *) 0;
2359 jint _remaining;
2360 GLfloat *value = (GLfloat *) 0;
2361
2362 if (!value_ref) {
2363 _exception = 1;
2364 _exceptionType = "java/lang/IllegalArgumentException";
2365 _exceptionMessage = "value == null";
2366 goto exit;
2367 }
2368 if (offset < 0) {
2369 _exception = 1;
2370 _exceptionType = "java/lang/IllegalArgumentException";
2371 _exceptionMessage = "offset < 0";
2372 goto exit;
2373 }
2374 _remaining = _env->GetArrayLength(value_ref) - offset;
2375 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002376 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002377 value = value_base + offset;
2378
2379 glProgramUniform4fv(
2380 (GLuint)program,
2381 (GLint)location,
2382 (GLsizei)count,
2383 (GLfloat *)value
2384 );
2385
2386exit:
2387 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002388 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002389 JNI_ABORT);
2390 }
2391 if (_exception) {
2392 jniThrowException(_env, _exceptionType, _exceptionMessage);
2393 }
2394}
2395
2396/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2397static void
2398android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2
2399 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002400 jint _exception = 0;
2401 const char * _exceptionType = NULL;
2402 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002403 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002404 jint _bufferOffset = (jint) 0;
2405 jint _remaining;
2406 GLfloat *value = (GLfloat *) 0;
2407
Romain Guy84cac202016-12-05 12:26:02 -08002408 if (!value_buf) {
2409 _exception = 1;
2410 _exceptionType = "java/lang/IllegalArgumentException";
2411 _exceptionMessage = "value == null";
2412 goto exit;
2413 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002414 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002415 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002416 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002417 value = (GLfloat *) (_valueBase + _bufferOffset);
2418 }
2419 glProgramUniform4fv(
2420 (GLuint)program,
2421 (GLint)location,
2422 (GLsizei)count,
2423 (GLfloat *)value
2424 );
Romain Guy84cac202016-12-05 12:26:02 -08002425
2426exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002427 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002428 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002429 }
Romain Guy84cac202016-12-05 12:26:02 -08002430 if (_exception) {
2431 jniThrowException(_env, _exceptionType, _exceptionMessage);
2432 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002433}
2434
2435/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2436static void
2437android_glProgramUniformMatrix2fv__IIIZ_3FI
2438 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2439 jint _exception = 0;
2440 const char * _exceptionType = NULL;
2441 const char * _exceptionMessage = NULL;
2442 GLfloat *value_base = (GLfloat *) 0;
2443 jint _remaining;
2444 GLfloat *value = (GLfloat *) 0;
2445
2446 if (!value_ref) {
2447 _exception = 1;
2448 _exceptionType = "java/lang/IllegalArgumentException";
2449 _exceptionMessage = "value == null";
2450 goto exit;
2451 }
2452 if (offset < 0) {
2453 _exception = 1;
2454 _exceptionType = "java/lang/IllegalArgumentException";
2455 _exceptionMessage = "offset < 0";
2456 goto exit;
2457 }
2458 _remaining = _env->GetArrayLength(value_ref) - offset;
2459 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002460 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002461 value = value_base + offset;
2462
2463 glProgramUniformMatrix2fv(
2464 (GLuint)program,
2465 (GLint)location,
2466 (GLsizei)count,
2467 (GLboolean)transpose,
2468 (GLfloat *)value
2469 );
2470
2471exit:
2472 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002473 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002474 JNI_ABORT);
2475 }
2476 if (_exception) {
2477 jniThrowException(_env, _exceptionType, _exceptionMessage);
2478 }
2479}
2480
2481/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2482static void
2483android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2
2484 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002485 jint _exception = 0;
2486 const char * _exceptionType = NULL;
2487 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002488 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002489 jint _bufferOffset = (jint) 0;
2490 jint _remaining;
2491 GLfloat *value = (GLfloat *) 0;
2492
Romain Guy84cac202016-12-05 12:26:02 -08002493 if (!value_buf) {
2494 _exception = 1;
2495 _exceptionType = "java/lang/IllegalArgumentException";
2496 _exceptionMessage = "value == null";
2497 goto exit;
2498 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002499 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002500 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002501 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002502 value = (GLfloat *) (_valueBase + _bufferOffset);
2503 }
2504 glProgramUniformMatrix2fv(
2505 (GLuint)program,
2506 (GLint)location,
2507 (GLsizei)count,
2508 (GLboolean)transpose,
2509 (GLfloat *)value
2510 );
Romain Guy84cac202016-12-05 12:26:02 -08002511
2512exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002513 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002514 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002515 }
Romain Guy84cac202016-12-05 12:26:02 -08002516 if (_exception) {
2517 jniThrowException(_env, _exceptionType, _exceptionMessage);
2518 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002519}
2520
2521/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2522static void
2523android_glProgramUniformMatrix3fv__IIIZ_3FI
2524 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2525 jint _exception = 0;
2526 const char * _exceptionType = NULL;
2527 const char * _exceptionMessage = NULL;
2528 GLfloat *value_base = (GLfloat *) 0;
2529 jint _remaining;
2530 GLfloat *value = (GLfloat *) 0;
2531
2532 if (!value_ref) {
2533 _exception = 1;
2534 _exceptionType = "java/lang/IllegalArgumentException";
2535 _exceptionMessage = "value == null";
2536 goto exit;
2537 }
2538 if (offset < 0) {
2539 _exception = 1;
2540 _exceptionType = "java/lang/IllegalArgumentException";
2541 _exceptionMessage = "offset < 0";
2542 goto exit;
2543 }
2544 _remaining = _env->GetArrayLength(value_ref) - offset;
2545 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002546 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002547 value = value_base + offset;
2548
2549 glProgramUniformMatrix3fv(
2550 (GLuint)program,
2551 (GLint)location,
2552 (GLsizei)count,
2553 (GLboolean)transpose,
2554 (GLfloat *)value
2555 );
2556
2557exit:
2558 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002559 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002560 JNI_ABORT);
2561 }
2562 if (_exception) {
2563 jniThrowException(_env, _exceptionType, _exceptionMessage);
2564 }
2565}
2566
2567/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2568static void
2569android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2
2570 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002571 jint _exception = 0;
2572 const char * _exceptionType = NULL;
2573 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002574 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002575 jint _bufferOffset = (jint) 0;
2576 jint _remaining;
2577 GLfloat *value = (GLfloat *) 0;
2578
Romain Guy84cac202016-12-05 12:26:02 -08002579 if (!value_buf) {
2580 _exception = 1;
2581 _exceptionType = "java/lang/IllegalArgumentException";
2582 _exceptionMessage = "value == null";
2583 goto exit;
2584 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002585 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002586 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002587 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002588 value = (GLfloat *) (_valueBase + _bufferOffset);
2589 }
2590 glProgramUniformMatrix3fv(
2591 (GLuint)program,
2592 (GLint)location,
2593 (GLsizei)count,
2594 (GLboolean)transpose,
2595 (GLfloat *)value
2596 );
Romain Guy84cac202016-12-05 12:26:02 -08002597
2598exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002599 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002600 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002601 }
Romain Guy84cac202016-12-05 12:26:02 -08002602 if (_exception) {
2603 jniThrowException(_env, _exceptionType, _exceptionMessage);
2604 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002605}
2606
2607/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2608static void
2609android_glProgramUniformMatrix4fv__IIIZ_3FI
2610 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2611 jint _exception = 0;
2612 const char * _exceptionType = NULL;
2613 const char * _exceptionMessage = NULL;
2614 GLfloat *value_base = (GLfloat *) 0;
2615 jint _remaining;
2616 GLfloat *value = (GLfloat *) 0;
2617
2618 if (!value_ref) {
2619 _exception = 1;
2620 _exceptionType = "java/lang/IllegalArgumentException";
2621 _exceptionMessage = "value == null";
2622 goto exit;
2623 }
2624 if (offset < 0) {
2625 _exception = 1;
2626 _exceptionType = "java/lang/IllegalArgumentException";
2627 _exceptionMessage = "offset < 0";
2628 goto exit;
2629 }
2630 _remaining = _env->GetArrayLength(value_ref) - offset;
2631 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002632 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002633 value = value_base + offset;
2634
2635 glProgramUniformMatrix4fv(
2636 (GLuint)program,
2637 (GLint)location,
2638 (GLsizei)count,
2639 (GLboolean)transpose,
2640 (GLfloat *)value
2641 );
2642
2643exit:
2644 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002645 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002646 JNI_ABORT);
2647 }
2648 if (_exception) {
2649 jniThrowException(_env, _exceptionType, _exceptionMessage);
2650 }
2651}
2652
2653/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2654static void
2655android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2
2656 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002657 jint _exception = 0;
2658 const char * _exceptionType = NULL;
2659 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002660 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002661 jint _bufferOffset = (jint) 0;
2662 jint _remaining;
2663 GLfloat *value = (GLfloat *) 0;
2664
Romain Guy84cac202016-12-05 12:26:02 -08002665 if (!value_buf) {
2666 _exception = 1;
2667 _exceptionType = "java/lang/IllegalArgumentException";
2668 _exceptionMessage = "value == null";
2669 goto exit;
2670 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002671 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002672 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002673 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002674 value = (GLfloat *) (_valueBase + _bufferOffset);
2675 }
2676 glProgramUniformMatrix4fv(
2677 (GLuint)program,
2678 (GLint)location,
2679 (GLsizei)count,
2680 (GLboolean)transpose,
2681 (GLfloat *)value
2682 );
Romain Guy84cac202016-12-05 12:26:02 -08002683
2684exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002685 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002686 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002687 }
Romain Guy84cac202016-12-05 12:26:02 -08002688 if (_exception) {
2689 jniThrowException(_env, _exceptionType, _exceptionMessage);
2690 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002691}
2692
2693/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2694static void
2695android_glProgramUniformMatrix2x3fv__IIIZ_3FI
2696 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2697 jint _exception = 0;
2698 const char * _exceptionType = NULL;
2699 const char * _exceptionMessage = NULL;
2700 GLfloat *value_base = (GLfloat *) 0;
2701 jint _remaining;
2702 GLfloat *value = (GLfloat *) 0;
2703
2704 if (!value_ref) {
2705 _exception = 1;
2706 _exceptionType = "java/lang/IllegalArgumentException";
2707 _exceptionMessage = "value == null";
2708 goto exit;
2709 }
2710 if (offset < 0) {
2711 _exception = 1;
2712 _exceptionType = "java/lang/IllegalArgumentException";
2713 _exceptionMessage = "offset < 0";
2714 goto exit;
2715 }
2716 _remaining = _env->GetArrayLength(value_ref) - offset;
2717 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002718 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002719 value = value_base + offset;
2720
2721 glProgramUniformMatrix2x3fv(
2722 (GLuint)program,
2723 (GLint)location,
2724 (GLsizei)count,
2725 (GLboolean)transpose,
2726 (GLfloat *)value
2727 );
2728
2729exit:
2730 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002731 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002732 JNI_ABORT);
2733 }
2734 if (_exception) {
2735 jniThrowException(_env, _exceptionType, _exceptionMessage);
2736 }
2737}
2738
2739/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2740static void
2741android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2
2742 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002743 jint _exception = 0;
2744 const char * _exceptionType = NULL;
2745 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002746 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002747 jint _bufferOffset = (jint) 0;
2748 jint _remaining;
2749 GLfloat *value = (GLfloat *) 0;
2750
Romain Guy84cac202016-12-05 12:26:02 -08002751 if (!value_buf) {
2752 _exception = 1;
2753 _exceptionType = "java/lang/IllegalArgumentException";
2754 _exceptionMessage = "value == null";
2755 goto exit;
2756 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002757 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002758 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002759 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002760 value = (GLfloat *) (_valueBase + _bufferOffset);
2761 }
2762 glProgramUniformMatrix2x3fv(
2763 (GLuint)program,
2764 (GLint)location,
2765 (GLsizei)count,
2766 (GLboolean)transpose,
2767 (GLfloat *)value
2768 );
Romain Guy84cac202016-12-05 12:26:02 -08002769
2770exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002771 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002772 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002773 }
Romain Guy84cac202016-12-05 12:26:02 -08002774 if (_exception) {
2775 jniThrowException(_env, _exceptionType, _exceptionMessage);
2776 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002777}
2778
2779/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2780static void
2781android_glProgramUniformMatrix3x2fv__IIIZ_3FI
2782 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2783 jint _exception = 0;
2784 const char * _exceptionType = NULL;
2785 const char * _exceptionMessage = NULL;
2786 GLfloat *value_base = (GLfloat *) 0;
2787 jint _remaining;
2788 GLfloat *value = (GLfloat *) 0;
2789
2790 if (!value_ref) {
2791 _exception = 1;
2792 _exceptionType = "java/lang/IllegalArgumentException";
2793 _exceptionMessage = "value == null";
2794 goto exit;
2795 }
2796 if (offset < 0) {
2797 _exception = 1;
2798 _exceptionType = "java/lang/IllegalArgumentException";
2799 _exceptionMessage = "offset < 0";
2800 goto exit;
2801 }
2802 _remaining = _env->GetArrayLength(value_ref) - offset;
2803 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002804 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002805 value = value_base + offset;
2806
2807 glProgramUniformMatrix3x2fv(
2808 (GLuint)program,
2809 (GLint)location,
2810 (GLsizei)count,
2811 (GLboolean)transpose,
2812 (GLfloat *)value
2813 );
2814
2815exit:
2816 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002817 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002818 JNI_ABORT);
2819 }
2820 if (_exception) {
2821 jniThrowException(_env, _exceptionType, _exceptionMessage);
2822 }
2823}
2824
2825/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2826static void
2827android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2
2828 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002829 jint _exception = 0;
2830 const char * _exceptionType = NULL;
2831 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002832 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002833 jint _bufferOffset = (jint) 0;
2834 jint _remaining;
2835 GLfloat *value = (GLfloat *) 0;
2836
Romain Guy84cac202016-12-05 12:26:02 -08002837 if (!value_buf) {
2838 _exception = 1;
2839 _exceptionType = "java/lang/IllegalArgumentException";
2840 _exceptionMessage = "value == null";
2841 goto exit;
2842 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002843 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002844 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002845 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002846 value = (GLfloat *) (_valueBase + _bufferOffset);
2847 }
2848 glProgramUniformMatrix3x2fv(
2849 (GLuint)program,
2850 (GLint)location,
2851 (GLsizei)count,
2852 (GLboolean)transpose,
2853 (GLfloat *)value
2854 );
Romain Guy84cac202016-12-05 12:26:02 -08002855
2856exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002857 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002858 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002859 }
Romain Guy84cac202016-12-05 12:26:02 -08002860 if (_exception) {
2861 jniThrowException(_env, _exceptionType, _exceptionMessage);
2862 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002863}
2864
2865/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2866static void
2867android_glProgramUniformMatrix2x4fv__IIIZ_3FI
2868 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2869 jint _exception = 0;
2870 const char * _exceptionType = NULL;
2871 const char * _exceptionMessage = NULL;
2872 GLfloat *value_base = (GLfloat *) 0;
2873 jint _remaining;
2874 GLfloat *value = (GLfloat *) 0;
2875
2876 if (!value_ref) {
2877 _exception = 1;
2878 _exceptionType = "java/lang/IllegalArgumentException";
2879 _exceptionMessage = "value == null";
2880 goto exit;
2881 }
2882 if (offset < 0) {
2883 _exception = 1;
2884 _exceptionType = "java/lang/IllegalArgumentException";
2885 _exceptionMessage = "offset < 0";
2886 goto exit;
2887 }
2888 _remaining = _env->GetArrayLength(value_ref) - offset;
2889 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002890 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002891 value = value_base + offset;
2892
2893 glProgramUniformMatrix2x4fv(
2894 (GLuint)program,
2895 (GLint)location,
2896 (GLsizei)count,
2897 (GLboolean)transpose,
2898 (GLfloat *)value
2899 );
2900
2901exit:
2902 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002903 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002904 JNI_ABORT);
2905 }
2906 if (_exception) {
2907 jniThrowException(_env, _exceptionType, _exceptionMessage);
2908 }
2909}
2910
2911/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2912static void
2913android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2
2914 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002915 jint _exception = 0;
2916 const char * _exceptionType = NULL;
2917 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002918 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002919 jint _bufferOffset = (jint) 0;
2920 jint _remaining;
2921 GLfloat *value = (GLfloat *) 0;
2922
Romain Guy84cac202016-12-05 12:26:02 -08002923 if (!value_buf) {
2924 _exception = 1;
2925 _exceptionType = "java/lang/IllegalArgumentException";
2926 _exceptionMessage = "value == null";
2927 goto exit;
2928 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002929 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002930 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002931 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002932 value = (GLfloat *) (_valueBase + _bufferOffset);
2933 }
2934 glProgramUniformMatrix2x4fv(
2935 (GLuint)program,
2936 (GLint)location,
2937 (GLsizei)count,
2938 (GLboolean)transpose,
2939 (GLfloat *)value
2940 );
Romain Guy84cac202016-12-05 12:26:02 -08002941
2942exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002943 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002944 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002945 }
Romain Guy84cac202016-12-05 12:26:02 -08002946 if (_exception) {
2947 jniThrowException(_env, _exceptionType, _exceptionMessage);
2948 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002949}
2950
2951/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2952static void
2953android_glProgramUniformMatrix4x2fv__IIIZ_3FI
2954 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2955 jint _exception = 0;
2956 const char * _exceptionType = NULL;
2957 const char * _exceptionMessage = NULL;
2958 GLfloat *value_base = (GLfloat *) 0;
2959 jint _remaining;
2960 GLfloat *value = (GLfloat *) 0;
2961
2962 if (!value_ref) {
2963 _exception = 1;
2964 _exceptionType = "java/lang/IllegalArgumentException";
2965 _exceptionMessage = "value == null";
2966 goto exit;
2967 }
2968 if (offset < 0) {
2969 _exception = 1;
2970 _exceptionType = "java/lang/IllegalArgumentException";
2971 _exceptionMessage = "offset < 0";
2972 goto exit;
2973 }
2974 _remaining = _env->GetArrayLength(value_ref) - offset;
2975 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002976 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002977 value = value_base + offset;
2978
2979 glProgramUniformMatrix4x2fv(
2980 (GLuint)program,
2981 (GLint)location,
2982 (GLsizei)count,
2983 (GLboolean)transpose,
2984 (GLfloat *)value
2985 );
2986
2987exit:
2988 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002989 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002990 JNI_ABORT);
2991 }
2992 if (_exception) {
2993 jniThrowException(_env, _exceptionType, _exceptionMessage);
2994 }
2995}
2996
2997/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2998static void
2999android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2
3000 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003001 jint _exception = 0;
3002 const char * _exceptionType = NULL;
3003 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003004 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003005 jint _bufferOffset = (jint) 0;
3006 jint _remaining;
3007 GLfloat *value = (GLfloat *) 0;
3008
Romain Guy84cac202016-12-05 12:26:02 -08003009 if (!value_buf) {
3010 _exception = 1;
3011 _exceptionType = "java/lang/IllegalArgumentException";
3012 _exceptionMessage = "value == null";
3013 goto exit;
3014 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003015 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003016 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003017 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003018 value = (GLfloat *) (_valueBase + _bufferOffset);
3019 }
3020 glProgramUniformMatrix4x2fv(
3021 (GLuint)program,
3022 (GLint)location,
3023 (GLsizei)count,
3024 (GLboolean)transpose,
3025 (GLfloat *)value
3026 );
Romain Guy84cac202016-12-05 12:26:02 -08003027
3028exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003029 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003030 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003031 }
Romain Guy84cac202016-12-05 12:26:02 -08003032 if (_exception) {
3033 jniThrowException(_env, _exceptionType, _exceptionMessage);
3034 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003035}
3036
3037/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3038static void
3039android_glProgramUniformMatrix3x4fv__IIIZ_3FI
3040 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3041 jint _exception = 0;
3042 const char * _exceptionType = NULL;
3043 const char * _exceptionMessage = NULL;
3044 GLfloat *value_base = (GLfloat *) 0;
3045 jint _remaining;
3046 GLfloat *value = (GLfloat *) 0;
3047
3048 if (!value_ref) {
3049 _exception = 1;
3050 _exceptionType = "java/lang/IllegalArgumentException";
3051 _exceptionMessage = "value == null";
3052 goto exit;
3053 }
3054 if (offset < 0) {
3055 _exception = 1;
3056 _exceptionType = "java/lang/IllegalArgumentException";
3057 _exceptionMessage = "offset < 0";
3058 goto exit;
3059 }
3060 _remaining = _env->GetArrayLength(value_ref) - offset;
3061 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003062 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003063 value = value_base + offset;
3064
3065 glProgramUniformMatrix3x4fv(
3066 (GLuint)program,
3067 (GLint)location,
3068 (GLsizei)count,
3069 (GLboolean)transpose,
3070 (GLfloat *)value
3071 );
3072
3073exit:
3074 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003075 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003076 JNI_ABORT);
3077 }
3078 if (_exception) {
3079 jniThrowException(_env, _exceptionType, _exceptionMessage);
3080 }
3081}
3082
3083/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3084static void
3085android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2
3086 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003087 jint _exception = 0;
3088 const char * _exceptionType = NULL;
3089 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003090 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003091 jint _bufferOffset = (jint) 0;
3092 jint _remaining;
3093 GLfloat *value = (GLfloat *) 0;
3094
Romain Guy84cac202016-12-05 12:26:02 -08003095 if (!value_buf) {
3096 _exception = 1;
3097 _exceptionType = "java/lang/IllegalArgumentException";
3098 _exceptionMessage = "value == null";
3099 goto exit;
3100 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003101 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003102 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003103 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003104 value = (GLfloat *) (_valueBase + _bufferOffset);
3105 }
3106 glProgramUniformMatrix3x4fv(
3107 (GLuint)program,
3108 (GLint)location,
3109 (GLsizei)count,
3110 (GLboolean)transpose,
3111 (GLfloat *)value
3112 );
Romain Guy84cac202016-12-05 12:26:02 -08003113
3114exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003115 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003116 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003117 }
Romain Guy84cac202016-12-05 12:26:02 -08003118 if (_exception) {
3119 jniThrowException(_env, _exceptionType, _exceptionMessage);
3120 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003121}
3122
3123/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3124static void
3125android_glProgramUniformMatrix4x3fv__IIIZ_3FI
3126 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3127 jint _exception = 0;
3128 const char * _exceptionType = NULL;
3129 const char * _exceptionMessage = NULL;
3130 GLfloat *value_base = (GLfloat *) 0;
3131 jint _remaining;
3132 GLfloat *value = (GLfloat *) 0;
3133
3134 if (!value_ref) {
3135 _exception = 1;
3136 _exceptionType = "java/lang/IllegalArgumentException";
3137 _exceptionMessage = "value == null";
3138 goto exit;
3139 }
3140 if (offset < 0) {
3141 _exception = 1;
3142 _exceptionType = "java/lang/IllegalArgumentException";
3143 _exceptionMessage = "offset < 0";
3144 goto exit;
3145 }
3146 _remaining = _env->GetArrayLength(value_ref) - offset;
3147 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003148 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003149 value = value_base + offset;
3150
3151 glProgramUniformMatrix4x3fv(
3152 (GLuint)program,
3153 (GLint)location,
3154 (GLsizei)count,
3155 (GLboolean)transpose,
3156 (GLfloat *)value
3157 );
3158
3159exit:
3160 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003161 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003162 JNI_ABORT);
3163 }
3164 if (_exception) {
3165 jniThrowException(_env, _exceptionType, _exceptionMessage);
3166 }
3167}
3168
3169/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3170static void
3171android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2
3172 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003173 jint _exception = 0;
3174 const char * _exceptionType = NULL;
3175 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003176 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003177 jint _bufferOffset = (jint) 0;
3178 jint _remaining;
3179 GLfloat *value = (GLfloat *) 0;
3180
Romain Guy84cac202016-12-05 12:26:02 -08003181 if (!value_buf) {
3182 _exception = 1;
3183 _exceptionType = "java/lang/IllegalArgumentException";
3184 _exceptionMessage = "value == null";
3185 goto exit;
3186 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003187 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003188 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003189 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003190 value = (GLfloat *) (_valueBase + _bufferOffset);
3191 }
3192 glProgramUniformMatrix4x3fv(
3193 (GLuint)program,
3194 (GLint)location,
3195 (GLsizei)count,
3196 (GLboolean)transpose,
3197 (GLfloat *)value
3198 );
Romain Guy84cac202016-12-05 12:26:02 -08003199
3200exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003201 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003202 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003203 }
Romain Guy84cac202016-12-05 12:26:02 -08003204 if (_exception) {
3205 jniThrowException(_env, _exceptionType, _exceptionMessage);
3206 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003207}
3208
3209/* void glValidateProgramPipeline ( GLuint pipeline ) */
3210static void
3211android_glValidateProgramPipeline__I
3212 (JNIEnv *_env, jobject _this, jint pipeline) {
3213 glValidateProgramPipeline(
3214 (GLuint)pipeline
3215 );
3216}
3217
3218#include <stdlib.h>
3219
3220/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
3221static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
3222 GLint infoLen = 0;
3223 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
3224 if (!infoLen) {
3225 return _env->NewStringUTF("");
3226 }
3227 char* buf = (char*) malloc(infoLen);
3228 if (buf == NULL) {
3229 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
3230 return NULL;
3231 }
3232 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
3233 jstring result = _env->NewStringUTF(buf);
3234 free(buf);
3235 return result;
3236}
3237/* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */
3238static void
3239android_glBindImageTexture__IIIZIII
3240 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) {
3241 glBindImageTexture(
3242 (GLuint)unit,
3243 (GLuint)texture,
3244 (GLint)level,
3245 (GLboolean)layered,
3246 (GLint)layer,
3247 (GLenum)access,
3248 (GLenum)format
3249 );
3250}
3251
3252/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3253static void
3254android_glGetBooleani_v__II_3ZI
3255 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) {
3256 jint _exception = 0;
3257 const char * _exceptionType = NULL;
3258 const char * _exceptionMessage = NULL;
3259 GLboolean *data_base = (GLboolean *) 0;
3260 jint _remaining;
3261 GLboolean *data = (GLboolean *) 0;
3262
3263 if (!data_ref) {
3264 _exception = 1;
3265 _exceptionType = "java/lang/IllegalArgumentException";
3266 _exceptionMessage = "data == null";
3267 goto exit;
3268 }
3269 if (offset < 0) {
3270 _exception = 1;
3271 _exceptionType = "java/lang/IllegalArgumentException";
3272 _exceptionMessage = "offset < 0";
3273 goto exit;
3274 }
3275 _remaining = _env->GetArrayLength(data_ref) - offset;
3276 data_base = (GLboolean *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003277 _env->GetBooleanArrayElements(data_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003278 data = data_base + offset;
3279
3280 glGetBooleani_v(
3281 (GLenum)target,
3282 (GLuint)index,
3283 (GLboolean *)data
3284 );
3285
3286exit:
3287 if (data_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003288 _env->ReleaseBooleanArrayElements(data_ref, (jboolean*)data_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003289 _exception ? JNI_ABORT: 0);
3290 }
3291 if (_exception) {
3292 jniThrowException(_env, _exceptionType, _exceptionMessage);
3293 }
3294}
3295
3296/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3297static void
3298android_glGetBooleani_v__IILjava_nio_IntBuffer_2
3299 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003300 jint _exception = 0;
3301 const char * _exceptionType = NULL;
3302 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003303 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003304 jint _bufferOffset = (jint) 0;
3305 jint _remaining;
3306 GLboolean *data = (GLboolean *) 0;
3307
Romain Guy84cac202016-12-05 12:26:02 -08003308 if (!data_buf) {
3309 _exception = 1;
3310 _exceptionType = "java/lang/IllegalArgumentException";
3311 _exceptionMessage = "data == null";
3312 goto exit;
3313 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003314 data = (GLboolean *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003315 if (data == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003316 char * _dataBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003317 data = (GLboolean *) (_dataBase + _bufferOffset);
3318 }
3319 glGetBooleani_v(
3320 (GLenum)target,
3321 (GLuint)index,
3322 (GLboolean *)data
3323 );
Romain Guy84cac202016-12-05 12:26:02 -08003324
3325exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003326 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003327 _env->ReleaseIntArrayElements(_array, (jint*)data, _exception ? JNI_ABORT : 0);
3328 }
3329 if (_exception) {
3330 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003331 }
3332}
3333
3334/* void glMemoryBarrier ( GLbitfield barriers ) */
3335static void
3336android_glMemoryBarrier__I
3337 (JNIEnv *_env, jobject _this, jint barriers) {
3338 glMemoryBarrier(
3339 (GLbitfield)barriers
3340 );
3341}
3342
3343/* void glMemoryBarrierByRegion ( GLbitfield barriers ) */
3344static void
3345android_glMemoryBarrierByRegion__I
3346 (JNIEnv *_env, jobject _this, jint barriers) {
3347 glMemoryBarrierByRegion(
3348 (GLbitfield)barriers
3349 );
3350}
3351
3352/* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */
3353static void
3354android_glTexStorage2DMultisample__IIIIIZ
3355 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) {
3356 glTexStorage2DMultisample(
3357 (GLenum)target,
3358 (GLsizei)samples,
3359 (GLenum)internalformat,
3360 (GLsizei)width,
3361 (GLsizei)height,
3362 (GLboolean)fixedsamplelocations
3363 );
3364}
3365
3366/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3367static void
3368android_glGetMultisamplefv__II_3FI
3369 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) {
3370 jint _exception = 0;
3371 const char * _exceptionType = NULL;
3372 const char * _exceptionMessage = NULL;
3373 GLfloat *val_base = (GLfloat *) 0;
3374 jint _remaining;
3375 GLfloat *val = (GLfloat *) 0;
3376
3377 if (!val_ref) {
3378 _exception = 1;
3379 _exceptionType = "java/lang/IllegalArgumentException";
3380 _exceptionMessage = "val == null";
3381 goto exit;
3382 }
3383 if (offset < 0) {
3384 _exception = 1;
3385 _exceptionType = "java/lang/IllegalArgumentException";
3386 _exceptionMessage = "offset < 0";
3387 goto exit;
3388 }
3389 _remaining = _env->GetArrayLength(val_ref) - offset;
3390 val_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003391 _env->GetFloatArrayElements(val_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003392 val = val_base + offset;
3393
3394 glGetMultisamplefv(
3395 (GLenum)pname,
3396 (GLuint)index,
3397 (GLfloat *)val
3398 );
3399
3400exit:
3401 if (val_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003402 _env->ReleaseFloatArrayElements(val_ref, (jfloat*)val_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003403 _exception ? JNI_ABORT: 0);
3404 }
3405 if (_exception) {
3406 jniThrowException(_env, _exceptionType, _exceptionMessage);
3407 }
3408}
3409
3410/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3411static void
3412android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2
3413 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003414 jint _exception = 0;
3415 const char * _exceptionType = NULL;
3416 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003417 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003418 jint _bufferOffset = (jint) 0;
3419 jint _remaining;
3420 GLfloat *val = (GLfloat *) 0;
3421
Romain Guy84cac202016-12-05 12:26:02 -08003422 if (!val_buf) {
3423 _exception = 1;
3424 _exceptionType = "java/lang/IllegalArgumentException";
3425 _exceptionMessage = "val == null";
3426 goto exit;
3427 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003428 val = (GLfloat *)getPointer(_env, val_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003429 if (val == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003430 char * _valBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003431 val = (GLfloat *) (_valBase + _bufferOffset);
3432 }
3433 glGetMultisamplefv(
3434 (GLenum)pname,
3435 (GLuint)index,
3436 (GLfloat *)val
3437 );
Romain Guy84cac202016-12-05 12:26:02 -08003438
3439exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003440 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003441 _env->ReleaseFloatArrayElements(_array, (jfloat*)val, _exception ? JNI_ABORT : 0);
3442 }
3443 if (_exception) {
3444 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003445 }
3446}
3447
3448/* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */
3449static void
3450android_glSampleMaski__II
3451 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) {
3452 glSampleMaski(
3453 (GLuint)maskNumber,
3454 (GLbitfield)mask
3455 );
3456}
3457
3458/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3459static void
3460android_glGetTexLevelParameteriv__III_3II
3461 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) {
3462 jint _exception = 0;
3463 const char * _exceptionType = NULL;
3464 const char * _exceptionMessage = NULL;
3465 GLint *params_base = (GLint *) 0;
3466 jint _remaining;
3467 GLint *params = (GLint *) 0;
3468
3469 if (!params_ref) {
3470 _exception = 1;
3471 _exceptionType = "java/lang/IllegalArgumentException";
3472 _exceptionMessage = "params == null";
3473 goto exit;
3474 }
3475 if (offset < 0) {
3476 _exception = 1;
3477 _exceptionType = "java/lang/IllegalArgumentException";
3478 _exceptionMessage = "offset < 0";
3479 goto exit;
3480 }
3481 _remaining = _env->GetArrayLength(params_ref) - offset;
3482 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003483 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003484 params = params_base + offset;
3485
3486 glGetTexLevelParameteriv(
3487 (GLenum)target,
3488 (GLint)level,
3489 (GLenum)pname,
3490 (GLint *)params
3491 );
3492
3493exit:
3494 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003495 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003496 _exception ? JNI_ABORT: 0);
3497 }
3498 if (_exception) {
3499 jniThrowException(_env, _exceptionType, _exceptionMessage);
3500 }
3501}
3502
3503/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3504static void
3505android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2
3506 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003507 jint _exception = 0;
3508 const char * _exceptionType = NULL;
3509 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003510 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003511 jint _bufferOffset = (jint) 0;
3512 jint _remaining;
3513 GLint *params = (GLint *) 0;
3514
Romain Guy84cac202016-12-05 12:26:02 -08003515 if (!params_buf) {
3516 _exception = 1;
3517 _exceptionType = "java/lang/IllegalArgumentException";
3518 _exceptionMessage = "params == null";
3519 goto exit;
3520 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003521 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003522 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003523 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003524 params = (GLint *) (_paramsBase + _bufferOffset);
3525 }
3526 glGetTexLevelParameteriv(
3527 (GLenum)target,
3528 (GLint)level,
3529 (GLenum)pname,
3530 (GLint *)params
3531 );
Romain Guy84cac202016-12-05 12:26:02 -08003532
3533exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003534 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003535 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3536 }
3537 if (_exception) {
3538 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003539 }
3540}
3541
3542/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3543static void
3544android_glGetTexLevelParameterfv__III_3FI
3545 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) {
3546 jint _exception = 0;
3547 const char * _exceptionType = NULL;
3548 const char * _exceptionMessage = NULL;
3549 GLfloat *params_base = (GLfloat *) 0;
3550 jint _remaining;
3551 GLfloat *params = (GLfloat *) 0;
3552
3553 if (!params_ref) {
3554 _exception = 1;
3555 _exceptionType = "java/lang/IllegalArgumentException";
3556 _exceptionMessage = "params == null";
3557 goto exit;
3558 }
3559 if (offset < 0) {
3560 _exception = 1;
3561 _exceptionType = "java/lang/IllegalArgumentException";
3562 _exceptionMessage = "offset < 0";
3563 goto exit;
3564 }
3565 _remaining = _env->GetArrayLength(params_ref) - offset;
3566 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003567 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003568 params = params_base + offset;
3569
3570 glGetTexLevelParameterfv(
3571 (GLenum)target,
3572 (GLint)level,
3573 (GLenum)pname,
3574 (GLfloat *)params
3575 );
3576
3577exit:
3578 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003579 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003580 _exception ? JNI_ABORT: 0);
3581 }
3582 if (_exception) {
3583 jniThrowException(_env, _exceptionType, _exceptionMessage);
3584 }
3585}
3586
3587/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3588static void
3589android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2
3590 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003591 jint _exception = 0;
3592 const char * _exceptionType = NULL;
3593 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003594 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003595 jint _bufferOffset = (jint) 0;
3596 jint _remaining;
3597 GLfloat *params = (GLfloat *) 0;
3598
Romain Guy84cac202016-12-05 12:26:02 -08003599 if (!params_buf) {
3600 _exception = 1;
3601 _exceptionType = "java/lang/IllegalArgumentException";
3602 _exceptionMessage = "params == null";
3603 goto exit;
3604 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003605 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003606 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003607 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003608 params = (GLfloat *) (_paramsBase + _bufferOffset);
3609 }
3610 glGetTexLevelParameterfv(
3611 (GLenum)target,
3612 (GLint)level,
3613 (GLenum)pname,
3614 (GLfloat *)params
3615 );
Romain Guy84cac202016-12-05 12:26:02 -08003616
3617exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003618 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003619 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3620 }
3621 if (_exception) {
3622 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003623 }
3624}
3625
3626/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
3627static void
3628android_glBindVertexBuffer__IIJI
3629 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
3630 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
3631 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
3632 return;
3633 }
3634 glBindVertexBuffer(
3635 (GLuint)bindingindex,
3636 (GLuint)buffer,
3637 (GLintptr)offset,
3638 (GLsizei)stride
3639 );
3640}
3641/* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */
3642static void
3643android_glVertexAttribFormat__IIIZI
3644 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) {
3645 glVertexAttribFormat(
3646 (GLuint)attribindex,
3647 (GLint)size,
3648 (GLenum)type,
3649 (GLboolean)normalized,
3650 (GLuint)relativeoffset
3651 );
3652}
3653
3654/* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */
3655static void
3656android_glVertexAttribIFormat__IIII
3657 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) {
3658 glVertexAttribIFormat(
3659 (GLuint)attribindex,
3660 (GLint)size,
3661 (GLenum)type,
3662 (GLuint)relativeoffset
3663 );
3664}
3665
3666/* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */
3667static void
3668android_glVertexAttribBinding__II
3669 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) {
3670 glVertexAttribBinding(
3671 (GLuint)attribindex,
3672 (GLuint)bindingindex
3673 );
3674}
3675
3676/* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */
3677static void
3678android_glVertexBindingDivisor__II
3679 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) {
3680 glVertexBindingDivisor(
3681 (GLuint)bindingindex,
3682 (GLuint)divisor
3683 );
3684}
3685
3686static const char *classPathName = "android/opengl/GLES31";
3687
Daniel Micay76f6a862015-09-19 17:31:01 -04003688static const JNINativeMethod methods[] = {
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003689{"_nativeClassInit", "()V", (void*)nativeClassInit },
3690{"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III },
3691{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
3692{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
3693{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
3694{"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III },
3695{"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II },
3696{"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 },
3697{"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II },
3698{"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 },
3699{"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 },
3700{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
3701{"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II },
3702{"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
3703{"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 },
3704{"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III },
3705{"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II },
3706{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
3707{"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I },
3708{"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II },
3709{"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 },
3710{"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II },
3711{"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 },
3712{"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I },
3713{"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II },
3714{"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 },
3715{"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III },
3716{"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII },
3717{"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII },
3718{"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII },
3719{"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III },
3720{"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII },
3721{"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII },
3722{"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII },
3723{"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF },
3724{"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF },
3725{"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF },
3726{"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF },
3727{"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II },
3728{"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 },
3729{"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II },
3730{"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 },
3731{"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II },
3732{"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 },
3733{"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II },
3734{"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 },
3735{"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II },
3736{"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 },
3737{"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II },
3738{"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 },
3739{"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II },
3740{"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 },
3741{"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II },
3742{"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 },
3743{"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI },
3744{"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 },
3745{"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI },
3746{"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 },
3747{"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI },
3748{"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 },
3749{"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI },
3750{"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 },
3751{"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI },
3752{"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 },
3753{"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI },
3754{"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 },
3755{"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI },
3756{"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 },
3757{"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI },
3758{"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 },
3759{"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI },
3760{"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 },
3761{"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI },
3762{"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 },
3763{"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI },
3764{"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 },
3765{"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI },
3766{"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 },
3767{"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI },
3768{"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 },
3769{"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I },
3770{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
3771{"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII },
3772{"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI },
3773{"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 },
3774{"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I },
3775{"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I },
3776{"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ },
3777{"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI },
3778{"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 },
3779{"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II },
3780{"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II },
3781{"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 },
3782{"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI },
3783{"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 },
3784{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
3785{"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI },
3786{"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII },
3787{"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II },
3788{"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II },
3789};
3790
3791int register_android_opengl_jni_GLES31(JNIEnv *_env)
3792{
3793 int err;
3794 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3795 return err;
3796}