1 /*
2 * Copyright 2015 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/gl32.h>
24 #include <jni.h>
25 #include <nativehelper/JNIPlatformHelp.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 glBlendBarrier ( void ) */
422 static void
android_glBlendBarrier__(JNIEnv * _env,jobject _this)423 android_glBlendBarrier__
424 (JNIEnv *_env, jobject _this) {
425 glBlendBarrier();
426 }
427
428 /* void glCopyImageSubData ( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth ) */
429 static void
android_glCopyImageSubData__IIIIIIIIIIIIIII(JNIEnv * _env,jobject _this,jint srcName,jint srcTarget,jint srcLevel,jint srcX,jint srcY,jint srcZ,jint dstName,jint dstTarget,jint dstLevel,jint dstX,jint dstY,jint dstZ,jint srcWidth,jint srcHeight,jint srcDepth)430 android_glCopyImageSubData__IIIIIIIIIIIIIII
431 (JNIEnv *_env, jobject _this, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint srcWidth, jint srcHeight, jint srcDepth) {
432 glCopyImageSubData(
433 (GLuint)srcName,
434 (GLenum)srcTarget,
435 (GLint)srcLevel,
436 (GLint)srcX,
437 (GLint)srcY,
438 (GLint)srcZ,
439 (GLuint)dstName,
440 (GLenum)dstTarget,
441 (GLint)dstLevel,
442 (GLint)dstX,
443 (GLint)dstY,
444 (GLint)dstZ,
445 (GLsizei)srcWidth,
446 (GLsizei)srcHeight,
447 (GLsizei)srcDepth
448 );
449 }
450
451 /* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
452 static void
android_glDebugMessageControl__IIII_3IIZ(JNIEnv * _env,jobject _this,jint source,jint type,jint severity,jint count,jintArray ids_ref,jint offset,jboolean enabled)453 android_glDebugMessageControl__IIII_3IIZ
454 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jintArray ids_ref, jint offset, jboolean enabled) {
455 jint _exception = 0;
456 const char * _exceptionType = NULL;
457 const char * _exceptionMessage = NULL;
458 GLuint *ids_base = (GLuint *) 0;
459 jint _remaining;
460 GLuint *ids = (GLuint *) 0;
461
462 if (!ids_ref) {
463 _exception = 1;
464 _exceptionType = "java/lang/IllegalArgumentException";
465 _exceptionMessage = "ids == null";
466 goto exit;
467 }
468 if (offset < 0) {
469 _exception = 1;
470 _exceptionType = "java/lang/IllegalArgumentException";
471 _exceptionMessage = "offset < 0";
472 goto exit;
473 }
474 _remaining = _env->GetArrayLength(ids_ref) - offset;
475 if (_remaining < count) {
476 _exception = 1;
477 _exceptionType = "java/lang/IllegalArgumentException";
478 _exceptionMessage = "length - offset < count < needed";
479 goto exit;
480 }
481 ids_base = (GLuint *)
482 _env->GetIntArrayElements(ids_ref, (jboolean *)0);
483 ids = ids_base + offset;
484
485 glDebugMessageControl(
486 (GLenum)source,
487 (GLenum)type,
488 (GLenum)severity,
489 (GLsizei)count,
490 (GLuint *)ids,
491 (GLboolean)enabled
492 );
493
494 exit:
495 if (ids_base) {
496 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base,
497 JNI_ABORT);
498 }
499 if (_exception) {
500 jniThrowException(_env, _exceptionType, _exceptionMessage);
501 }
502 }
503
504 /* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
505 static void
android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z(JNIEnv * _env,jobject _this,jint source,jint type,jint severity,jint count,jobject ids_buf,jboolean enabled)506 android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z
507 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) {
508 jint _exception = 0;
509 const char * _exceptionType = NULL;
510 const char * _exceptionMessage = NULL;
511 jintArray _array = (jintArray) 0;
512 jint _bufferOffset = (jint) 0;
513 jint _remaining;
514 GLuint *ids = (GLuint *) 0;
515
516 if (!ids_buf) {
517 _exception = 1;
518 _exceptionType = "java/lang/IllegalArgumentException";
519 _exceptionMessage = "ids == null";
520 goto exit;
521 }
522 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
523 if (_remaining < count) {
524 _exception = 1;
525 _exceptionType = "java/lang/IllegalArgumentException";
526 _exceptionMessage = "remaining() < count < needed";
527 goto exit;
528 }
529 if (ids == NULL) {
530 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
531 ids = (GLuint *) (_idsBase + _bufferOffset);
532 }
533 glDebugMessageControl(
534 (GLenum)source,
535 (GLenum)type,
536 (GLenum)severity,
537 (GLsizei)count,
538 (GLuint *)ids,
539 (GLboolean)enabled
540 );
541
542 exit:
543 if (_array) {
544 _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT);
545 }
546 if (_exception) {
547 jniThrowException(_env, _exceptionType, _exceptionMessage);
548 }
549 }
550
551 /* void glDebugMessageInsert ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
552 static void
android_glDebugMessageInsert__IIIIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint source,jint type,jint id,jint severity,jint length,jstring buf)553 android_glDebugMessageInsert__IIIIILjava_lang_String_2
554 (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jint length, jstring buf) {
555 jint _exception = 0;
556 const char * _exceptionType = NULL;
557 const char * _exceptionMessage = NULL;
558 const char* _nativebuf = 0;
559
560 if (!buf) {
561 _exception = 1;
562 _exceptionType = "java/lang/IllegalArgumentException";
563 _exceptionMessage = "buf == null";
564 goto exit;
565 }
566 _nativebuf = _env->GetStringUTFChars(buf, 0);
567
568 glDebugMessageInsert(
569 (GLenum)source,
570 (GLenum)type,
571 (GLuint)id,
572 (GLenum)severity,
573 (GLsizei)length,
574 (GLchar *)_nativebuf
575 );
576
577 exit:
578 if (_nativebuf) {
579 _env->ReleaseStringUTFChars(buf, _nativebuf);
580 }
581
582 if (_exception) {
583 jniThrowException(_env, _exceptionType, _exceptionMessage);
584 }
585 }
586
587 /* void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam ) */
588 static void
android_glDebugMessageCallback(JNIEnv * _env,jobject _this,jobject callback)589 android_glDebugMessageCallback(JNIEnv *_env, jobject _this, jobject callback) {
590 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
591 }
592 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
593 static jint
android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI(JNIEnv * _env,jobject _this,jint count,jint bufSize,jintArray sources_ref,jint sourcesOffset,jintArray types_ref,jint typesOffset,jintArray ids_ref,jint idsOffset,jintArray severities_ref,jint severitiesOffset,jintArray lengths_ref,jint lengthsOffset,jbyteArray messageLog_ref,jint messageLogOffset)594 android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI
595 (JNIEnv *_env, jobject _this, jint count, jint bufSize, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset, jintArray lengths_ref, jint lengthsOffset, jbyteArray messageLog_ref, jint messageLogOffset) {
596 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
597 return 0;
598 }
599
600 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
601 static uint
android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2(JNIEnv * _env,jobject _this,jint count,jobject sources_ref,jobject types_ref,jobject ids_ref,jobject severities_ref,jobject lengths_ref,jobject messageLog_ref)602 android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
603 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
604 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
605 return 0;
606 }
607
608 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
609 static jobjectArray
android_glGetDebugMessageLog__I_3II_3II_3II_3II(JNIEnv * _env,jobject _this,jint count,jintArray sources_ref,jint sourcesOffset,jintArray types_ref,jint typesOffset,jintArray ids_ref,jint idsOffset,jintArray severities_ref,jint severitiesOffset)610 android_glGetDebugMessageLog__I_3II_3II_3II_3II
611 (JNIEnv *_env, jobject _this, jint count, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset) {
612 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
613 return 0;
614 }
615
616 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
617 static jobjectArray
android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint count,jobject sources_ref,jobject types_ref,jobject ids_ref,jobject severities_ref)618 android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
619 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
620 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
621 return 0;
622 }
623 /* void glPushDebugGroup ( GLenum source, GLuint id, GLsizei length, const GLchar *message ) */
624 static void
android_glPushDebugGroup__IIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint source,jint id,jint length,jstring message)625 android_glPushDebugGroup__IIILjava_lang_String_2
626 (JNIEnv *_env, jobject _this, jint source, jint id, jint length, jstring message) {
627 jint _exception = 0;
628 const char * _exceptionType = NULL;
629 const char * _exceptionMessage = NULL;
630 const char* _nativemessage = 0;
631 jsize _stringlen = 0;
632
633 if (!message) {
634 _exception = 1;
635 _exceptionType = "java/lang/IllegalArgumentException";
636 _exceptionMessage = "message == null";
637 goto exit;
638 }
639 _nativemessage = _env->GetStringUTFChars(message, 0);
640 _stringlen = _env->GetStringUTFLength(message);
641 if (length > _stringlen) {
642 _exception = 1;
643 _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
644 _exceptionMessage = "length of message is shorter than length argument";
645 goto exit;
646 }
647
648 glPushDebugGroup(
649 (GLenum)source,
650 (GLuint)id,
651 (GLsizei)length,
652 (GLchar *)_nativemessage
653 );
654
655 exit:
656 if (_nativemessage) {
657 _env->ReleaseStringUTFChars(message, _nativemessage);
658 }
659
660 if (_exception) {
661 jniThrowException(_env, _exceptionType, _exceptionMessage);
662 }
663 }
664
665 /* void glPopDebugGroup ( void ) */
666 static void
android_glPopDebugGroup__(JNIEnv * _env,jobject _this)667 android_glPopDebugGroup__
668 (JNIEnv *_env, jobject _this) {
669 glPopDebugGroup();
670 }
671
672 /* void glObjectLabel ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */
673 static void
android_glObjectLabel__IIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint identifier,jint name,jint length,jstring label)674 android_glObjectLabel__IIILjava_lang_String_2
675 (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) {
676 jint _exception = 0;
677 const char * _exceptionType = NULL;
678 const char * _exceptionMessage = NULL;
679 const char* _nativelabel = 0;
680 jsize _stringlen = 0;
681
682 if (label) {
683 _nativelabel = _env->GetStringUTFChars(label, 0);
684 _stringlen = _env->GetStringUTFLength(label);
685 if (length > _stringlen) {
686 _exception = 1;
687 _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
688 _exceptionMessage = "length of label is shorter than length argument";
689 goto exit;
690 }
691 }
692
693 glObjectLabel(
694 (GLenum)identifier,
695 (GLuint)name,
696 (GLsizei)length,
697 (GLchar *)_nativelabel
698 );
699
700 exit:
701 if (_nativelabel) {
702 _env->ReleaseStringUTFChars(label, _nativelabel);
703 }
704
705 if (_exception) {
706 jniThrowException(_env, _exceptionType, _exceptionMessage);
707 }
708 }
709
710 /* void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
711 static jstring
android_glGetObjectLabel(JNIEnv * _env,jobject _this,jint identifier,jint name)712 android_glGetObjectLabel(JNIEnv *_env, jobject _this, jint identifier, jint name) {
713 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
714 return NULL;
715 }
716
717 /* void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label ) */
718 static void
android_glObjectPtrLabel(JNIEnv * _env,jobject _this,jlong ptr,jstring label)719 android_glObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
720 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
721 }
722
723 /* void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
724 static jstring
android_glGetObjectPtrLabel(JNIEnv * _env,jobject _this,jlong ptr)725 android_glGetObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr) {
726 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
727 return NULL;
728 }
729
730 /* void glGetPointerv ( GLenum pname, void **params ) */
731 static jlong
android_glGetPointerv(JNIEnv * _env,jobject _this,jint pname)732 android_glGetPointerv(JNIEnv *_env, jobject _this, jint pname) {
733 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
734 return NULL;
735 }
736
737 /* void glEnablei ( GLenum target, GLuint index ) */
738 static void
android_glEnablei__II(JNIEnv * _env,jobject _this,jint target,jint index)739 android_glEnablei__II
740 (JNIEnv *_env, jobject _this, jint target, jint index) {
741 glEnablei(
742 (GLenum)target,
743 (GLuint)index
744 );
745 }
746
747 /* void glDisablei ( GLenum target, GLuint index ) */
748 static void
android_glDisablei__II(JNIEnv * _env,jobject _this,jint target,jint index)749 android_glDisablei__II
750 (JNIEnv *_env, jobject _this, jint target, jint index) {
751 glDisablei(
752 (GLenum)target,
753 (GLuint)index
754 );
755 }
756
757 /* void glBlendEquationi ( GLuint buf, GLenum mode ) */
758 static void
android_glBlendEquationi__II(JNIEnv * _env,jobject _this,jint buf,jint mode)759 android_glBlendEquationi__II
760 (JNIEnv *_env, jobject _this, jint buf, jint mode) {
761 glBlendEquationi(
762 (GLuint)buf,
763 (GLenum)mode
764 );
765 }
766
767 /* void glBlendEquationSeparatei ( GLuint buf, GLenum modeRGB, GLenum modeAlpha ) */
768 static void
android_glBlendEquationSeparatei__III(JNIEnv * _env,jobject _this,jint buf,jint modeRGB,jint modeAlpha)769 android_glBlendEquationSeparatei__III
770 (JNIEnv *_env, jobject _this, jint buf, jint modeRGB, jint modeAlpha) {
771 glBlendEquationSeparatei(
772 (GLuint)buf,
773 (GLenum)modeRGB,
774 (GLenum)modeAlpha
775 );
776 }
777
778 /* void glBlendFunci ( GLuint buf, GLenum src, GLenum dst ) */
779 static void
android_glBlendFunci__III(JNIEnv * _env,jobject _this,jint buf,jint src,jint dst)780 android_glBlendFunci__III
781 (JNIEnv *_env, jobject _this, jint buf, jint src, jint dst) {
782 glBlendFunci(
783 (GLuint)buf,
784 (GLenum)src,
785 (GLenum)dst
786 );
787 }
788
789 /* void glBlendFuncSeparatei ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
790 static void
android_glBlendFuncSeparatei__IIIII(JNIEnv * _env,jobject _this,jint buf,jint srcRGB,jint dstRGB,jint srcAlpha,jint dstAlpha)791 android_glBlendFuncSeparatei__IIIII
792 (JNIEnv *_env, jobject _this, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
793 glBlendFuncSeparatei(
794 (GLuint)buf,
795 (GLenum)srcRGB,
796 (GLenum)dstRGB,
797 (GLenum)srcAlpha,
798 (GLenum)dstAlpha
799 );
800 }
801
802 /* void glColorMaski ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) */
803 static void
android_glColorMaski__IZZZZ(JNIEnv * _env,jobject _this,jint index,jboolean r,jboolean g,jboolean b,jboolean a)804 android_glColorMaski__IZZZZ
805 (JNIEnv *_env, jobject _this, jint index, jboolean r, jboolean g, jboolean b, jboolean a) {
806 glColorMaski(
807 (GLuint)index,
808 (GLboolean)r,
809 (GLboolean)g,
810 (GLboolean)b,
811 (GLboolean)a
812 );
813 }
814
815 /* GLboolean glIsEnabledi ( GLenum target, GLuint index ) */
816 static jboolean
android_glIsEnabledi__II(JNIEnv * _env,jobject _this,jint target,jint index)817 android_glIsEnabledi__II
818 (JNIEnv *_env, jobject _this, jint target, jint index) {
819 GLboolean _returnValue;
820 _returnValue = glIsEnabledi(
821 (GLenum)target,
822 (GLuint)index
823 );
824 return (jboolean)_returnValue;
825 }
826
827 /* void glDrawElementsBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */
828 static void
android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jobject indices_buf,jint basevertex)829 android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I
830 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint basevertex) {
831 jint _exception = 0;
832 const char * _exceptionType = NULL;
833 const char * _exceptionMessage = NULL;
834 jarray _array = (jarray) 0;
835 jint _bufferOffset = (jint) 0;
836 jint _remaining;
837 void *indices = (void *) 0;
838
839 if (!indices_buf) {
840 _exception = 1;
841 _exceptionType = "java/lang/IllegalArgumentException";
842 _exceptionMessage = "indices == null";
843 goto exit;
844 }
845 indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
846 if (_remaining < count-basevertex) {
847 _exception = 1;
848 _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
849 _exceptionMessage = "remaining() < count-basevertex < needed";
850 goto exit;
851 }
852 if (indices == NULL) {
853 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
854 indices = (void *) (_indicesBase + _bufferOffset);
855 }
856 glDrawElementsBaseVertex(
857 (GLenum)mode,
858 (GLsizei)count,
859 (GLenum)type,
860 (void *)indices,
861 (GLint)basevertex
862 );
863
864 exit:
865 if (_array) {
866 releasePointer(_env, _array, (void *)((char *)indices - _bufferOffset), JNI_FALSE);
867 }
868 if (_exception) {
869 jniThrowException(_env, _exceptionType, _exceptionMessage);
870 }
871 }
872
873 /* void glDrawRangeElementsBaseVertex ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */
874 static void
android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint mode,jint start,jint end,jint count,jint type,jobject indices_buf,jint basevertex)875 android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I
876 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf, jint basevertex) {
877 jint _exception = 0;
878 const char * _exceptionType = NULL;
879 const char * _exceptionMessage = NULL;
880 jarray _array = (jarray) 0;
881 jint _bufferOffset = (jint) 0;
882 jint _remaining;
883 void *indices = (void *) 0;
884
885 if (!indices_buf) {
886 _exception = 1;
887 _exceptionType = "java/lang/IllegalArgumentException";
888 _exceptionMessage = "indices == null";
889 goto exit;
890 }
891 indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
892 if (_remaining < count-basevertex) {
893 _exception = 1;
894 _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
895 _exceptionMessage = "remaining() < count-basevertex < needed";
896 goto exit;
897 }
898 if (indices == NULL) {
899 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
900 indices = (void *) (_indicesBase + _bufferOffset);
901 }
902 glDrawRangeElementsBaseVertex(
903 (GLenum)mode,
904 (GLuint)start,
905 (GLuint)end,
906 (GLsizei)count,
907 (GLenum)type,
908 (void *)indices,
909 (GLint)basevertex
910 );
911
912 exit:
913 if (_array) {
914 releasePointer(_env, _array, (void *)((char *)indices - _bufferOffset), JNI_FALSE);
915 }
916 if (_exception) {
917 jniThrowException(_env, _exceptionType, _exceptionMessage);
918 }
919 }
920
921 /* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
922 static void
android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jobject indices_buf,jint instanceCount,jint basevertex)923 android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II
924 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount, jint basevertex) {
925 jint _exception = 0;
926 const char * _exceptionType = NULL;
927 const char * _exceptionMessage = NULL;
928 jarray _array = (jarray) 0;
929 jint _bufferOffset = (jint) 0;
930 jint _remaining;
931 void *indices = (void *) 0;
932
933 indices = (void *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
934 if (_remaining < count-basevertex) {
935 _exception = 1;
936 _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
937 _exceptionMessage = "remaining() < count-basevertex < needed";
938 goto exit;
939 }
940 if (indices == NULL) {
941 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
942 indices = (void *) (_indicesBase + _bufferOffset);
943 }
944 glDrawElementsInstancedBaseVertex(
945 (GLenum)mode,
946 (GLsizei)count,
947 (GLenum)type,
948 (void *)indices,
949 (GLsizei)instanceCount,
950 (GLint) basevertex
951 );
952
953 exit:
954 if (_array) {
955 releasePointer(_env, _array, indices, JNI_FALSE);
956 }
957 }
958
959 /* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
960 static void
android_glDrawElementsInstancedBaseVertex__IIIIII(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jint indicesOffset,jint instanceCount,jint basevertex)961 android_glDrawElementsInstancedBaseVertex__IIIIII
962 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount, jint basevertex) {
963 glDrawElementsInstancedBaseVertex(
964 (GLenum)mode,
965 (GLsizei)count,
966 (GLenum)type,
967 (void *)static_cast<uintptr_t>(indicesOffset),
968 (GLsizei)instanceCount,
969 (GLint)basevertex
970 );
971 }
972 /* void glFramebufferTexture ( GLenum target, GLenum attachment, GLuint texture, GLint level ) */
973 static void
android_glFramebufferTexture__IIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint texture,jint level)974 android_glFramebufferTexture__IIII
975 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level) {
976 glFramebufferTexture(
977 (GLenum)target,
978 (GLenum)attachment,
979 (GLuint)texture,
980 (GLint)level
981 );
982 }
983
984 /* void glPrimitiveBoundingBox ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ) */
985 static void
android_glPrimitiveBoundingBox__FFFFFFFF(JNIEnv * _env,jobject _this,jfloat minX,jfloat minY,jfloat minZ,jfloat minW,jfloat maxX,jfloat maxY,jfloat maxZ,jfloat maxW)986 android_glPrimitiveBoundingBox__FFFFFFFF
987 (JNIEnv *_env, jobject _this, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) {
988 glPrimitiveBoundingBox(
989 (GLfloat)minX,
990 (GLfloat)minY,
991 (GLfloat)minZ,
992 (GLfloat)minW,
993 (GLfloat)maxX,
994 (GLfloat)maxY,
995 (GLfloat)maxZ,
996 (GLfloat)maxW
997 );
998 }
999
1000 /* GLenum glGetGraphicsResetStatus ( void ) */
1001 static jint
android_glGetGraphicsResetStatus__(JNIEnv * _env,jobject _this)1002 android_glGetGraphicsResetStatus__
1003 (JNIEnv *_env, jobject _this) {
1004 GLenum _returnValue;
1005 _returnValue = glGetGraphicsResetStatus();
1006 return (jint)_returnValue;
1007 }
1008
1009 /* void glReadnPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data ) */
1010 static void
android_glReadnPixels__IIIIIIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint x,jint y,jint width,jint height,jint format,jint type,jint bufSize,jobject data_buf)1011 android_glReadnPixels__IIIIIIILjava_nio_Buffer_2
1012 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jobject data_buf) {
1013 jint _exception = 0;
1014 const char * _exceptionType = NULL;
1015 const char * _exceptionMessage = NULL;
1016 jarray _array = (jarray) 0;
1017 jint _bufferOffset = (jint) 0;
1018 jint _remaining;
1019 void *data = (void *) 0;
1020
1021 if (!data_buf) {
1022 _exception = 1;
1023 _exceptionType = "java/lang/IllegalArgumentException";
1024 _exceptionMessage = "data == null";
1025 goto exit;
1026 }
1027 data = (void *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1028 if (_remaining < bufSize) {
1029 _exception = 1;
1030 _exceptionType = "java/lang/IllegalArgumentException";
1031 _exceptionMessage = "remaining() < bufSize < needed";
1032 goto exit;
1033 }
1034 if (data == NULL) {
1035 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1036 data = (void *) (_dataBase + _bufferOffset);
1037 }
1038 glReadnPixels(
1039 (GLint)x,
1040 (GLint)y,
1041 (GLsizei)width,
1042 (GLsizei)height,
1043 (GLenum)format,
1044 (GLenum)type,
1045 (GLsizei)bufSize,
1046 (void *)data
1047 );
1048
1049 exit:
1050 if (_array) {
1051 releasePointer(_env, _array, (void *)((char *)data - _bufferOffset),
1052 _exception ? JNI_FALSE : JNI_TRUE);
1053 }
1054 if (_exception) {
1055 jniThrowException(_env, _exceptionType, _exceptionMessage);
1056 }
1057 }
1058
1059 /* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */
1060 static void
android_glGetnUniformfv__III_3FI(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jfloatArray params_ref,jint offset)1061 android_glGetnUniformfv__III_3FI
1062 (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jfloatArray params_ref, jint offset) {
1063 jint _exception = 0;
1064 const char * _exceptionType = NULL;
1065 const char * _exceptionMessage = NULL;
1066 GLfloat *params_base = (GLfloat *) 0;
1067 jint _remaining;
1068 GLfloat *params = (GLfloat *) 0;
1069
1070 if (!params_ref) {
1071 _exception = 1;
1072 _exceptionType = "java/lang/IllegalArgumentException";
1073 _exceptionMessage = "params == null";
1074 goto exit;
1075 }
1076 if (offset < 0) {
1077 _exception = 1;
1078 _exceptionType = "java/lang/IllegalArgumentException";
1079 _exceptionMessage = "offset < 0";
1080 goto exit;
1081 }
1082 _remaining = _env->GetArrayLength(params_ref) - offset;
1083 if (_remaining < bufSize) {
1084 _exception = 1;
1085 _exceptionType = "java/lang/IllegalArgumentException";
1086 _exceptionMessage = "length - offset < bufSize < needed";
1087 goto exit;
1088 }
1089 params_base = (GLfloat *)
1090 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
1091 params = params_base + offset;
1092
1093 glGetnUniformfv(
1094 (GLuint)program,
1095 (GLint)location,
1096 (GLsizei)bufSize,
1097 (GLfloat *)params
1098 );
1099
1100 exit:
1101 if (params_base) {
1102 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
1103 _exception ? JNI_ABORT: 0);
1104 }
1105 if (_exception) {
1106 jniThrowException(_env, _exceptionType, _exceptionMessage);
1107 }
1108 }
1109
1110 /* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */
1111 static void
android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jobject params_buf)1112 android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2
1113 (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
1114 jint _exception = 0;
1115 const char * _exceptionType = NULL;
1116 const char * _exceptionMessage = NULL;
1117 jfloatArray _array = (jfloatArray) 0;
1118 jint _bufferOffset = (jint) 0;
1119 jint _remaining;
1120 GLfloat *params = (GLfloat *) 0;
1121
1122 if (!params_buf) {
1123 _exception = 1;
1124 _exceptionType = "java/lang/IllegalArgumentException";
1125 _exceptionMessage = "params == null";
1126 goto exit;
1127 }
1128 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1129 if (_remaining < bufSize) {
1130 _exception = 1;
1131 _exceptionType = "java/lang/IllegalArgumentException";
1132 _exceptionMessage = "remaining() < bufSize < needed";
1133 goto exit;
1134 }
1135 if (params == NULL) {
1136 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
1137 params = (GLfloat *) (_paramsBase + _bufferOffset);
1138 }
1139 glGetnUniformfv(
1140 (GLuint)program,
1141 (GLint)location,
1142 (GLsizei)bufSize,
1143 (GLfloat *)params
1144 );
1145
1146 exit:
1147 if (_array) {
1148 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
1149 }
1150 if (_exception) {
1151 jniThrowException(_env, _exceptionType, _exceptionMessage);
1152 }
1153 }
1154
1155 /* void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */
1156 static void
android_glGetnUniformiv__III_3II(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jintArray params_ref,jint offset)1157 android_glGetnUniformiv__III_3II
1158 (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) {
1159 jint _exception = 0;
1160 const char * _exceptionType = NULL;
1161 const char * _exceptionMessage = NULL;
1162 GLint *params_base = (GLint *) 0;
1163 jint _remaining;
1164 GLint *params = (GLint *) 0;
1165
1166 if (!params_ref) {
1167 _exception = 1;
1168 _exceptionType = "java/lang/IllegalArgumentException";
1169 _exceptionMessage = "params == null";
1170 goto exit;
1171 }
1172 if (offset < 0) {
1173 _exception = 1;
1174 _exceptionType = "java/lang/IllegalArgumentException";
1175 _exceptionMessage = "offset < 0";
1176 goto exit;
1177 }
1178 _remaining = _env->GetArrayLength(params_ref) - offset;
1179 if (_remaining < bufSize) {
1180 _exception = 1;
1181 _exceptionType = "java/lang/IllegalArgumentException";
1182 _exceptionMessage = "length - offset < bufSize < needed";
1183 goto exit;
1184 }
1185 params_base = (GLint *)
1186 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1187 params = params_base + offset;
1188
1189 glGetnUniformiv(
1190 (GLuint)program,
1191 (GLint)location,
1192 (GLsizei)bufSize,
1193 (GLint *)params
1194 );
1195
1196 exit:
1197 if (params_base) {
1198 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1199 _exception ? JNI_ABORT: 0);
1200 }
1201 if (_exception) {
1202 jniThrowException(_env, _exceptionType, _exceptionMessage);
1203 }
1204 }
1205
1206 /* void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */
1207 static void
android_glGetnUniformiv__IIILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jobject params_buf)1208 android_glGetnUniformiv__IIILjava_nio_IntBuffer_2
1209 (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
1210 jint _exception = 0;
1211 const char * _exceptionType = NULL;
1212 const char * _exceptionMessage = NULL;
1213 jintArray _array = (jintArray) 0;
1214 jint _bufferOffset = (jint) 0;
1215 jint _remaining;
1216 GLint *params = (GLint *) 0;
1217
1218 if (!params_buf) {
1219 _exception = 1;
1220 _exceptionType = "java/lang/IllegalArgumentException";
1221 _exceptionMessage = "params == null";
1222 goto exit;
1223 }
1224 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1225 if (_remaining < bufSize) {
1226 _exception = 1;
1227 _exceptionType = "java/lang/IllegalArgumentException";
1228 _exceptionMessage = "remaining() < bufSize < needed";
1229 goto exit;
1230 }
1231 if (params == NULL) {
1232 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1233 params = (GLint *) (_paramsBase + _bufferOffset);
1234 }
1235 glGetnUniformiv(
1236 (GLuint)program,
1237 (GLint)location,
1238 (GLsizei)bufSize,
1239 (GLint *)params
1240 );
1241
1242 exit:
1243 if (_array) {
1244 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1245 }
1246 if (_exception) {
1247 jniThrowException(_env, _exceptionType, _exceptionMessage);
1248 }
1249 }
1250
1251 /* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */
1252 static void
android_glGetnUniformuiv__III_3II(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jintArray params_ref,jint offset)1253 android_glGetnUniformuiv__III_3II
1254 (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) {
1255 jint _exception = 0;
1256 const char * _exceptionType = NULL;
1257 const char * _exceptionMessage = NULL;
1258 GLuint *params_base = (GLuint *) 0;
1259 jint _remaining;
1260 GLuint *params = (GLuint *) 0;
1261
1262 if (!params_ref) {
1263 _exception = 1;
1264 _exceptionType = "java/lang/IllegalArgumentException";
1265 _exceptionMessage = "params == null";
1266 goto exit;
1267 }
1268 if (offset < 0) {
1269 _exception = 1;
1270 _exceptionType = "java/lang/IllegalArgumentException";
1271 _exceptionMessage = "offset < 0";
1272 goto exit;
1273 }
1274 _remaining = _env->GetArrayLength(params_ref) - offset;
1275 if (_remaining < bufSize) {
1276 _exception = 1;
1277 _exceptionType = "java/lang/IllegalArgumentException";
1278 _exceptionMessage = "length - offset < bufSize < needed";
1279 goto exit;
1280 }
1281 params_base = (GLuint *)
1282 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1283 params = params_base + offset;
1284
1285 glGetnUniformuiv(
1286 (GLuint)program,
1287 (GLint)location,
1288 (GLsizei)bufSize,
1289 (GLuint *)params
1290 );
1291
1292 exit:
1293 if (params_base) {
1294 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1295 _exception ? JNI_ABORT: 0);
1296 }
1297 if (_exception) {
1298 jniThrowException(_env, _exceptionType, _exceptionMessage);
1299 }
1300 }
1301
1302 /* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */
1303 static void
android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jobject params_buf)1304 android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2
1305 (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
1306 jint _exception = 0;
1307 const char * _exceptionType = NULL;
1308 const char * _exceptionMessage = NULL;
1309 jintArray _array = (jintArray) 0;
1310 jint _bufferOffset = (jint) 0;
1311 jint _remaining;
1312 GLuint *params = (GLuint *) 0;
1313
1314 if (!params_buf) {
1315 _exception = 1;
1316 _exceptionType = "java/lang/IllegalArgumentException";
1317 _exceptionMessage = "params == null";
1318 goto exit;
1319 }
1320 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1321 if (_remaining < bufSize) {
1322 _exception = 1;
1323 _exceptionType = "java/lang/IllegalArgumentException";
1324 _exceptionMessage = "remaining() < bufSize < needed";
1325 goto exit;
1326 }
1327 if (params == NULL) {
1328 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1329 params = (GLuint *) (_paramsBase + _bufferOffset);
1330 }
1331 glGetnUniformuiv(
1332 (GLuint)program,
1333 (GLint)location,
1334 (GLsizei)bufSize,
1335 (GLuint *)params
1336 );
1337
1338 exit:
1339 if (_array) {
1340 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1341 }
1342 if (_exception) {
1343 jniThrowException(_env, _exceptionType, _exceptionMessage);
1344 }
1345 }
1346
1347 /* void glMinSampleShading ( GLfloat value ) */
1348 static void
android_glMinSampleShading__F(JNIEnv * _env,jobject _this,jfloat value)1349 android_glMinSampleShading__F
1350 (JNIEnv *_env, jobject _this, jfloat value) {
1351 glMinSampleShading(
1352 (GLfloat)value
1353 );
1354 }
1355
1356 /* void glPatchParameteri ( GLenum pname, GLint value ) */
1357 static void
android_glPatchParameteri__II(JNIEnv * _env,jobject _this,jint pname,jint value)1358 android_glPatchParameteri__II
1359 (JNIEnv *_env, jobject _this, jint pname, jint value) {
1360 glPatchParameteri(
1361 (GLenum)pname,
1362 (GLint)value
1363 );
1364 }
1365
1366 /* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */
1367 static void
android_glTexParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1368 android_glTexParameterIiv__II_3II
1369 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1370 jint _exception = 0;
1371 const char * _exceptionType = NULL;
1372 const char * _exceptionMessage = NULL;
1373 GLint *params_base = (GLint *) 0;
1374 jint _remaining;
1375 GLint *params = (GLint *) 0;
1376
1377 if (!params_ref) {
1378 _exception = 1;
1379 _exceptionType = "java/lang/IllegalArgumentException";
1380 _exceptionMessage = "params == null";
1381 goto exit;
1382 }
1383 if (offset < 0) {
1384 _exception = 1;
1385 _exceptionType = "java/lang/IllegalArgumentException";
1386 _exceptionMessage = "offset < 0";
1387 goto exit;
1388 }
1389 _remaining = _env->GetArrayLength(params_ref) - offset;
1390 params_base = (GLint *)
1391 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1392 params = params_base + offset;
1393
1394 glTexParameterIiv(
1395 (GLenum)target,
1396 (GLenum)pname,
1397 (GLint *)params
1398 );
1399
1400 exit:
1401 if (params_base) {
1402 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1403 JNI_ABORT);
1404 }
1405 if (_exception) {
1406 jniThrowException(_env, _exceptionType, _exceptionMessage);
1407 }
1408 }
1409
1410 /* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */
1411 static void
android_glTexParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1412 android_glTexParameterIiv__IILjava_nio_IntBuffer_2
1413 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1414 jint _exception = 0;
1415 const char * _exceptionType = NULL;
1416 const char * _exceptionMessage = NULL;
1417 jintArray _array = (jintArray) 0;
1418 jint _bufferOffset = (jint) 0;
1419 jint _remaining;
1420 GLint *params = (GLint *) 0;
1421
1422 if (!params_buf) {
1423 _exception = 1;
1424 _exceptionType = "java/lang/IllegalArgumentException";
1425 _exceptionMessage = "params == null";
1426 goto exit;
1427 }
1428 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1429 if (params == NULL) {
1430 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1431 params = (GLint *) (_paramsBase + _bufferOffset);
1432 }
1433 glTexParameterIiv(
1434 (GLenum)target,
1435 (GLenum)pname,
1436 (GLint *)params
1437 );
1438
1439 exit:
1440 if (_array) {
1441 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1442 }
1443 if (_exception) {
1444 jniThrowException(_env, _exceptionType, _exceptionMessage);
1445 }
1446 }
1447
1448 /* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */
1449 static void
android_glTexParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1450 android_glTexParameterIuiv__II_3II
1451 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1452 jint _exception = 0;
1453 const char * _exceptionType = NULL;
1454 const char * _exceptionMessage = NULL;
1455 GLuint *params_base = (GLuint *) 0;
1456 jint _remaining;
1457 GLuint *params = (GLuint *) 0;
1458
1459 if (!params_ref) {
1460 _exception = 1;
1461 _exceptionType = "java/lang/IllegalArgumentException";
1462 _exceptionMessage = "params == null";
1463 goto exit;
1464 }
1465 if (offset < 0) {
1466 _exception = 1;
1467 _exceptionType = "java/lang/IllegalArgumentException";
1468 _exceptionMessage = "offset < 0";
1469 goto exit;
1470 }
1471 _remaining = _env->GetArrayLength(params_ref) - offset;
1472 params_base = (GLuint *)
1473 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1474 params = params_base + offset;
1475
1476 glTexParameterIuiv(
1477 (GLenum)target,
1478 (GLenum)pname,
1479 (GLuint *)params
1480 );
1481
1482 exit:
1483 if (params_base) {
1484 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1485 JNI_ABORT);
1486 }
1487 if (_exception) {
1488 jniThrowException(_env, _exceptionType, _exceptionMessage);
1489 }
1490 }
1491
1492 /* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */
1493 static void
android_glTexParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1494 android_glTexParameterIuiv__IILjava_nio_IntBuffer_2
1495 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1496 jint _exception = 0;
1497 const char * _exceptionType = NULL;
1498 const char * _exceptionMessage = NULL;
1499 jintArray _array = (jintArray) 0;
1500 jint _bufferOffset = (jint) 0;
1501 jint _remaining;
1502 GLuint *params = (GLuint *) 0;
1503
1504 if (!params_buf) {
1505 _exception = 1;
1506 _exceptionType = "java/lang/IllegalArgumentException";
1507 _exceptionMessage = "params == null";
1508 goto exit;
1509 }
1510 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1511 if (params == NULL) {
1512 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1513 params = (GLuint *) (_paramsBase + _bufferOffset);
1514 }
1515 glTexParameterIuiv(
1516 (GLenum)target,
1517 (GLenum)pname,
1518 (GLuint *)params
1519 );
1520
1521 exit:
1522 if (_array) {
1523 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1524 }
1525 if (_exception) {
1526 jniThrowException(_env, _exceptionType, _exceptionMessage);
1527 }
1528 }
1529
1530 /* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */
1531 static void
android_glGetTexParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1532 android_glGetTexParameterIiv__II_3II
1533 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1534 jint _exception = 0;
1535 const char * _exceptionType = NULL;
1536 const char * _exceptionMessage = NULL;
1537 GLint *params_base = (GLint *) 0;
1538 jint _remaining;
1539 GLint *params = (GLint *) 0;
1540
1541 if (!params_ref) {
1542 _exception = 1;
1543 _exceptionType = "java/lang/IllegalArgumentException";
1544 _exceptionMessage = "params == null";
1545 goto exit;
1546 }
1547 if (offset < 0) {
1548 _exception = 1;
1549 _exceptionType = "java/lang/IllegalArgumentException";
1550 _exceptionMessage = "offset < 0";
1551 goto exit;
1552 }
1553 _remaining = _env->GetArrayLength(params_ref) - offset;
1554 params_base = (GLint *)
1555 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1556 params = params_base + offset;
1557
1558 glGetTexParameterIiv(
1559 (GLenum)target,
1560 (GLenum)pname,
1561 (GLint *)params
1562 );
1563
1564 exit:
1565 if (params_base) {
1566 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1567 _exception ? JNI_ABORT: 0);
1568 }
1569 if (_exception) {
1570 jniThrowException(_env, _exceptionType, _exceptionMessage);
1571 }
1572 }
1573
1574 /* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */
1575 static void
android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1576 android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2
1577 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1578 jint _exception = 0;
1579 const char * _exceptionType = NULL;
1580 const char * _exceptionMessage = NULL;
1581 jintArray _array = (jintArray) 0;
1582 jint _bufferOffset = (jint) 0;
1583 jint _remaining;
1584 GLint *params = (GLint *) 0;
1585
1586 if (!params_buf) {
1587 _exception = 1;
1588 _exceptionType = "java/lang/IllegalArgumentException";
1589 _exceptionMessage = "params == null";
1590 goto exit;
1591 }
1592 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1593 if (params == NULL) {
1594 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1595 params = (GLint *) (_paramsBase + _bufferOffset);
1596 }
1597 glGetTexParameterIiv(
1598 (GLenum)target,
1599 (GLenum)pname,
1600 (GLint *)params
1601 );
1602
1603 exit:
1604 if (_array) {
1605 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1606 }
1607 if (_exception) {
1608 jniThrowException(_env, _exceptionType, _exceptionMessage);
1609 }
1610 }
1611
1612 /* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */
1613 static void
android_glGetTexParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1614 android_glGetTexParameterIuiv__II_3II
1615 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1616 jint _exception = 0;
1617 const char * _exceptionType = NULL;
1618 const char * _exceptionMessage = NULL;
1619 GLuint *params_base = (GLuint *) 0;
1620 jint _remaining;
1621 GLuint *params = (GLuint *) 0;
1622
1623 if (!params_ref) {
1624 _exception = 1;
1625 _exceptionType = "java/lang/IllegalArgumentException";
1626 _exceptionMessage = "params == null";
1627 goto exit;
1628 }
1629 if (offset < 0) {
1630 _exception = 1;
1631 _exceptionType = "java/lang/IllegalArgumentException";
1632 _exceptionMessage = "offset < 0";
1633 goto exit;
1634 }
1635 _remaining = _env->GetArrayLength(params_ref) - offset;
1636 params_base = (GLuint *)
1637 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1638 params = params_base + offset;
1639
1640 glGetTexParameterIuiv(
1641 (GLenum)target,
1642 (GLenum)pname,
1643 (GLuint *)params
1644 );
1645
1646 exit:
1647 if (params_base) {
1648 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1649 _exception ? JNI_ABORT: 0);
1650 }
1651 if (_exception) {
1652 jniThrowException(_env, _exceptionType, _exceptionMessage);
1653 }
1654 }
1655
1656 /* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */
1657 static void
android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1658 android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2
1659 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1660 jint _exception = 0;
1661 const char * _exceptionType = NULL;
1662 const char * _exceptionMessage = NULL;
1663 jintArray _array = (jintArray) 0;
1664 jint _bufferOffset = (jint) 0;
1665 jint _remaining;
1666 GLuint *params = (GLuint *) 0;
1667
1668 if (!params_buf) {
1669 _exception = 1;
1670 _exceptionType = "java/lang/IllegalArgumentException";
1671 _exceptionMessage = "params == null";
1672 goto exit;
1673 }
1674 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1675 if (params == NULL) {
1676 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1677 params = (GLuint *) (_paramsBase + _bufferOffset);
1678 }
1679 glGetTexParameterIuiv(
1680 (GLenum)target,
1681 (GLenum)pname,
1682 (GLuint *)params
1683 );
1684
1685 exit:
1686 if (_array) {
1687 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1688 }
1689 if (_exception) {
1690 jniThrowException(_env, _exceptionType, _exceptionMessage);
1691 }
1692 }
1693
1694 /* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */
1695 static void
android_glSamplerParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray param_ref,jint offset)1696 android_glSamplerParameterIiv__II_3II
1697 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1698 jint _exception = 0;
1699 const char * _exceptionType = NULL;
1700 const char * _exceptionMessage = NULL;
1701 GLint *param_base = (GLint *) 0;
1702 jint _remaining;
1703 GLint *param = (GLint *) 0;
1704
1705 if (!param_ref) {
1706 _exception = 1;
1707 _exceptionType = "java/lang/IllegalArgumentException";
1708 _exceptionMessage = "param == null";
1709 goto exit;
1710 }
1711 if (offset < 0) {
1712 _exception = 1;
1713 _exceptionType = "java/lang/IllegalArgumentException";
1714 _exceptionMessage = "offset < 0";
1715 goto exit;
1716 }
1717 _remaining = _env->GetArrayLength(param_ref) - offset;
1718 param_base = (GLint *)
1719 _env->GetIntArrayElements(param_ref, (jboolean *)0);
1720 param = param_base + offset;
1721
1722 glSamplerParameterIiv(
1723 (GLuint)sampler,
1724 (GLenum)pname,
1725 (GLint *)param
1726 );
1727
1728 exit:
1729 if (param_base) {
1730 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
1731 JNI_ABORT);
1732 }
1733 if (_exception) {
1734 jniThrowException(_env, _exceptionType, _exceptionMessage);
1735 }
1736 }
1737
1738 /* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */
1739 static void
android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject param_buf)1740 android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2
1741 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
1742 jint _exception = 0;
1743 const char * _exceptionType = NULL;
1744 const char * _exceptionMessage = NULL;
1745 jintArray _array = (jintArray) 0;
1746 jint _bufferOffset = (jint) 0;
1747 jint _remaining;
1748 GLint *param = (GLint *) 0;
1749
1750 if (!param_buf) {
1751 _exception = 1;
1752 _exceptionType = "java/lang/IllegalArgumentException";
1753 _exceptionMessage = "param == null";
1754 goto exit;
1755 }
1756 param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1757 if (param == NULL) {
1758 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1759 param = (GLint *) (_paramBase + _bufferOffset);
1760 }
1761 glSamplerParameterIiv(
1762 (GLuint)sampler,
1763 (GLenum)pname,
1764 (GLint *)param
1765 );
1766
1767 exit:
1768 if (_array) {
1769 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
1770 }
1771 if (_exception) {
1772 jniThrowException(_env, _exceptionType, _exceptionMessage);
1773 }
1774 }
1775
1776 /* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */
1777 static void
android_glSamplerParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray param_ref,jint offset)1778 android_glSamplerParameterIuiv__II_3II
1779 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1780 jint _exception = 0;
1781 const char * _exceptionType = NULL;
1782 const char * _exceptionMessage = NULL;
1783 GLuint *param_base = (GLuint *) 0;
1784 jint _remaining;
1785 GLuint *param = (GLuint *) 0;
1786
1787 if (!param_ref) {
1788 _exception = 1;
1789 _exceptionType = "java/lang/IllegalArgumentException";
1790 _exceptionMessage = "param == null";
1791 goto exit;
1792 }
1793 if (offset < 0) {
1794 _exception = 1;
1795 _exceptionType = "java/lang/IllegalArgumentException";
1796 _exceptionMessage = "offset < 0";
1797 goto exit;
1798 }
1799 _remaining = _env->GetArrayLength(param_ref) - offset;
1800 param_base = (GLuint *)
1801 _env->GetIntArrayElements(param_ref, (jboolean *)0);
1802 param = param_base + offset;
1803
1804 glSamplerParameterIuiv(
1805 (GLuint)sampler,
1806 (GLenum)pname,
1807 (GLuint *)param
1808 );
1809
1810 exit:
1811 if (param_base) {
1812 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
1813 JNI_ABORT);
1814 }
1815 if (_exception) {
1816 jniThrowException(_env, _exceptionType, _exceptionMessage);
1817 }
1818 }
1819
1820 /* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */
1821 static void
android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject param_buf)1822 android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2
1823 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
1824 jint _exception = 0;
1825 const char * _exceptionType = NULL;
1826 const char * _exceptionMessage = NULL;
1827 jintArray _array = (jintArray) 0;
1828 jint _bufferOffset = (jint) 0;
1829 jint _remaining;
1830 GLuint *param = (GLuint *) 0;
1831
1832 if (!param_buf) {
1833 _exception = 1;
1834 _exceptionType = "java/lang/IllegalArgumentException";
1835 _exceptionMessage = "param == null";
1836 goto exit;
1837 }
1838 param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1839 if (param == NULL) {
1840 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1841 param = (GLuint *) (_paramBase + _bufferOffset);
1842 }
1843 glSamplerParameterIuiv(
1844 (GLuint)sampler,
1845 (GLenum)pname,
1846 (GLuint *)param
1847 );
1848
1849 exit:
1850 if (_array) {
1851 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
1852 }
1853 if (_exception) {
1854 jniThrowException(_env, _exceptionType, _exceptionMessage);
1855 }
1856 }
1857
1858 /* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */
1859 static void
android_glGetSamplerParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray params_ref,jint offset)1860 android_glGetSamplerParameterIiv__II_3II
1861 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1862 jint _exception = 0;
1863 const char * _exceptionType = NULL;
1864 const char * _exceptionMessage = NULL;
1865 GLint *params_base = (GLint *) 0;
1866 jint _remaining;
1867 GLint *params = (GLint *) 0;
1868
1869 if (!params_ref) {
1870 _exception = 1;
1871 _exceptionType = "java/lang/IllegalArgumentException";
1872 _exceptionMessage = "params == null";
1873 goto exit;
1874 }
1875 if (offset < 0) {
1876 _exception = 1;
1877 _exceptionType = "java/lang/IllegalArgumentException";
1878 _exceptionMessage = "offset < 0";
1879 goto exit;
1880 }
1881 _remaining = _env->GetArrayLength(params_ref) - offset;
1882 params_base = (GLint *)
1883 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1884 params = params_base + offset;
1885
1886 glGetSamplerParameterIiv(
1887 (GLuint)sampler,
1888 (GLenum)pname,
1889 (GLint *)params
1890 );
1891
1892 exit:
1893 if (params_base) {
1894 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1895 _exception ? JNI_ABORT: 0);
1896 }
1897 if (_exception) {
1898 jniThrowException(_env, _exceptionType, _exceptionMessage);
1899 }
1900 }
1901
1902 /* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */
1903 static void
android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject params_buf)1904 android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2
1905 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
1906 jint _exception = 0;
1907 const char * _exceptionType = NULL;
1908 const char * _exceptionMessage = NULL;
1909 jintArray _array = (jintArray) 0;
1910 jint _bufferOffset = (jint) 0;
1911 jint _remaining;
1912 GLint *params = (GLint *) 0;
1913
1914 if (!params_buf) {
1915 _exception = 1;
1916 _exceptionType = "java/lang/IllegalArgumentException";
1917 _exceptionMessage = "params == null";
1918 goto exit;
1919 }
1920 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1921 if (params == NULL) {
1922 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1923 params = (GLint *) (_paramsBase + _bufferOffset);
1924 }
1925 glGetSamplerParameterIiv(
1926 (GLuint)sampler,
1927 (GLenum)pname,
1928 (GLint *)params
1929 );
1930
1931 exit:
1932 if (_array) {
1933 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1934 }
1935 if (_exception) {
1936 jniThrowException(_env, _exceptionType, _exceptionMessage);
1937 }
1938 }
1939
1940 /* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */
1941 static void
android_glGetSamplerParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray params_ref,jint offset)1942 android_glGetSamplerParameterIuiv__II_3II
1943 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1944 jint _exception = 0;
1945 const char * _exceptionType = NULL;
1946 const char * _exceptionMessage = NULL;
1947 GLuint *params_base = (GLuint *) 0;
1948 jint _remaining;
1949 GLuint *params = (GLuint *) 0;
1950
1951 if (!params_ref) {
1952 _exception = 1;
1953 _exceptionType = "java/lang/IllegalArgumentException";
1954 _exceptionMessage = "params == null";
1955 goto exit;
1956 }
1957 if (offset < 0) {
1958 _exception = 1;
1959 _exceptionType = "java/lang/IllegalArgumentException";
1960 _exceptionMessage = "offset < 0";
1961 goto exit;
1962 }
1963 _remaining = _env->GetArrayLength(params_ref) - offset;
1964 params_base = (GLuint *)
1965 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1966 params = params_base + offset;
1967
1968 glGetSamplerParameterIuiv(
1969 (GLuint)sampler,
1970 (GLenum)pname,
1971 (GLuint *)params
1972 );
1973
1974 exit:
1975 if (params_base) {
1976 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1977 _exception ? JNI_ABORT: 0);
1978 }
1979 if (_exception) {
1980 jniThrowException(_env, _exceptionType, _exceptionMessage);
1981 }
1982 }
1983
1984 /* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */
1985 static void
android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject params_buf)1986 android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2
1987 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
1988 jint _exception = 0;
1989 const char * _exceptionType = NULL;
1990 const char * _exceptionMessage = NULL;
1991 jintArray _array = (jintArray) 0;
1992 jint _bufferOffset = (jint) 0;
1993 jint _remaining;
1994 GLuint *params = (GLuint *) 0;
1995
1996 if (!params_buf) {
1997 _exception = 1;
1998 _exceptionType = "java/lang/IllegalArgumentException";
1999 _exceptionMessage = "params == null";
2000 goto exit;
2001 }
2002 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2003 if (params == NULL) {
2004 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2005 params = (GLuint *) (_paramsBase + _bufferOffset);
2006 }
2007 glGetSamplerParameterIuiv(
2008 (GLuint)sampler,
2009 (GLenum)pname,
2010 (GLuint *)params
2011 );
2012
2013 exit:
2014 if (_array) {
2015 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
2016 }
2017 if (_exception) {
2018 jniThrowException(_env, _exceptionType, _exceptionMessage);
2019 }
2020 }
2021
2022 /* void glTexBuffer ( GLenum target, GLenum internalformat, GLuint buffer ) */
2023 static void
android_glTexBuffer__III(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint buffer)2024 android_glTexBuffer__III
2025 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer) {
2026 glTexBuffer(
2027 (GLenum)target,
2028 (GLenum)internalformat,
2029 (GLuint)buffer
2030 );
2031 }
2032
2033 /* void glTexBufferRange ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
2034 static void
android_glTexBufferRange__IIIII(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint buffer,jint offset,jint size)2035 android_glTexBufferRange__IIIII
2036 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer, jint offset, jint size) {
2037 glTexBufferRange(
2038 (GLenum)target,
2039 (GLenum)internalformat,
2040 (GLuint)buffer,
2041 (GLintptr)offset,
2042 (GLsizeiptr)size
2043 );
2044 }
2045
2046 /* void glTexStorage3DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations ) */
2047 static void
android_glTexStorage3DMultisample__IIIIIIZ(JNIEnv * _env,jobject _this,jint target,jint samples,jint internalformat,jint width,jint height,jint depth,jboolean fixedsamplelocations)2048 android_glTexStorage3DMultisample__IIIIIIZ
2049 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) {
2050 glTexStorage3DMultisample(
2051 (GLenum)target,
2052 (GLsizei)samples,
2053 (GLenum)internalformat,
2054 (GLsizei)width,
2055 (GLsizei)height,
2056 (GLsizei)depth,
2057 (GLboolean)fixedsamplelocations
2058 );
2059 }
2060
2061 static const char *classPathName = "android/opengl/GLES32";
2062
2063 static const JNINativeMethod methods[] = {
2064 {"_nativeClassInit", "()V", (void*)nativeClassInit },
2065 {"glBlendBarrier", "()V", (void *) android_glBlendBarrier__ },
2066 {"glCopyImageSubData", "(IIIIIIIIIIIIIII)V", (void *) android_glCopyImageSubData__IIIIIIIIIIIIIII },
2067 {"glDebugMessageControl", "(IIII[IIZ)V", (void *) android_glDebugMessageControl__IIII_3IIZ },
2068 {"glDebugMessageControl", "(IIIILjava/nio/IntBuffer;Z)V", (void *) android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z },
2069 {"glDebugMessageInsert", "(IIIIILjava/lang/String;)V", (void *) android_glDebugMessageInsert__IIIIILjava_lang_String_2 },
2070 {"glDebugMessageCallback", "(Landroid/opengl/GLES32$DebugProc;)V", (void *) android_glDebugMessageCallback },
2071 {"glGetDebugMessageLog", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI },
2072 {"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)I", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 },
2073 {"glGetDebugMessageLog", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__I_3II_3II_3II_3II },
2074 {"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
2075 {"glPushDebugGroup", "(IIILjava/lang/String;)V", (void *) android_glPushDebugGroup__IIILjava_lang_String_2 },
2076 {"glPopDebugGroup", "()V", (void *) android_glPopDebugGroup__ },
2077 {"glObjectLabel", "(IIILjava/lang/String;)V", (void *) android_glObjectLabel__IIILjava_lang_String_2 },
2078 {"glGetObjectLabel", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabel },
2079 {"glObjectPtrLabel", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabel },
2080 {"glGetObjectPtrLabel", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabel },
2081 {"glGetPointerv", "(I)J", (void *) android_glGetPointerv },
2082 {"glEnablei", "(II)V", (void *) android_glEnablei__II },
2083 {"glDisablei", "(II)V", (void *) android_glDisablei__II },
2084 {"glBlendEquationi", "(II)V", (void *) android_glBlendEquationi__II },
2085 {"glBlendEquationSeparatei", "(III)V", (void *) android_glBlendEquationSeparatei__III },
2086 {"glBlendFunci", "(III)V", (void *) android_glBlendFunci__III },
2087 {"glBlendFuncSeparatei", "(IIIII)V", (void *) android_glBlendFuncSeparatei__IIIII },
2088 {"glColorMaski", "(IZZZZ)V", (void *) android_glColorMaski__IZZZZ },
2089 {"glIsEnabledi", "(II)Z", (void *) android_glIsEnabledi__II },
2090 {"glDrawElementsBaseVertex", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I },
2091 {"glDrawRangeElementsBaseVertex", "(IIIIILjava/nio/Buffer;I)V", (void *) android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I },
2092 {"glDrawElementsInstancedBaseVertex", "(IIILjava/nio/Buffer;II)V", (void *) android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II },
2093 {"glDrawElementsInstancedBaseVertex", "(IIIIII)V", (void *) android_glDrawElementsInstancedBaseVertex__IIIIII },
2094 {"glFramebufferTexture", "(IIII)V", (void *) android_glFramebufferTexture__IIII },
2095 {"glPrimitiveBoundingBox", "(FFFFFFFF)V", (void *) android_glPrimitiveBoundingBox__FFFFFFFF },
2096 {"glGetGraphicsResetStatus", "()I", (void *) android_glGetGraphicsResetStatus__ },
2097 {"glReadnPixels", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glReadnPixels__IIIIIIILjava_nio_Buffer_2 },
2098 {"glGetnUniformfv", "(III[FI)V", (void *) android_glGetnUniformfv__III_3FI },
2099 {"glGetnUniformfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2 },
2100 {"glGetnUniformiv", "(III[II)V", (void *) android_glGetnUniformiv__III_3II },
2101 {"glGetnUniformiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformiv__IIILjava_nio_IntBuffer_2 },
2102 {"glGetnUniformuiv", "(III[II)V", (void *) android_glGetnUniformuiv__III_3II },
2103 {"glGetnUniformuiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2 },
2104 {"glMinSampleShading", "(F)V", (void *) android_glMinSampleShading__F },
2105 {"glPatchParameteri", "(II)V", (void *) android_glPatchParameteri__II },
2106 {"glTexParameterIiv", "(II[II)V", (void *) android_glTexParameterIiv__II_3II },
2107 {"glTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIiv__IILjava_nio_IntBuffer_2 },
2108 {"glTexParameterIuiv", "(II[II)V", (void *) android_glTexParameterIuiv__II_3II },
2109 {"glTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIuiv__IILjava_nio_IntBuffer_2 },
2110 {"glGetTexParameterIiv", "(II[II)V", (void *) android_glGetTexParameterIiv__II_3II },
2111 {"glGetTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2 },
2112 {"glGetTexParameterIuiv", "(II[II)V", (void *) android_glGetTexParameterIuiv__II_3II },
2113 {"glGetTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2 },
2114 {"glSamplerParameterIiv", "(II[II)V", (void *) android_glSamplerParameterIiv__II_3II },
2115 {"glSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2 },
2116 {"glSamplerParameterIuiv", "(II[II)V", (void *) android_glSamplerParameterIuiv__II_3II },
2117 {"glSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2 },
2118 {"glGetSamplerParameterIiv", "(II[II)V", (void *) android_glGetSamplerParameterIiv__II_3II },
2119 {"glGetSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2 },
2120 {"glGetSamplerParameterIuiv", "(II[II)V", (void *) android_glGetSamplerParameterIuiv__II_3II },
2121 {"glGetSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2 },
2122 {"glTexBuffer", "(III)V", (void *) android_glTexBuffer__III },
2123 {"glTexBufferRange", "(IIIII)V", (void *) android_glTexBufferRange__IIIII },
2124 {"glTexStorage3DMultisample", "(IIIIIIZ)V", (void *) android_glTexStorage3DMultisample__IIIIIIZ },
2125 };
2126
register_android_opengl_jni_GLES32(JNIEnv * _env)2127 int register_android_opengl_jni_GLES32(JNIEnv *_env)
2128 {
2129 int err;
2130 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
2131 return err;
2132 }
2133