blob: 0e596dc1e088c32b526b6999ca854fcb18f923c4 [file] [log] [blame]
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001/*
2 * Copyright 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// This source file is automatically generated
18
Andreas Gampebfe63332014-11-12 14:12:45 -080019#pragma GCC diagnostic ignored "-Wunused-variable"
20#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
21#pragma GCC diagnostic ignored "-Wunused-function"
22
Jesse Hall7ab63ac2014-05-19 15:13:41 -070023#include <stdint.h>
24#include <GLES3/gl31.h>
Jesse Hall9626f822014-05-19 20:57:49 -070025#include <jni.h>
26#include <JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070027#include <android_runtime/AndroidRuntime.h>
28#include <utils/misc.h>
29#include <assert.h>
30
31static int initialized = 0;
32
33static jclass nioAccessClass;
34static jclass bufferClass;
35static jmethodID getBasePointerID;
36static jmethodID getBaseArrayID;
37static jmethodID getBaseArrayOffsetID;
38static jfieldID positionID;
39static jfieldID limitID;
40static jfieldID elementSizeShiftID;
41
42
43/* special calls implemented in Android's GLES wrapper used to more
44 * efficiently bound-check passed arrays */
45extern "C" {
46#ifdef GL_VERSION_ES_CM_1_1
47GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
48 const GLvoid *ptr, GLsizei count);
49GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
50 const GLvoid *pointer, GLsizei count);
51GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
61#endif
62#ifdef GL_ES_VERSION_2_0
63static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
64 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
65 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
66}
67#endif
68#ifdef GL_ES_VERSION_3_0
69static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
70 GLsizei stride, const GLvoid *pointer, GLsizei count) {
71 glVertexAttribIPointer(indx, size, type, stride, pointer);
72}
73#endif
74}
75
76/* Cache method IDs each time the class is loaded. */
77
78static void
79nativeClassInit(JNIEnv *_env, jclass glImplClass)
80{
81 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
82 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
83
84 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
85 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
86
87 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
88 "getBasePointer", "(Ljava/nio/Buffer;)J");
89 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
90 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
91 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
93
94 positionID = _env->GetFieldID(bufferClass, "position", "I");
95 limitID = _env->GetFieldID(bufferClass, "limit", "I");
96 elementSizeShiftID =
97 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
98}
99
100static void *
101getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
102{
103 jint position;
104 jint limit;
105 jint elementSizeShift;
106 jlong pointer;
107
108 position = _env->GetIntField(buffer, positionID);
109 limit = _env->GetIntField(buffer, limitID);
110 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
111 *remaining = (limit - position) << elementSizeShift;
112 pointer = _env->CallStaticLongMethod(nioAccessClass,
113 getBasePointerID, buffer);
114 if (pointer != 0L) {
115 *array = NULL;
116 return reinterpret_cast<void*>(pointer);
117 }
118
119 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
120 getBaseArrayID, buffer);
121 *offset = _env->CallStaticIntMethod(nioAccessClass,
122 getBaseArrayOffsetID, buffer);
123
124 return NULL;
125}
126
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700127class ByteArrayGetter {
128public:
129 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
130 return _env->GetByteArrayElements(array, is_copy);
131 }
132};
133class BooleanArrayGetter {
134public:
135 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
136 return _env->GetBooleanArrayElements(array, is_copy);
137 }
138};
139class CharArrayGetter {
140public:
141 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
142 return _env->GetCharArrayElements(array, is_copy);
143 }
144};
145class ShortArrayGetter {
146public:
147 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
148 return _env->GetShortArrayElements(array, is_copy);
149 }
150};
151class IntArrayGetter {
152public:
153 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
154 return _env->GetIntArrayElements(array, is_copy);
155 }
156};
157class LongArrayGetter {
158public:
159 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
160 return _env->GetLongArrayElements(array, is_copy);
161 }
162};
163class FloatArrayGetter {
164public:
165 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
166 return _env->GetFloatArrayElements(array, is_copy);
167 }
168};
169class DoubleArrayGetter {
170public:
171 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
172 return _env->GetDoubleArrayElements(array, is_copy);
173 }
174};
175
176template<typename JTYPEARRAY, typename ARRAYGETTER>
177static void*
178getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
179 return ARRAYGETTER::Get(_env, array, is_copy);
180}
181
182class ByteArrayReleaser {
183public:
184 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
185 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
186 }
187};
188class BooleanArrayReleaser {
189public:
190 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
191 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
192 }
193};
194class CharArrayReleaser {
195public:
196 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
197 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
198 }
199};
200class ShortArrayReleaser {
201public:
202 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
203 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
204 }
205};
206class IntArrayReleaser {
207public:
208 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
209 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
210 }
211};
212class LongArrayReleaser {
213public:
214 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
215 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
216 }
217};
218class FloatArrayReleaser {
219public:
220 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
221 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
222 }
223};
224class DoubleArrayReleaser {
225public:
226 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
227 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
228 }
229};
230
231template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
232static void
233releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
234 ARRAYRELEASER::Release(_env, array, data, commit);
235}
236
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700237static void
238releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
239{
240 _env->ReleasePrimitiveArrayCritical(array, data,
241 commit ? 0 : JNI_ABORT);
242}
243
244static void *
245getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
246 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
247 if (buf) {
248 jint position = _env->GetIntField(buffer, positionID);
249 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
250 buf += position << elementSizeShift;
251 } else {
252 jniThrowException(_env, "java/lang/IllegalArgumentException",
253 "Must use a native order direct Buffer");
254 }
255 return (void*) buf;
256}
257
258// --------------------------------------------------------------------------
259
260/*
261 * returns the number of values glGet returns for a given pname.
262 *
263 * The code below is written such that pnames requiring only one values
264 * are the default (and are not explicitely tested for). This makes the
265 * checking code much shorter/readable/efficient.
266 *
267 * This means that unknown pnames (e.g.: extensions) will default to 1. If
268 * that unknown pname needs more than 1 value, then the validation check
269 * is incomplete and the app may crash if it passed the wrong number params.
270 */
271static int getNeededCount(GLint pname) {
272 int needed = 1;
273#ifdef GL_ES_VERSION_2_0
274 // GLES 2.x pnames
275 switch (pname) {
276 case GL_ALIASED_LINE_WIDTH_RANGE:
277 case GL_ALIASED_POINT_SIZE_RANGE:
278 needed = 2;
279 break;
280
281 case GL_BLEND_COLOR:
282 case GL_COLOR_CLEAR_VALUE:
283 case GL_COLOR_WRITEMASK:
284 case GL_SCISSOR_BOX:
285 case GL_VIEWPORT:
286 needed = 4;
287 break;
288
289 case GL_COMPRESSED_TEXTURE_FORMATS:
290 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
291 break;
292
293 case GL_SHADER_BINARY_FORMATS:
294 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
295 break;
296 }
297#endif
298
299#ifdef GL_VERSION_ES_CM_1_1
300 // GLES 1.x pnames
301 switch (pname) {
302 case GL_ALIASED_LINE_WIDTH_RANGE:
303 case GL_ALIASED_POINT_SIZE_RANGE:
304 case GL_DEPTH_RANGE:
305 case GL_SMOOTH_LINE_WIDTH_RANGE:
306 case GL_SMOOTH_POINT_SIZE_RANGE:
307 needed = 2;
308 break;
309
310 case GL_CURRENT_NORMAL:
311 case GL_POINT_DISTANCE_ATTENUATION:
312 needed = 3;
313 break;
314
315 case GL_COLOR_CLEAR_VALUE:
316 case GL_COLOR_WRITEMASK:
317 case GL_CURRENT_COLOR:
318 case GL_CURRENT_TEXTURE_COORDS:
319 case GL_FOG_COLOR:
320 case GL_LIGHT_MODEL_AMBIENT:
321 case GL_SCISSOR_BOX:
322 case GL_VIEWPORT:
323 needed = 4;
324 break;
325
326 case GL_MODELVIEW_MATRIX:
327 case GL_PROJECTION_MATRIX:
328 case GL_TEXTURE_MATRIX:
329 needed = 16;
330 break;
331
332 case GL_COMPRESSED_TEXTURE_FORMATS:
333 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
334 break;
335 }
336#endif
337 return needed;
338}
339
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700340template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
341 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700342static void
343get
344 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
345 jint _exception = 0;
346 const char * _exceptionType;
347 const char * _exceptionMessage;
348 CTYPE *params_base = (CTYPE *) 0;
349 jint _remaining;
350 CTYPE *params = (CTYPE *) 0;
351 int _needed = 0;
352
353 if (!params_ref) {
354 _exception = 1;
355 _exceptionType = "java/lang/IllegalArgumentException";
356 _exceptionMessage = "params == null";
357 goto exit;
358 }
359 if (offset < 0) {
360 _exception = 1;
361 _exceptionType = "java/lang/IllegalArgumentException";
362 _exceptionMessage = "offset < 0";
363 goto exit;
364 }
365 _remaining = _env->GetArrayLength(params_ref) - offset;
366 _needed = getNeededCount(pname);
367 // if we didn't find this pname, we just assume the user passed
368 // an array of the right size -- this might happen with extensions
369 // or if we forget an enum here.
370 if (_remaining < _needed) {
371 _exception = 1;
372 _exceptionType = "java/lang/IllegalArgumentException";
373 _exceptionMessage = "length - offset < needed";
374 goto exit;
375 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700376 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
377 _env, params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700378 params = params_base + offset;
379
380 GET(
381 (GLenum)pname,
382 (CTYPE *)params
383 );
384
385exit:
386 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700387 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
388 _env, params_ref, params_base, !_exception);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700389 }
390 if (_exception) {
391 jniThrowException(_env, _exceptionType, _exceptionMessage);
392 }
393}
394
395
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700396template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
397 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700398static void
399getarray
400 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
401 jint _exception = 0;
402 const char * _exceptionType;
403 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700404 JTYPEARRAY _array = (JTYPEARRAY) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700405 jint _bufferOffset = (jint) 0;
406 jint _remaining;
407 CTYPE *params = (CTYPE *) 0;
408 int _needed = 0;
409
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700410 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700411 _remaining /= sizeof(CTYPE); // convert from bytes to item count
412 _needed = getNeededCount(pname);
413 // if we didn't find this pname, we just assume the user passed
414 // an array of the right size -- this might happen with extensions
415 // or if we forget an enum here.
416 if (_needed>0 && _remaining < _needed) {
417 _exception = 1;
418 _exceptionType = "java/lang/IllegalArgumentException";
419 _exceptionMessage = "remaining() < needed";
420 goto exit;
421 }
422 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700423 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
424 _env, _array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700425 params = (CTYPE *) (_paramsBase + _bufferOffset);
426 }
427 GET(
428 (GLenum)pname,
429 (CTYPE *)params
430 );
431
432exit:
433 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700434 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
435 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700436 }
437 if (_exception) {
438 jniThrowException(_env, _exceptionType, _exceptionMessage);
439 }
440}
441
442// --------------------------------------------------------------------------
443/* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */
444static void
445android_glDispatchCompute__III
446 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) {
447 glDispatchCompute(
448 (GLuint)num_groups_x,
449 (GLuint)num_groups_y,
450 (GLuint)num_groups_z
451 );
452}
453
454/* void glDispatchComputeIndirect ( GLintptr indirect ) */
455static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
456 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
457 // Here we only need to check for successful 64-bit to 32-bit conversion.
458 // - jlong is a int64_t (jni.h)
459 // - GLintptr is a long (khrplatform.h)
460 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
461 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
462 return;
463 }
464 glDispatchComputeIndirect((GLintptr)indirect);
465}
466
467/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
468static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
469 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
470 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
471 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800472 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700473 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
474 return;
475 }
476 glDrawArraysIndirect(mode, (const void*)indirect);
477}
478
479/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
480static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
481 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
482 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
483 // to unsigned 32-bit conversion.
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 glDrawElementsIndirect(mode, type, (const void*)indirect);
489}
490
491/* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */
492static void
493android_glFramebufferParameteri__III
494 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
495 glFramebufferParameteri(
496 (GLenum)target,
497 (GLenum)pname,
498 (GLint)param
499 );
500}
501
502/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
503static void
504android_glGetFramebufferParameteriv__II_3II
505 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
506 jint _exception = 0;
507 const char * _exceptionType = NULL;
508 const char * _exceptionMessage = NULL;
509 GLint *params_base = (GLint *) 0;
510 jint _remaining;
511 GLint *params = (GLint *) 0;
512
513 if (!params_ref) {
514 _exception = 1;
515 _exceptionType = "java/lang/IllegalArgumentException";
516 _exceptionMessage = "params == null";
517 goto exit;
518 }
519 if (offset < 0) {
520 _exception = 1;
521 _exceptionType = "java/lang/IllegalArgumentException";
522 _exceptionMessage = "offset < 0";
523 goto exit;
524 }
525 _remaining = _env->GetArrayLength(params_ref) - offset;
526 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700527 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700528 params = params_base + offset;
529
530 glGetFramebufferParameteriv(
531 (GLenum)target,
532 (GLenum)pname,
533 (GLint *)params
534 );
535
536exit:
537 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700538 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700539 _exception ? JNI_ABORT: 0);
540 }
541 if (_exception) {
542 jniThrowException(_env, _exceptionType, _exceptionMessage);
543 }
544}
545
546/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
547static void
548android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2
549 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800550 jint _exception = 0;
551 const char * _exceptionType = NULL;
552 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700553 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700554 jint _bufferOffset = (jint) 0;
555 jint _remaining;
556 GLint *params = (GLint *) 0;
557
Romain Guy84cac202016-12-05 12:26:02 -0800558 if (!params_buf) {
559 _exception = 1;
560 _exceptionType = "java/lang/IllegalArgumentException";
561 _exceptionMessage = "params == null";
562 goto exit;
563 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700564 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700565 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700566 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700567 params = (GLint *) (_paramsBase + _bufferOffset);
568 }
569 glGetFramebufferParameteriv(
570 (GLenum)target,
571 (GLenum)pname,
572 (GLint *)params
573 );
Romain Guy84cac202016-12-05 12:26:02 -0800574
575exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700576 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800577 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
578 }
579 if (_exception) {
580 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700581 }
582}
583
584/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
585static void
586android_glGetProgramInterfaceiv__III_3II
587 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) {
588 jint _exception = 0;
589 const char * _exceptionType = NULL;
590 const char * _exceptionMessage = NULL;
591 GLint *params_base = (GLint *) 0;
592 jint _remaining;
593 GLint *params = (GLint *) 0;
594
595 if (!params_ref) {
596 _exception = 1;
597 _exceptionType = "java/lang/IllegalArgumentException";
598 _exceptionMessage = "params == null";
599 goto exit;
600 }
601 if (offset < 0) {
602 _exception = 1;
603 _exceptionType = "java/lang/IllegalArgumentException";
604 _exceptionMessage = "offset < 0";
605 goto exit;
606 }
607 _remaining = _env->GetArrayLength(params_ref) - offset;
608 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700609 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700610 params = params_base + offset;
611
612 glGetProgramInterfaceiv(
613 (GLuint)program,
614 (GLenum)programInterface,
615 (GLenum)pname,
616 (GLint *)params
617 );
618
619exit:
620 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700621 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700622 _exception ? JNI_ABORT: 0);
623 }
624 if (_exception) {
625 jniThrowException(_env, _exceptionType, _exceptionMessage);
626 }
627}
628
629/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
630static void
631android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2
632 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800633 jint _exception = 0;
634 const char * _exceptionType = NULL;
635 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700636 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700637 jint _bufferOffset = (jint) 0;
638 jint _remaining;
639 GLint *params = (GLint *) 0;
640
Romain Guy84cac202016-12-05 12:26:02 -0800641 if (!params_buf) {
642 _exception = 1;
643 _exceptionType = "java/lang/IllegalArgumentException";
644 _exceptionMessage = "params == null";
645 goto exit;
646 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700647 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700648 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700649 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700650 params = (GLint *) (_paramsBase + _bufferOffset);
651 }
652 glGetProgramInterfaceiv(
653 (GLuint)program,
654 (GLenum)programInterface,
655 (GLenum)pname,
656 (GLint *)params
657 );
Romain Guy84cac202016-12-05 12:26:02 -0800658
659exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700660 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800661 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
662 }
663 if (_exception) {
664 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700665 }
666}
667
668/* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */
669static jint
670android_glGetProgramResourceIndex__IILjava_lang_String_2
671 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
672 jint _exception = 0;
673 const char * _exceptionType = NULL;
674 const char * _exceptionMessage = NULL;
675 GLuint _returnValue = 0;
676 const char* _nativename = 0;
677
678 if (!name) {
679 _exception = 1;
680 _exceptionType = "java/lang/IllegalArgumentException";
681 _exceptionMessage = "name == null";
682 goto exit;
683 }
684 _nativename = _env->GetStringUTFChars(name, 0);
685
686 _returnValue = glGetProgramResourceIndex(
687 (GLuint)program,
688 (GLenum)programInterface,
689 (GLchar *)_nativename
690 );
691
692exit:
693 if (_nativename) {
694 _env->ReleaseStringUTFChars(name, _nativename);
695 }
696
697 if (_exception) {
698 jniThrowException(_env, _exceptionType, _exceptionMessage);
699 }
700 return (jint)_returnValue;
701}
702
703/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
704static jstring
705android_glGetProgramResourceName
706 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
707 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
708 return NULL;
709}
710
711/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
712static void
713android_glGetProgramResourceiv__IIII_3III_3II_3II
714 (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) {
715 jint _exception = 0;
716 const char * _exceptionType = NULL;
717 const char * _exceptionMessage = NULL;
718 GLenum *props_base = (GLenum *) 0;
719 jint _propsRemaining;
720 GLenum *props = (GLenum *) 0;
721 GLsizei *length_base = (GLsizei *) 0;
722 jint _lengthRemaining;
723 GLsizei *length = (GLsizei *) 0;
724 GLint *params_base = (GLint *) 0;
725 jint _paramsRemaining;
726 GLint *params = (GLint *) 0;
727
728 if (!props_ref) {
729 _exception = 1;
730 _exceptionType = "java/lang/IllegalArgumentException";
731 _exceptionMessage = "props == null";
732 goto exit;
733 }
734 if (propsOffset < 0) {
735 _exception = 1;
736 _exceptionType = "java/lang/IllegalArgumentException";
737 _exceptionMessage = "propsOffset < 0";
738 goto exit;
739 }
740 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset;
741 props_base = (GLenum *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700742 _env->GetIntArrayElements(props_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700743 props = props_base + propsOffset;
744
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700745 if (length_ref) {
746 if (lengthOffset < 0) {
747 _exception = 1;
748 _exceptionType = "java/lang/IllegalArgumentException";
749 _exceptionMessage = "lengthOffset < 0";
750 goto exit;
751 }
752 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
753 length_base = (GLsizei *)
754 _env->GetIntArrayElements(length_ref, (jboolean *)0);
755 length = length_base + lengthOffset;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700756 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700757
758 if (!params_ref) {
759 _exception = 1;
760 _exceptionType = "java/lang/IllegalArgumentException";
761 _exceptionMessage = "params == null";
762 goto exit;
763 }
764 if (paramsOffset < 0) {
765 _exception = 1;
766 _exceptionType = "java/lang/IllegalArgumentException";
767 _exceptionMessage = "paramsOffset < 0";
768 goto exit;
769 }
770 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
771 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700772 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700773 params = params_base + paramsOffset;
774
775 glGetProgramResourceiv(
776 (GLuint)program,
777 (GLenum)programInterface,
778 (GLuint)index,
779 (GLsizei)propCount,
780 (GLenum *)props,
781 (GLsizei)bufSize,
782 (GLsizei *)length,
783 (GLint *)params
784 );
785
786exit:
787 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700788 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700789 _exception ? JNI_ABORT: 0);
790 }
791 if (length_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700792 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700793 _exception ? JNI_ABORT: 0);
794 }
795 if (props_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700796 _env->ReleaseIntArrayElements(props_ref, (jint*)props_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700797 JNI_ABORT);
798 }
799 if (_exception) {
800 jniThrowException(_env, _exceptionType, _exceptionMessage);
801 }
802}
803
804/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
805static void
806android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
807 (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 -0800808 jint _exception = 0;
809 const char * _exceptionType = NULL;
810 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700811 jintArray _propsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700812 jint _propsBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700813 jintArray _lengthArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700814 jint _lengthBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700815 jintArray _paramsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700816 jint _paramsBufferOffset = (jint) 0;
817 jint _propsRemaining;
818 GLenum *props = (GLenum *) 0;
819 jint _lengthRemaining;
820 GLsizei *length = (GLsizei *) 0;
821 jint _paramsRemaining;
822 GLint *params = (GLint *) 0;
823
Romain Guy84cac202016-12-05 12:26:02 -0800824 if (!props_buf) {
825 _exception = 1;
826 _exceptionType = "java/lang/IllegalArgumentException";
827 _exceptionMessage = "props == null";
828 goto exit;
829 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700830 props = (GLenum *)getPointer(_env, props_buf, (jarray*)&_propsArray, &_propsRemaining, &_propsBufferOffset);
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700831 if (length_buf) {
832 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
833 }
Romain Guy84cac202016-12-05 12:26:02 -0800834 if (!params_buf) {
835 _exception = 1;
836 _exceptionType = "java/lang/IllegalArgumentException";
837 _exceptionMessage = "params == null";
838 goto exit;
839 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700840 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700841 if (props == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700842 char * _propsBase = (char *)_env->GetIntArrayElements(_propsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700843 props = (GLenum *) (_propsBase + _propsBufferOffset);
844 }
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700845 if (length_buf && length == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700846 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700847 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
848 }
849 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700850 char * _paramsBase = (char *)_env->GetIntArrayElements(_paramsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700851 params = (GLint *) (_paramsBase + _paramsBufferOffset);
852 }
853 glGetProgramResourceiv(
854 (GLuint)program,
855 (GLenum)programInterface,
856 (GLuint)index,
857 (GLsizei)propCount,
858 (GLenum *)props,
859 (GLsizei)bufSize,
860 (GLsizei *)length,
861 (GLint *)params
862 );
Romain Guy84cac202016-12-05 12:26:02 -0800863
864exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700865 if (_paramsArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800866 _env->ReleaseIntArrayElements(_paramsArray, (jint*)params, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700867 }
868 if (_lengthArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800869 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700870 }
871 if (_propsArray) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700872 _env->ReleaseIntArrayElements(_propsArray, (jint*)props, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700873 }
Romain Guy84cac202016-12-05 12:26:02 -0800874 if (_exception) {
875 jniThrowException(_env, _exceptionType, _exceptionMessage);
876 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700877}
878
879/* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */
880static jint
881android_glGetProgramResourceLocation__IILjava_lang_String_2
882 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
883 jint _exception = 0;
884 const char * _exceptionType = NULL;
885 const char * _exceptionMessage = NULL;
886 GLint _returnValue = 0;
887 const char* _nativename = 0;
888
889 if (!name) {
890 _exception = 1;
891 _exceptionType = "java/lang/IllegalArgumentException";
892 _exceptionMessage = "name == null";
893 goto exit;
894 }
895 _nativename = _env->GetStringUTFChars(name, 0);
896
897 _returnValue = glGetProgramResourceLocation(
898 (GLuint)program,
899 (GLenum)programInterface,
900 (GLchar *)_nativename
901 );
902
903exit:
904 if (_nativename) {
905 _env->ReleaseStringUTFChars(name, _nativename);
906 }
907
908 if (_exception) {
909 jniThrowException(_env, _exceptionType, _exceptionMessage);
910 }
911 return (jint)_returnValue;
912}
913
914/* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */
915static void
916android_glUseProgramStages__III
917 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) {
918 glUseProgramStages(
919 (GLuint)pipeline,
920 (GLbitfield)stages,
921 (GLuint)program
922 );
923}
924
925/* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */
926static void
927android_glActiveShaderProgram__II
928 (JNIEnv *_env, jobject _this, jint pipeline, jint program) {
929 glActiveShaderProgram(
930 (GLuint)pipeline,
931 (GLuint)program
932 );
933}
934
935/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
936static jint
937android_glCreateShaderProgramv
938 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800939 jint _exception = 0;
940 const char * _exceptionType = NULL;
941 const char * _exceptionMessage = NULL;
942 GLsizei _count;
943 const GLchar** _strings = NULL;
944 jstring* _jstrings = NULL;
945 GLuint _returnValue = 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700946
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800947 if (!strings) {
948 _exception = 1;
949 _exceptionType = "java/lang/IllegalArgumentException";
950 _exceptionMessage = "strings == null";
951 goto exit;
952 }
953
954 _count = _env->GetArrayLength(strings);
955
956 _strings = (const GLchar**) calloc(_count, sizeof(const GLchar*));
957 if (!_strings) {
958 _exception = 1;
959 _exceptionType = "java/lang/OutOfMemoryError";
960 _exceptionMessage = "out of memory";
961 goto exit;
962 }
963
964 _jstrings = (jstring*) calloc(_count, sizeof(jstring));
965 if (!_jstrings) {
966 _exception = 1;
967 _exceptionType = "java/lang/OutOfMemoryError";
968 _exceptionMessage = "out of memory";
969 goto exit;
970 }
971
972 for(int i = 0; i < _count; i++) {
973 _jstrings[i] = (jstring) _env->GetObjectArrayElement(strings, i);
974 if (!_jstrings[i]) {
975 _exception = 1;
976 _exceptionType = "java/lang/IllegalArgumentException";
977 _exceptionMessage = "strings == null";
978 goto exit;
979 }
980 _strings[i] = _env->GetStringUTFChars(_jstrings[i], 0);
981 }
982
983 _returnValue = glCreateShaderProgramv((GLenum)type, _count, _strings);
984exit:
985 if (_strings && _jstrings) {
986 for(int i = 0; i < _count; i++) {
987 if (_strings[i] && _jstrings[i]) {
988 _env->ReleaseStringUTFChars(_jstrings[i], _strings[i]);
989 }
990 }
991 }
992 if (_strings) {
993 free(_strings);
994 }
995 if (_jstrings) {
996 free(_jstrings);
997 }
998 if (_exception) {
999 jniThrowException(_env, _exceptionType, _exceptionMessage);
1000 }
1001 return (jint)_returnValue;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001002}
1003/* void glBindProgramPipeline ( GLuint pipeline ) */
1004static void
1005android_glBindProgramPipeline__I
1006 (JNIEnv *_env, jobject _this, jint pipeline) {
1007 glBindProgramPipeline(
1008 (GLuint)pipeline
1009 );
1010}
1011
1012/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1013static void
1014android_glDeleteProgramPipelines__I_3II
1015 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1016 jint _exception = 0;
1017 const char * _exceptionType = NULL;
1018 const char * _exceptionMessage = NULL;
1019 GLuint *pipelines_base = (GLuint *) 0;
1020 jint _remaining;
1021 GLuint *pipelines = (GLuint *) 0;
1022
1023 if (!pipelines_ref) {
1024 _exception = 1;
1025 _exceptionType = "java/lang/IllegalArgumentException";
1026 _exceptionMessage = "pipelines == null";
1027 goto exit;
1028 }
1029 if (offset < 0) {
1030 _exception = 1;
1031 _exceptionType = "java/lang/IllegalArgumentException";
1032 _exceptionMessage = "offset < 0";
1033 goto exit;
1034 }
1035 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1036 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001037 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001038 pipelines = pipelines_base + offset;
1039
1040 glDeleteProgramPipelines(
1041 (GLsizei)n,
1042 (GLuint *)pipelines
1043 );
1044
1045exit:
1046 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001047 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001048 JNI_ABORT);
1049 }
1050 if (_exception) {
1051 jniThrowException(_env, _exceptionType, _exceptionMessage);
1052 }
1053}
1054
1055/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1056static void
1057android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2
1058 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001059 jint _exception = 0;
1060 const char * _exceptionType = NULL;
1061 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001062 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001063 jint _bufferOffset = (jint) 0;
1064 jint _remaining;
1065 GLuint *pipelines = (GLuint *) 0;
1066
Romain Guy84cac202016-12-05 12:26:02 -08001067 if (!pipelines_buf) {
1068 _exception = 1;
1069 _exceptionType = "java/lang/IllegalArgumentException";
1070 _exceptionMessage = "pipelines == null";
1071 goto exit;
1072 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001073 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001074 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001075 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001076 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1077 }
1078 glDeleteProgramPipelines(
1079 (GLsizei)n,
1080 (GLuint *)pipelines
1081 );
Romain Guy84cac202016-12-05 12:26:02 -08001082
1083exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001084 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001085 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001086 }
Romain Guy84cac202016-12-05 12:26:02 -08001087 if (_exception) {
1088 jniThrowException(_env, _exceptionType, _exceptionMessage);
1089 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001090}
1091
1092/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1093static void
1094android_glGenProgramPipelines__I_3II
1095 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1096 jint _exception = 0;
1097 const char * _exceptionType = NULL;
1098 const char * _exceptionMessage = NULL;
1099 GLuint *pipelines_base = (GLuint *) 0;
1100 jint _remaining;
1101 GLuint *pipelines = (GLuint *) 0;
1102
1103 if (!pipelines_ref) {
1104 _exception = 1;
1105 _exceptionType = "java/lang/IllegalArgumentException";
1106 _exceptionMessage = "pipelines == null";
1107 goto exit;
1108 }
1109 if (offset < 0) {
1110 _exception = 1;
1111 _exceptionType = "java/lang/IllegalArgumentException";
1112 _exceptionMessage = "offset < 0";
1113 goto exit;
1114 }
1115 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1116 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001117 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001118 pipelines = pipelines_base + offset;
1119
1120 glGenProgramPipelines(
1121 (GLsizei)n,
1122 (GLuint *)pipelines
1123 );
1124
1125exit:
1126 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001127 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001128 _exception ? JNI_ABORT: 0);
1129 }
1130 if (_exception) {
1131 jniThrowException(_env, _exceptionType, _exceptionMessage);
1132 }
1133}
1134
1135/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1136static void
1137android_glGenProgramPipelines__ILjava_nio_IntBuffer_2
1138 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001139 jint _exception = 0;
1140 const char * _exceptionType = NULL;
1141 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001142 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001143 jint _bufferOffset = (jint) 0;
1144 jint _remaining;
1145 GLuint *pipelines = (GLuint *) 0;
1146
Romain Guy84cac202016-12-05 12:26:02 -08001147 if (!pipelines_buf) {
1148 _exception = 1;
1149 _exceptionType = "java/lang/IllegalArgumentException";
1150 _exceptionMessage = "pipelines == null";
1151 goto exit;
1152 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001153 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001154 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001155 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001156 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1157 }
1158 glGenProgramPipelines(
1159 (GLsizei)n,
1160 (GLuint *)pipelines
1161 );
Romain Guy84cac202016-12-05 12:26:02 -08001162
1163exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001164 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001165 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, _exception ? JNI_ABORT : 0);
1166 }
1167 if (_exception) {
1168 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001169 }
1170}
1171
1172/* GLboolean glIsProgramPipeline ( GLuint pipeline ) */
1173static jboolean
1174android_glIsProgramPipeline__I
1175 (JNIEnv *_env, jobject _this, jint pipeline) {
1176 GLboolean _returnValue;
1177 _returnValue = glIsProgramPipeline(
1178 (GLuint)pipeline
1179 );
1180 return (jboolean)_returnValue;
1181}
1182
1183/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1184static void
1185android_glGetProgramPipelineiv__II_3II
1186 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) {
1187 jint _exception = 0;
1188 const char * _exceptionType = NULL;
1189 const char * _exceptionMessage = NULL;
1190 GLint *params_base = (GLint *) 0;
1191 jint _remaining;
1192 GLint *params = (GLint *) 0;
1193
1194 if (!params_ref) {
1195 _exception = 1;
1196 _exceptionType = "java/lang/IllegalArgumentException";
1197 _exceptionMessage = "params == null";
1198 goto exit;
1199 }
1200 if (offset < 0) {
1201 _exception = 1;
1202 _exceptionType = "java/lang/IllegalArgumentException";
1203 _exceptionMessage = "offset < 0";
1204 goto exit;
1205 }
1206 _remaining = _env->GetArrayLength(params_ref) - offset;
1207 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001208 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001209 params = params_base + offset;
1210
1211 glGetProgramPipelineiv(
1212 (GLuint)pipeline,
1213 (GLenum)pname,
1214 (GLint *)params
1215 );
1216
1217exit:
1218 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001219 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001220 _exception ? JNI_ABORT: 0);
1221 }
1222 if (_exception) {
1223 jniThrowException(_env, _exceptionType, _exceptionMessage);
1224 }
1225}
1226
1227/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1228static void
1229android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2
1230 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001231 jint _exception = 0;
1232 const char * _exceptionType = NULL;
1233 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001234 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001235 jint _bufferOffset = (jint) 0;
1236 jint _remaining;
1237 GLint *params = (GLint *) 0;
1238
Romain Guy84cac202016-12-05 12:26:02 -08001239 if (!params_buf) {
1240 _exception = 1;
1241 _exceptionType = "java/lang/IllegalArgumentException";
1242 _exceptionMessage = "params == null";
1243 goto exit;
1244 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001245 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001246 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001247 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001248 params = (GLint *) (_paramsBase + _bufferOffset);
1249 }
1250 glGetProgramPipelineiv(
1251 (GLuint)pipeline,
1252 (GLenum)pname,
1253 (GLint *)params
1254 );
Romain Guy84cac202016-12-05 12:26:02 -08001255
1256exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001257 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001258 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1259 }
1260 if (_exception) {
1261 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001262 }
1263}
1264
1265/* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */
1266static void
1267android_glProgramUniform1i__III
1268 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1269 glProgramUniform1i(
1270 (GLuint)program,
1271 (GLint)location,
1272 (GLint)v0
1273 );
1274}
1275
1276/* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */
1277static void
1278android_glProgramUniform2i__IIII
1279 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1280 glProgramUniform2i(
1281 (GLuint)program,
1282 (GLint)location,
1283 (GLint)v0,
1284 (GLint)v1
1285 );
1286}
1287
1288/* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */
1289static void
1290android_glProgramUniform3i__IIIII
1291 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1292 glProgramUniform3i(
1293 (GLuint)program,
1294 (GLint)location,
1295 (GLint)v0,
1296 (GLint)v1,
1297 (GLint)v2
1298 );
1299}
1300
1301/* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */
1302static void
1303android_glProgramUniform4i__IIIIII
1304 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1305 glProgramUniform4i(
1306 (GLuint)program,
1307 (GLint)location,
1308 (GLint)v0,
1309 (GLint)v1,
1310 (GLint)v2,
1311 (GLint)v3
1312 );
1313}
1314
1315/* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */
1316static void
1317android_glProgramUniform1ui__III
1318 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1319 glProgramUniform1ui(
1320 (GLuint)program,
1321 (GLint)location,
1322 (GLuint)v0
1323 );
1324}
1325
1326/* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */
1327static void
1328android_glProgramUniform2ui__IIII
1329 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1330 glProgramUniform2ui(
1331 (GLuint)program,
1332 (GLint)location,
1333 (GLuint)v0,
1334 (GLuint)v1
1335 );
1336}
1337
1338/* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
1339static void
1340android_glProgramUniform3ui__IIIII
1341 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1342 glProgramUniform3ui(
1343 (GLuint)program,
1344 (GLint)location,
1345 (GLuint)v0,
1346 (GLuint)v1,
1347 (GLuint)v2
1348 );
1349}
1350
1351/* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
1352static void
1353android_glProgramUniform4ui__IIIIII
1354 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1355 glProgramUniform4ui(
1356 (GLuint)program,
1357 (GLint)location,
1358 (GLuint)v0,
1359 (GLuint)v1,
1360 (GLuint)v2,
1361 (GLuint)v3
1362 );
1363}
1364
1365/* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */
1366static void
1367android_glProgramUniform1f__IIF
1368 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) {
1369 glProgramUniform1f(
1370 (GLuint)program,
1371 (GLint)location,
1372 (GLfloat)v0
1373 );
1374}
1375
1376/* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */
1377static void
1378android_glProgramUniform2f__IIFF
1379 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) {
1380 glProgramUniform2f(
1381 (GLuint)program,
1382 (GLint)location,
1383 (GLfloat)v0,
1384 (GLfloat)v1
1385 );
1386}
1387
1388/* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */
1389static void
1390android_glProgramUniform3f__IIFFF
1391 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) {
1392 glProgramUniform3f(
1393 (GLuint)program,
1394 (GLint)location,
1395 (GLfloat)v0,
1396 (GLfloat)v1,
1397 (GLfloat)v2
1398 );
1399}
1400
1401/* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */
1402static void
1403android_glProgramUniform4f__IIFFFF
1404 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) {
1405 glProgramUniform4f(
1406 (GLuint)program,
1407 (GLint)location,
1408 (GLfloat)v0,
1409 (GLfloat)v1,
1410 (GLfloat)v2,
1411 (GLfloat)v3
1412 );
1413}
1414
1415/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1416static void
1417android_glProgramUniform1iv__III_3II
1418 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1419 jint _exception = 0;
1420 const char * _exceptionType = NULL;
1421 const char * _exceptionMessage = NULL;
1422 GLint *value_base = (GLint *) 0;
1423 jint _remaining;
1424 GLint *value = (GLint *) 0;
1425
1426 if (!value_ref) {
1427 _exception = 1;
1428 _exceptionType = "java/lang/IllegalArgumentException";
1429 _exceptionMessage = "value == null";
1430 goto exit;
1431 }
1432 if (offset < 0) {
1433 _exception = 1;
1434 _exceptionType = "java/lang/IllegalArgumentException";
1435 _exceptionMessage = "offset < 0";
1436 goto exit;
1437 }
1438 _remaining = _env->GetArrayLength(value_ref) - offset;
1439 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001440 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001441 value = value_base + offset;
1442
1443 glProgramUniform1iv(
1444 (GLuint)program,
1445 (GLint)location,
1446 (GLsizei)count,
1447 (GLint *)value
1448 );
1449
1450exit:
1451 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001452 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001453 JNI_ABORT);
1454 }
1455 if (_exception) {
1456 jniThrowException(_env, _exceptionType, _exceptionMessage);
1457 }
1458}
1459
1460/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1461static void
1462android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2
1463 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001464 jint _exception = 0;
1465 const char * _exceptionType = NULL;
1466 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001467 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001468 jint _bufferOffset = (jint) 0;
1469 jint _remaining;
1470 GLint *value = (GLint *) 0;
1471
Romain Guy84cac202016-12-05 12:26:02 -08001472 if (!value_buf) {
1473 _exception = 1;
1474 _exceptionType = "java/lang/IllegalArgumentException";
1475 _exceptionMessage = "value == null";
1476 goto exit;
1477 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001478 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001479 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001480 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001481 value = (GLint *) (_valueBase + _bufferOffset);
1482 }
1483 glProgramUniform1iv(
1484 (GLuint)program,
1485 (GLint)location,
1486 (GLsizei)count,
1487 (GLint *)value
1488 );
Romain Guy84cac202016-12-05 12:26:02 -08001489
1490exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001491 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001492 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001493 }
Romain Guy84cac202016-12-05 12:26:02 -08001494 if (_exception) {
1495 jniThrowException(_env, _exceptionType, _exceptionMessage);
1496 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001497}
1498
1499/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1500static void
1501android_glProgramUniform2iv__III_3II
1502 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1503 jint _exception = 0;
1504 const char * _exceptionType = NULL;
1505 const char * _exceptionMessage = NULL;
1506 GLint *value_base = (GLint *) 0;
1507 jint _remaining;
1508 GLint *value = (GLint *) 0;
1509
1510 if (!value_ref) {
1511 _exception = 1;
1512 _exceptionType = "java/lang/IllegalArgumentException";
1513 _exceptionMessage = "value == null";
1514 goto exit;
1515 }
1516 if (offset < 0) {
1517 _exception = 1;
1518 _exceptionType = "java/lang/IllegalArgumentException";
1519 _exceptionMessage = "offset < 0";
1520 goto exit;
1521 }
1522 _remaining = _env->GetArrayLength(value_ref) - offset;
1523 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001524 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001525 value = value_base + offset;
1526
1527 glProgramUniform2iv(
1528 (GLuint)program,
1529 (GLint)location,
1530 (GLsizei)count,
1531 (GLint *)value
1532 );
1533
1534exit:
1535 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001536 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001537 JNI_ABORT);
1538 }
1539 if (_exception) {
1540 jniThrowException(_env, _exceptionType, _exceptionMessage);
1541 }
1542}
1543
1544/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1545static void
1546android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2
1547 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001548 jint _exception = 0;
1549 const char * _exceptionType = NULL;
1550 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001551 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001552 jint _bufferOffset = (jint) 0;
1553 jint _remaining;
1554 GLint *value = (GLint *) 0;
1555
Romain Guy84cac202016-12-05 12:26:02 -08001556 if (!value_buf) {
1557 _exception = 1;
1558 _exceptionType = "java/lang/IllegalArgumentException";
1559 _exceptionMessage = "value == null";
1560 goto exit;
1561 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001562 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001563 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001564 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001565 value = (GLint *) (_valueBase + _bufferOffset);
1566 }
1567 glProgramUniform2iv(
1568 (GLuint)program,
1569 (GLint)location,
1570 (GLsizei)count,
1571 (GLint *)value
1572 );
Romain Guy84cac202016-12-05 12:26:02 -08001573
1574exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001575 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001576 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001577 }
Romain Guy84cac202016-12-05 12:26:02 -08001578 if (_exception) {
1579 jniThrowException(_env, _exceptionType, _exceptionMessage);
1580 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001581}
1582
1583/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1584static void
1585android_glProgramUniform3iv__III_3II
1586 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1587 jint _exception = 0;
1588 const char * _exceptionType = NULL;
1589 const char * _exceptionMessage = NULL;
1590 GLint *value_base = (GLint *) 0;
1591 jint _remaining;
1592 GLint *value = (GLint *) 0;
1593
1594 if (!value_ref) {
1595 _exception = 1;
1596 _exceptionType = "java/lang/IllegalArgumentException";
1597 _exceptionMessage = "value == null";
1598 goto exit;
1599 }
1600 if (offset < 0) {
1601 _exception = 1;
1602 _exceptionType = "java/lang/IllegalArgumentException";
1603 _exceptionMessage = "offset < 0";
1604 goto exit;
1605 }
1606 _remaining = _env->GetArrayLength(value_ref) - offset;
1607 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001608 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001609 value = value_base + offset;
1610
1611 glProgramUniform3iv(
1612 (GLuint)program,
1613 (GLint)location,
1614 (GLsizei)count,
1615 (GLint *)value
1616 );
1617
1618exit:
1619 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001620 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001621 JNI_ABORT);
1622 }
1623 if (_exception) {
1624 jniThrowException(_env, _exceptionType, _exceptionMessage);
1625 }
1626}
1627
1628/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1629static void
1630android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2
1631 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001632 jint _exception = 0;
1633 const char * _exceptionType = NULL;
1634 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001635 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001636 jint _bufferOffset = (jint) 0;
1637 jint _remaining;
1638 GLint *value = (GLint *) 0;
1639
Romain Guy84cac202016-12-05 12:26:02 -08001640 if (!value_buf) {
1641 _exception = 1;
1642 _exceptionType = "java/lang/IllegalArgumentException";
1643 _exceptionMessage = "value == null";
1644 goto exit;
1645 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001646 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001647 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001648 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001649 value = (GLint *) (_valueBase + _bufferOffset);
1650 }
1651 glProgramUniform3iv(
1652 (GLuint)program,
1653 (GLint)location,
1654 (GLsizei)count,
1655 (GLint *)value
1656 );
Romain Guy84cac202016-12-05 12:26:02 -08001657
1658exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001659 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001660 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001661 }
Romain Guy84cac202016-12-05 12:26:02 -08001662 if (_exception) {
1663 jniThrowException(_env, _exceptionType, _exceptionMessage);
1664 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001665}
1666
1667/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1668static void
1669android_glProgramUniform4iv__III_3II
1670 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1671 jint _exception = 0;
1672 const char * _exceptionType = NULL;
1673 const char * _exceptionMessage = NULL;
1674 GLint *value_base = (GLint *) 0;
1675 jint _remaining;
1676 GLint *value = (GLint *) 0;
1677
1678 if (!value_ref) {
1679 _exception = 1;
1680 _exceptionType = "java/lang/IllegalArgumentException";
1681 _exceptionMessage = "value == null";
1682 goto exit;
1683 }
1684 if (offset < 0) {
1685 _exception = 1;
1686 _exceptionType = "java/lang/IllegalArgumentException";
1687 _exceptionMessage = "offset < 0";
1688 goto exit;
1689 }
1690 _remaining = _env->GetArrayLength(value_ref) - offset;
1691 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001692 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001693 value = value_base + offset;
1694
1695 glProgramUniform4iv(
1696 (GLuint)program,
1697 (GLint)location,
1698 (GLsizei)count,
1699 (GLint *)value
1700 );
1701
1702exit:
1703 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001704 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001705 JNI_ABORT);
1706 }
1707 if (_exception) {
1708 jniThrowException(_env, _exceptionType, _exceptionMessage);
1709 }
1710}
1711
1712/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1713static void
1714android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2
1715 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001716 jint _exception = 0;
1717 const char * _exceptionType = NULL;
1718 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001719 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001720 jint _bufferOffset = (jint) 0;
1721 jint _remaining;
1722 GLint *value = (GLint *) 0;
1723
Romain Guy84cac202016-12-05 12:26:02 -08001724 if (!value_buf) {
1725 _exception = 1;
1726 _exceptionType = "java/lang/IllegalArgumentException";
1727 _exceptionMessage = "value == null";
1728 goto exit;
1729 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001730 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001731 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001732 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001733 value = (GLint *) (_valueBase + _bufferOffset);
1734 }
1735 glProgramUniform4iv(
1736 (GLuint)program,
1737 (GLint)location,
1738 (GLsizei)count,
1739 (GLint *)value
1740 );
Romain Guy84cac202016-12-05 12:26:02 -08001741
1742exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001743 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001744 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001745 }
Romain Guy84cac202016-12-05 12:26:02 -08001746 if (_exception) {
1747 jniThrowException(_env, _exceptionType, _exceptionMessage);
1748 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001749}
1750
1751/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1752static void
1753android_glProgramUniform1uiv__III_3II
1754 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1755 jint _exception = 0;
1756 const char * _exceptionType = NULL;
1757 const char * _exceptionMessage = NULL;
1758 GLuint *value_base = (GLuint *) 0;
1759 jint _remaining;
1760 GLuint *value = (GLuint *) 0;
1761
1762 if (!value_ref) {
1763 _exception = 1;
1764 _exceptionType = "java/lang/IllegalArgumentException";
1765 _exceptionMessage = "value == null";
1766 goto exit;
1767 }
1768 if (offset < 0) {
1769 _exception = 1;
1770 _exceptionType = "java/lang/IllegalArgumentException";
1771 _exceptionMessage = "offset < 0";
1772 goto exit;
1773 }
1774 _remaining = _env->GetArrayLength(value_ref) - offset;
1775 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001776 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001777 value = value_base + offset;
1778
1779 glProgramUniform1uiv(
1780 (GLuint)program,
1781 (GLint)location,
1782 (GLsizei)count,
1783 (GLuint *)value
1784 );
1785
1786exit:
1787 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001788 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001789 JNI_ABORT);
1790 }
1791 if (_exception) {
1792 jniThrowException(_env, _exceptionType, _exceptionMessage);
1793 }
1794}
1795
1796/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1797static void
1798android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2
1799 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001800 jint _exception = 0;
1801 const char * _exceptionType = NULL;
1802 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001803 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001804 jint _bufferOffset = (jint) 0;
1805 jint _remaining;
1806 GLuint *value = (GLuint *) 0;
1807
Romain Guy84cac202016-12-05 12:26:02 -08001808 if (!value_buf) {
1809 _exception = 1;
1810 _exceptionType = "java/lang/IllegalArgumentException";
1811 _exceptionMessage = "value == null";
1812 goto exit;
1813 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001814 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001815 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001816 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001817 value = (GLuint *) (_valueBase + _bufferOffset);
1818 }
1819 glProgramUniform1uiv(
1820 (GLuint)program,
1821 (GLint)location,
1822 (GLsizei)count,
1823 (GLuint *)value
1824 );
Romain Guy84cac202016-12-05 12:26:02 -08001825
1826exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001827 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001828 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001829 }
Romain Guy84cac202016-12-05 12:26:02 -08001830 if (_exception) {
1831 jniThrowException(_env, _exceptionType, _exceptionMessage);
1832 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001833}
1834
1835/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1836static void
1837android_glProgramUniform2uiv__III_3II
1838 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1839 jint _exception = 0;
1840 const char * _exceptionType = NULL;
1841 const char * _exceptionMessage = NULL;
1842 GLuint *value_base = (GLuint *) 0;
1843 jint _remaining;
1844 GLuint *value = (GLuint *) 0;
1845
1846 if (!value_ref) {
1847 _exception = 1;
1848 _exceptionType = "java/lang/IllegalArgumentException";
1849 _exceptionMessage = "value == null";
1850 goto exit;
1851 }
1852 if (offset < 0) {
1853 _exception = 1;
1854 _exceptionType = "java/lang/IllegalArgumentException";
1855 _exceptionMessage = "offset < 0";
1856 goto exit;
1857 }
1858 _remaining = _env->GetArrayLength(value_ref) - offset;
1859 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001860 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001861 value = value_base + offset;
1862
1863 glProgramUniform2uiv(
1864 (GLuint)program,
1865 (GLint)location,
1866 (GLsizei)count,
1867 (GLuint *)value
1868 );
1869
1870exit:
1871 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001872 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001873 JNI_ABORT);
1874 }
1875 if (_exception) {
1876 jniThrowException(_env, _exceptionType, _exceptionMessage);
1877 }
1878}
1879
1880/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1881static void
1882android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2
1883 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001884 jint _exception = 0;
1885 const char * _exceptionType = NULL;
1886 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001887 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001888 jint _bufferOffset = (jint) 0;
1889 jint _remaining;
1890 GLuint *value = (GLuint *) 0;
1891
Romain Guy84cac202016-12-05 12:26:02 -08001892 if (!value_buf) {
1893 _exception = 1;
1894 _exceptionType = "java/lang/IllegalArgumentException";
1895 _exceptionMessage = "value == null";
1896 goto exit;
1897 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001898 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001899 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001900 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001901 value = (GLuint *) (_valueBase + _bufferOffset);
1902 }
1903 glProgramUniform2uiv(
1904 (GLuint)program,
1905 (GLint)location,
1906 (GLsizei)count,
1907 (GLuint *)value
1908 );
Romain Guy84cac202016-12-05 12:26:02 -08001909
1910exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001911 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001912 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001913 }
Romain Guy84cac202016-12-05 12:26:02 -08001914 if (_exception) {
1915 jniThrowException(_env, _exceptionType, _exceptionMessage);
1916 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001917}
1918
1919/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1920static void
1921android_glProgramUniform3uiv__III_3II
1922 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1923 jint _exception = 0;
1924 const char * _exceptionType = NULL;
1925 const char * _exceptionMessage = NULL;
1926 GLuint *value_base = (GLuint *) 0;
1927 jint _remaining;
1928 GLuint *value = (GLuint *) 0;
1929
1930 if (!value_ref) {
1931 _exception = 1;
1932 _exceptionType = "java/lang/IllegalArgumentException";
1933 _exceptionMessage = "value == null";
1934 goto exit;
1935 }
1936 if (offset < 0) {
1937 _exception = 1;
1938 _exceptionType = "java/lang/IllegalArgumentException";
1939 _exceptionMessage = "offset < 0";
1940 goto exit;
1941 }
1942 _remaining = _env->GetArrayLength(value_ref) - offset;
1943 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001944 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001945 value = value_base + offset;
1946
1947 glProgramUniform3uiv(
1948 (GLuint)program,
1949 (GLint)location,
1950 (GLsizei)count,
1951 (GLuint *)value
1952 );
1953
1954exit:
1955 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001956 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001957 JNI_ABORT);
1958 }
1959 if (_exception) {
1960 jniThrowException(_env, _exceptionType, _exceptionMessage);
1961 }
1962}
1963
1964/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1965static void
1966android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2
1967 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001968 jint _exception = 0;
1969 const char * _exceptionType = NULL;
1970 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001971 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001972 jint _bufferOffset = (jint) 0;
1973 jint _remaining;
1974 GLuint *value = (GLuint *) 0;
1975
Romain Guy84cac202016-12-05 12:26:02 -08001976 if (!value_buf) {
1977 _exception = 1;
1978 _exceptionType = "java/lang/IllegalArgumentException";
1979 _exceptionMessage = "value == null";
1980 goto exit;
1981 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001982 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001983 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001984 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001985 value = (GLuint *) (_valueBase + _bufferOffset);
1986 }
1987 glProgramUniform3uiv(
1988 (GLuint)program,
1989 (GLint)location,
1990 (GLsizei)count,
1991 (GLuint *)value
1992 );
Romain Guy84cac202016-12-05 12:26:02 -08001993
1994exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001995 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001996 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001997 }
Romain Guy84cac202016-12-05 12:26:02 -08001998 if (_exception) {
1999 jniThrowException(_env, _exceptionType, _exceptionMessage);
2000 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002001}
2002
2003/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
2004static void
2005android_glProgramUniform4uiv__III_3II
2006 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
2007 jint _exception = 0;
2008 const char * _exceptionType = NULL;
2009 const char * _exceptionMessage = NULL;
2010 GLuint *value_base = (GLuint *) 0;
2011 jint _remaining;
2012 GLuint *value = (GLuint *) 0;
2013
2014 if (!value_ref) {
2015 _exception = 1;
2016 _exceptionType = "java/lang/IllegalArgumentException";
2017 _exceptionMessage = "value == null";
2018 goto exit;
2019 }
2020 if (offset < 0) {
2021 _exception = 1;
2022 _exceptionType = "java/lang/IllegalArgumentException";
2023 _exceptionMessage = "offset < 0";
2024 goto exit;
2025 }
2026 _remaining = _env->GetArrayLength(value_ref) - offset;
2027 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002028 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002029 value = value_base + offset;
2030
2031 glProgramUniform4uiv(
2032 (GLuint)program,
2033 (GLint)location,
2034 (GLsizei)count,
2035 (GLuint *)value
2036 );
2037
2038exit:
2039 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002040 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002041 JNI_ABORT);
2042 }
2043 if (_exception) {
2044 jniThrowException(_env, _exceptionType, _exceptionMessage);
2045 }
2046}
2047
2048/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
2049static void
2050android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2
2051 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002052 jint _exception = 0;
2053 const char * _exceptionType = NULL;
2054 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002055 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002056 jint _bufferOffset = (jint) 0;
2057 jint _remaining;
2058 GLuint *value = (GLuint *) 0;
2059
Romain Guy84cac202016-12-05 12:26:02 -08002060 if (!value_buf) {
2061 _exception = 1;
2062 _exceptionType = "java/lang/IllegalArgumentException";
2063 _exceptionMessage = "value == null";
2064 goto exit;
2065 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002066 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002067 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002068 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002069 value = (GLuint *) (_valueBase + _bufferOffset);
2070 }
2071 glProgramUniform4uiv(
2072 (GLuint)program,
2073 (GLint)location,
2074 (GLsizei)count,
2075 (GLuint *)value
2076 );
Romain Guy84cac202016-12-05 12:26:02 -08002077
2078exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002079 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002080 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002081 }
Romain Guy84cac202016-12-05 12:26:02 -08002082 if (_exception) {
2083 jniThrowException(_env, _exceptionType, _exceptionMessage);
2084 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002085}
2086
2087/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2088static void
2089android_glProgramUniform1fv__III_3FI
2090 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2091 jint _exception = 0;
2092 const char * _exceptionType = NULL;
2093 const char * _exceptionMessage = NULL;
2094 GLfloat *value_base = (GLfloat *) 0;
2095 jint _remaining;
2096 GLfloat *value = (GLfloat *) 0;
2097
2098 if (!value_ref) {
2099 _exception = 1;
2100 _exceptionType = "java/lang/IllegalArgumentException";
2101 _exceptionMessage = "value == null";
2102 goto exit;
2103 }
2104 if (offset < 0) {
2105 _exception = 1;
2106 _exceptionType = "java/lang/IllegalArgumentException";
2107 _exceptionMessage = "offset < 0";
2108 goto exit;
2109 }
2110 _remaining = _env->GetArrayLength(value_ref) - offset;
2111 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002112 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002113 value = value_base + offset;
2114
2115 glProgramUniform1fv(
2116 (GLuint)program,
2117 (GLint)location,
2118 (GLsizei)count,
2119 (GLfloat *)value
2120 );
2121
2122exit:
2123 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002124 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002125 JNI_ABORT);
2126 }
2127 if (_exception) {
2128 jniThrowException(_env, _exceptionType, _exceptionMessage);
2129 }
2130}
2131
2132/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2133static void
2134android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2
2135 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002136 jint _exception = 0;
2137 const char * _exceptionType = NULL;
2138 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002139 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002140 jint _bufferOffset = (jint) 0;
2141 jint _remaining;
2142 GLfloat *value = (GLfloat *) 0;
2143
Romain Guy84cac202016-12-05 12:26:02 -08002144 if (!value_buf) {
2145 _exception = 1;
2146 _exceptionType = "java/lang/IllegalArgumentException";
2147 _exceptionMessage = "value == null";
2148 goto exit;
2149 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002150 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002151 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002152 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002153 value = (GLfloat *) (_valueBase + _bufferOffset);
2154 }
2155 glProgramUniform1fv(
2156 (GLuint)program,
2157 (GLint)location,
2158 (GLsizei)count,
2159 (GLfloat *)value
2160 );
Romain Guy84cac202016-12-05 12:26:02 -08002161
2162exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002163 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002164 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002165 }
Romain Guy84cac202016-12-05 12:26:02 -08002166 if (_exception) {
2167 jniThrowException(_env, _exceptionType, _exceptionMessage);
2168 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002169}
2170
2171/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2172static void
2173android_glProgramUniform2fv__III_3FI
2174 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2175 jint _exception = 0;
2176 const char * _exceptionType = NULL;
2177 const char * _exceptionMessage = NULL;
2178 GLfloat *value_base = (GLfloat *) 0;
2179 jint _remaining;
2180 GLfloat *value = (GLfloat *) 0;
2181
2182 if (!value_ref) {
2183 _exception = 1;
2184 _exceptionType = "java/lang/IllegalArgumentException";
2185 _exceptionMessage = "value == null";
2186 goto exit;
2187 }
2188 if (offset < 0) {
2189 _exception = 1;
2190 _exceptionType = "java/lang/IllegalArgumentException";
2191 _exceptionMessage = "offset < 0";
2192 goto exit;
2193 }
2194 _remaining = _env->GetArrayLength(value_ref) - offset;
2195 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002196 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002197 value = value_base + offset;
2198
2199 glProgramUniform2fv(
2200 (GLuint)program,
2201 (GLint)location,
2202 (GLsizei)count,
2203 (GLfloat *)value
2204 );
2205
2206exit:
2207 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002208 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002209 JNI_ABORT);
2210 }
2211 if (_exception) {
2212 jniThrowException(_env, _exceptionType, _exceptionMessage);
2213 }
2214}
2215
2216/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2217static void
2218android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2
2219 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002220 jint _exception = 0;
2221 const char * _exceptionType = NULL;
2222 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002223 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002224 jint _bufferOffset = (jint) 0;
2225 jint _remaining;
2226 GLfloat *value = (GLfloat *) 0;
2227
Romain Guy84cac202016-12-05 12:26:02 -08002228 if (!value_buf) {
2229 _exception = 1;
2230 _exceptionType = "java/lang/IllegalArgumentException";
2231 _exceptionMessage = "value == null";
2232 goto exit;
2233 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002234 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002235 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002236 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002237 value = (GLfloat *) (_valueBase + _bufferOffset);
2238 }
2239 glProgramUniform2fv(
2240 (GLuint)program,
2241 (GLint)location,
2242 (GLsizei)count,
2243 (GLfloat *)value
2244 );
Romain Guy84cac202016-12-05 12:26:02 -08002245
2246exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002247 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002248 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002249 }
Romain Guy84cac202016-12-05 12:26:02 -08002250 if (_exception) {
2251 jniThrowException(_env, _exceptionType, _exceptionMessage);
2252 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002253}
2254
2255/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2256static void
2257android_glProgramUniform3fv__III_3FI
2258 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2259 jint _exception = 0;
2260 const char * _exceptionType = NULL;
2261 const char * _exceptionMessage = NULL;
2262 GLfloat *value_base = (GLfloat *) 0;
2263 jint _remaining;
2264 GLfloat *value = (GLfloat *) 0;
2265
2266 if (!value_ref) {
2267 _exception = 1;
2268 _exceptionType = "java/lang/IllegalArgumentException";
2269 _exceptionMessage = "value == null";
2270 goto exit;
2271 }
2272 if (offset < 0) {
2273 _exception = 1;
2274 _exceptionType = "java/lang/IllegalArgumentException";
2275 _exceptionMessage = "offset < 0";
2276 goto exit;
2277 }
2278 _remaining = _env->GetArrayLength(value_ref) - offset;
2279 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002280 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002281 value = value_base + offset;
2282
2283 glProgramUniform3fv(
2284 (GLuint)program,
2285 (GLint)location,
2286 (GLsizei)count,
2287 (GLfloat *)value
2288 );
2289
2290exit:
2291 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002292 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002293 JNI_ABORT);
2294 }
2295 if (_exception) {
2296 jniThrowException(_env, _exceptionType, _exceptionMessage);
2297 }
2298}
2299
2300/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2301static void
2302android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2
2303 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002304 jint _exception = 0;
2305 const char * _exceptionType = NULL;
2306 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002307 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002308 jint _bufferOffset = (jint) 0;
2309 jint _remaining;
2310 GLfloat *value = (GLfloat *) 0;
2311
Romain Guy84cac202016-12-05 12:26:02 -08002312 if (!value_buf) {
2313 _exception = 1;
2314 _exceptionType = "java/lang/IllegalArgumentException";
2315 _exceptionMessage = "value == null";
2316 goto exit;
2317 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002318 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002319 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002320 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002321 value = (GLfloat *) (_valueBase + _bufferOffset);
2322 }
2323 glProgramUniform3fv(
2324 (GLuint)program,
2325 (GLint)location,
2326 (GLsizei)count,
2327 (GLfloat *)value
2328 );
Romain Guy84cac202016-12-05 12:26:02 -08002329
2330exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002331 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002332 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002333 }
Romain Guy84cac202016-12-05 12:26:02 -08002334 if (_exception) {
2335 jniThrowException(_env, _exceptionType, _exceptionMessage);
2336 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002337}
2338
2339/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2340static void
2341android_glProgramUniform4fv__III_3FI
2342 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2343 jint _exception = 0;
2344 const char * _exceptionType = NULL;
2345 const char * _exceptionMessage = NULL;
2346 GLfloat *value_base = (GLfloat *) 0;
2347 jint _remaining;
2348 GLfloat *value = (GLfloat *) 0;
2349
2350 if (!value_ref) {
2351 _exception = 1;
2352 _exceptionType = "java/lang/IllegalArgumentException";
2353 _exceptionMessage = "value == null";
2354 goto exit;
2355 }
2356 if (offset < 0) {
2357 _exception = 1;
2358 _exceptionType = "java/lang/IllegalArgumentException";
2359 _exceptionMessage = "offset < 0";
2360 goto exit;
2361 }
2362 _remaining = _env->GetArrayLength(value_ref) - offset;
2363 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002364 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002365 value = value_base + offset;
2366
2367 glProgramUniform4fv(
2368 (GLuint)program,
2369 (GLint)location,
2370 (GLsizei)count,
2371 (GLfloat *)value
2372 );
2373
2374exit:
2375 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002376 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002377 JNI_ABORT);
2378 }
2379 if (_exception) {
2380 jniThrowException(_env, _exceptionType, _exceptionMessage);
2381 }
2382}
2383
2384/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2385static void
2386android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2
2387 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002388 jint _exception = 0;
2389 const char * _exceptionType = NULL;
2390 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002391 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002392 jint _bufferOffset = (jint) 0;
2393 jint _remaining;
2394 GLfloat *value = (GLfloat *) 0;
2395
Romain Guy84cac202016-12-05 12:26:02 -08002396 if (!value_buf) {
2397 _exception = 1;
2398 _exceptionType = "java/lang/IllegalArgumentException";
2399 _exceptionMessage = "value == null";
2400 goto exit;
2401 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002402 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002403 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002404 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002405 value = (GLfloat *) (_valueBase + _bufferOffset);
2406 }
2407 glProgramUniform4fv(
2408 (GLuint)program,
2409 (GLint)location,
2410 (GLsizei)count,
2411 (GLfloat *)value
2412 );
Romain Guy84cac202016-12-05 12:26:02 -08002413
2414exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002415 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002416 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002417 }
Romain Guy84cac202016-12-05 12:26:02 -08002418 if (_exception) {
2419 jniThrowException(_env, _exceptionType, _exceptionMessage);
2420 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002421}
2422
2423/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2424static void
2425android_glProgramUniformMatrix2fv__IIIZ_3FI
2426 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2427 jint _exception = 0;
2428 const char * _exceptionType = NULL;
2429 const char * _exceptionMessage = NULL;
2430 GLfloat *value_base = (GLfloat *) 0;
2431 jint _remaining;
2432 GLfloat *value = (GLfloat *) 0;
2433
2434 if (!value_ref) {
2435 _exception = 1;
2436 _exceptionType = "java/lang/IllegalArgumentException";
2437 _exceptionMessage = "value == null";
2438 goto exit;
2439 }
2440 if (offset < 0) {
2441 _exception = 1;
2442 _exceptionType = "java/lang/IllegalArgumentException";
2443 _exceptionMessage = "offset < 0";
2444 goto exit;
2445 }
2446 _remaining = _env->GetArrayLength(value_ref) - offset;
2447 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002448 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002449 value = value_base + offset;
2450
2451 glProgramUniformMatrix2fv(
2452 (GLuint)program,
2453 (GLint)location,
2454 (GLsizei)count,
2455 (GLboolean)transpose,
2456 (GLfloat *)value
2457 );
2458
2459exit:
2460 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002461 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002462 JNI_ABORT);
2463 }
2464 if (_exception) {
2465 jniThrowException(_env, _exceptionType, _exceptionMessage);
2466 }
2467}
2468
2469/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2470static void
2471android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2
2472 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002473 jint _exception = 0;
2474 const char * _exceptionType = NULL;
2475 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002476 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002477 jint _bufferOffset = (jint) 0;
2478 jint _remaining;
2479 GLfloat *value = (GLfloat *) 0;
2480
Romain Guy84cac202016-12-05 12:26:02 -08002481 if (!value_buf) {
2482 _exception = 1;
2483 _exceptionType = "java/lang/IllegalArgumentException";
2484 _exceptionMessage = "value == null";
2485 goto exit;
2486 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002487 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002488 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002489 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002490 value = (GLfloat *) (_valueBase + _bufferOffset);
2491 }
2492 glProgramUniformMatrix2fv(
2493 (GLuint)program,
2494 (GLint)location,
2495 (GLsizei)count,
2496 (GLboolean)transpose,
2497 (GLfloat *)value
2498 );
Romain Guy84cac202016-12-05 12:26:02 -08002499
2500exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002501 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002502 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002503 }
Romain Guy84cac202016-12-05 12:26:02 -08002504 if (_exception) {
2505 jniThrowException(_env, _exceptionType, _exceptionMessage);
2506 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002507}
2508
2509/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2510static void
2511android_glProgramUniformMatrix3fv__IIIZ_3FI
2512 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2513 jint _exception = 0;
2514 const char * _exceptionType = NULL;
2515 const char * _exceptionMessage = NULL;
2516 GLfloat *value_base = (GLfloat *) 0;
2517 jint _remaining;
2518 GLfloat *value = (GLfloat *) 0;
2519
2520 if (!value_ref) {
2521 _exception = 1;
2522 _exceptionType = "java/lang/IllegalArgumentException";
2523 _exceptionMessage = "value == null";
2524 goto exit;
2525 }
2526 if (offset < 0) {
2527 _exception = 1;
2528 _exceptionType = "java/lang/IllegalArgumentException";
2529 _exceptionMessage = "offset < 0";
2530 goto exit;
2531 }
2532 _remaining = _env->GetArrayLength(value_ref) - offset;
2533 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002534 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002535 value = value_base + offset;
2536
2537 glProgramUniformMatrix3fv(
2538 (GLuint)program,
2539 (GLint)location,
2540 (GLsizei)count,
2541 (GLboolean)transpose,
2542 (GLfloat *)value
2543 );
2544
2545exit:
2546 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002547 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002548 JNI_ABORT);
2549 }
2550 if (_exception) {
2551 jniThrowException(_env, _exceptionType, _exceptionMessage);
2552 }
2553}
2554
2555/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2556static void
2557android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2
2558 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002559 jint _exception = 0;
2560 const char * _exceptionType = NULL;
2561 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002562 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002563 jint _bufferOffset = (jint) 0;
2564 jint _remaining;
2565 GLfloat *value = (GLfloat *) 0;
2566
Romain Guy84cac202016-12-05 12:26:02 -08002567 if (!value_buf) {
2568 _exception = 1;
2569 _exceptionType = "java/lang/IllegalArgumentException";
2570 _exceptionMessage = "value == null";
2571 goto exit;
2572 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002573 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002574 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002575 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002576 value = (GLfloat *) (_valueBase + _bufferOffset);
2577 }
2578 glProgramUniformMatrix3fv(
2579 (GLuint)program,
2580 (GLint)location,
2581 (GLsizei)count,
2582 (GLboolean)transpose,
2583 (GLfloat *)value
2584 );
Romain Guy84cac202016-12-05 12:26:02 -08002585
2586exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002587 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002588 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002589 }
Romain Guy84cac202016-12-05 12:26:02 -08002590 if (_exception) {
2591 jniThrowException(_env, _exceptionType, _exceptionMessage);
2592 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002593}
2594
2595/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2596static void
2597android_glProgramUniformMatrix4fv__IIIZ_3FI
2598 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2599 jint _exception = 0;
2600 const char * _exceptionType = NULL;
2601 const char * _exceptionMessage = NULL;
2602 GLfloat *value_base = (GLfloat *) 0;
2603 jint _remaining;
2604 GLfloat *value = (GLfloat *) 0;
2605
2606 if (!value_ref) {
2607 _exception = 1;
2608 _exceptionType = "java/lang/IllegalArgumentException";
2609 _exceptionMessage = "value == null";
2610 goto exit;
2611 }
2612 if (offset < 0) {
2613 _exception = 1;
2614 _exceptionType = "java/lang/IllegalArgumentException";
2615 _exceptionMessage = "offset < 0";
2616 goto exit;
2617 }
2618 _remaining = _env->GetArrayLength(value_ref) - offset;
2619 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002620 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002621 value = value_base + offset;
2622
2623 glProgramUniformMatrix4fv(
2624 (GLuint)program,
2625 (GLint)location,
2626 (GLsizei)count,
2627 (GLboolean)transpose,
2628 (GLfloat *)value
2629 );
2630
2631exit:
2632 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002633 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002634 JNI_ABORT);
2635 }
2636 if (_exception) {
2637 jniThrowException(_env, _exceptionType, _exceptionMessage);
2638 }
2639}
2640
2641/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2642static void
2643android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2
2644 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002645 jint _exception = 0;
2646 const char * _exceptionType = NULL;
2647 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002648 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002649 jint _bufferOffset = (jint) 0;
2650 jint _remaining;
2651 GLfloat *value = (GLfloat *) 0;
2652
Romain Guy84cac202016-12-05 12:26:02 -08002653 if (!value_buf) {
2654 _exception = 1;
2655 _exceptionType = "java/lang/IllegalArgumentException";
2656 _exceptionMessage = "value == null";
2657 goto exit;
2658 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002659 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002660 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002661 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002662 value = (GLfloat *) (_valueBase + _bufferOffset);
2663 }
2664 glProgramUniformMatrix4fv(
2665 (GLuint)program,
2666 (GLint)location,
2667 (GLsizei)count,
2668 (GLboolean)transpose,
2669 (GLfloat *)value
2670 );
Romain Guy84cac202016-12-05 12:26:02 -08002671
2672exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002673 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002674 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002675 }
Romain Guy84cac202016-12-05 12:26:02 -08002676 if (_exception) {
2677 jniThrowException(_env, _exceptionType, _exceptionMessage);
2678 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002679}
2680
2681/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2682static void
2683android_glProgramUniformMatrix2x3fv__IIIZ_3FI
2684 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2685 jint _exception = 0;
2686 const char * _exceptionType = NULL;
2687 const char * _exceptionMessage = NULL;
2688 GLfloat *value_base = (GLfloat *) 0;
2689 jint _remaining;
2690 GLfloat *value = (GLfloat *) 0;
2691
2692 if (!value_ref) {
2693 _exception = 1;
2694 _exceptionType = "java/lang/IllegalArgumentException";
2695 _exceptionMessage = "value == null";
2696 goto exit;
2697 }
2698 if (offset < 0) {
2699 _exception = 1;
2700 _exceptionType = "java/lang/IllegalArgumentException";
2701 _exceptionMessage = "offset < 0";
2702 goto exit;
2703 }
2704 _remaining = _env->GetArrayLength(value_ref) - offset;
2705 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002706 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002707 value = value_base + offset;
2708
2709 glProgramUniformMatrix2x3fv(
2710 (GLuint)program,
2711 (GLint)location,
2712 (GLsizei)count,
2713 (GLboolean)transpose,
2714 (GLfloat *)value
2715 );
2716
2717exit:
2718 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002719 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002720 JNI_ABORT);
2721 }
2722 if (_exception) {
2723 jniThrowException(_env, _exceptionType, _exceptionMessage);
2724 }
2725}
2726
2727/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2728static void
2729android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2
2730 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002731 jint _exception = 0;
2732 const char * _exceptionType = NULL;
2733 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002734 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002735 jint _bufferOffset = (jint) 0;
2736 jint _remaining;
2737 GLfloat *value = (GLfloat *) 0;
2738
Romain Guy84cac202016-12-05 12:26:02 -08002739 if (!value_buf) {
2740 _exception = 1;
2741 _exceptionType = "java/lang/IllegalArgumentException";
2742 _exceptionMessage = "value == null";
2743 goto exit;
2744 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002745 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002746 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002747 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002748 value = (GLfloat *) (_valueBase + _bufferOffset);
2749 }
2750 glProgramUniformMatrix2x3fv(
2751 (GLuint)program,
2752 (GLint)location,
2753 (GLsizei)count,
2754 (GLboolean)transpose,
2755 (GLfloat *)value
2756 );
Romain Guy84cac202016-12-05 12:26:02 -08002757
2758exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002759 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002760 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002761 }
Romain Guy84cac202016-12-05 12:26:02 -08002762 if (_exception) {
2763 jniThrowException(_env, _exceptionType, _exceptionMessage);
2764 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002765}
2766
2767/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2768static void
2769android_glProgramUniformMatrix3x2fv__IIIZ_3FI
2770 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2771 jint _exception = 0;
2772 const char * _exceptionType = NULL;
2773 const char * _exceptionMessage = NULL;
2774 GLfloat *value_base = (GLfloat *) 0;
2775 jint _remaining;
2776 GLfloat *value = (GLfloat *) 0;
2777
2778 if (!value_ref) {
2779 _exception = 1;
2780 _exceptionType = "java/lang/IllegalArgumentException";
2781 _exceptionMessage = "value == null";
2782 goto exit;
2783 }
2784 if (offset < 0) {
2785 _exception = 1;
2786 _exceptionType = "java/lang/IllegalArgumentException";
2787 _exceptionMessage = "offset < 0";
2788 goto exit;
2789 }
2790 _remaining = _env->GetArrayLength(value_ref) - offset;
2791 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002792 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002793 value = value_base + offset;
2794
2795 glProgramUniformMatrix3x2fv(
2796 (GLuint)program,
2797 (GLint)location,
2798 (GLsizei)count,
2799 (GLboolean)transpose,
2800 (GLfloat *)value
2801 );
2802
2803exit:
2804 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002805 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002806 JNI_ABORT);
2807 }
2808 if (_exception) {
2809 jniThrowException(_env, _exceptionType, _exceptionMessage);
2810 }
2811}
2812
2813/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2814static void
2815android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2
2816 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002817 jint _exception = 0;
2818 const char * _exceptionType = NULL;
2819 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002820 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002821 jint _bufferOffset = (jint) 0;
2822 jint _remaining;
2823 GLfloat *value = (GLfloat *) 0;
2824
Romain Guy84cac202016-12-05 12:26:02 -08002825 if (!value_buf) {
2826 _exception = 1;
2827 _exceptionType = "java/lang/IllegalArgumentException";
2828 _exceptionMessage = "value == null";
2829 goto exit;
2830 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002831 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002832 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002833 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002834 value = (GLfloat *) (_valueBase + _bufferOffset);
2835 }
2836 glProgramUniformMatrix3x2fv(
2837 (GLuint)program,
2838 (GLint)location,
2839 (GLsizei)count,
2840 (GLboolean)transpose,
2841 (GLfloat *)value
2842 );
Romain Guy84cac202016-12-05 12:26:02 -08002843
2844exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002845 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002846 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002847 }
Romain Guy84cac202016-12-05 12:26:02 -08002848 if (_exception) {
2849 jniThrowException(_env, _exceptionType, _exceptionMessage);
2850 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002851}
2852
2853/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2854static void
2855android_glProgramUniformMatrix2x4fv__IIIZ_3FI
2856 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2857 jint _exception = 0;
2858 const char * _exceptionType = NULL;
2859 const char * _exceptionMessage = NULL;
2860 GLfloat *value_base = (GLfloat *) 0;
2861 jint _remaining;
2862 GLfloat *value = (GLfloat *) 0;
2863
2864 if (!value_ref) {
2865 _exception = 1;
2866 _exceptionType = "java/lang/IllegalArgumentException";
2867 _exceptionMessage = "value == null";
2868 goto exit;
2869 }
2870 if (offset < 0) {
2871 _exception = 1;
2872 _exceptionType = "java/lang/IllegalArgumentException";
2873 _exceptionMessage = "offset < 0";
2874 goto exit;
2875 }
2876 _remaining = _env->GetArrayLength(value_ref) - offset;
2877 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002878 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002879 value = value_base + offset;
2880
2881 glProgramUniformMatrix2x4fv(
2882 (GLuint)program,
2883 (GLint)location,
2884 (GLsizei)count,
2885 (GLboolean)transpose,
2886 (GLfloat *)value
2887 );
2888
2889exit:
2890 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002891 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002892 JNI_ABORT);
2893 }
2894 if (_exception) {
2895 jniThrowException(_env, _exceptionType, _exceptionMessage);
2896 }
2897}
2898
2899/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2900static void
2901android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2
2902 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002903 jint _exception = 0;
2904 const char * _exceptionType = NULL;
2905 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002906 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002907 jint _bufferOffset = (jint) 0;
2908 jint _remaining;
2909 GLfloat *value = (GLfloat *) 0;
2910
Romain Guy84cac202016-12-05 12:26:02 -08002911 if (!value_buf) {
2912 _exception = 1;
2913 _exceptionType = "java/lang/IllegalArgumentException";
2914 _exceptionMessage = "value == null";
2915 goto exit;
2916 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002917 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002918 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002919 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002920 value = (GLfloat *) (_valueBase + _bufferOffset);
2921 }
2922 glProgramUniformMatrix2x4fv(
2923 (GLuint)program,
2924 (GLint)location,
2925 (GLsizei)count,
2926 (GLboolean)transpose,
2927 (GLfloat *)value
2928 );
Romain Guy84cac202016-12-05 12:26:02 -08002929
2930exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002931 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002932 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002933 }
Romain Guy84cac202016-12-05 12:26:02 -08002934 if (_exception) {
2935 jniThrowException(_env, _exceptionType, _exceptionMessage);
2936 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002937}
2938
2939/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2940static void
2941android_glProgramUniformMatrix4x2fv__IIIZ_3FI
2942 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2943 jint _exception = 0;
2944 const char * _exceptionType = NULL;
2945 const char * _exceptionMessage = NULL;
2946 GLfloat *value_base = (GLfloat *) 0;
2947 jint _remaining;
2948 GLfloat *value = (GLfloat *) 0;
2949
2950 if (!value_ref) {
2951 _exception = 1;
2952 _exceptionType = "java/lang/IllegalArgumentException";
2953 _exceptionMessage = "value == null";
2954 goto exit;
2955 }
2956 if (offset < 0) {
2957 _exception = 1;
2958 _exceptionType = "java/lang/IllegalArgumentException";
2959 _exceptionMessage = "offset < 0";
2960 goto exit;
2961 }
2962 _remaining = _env->GetArrayLength(value_ref) - offset;
2963 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002964 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002965 value = value_base + offset;
2966
2967 glProgramUniformMatrix4x2fv(
2968 (GLuint)program,
2969 (GLint)location,
2970 (GLsizei)count,
2971 (GLboolean)transpose,
2972 (GLfloat *)value
2973 );
2974
2975exit:
2976 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002977 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002978 JNI_ABORT);
2979 }
2980 if (_exception) {
2981 jniThrowException(_env, _exceptionType, _exceptionMessage);
2982 }
2983}
2984
2985/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2986static void
2987android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2
2988 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002989 jint _exception = 0;
2990 const char * _exceptionType = NULL;
2991 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002992 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002993 jint _bufferOffset = (jint) 0;
2994 jint _remaining;
2995 GLfloat *value = (GLfloat *) 0;
2996
Romain Guy84cac202016-12-05 12:26:02 -08002997 if (!value_buf) {
2998 _exception = 1;
2999 _exceptionType = "java/lang/IllegalArgumentException";
3000 _exceptionMessage = "value == null";
3001 goto exit;
3002 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003003 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003004 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003005 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003006 value = (GLfloat *) (_valueBase + _bufferOffset);
3007 }
3008 glProgramUniformMatrix4x2fv(
3009 (GLuint)program,
3010 (GLint)location,
3011 (GLsizei)count,
3012 (GLboolean)transpose,
3013 (GLfloat *)value
3014 );
Romain Guy84cac202016-12-05 12:26:02 -08003015
3016exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003017 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003018 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003019 }
Romain Guy84cac202016-12-05 12:26:02 -08003020 if (_exception) {
3021 jniThrowException(_env, _exceptionType, _exceptionMessage);
3022 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003023}
3024
3025/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3026static void
3027android_glProgramUniformMatrix3x4fv__IIIZ_3FI
3028 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3029 jint _exception = 0;
3030 const char * _exceptionType = NULL;
3031 const char * _exceptionMessage = NULL;
3032 GLfloat *value_base = (GLfloat *) 0;
3033 jint _remaining;
3034 GLfloat *value = (GLfloat *) 0;
3035
3036 if (!value_ref) {
3037 _exception = 1;
3038 _exceptionType = "java/lang/IllegalArgumentException";
3039 _exceptionMessage = "value == null";
3040 goto exit;
3041 }
3042 if (offset < 0) {
3043 _exception = 1;
3044 _exceptionType = "java/lang/IllegalArgumentException";
3045 _exceptionMessage = "offset < 0";
3046 goto exit;
3047 }
3048 _remaining = _env->GetArrayLength(value_ref) - offset;
3049 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003050 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003051 value = value_base + offset;
3052
3053 glProgramUniformMatrix3x4fv(
3054 (GLuint)program,
3055 (GLint)location,
3056 (GLsizei)count,
3057 (GLboolean)transpose,
3058 (GLfloat *)value
3059 );
3060
3061exit:
3062 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003063 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003064 JNI_ABORT);
3065 }
3066 if (_exception) {
3067 jniThrowException(_env, _exceptionType, _exceptionMessage);
3068 }
3069}
3070
3071/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3072static void
3073android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2
3074 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003075 jint _exception = 0;
3076 const char * _exceptionType = NULL;
3077 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003078 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003079 jint _bufferOffset = (jint) 0;
3080 jint _remaining;
3081 GLfloat *value = (GLfloat *) 0;
3082
Romain Guy84cac202016-12-05 12:26:02 -08003083 if (!value_buf) {
3084 _exception = 1;
3085 _exceptionType = "java/lang/IllegalArgumentException";
3086 _exceptionMessage = "value == null";
3087 goto exit;
3088 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003089 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003090 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003091 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003092 value = (GLfloat *) (_valueBase + _bufferOffset);
3093 }
3094 glProgramUniformMatrix3x4fv(
3095 (GLuint)program,
3096 (GLint)location,
3097 (GLsizei)count,
3098 (GLboolean)transpose,
3099 (GLfloat *)value
3100 );
Romain Guy84cac202016-12-05 12:26:02 -08003101
3102exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003103 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003104 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003105 }
Romain Guy84cac202016-12-05 12:26:02 -08003106 if (_exception) {
3107 jniThrowException(_env, _exceptionType, _exceptionMessage);
3108 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003109}
3110
3111/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3112static void
3113android_glProgramUniformMatrix4x3fv__IIIZ_3FI
3114 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3115 jint _exception = 0;
3116 const char * _exceptionType = NULL;
3117 const char * _exceptionMessage = NULL;
3118 GLfloat *value_base = (GLfloat *) 0;
3119 jint _remaining;
3120 GLfloat *value = (GLfloat *) 0;
3121
3122 if (!value_ref) {
3123 _exception = 1;
3124 _exceptionType = "java/lang/IllegalArgumentException";
3125 _exceptionMessage = "value == null";
3126 goto exit;
3127 }
3128 if (offset < 0) {
3129 _exception = 1;
3130 _exceptionType = "java/lang/IllegalArgumentException";
3131 _exceptionMessage = "offset < 0";
3132 goto exit;
3133 }
3134 _remaining = _env->GetArrayLength(value_ref) - offset;
3135 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003136 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003137 value = value_base + offset;
3138
3139 glProgramUniformMatrix4x3fv(
3140 (GLuint)program,
3141 (GLint)location,
3142 (GLsizei)count,
3143 (GLboolean)transpose,
3144 (GLfloat *)value
3145 );
3146
3147exit:
3148 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003149 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003150 JNI_ABORT);
3151 }
3152 if (_exception) {
3153 jniThrowException(_env, _exceptionType, _exceptionMessage);
3154 }
3155}
3156
3157/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3158static void
3159android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2
3160 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003161 jint _exception = 0;
3162 const char * _exceptionType = NULL;
3163 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003164 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003165 jint _bufferOffset = (jint) 0;
3166 jint _remaining;
3167 GLfloat *value = (GLfloat *) 0;
3168
Romain Guy84cac202016-12-05 12:26:02 -08003169 if (!value_buf) {
3170 _exception = 1;
3171 _exceptionType = "java/lang/IllegalArgumentException";
3172 _exceptionMessage = "value == null";
3173 goto exit;
3174 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003175 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003176 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003177 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003178 value = (GLfloat *) (_valueBase + _bufferOffset);
3179 }
3180 glProgramUniformMatrix4x3fv(
3181 (GLuint)program,
3182 (GLint)location,
3183 (GLsizei)count,
3184 (GLboolean)transpose,
3185 (GLfloat *)value
3186 );
Romain Guy84cac202016-12-05 12:26:02 -08003187
3188exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003189 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003190 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003191 }
Romain Guy84cac202016-12-05 12:26:02 -08003192 if (_exception) {
3193 jniThrowException(_env, _exceptionType, _exceptionMessage);
3194 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003195}
3196
3197/* void glValidateProgramPipeline ( GLuint pipeline ) */
3198static void
3199android_glValidateProgramPipeline__I
3200 (JNIEnv *_env, jobject _this, jint pipeline) {
3201 glValidateProgramPipeline(
3202 (GLuint)pipeline
3203 );
3204}
3205
3206#include <stdlib.h>
3207
3208/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
3209static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
3210 GLint infoLen = 0;
3211 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
3212 if (!infoLen) {
3213 return _env->NewStringUTF("");
3214 }
3215 char* buf = (char*) malloc(infoLen);
3216 if (buf == NULL) {
3217 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
3218 return NULL;
3219 }
3220 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
3221 jstring result = _env->NewStringUTF(buf);
3222 free(buf);
3223 return result;
3224}
3225/* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */
3226static void
3227android_glBindImageTexture__IIIZIII
3228 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) {
3229 glBindImageTexture(
3230 (GLuint)unit,
3231 (GLuint)texture,
3232 (GLint)level,
3233 (GLboolean)layered,
3234 (GLint)layer,
3235 (GLenum)access,
3236 (GLenum)format
3237 );
3238}
3239
3240/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3241static void
3242android_glGetBooleani_v__II_3ZI
3243 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) {
3244 jint _exception = 0;
3245 const char * _exceptionType = NULL;
3246 const char * _exceptionMessage = NULL;
3247 GLboolean *data_base = (GLboolean *) 0;
3248 jint _remaining;
3249 GLboolean *data = (GLboolean *) 0;
3250
3251 if (!data_ref) {
3252 _exception = 1;
3253 _exceptionType = "java/lang/IllegalArgumentException";
3254 _exceptionMessage = "data == null";
3255 goto exit;
3256 }
3257 if (offset < 0) {
3258 _exception = 1;
3259 _exceptionType = "java/lang/IllegalArgumentException";
3260 _exceptionMessage = "offset < 0";
3261 goto exit;
3262 }
3263 _remaining = _env->GetArrayLength(data_ref) - offset;
3264 data_base = (GLboolean *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003265 _env->GetBooleanArrayElements(data_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003266 data = data_base + offset;
3267
3268 glGetBooleani_v(
3269 (GLenum)target,
3270 (GLuint)index,
3271 (GLboolean *)data
3272 );
3273
3274exit:
3275 if (data_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003276 _env->ReleaseBooleanArrayElements(data_ref, (jboolean*)data_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003277 _exception ? JNI_ABORT: 0);
3278 }
3279 if (_exception) {
3280 jniThrowException(_env, _exceptionType, _exceptionMessage);
3281 }
3282}
3283
3284/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3285static void
3286android_glGetBooleani_v__IILjava_nio_IntBuffer_2
3287 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003288 jint _exception = 0;
3289 const char * _exceptionType = NULL;
3290 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003291 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003292 jint _bufferOffset = (jint) 0;
3293 jint _remaining;
3294 GLboolean *data = (GLboolean *) 0;
3295
Romain Guy84cac202016-12-05 12:26:02 -08003296 if (!data_buf) {
3297 _exception = 1;
3298 _exceptionType = "java/lang/IllegalArgumentException";
3299 _exceptionMessage = "data == null";
3300 goto exit;
3301 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003302 data = (GLboolean *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003303 if (data == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003304 char * _dataBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003305 data = (GLboolean *) (_dataBase + _bufferOffset);
3306 }
3307 glGetBooleani_v(
3308 (GLenum)target,
3309 (GLuint)index,
3310 (GLboolean *)data
3311 );
Romain Guy84cac202016-12-05 12:26:02 -08003312
3313exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003314 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003315 _env->ReleaseIntArrayElements(_array, (jint*)data, _exception ? JNI_ABORT : 0);
3316 }
3317 if (_exception) {
3318 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003319 }
3320}
3321
3322/* void glMemoryBarrier ( GLbitfield barriers ) */
3323static void
3324android_glMemoryBarrier__I
3325 (JNIEnv *_env, jobject _this, jint barriers) {
3326 glMemoryBarrier(
3327 (GLbitfield)barriers
3328 );
3329}
3330
3331/* void glMemoryBarrierByRegion ( GLbitfield barriers ) */
3332static void
3333android_glMemoryBarrierByRegion__I
3334 (JNIEnv *_env, jobject _this, jint barriers) {
3335 glMemoryBarrierByRegion(
3336 (GLbitfield)barriers
3337 );
3338}
3339
3340/* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */
3341static void
3342android_glTexStorage2DMultisample__IIIIIZ
3343 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) {
3344 glTexStorage2DMultisample(
3345 (GLenum)target,
3346 (GLsizei)samples,
3347 (GLenum)internalformat,
3348 (GLsizei)width,
3349 (GLsizei)height,
3350 (GLboolean)fixedsamplelocations
3351 );
3352}
3353
3354/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3355static void
3356android_glGetMultisamplefv__II_3FI
3357 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) {
3358 jint _exception = 0;
3359 const char * _exceptionType = NULL;
3360 const char * _exceptionMessage = NULL;
3361 GLfloat *val_base = (GLfloat *) 0;
3362 jint _remaining;
3363 GLfloat *val = (GLfloat *) 0;
3364
3365 if (!val_ref) {
3366 _exception = 1;
3367 _exceptionType = "java/lang/IllegalArgumentException";
3368 _exceptionMessage = "val == null";
3369 goto exit;
3370 }
3371 if (offset < 0) {
3372 _exception = 1;
3373 _exceptionType = "java/lang/IllegalArgumentException";
3374 _exceptionMessage = "offset < 0";
3375 goto exit;
3376 }
3377 _remaining = _env->GetArrayLength(val_ref) - offset;
3378 val_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003379 _env->GetFloatArrayElements(val_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003380 val = val_base + offset;
3381
3382 glGetMultisamplefv(
3383 (GLenum)pname,
3384 (GLuint)index,
3385 (GLfloat *)val
3386 );
3387
3388exit:
3389 if (val_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003390 _env->ReleaseFloatArrayElements(val_ref, (jfloat*)val_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003391 _exception ? JNI_ABORT: 0);
3392 }
3393 if (_exception) {
3394 jniThrowException(_env, _exceptionType, _exceptionMessage);
3395 }
3396}
3397
3398/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3399static void
3400android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2
3401 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003402 jint _exception = 0;
3403 const char * _exceptionType = NULL;
3404 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003405 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003406 jint _bufferOffset = (jint) 0;
3407 jint _remaining;
3408 GLfloat *val = (GLfloat *) 0;
3409
Romain Guy84cac202016-12-05 12:26:02 -08003410 if (!val_buf) {
3411 _exception = 1;
3412 _exceptionType = "java/lang/IllegalArgumentException";
3413 _exceptionMessage = "val == null";
3414 goto exit;
3415 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003416 val = (GLfloat *)getPointer(_env, val_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003417 if (val == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003418 char * _valBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003419 val = (GLfloat *) (_valBase + _bufferOffset);
3420 }
3421 glGetMultisamplefv(
3422 (GLenum)pname,
3423 (GLuint)index,
3424 (GLfloat *)val
3425 );
Romain Guy84cac202016-12-05 12:26:02 -08003426
3427exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003428 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003429 _env->ReleaseFloatArrayElements(_array, (jfloat*)val, _exception ? JNI_ABORT : 0);
3430 }
3431 if (_exception) {
3432 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003433 }
3434}
3435
3436/* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */
3437static void
3438android_glSampleMaski__II
3439 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) {
3440 glSampleMaski(
3441 (GLuint)maskNumber,
3442 (GLbitfield)mask
3443 );
3444}
3445
3446/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3447static void
3448android_glGetTexLevelParameteriv__III_3II
3449 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) {
3450 jint _exception = 0;
3451 const char * _exceptionType = NULL;
3452 const char * _exceptionMessage = NULL;
3453 GLint *params_base = (GLint *) 0;
3454 jint _remaining;
3455 GLint *params = (GLint *) 0;
3456
3457 if (!params_ref) {
3458 _exception = 1;
3459 _exceptionType = "java/lang/IllegalArgumentException";
3460 _exceptionMessage = "params == null";
3461 goto exit;
3462 }
3463 if (offset < 0) {
3464 _exception = 1;
3465 _exceptionType = "java/lang/IllegalArgumentException";
3466 _exceptionMessage = "offset < 0";
3467 goto exit;
3468 }
3469 _remaining = _env->GetArrayLength(params_ref) - offset;
3470 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003471 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003472 params = params_base + offset;
3473
3474 glGetTexLevelParameteriv(
3475 (GLenum)target,
3476 (GLint)level,
3477 (GLenum)pname,
3478 (GLint *)params
3479 );
3480
3481exit:
3482 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003483 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003484 _exception ? JNI_ABORT: 0);
3485 }
3486 if (_exception) {
3487 jniThrowException(_env, _exceptionType, _exceptionMessage);
3488 }
3489}
3490
3491/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3492static void
3493android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2
3494 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003495 jint _exception = 0;
3496 const char * _exceptionType = NULL;
3497 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003498 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003499 jint _bufferOffset = (jint) 0;
3500 jint _remaining;
3501 GLint *params = (GLint *) 0;
3502
Romain Guy84cac202016-12-05 12:26:02 -08003503 if (!params_buf) {
3504 _exception = 1;
3505 _exceptionType = "java/lang/IllegalArgumentException";
3506 _exceptionMessage = "params == null";
3507 goto exit;
3508 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003509 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003510 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003511 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003512 params = (GLint *) (_paramsBase + _bufferOffset);
3513 }
3514 glGetTexLevelParameteriv(
3515 (GLenum)target,
3516 (GLint)level,
3517 (GLenum)pname,
3518 (GLint *)params
3519 );
Romain Guy84cac202016-12-05 12:26:02 -08003520
3521exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003522 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003523 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3524 }
3525 if (_exception) {
3526 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003527 }
3528}
3529
3530/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3531static void
3532android_glGetTexLevelParameterfv__III_3FI
3533 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) {
3534 jint _exception = 0;
3535 const char * _exceptionType = NULL;
3536 const char * _exceptionMessage = NULL;
3537 GLfloat *params_base = (GLfloat *) 0;
3538 jint _remaining;
3539 GLfloat *params = (GLfloat *) 0;
3540
3541 if (!params_ref) {
3542 _exception = 1;
3543 _exceptionType = "java/lang/IllegalArgumentException";
3544 _exceptionMessage = "params == null";
3545 goto exit;
3546 }
3547 if (offset < 0) {
3548 _exception = 1;
3549 _exceptionType = "java/lang/IllegalArgumentException";
3550 _exceptionMessage = "offset < 0";
3551 goto exit;
3552 }
3553 _remaining = _env->GetArrayLength(params_ref) - offset;
3554 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003555 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003556 params = params_base + offset;
3557
3558 glGetTexLevelParameterfv(
3559 (GLenum)target,
3560 (GLint)level,
3561 (GLenum)pname,
3562 (GLfloat *)params
3563 );
3564
3565exit:
3566 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003567 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003568 _exception ? JNI_ABORT: 0);
3569 }
3570 if (_exception) {
3571 jniThrowException(_env, _exceptionType, _exceptionMessage);
3572 }
3573}
3574
3575/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3576static void
3577android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2
3578 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003579 jint _exception = 0;
3580 const char * _exceptionType = NULL;
3581 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003582 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003583 jint _bufferOffset = (jint) 0;
3584 jint _remaining;
3585 GLfloat *params = (GLfloat *) 0;
3586
Romain Guy84cac202016-12-05 12:26:02 -08003587 if (!params_buf) {
3588 _exception = 1;
3589 _exceptionType = "java/lang/IllegalArgumentException";
3590 _exceptionMessage = "params == null";
3591 goto exit;
3592 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003593 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003594 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003595 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003596 params = (GLfloat *) (_paramsBase + _bufferOffset);
3597 }
3598 glGetTexLevelParameterfv(
3599 (GLenum)target,
3600 (GLint)level,
3601 (GLenum)pname,
3602 (GLfloat *)params
3603 );
Romain Guy84cac202016-12-05 12:26:02 -08003604
3605exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003606 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003607 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3608 }
3609 if (_exception) {
3610 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003611 }
3612}
3613
3614/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
3615static void
3616android_glBindVertexBuffer__IIJI
3617 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
3618 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
3619 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
3620 return;
3621 }
3622 glBindVertexBuffer(
3623 (GLuint)bindingindex,
3624 (GLuint)buffer,
3625 (GLintptr)offset,
3626 (GLsizei)stride
3627 );
3628}
3629/* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */
3630static void
3631android_glVertexAttribFormat__IIIZI
3632 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) {
3633 glVertexAttribFormat(
3634 (GLuint)attribindex,
3635 (GLint)size,
3636 (GLenum)type,
3637 (GLboolean)normalized,
3638 (GLuint)relativeoffset
3639 );
3640}
3641
3642/* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */
3643static void
3644android_glVertexAttribIFormat__IIII
3645 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) {
3646 glVertexAttribIFormat(
3647 (GLuint)attribindex,
3648 (GLint)size,
3649 (GLenum)type,
3650 (GLuint)relativeoffset
3651 );
3652}
3653
3654/* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */
3655static void
3656android_glVertexAttribBinding__II
3657 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) {
3658 glVertexAttribBinding(
3659 (GLuint)attribindex,
3660 (GLuint)bindingindex
3661 );
3662}
3663
3664/* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */
3665static void
3666android_glVertexBindingDivisor__II
3667 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) {
3668 glVertexBindingDivisor(
3669 (GLuint)bindingindex,
3670 (GLuint)divisor
3671 );
3672}
3673
3674static const char *classPathName = "android/opengl/GLES31";
3675
Daniel Micay76f6a862015-09-19 17:31:01 -04003676static const JNINativeMethod methods[] = {
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003677{"_nativeClassInit", "()V", (void*)nativeClassInit },
3678{"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III },
3679{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
3680{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
3681{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
3682{"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III },
3683{"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II },
3684{"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 },
3685{"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II },
3686{"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 },
3687{"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 },
3688{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
3689{"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II },
3690{"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
3691{"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 },
3692{"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III },
3693{"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II },
3694{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
3695{"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I },
3696{"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II },
3697{"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 },
3698{"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II },
3699{"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 },
3700{"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I },
3701{"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II },
3702{"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 },
3703{"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III },
3704{"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII },
3705{"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII },
3706{"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII },
3707{"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III },
3708{"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII },
3709{"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII },
3710{"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII },
3711{"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF },
3712{"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF },
3713{"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF },
3714{"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF },
3715{"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II },
3716{"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 },
3717{"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II },
3718{"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 },
3719{"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II },
3720{"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 },
3721{"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II },
3722{"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 },
3723{"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II },
3724{"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 },
3725{"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II },
3726{"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 },
3727{"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II },
3728{"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 },
3729{"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II },
3730{"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 },
3731{"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI },
3732{"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 },
3733{"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI },
3734{"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 },
3735{"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI },
3736{"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 },
3737{"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI },
3738{"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 },
3739{"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI },
3740{"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 },
3741{"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI },
3742{"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 },
3743{"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI },
3744{"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 },
3745{"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI },
3746{"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 },
3747{"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI },
3748{"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 },
3749{"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI },
3750{"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 },
3751{"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI },
3752{"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 },
3753{"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI },
3754{"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 },
3755{"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI },
3756{"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 },
3757{"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I },
3758{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
3759{"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII },
3760{"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI },
3761{"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 },
3762{"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I },
3763{"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I },
3764{"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ },
3765{"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI },
3766{"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 },
3767{"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II },
3768{"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II },
3769{"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 },
3770{"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI },
3771{"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 },
3772{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
3773{"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI },
3774{"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII },
3775{"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II },
3776{"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II },
3777};
3778
3779int register_android_opengl_jni_GLES31(JNIEnv *_env)
3780{
3781 int err;
3782 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3783 return err;
3784}