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