blob: 456da93784d589b14cc96e787497b01296292082 [file] [log] [blame]
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001/*
2 * Copyright 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// This source file is automatically generated
18
Andreas Gampebfe63332014-11-12 14:12:45 -080019#pragma GCC diagnostic ignored "-Wunused-variable"
Andreas Gampebfe63332014-11-12 14:12:45 -080020#pragma GCC diagnostic ignored "-Wunused-function"
21
Jesse Hall7ab63ac2014-05-19 15:13:41 -070022#include <stdint.h>
23#include <GLES3/gl31.h>
Jesse Hall9626f822014-05-19 20:57:49 -070024#include <jni.h>
Steven Moreland2279b252017-07-19 09:50:45 -070025#include <nativehelper/JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070026#include <android_runtime/AndroidRuntime.h>
27#include <utils/misc.h>
28#include <assert.h>
29
Jesse Hall7ab63ac2014-05-19 15:13:41 -070030
31/* special calls implemented in Android's GLES wrapper used to more
32 * efficiently bound-check passed arrays */
33extern "C" {
34#ifdef GL_VERSION_ES_CM_1_1
35GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
36 const GLvoid *ptr, GLsizei count);
37GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
38 const GLvoid *pointer, GLsizei count);
39GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
40 GLsizei stride, const GLvoid *pointer, GLsizei count);
41GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
42 GLsizei stride, const GLvoid *pointer, GLsizei count);
43GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
44 GLsizei stride, const GLvoid *pointer, GLsizei count);
45GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
46 GLsizei stride, const GLvoid *pointer, GLsizei count);
47GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
48 GLsizei stride, const GLvoid *pointer, GLsizei count);
49#endif
50#ifdef GL_ES_VERSION_2_0
51static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
52 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
53 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
54}
55#endif
56#ifdef GL_ES_VERSION_3_0
57static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count) {
59 glVertexAttribIPointer(indx, size, type, stride, pointer);
60}
61#endif
62}
63
Jesse Hall7ab63ac2014-05-19 15:13:41 -070064static void
65nativeClassInit(JNIEnv *_env, jclass glImplClass)
66{
Jesse Hall7ab63ac2014-05-19 15:13:41 -070067}
68
69static void *
70getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
71{
72 jint position;
73 jint limit;
74 jint elementSizeShift;
75 jlong pointer;
76
Orion Hodson617835922019-02-28 15:15:34 +000077 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
Jesse Hall7ab63ac2014-05-19 15:13:41 -070078 *remaining = (limit - position) << elementSizeShift;
Jesse Hall7ab63ac2014-05-19 15:13:41 -070079 if (pointer != 0L) {
Orion Hodson617835922019-02-28 15:15:34 +000080 *array = nullptr;
81 pointer += position << elementSizeShift;
Jesse Hall7ab63ac2014-05-19 15:13:41 -070082 return reinterpret_cast<void*>(pointer);
83 }
84
Orion Hodson617835922019-02-28 15:15:34 +000085 *array = jniGetNioBufferBaseArray(_env, buffer);
86 *offset = jniGetNioBufferBaseArrayOffset(_env, buffer);
87 return nullptr;
Jesse Hall7ab63ac2014-05-19 15:13:41 -070088}
89
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -070090class ByteArrayGetter {
91public:
92 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
93 return _env->GetByteArrayElements(array, is_copy);
94 }
95};
96class BooleanArrayGetter {
97public:
98 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
99 return _env->GetBooleanArrayElements(array, is_copy);
100 }
101};
102class CharArrayGetter {
103public:
104 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
105 return _env->GetCharArrayElements(array, is_copy);
106 }
107};
108class ShortArrayGetter {
109public:
110 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
111 return _env->GetShortArrayElements(array, is_copy);
112 }
113};
114class IntArrayGetter {
115public:
116 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
117 return _env->GetIntArrayElements(array, is_copy);
118 }
119};
120class LongArrayGetter {
121public:
122 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
123 return _env->GetLongArrayElements(array, is_copy);
124 }
125};
126class FloatArrayGetter {
127public:
128 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
129 return _env->GetFloatArrayElements(array, is_copy);
130 }
131};
132class DoubleArrayGetter {
133public:
134 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
135 return _env->GetDoubleArrayElements(array, is_copy);
136 }
137};
138
139template<typename JTYPEARRAY, typename ARRAYGETTER>
140static void*
141getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
142 return ARRAYGETTER::Get(_env, array, is_copy);
143}
144
145class ByteArrayReleaser {
146public:
147 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
148 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
149 }
150};
151class BooleanArrayReleaser {
152public:
153 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
154 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
155 }
156};
157class CharArrayReleaser {
158public:
159 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
160 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
161 }
162};
163class ShortArrayReleaser {
164public:
165 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
166 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
167 }
168};
169class IntArrayReleaser {
170public:
171 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
172 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
173 }
174};
175class LongArrayReleaser {
176public:
177 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
178 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
179 }
180};
181class FloatArrayReleaser {
182public:
183 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
184 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
185 }
186};
187class DoubleArrayReleaser {
188public:
189 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
190 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
191 }
192};
193
194template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
195static void
196releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
197 ARRAYRELEASER::Release(_env, array, data, commit);
198}
199
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700200static void
201releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
202{
203 _env->ReleasePrimitiveArrayCritical(array, data,
204 commit ? 0 : JNI_ABORT);
205}
206
207static void *
208getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
Orion Hodson617835922019-02-28 15:15:34 +0000209 jint position;
210 jint limit;
211 jint elementSizeShift;
212 jlong pointer;
213 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
214 if (pointer == 0) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700215 jniThrowException(_env, "java/lang/IllegalArgumentException",
216 "Must use a native order direct Buffer");
Orion Hodson617835922019-02-28 15:15:34 +0000217 return nullptr;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700218 }
Orion Hodson617835922019-02-28 15:15:34 +0000219 pointer += position << elementSizeShift;
220 return reinterpret_cast<void*>(pointer);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700221}
222
223// --------------------------------------------------------------------------
224
225/*
226 * returns the number of values glGet returns for a given pname.
227 *
228 * The code below is written such that pnames requiring only one values
229 * are the default (and are not explicitely tested for). This makes the
230 * checking code much shorter/readable/efficient.
231 *
232 * This means that unknown pnames (e.g.: extensions) will default to 1. If
233 * that unknown pname needs more than 1 value, then the validation check
234 * is incomplete and the app may crash if it passed the wrong number params.
235 */
236static int getNeededCount(GLint pname) {
237 int needed = 1;
Romain Guydc43a6c2017-02-17 19:54:25 -0800238#ifdef GL_ES_VERSION_3_0
239 // GLES 3.x pnames
240 switch (pname) {
241 case GL_MAX_VIEWPORT_DIMS:
242 needed = 2;
243 break;
244
245 case GL_PROGRAM_BINARY_FORMATS:
246 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
247 break;
248 }
249#endif
250
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700251#ifdef GL_ES_VERSION_2_0
252 // GLES 2.x pnames
253 switch (pname) {
254 case GL_ALIASED_LINE_WIDTH_RANGE:
255 case GL_ALIASED_POINT_SIZE_RANGE:
256 needed = 2;
257 break;
258
259 case GL_BLEND_COLOR:
260 case GL_COLOR_CLEAR_VALUE:
261 case GL_COLOR_WRITEMASK:
262 case GL_SCISSOR_BOX:
263 case GL_VIEWPORT:
264 needed = 4;
265 break;
266
267 case GL_COMPRESSED_TEXTURE_FORMATS:
268 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
269 break;
270
271 case GL_SHADER_BINARY_FORMATS:
272 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
273 break;
274 }
275#endif
276
277#ifdef GL_VERSION_ES_CM_1_1
278 // GLES 1.x pnames
279 switch (pname) {
280 case GL_ALIASED_LINE_WIDTH_RANGE:
281 case GL_ALIASED_POINT_SIZE_RANGE:
282 case GL_DEPTH_RANGE:
283 case GL_SMOOTH_LINE_WIDTH_RANGE:
284 case GL_SMOOTH_POINT_SIZE_RANGE:
285 needed = 2;
286 break;
287
288 case GL_CURRENT_NORMAL:
289 case GL_POINT_DISTANCE_ATTENUATION:
290 needed = 3;
291 break;
292
293 case GL_COLOR_CLEAR_VALUE:
294 case GL_COLOR_WRITEMASK:
295 case GL_CURRENT_COLOR:
296 case GL_CURRENT_TEXTURE_COORDS:
297 case GL_FOG_COLOR:
298 case GL_LIGHT_MODEL_AMBIENT:
299 case GL_SCISSOR_BOX:
300 case GL_VIEWPORT:
301 needed = 4;
302 break;
303
304 case GL_MODELVIEW_MATRIX:
305 case GL_PROJECTION_MATRIX:
306 case GL_TEXTURE_MATRIX:
307 needed = 16;
308 break;
309
310 case GL_COMPRESSED_TEXTURE_FORMATS:
311 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
312 break;
313 }
314#endif
315 return needed;
316}
317
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700318template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
319 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700320static void
321get
322 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
323 jint _exception = 0;
324 const char * _exceptionType;
325 const char * _exceptionMessage;
326 CTYPE *params_base = (CTYPE *) 0;
327 jint _remaining;
328 CTYPE *params = (CTYPE *) 0;
329 int _needed = 0;
330
331 if (!params_ref) {
332 _exception = 1;
333 _exceptionType = "java/lang/IllegalArgumentException";
334 _exceptionMessage = "params == null";
335 goto exit;
336 }
337 if (offset < 0) {
338 _exception = 1;
339 _exceptionType = "java/lang/IllegalArgumentException";
340 _exceptionMessage = "offset < 0";
341 goto exit;
342 }
343 _remaining = _env->GetArrayLength(params_ref) - offset;
344 _needed = getNeededCount(pname);
345 // if we didn't find this pname, we just assume the user passed
346 // an array of the right size -- this might happen with extensions
347 // or if we forget an enum here.
348 if (_remaining < _needed) {
349 _exception = 1;
350 _exceptionType = "java/lang/IllegalArgumentException";
351 _exceptionMessage = "length - offset < needed";
352 goto exit;
353 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700354 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
355 _env, params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700356 params = params_base + offset;
357
358 GET(
359 (GLenum)pname,
360 (CTYPE *)params
361 );
362
363exit:
364 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700365 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
366 _env, params_ref, params_base, !_exception);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700367 }
368 if (_exception) {
369 jniThrowException(_env, _exceptionType, _exceptionMessage);
370 }
371}
372
373
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700374template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
375 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700376static void
377getarray
378 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
379 jint _exception = 0;
380 const char * _exceptionType;
381 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700382 JTYPEARRAY _array = (JTYPEARRAY) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700383 jint _bufferOffset = (jint) 0;
384 jint _remaining;
385 CTYPE *params = (CTYPE *) 0;
386 int _needed = 0;
387
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700388 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700389 _remaining /= sizeof(CTYPE); // convert from bytes to item count
390 _needed = getNeededCount(pname);
391 // if we didn't find this pname, we just assume the user passed
392 // an array of the right size -- this might happen with extensions
393 // or if we forget an enum here.
394 if (_needed>0 && _remaining < _needed) {
395 _exception = 1;
396 _exceptionType = "java/lang/IllegalArgumentException";
397 _exceptionMessage = "remaining() < needed";
398 goto exit;
399 }
400 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700401 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
402 _env, _array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700403 params = (CTYPE *) (_paramsBase + _bufferOffset);
404 }
405 GET(
406 (GLenum)pname,
407 (CTYPE *)params
408 );
409
410exit:
411 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700412 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
413 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700414 }
415 if (_exception) {
416 jniThrowException(_env, _exceptionType, _exceptionMessage);
417 }
418}
419
420// --------------------------------------------------------------------------
421/* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */
422static void
423android_glDispatchCompute__III
424 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) {
425 glDispatchCompute(
426 (GLuint)num_groups_x,
427 (GLuint)num_groups_y,
428 (GLuint)num_groups_z
429 );
430}
431
432/* void glDispatchComputeIndirect ( GLintptr indirect ) */
433static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
434 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
435 // Here we only need to check for successful 64-bit to 32-bit conversion.
436 // - jlong is a int64_t (jni.h)
437 // - GLintptr is a long (khrplatform.h)
438 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
439 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
440 return;
441 }
442 glDispatchComputeIndirect((GLintptr)indirect);
443}
444
445/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
446static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
447 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
448 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
449 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800450 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700451 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
452 return;
453 }
454 glDrawArraysIndirect(mode, (const void*)indirect);
455}
456
457/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
458static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
459 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
460 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
461 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800462 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700463 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
464 return;
465 }
466 glDrawElementsIndirect(mode, type, (const void*)indirect);
467}
468
469/* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */
470static void
471android_glFramebufferParameteri__III
472 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
473 glFramebufferParameteri(
474 (GLenum)target,
475 (GLenum)pname,
476 (GLint)param
477 );
478}
479
480/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
481static void
482android_glGetFramebufferParameteriv__II_3II
483 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
484 jint _exception = 0;
485 const char * _exceptionType = NULL;
486 const char * _exceptionMessage = NULL;
487 GLint *params_base = (GLint *) 0;
488 jint _remaining;
489 GLint *params = (GLint *) 0;
490
491 if (!params_ref) {
492 _exception = 1;
493 _exceptionType = "java/lang/IllegalArgumentException";
494 _exceptionMessage = "params == null";
495 goto exit;
496 }
497 if (offset < 0) {
498 _exception = 1;
499 _exceptionType = "java/lang/IllegalArgumentException";
500 _exceptionMessage = "offset < 0";
501 goto exit;
502 }
503 _remaining = _env->GetArrayLength(params_ref) - offset;
504 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700505 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700506 params = params_base + offset;
507
508 glGetFramebufferParameteriv(
509 (GLenum)target,
510 (GLenum)pname,
511 (GLint *)params
512 );
513
514exit:
515 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700516 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700517 _exception ? JNI_ABORT: 0);
518 }
519 if (_exception) {
520 jniThrowException(_env, _exceptionType, _exceptionMessage);
521 }
522}
523
524/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
525static void
526android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2
527 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800528 jint _exception = 0;
529 const char * _exceptionType = NULL;
530 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700531 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700532 jint _bufferOffset = (jint) 0;
533 jint _remaining;
534 GLint *params = (GLint *) 0;
535
Romain Guy84cac202016-12-05 12:26:02 -0800536 if (!params_buf) {
537 _exception = 1;
538 _exceptionType = "java/lang/IllegalArgumentException";
539 _exceptionMessage = "params == null";
540 goto exit;
541 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700542 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700543 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700544 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700545 params = (GLint *) (_paramsBase + _bufferOffset);
546 }
547 glGetFramebufferParameteriv(
548 (GLenum)target,
549 (GLenum)pname,
550 (GLint *)params
551 );
Romain Guy84cac202016-12-05 12:26:02 -0800552
553exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700554 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800555 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
556 }
557 if (_exception) {
558 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700559 }
560}
561
562/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
563static void
564android_glGetProgramInterfaceiv__III_3II
565 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) {
566 jint _exception = 0;
567 const char * _exceptionType = NULL;
568 const char * _exceptionMessage = NULL;
569 GLint *params_base = (GLint *) 0;
570 jint _remaining;
571 GLint *params = (GLint *) 0;
572
573 if (!params_ref) {
574 _exception = 1;
575 _exceptionType = "java/lang/IllegalArgumentException";
576 _exceptionMessage = "params == null";
577 goto exit;
578 }
579 if (offset < 0) {
580 _exception = 1;
581 _exceptionType = "java/lang/IllegalArgumentException";
582 _exceptionMessage = "offset < 0";
583 goto exit;
584 }
585 _remaining = _env->GetArrayLength(params_ref) - offset;
586 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700587 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700588 params = params_base + offset;
589
590 glGetProgramInterfaceiv(
591 (GLuint)program,
592 (GLenum)programInterface,
593 (GLenum)pname,
594 (GLint *)params
595 );
596
597exit:
598 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700599 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700600 _exception ? JNI_ABORT: 0);
601 }
602 if (_exception) {
603 jniThrowException(_env, _exceptionType, _exceptionMessage);
604 }
605}
606
607/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
608static void
609android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2
610 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800611 jint _exception = 0;
612 const char * _exceptionType = NULL;
613 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700614 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700615 jint _bufferOffset = (jint) 0;
616 jint _remaining;
617 GLint *params = (GLint *) 0;
618
Romain Guy84cac202016-12-05 12:26:02 -0800619 if (!params_buf) {
620 _exception = 1;
621 _exceptionType = "java/lang/IllegalArgumentException";
622 _exceptionMessage = "params == null";
623 goto exit;
624 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700625 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700626 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700627 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700628 params = (GLint *) (_paramsBase + _bufferOffset);
629 }
630 glGetProgramInterfaceiv(
631 (GLuint)program,
632 (GLenum)programInterface,
633 (GLenum)pname,
634 (GLint *)params
635 );
Romain Guy84cac202016-12-05 12:26:02 -0800636
637exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700638 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800639 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
640 }
641 if (_exception) {
642 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700643 }
644}
645
646/* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */
647static jint
648android_glGetProgramResourceIndex__IILjava_lang_String_2
649 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
650 jint _exception = 0;
651 const char * _exceptionType = NULL;
652 const char * _exceptionMessage = NULL;
653 GLuint _returnValue = 0;
654 const char* _nativename = 0;
655
656 if (!name) {
657 _exception = 1;
658 _exceptionType = "java/lang/IllegalArgumentException";
659 _exceptionMessage = "name == null";
660 goto exit;
661 }
662 _nativename = _env->GetStringUTFChars(name, 0);
663
664 _returnValue = glGetProgramResourceIndex(
665 (GLuint)program,
666 (GLenum)programInterface,
667 (GLchar *)_nativename
668 );
669
670exit:
671 if (_nativename) {
672 _env->ReleaseStringUTFChars(name, _nativename);
673 }
674
675 if (_exception) {
676 jniThrowException(_env, _exceptionType, _exceptionMessage);
Orion Hodsonc240f222019-02-26 18:05:03 +0000677 return (jint)0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700678 }
679 return (jint)_returnValue;
680}
681
682/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
683static jstring
684android_glGetProgramResourceName
685 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
686 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
687 return NULL;
688}
689
690/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
691static void
692android_glGetProgramResourceiv__IIII_3III_3II_3II
693 (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) {
694 jint _exception = 0;
695 const char * _exceptionType = NULL;
696 const char * _exceptionMessage = NULL;
697 GLenum *props_base = (GLenum *) 0;
698 jint _propsRemaining;
699 GLenum *props = (GLenum *) 0;
700 GLsizei *length_base = (GLsizei *) 0;
701 jint _lengthRemaining;
702 GLsizei *length = (GLsizei *) 0;
703 GLint *params_base = (GLint *) 0;
704 jint _paramsRemaining;
705 GLint *params = (GLint *) 0;
706
707 if (!props_ref) {
708 _exception = 1;
709 _exceptionType = "java/lang/IllegalArgumentException";
710 _exceptionMessage = "props == null";
711 goto exit;
712 }
713 if (propsOffset < 0) {
714 _exception = 1;
715 _exceptionType = "java/lang/IllegalArgumentException";
716 _exceptionMessage = "propsOffset < 0";
717 goto exit;
718 }
719 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset;
720 props_base = (GLenum *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700721 _env->GetIntArrayElements(props_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700722 props = props_base + propsOffset;
723
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700724 if (length_ref) {
725 if (lengthOffset < 0) {
726 _exception = 1;
727 _exceptionType = "java/lang/IllegalArgumentException";
728 _exceptionMessage = "lengthOffset < 0";
729 goto exit;
730 }
731 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
732 length_base = (GLsizei *)
733 _env->GetIntArrayElements(length_ref, (jboolean *)0);
734 length = length_base + lengthOffset;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700735 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700736
737 if (!params_ref) {
738 _exception = 1;
739 _exceptionType = "java/lang/IllegalArgumentException";
740 _exceptionMessage = "params == null";
741 goto exit;
742 }
743 if (paramsOffset < 0) {
744 _exception = 1;
745 _exceptionType = "java/lang/IllegalArgumentException";
746 _exceptionMessage = "paramsOffset < 0";
747 goto exit;
748 }
749 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
750 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700751 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700752 params = params_base + paramsOffset;
753
754 glGetProgramResourceiv(
755 (GLuint)program,
756 (GLenum)programInterface,
757 (GLuint)index,
758 (GLsizei)propCount,
759 (GLenum *)props,
760 (GLsizei)bufSize,
761 (GLsizei *)length,
762 (GLint *)params
763 );
764
765exit:
766 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700767 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700768 _exception ? JNI_ABORT: 0);
769 }
770 if (length_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700771 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700772 _exception ? JNI_ABORT: 0);
773 }
774 if (props_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700775 _env->ReleaseIntArrayElements(props_ref, (jint*)props_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700776 JNI_ABORT);
777 }
778 if (_exception) {
779 jniThrowException(_env, _exceptionType, _exceptionMessage);
780 }
781}
782
783/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
784static void
785android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
786 (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 -0800787 jint _exception = 0;
788 const char * _exceptionType = NULL;
789 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700790 jintArray _propsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700791 jint _propsBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700792 jintArray _lengthArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700793 jint _lengthBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700794 jintArray _paramsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700795 jint _paramsBufferOffset = (jint) 0;
796 jint _propsRemaining;
797 GLenum *props = (GLenum *) 0;
798 jint _lengthRemaining;
799 GLsizei *length = (GLsizei *) 0;
800 jint _paramsRemaining;
801 GLint *params = (GLint *) 0;
802
Romain Guy84cac202016-12-05 12:26:02 -0800803 if (!props_buf) {
804 _exception = 1;
805 _exceptionType = "java/lang/IllegalArgumentException";
806 _exceptionMessage = "props == null";
807 goto exit;
808 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700809 props = (GLenum *)getPointer(_env, props_buf, (jarray*)&_propsArray, &_propsRemaining, &_propsBufferOffset);
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700810 if (length_buf) {
811 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
812 }
Romain Guy84cac202016-12-05 12:26:02 -0800813 if (!params_buf) {
814 _exception = 1;
815 _exceptionType = "java/lang/IllegalArgumentException";
816 _exceptionMessage = "params == null";
817 goto exit;
818 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700819 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700820 if (props == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700821 char * _propsBase = (char *)_env->GetIntArrayElements(_propsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700822 props = (GLenum *) (_propsBase + _propsBufferOffset);
823 }
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700824 if (length_buf && length == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700825 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700826 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
827 }
828 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700829 char * _paramsBase = (char *)_env->GetIntArrayElements(_paramsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700830 params = (GLint *) (_paramsBase + _paramsBufferOffset);
831 }
832 glGetProgramResourceiv(
833 (GLuint)program,
834 (GLenum)programInterface,
835 (GLuint)index,
836 (GLsizei)propCount,
837 (GLenum *)props,
838 (GLsizei)bufSize,
839 (GLsizei *)length,
840 (GLint *)params
841 );
Romain Guy84cac202016-12-05 12:26:02 -0800842
843exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700844 if (_paramsArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800845 _env->ReleaseIntArrayElements(_paramsArray, (jint*)params, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700846 }
847 if (_lengthArray) {
Romain Guy84cac202016-12-05 12:26:02 -0800848 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, _exception ? JNI_ABORT : 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700849 }
850 if (_propsArray) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700851 _env->ReleaseIntArrayElements(_propsArray, (jint*)props, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700852 }
Romain Guy84cac202016-12-05 12:26:02 -0800853 if (_exception) {
854 jniThrowException(_env, _exceptionType, _exceptionMessage);
855 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700856}
857
858/* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */
859static jint
860android_glGetProgramResourceLocation__IILjava_lang_String_2
861 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
862 jint _exception = 0;
863 const char * _exceptionType = NULL;
864 const char * _exceptionMessage = NULL;
865 GLint _returnValue = 0;
866 const char* _nativename = 0;
867
868 if (!name) {
869 _exception = 1;
870 _exceptionType = "java/lang/IllegalArgumentException";
871 _exceptionMessage = "name == null";
872 goto exit;
873 }
874 _nativename = _env->GetStringUTFChars(name, 0);
875
876 _returnValue = glGetProgramResourceLocation(
877 (GLuint)program,
878 (GLenum)programInterface,
879 (GLchar *)_nativename
880 );
881
882exit:
883 if (_nativename) {
884 _env->ReleaseStringUTFChars(name, _nativename);
885 }
886
887 if (_exception) {
888 jniThrowException(_env, _exceptionType, _exceptionMessage);
Orion Hodsonc240f222019-02-26 18:05:03 +0000889 return (jint)0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700890 }
891 return (jint)_returnValue;
892}
893
894/* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */
895static void
896android_glUseProgramStages__III
897 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) {
898 glUseProgramStages(
899 (GLuint)pipeline,
900 (GLbitfield)stages,
901 (GLuint)program
902 );
903}
904
905/* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */
906static void
907android_glActiveShaderProgram__II
908 (JNIEnv *_env, jobject _this, jint pipeline, jint program) {
909 glActiveShaderProgram(
910 (GLuint)pipeline,
911 (GLuint)program
912 );
913}
914
915/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
916static jint
917android_glCreateShaderProgramv
918 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800919 jint _exception = 0;
920 const char * _exceptionType = NULL;
921 const char * _exceptionMessage = NULL;
922 GLsizei _count;
923 const GLchar** _strings = NULL;
924 jstring* _jstrings = NULL;
925 GLuint _returnValue = 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700926
Pablo Ceballos7f16ec22016-01-28 20:04:23 -0800927 if (!strings) {
928 _exception = 1;
929 _exceptionType = "java/lang/IllegalArgumentException";
930 _exceptionMessage = "strings == null";
931 goto exit;
932 }
933
934 _count = _env->GetArrayLength(strings);
935
936 _strings = (const GLchar**) calloc(_count, sizeof(const GLchar*));
937 if (!_strings) {
938 _exception = 1;
939 _exceptionType = "java/lang/OutOfMemoryError";
940 _exceptionMessage = "out of memory";
941 goto exit;
942 }
943
944 _jstrings = (jstring*) calloc(_count, sizeof(jstring));
945 if (!_jstrings) {
946 _exception = 1;
947 _exceptionType = "java/lang/OutOfMemoryError";
948 _exceptionMessage = "out of memory";
949 goto exit;
950 }
951
952 for(int i = 0; i < _count; i++) {
953 _jstrings[i] = (jstring) _env->GetObjectArrayElement(strings, i);
954 if (!_jstrings[i]) {
955 _exception = 1;
956 _exceptionType = "java/lang/IllegalArgumentException";
957 _exceptionMessage = "strings == null";
958 goto exit;
959 }
960 _strings[i] = _env->GetStringUTFChars(_jstrings[i], 0);
961 }
962
963 _returnValue = glCreateShaderProgramv((GLenum)type, _count, _strings);
964exit:
965 if (_strings && _jstrings) {
966 for(int i = 0; i < _count; i++) {
967 if (_strings[i] && _jstrings[i]) {
968 _env->ReleaseStringUTFChars(_jstrings[i], _strings[i]);
969 }
970 }
971 }
972 if (_strings) {
973 free(_strings);
974 }
975 if (_jstrings) {
976 free(_jstrings);
977 }
978 if (_exception) {
979 jniThrowException(_env, _exceptionType, _exceptionMessage);
980 }
981 return (jint)_returnValue;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700982}
983/* void glBindProgramPipeline ( GLuint pipeline ) */
984static void
985android_glBindProgramPipeline__I
986 (JNIEnv *_env, jobject _this, jint pipeline) {
987 glBindProgramPipeline(
988 (GLuint)pipeline
989 );
990}
991
992/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
993static void
994android_glDeleteProgramPipelines__I_3II
995 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
996 jint _exception = 0;
997 const char * _exceptionType = NULL;
998 const char * _exceptionMessage = NULL;
999 GLuint *pipelines_base = (GLuint *) 0;
1000 jint _remaining;
1001 GLuint *pipelines = (GLuint *) 0;
1002
1003 if (!pipelines_ref) {
1004 _exception = 1;
1005 _exceptionType = "java/lang/IllegalArgumentException";
1006 _exceptionMessage = "pipelines == null";
1007 goto exit;
1008 }
1009 if (offset < 0) {
1010 _exception = 1;
1011 _exceptionType = "java/lang/IllegalArgumentException";
1012 _exceptionMessage = "offset < 0";
1013 goto exit;
1014 }
1015 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1016 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001017 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001018 pipelines = pipelines_base + offset;
1019
1020 glDeleteProgramPipelines(
1021 (GLsizei)n,
1022 (GLuint *)pipelines
1023 );
1024
1025exit:
1026 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001027 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001028 JNI_ABORT);
1029 }
1030 if (_exception) {
1031 jniThrowException(_env, _exceptionType, _exceptionMessage);
1032 }
1033}
1034
1035/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
1036static void
1037android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2
1038 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001039 jint _exception = 0;
1040 const char * _exceptionType = NULL;
1041 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001042 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001043 jint _bufferOffset = (jint) 0;
1044 jint _remaining;
1045 GLuint *pipelines = (GLuint *) 0;
1046
Romain Guy84cac202016-12-05 12:26:02 -08001047 if (!pipelines_buf) {
1048 _exception = 1;
1049 _exceptionType = "java/lang/IllegalArgumentException";
1050 _exceptionMessage = "pipelines == null";
1051 goto exit;
1052 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001053 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001054 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001055 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001056 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1057 }
1058 glDeleteProgramPipelines(
1059 (GLsizei)n,
1060 (GLuint *)pipelines
1061 );
Romain Guy84cac202016-12-05 12:26:02 -08001062
1063exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001064 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001065 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001066 }
Romain Guy84cac202016-12-05 12:26:02 -08001067 if (_exception) {
1068 jniThrowException(_env, _exceptionType, _exceptionMessage);
1069 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001070}
1071
1072/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1073static void
1074android_glGenProgramPipelines__I_3II
1075 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
1076 jint _exception = 0;
1077 const char * _exceptionType = NULL;
1078 const char * _exceptionMessage = NULL;
1079 GLuint *pipelines_base = (GLuint *) 0;
1080 jint _remaining;
1081 GLuint *pipelines = (GLuint *) 0;
1082
1083 if (!pipelines_ref) {
1084 _exception = 1;
1085 _exceptionType = "java/lang/IllegalArgumentException";
1086 _exceptionMessage = "pipelines == null";
1087 goto exit;
1088 }
1089 if (offset < 0) {
1090 _exception = 1;
1091 _exceptionType = "java/lang/IllegalArgumentException";
1092 _exceptionMessage = "offset < 0";
1093 goto exit;
1094 }
1095 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
1096 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001097 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001098 pipelines = pipelines_base + offset;
1099
1100 glGenProgramPipelines(
1101 (GLsizei)n,
1102 (GLuint *)pipelines
1103 );
1104
1105exit:
1106 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001107 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001108 _exception ? JNI_ABORT: 0);
1109 }
1110 if (_exception) {
1111 jniThrowException(_env, _exceptionType, _exceptionMessage);
1112 }
1113}
1114
1115/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1116static void
1117android_glGenProgramPipelines__ILjava_nio_IntBuffer_2
1118 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001119 jint _exception = 0;
1120 const char * _exceptionType = NULL;
1121 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001122 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001123 jint _bufferOffset = (jint) 0;
1124 jint _remaining;
1125 GLuint *pipelines = (GLuint *) 0;
1126
Romain Guy84cac202016-12-05 12:26:02 -08001127 if (!pipelines_buf) {
1128 _exception = 1;
1129 _exceptionType = "java/lang/IllegalArgumentException";
1130 _exceptionMessage = "pipelines == null";
1131 goto exit;
1132 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001133 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001134 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001135 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001136 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1137 }
1138 glGenProgramPipelines(
1139 (GLsizei)n,
1140 (GLuint *)pipelines
1141 );
Romain Guy84cac202016-12-05 12:26:02 -08001142
1143exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001144 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001145 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, _exception ? JNI_ABORT : 0);
1146 }
1147 if (_exception) {
1148 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001149 }
1150}
1151
1152/* GLboolean glIsProgramPipeline ( GLuint pipeline ) */
1153static jboolean
1154android_glIsProgramPipeline__I
1155 (JNIEnv *_env, jobject _this, jint pipeline) {
1156 GLboolean _returnValue;
1157 _returnValue = glIsProgramPipeline(
1158 (GLuint)pipeline
1159 );
1160 return (jboolean)_returnValue;
1161}
1162
1163/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1164static void
1165android_glGetProgramPipelineiv__II_3II
1166 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) {
1167 jint _exception = 0;
1168 const char * _exceptionType = NULL;
1169 const char * _exceptionMessage = NULL;
1170 GLint *params_base = (GLint *) 0;
1171 jint _remaining;
1172 GLint *params = (GLint *) 0;
1173
1174 if (!params_ref) {
1175 _exception = 1;
1176 _exceptionType = "java/lang/IllegalArgumentException";
1177 _exceptionMessage = "params == null";
1178 goto exit;
1179 }
1180 if (offset < 0) {
1181 _exception = 1;
1182 _exceptionType = "java/lang/IllegalArgumentException";
1183 _exceptionMessage = "offset < 0";
1184 goto exit;
1185 }
1186 _remaining = _env->GetArrayLength(params_ref) - offset;
1187 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001188 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001189 params = params_base + offset;
1190
1191 glGetProgramPipelineiv(
1192 (GLuint)pipeline,
1193 (GLenum)pname,
1194 (GLint *)params
1195 );
1196
1197exit:
1198 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001199 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001200 _exception ? JNI_ABORT: 0);
1201 }
1202 if (_exception) {
1203 jniThrowException(_env, _exceptionType, _exceptionMessage);
1204 }
1205}
1206
1207/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1208static void
1209android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2
1210 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001211 jint _exception = 0;
1212 const char * _exceptionType = NULL;
1213 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001214 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001215 jint _bufferOffset = (jint) 0;
1216 jint _remaining;
1217 GLint *params = (GLint *) 0;
1218
Romain Guy84cac202016-12-05 12:26:02 -08001219 if (!params_buf) {
1220 _exception = 1;
1221 _exceptionType = "java/lang/IllegalArgumentException";
1222 _exceptionMessage = "params == null";
1223 goto exit;
1224 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001225 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001226 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001227 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001228 params = (GLint *) (_paramsBase + _bufferOffset);
1229 }
1230 glGetProgramPipelineiv(
1231 (GLuint)pipeline,
1232 (GLenum)pname,
1233 (GLint *)params
1234 );
Romain Guy84cac202016-12-05 12:26:02 -08001235
1236exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001237 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001238 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1239 }
1240 if (_exception) {
1241 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001242 }
1243}
1244
1245/* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */
1246static void
1247android_glProgramUniform1i__III
1248 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1249 glProgramUniform1i(
1250 (GLuint)program,
1251 (GLint)location,
1252 (GLint)v0
1253 );
1254}
1255
1256/* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */
1257static void
1258android_glProgramUniform2i__IIII
1259 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1260 glProgramUniform2i(
1261 (GLuint)program,
1262 (GLint)location,
1263 (GLint)v0,
1264 (GLint)v1
1265 );
1266}
1267
1268/* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */
1269static void
1270android_glProgramUniform3i__IIIII
1271 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1272 glProgramUniform3i(
1273 (GLuint)program,
1274 (GLint)location,
1275 (GLint)v0,
1276 (GLint)v1,
1277 (GLint)v2
1278 );
1279}
1280
1281/* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */
1282static void
1283android_glProgramUniform4i__IIIIII
1284 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1285 glProgramUniform4i(
1286 (GLuint)program,
1287 (GLint)location,
1288 (GLint)v0,
1289 (GLint)v1,
1290 (GLint)v2,
1291 (GLint)v3
1292 );
1293}
1294
1295/* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */
1296static void
1297android_glProgramUniform1ui__III
1298 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1299 glProgramUniform1ui(
1300 (GLuint)program,
1301 (GLint)location,
1302 (GLuint)v0
1303 );
1304}
1305
1306/* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */
1307static void
1308android_glProgramUniform2ui__IIII
1309 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1310 glProgramUniform2ui(
1311 (GLuint)program,
1312 (GLint)location,
1313 (GLuint)v0,
1314 (GLuint)v1
1315 );
1316}
1317
1318/* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
1319static void
1320android_glProgramUniform3ui__IIIII
1321 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1322 glProgramUniform3ui(
1323 (GLuint)program,
1324 (GLint)location,
1325 (GLuint)v0,
1326 (GLuint)v1,
1327 (GLuint)v2
1328 );
1329}
1330
1331/* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
1332static void
1333android_glProgramUniform4ui__IIIIII
1334 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1335 glProgramUniform4ui(
1336 (GLuint)program,
1337 (GLint)location,
1338 (GLuint)v0,
1339 (GLuint)v1,
1340 (GLuint)v2,
1341 (GLuint)v3
1342 );
1343}
1344
1345/* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */
1346static void
1347android_glProgramUniform1f__IIF
1348 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) {
1349 glProgramUniform1f(
1350 (GLuint)program,
1351 (GLint)location,
1352 (GLfloat)v0
1353 );
1354}
1355
1356/* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */
1357static void
1358android_glProgramUniform2f__IIFF
1359 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) {
1360 glProgramUniform2f(
1361 (GLuint)program,
1362 (GLint)location,
1363 (GLfloat)v0,
1364 (GLfloat)v1
1365 );
1366}
1367
1368/* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */
1369static void
1370android_glProgramUniform3f__IIFFF
1371 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) {
1372 glProgramUniform3f(
1373 (GLuint)program,
1374 (GLint)location,
1375 (GLfloat)v0,
1376 (GLfloat)v1,
1377 (GLfloat)v2
1378 );
1379}
1380
1381/* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */
1382static void
1383android_glProgramUniform4f__IIFFFF
1384 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) {
1385 glProgramUniform4f(
1386 (GLuint)program,
1387 (GLint)location,
1388 (GLfloat)v0,
1389 (GLfloat)v1,
1390 (GLfloat)v2,
1391 (GLfloat)v3
1392 );
1393}
1394
1395/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1396static void
1397android_glProgramUniform1iv__III_3II
1398 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1399 jint _exception = 0;
1400 const char * _exceptionType = NULL;
1401 const char * _exceptionMessage = NULL;
1402 GLint *value_base = (GLint *) 0;
1403 jint _remaining;
1404 GLint *value = (GLint *) 0;
1405
1406 if (!value_ref) {
1407 _exception = 1;
1408 _exceptionType = "java/lang/IllegalArgumentException";
1409 _exceptionMessage = "value == null";
1410 goto exit;
1411 }
1412 if (offset < 0) {
1413 _exception = 1;
1414 _exceptionType = "java/lang/IllegalArgumentException";
1415 _exceptionMessage = "offset < 0";
1416 goto exit;
1417 }
1418 _remaining = _env->GetArrayLength(value_ref) - offset;
1419 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001420 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001421 value = value_base + offset;
1422
1423 glProgramUniform1iv(
1424 (GLuint)program,
1425 (GLint)location,
1426 (GLsizei)count,
1427 (GLint *)value
1428 );
1429
1430exit:
1431 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001432 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001433 JNI_ABORT);
1434 }
1435 if (_exception) {
1436 jniThrowException(_env, _exceptionType, _exceptionMessage);
1437 }
1438}
1439
1440/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1441static void
1442android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2
1443 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001444 jint _exception = 0;
1445 const char * _exceptionType = NULL;
1446 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001447 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001448 jint _bufferOffset = (jint) 0;
1449 jint _remaining;
1450 GLint *value = (GLint *) 0;
1451
Romain Guy84cac202016-12-05 12:26:02 -08001452 if (!value_buf) {
1453 _exception = 1;
1454 _exceptionType = "java/lang/IllegalArgumentException";
1455 _exceptionMessage = "value == null";
1456 goto exit;
1457 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001458 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001459 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001460 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001461 value = (GLint *) (_valueBase + _bufferOffset);
1462 }
1463 glProgramUniform1iv(
1464 (GLuint)program,
1465 (GLint)location,
1466 (GLsizei)count,
1467 (GLint *)value
1468 );
Romain Guy84cac202016-12-05 12:26:02 -08001469
1470exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001471 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001472 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001473 }
Romain Guy84cac202016-12-05 12:26:02 -08001474 if (_exception) {
1475 jniThrowException(_env, _exceptionType, _exceptionMessage);
1476 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001477}
1478
1479/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1480static void
1481android_glProgramUniform2iv__III_3II
1482 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1483 jint _exception = 0;
1484 const char * _exceptionType = NULL;
1485 const char * _exceptionMessage = NULL;
1486 GLint *value_base = (GLint *) 0;
1487 jint _remaining;
1488 GLint *value = (GLint *) 0;
1489
1490 if (!value_ref) {
1491 _exception = 1;
1492 _exceptionType = "java/lang/IllegalArgumentException";
1493 _exceptionMessage = "value == null";
1494 goto exit;
1495 }
1496 if (offset < 0) {
1497 _exception = 1;
1498 _exceptionType = "java/lang/IllegalArgumentException";
1499 _exceptionMessage = "offset < 0";
1500 goto exit;
1501 }
1502 _remaining = _env->GetArrayLength(value_ref) - offset;
1503 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001504 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001505 value = value_base + offset;
1506
1507 glProgramUniform2iv(
1508 (GLuint)program,
1509 (GLint)location,
1510 (GLsizei)count,
1511 (GLint *)value
1512 );
1513
1514exit:
1515 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001516 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001517 JNI_ABORT);
1518 }
1519 if (_exception) {
1520 jniThrowException(_env, _exceptionType, _exceptionMessage);
1521 }
1522}
1523
1524/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1525static void
1526android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2
1527 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001528 jint _exception = 0;
1529 const char * _exceptionType = NULL;
1530 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001531 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001532 jint _bufferOffset = (jint) 0;
1533 jint _remaining;
1534 GLint *value = (GLint *) 0;
1535
Romain Guy84cac202016-12-05 12:26:02 -08001536 if (!value_buf) {
1537 _exception = 1;
1538 _exceptionType = "java/lang/IllegalArgumentException";
1539 _exceptionMessage = "value == null";
1540 goto exit;
1541 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001542 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001543 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001544 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001545 value = (GLint *) (_valueBase + _bufferOffset);
1546 }
1547 glProgramUniform2iv(
1548 (GLuint)program,
1549 (GLint)location,
1550 (GLsizei)count,
1551 (GLint *)value
1552 );
Romain Guy84cac202016-12-05 12:26:02 -08001553
1554exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001555 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001556 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001557 }
Romain Guy84cac202016-12-05 12:26:02 -08001558 if (_exception) {
1559 jniThrowException(_env, _exceptionType, _exceptionMessage);
1560 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001561}
1562
1563/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1564static void
1565android_glProgramUniform3iv__III_3II
1566 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1567 jint _exception = 0;
1568 const char * _exceptionType = NULL;
1569 const char * _exceptionMessage = NULL;
1570 GLint *value_base = (GLint *) 0;
1571 jint _remaining;
1572 GLint *value = (GLint *) 0;
1573
1574 if (!value_ref) {
1575 _exception = 1;
1576 _exceptionType = "java/lang/IllegalArgumentException";
1577 _exceptionMessage = "value == null";
1578 goto exit;
1579 }
1580 if (offset < 0) {
1581 _exception = 1;
1582 _exceptionType = "java/lang/IllegalArgumentException";
1583 _exceptionMessage = "offset < 0";
1584 goto exit;
1585 }
1586 _remaining = _env->GetArrayLength(value_ref) - offset;
1587 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001588 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001589 value = value_base + offset;
1590
1591 glProgramUniform3iv(
1592 (GLuint)program,
1593 (GLint)location,
1594 (GLsizei)count,
1595 (GLint *)value
1596 );
1597
1598exit:
1599 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001600 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001601 JNI_ABORT);
1602 }
1603 if (_exception) {
1604 jniThrowException(_env, _exceptionType, _exceptionMessage);
1605 }
1606}
1607
1608/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1609static void
1610android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2
1611 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001612 jint _exception = 0;
1613 const char * _exceptionType = NULL;
1614 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001615 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001616 jint _bufferOffset = (jint) 0;
1617 jint _remaining;
1618 GLint *value = (GLint *) 0;
1619
Romain Guy84cac202016-12-05 12:26:02 -08001620 if (!value_buf) {
1621 _exception = 1;
1622 _exceptionType = "java/lang/IllegalArgumentException";
1623 _exceptionMessage = "value == null";
1624 goto exit;
1625 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001626 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001627 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001628 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001629 value = (GLint *) (_valueBase + _bufferOffset);
1630 }
1631 glProgramUniform3iv(
1632 (GLuint)program,
1633 (GLint)location,
1634 (GLsizei)count,
1635 (GLint *)value
1636 );
Romain Guy84cac202016-12-05 12:26:02 -08001637
1638exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001639 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001640 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001641 }
Romain Guy84cac202016-12-05 12:26:02 -08001642 if (_exception) {
1643 jniThrowException(_env, _exceptionType, _exceptionMessage);
1644 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001645}
1646
1647/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1648static void
1649android_glProgramUniform4iv__III_3II
1650 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1651 jint _exception = 0;
1652 const char * _exceptionType = NULL;
1653 const char * _exceptionMessage = NULL;
1654 GLint *value_base = (GLint *) 0;
1655 jint _remaining;
1656 GLint *value = (GLint *) 0;
1657
1658 if (!value_ref) {
1659 _exception = 1;
1660 _exceptionType = "java/lang/IllegalArgumentException";
1661 _exceptionMessage = "value == null";
1662 goto exit;
1663 }
1664 if (offset < 0) {
1665 _exception = 1;
1666 _exceptionType = "java/lang/IllegalArgumentException";
1667 _exceptionMessage = "offset < 0";
1668 goto exit;
1669 }
1670 _remaining = _env->GetArrayLength(value_ref) - offset;
1671 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001672 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001673 value = value_base + offset;
1674
1675 glProgramUniform4iv(
1676 (GLuint)program,
1677 (GLint)location,
1678 (GLsizei)count,
1679 (GLint *)value
1680 );
1681
1682exit:
1683 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001684 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001685 JNI_ABORT);
1686 }
1687 if (_exception) {
1688 jniThrowException(_env, _exceptionType, _exceptionMessage);
1689 }
1690}
1691
1692/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1693static void
1694android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2
1695 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001696 jint _exception = 0;
1697 const char * _exceptionType = NULL;
1698 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001699 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001700 jint _bufferOffset = (jint) 0;
1701 jint _remaining;
1702 GLint *value = (GLint *) 0;
1703
Romain Guy84cac202016-12-05 12:26:02 -08001704 if (!value_buf) {
1705 _exception = 1;
1706 _exceptionType = "java/lang/IllegalArgumentException";
1707 _exceptionMessage = "value == null";
1708 goto exit;
1709 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001710 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001711 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001712 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001713 value = (GLint *) (_valueBase + _bufferOffset);
1714 }
1715 glProgramUniform4iv(
1716 (GLuint)program,
1717 (GLint)location,
1718 (GLsizei)count,
1719 (GLint *)value
1720 );
Romain Guy84cac202016-12-05 12:26:02 -08001721
1722exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001723 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001724 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001725 }
Romain Guy84cac202016-12-05 12:26:02 -08001726 if (_exception) {
1727 jniThrowException(_env, _exceptionType, _exceptionMessage);
1728 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001729}
1730
1731/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1732static void
1733android_glProgramUniform1uiv__III_3II
1734 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1735 jint _exception = 0;
1736 const char * _exceptionType = NULL;
1737 const char * _exceptionMessage = NULL;
1738 GLuint *value_base = (GLuint *) 0;
1739 jint _remaining;
1740 GLuint *value = (GLuint *) 0;
1741
1742 if (!value_ref) {
1743 _exception = 1;
1744 _exceptionType = "java/lang/IllegalArgumentException";
1745 _exceptionMessage = "value == null";
1746 goto exit;
1747 }
1748 if (offset < 0) {
1749 _exception = 1;
1750 _exceptionType = "java/lang/IllegalArgumentException";
1751 _exceptionMessage = "offset < 0";
1752 goto exit;
1753 }
1754 _remaining = _env->GetArrayLength(value_ref) - offset;
1755 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001756 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001757 value = value_base + offset;
1758
1759 glProgramUniform1uiv(
1760 (GLuint)program,
1761 (GLint)location,
1762 (GLsizei)count,
1763 (GLuint *)value
1764 );
1765
1766exit:
1767 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001768 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001769 JNI_ABORT);
1770 }
1771 if (_exception) {
1772 jniThrowException(_env, _exceptionType, _exceptionMessage);
1773 }
1774}
1775
1776/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1777static void
1778android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2
1779 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001780 jint _exception = 0;
1781 const char * _exceptionType = NULL;
1782 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001783 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001784 jint _bufferOffset = (jint) 0;
1785 jint _remaining;
1786 GLuint *value = (GLuint *) 0;
1787
Romain Guy84cac202016-12-05 12:26:02 -08001788 if (!value_buf) {
1789 _exception = 1;
1790 _exceptionType = "java/lang/IllegalArgumentException";
1791 _exceptionMessage = "value == null";
1792 goto exit;
1793 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001794 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001795 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001796 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001797 value = (GLuint *) (_valueBase + _bufferOffset);
1798 }
1799 glProgramUniform1uiv(
1800 (GLuint)program,
1801 (GLint)location,
1802 (GLsizei)count,
1803 (GLuint *)value
1804 );
Romain Guy84cac202016-12-05 12:26:02 -08001805
1806exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001807 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001808 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001809 }
Romain Guy84cac202016-12-05 12:26:02 -08001810 if (_exception) {
1811 jniThrowException(_env, _exceptionType, _exceptionMessage);
1812 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001813}
1814
1815/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1816static void
1817android_glProgramUniform2uiv__III_3II
1818 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1819 jint _exception = 0;
1820 const char * _exceptionType = NULL;
1821 const char * _exceptionMessage = NULL;
1822 GLuint *value_base = (GLuint *) 0;
1823 jint _remaining;
1824 GLuint *value = (GLuint *) 0;
1825
1826 if (!value_ref) {
1827 _exception = 1;
1828 _exceptionType = "java/lang/IllegalArgumentException";
1829 _exceptionMessage = "value == null";
1830 goto exit;
1831 }
1832 if (offset < 0) {
1833 _exception = 1;
1834 _exceptionType = "java/lang/IllegalArgumentException";
1835 _exceptionMessage = "offset < 0";
1836 goto exit;
1837 }
1838 _remaining = _env->GetArrayLength(value_ref) - offset;
1839 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001840 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001841 value = value_base + offset;
1842
1843 glProgramUniform2uiv(
1844 (GLuint)program,
1845 (GLint)location,
1846 (GLsizei)count,
1847 (GLuint *)value
1848 );
1849
1850exit:
1851 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001852 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001853 JNI_ABORT);
1854 }
1855 if (_exception) {
1856 jniThrowException(_env, _exceptionType, _exceptionMessage);
1857 }
1858}
1859
1860/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1861static void
1862android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2
1863 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001864 jint _exception = 0;
1865 const char * _exceptionType = NULL;
1866 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001867 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001868 jint _bufferOffset = (jint) 0;
1869 jint _remaining;
1870 GLuint *value = (GLuint *) 0;
1871
Romain Guy84cac202016-12-05 12:26:02 -08001872 if (!value_buf) {
1873 _exception = 1;
1874 _exceptionType = "java/lang/IllegalArgumentException";
1875 _exceptionMessage = "value == null";
1876 goto exit;
1877 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001878 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001879 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001880 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001881 value = (GLuint *) (_valueBase + _bufferOffset);
1882 }
1883 glProgramUniform2uiv(
1884 (GLuint)program,
1885 (GLint)location,
1886 (GLsizei)count,
1887 (GLuint *)value
1888 );
Romain Guy84cac202016-12-05 12:26:02 -08001889
1890exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001891 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001892 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001893 }
Romain Guy84cac202016-12-05 12:26:02 -08001894 if (_exception) {
1895 jniThrowException(_env, _exceptionType, _exceptionMessage);
1896 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001897}
1898
1899/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1900static void
1901android_glProgramUniform3uiv__III_3II
1902 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1903 jint _exception = 0;
1904 const char * _exceptionType = NULL;
1905 const char * _exceptionMessage = NULL;
1906 GLuint *value_base = (GLuint *) 0;
1907 jint _remaining;
1908 GLuint *value = (GLuint *) 0;
1909
1910 if (!value_ref) {
1911 _exception = 1;
1912 _exceptionType = "java/lang/IllegalArgumentException";
1913 _exceptionMessage = "value == null";
1914 goto exit;
1915 }
1916 if (offset < 0) {
1917 _exception = 1;
1918 _exceptionType = "java/lang/IllegalArgumentException";
1919 _exceptionMessage = "offset < 0";
1920 goto exit;
1921 }
1922 _remaining = _env->GetArrayLength(value_ref) - offset;
1923 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001924 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001925 value = value_base + offset;
1926
1927 glProgramUniform3uiv(
1928 (GLuint)program,
1929 (GLint)location,
1930 (GLsizei)count,
1931 (GLuint *)value
1932 );
1933
1934exit:
1935 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001936 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001937 JNI_ABORT);
1938 }
1939 if (_exception) {
1940 jniThrowException(_env, _exceptionType, _exceptionMessage);
1941 }
1942}
1943
1944/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1945static void
1946android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2
1947 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001948 jint _exception = 0;
1949 const char * _exceptionType = NULL;
1950 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001951 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001952 jint _bufferOffset = (jint) 0;
1953 jint _remaining;
1954 GLuint *value = (GLuint *) 0;
1955
Romain Guy84cac202016-12-05 12:26:02 -08001956 if (!value_buf) {
1957 _exception = 1;
1958 _exceptionType = "java/lang/IllegalArgumentException";
1959 _exceptionMessage = "value == null";
1960 goto exit;
1961 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001962 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001963 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001964 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001965 value = (GLuint *) (_valueBase + _bufferOffset);
1966 }
1967 glProgramUniform3uiv(
1968 (GLuint)program,
1969 (GLint)location,
1970 (GLsizei)count,
1971 (GLuint *)value
1972 );
Romain Guy84cac202016-12-05 12:26:02 -08001973
1974exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001975 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001976 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001977 }
Romain Guy84cac202016-12-05 12:26:02 -08001978 if (_exception) {
1979 jniThrowException(_env, _exceptionType, _exceptionMessage);
1980 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001981}
1982
1983/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1984static void
1985android_glProgramUniform4uiv__III_3II
1986 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1987 jint _exception = 0;
1988 const char * _exceptionType = NULL;
1989 const char * _exceptionMessage = NULL;
1990 GLuint *value_base = (GLuint *) 0;
1991 jint _remaining;
1992 GLuint *value = (GLuint *) 0;
1993
1994 if (!value_ref) {
1995 _exception = 1;
1996 _exceptionType = "java/lang/IllegalArgumentException";
1997 _exceptionMessage = "value == null";
1998 goto exit;
1999 }
2000 if (offset < 0) {
2001 _exception = 1;
2002 _exceptionType = "java/lang/IllegalArgumentException";
2003 _exceptionMessage = "offset < 0";
2004 goto exit;
2005 }
2006 _remaining = _env->GetArrayLength(value_ref) - offset;
2007 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002008 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002009 value = value_base + offset;
2010
2011 glProgramUniform4uiv(
2012 (GLuint)program,
2013 (GLint)location,
2014 (GLsizei)count,
2015 (GLuint *)value
2016 );
2017
2018exit:
2019 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002020 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002021 JNI_ABORT);
2022 }
2023 if (_exception) {
2024 jniThrowException(_env, _exceptionType, _exceptionMessage);
2025 }
2026}
2027
2028/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
2029static void
2030android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2
2031 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002032 jint _exception = 0;
2033 const char * _exceptionType = NULL;
2034 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002035 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002036 jint _bufferOffset = (jint) 0;
2037 jint _remaining;
2038 GLuint *value = (GLuint *) 0;
2039
Romain Guy84cac202016-12-05 12:26:02 -08002040 if (!value_buf) {
2041 _exception = 1;
2042 _exceptionType = "java/lang/IllegalArgumentException";
2043 _exceptionMessage = "value == null";
2044 goto exit;
2045 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002046 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002047 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002048 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002049 value = (GLuint *) (_valueBase + _bufferOffset);
2050 }
2051 glProgramUniform4uiv(
2052 (GLuint)program,
2053 (GLint)location,
2054 (GLsizei)count,
2055 (GLuint *)value
2056 );
Romain Guy84cac202016-12-05 12:26:02 -08002057
2058exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002059 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002060 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002061 }
Romain Guy84cac202016-12-05 12:26:02 -08002062 if (_exception) {
2063 jniThrowException(_env, _exceptionType, _exceptionMessage);
2064 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002065}
2066
2067/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2068static void
2069android_glProgramUniform1fv__III_3FI
2070 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2071 jint _exception = 0;
2072 const char * _exceptionType = NULL;
2073 const char * _exceptionMessage = NULL;
2074 GLfloat *value_base = (GLfloat *) 0;
2075 jint _remaining;
2076 GLfloat *value = (GLfloat *) 0;
2077
2078 if (!value_ref) {
2079 _exception = 1;
2080 _exceptionType = "java/lang/IllegalArgumentException";
2081 _exceptionMessage = "value == null";
2082 goto exit;
2083 }
2084 if (offset < 0) {
2085 _exception = 1;
2086 _exceptionType = "java/lang/IllegalArgumentException";
2087 _exceptionMessage = "offset < 0";
2088 goto exit;
2089 }
2090 _remaining = _env->GetArrayLength(value_ref) - offset;
2091 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002092 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002093 value = value_base + offset;
2094
2095 glProgramUniform1fv(
2096 (GLuint)program,
2097 (GLint)location,
2098 (GLsizei)count,
2099 (GLfloat *)value
2100 );
2101
2102exit:
2103 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002104 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002105 JNI_ABORT);
2106 }
2107 if (_exception) {
2108 jniThrowException(_env, _exceptionType, _exceptionMessage);
2109 }
2110}
2111
2112/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2113static void
2114android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2
2115 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002116 jint _exception = 0;
2117 const char * _exceptionType = NULL;
2118 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002119 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002120 jint _bufferOffset = (jint) 0;
2121 jint _remaining;
2122 GLfloat *value = (GLfloat *) 0;
2123
Romain Guy84cac202016-12-05 12:26:02 -08002124 if (!value_buf) {
2125 _exception = 1;
2126 _exceptionType = "java/lang/IllegalArgumentException";
2127 _exceptionMessage = "value == null";
2128 goto exit;
2129 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002130 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002131 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002132 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002133 value = (GLfloat *) (_valueBase + _bufferOffset);
2134 }
2135 glProgramUniform1fv(
2136 (GLuint)program,
2137 (GLint)location,
2138 (GLsizei)count,
2139 (GLfloat *)value
2140 );
Romain Guy84cac202016-12-05 12:26:02 -08002141
2142exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002143 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002144 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002145 }
Romain Guy84cac202016-12-05 12:26:02 -08002146 if (_exception) {
2147 jniThrowException(_env, _exceptionType, _exceptionMessage);
2148 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002149}
2150
2151/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2152static void
2153android_glProgramUniform2fv__III_3FI
2154 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2155 jint _exception = 0;
2156 const char * _exceptionType = NULL;
2157 const char * _exceptionMessage = NULL;
2158 GLfloat *value_base = (GLfloat *) 0;
2159 jint _remaining;
2160 GLfloat *value = (GLfloat *) 0;
2161
2162 if (!value_ref) {
2163 _exception = 1;
2164 _exceptionType = "java/lang/IllegalArgumentException";
2165 _exceptionMessage = "value == null";
2166 goto exit;
2167 }
2168 if (offset < 0) {
2169 _exception = 1;
2170 _exceptionType = "java/lang/IllegalArgumentException";
2171 _exceptionMessage = "offset < 0";
2172 goto exit;
2173 }
2174 _remaining = _env->GetArrayLength(value_ref) - offset;
2175 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002176 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002177 value = value_base + offset;
2178
2179 glProgramUniform2fv(
2180 (GLuint)program,
2181 (GLint)location,
2182 (GLsizei)count,
2183 (GLfloat *)value
2184 );
2185
2186exit:
2187 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002188 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002189 JNI_ABORT);
2190 }
2191 if (_exception) {
2192 jniThrowException(_env, _exceptionType, _exceptionMessage);
2193 }
2194}
2195
2196/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2197static void
2198android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2
2199 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002200 jint _exception = 0;
2201 const char * _exceptionType = NULL;
2202 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002203 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002204 jint _bufferOffset = (jint) 0;
2205 jint _remaining;
2206 GLfloat *value = (GLfloat *) 0;
2207
Romain Guy84cac202016-12-05 12:26:02 -08002208 if (!value_buf) {
2209 _exception = 1;
2210 _exceptionType = "java/lang/IllegalArgumentException";
2211 _exceptionMessage = "value == null";
2212 goto exit;
2213 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002214 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002215 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002216 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002217 value = (GLfloat *) (_valueBase + _bufferOffset);
2218 }
2219 glProgramUniform2fv(
2220 (GLuint)program,
2221 (GLint)location,
2222 (GLsizei)count,
2223 (GLfloat *)value
2224 );
Romain Guy84cac202016-12-05 12:26:02 -08002225
2226exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002227 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002228 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002229 }
Romain Guy84cac202016-12-05 12:26:02 -08002230 if (_exception) {
2231 jniThrowException(_env, _exceptionType, _exceptionMessage);
2232 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002233}
2234
2235/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2236static void
2237android_glProgramUniform3fv__III_3FI
2238 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2239 jint _exception = 0;
2240 const char * _exceptionType = NULL;
2241 const char * _exceptionMessage = NULL;
2242 GLfloat *value_base = (GLfloat *) 0;
2243 jint _remaining;
2244 GLfloat *value = (GLfloat *) 0;
2245
2246 if (!value_ref) {
2247 _exception = 1;
2248 _exceptionType = "java/lang/IllegalArgumentException";
2249 _exceptionMessage = "value == null";
2250 goto exit;
2251 }
2252 if (offset < 0) {
2253 _exception = 1;
2254 _exceptionType = "java/lang/IllegalArgumentException";
2255 _exceptionMessage = "offset < 0";
2256 goto exit;
2257 }
2258 _remaining = _env->GetArrayLength(value_ref) - offset;
2259 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002260 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002261 value = value_base + offset;
2262
2263 glProgramUniform3fv(
2264 (GLuint)program,
2265 (GLint)location,
2266 (GLsizei)count,
2267 (GLfloat *)value
2268 );
2269
2270exit:
2271 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002272 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002273 JNI_ABORT);
2274 }
2275 if (_exception) {
2276 jniThrowException(_env, _exceptionType, _exceptionMessage);
2277 }
2278}
2279
2280/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2281static void
2282android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2
2283 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002284 jint _exception = 0;
2285 const char * _exceptionType = NULL;
2286 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002287 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002288 jint _bufferOffset = (jint) 0;
2289 jint _remaining;
2290 GLfloat *value = (GLfloat *) 0;
2291
Romain Guy84cac202016-12-05 12:26:02 -08002292 if (!value_buf) {
2293 _exception = 1;
2294 _exceptionType = "java/lang/IllegalArgumentException";
2295 _exceptionMessage = "value == null";
2296 goto exit;
2297 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002298 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002299 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002300 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002301 value = (GLfloat *) (_valueBase + _bufferOffset);
2302 }
2303 glProgramUniform3fv(
2304 (GLuint)program,
2305 (GLint)location,
2306 (GLsizei)count,
2307 (GLfloat *)value
2308 );
Romain Guy84cac202016-12-05 12:26:02 -08002309
2310exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002311 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002312 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002313 }
Romain Guy84cac202016-12-05 12:26:02 -08002314 if (_exception) {
2315 jniThrowException(_env, _exceptionType, _exceptionMessage);
2316 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002317}
2318
2319/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2320static void
2321android_glProgramUniform4fv__III_3FI
2322 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2323 jint _exception = 0;
2324 const char * _exceptionType = NULL;
2325 const char * _exceptionMessage = NULL;
2326 GLfloat *value_base = (GLfloat *) 0;
2327 jint _remaining;
2328 GLfloat *value = (GLfloat *) 0;
2329
2330 if (!value_ref) {
2331 _exception = 1;
2332 _exceptionType = "java/lang/IllegalArgumentException";
2333 _exceptionMessage = "value == null";
2334 goto exit;
2335 }
2336 if (offset < 0) {
2337 _exception = 1;
2338 _exceptionType = "java/lang/IllegalArgumentException";
2339 _exceptionMessage = "offset < 0";
2340 goto exit;
2341 }
2342 _remaining = _env->GetArrayLength(value_ref) - offset;
2343 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002344 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002345 value = value_base + offset;
2346
2347 glProgramUniform4fv(
2348 (GLuint)program,
2349 (GLint)location,
2350 (GLsizei)count,
2351 (GLfloat *)value
2352 );
2353
2354exit:
2355 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002356 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002357 JNI_ABORT);
2358 }
2359 if (_exception) {
2360 jniThrowException(_env, _exceptionType, _exceptionMessage);
2361 }
2362}
2363
2364/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2365static void
2366android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2
2367 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002368 jint _exception = 0;
2369 const char * _exceptionType = NULL;
2370 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002371 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002372 jint _bufferOffset = (jint) 0;
2373 jint _remaining;
2374 GLfloat *value = (GLfloat *) 0;
2375
Romain Guy84cac202016-12-05 12:26:02 -08002376 if (!value_buf) {
2377 _exception = 1;
2378 _exceptionType = "java/lang/IllegalArgumentException";
2379 _exceptionMessage = "value == null";
2380 goto exit;
2381 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002382 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002383 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002384 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002385 value = (GLfloat *) (_valueBase + _bufferOffset);
2386 }
2387 glProgramUniform4fv(
2388 (GLuint)program,
2389 (GLint)location,
2390 (GLsizei)count,
2391 (GLfloat *)value
2392 );
Romain Guy84cac202016-12-05 12:26:02 -08002393
2394exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002395 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002396 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002397 }
Romain Guy84cac202016-12-05 12:26:02 -08002398 if (_exception) {
2399 jniThrowException(_env, _exceptionType, _exceptionMessage);
2400 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002401}
2402
2403/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2404static void
2405android_glProgramUniformMatrix2fv__IIIZ_3FI
2406 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2407 jint _exception = 0;
2408 const char * _exceptionType = NULL;
2409 const char * _exceptionMessage = NULL;
2410 GLfloat *value_base = (GLfloat *) 0;
2411 jint _remaining;
2412 GLfloat *value = (GLfloat *) 0;
2413
2414 if (!value_ref) {
2415 _exception = 1;
2416 _exceptionType = "java/lang/IllegalArgumentException";
2417 _exceptionMessage = "value == null";
2418 goto exit;
2419 }
2420 if (offset < 0) {
2421 _exception = 1;
2422 _exceptionType = "java/lang/IllegalArgumentException";
2423 _exceptionMessage = "offset < 0";
2424 goto exit;
2425 }
2426 _remaining = _env->GetArrayLength(value_ref) - offset;
2427 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002428 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002429 value = value_base + offset;
2430
2431 glProgramUniformMatrix2fv(
2432 (GLuint)program,
2433 (GLint)location,
2434 (GLsizei)count,
2435 (GLboolean)transpose,
2436 (GLfloat *)value
2437 );
2438
2439exit:
2440 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002441 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002442 JNI_ABORT);
2443 }
2444 if (_exception) {
2445 jniThrowException(_env, _exceptionType, _exceptionMessage);
2446 }
2447}
2448
2449/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2450static void
2451android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2
2452 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002453 jint _exception = 0;
2454 const char * _exceptionType = NULL;
2455 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002456 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002457 jint _bufferOffset = (jint) 0;
2458 jint _remaining;
2459 GLfloat *value = (GLfloat *) 0;
2460
Romain Guy84cac202016-12-05 12:26:02 -08002461 if (!value_buf) {
2462 _exception = 1;
2463 _exceptionType = "java/lang/IllegalArgumentException";
2464 _exceptionMessage = "value == null";
2465 goto exit;
2466 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002467 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002468 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002469 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002470 value = (GLfloat *) (_valueBase + _bufferOffset);
2471 }
2472 glProgramUniformMatrix2fv(
2473 (GLuint)program,
2474 (GLint)location,
2475 (GLsizei)count,
2476 (GLboolean)transpose,
2477 (GLfloat *)value
2478 );
Romain Guy84cac202016-12-05 12:26:02 -08002479
2480exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002481 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002482 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002483 }
Romain Guy84cac202016-12-05 12:26:02 -08002484 if (_exception) {
2485 jniThrowException(_env, _exceptionType, _exceptionMessage);
2486 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002487}
2488
2489/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2490static void
2491android_glProgramUniformMatrix3fv__IIIZ_3FI
2492 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2493 jint _exception = 0;
2494 const char * _exceptionType = NULL;
2495 const char * _exceptionMessage = NULL;
2496 GLfloat *value_base = (GLfloat *) 0;
2497 jint _remaining;
2498 GLfloat *value = (GLfloat *) 0;
2499
2500 if (!value_ref) {
2501 _exception = 1;
2502 _exceptionType = "java/lang/IllegalArgumentException";
2503 _exceptionMessage = "value == null";
2504 goto exit;
2505 }
2506 if (offset < 0) {
2507 _exception = 1;
2508 _exceptionType = "java/lang/IllegalArgumentException";
2509 _exceptionMessage = "offset < 0";
2510 goto exit;
2511 }
2512 _remaining = _env->GetArrayLength(value_ref) - offset;
2513 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002514 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002515 value = value_base + offset;
2516
2517 glProgramUniformMatrix3fv(
2518 (GLuint)program,
2519 (GLint)location,
2520 (GLsizei)count,
2521 (GLboolean)transpose,
2522 (GLfloat *)value
2523 );
2524
2525exit:
2526 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002527 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002528 JNI_ABORT);
2529 }
2530 if (_exception) {
2531 jniThrowException(_env, _exceptionType, _exceptionMessage);
2532 }
2533}
2534
2535/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2536static void
2537android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2
2538 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002539 jint _exception = 0;
2540 const char * _exceptionType = NULL;
2541 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002542 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002543 jint _bufferOffset = (jint) 0;
2544 jint _remaining;
2545 GLfloat *value = (GLfloat *) 0;
2546
Romain Guy84cac202016-12-05 12:26:02 -08002547 if (!value_buf) {
2548 _exception = 1;
2549 _exceptionType = "java/lang/IllegalArgumentException";
2550 _exceptionMessage = "value == null";
2551 goto exit;
2552 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002553 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002554 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002555 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002556 value = (GLfloat *) (_valueBase + _bufferOffset);
2557 }
2558 glProgramUniformMatrix3fv(
2559 (GLuint)program,
2560 (GLint)location,
2561 (GLsizei)count,
2562 (GLboolean)transpose,
2563 (GLfloat *)value
2564 );
Romain Guy84cac202016-12-05 12:26:02 -08002565
2566exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002567 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002568 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002569 }
Romain Guy84cac202016-12-05 12:26:02 -08002570 if (_exception) {
2571 jniThrowException(_env, _exceptionType, _exceptionMessage);
2572 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002573}
2574
2575/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2576static void
2577android_glProgramUniformMatrix4fv__IIIZ_3FI
2578 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2579 jint _exception = 0;
2580 const char * _exceptionType = NULL;
2581 const char * _exceptionMessage = NULL;
2582 GLfloat *value_base = (GLfloat *) 0;
2583 jint _remaining;
2584 GLfloat *value = (GLfloat *) 0;
2585
2586 if (!value_ref) {
2587 _exception = 1;
2588 _exceptionType = "java/lang/IllegalArgumentException";
2589 _exceptionMessage = "value == null";
2590 goto exit;
2591 }
2592 if (offset < 0) {
2593 _exception = 1;
2594 _exceptionType = "java/lang/IllegalArgumentException";
2595 _exceptionMessage = "offset < 0";
2596 goto exit;
2597 }
2598 _remaining = _env->GetArrayLength(value_ref) - offset;
2599 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002600 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002601 value = value_base + offset;
2602
2603 glProgramUniformMatrix4fv(
2604 (GLuint)program,
2605 (GLint)location,
2606 (GLsizei)count,
2607 (GLboolean)transpose,
2608 (GLfloat *)value
2609 );
2610
2611exit:
2612 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002613 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002614 JNI_ABORT);
2615 }
2616 if (_exception) {
2617 jniThrowException(_env, _exceptionType, _exceptionMessage);
2618 }
2619}
2620
2621/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2622static void
2623android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2
2624 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002625 jint _exception = 0;
2626 const char * _exceptionType = NULL;
2627 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002628 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002629 jint _bufferOffset = (jint) 0;
2630 jint _remaining;
2631 GLfloat *value = (GLfloat *) 0;
2632
Romain Guy84cac202016-12-05 12:26:02 -08002633 if (!value_buf) {
2634 _exception = 1;
2635 _exceptionType = "java/lang/IllegalArgumentException";
2636 _exceptionMessage = "value == null";
2637 goto exit;
2638 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002639 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002640 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002641 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002642 value = (GLfloat *) (_valueBase + _bufferOffset);
2643 }
2644 glProgramUniformMatrix4fv(
2645 (GLuint)program,
2646 (GLint)location,
2647 (GLsizei)count,
2648 (GLboolean)transpose,
2649 (GLfloat *)value
2650 );
Romain Guy84cac202016-12-05 12:26:02 -08002651
2652exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002653 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002654 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002655 }
Romain Guy84cac202016-12-05 12:26:02 -08002656 if (_exception) {
2657 jniThrowException(_env, _exceptionType, _exceptionMessage);
2658 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002659}
2660
2661/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2662static void
2663android_glProgramUniformMatrix2x3fv__IIIZ_3FI
2664 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2665 jint _exception = 0;
2666 const char * _exceptionType = NULL;
2667 const char * _exceptionMessage = NULL;
2668 GLfloat *value_base = (GLfloat *) 0;
2669 jint _remaining;
2670 GLfloat *value = (GLfloat *) 0;
2671
2672 if (!value_ref) {
2673 _exception = 1;
2674 _exceptionType = "java/lang/IllegalArgumentException";
2675 _exceptionMessage = "value == null";
2676 goto exit;
2677 }
2678 if (offset < 0) {
2679 _exception = 1;
2680 _exceptionType = "java/lang/IllegalArgumentException";
2681 _exceptionMessage = "offset < 0";
2682 goto exit;
2683 }
2684 _remaining = _env->GetArrayLength(value_ref) - offset;
2685 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002686 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002687 value = value_base + offset;
2688
2689 glProgramUniformMatrix2x3fv(
2690 (GLuint)program,
2691 (GLint)location,
2692 (GLsizei)count,
2693 (GLboolean)transpose,
2694 (GLfloat *)value
2695 );
2696
2697exit:
2698 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002699 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002700 JNI_ABORT);
2701 }
2702 if (_exception) {
2703 jniThrowException(_env, _exceptionType, _exceptionMessage);
2704 }
2705}
2706
2707/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2708static void
2709android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2
2710 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002711 jint _exception = 0;
2712 const char * _exceptionType = NULL;
2713 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002714 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002715 jint _bufferOffset = (jint) 0;
2716 jint _remaining;
2717 GLfloat *value = (GLfloat *) 0;
2718
Romain Guy84cac202016-12-05 12:26:02 -08002719 if (!value_buf) {
2720 _exception = 1;
2721 _exceptionType = "java/lang/IllegalArgumentException";
2722 _exceptionMessage = "value == null";
2723 goto exit;
2724 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002725 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002726 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002727 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002728 value = (GLfloat *) (_valueBase + _bufferOffset);
2729 }
2730 glProgramUniformMatrix2x3fv(
2731 (GLuint)program,
2732 (GLint)location,
2733 (GLsizei)count,
2734 (GLboolean)transpose,
2735 (GLfloat *)value
2736 );
Romain Guy84cac202016-12-05 12:26:02 -08002737
2738exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002739 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002740 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002741 }
Romain Guy84cac202016-12-05 12:26:02 -08002742 if (_exception) {
2743 jniThrowException(_env, _exceptionType, _exceptionMessage);
2744 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002745}
2746
2747/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2748static void
2749android_glProgramUniformMatrix3x2fv__IIIZ_3FI
2750 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2751 jint _exception = 0;
2752 const char * _exceptionType = NULL;
2753 const char * _exceptionMessage = NULL;
2754 GLfloat *value_base = (GLfloat *) 0;
2755 jint _remaining;
2756 GLfloat *value = (GLfloat *) 0;
2757
2758 if (!value_ref) {
2759 _exception = 1;
2760 _exceptionType = "java/lang/IllegalArgumentException";
2761 _exceptionMessage = "value == null";
2762 goto exit;
2763 }
2764 if (offset < 0) {
2765 _exception = 1;
2766 _exceptionType = "java/lang/IllegalArgumentException";
2767 _exceptionMessage = "offset < 0";
2768 goto exit;
2769 }
2770 _remaining = _env->GetArrayLength(value_ref) - offset;
2771 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002772 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002773 value = value_base + offset;
2774
2775 glProgramUniformMatrix3x2fv(
2776 (GLuint)program,
2777 (GLint)location,
2778 (GLsizei)count,
2779 (GLboolean)transpose,
2780 (GLfloat *)value
2781 );
2782
2783exit:
2784 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002785 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002786 JNI_ABORT);
2787 }
2788 if (_exception) {
2789 jniThrowException(_env, _exceptionType, _exceptionMessage);
2790 }
2791}
2792
2793/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2794static void
2795android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2
2796 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002797 jint _exception = 0;
2798 const char * _exceptionType = NULL;
2799 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002800 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002801 jint _bufferOffset = (jint) 0;
2802 jint _remaining;
2803 GLfloat *value = (GLfloat *) 0;
2804
Romain Guy84cac202016-12-05 12:26:02 -08002805 if (!value_buf) {
2806 _exception = 1;
2807 _exceptionType = "java/lang/IllegalArgumentException";
2808 _exceptionMessage = "value == null";
2809 goto exit;
2810 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002811 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002812 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002813 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002814 value = (GLfloat *) (_valueBase + _bufferOffset);
2815 }
2816 glProgramUniformMatrix3x2fv(
2817 (GLuint)program,
2818 (GLint)location,
2819 (GLsizei)count,
2820 (GLboolean)transpose,
2821 (GLfloat *)value
2822 );
Romain Guy84cac202016-12-05 12:26:02 -08002823
2824exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002825 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002826 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002827 }
Romain Guy84cac202016-12-05 12:26:02 -08002828 if (_exception) {
2829 jniThrowException(_env, _exceptionType, _exceptionMessage);
2830 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002831}
2832
2833/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2834static void
2835android_glProgramUniformMatrix2x4fv__IIIZ_3FI
2836 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2837 jint _exception = 0;
2838 const char * _exceptionType = NULL;
2839 const char * _exceptionMessage = NULL;
2840 GLfloat *value_base = (GLfloat *) 0;
2841 jint _remaining;
2842 GLfloat *value = (GLfloat *) 0;
2843
2844 if (!value_ref) {
2845 _exception = 1;
2846 _exceptionType = "java/lang/IllegalArgumentException";
2847 _exceptionMessage = "value == null";
2848 goto exit;
2849 }
2850 if (offset < 0) {
2851 _exception = 1;
2852 _exceptionType = "java/lang/IllegalArgumentException";
2853 _exceptionMessage = "offset < 0";
2854 goto exit;
2855 }
2856 _remaining = _env->GetArrayLength(value_ref) - offset;
2857 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002858 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002859 value = value_base + offset;
2860
2861 glProgramUniformMatrix2x4fv(
2862 (GLuint)program,
2863 (GLint)location,
2864 (GLsizei)count,
2865 (GLboolean)transpose,
2866 (GLfloat *)value
2867 );
2868
2869exit:
2870 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002871 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002872 JNI_ABORT);
2873 }
2874 if (_exception) {
2875 jniThrowException(_env, _exceptionType, _exceptionMessage);
2876 }
2877}
2878
2879/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2880static void
2881android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2
2882 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002883 jint _exception = 0;
2884 const char * _exceptionType = NULL;
2885 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002886 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002887 jint _bufferOffset = (jint) 0;
2888 jint _remaining;
2889 GLfloat *value = (GLfloat *) 0;
2890
Romain Guy84cac202016-12-05 12:26:02 -08002891 if (!value_buf) {
2892 _exception = 1;
2893 _exceptionType = "java/lang/IllegalArgumentException";
2894 _exceptionMessage = "value == null";
2895 goto exit;
2896 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002897 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002898 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002899 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002900 value = (GLfloat *) (_valueBase + _bufferOffset);
2901 }
2902 glProgramUniformMatrix2x4fv(
2903 (GLuint)program,
2904 (GLint)location,
2905 (GLsizei)count,
2906 (GLboolean)transpose,
2907 (GLfloat *)value
2908 );
Romain Guy84cac202016-12-05 12:26:02 -08002909
2910exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002911 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002912 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002913 }
Romain Guy84cac202016-12-05 12:26:02 -08002914 if (_exception) {
2915 jniThrowException(_env, _exceptionType, _exceptionMessage);
2916 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002917}
2918
2919/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2920static void
2921android_glProgramUniformMatrix4x2fv__IIIZ_3FI
2922 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2923 jint _exception = 0;
2924 const char * _exceptionType = NULL;
2925 const char * _exceptionMessage = NULL;
2926 GLfloat *value_base = (GLfloat *) 0;
2927 jint _remaining;
2928 GLfloat *value = (GLfloat *) 0;
2929
2930 if (!value_ref) {
2931 _exception = 1;
2932 _exceptionType = "java/lang/IllegalArgumentException";
2933 _exceptionMessage = "value == null";
2934 goto exit;
2935 }
2936 if (offset < 0) {
2937 _exception = 1;
2938 _exceptionType = "java/lang/IllegalArgumentException";
2939 _exceptionMessage = "offset < 0";
2940 goto exit;
2941 }
2942 _remaining = _env->GetArrayLength(value_ref) - offset;
2943 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002944 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002945 value = value_base + offset;
2946
2947 glProgramUniformMatrix4x2fv(
2948 (GLuint)program,
2949 (GLint)location,
2950 (GLsizei)count,
2951 (GLboolean)transpose,
2952 (GLfloat *)value
2953 );
2954
2955exit:
2956 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002957 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002958 JNI_ABORT);
2959 }
2960 if (_exception) {
2961 jniThrowException(_env, _exceptionType, _exceptionMessage);
2962 }
2963}
2964
2965/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2966static void
2967android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2
2968 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002969 jint _exception = 0;
2970 const char * _exceptionType = NULL;
2971 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002972 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002973 jint _bufferOffset = (jint) 0;
2974 jint _remaining;
2975 GLfloat *value = (GLfloat *) 0;
2976
Romain Guy84cac202016-12-05 12:26:02 -08002977 if (!value_buf) {
2978 _exception = 1;
2979 _exceptionType = "java/lang/IllegalArgumentException";
2980 _exceptionMessage = "value == null";
2981 goto exit;
2982 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002983 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002984 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002985 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002986 value = (GLfloat *) (_valueBase + _bufferOffset);
2987 }
2988 glProgramUniformMatrix4x2fv(
2989 (GLuint)program,
2990 (GLint)location,
2991 (GLsizei)count,
2992 (GLboolean)transpose,
2993 (GLfloat *)value
2994 );
Romain Guy84cac202016-12-05 12:26:02 -08002995
2996exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002997 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002998 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002999 }
Romain Guy84cac202016-12-05 12:26:02 -08003000 if (_exception) {
3001 jniThrowException(_env, _exceptionType, _exceptionMessage);
3002 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003003}
3004
3005/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3006static void
3007android_glProgramUniformMatrix3x4fv__IIIZ_3FI
3008 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3009 jint _exception = 0;
3010 const char * _exceptionType = NULL;
3011 const char * _exceptionMessage = NULL;
3012 GLfloat *value_base = (GLfloat *) 0;
3013 jint _remaining;
3014 GLfloat *value = (GLfloat *) 0;
3015
3016 if (!value_ref) {
3017 _exception = 1;
3018 _exceptionType = "java/lang/IllegalArgumentException";
3019 _exceptionMessage = "value == null";
3020 goto exit;
3021 }
3022 if (offset < 0) {
3023 _exception = 1;
3024 _exceptionType = "java/lang/IllegalArgumentException";
3025 _exceptionMessage = "offset < 0";
3026 goto exit;
3027 }
3028 _remaining = _env->GetArrayLength(value_ref) - offset;
3029 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003030 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003031 value = value_base + offset;
3032
3033 glProgramUniformMatrix3x4fv(
3034 (GLuint)program,
3035 (GLint)location,
3036 (GLsizei)count,
3037 (GLboolean)transpose,
3038 (GLfloat *)value
3039 );
3040
3041exit:
3042 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003043 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003044 JNI_ABORT);
3045 }
3046 if (_exception) {
3047 jniThrowException(_env, _exceptionType, _exceptionMessage);
3048 }
3049}
3050
3051/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3052static void
3053android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2
3054 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003055 jint _exception = 0;
3056 const char * _exceptionType = NULL;
3057 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003058 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003059 jint _bufferOffset = (jint) 0;
3060 jint _remaining;
3061 GLfloat *value = (GLfloat *) 0;
3062
Romain Guy84cac202016-12-05 12:26:02 -08003063 if (!value_buf) {
3064 _exception = 1;
3065 _exceptionType = "java/lang/IllegalArgumentException";
3066 _exceptionMessage = "value == null";
3067 goto exit;
3068 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003069 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003070 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003071 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003072 value = (GLfloat *) (_valueBase + _bufferOffset);
3073 }
3074 glProgramUniformMatrix3x4fv(
3075 (GLuint)program,
3076 (GLint)location,
3077 (GLsizei)count,
3078 (GLboolean)transpose,
3079 (GLfloat *)value
3080 );
Romain Guy84cac202016-12-05 12:26:02 -08003081
3082exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003083 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003084 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003085 }
Romain Guy84cac202016-12-05 12:26:02 -08003086 if (_exception) {
3087 jniThrowException(_env, _exceptionType, _exceptionMessage);
3088 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003089}
3090
3091/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3092static void
3093android_glProgramUniformMatrix4x3fv__IIIZ_3FI
3094 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
3095 jint _exception = 0;
3096 const char * _exceptionType = NULL;
3097 const char * _exceptionMessage = NULL;
3098 GLfloat *value_base = (GLfloat *) 0;
3099 jint _remaining;
3100 GLfloat *value = (GLfloat *) 0;
3101
3102 if (!value_ref) {
3103 _exception = 1;
3104 _exceptionType = "java/lang/IllegalArgumentException";
3105 _exceptionMessage = "value == null";
3106 goto exit;
3107 }
3108 if (offset < 0) {
3109 _exception = 1;
3110 _exceptionType = "java/lang/IllegalArgumentException";
3111 _exceptionMessage = "offset < 0";
3112 goto exit;
3113 }
3114 _remaining = _env->GetArrayLength(value_ref) - offset;
3115 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003116 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003117 value = value_base + offset;
3118
3119 glProgramUniformMatrix4x3fv(
3120 (GLuint)program,
3121 (GLint)location,
3122 (GLsizei)count,
3123 (GLboolean)transpose,
3124 (GLfloat *)value
3125 );
3126
3127exit:
3128 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003129 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003130 JNI_ABORT);
3131 }
3132 if (_exception) {
3133 jniThrowException(_env, _exceptionType, _exceptionMessage);
3134 }
3135}
3136
3137/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
3138static void
3139android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2
3140 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003141 jint _exception = 0;
3142 const char * _exceptionType = NULL;
3143 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003144 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003145 jint _bufferOffset = (jint) 0;
3146 jint _remaining;
3147 GLfloat *value = (GLfloat *) 0;
3148
Romain Guy84cac202016-12-05 12:26:02 -08003149 if (!value_buf) {
3150 _exception = 1;
3151 _exceptionType = "java/lang/IllegalArgumentException";
3152 _exceptionMessage = "value == null";
3153 goto exit;
3154 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003155 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003156 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003157 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003158 value = (GLfloat *) (_valueBase + _bufferOffset);
3159 }
3160 glProgramUniformMatrix4x3fv(
3161 (GLuint)program,
3162 (GLint)location,
3163 (GLsizei)count,
3164 (GLboolean)transpose,
3165 (GLfloat *)value
3166 );
Romain Guy84cac202016-12-05 12:26:02 -08003167
3168exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003169 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003170 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003171 }
Romain Guy84cac202016-12-05 12:26:02 -08003172 if (_exception) {
3173 jniThrowException(_env, _exceptionType, _exceptionMessage);
3174 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003175}
3176
3177/* void glValidateProgramPipeline ( GLuint pipeline ) */
3178static void
3179android_glValidateProgramPipeline__I
3180 (JNIEnv *_env, jobject _this, jint pipeline) {
3181 glValidateProgramPipeline(
3182 (GLuint)pipeline
3183 );
3184}
3185
3186#include <stdlib.h>
3187
3188/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
3189static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
3190 GLint infoLen = 0;
3191 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
3192 if (!infoLen) {
3193 return _env->NewStringUTF("");
3194 }
3195 char* buf = (char*) malloc(infoLen);
3196 if (buf == NULL) {
3197 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
3198 return NULL;
3199 }
3200 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
3201 jstring result = _env->NewStringUTF(buf);
3202 free(buf);
3203 return result;
3204}
3205/* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */
3206static void
3207android_glBindImageTexture__IIIZIII
3208 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) {
3209 glBindImageTexture(
3210 (GLuint)unit,
3211 (GLuint)texture,
3212 (GLint)level,
3213 (GLboolean)layered,
3214 (GLint)layer,
3215 (GLenum)access,
3216 (GLenum)format
3217 );
3218}
3219
3220/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3221static void
3222android_glGetBooleani_v__II_3ZI
3223 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) {
3224 jint _exception = 0;
3225 const char * _exceptionType = NULL;
3226 const char * _exceptionMessage = NULL;
3227 GLboolean *data_base = (GLboolean *) 0;
3228 jint _remaining;
3229 GLboolean *data = (GLboolean *) 0;
3230
3231 if (!data_ref) {
3232 _exception = 1;
3233 _exceptionType = "java/lang/IllegalArgumentException";
3234 _exceptionMessage = "data == null";
3235 goto exit;
3236 }
3237 if (offset < 0) {
3238 _exception = 1;
3239 _exceptionType = "java/lang/IllegalArgumentException";
3240 _exceptionMessage = "offset < 0";
3241 goto exit;
3242 }
3243 _remaining = _env->GetArrayLength(data_ref) - offset;
3244 data_base = (GLboolean *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003245 _env->GetBooleanArrayElements(data_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003246 data = data_base + offset;
3247
3248 glGetBooleani_v(
3249 (GLenum)target,
3250 (GLuint)index,
3251 (GLboolean *)data
3252 );
3253
3254exit:
3255 if (data_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003256 _env->ReleaseBooleanArrayElements(data_ref, (jboolean*)data_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003257 _exception ? JNI_ABORT: 0);
3258 }
3259 if (_exception) {
3260 jniThrowException(_env, _exceptionType, _exceptionMessage);
3261 }
3262}
3263
3264/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
3265static void
3266android_glGetBooleani_v__IILjava_nio_IntBuffer_2
3267 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003268 jint _exception = 0;
3269 const char * _exceptionType = NULL;
3270 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003271 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003272 jint _bufferOffset = (jint) 0;
3273 jint _remaining;
3274 GLboolean *data = (GLboolean *) 0;
3275
Romain Guy84cac202016-12-05 12:26:02 -08003276 if (!data_buf) {
3277 _exception = 1;
3278 _exceptionType = "java/lang/IllegalArgumentException";
3279 _exceptionMessage = "data == null";
3280 goto exit;
3281 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003282 data = (GLboolean *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003283 if (data == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003284 char * _dataBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003285 data = (GLboolean *) (_dataBase + _bufferOffset);
3286 }
3287 glGetBooleani_v(
3288 (GLenum)target,
3289 (GLuint)index,
3290 (GLboolean *)data
3291 );
Romain Guy84cac202016-12-05 12:26:02 -08003292
3293exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003294 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003295 _env->ReleaseIntArrayElements(_array, (jint*)data, _exception ? JNI_ABORT : 0);
3296 }
3297 if (_exception) {
3298 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003299 }
3300}
3301
3302/* void glMemoryBarrier ( GLbitfield barriers ) */
3303static void
3304android_glMemoryBarrier__I
3305 (JNIEnv *_env, jobject _this, jint barriers) {
3306 glMemoryBarrier(
3307 (GLbitfield)barriers
3308 );
3309}
3310
3311/* void glMemoryBarrierByRegion ( GLbitfield barriers ) */
3312static void
3313android_glMemoryBarrierByRegion__I
3314 (JNIEnv *_env, jobject _this, jint barriers) {
3315 glMemoryBarrierByRegion(
3316 (GLbitfield)barriers
3317 );
3318}
3319
3320/* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */
3321static void
3322android_glTexStorage2DMultisample__IIIIIZ
3323 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) {
3324 glTexStorage2DMultisample(
3325 (GLenum)target,
3326 (GLsizei)samples,
3327 (GLenum)internalformat,
3328 (GLsizei)width,
3329 (GLsizei)height,
3330 (GLboolean)fixedsamplelocations
3331 );
3332}
3333
3334/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3335static void
3336android_glGetMultisamplefv__II_3FI
3337 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) {
3338 jint _exception = 0;
3339 const char * _exceptionType = NULL;
3340 const char * _exceptionMessage = NULL;
3341 GLfloat *val_base = (GLfloat *) 0;
3342 jint _remaining;
3343 GLfloat *val = (GLfloat *) 0;
3344
3345 if (!val_ref) {
3346 _exception = 1;
3347 _exceptionType = "java/lang/IllegalArgumentException";
3348 _exceptionMessage = "val == null";
3349 goto exit;
3350 }
3351 if (offset < 0) {
3352 _exception = 1;
3353 _exceptionType = "java/lang/IllegalArgumentException";
3354 _exceptionMessage = "offset < 0";
3355 goto exit;
3356 }
3357 _remaining = _env->GetArrayLength(val_ref) - offset;
3358 val_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003359 _env->GetFloatArrayElements(val_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003360 val = val_base + offset;
3361
3362 glGetMultisamplefv(
3363 (GLenum)pname,
3364 (GLuint)index,
3365 (GLfloat *)val
3366 );
3367
3368exit:
3369 if (val_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003370 _env->ReleaseFloatArrayElements(val_ref, (jfloat*)val_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003371 _exception ? JNI_ABORT: 0);
3372 }
3373 if (_exception) {
3374 jniThrowException(_env, _exceptionType, _exceptionMessage);
3375 }
3376}
3377
3378/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
3379static void
3380android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2
3381 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003382 jint _exception = 0;
3383 const char * _exceptionType = NULL;
3384 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003385 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003386 jint _bufferOffset = (jint) 0;
3387 jint _remaining;
3388 GLfloat *val = (GLfloat *) 0;
3389
Romain Guy84cac202016-12-05 12:26:02 -08003390 if (!val_buf) {
3391 _exception = 1;
3392 _exceptionType = "java/lang/IllegalArgumentException";
3393 _exceptionMessage = "val == null";
3394 goto exit;
3395 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003396 val = (GLfloat *)getPointer(_env, val_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003397 if (val == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003398 char * _valBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003399 val = (GLfloat *) (_valBase + _bufferOffset);
3400 }
3401 glGetMultisamplefv(
3402 (GLenum)pname,
3403 (GLuint)index,
3404 (GLfloat *)val
3405 );
Romain Guy84cac202016-12-05 12:26:02 -08003406
3407exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003408 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003409 _env->ReleaseFloatArrayElements(_array, (jfloat*)val, _exception ? JNI_ABORT : 0);
3410 }
3411 if (_exception) {
3412 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003413 }
3414}
3415
3416/* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */
3417static void
3418android_glSampleMaski__II
3419 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) {
3420 glSampleMaski(
3421 (GLuint)maskNumber,
3422 (GLbitfield)mask
3423 );
3424}
3425
3426/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3427static void
3428android_glGetTexLevelParameteriv__III_3II
3429 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) {
3430 jint _exception = 0;
3431 const char * _exceptionType = NULL;
3432 const char * _exceptionMessage = NULL;
3433 GLint *params_base = (GLint *) 0;
3434 jint _remaining;
3435 GLint *params = (GLint *) 0;
3436
3437 if (!params_ref) {
3438 _exception = 1;
3439 _exceptionType = "java/lang/IllegalArgumentException";
3440 _exceptionMessage = "params == null";
3441 goto exit;
3442 }
3443 if (offset < 0) {
3444 _exception = 1;
3445 _exceptionType = "java/lang/IllegalArgumentException";
3446 _exceptionMessage = "offset < 0";
3447 goto exit;
3448 }
3449 _remaining = _env->GetArrayLength(params_ref) - offset;
3450 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003451 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003452 params = params_base + offset;
3453
3454 glGetTexLevelParameteriv(
3455 (GLenum)target,
3456 (GLint)level,
3457 (GLenum)pname,
3458 (GLint *)params
3459 );
3460
3461exit:
3462 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003463 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003464 _exception ? JNI_ABORT: 0);
3465 }
3466 if (_exception) {
3467 jniThrowException(_env, _exceptionType, _exceptionMessage);
3468 }
3469}
3470
3471/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3472static void
3473android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2
3474 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003475 jint _exception = 0;
3476 const char * _exceptionType = NULL;
3477 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003478 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003479 jint _bufferOffset = (jint) 0;
3480 jint _remaining;
3481 GLint *params = (GLint *) 0;
3482
Romain Guy84cac202016-12-05 12:26:02 -08003483 if (!params_buf) {
3484 _exception = 1;
3485 _exceptionType = "java/lang/IllegalArgumentException";
3486 _exceptionMessage = "params == null";
3487 goto exit;
3488 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003489 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003490 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003491 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003492 params = (GLint *) (_paramsBase + _bufferOffset);
3493 }
3494 glGetTexLevelParameteriv(
3495 (GLenum)target,
3496 (GLint)level,
3497 (GLenum)pname,
3498 (GLint *)params
3499 );
Romain Guy84cac202016-12-05 12:26:02 -08003500
3501exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003502 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003503 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3504 }
3505 if (_exception) {
3506 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003507 }
3508}
3509
3510/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3511static void
3512android_glGetTexLevelParameterfv__III_3FI
3513 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) {
3514 jint _exception = 0;
3515 const char * _exceptionType = NULL;
3516 const char * _exceptionMessage = NULL;
3517 GLfloat *params_base = (GLfloat *) 0;
3518 jint _remaining;
3519 GLfloat *params = (GLfloat *) 0;
3520
3521 if (!params_ref) {
3522 _exception = 1;
3523 _exceptionType = "java/lang/IllegalArgumentException";
3524 _exceptionMessage = "params == null";
3525 goto exit;
3526 }
3527 if (offset < 0) {
3528 _exception = 1;
3529 _exceptionType = "java/lang/IllegalArgumentException";
3530 _exceptionMessage = "offset < 0";
3531 goto exit;
3532 }
3533 _remaining = _env->GetArrayLength(params_ref) - offset;
3534 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003535 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003536 params = params_base + offset;
3537
3538 glGetTexLevelParameterfv(
3539 (GLenum)target,
3540 (GLint)level,
3541 (GLenum)pname,
3542 (GLfloat *)params
3543 );
3544
3545exit:
3546 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003547 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003548 _exception ? JNI_ABORT: 0);
3549 }
3550 if (_exception) {
3551 jniThrowException(_env, _exceptionType, _exceptionMessage);
3552 }
3553}
3554
3555/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3556static void
3557android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2
3558 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003559 jint _exception = 0;
3560 const char * _exceptionType = NULL;
3561 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003562 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003563 jint _bufferOffset = (jint) 0;
3564 jint _remaining;
3565 GLfloat *params = (GLfloat *) 0;
3566
Romain Guy84cac202016-12-05 12:26:02 -08003567 if (!params_buf) {
3568 _exception = 1;
3569 _exceptionType = "java/lang/IllegalArgumentException";
3570 _exceptionMessage = "params == null";
3571 goto exit;
3572 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003573 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003574 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003575 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003576 params = (GLfloat *) (_paramsBase + _bufferOffset);
3577 }
3578 glGetTexLevelParameterfv(
3579 (GLenum)target,
3580 (GLint)level,
3581 (GLenum)pname,
3582 (GLfloat *)params
3583 );
Romain Guy84cac202016-12-05 12:26:02 -08003584
3585exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003586 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003587 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3588 }
3589 if (_exception) {
3590 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003591 }
3592}
3593
3594/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
3595static void
3596android_glBindVertexBuffer__IIJI
3597 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
3598 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
3599 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
3600 return;
3601 }
3602 glBindVertexBuffer(
3603 (GLuint)bindingindex,
3604 (GLuint)buffer,
3605 (GLintptr)offset,
3606 (GLsizei)stride
3607 );
3608}
3609/* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */
3610static void
3611android_glVertexAttribFormat__IIIZI
3612 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) {
3613 glVertexAttribFormat(
3614 (GLuint)attribindex,
3615 (GLint)size,
3616 (GLenum)type,
3617 (GLboolean)normalized,
3618 (GLuint)relativeoffset
3619 );
3620}
3621
3622/* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */
3623static void
3624android_glVertexAttribIFormat__IIII
3625 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) {
3626 glVertexAttribIFormat(
3627 (GLuint)attribindex,
3628 (GLint)size,
3629 (GLenum)type,
3630 (GLuint)relativeoffset
3631 );
3632}
3633
3634/* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */
3635static void
3636android_glVertexAttribBinding__II
3637 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) {
3638 glVertexAttribBinding(
3639 (GLuint)attribindex,
3640 (GLuint)bindingindex
3641 );
3642}
3643
3644/* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */
3645static void
3646android_glVertexBindingDivisor__II
3647 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) {
3648 glVertexBindingDivisor(
3649 (GLuint)bindingindex,
3650 (GLuint)divisor
3651 );
3652}
3653
3654static const char *classPathName = "android/opengl/GLES31";
3655
Daniel Micay76f6a862015-09-19 17:31:01 -04003656static const JNINativeMethod methods[] = {
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003657{"_nativeClassInit", "()V", (void*)nativeClassInit },
3658{"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III },
3659{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
3660{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
3661{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
3662{"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III },
3663{"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II },
3664{"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 },
3665{"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II },
3666{"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 },
3667{"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 },
3668{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
3669{"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II },
3670{"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
3671{"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 },
3672{"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III },
3673{"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II },
3674{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
3675{"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I },
3676{"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II },
3677{"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 },
3678{"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II },
3679{"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 },
3680{"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I },
3681{"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II },
3682{"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 },
3683{"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III },
3684{"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII },
3685{"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII },
3686{"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII },
3687{"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III },
3688{"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII },
3689{"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII },
3690{"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII },
3691{"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF },
3692{"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF },
3693{"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF },
3694{"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF },
3695{"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II },
3696{"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 },
3697{"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II },
3698{"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 },
3699{"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II },
3700{"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 },
3701{"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II },
3702{"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 },
3703{"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II },
3704{"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 },
3705{"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II },
3706{"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 },
3707{"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II },
3708{"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 },
3709{"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II },
3710{"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 },
3711{"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI },
3712{"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 },
3713{"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI },
3714{"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 },
3715{"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI },
3716{"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 },
3717{"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI },
3718{"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 },
3719{"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI },
3720{"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 },
3721{"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI },
3722{"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 },
3723{"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI },
3724{"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 },
3725{"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI },
3726{"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 },
3727{"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI },
3728{"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 },
3729{"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI },
3730{"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 },
3731{"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI },
3732{"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 },
3733{"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI },
3734{"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 },
3735{"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI },
3736{"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 },
3737{"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I },
3738{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
3739{"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII },
3740{"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI },
3741{"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 },
3742{"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I },
3743{"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I },
3744{"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ },
3745{"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI },
3746{"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 },
3747{"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II },
3748{"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II },
3749{"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 },
3750{"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI },
3751{"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 },
3752{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
3753{"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI },
3754{"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII },
3755{"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II },
3756{"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II },
3757};
3758
3759int register_android_opengl_jni_GLES31(JNIEnv *_env)
3760{
3761 int err;
3762 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3763 return err;
3764}