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