• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-but-set-variable"
21 #pragma GCC diagnostic ignored "-Wunused-function"
22 
23 #include <stdint.h>
24 #include <GLES3/gl32.h>
25 #include <jni.h>
26 #include <nativehelper/JNIPlatformHelp.h>
27 #include <android_runtime/AndroidRuntime.h>
28 #include <utils/misc.h>
29 #include <assert.h>
30 
31 
32 /* special calls implemented in Android's GLES wrapper used to more
33  * efficiently bound-check passed arrays */
34 extern "C" {
35 #ifdef GL_VERSION_ES_CM_1_1
36 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
37         const GLvoid *ptr, GLsizei count);
38 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
39         const GLvoid *pointer, GLsizei count);
40 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
41         GLsizei stride, const GLvoid *pointer, GLsizei count);
42 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
43         GLsizei stride, const GLvoid *pointer, GLsizei count);
44 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
45         GLsizei stride, const GLvoid *pointer, GLsizei count);
46 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
47         GLsizei stride, const GLvoid *pointer, GLsizei count);
48 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
49         GLsizei stride, const GLvoid *pointer, GLsizei count);
50 #endif
51 #ifdef GL_ES_VERSION_2_0
glVertexAttribPointerBounds(GLuint indx,GLint size,GLenum type,GLboolean normalized,GLsizei stride,const GLvoid * pointer,GLsizei count)52 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
53         GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
54     glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
55 }
56 #endif
57 #ifdef GL_ES_VERSION_3_0
glVertexAttribIPointerBounds(GLuint indx,GLint size,GLenum type,GLsizei stride,const GLvoid * pointer,GLsizei count)58 static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
59         GLsizei stride, const GLvoid *pointer, GLsizei count) {
60     glVertexAttribIPointer(indx, size, type, stride, pointer);
61 }
62 #endif
63 }
64 
65 static void
nativeClassInit(JNIEnv * _env,jclass glImplClass)66 nativeClassInit(JNIEnv *_env, jclass glImplClass)
67 {
68 }
69 
70 static void *
getPointer(JNIEnv * _env,jobject buffer,jarray * array,jint * remaining,jint * offset)71 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
72 {
73     jint position;
74     jint limit;
75     jint elementSizeShift;
76     jlong pointer;
77 
78     pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
79     *remaining = (limit - position) << elementSizeShift;
80     if (pointer != 0L) {
81         *array = nullptr;
82         pointer += position << elementSizeShift;
83         return reinterpret_cast<void*>(pointer);
84     }
85 
86     *array = jniGetNioBufferBaseArray(_env, buffer);
87     *offset = jniGetNioBufferBaseArrayOffset(_env, buffer);
88     return nullptr;
89 }
90 
91 class ByteArrayGetter {
92 public:
Get(JNIEnv * _env,jbyteArray array,jboolean * is_copy)93     static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
94         return _env->GetByteArrayElements(array, is_copy);
95     }
96 };
97 class BooleanArrayGetter {
98 public:
Get(JNIEnv * _env,jbooleanArray array,jboolean * is_copy)99     static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
100         return _env->GetBooleanArrayElements(array, is_copy);
101     }
102 };
103 class CharArrayGetter {
104 public:
Get(JNIEnv * _env,jcharArray array,jboolean * is_copy)105     static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
106         return _env->GetCharArrayElements(array, is_copy);
107     }
108 };
109 class ShortArrayGetter {
110 public:
Get(JNIEnv * _env,jshortArray array,jboolean * is_copy)111     static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
112         return _env->GetShortArrayElements(array, is_copy);
113     }
114 };
115 class IntArrayGetter {
116 public:
Get(JNIEnv * _env,jintArray array,jboolean * is_copy)117     static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
118         return _env->GetIntArrayElements(array, is_copy);
119     }
120 };
121 class LongArrayGetter {
122 public:
Get(JNIEnv * _env,jlongArray array,jboolean * is_copy)123     static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
124         return _env->GetLongArrayElements(array, is_copy);
125     }
126 };
127 class FloatArrayGetter {
128 public:
Get(JNIEnv * _env,jfloatArray array,jboolean * is_copy)129     static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
130         return _env->GetFloatArrayElements(array, is_copy);
131     }
132 };
133 class DoubleArrayGetter {
134 public:
Get(JNIEnv * _env,jdoubleArray array,jboolean * is_copy)135     static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
136         return _env->GetDoubleArrayElements(array, is_copy);
137     }
138 };
139 
140 template<typename JTYPEARRAY, typename ARRAYGETTER>
141 static void*
getArrayPointer(JNIEnv * _env,JTYPEARRAY array,jboolean * is_copy)142 getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
143     return ARRAYGETTER::Get(_env, array, is_copy);
144 }
145 
146 class ByteArrayReleaser {
147 public:
Release(JNIEnv * _env,jbyteArray array,jbyte * data,jboolean commit)148     static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
149         _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
150     }
151 };
152 class BooleanArrayReleaser {
153 public:
Release(JNIEnv * _env,jbooleanArray array,jboolean * data,jboolean commit)154     static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
155         _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
156     }
157 };
158 class CharArrayReleaser {
159 public:
Release(JNIEnv * _env,jcharArray array,jchar * data,jboolean commit)160     static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
161         _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
162     }
163 };
164 class ShortArrayReleaser {
165 public:
Release(JNIEnv * _env,jshortArray array,jshort * data,jboolean commit)166     static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
167         _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
168     }
169 };
170 class IntArrayReleaser {
171 public:
Release(JNIEnv * _env,jintArray array,jint * data,jboolean commit)172     static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
173         _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
174     }
175 };
176 class LongArrayReleaser {
177 public:
Release(JNIEnv * _env,jlongArray array,jlong * data,jboolean commit)178     static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
179         _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
180     }
181 };
182 class FloatArrayReleaser {
183 public:
Release(JNIEnv * _env,jfloatArray array,jfloat * data,jboolean commit)184     static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
185         _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
186     }
187 };
188 class DoubleArrayReleaser {
189 public:
Release(JNIEnv * _env,jdoubleArray array,jdouble * data,jboolean commit)190     static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
191         _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
192     }
193 };
194 
195 template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
196 static void
releaseArrayPointer(JNIEnv * _env,JTYPEARRAY array,NTYPEARRAY data,jboolean commit)197 releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
198     ARRAYRELEASER::Release(_env, array, data, commit);
199 }
200 
201 static void
releasePointer(JNIEnv * _env,jarray array,void * data,jboolean commit)202 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
203 {
204     _env->ReleasePrimitiveArrayCritical(array, data,
205                        commit ? 0 : JNI_ABORT);
206 }
207 
208 static void *
getDirectBufferPointer(JNIEnv * _env,jobject buffer)209 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
210     jint position;
211     jint limit;
212     jint elementSizeShift;
213     jlong pointer;
214     pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
215     if (pointer == 0) {
216         jniThrowException(_env, "java/lang/IllegalArgumentException",
217                           "Must use a native order direct Buffer");
218         return nullptr;
219     }
220     pointer += position << elementSizeShift;
221     return reinterpret_cast<void*>(pointer);
222 }
223 
224 // --------------------------------------------------------------------------
225 
226 /*
227  * returns the number of values glGet returns for a given pname.
228  *
229  * The code below is written such that pnames requiring only one values
230  * are the default (and are not explicitely tested for). This makes the
231  * checking code much shorter/readable/efficient.
232  *
233  * This means that unknown pnames (e.g.: extensions) will default to 1. If
234  * that unknown pname needs more than 1 value, then the validation check
235  * is incomplete and the app may crash if it passed the wrong number params.
236  */
getNeededCount(GLint pname)237 static int getNeededCount(GLint pname) {
238     int needed = 1;
239 #ifdef GL_ES_VERSION_3_0
240     // GLES 3.x pnames
241     switch (pname) {
242         case GL_MAX_VIEWPORT_DIMS:
243             needed = 2;
244             break;
245 
246         case GL_PROGRAM_BINARY_FORMATS:
247             glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
248             break;
249     }
250 #endif
251 
252 #ifdef GL_ES_VERSION_2_0
253     // GLES 2.x pnames
254     switch (pname) {
255         case GL_ALIASED_LINE_WIDTH_RANGE:
256         case GL_ALIASED_POINT_SIZE_RANGE:
257             needed = 2;
258             break;
259 
260         case GL_BLEND_COLOR:
261         case GL_COLOR_CLEAR_VALUE:
262         case GL_COLOR_WRITEMASK:
263         case GL_SCISSOR_BOX:
264         case GL_VIEWPORT:
265             needed = 4;
266             break;
267 
268         case GL_COMPRESSED_TEXTURE_FORMATS:
269             glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
270             break;
271 
272         case GL_SHADER_BINARY_FORMATS:
273             glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
274             break;
275     }
276 #endif
277 
278 #ifdef GL_VERSION_ES_CM_1_1
279     // GLES 1.x pnames
280     switch (pname) {
281         case GL_ALIASED_LINE_WIDTH_RANGE:
282         case GL_ALIASED_POINT_SIZE_RANGE:
283         case GL_DEPTH_RANGE:
284         case GL_SMOOTH_LINE_WIDTH_RANGE:
285         case GL_SMOOTH_POINT_SIZE_RANGE:
286             needed = 2;
287             break;
288 
289         case GL_CURRENT_NORMAL:
290         case GL_POINT_DISTANCE_ATTENUATION:
291             needed = 3;
292             break;
293 
294         case GL_COLOR_CLEAR_VALUE:
295         case GL_COLOR_WRITEMASK:
296         case GL_CURRENT_COLOR:
297         case GL_CURRENT_TEXTURE_COORDS:
298         case GL_FOG_COLOR:
299         case GL_LIGHT_MODEL_AMBIENT:
300         case GL_SCISSOR_BOX:
301         case GL_VIEWPORT:
302             needed = 4;
303             break;
304 
305         case GL_MODELVIEW_MATRIX:
306         case GL_PROJECTION_MATRIX:
307         case GL_TEXTURE_MATRIX:
308             needed = 16;
309             break;
310 
311         case GL_COMPRESSED_TEXTURE_FORMATS:
312             glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
313             break;
314     }
315 #endif
316     return needed;
317 }
318 
319 template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
320           typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
321 static void
get(JNIEnv * _env,jobject _this,jint pname,JTYPEARRAY params_ref,jint offset)322 get
323   (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
324     jint _exception = 0;
325     const char * _exceptionType;
326     const char * _exceptionMessage;
327     CTYPE *params_base = (CTYPE *) 0;
328     jint _remaining;
329     CTYPE *params = (CTYPE *) 0;
330     int _needed = 0;
331 
332     if (!params_ref) {
333         _exception = 1;
334         _exceptionType = "java/lang/IllegalArgumentException";
335         _exceptionMessage = "params == null";
336         goto exit;
337     }
338     if (offset < 0) {
339         _exception = 1;
340         _exceptionType = "java/lang/IllegalArgumentException";
341         _exceptionMessage = "offset < 0";
342         goto exit;
343     }
344     _remaining = _env->GetArrayLength(params_ref) - offset;
345     _needed = getNeededCount(pname);
346     // if we didn't find this pname, we just assume the user passed
347     // an array of the right size -- this might happen with extensions
348     // or if we forget an enum here.
349     if (_remaining < _needed) {
350         _exception = 1;
351         _exceptionType = "java/lang/IllegalArgumentException";
352         _exceptionMessage = "length - offset < needed";
353         goto exit;
354     }
355     params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
356         _env, params_ref, (jboolean *)0);
357     params = params_base + offset;
358 
359     GET(
360         (GLenum)pname,
361         (CTYPE *)params
362     );
363 
364 exit:
365     if (params_base) {
366         releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
367             _env, params_ref, params_base, !_exception);
368     }
369     if (_exception) {
370         jniThrowException(_env, _exceptionType, _exceptionMessage);
371     }
372 }
373 
374 
375 template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
376           typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
377 static void
getarray(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)378 getarray
379   (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
380     jint _exception = 0;
381     const char * _exceptionType;
382     const char * _exceptionMessage;
383     JTYPEARRAY _array = (JTYPEARRAY) 0;
384     jint _bufferOffset = (jint) 0;
385     jint _remaining;
386     CTYPE *params = (CTYPE *) 0;
387     int _needed = 0;
388 
389     params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
390     _remaining /= sizeof(CTYPE);    // convert from bytes to item count
391     _needed = getNeededCount(pname);
392     // if we didn't find this pname, we just assume the user passed
393     // an array of the right size -- this might happen with extensions
394     // or if we forget an enum here.
395     if (_needed>0 && _remaining < _needed) {
396         _exception = 1;
397         _exceptionType = "java/lang/IllegalArgumentException";
398         _exceptionMessage = "remaining() < needed";
399         goto exit;
400     }
401     if (params == NULL) {
402         char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
403             _env, _array, (jboolean *) 0);
404         params = (CTYPE *) (_paramsBase + _bufferOffset);
405     }
406     GET(
407         (GLenum)pname,
408         (CTYPE *)params
409     );
410 
411 exit:
412     if (_array) {
413         releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
414             _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
415     }
416     if (_exception) {
417         jniThrowException(_env, _exceptionType, _exceptionMessage);
418     }
419 }
420 
421 // --------------------------------------------------------------------------
422 /* void glBlendBarrier ( void ) */
423 static void
android_glBlendBarrier__(JNIEnv * _env,jobject _this)424 android_glBlendBarrier__
425   (JNIEnv *_env, jobject _this) {
426     glBlendBarrier();
427 }
428 
429 /* 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 ) */
430 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)431 android_glCopyImageSubData__IIIIIIIIIIIIIII
432   (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) {
433     glCopyImageSubData(
434         (GLuint)srcName,
435         (GLenum)srcTarget,
436         (GLint)srcLevel,
437         (GLint)srcX,
438         (GLint)srcY,
439         (GLint)srcZ,
440         (GLuint)dstName,
441         (GLenum)dstTarget,
442         (GLint)dstLevel,
443         (GLint)dstX,
444         (GLint)dstY,
445         (GLint)dstZ,
446         (GLsizei)srcWidth,
447         (GLsizei)srcHeight,
448         (GLsizei)srcDepth
449     );
450 }
451 
452 /* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
453 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)454 android_glDebugMessageControl__IIII_3IIZ
455   (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jintArray ids_ref, jint offset, jboolean enabled) {
456     jint _exception = 0;
457     const char * _exceptionType = NULL;
458     const char * _exceptionMessage = NULL;
459     GLuint *ids_base = (GLuint *) 0;
460     jint _remaining;
461     GLuint *ids = (GLuint *) 0;
462 
463     if (!ids_ref) {
464         _exception = 1;
465         _exceptionType = "java/lang/IllegalArgumentException";
466         _exceptionMessage = "ids == null";
467         goto exit;
468     }
469     if (offset < 0) {
470         _exception = 1;
471         _exceptionType = "java/lang/IllegalArgumentException";
472         _exceptionMessage = "offset < 0";
473         goto exit;
474     }
475     _remaining = _env->GetArrayLength(ids_ref) - offset;
476     if (_remaining < count) {
477         _exception = 1;
478         _exceptionType = "java/lang/IllegalArgumentException";
479         _exceptionMessage = "length - offset < count < needed";
480         goto exit;
481     }
482     ids_base = (GLuint *)
483         _env->GetIntArrayElements(ids_ref, (jboolean *)0);
484     ids = ids_base + offset;
485 
486     glDebugMessageControl(
487         (GLenum)source,
488         (GLenum)type,
489         (GLenum)severity,
490         (GLsizei)count,
491         (GLuint *)ids,
492         (GLboolean)enabled
493     );
494 
495 exit:
496     if (ids_base) {
497         _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base,
498             JNI_ABORT);
499     }
500     if (_exception) {
501         jniThrowException(_env, _exceptionType, _exceptionMessage);
502     }
503 }
504 
505 /* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
506 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)507 android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z
508   (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) {
509     jint _exception = 0;
510     const char * _exceptionType = NULL;
511     const char * _exceptionMessage = NULL;
512     jintArray _array = (jintArray) 0;
513     jint _bufferOffset = (jint) 0;
514     jint _remaining;
515     GLuint *ids = (GLuint *) 0;
516 
517     if (!ids_buf) {
518         _exception = 1;
519         _exceptionType = "java/lang/IllegalArgumentException";
520         _exceptionMessage = "ids == null";
521         goto exit;
522     }
523     ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
524     if (_remaining < count) {
525         _exception = 1;
526         _exceptionType = "java/lang/IllegalArgumentException";
527         _exceptionMessage = "remaining() < count < needed";
528         goto exit;
529     }
530     if (ids == NULL) {
531         char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
532         ids = (GLuint *) (_idsBase + _bufferOffset);
533     }
534     glDebugMessageControl(
535         (GLenum)source,
536         (GLenum)type,
537         (GLenum)severity,
538         (GLsizei)count,
539         (GLuint *)ids,
540         (GLboolean)enabled
541     );
542 
543 exit:
544     if (_array) {
545         _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT);
546     }
547     if (_exception) {
548         jniThrowException(_env, _exceptionType, _exceptionMessage);
549     }
550 }
551 
552 /* void glDebugMessageInsert ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
553 static void
android_glDebugMessageInsert__IIIIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint source,jint type,jint id,jint severity,jint length,jstring buf)554 android_glDebugMessageInsert__IIIIILjava_lang_String_2
555   (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jint length, jstring buf) {
556     jint _exception = 0;
557     const char * _exceptionType = NULL;
558     const char * _exceptionMessage = NULL;
559     const char* _nativebuf = 0;
560 
561     if (!buf) {
562         _exception = 1;
563         _exceptionType = "java/lang/IllegalArgumentException";
564         _exceptionMessage = "buf == null";
565         goto exit;
566     }
567     _nativebuf = _env->GetStringUTFChars(buf, 0);
568 
569     glDebugMessageInsert(
570         (GLenum)source,
571         (GLenum)type,
572         (GLuint)id,
573         (GLenum)severity,
574         (GLsizei)length,
575         (GLchar *)_nativebuf
576     );
577 
578 exit:
579     if (_nativebuf) {
580         _env->ReleaseStringUTFChars(buf, _nativebuf);
581     }
582 
583     if (_exception) {
584         jniThrowException(_env, _exceptionType, _exceptionMessage);
585     }
586 }
587 
588 /* void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam ) */
589 static void
android_glDebugMessageCallback(JNIEnv * _env,jobject _this,jobject callback)590 android_glDebugMessageCallback(JNIEnv *_env, jobject _this, jobject callback) {
591     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
592 }
593 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
594 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)595 android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI
596   (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) {
597     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
598     return 0;
599 }
600 
601 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
602 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)603 android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
604   (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
605     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
606     return 0;
607 }
608 
609 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
610 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)611 android_glGetDebugMessageLog__I_3II_3II_3II_3II
612   (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) {
613     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
614     return 0;
615 }
616 
617 /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
618 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)619 android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
620   (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
621     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
622     return 0;
623 }
624 /* void glPushDebugGroup ( GLenum source, GLuint id, GLsizei length, const GLchar *message ) */
625 static void
android_glPushDebugGroup__IIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint source,jint id,jint length,jstring message)626 android_glPushDebugGroup__IIILjava_lang_String_2
627   (JNIEnv *_env, jobject _this, jint source, jint id, jint length, jstring message) {
628     jint _exception = 0;
629     const char * _exceptionType = NULL;
630     const char * _exceptionMessage = NULL;
631     const char* _nativemessage = 0;
632     jsize _stringlen = 0;
633 
634     if (!message) {
635         _exception = 1;
636         _exceptionType = "java/lang/IllegalArgumentException";
637         _exceptionMessage = "message == null";
638         goto exit;
639     }
640     _nativemessage = _env->GetStringUTFChars(message, 0);
641     _stringlen = _env->GetStringUTFLength(message);
642     if (length > _stringlen) {
643         _exception = 1;
644         _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
645         _exceptionMessage = "length of message is shorter than length argument";
646         goto exit;
647     }
648 
649     glPushDebugGroup(
650         (GLenum)source,
651         (GLuint)id,
652         (GLsizei)length,
653         (GLchar *)_nativemessage
654     );
655 
656 exit:
657     if (_nativemessage) {
658         _env->ReleaseStringUTFChars(message, _nativemessage);
659     }
660 
661     if (_exception) {
662         jniThrowException(_env, _exceptionType, _exceptionMessage);
663     }
664 }
665 
666 /* void glPopDebugGroup ( void ) */
667 static void
android_glPopDebugGroup__(JNIEnv * _env,jobject _this)668 android_glPopDebugGroup__
669   (JNIEnv *_env, jobject _this) {
670     glPopDebugGroup();
671 }
672 
673 /* void glObjectLabel ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */
674 static void
android_glObjectLabel__IIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint identifier,jint name,jint length,jstring label)675 android_glObjectLabel__IIILjava_lang_String_2
676   (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) {
677     jint _exception = 0;
678     const char * _exceptionType = NULL;
679     const char * _exceptionMessage = NULL;
680     const char* _nativelabel = 0;
681     jsize _stringlen = 0;
682 
683     if (label) {
684         _nativelabel = _env->GetStringUTFChars(label, 0);
685         _stringlen = _env->GetStringUTFLength(label);
686         if (length > _stringlen) {
687             _exception = 1;
688             _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
689             _exceptionMessage = "length of label is shorter than length argument";
690             goto exit;
691         }
692     }
693 
694     glObjectLabel(
695         (GLenum)identifier,
696         (GLuint)name,
697         (GLsizei)length,
698         (GLchar *)_nativelabel
699     );
700 
701 exit:
702     if (_nativelabel) {
703         _env->ReleaseStringUTFChars(label, _nativelabel);
704     }
705 
706     if (_exception) {
707         jniThrowException(_env, _exceptionType, _exceptionMessage);
708     }
709 }
710 
711 /* void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
712 static jstring
android_glGetObjectLabel(JNIEnv * _env,jobject _this,jint identifier,jint name)713 android_glGetObjectLabel(JNIEnv *_env, jobject _this, jint identifier, jint name) {
714     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
715     return NULL;
716 }
717 
718 /* void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label ) */
719 static void
android_glObjectPtrLabel(JNIEnv * _env,jobject _this,jlong ptr,jstring label)720 android_glObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
721     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
722 }
723 
724 /* void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
725 static jstring
android_glGetObjectPtrLabel(JNIEnv * _env,jobject _this,jlong ptr)726 android_glGetObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr) {
727     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
728     return NULL;
729 }
730 
731 /* void glGetPointerv ( GLenum pname, void **params ) */
732 static jlong
android_glGetPointerv(JNIEnv * _env,jobject _this,jint pname)733 android_glGetPointerv(JNIEnv *_env, jobject _this, jint pname) {
734     jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
735     return NULL;
736 }
737 
738 /* void glEnablei ( GLenum target, GLuint index ) */
739 static void
android_glEnablei__II(JNIEnv * _env,jobject _this,jint target,jint index)740 android_glEnablei__II
741   (JNIEnv *_env, jobject _this, jint target, jint index) {
742     glEnablei(
743         (GLenum)target,
744         (GLuint)index
745     );
746 }
747 
748 /* void glDisablei ( GLenum target, GLuint index ) */
749 static void
android_glDisablei__II(JNIEnv * _env,jobject _this,jint target,jint index)750 android_glDisablei__II
751   (JNIEnv *_env, jobject _this, jint target, jint index) {
752     glDisablei(
753         (GLenum)target,
754         (GLuint)index
755     );
756 }
757 
758 /* void glBlendEquationi ( GLuint buf, GLenum mode ) */
759 static void
android_glBlendEquationi__II(JNIEnv * _env,jobject _this,jint buf,jint mode)760 android_glBlendEquationi__II
761   (JNIEnv *_env, jobject _this, jint buf, jint mode) {
762     glBlendEquationi(
763         (GLuint)buf,
764         (GLenum)mode
765     );
766 }
767 
768 /* void glBlendEquationSeparatei ( GLuint buf, GLenum modeRGB, GLenum modeAlpha ) */
769 static void
android_glBlendEquationSeparatei__III(JNIEnv * _env,jobject _this,jint buf,jint modeRGB,jint modeAlpha)770 android_glBlendEquationSeparatei__III
771   (JNIEnv *_env, jobject _this, jint buf, jint modeRGB, jint modeAlpha) {
772     glBlendEquationSeparatei(
773         (GLuint)buf,
774         (GLenum)modeRGB,
775         (GLenum)modeAlpha
776     );
777 }
778 
779 /* void glBlendFunci ( GLuint buf, GLenum src, GLenum dst ) */
780 static void
android_glBlendFunci__III(JNIEnv * _env,jobject _this,jint buf,jint src,jint dst)781 android_glBlendFunci__III
782   (JNIEnv *_env, jobject _this, jint buf, jint src, jint dst) {
783     glBlendFunci(
784         (GLuint)buf,
785         (GLenum)src,
786         (GLenum)dst
787     );
788 }
789 
790 /* void glBlendFuncSeparatei ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
791 static void
android_glBlendFuncSeparatei__IIIII(JNIEnv * _env,jobject _this,jint buf,jint srcRGB,jint dstRGB,jint srcAlpha,jint dstAlpha)792 android_glBlendFuncSeparatei__IIIII
793   (JNIEnv *_env, jobject _this, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
794     glBlendFuncSeparatei(
795         (GLuint)buf,
796         (GLenum)srcRGB,
797         (GLenum)dstRGB,
798         (GLenum)srcAlpha,
799         (GLenum)dstAlpha
800     );
801 }
802 
803 /* void glColorMaski ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) */
804 static void
android_glColorMaski__IZZZZ(JNIEnv * _env,jobject _this,jint index,jboolean r,jboolean g,jboolean b,jboolean a)805 android_glColorMaski__IZZZZ
806   (JNIEnv *_env, jobject _this, jint index, jboolean r, jboolean g, jboolean b, jboolean a) {
807     glColorMaski(
808         (GLuint)index,
809         (GLboolean)r,
810         (GLboolean)g,
811         (GLboolean)b,
812         (GLboolean)a
813     );
814 }
815 
816 /* GLboolean glIsEnabledi ( GLenum target, GLuint index ) */
817 static jboolean
android_glIsEnabledi__II(JNIEnv * _env,jobject _this,jint target,jint index)818 android_glIsEnabledi__II
819   (JNIEnv *_env, jobject _this, jint target, jint index) {
820     GLboolean _returnValue;
821     _returnValue = glIsEnabledi(
822         (GLenum)target,
823         (GLuint)index
824     );
825     return (jboolean)_returnValue;
826 }
827 
828 /* void glDrawElementsBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */
829 static void
android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jobject indices_buf,jint basevertex)830 android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I
831   (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint basevertex) {
832     jint _exception = 0;
833     const char * _exceptionType = NULL;
834     const char * _exceptionMessage = NULL;
835     jarray _array = (jarray) 0;
836     jint _bufferOffset = (jint) 0;
837     jint _remaining;
838     void *indices = (void *) 0;
839 
840     if (!indices_buf) {
841         _exception = 1;
842         _exceptionType = "java/lang/IllegalArgumentException";
843         _exceptionMessage = "indices == null";
844         goto exit;
845     }
846     indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
847     if (_remaining < count-basevertex) {
848         _exception = 1;
849         _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
850         _exceptionMessage = "remaining() < count-basevertex < needed";
851         goto exit;
852     }
853     if (indices == NULL) {
854         char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
855         indices = (void *) (_indicesBase + _bufferOffset);
856     }
857     glDrawElementsBaseVertex(
858         (GLenum)mode,
859         (GLsizei)count,
860         (GLenum)type,
861         (void *)indices,
862         (GLint)basevertex
863     );
864 
865 exit:
866     if (_array) {
867         releasePointer(_env, _array, (void *)((char *)indices - _bufferOffset), JNI_FALSE);
868     }
869     if (_exception) {
870         jniThrowException(_env, _exceptionType, _exceptionMessage);
871     }
872 }
873 
874 /* void glDrawRangeElementsBaseVertex ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */
875 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)876 android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I
877   (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf, jint basevertex) {
878     jint _exception = 0;
879     const char * _exceptionType = NULL;
880     const char * _exceptionMessage = NULL;
881     jarray _array = (jarray) 0;
882     jint _bufferOffset = (jint) 0;
883     jint _remaining;
884     void *indices = (void *) 0;
885 
886     if (!indices_buf) {
887         _exception = 1;
888         _exceptionType = "java/lang/IllegalArgumentException";
889         _exceptionMessage = "indices == null";
890         goto exit;
891     }
892     indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
893     if (_remaining < count-basevertex) {
894         _exception = 1;
895         _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
896         _exceptionMessage = "remaining() < count-basevertex < needed";
897         goto exit;
898     }
899     if (indices == NULL) {
900         char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
901         indices = (void *) (_indicesBase + _bufferOffset);
902     }
903     glDrawRangeElementsBaseVertex(
904         (GLenum)mode,
905         (GLuint)start,
906         (GLuint)end,
907         (GLsizei)count,
908         (GLenum)type,
909         (void *)indices,
910         (GLint)basevertex
911     );
912 
913 exit:
914     if (_array) {
915         releasePointer(_env, _array, (void *)((char *)indices - _bufferOffset), JNI_FALSE);
916     }
917     if (_exception) {
918         jniThrowException(_env, _exceptionType, _exceptionMessage);
919     }
920 }
921 
922 /* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
923 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)924 android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II
925   (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount, jint basevertex) {
926     jint _exception = 0;
927     const char * _exceptionType = NULL;
928     const char * _exceptionMessage = NULL;
929     jarray _array = (jarray) 0;
930     jint _bufferOffset = (jint) 0;
931     jint _remaining;
932     void *indices = (void *) 0;
933 
934     indices = (void *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
935     if (_remaining < count-basevertex) {
936         _exception = 1;
937         _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
938         _exceptionMessage = "remaining() < count-basevertex < needed";
939         goto exit;
940     }
941     if (indices == NULL) {
942         char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
943         indices = (void *) (_indicesBase + _bufferOffset);
944     }
945     glDrawElementsInstancedBaseVertex(
946         (GLenum)mode,
947         (GLsizei)count,
948         (GLenum)type,
949         (void *)indices,
950         (GLsizei)instanceCount,
951         (GLint) basevertex
952     );
953 
954 exit:
955     if (_array) {
956         releasePointer(_env, _array, indices, JNI_FALSE);
957     }
958 }
959 
960 /* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
961 static void
android_glDrawElementsInstancedBaseVertex__IIIIII(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jint indicesOffset,jint instanceCount,jint basevertex)962 android_glDrawElementsInstancedBaseVertex__IIIIII
963   (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount, jint basevertex) {
964     glDrawElementsInstancedBaseVertex(
965         (GLenum)mode,
966         (GLsizei)count,
967         (GLenum)type,
968         (void *)static_cast<uintptr_t>(indicesOffset),
969         (GLsizei)instanceCount,
970         (GLint)basevertex
971     );
972 }
973 /* void glFramebufferTexture ( GLenum target, GLenum attachment, GLuint texture, GLint level ) */
974 static void
android_glFramebufferTexture__IIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint texture,jint level)975 android_glFramebufferTexture__IIII
976   (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level) {
977     glFramebufferTexture(
978         (GLenum)target,
979         (GLenum)attachment,
980         (GLuint)texture,
981         (GLint)level
982     );
983 }
984 
985 /* void glPrimitiveBoundingBox ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ) */
986 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)987 android_glPrimitiveBoundingBox__FFFFFFFF
988   (JNIEnv *_env, jobject _this, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) {
989     glPrimitiveBoundingBox(
990         (GLfloat)minX,
991         (GLfloat)minY,
992         (GLfloat)minZ,
993         (GLfloat)minW,
994         (GLfloat)maxX,
995         (GLfloat)maxY,
996         (GLfloat)maxZ,
997         (GLfloat)maxW
998     );
999 }
1000 
1001 /* GLenum glGetGraphicsResetStatus ( void ) */
1002 static jint
android_glGetGraphicsResetStatus__(JNIEnv * _env,jobject _this)1003 android_glGetGraphicsResetStatus__
1004   (JNIEnv *_env, jobject _this) {
1005     GLenum _returnValue;
1006     _returnValue = glGetGraphicsResetStatus();
1007     return (jint)_returnValue;
1008 }
1009 
1010 /* void glReadnPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data ) */
1011 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)1012 android_glReadnPixels__IIIIIIILjava_nio_Buffer_2
1013   (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jobject data_buf) {
1014     jint _exception = 0;
1015     const char * _exceptionType = NULL;
1016     const char * _exceptionMessage = NULL;
1017     jarray _array = (jarray) 0;
1018     jint _bufferOffset = (jint) 0;
1019     jint _remaining;
1020     void *data = (void *) 0;
1021 
1022     if (!data_buf) {
1023         _exception = 1;
1024         _exceptionType = "java/lang/IllegalArgumentException";
1025         _exceptionMessage = "data == null";
1026         goto exit;
1027     }
1028     data = (void *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1029     if (_remaining < bufSize) {
1030         _exception = 1;
1031         _exceptionType = "java/lang/IllegalArgumentException";
1032         _exceptionMessage = "remaining() < bufSize < needed";
1033         goto exit;
1034     }
1035     if (data == NULL) {
1036         char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1037         data = (void *) (_dataBase + _bufferOffset);
1038     }
1039     glReadnPixels(
1040         (GLint)x,
1041         (GLint)y,
1042         (GLsizei)width,
1043         (GLsizei)height,
1044         (GLenum)format,
1045         (GLenum)type,
1046         (GLsizei)bufSize,
1047         (void *)data
1048     );
1049 
1050 exit:
1051     if (_array) {
1052         releasePointer(_env, _array, (void *)((char *)data - _bufferOffset),
1053                        _exception ? JNI_FALSE : JNI_TRUE);
1054     }
1055     if (_exception) {
1056         jniThrowException(_env, _exceptionType, _exceptionMessage);
1057     }
1058 }
1059 
1060 /* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */
1061 static void
android_glGetnUniformfv__III_3FI(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jfloatArray params_ref,jint offset)1062 android_glGetnUniformfv__III_3FI
1063   (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jfloatArray params_ref, jint offset) {
1064     jint _exception = 0;
1065     const char * _exceptionType = NULL;
1066     const char * _exceptionMessage = NULL;
1067     GLfloat *params_base = (GLfloat *) 0;
1068     jint _remaining;
1069     GLfloat *params = (GLfloat *) 0;
1070 
1071     if (!params_ref) {
1072         _exception = 1;
1073         _exceptionType = "java/lang/IllegalArgumentException";
1074         _exceptionMessage = "params == null";
1075         goto exit;
1076     }
1077     if (offset < 0) {
1078         _exception = 1;
1079         _exceptionType = "java/lang/IllegalArgumentException";
1080         _exceptionMessage = "offset < 0";
1081         goto exit;
1082     }
1083     _remaining = _env->GetArrayLength(params_ref) - offset;
1084     if (_remaining < bufSize) {
1085         _exception = 1;
1086         _exceptionType = "java/lang/IllegalArgumentException";
1087         _exceptionMessage = "length - offset < bufSize < needed";
1088         goto exit;
1089     }
1090     params_base = (GLfloat *)
1091         _env->GetFloatArrayElements(params_ref, (jboolean *)0);
1092     params = params_base + offset;
1093 
1094     glGetnUniformfv(
1095         (GLuint)program,
1096         (GLint)location,
1097         (GLsizei)bufSize,
1098         (GLfloat *)params
1099     );
1100 
1101 exit:
1102     if (params_base) {
1103         _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
1104             _exception ? JNI_ABORT: 0);
1105     }
1106     if (_exception) {
1107         jniThrowException(_env, _exceptionType, _exceptionMessage);
1108     }
1109 }
1110 
1111 /* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */
1112 static void
android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jobject params_buf)1113 android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2
1114   (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
1115     jint _exception = 0;
1116     const char * _exceptionType = NULL;
1117     const char * _exceptionMessage = NULL;
1118     jfloatArray _array = (jfloatArray) 0;
1119     jint _bufferOffset = (jint) 0;
1120     jint _remaining;
1121     GLfloat *params = (GLfloat *) 0;
1122 
1123     if (!params_buf) {
1124         _exception = 1;
1125         _exceptionType = "java/lang/IllegalArgumentException";
1126         _exceptionMessage = "params == null";
1127         goto exit;
1128     }
1129     params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1130     if (_remaining < bufSize) {
1131         _exception = 1;
1132         _exceptionType = "java/lang/IllegalArgumentException";
1133         _exceptionMessage = "remaining() < bufSize < needed";
1134         goto exit;
1135     }
1136     if (params == NULL) {
1137         char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
1138         params = (GLfloat *) (_paramsBase + _bufferOffset);
1139     }
1140     glGetnUniformfv(
1141         (GLuint)program,
1142         (GLint)location,
1143         (GLsizei)bufSize,
1144         (GLfloat *)params
1145     );
1146 
1147 exit:
1148     if (_array) {
1149         _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
1150     }
1151     if (_exception) {
1152         jniThrowException(_env, _exceptionType, _exceptionMessage);
1153     }
1154 }
1155 
1156 /* void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */
1157 static void
android_glGetnUniformiv__III_3II(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jintArray params_ref,jint offset)1158 android_glGetnUniformiv__III_3II
1159   (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) {
1160     jint _exception = 0;
1161     const char * _exceptionType = NULL;
1162     const char * _exceptionMessage = NULL;
1163     GLint *params_base = (GLint *) 0;
1164     jint _remaining;
1165     GLint *params = (GLint *) 0;
1166 
1167     if (!params_ref) {
1168         _exception = 1;
1169         _exceptionType = "java/lang/IllegalArgumentException";
1170         _exceptionMessage = "params == null";
1171         goto exit;
1172     }
1173     if (offset < 0) {
1174         _exception = 1;
1175         _exceptionType = "java/lang/IllegalArgumentException";
1176         _exceptionMessage = "offset < 0";
1177         goto exit;
1178     }
1179     _remaining = _env->GetArrayLength(params_ref) - offset;
1180     if (_remaining < bufSize) {
1181         _exception = 1;
1182         _exceptionType = "java/lang/IllegalArgumentException";
1183         _exceptionMessage = "length - offset < bufSize < needed";
1184         goto exit;
1185     }
1186     params_base = (GLint *)
1187         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1188     params = params_base + offset;
1189 
1190     glGetnUniformiv(
1191         (GLuint)program,
1192         (GLint)location,
1193         (GLsizei)bufSize,
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 glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */
1208 static void
android_glGetnUniformiv__IIILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jobject params_buf)1209 android_glGetnUniformiv__IIILjava_nio_IntBuffer_2
1210   (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, 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 (_remaining < bufSize) {
1227         _exception = 1;
1228         _exceptionType = "java/lang/IllegalArgumentException";
1229         _exceptionMessage = "remaining() < bufSize < needed";
1230         goto exit;
1231     }
1232     if (params == NULL) {
1233         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1234         params = (GLint *) (_paramsBase + _bufferOffset);
1235     }
1236     glGetnUniformiv(
1237         (GLuint)program,
1238         (GLint)location,
1239         (GLsizei)bufSize,
1240         (GLint *)params
1241     );
1242 
1243 exit:
1244     if (_array) {
1245         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1246     }
1247     if (_exception) {
1248         jniThrowException(_env, _exceptionType, _exceptionMessage);
1249     }
1250 }
1251 
1252 /* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */
1253 static void
android_glGetnUniformuiv__III_3II(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jintArray params_ref,jint offset)1254 android_glGetnUniformuiv__III_3II
1255   (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) {
1256     jint _exception = 0;
1257     const char * _exceptionType = NULL;
1258     const char * _exceptionMessage = NULL;
1259     GLuint *params_base = (GLuint *) 0;
1260     jint _remaining;
1261     GLuint *params = (GLuint *) 0;
1262 
1263     if (!params_ref) {
1264         _exception = 1;
1265         _exceptionType = "java/lang/IllegalArgumentException";
1266         _exceptionMessage = "params == null";
1267         goto exit;
1268     }
1269     if (offset < 0) {
1270         _exception = 1;
1271         _exceptionType = "java/lang/IllegalArgumentException";
1272         _exceptionMessage = "offset < 0";
1273         goto exit;
1274     }
1275     _remaining = _env->GetArrayLength(params_ref) - offset;
1276     if (_remaining < bufSize) {
1277         _exception = 1;
1278         _exceptionType = "java/lang/IllegalArgumentException";
1279         _exceptionMessage = "length - offset < bufSize < needed";
1280         goto exit;
1281     }
1282     params_base = (GLuint *)
1283         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1284     params = params_base + offset;
1285 
1286     glGetnUniformuiv(
1287         (GLuint)program,
1288         (GLint)location,
1289         (GLsizei)bufSize,
1290         (GLuint *)params
1291     );
1292 
1293 exit:
1294     if (params_base) {
1295         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1296             _exception ? JNI_ABORT: 0);
1297     }
1298     if (_exception) {
1299         jniThrowException(_env, _exceptionType, _exceptionMessage);
1300     }
1301 }
1302 
1303 /* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */
1304 static void
android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint program,jint location,jint bufSize,jobject params_buf)1305 android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2
1306   (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) {
1307     jint _exception = 0;
1308     const char * _exceptionType = NULL;
1309     const char * _exceptionMessage = NULL;
1310     jintArray _array = (jintArray) 0;
1311     jint _bufferOffset = (jint) 0;
1312     jint _remaining;
1313     GLuint *params = (GLuint *) 0;
1314 
1315     if (!params_buf) {
1316         _exception = 1;
1317         _exceptionType = "java/lang/IllegalArgumentException";
1318         _exceptionMessage = "params == null";
1319         goto exit;
1320     }
1321     params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1322     if (_remaining < bufSize) {
1323         _exception = 1;
1324         _exceptionType = "java/lang/IllegalArgumentException";
1325         _exceptionMessage = "remaining() < bufSize < needed";
1326         goto exit;
1327     }
1328     if (params == NULL) {
1329         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1330         params = (GLuint *) (_paramsBase + _bufferOffset);
1331     }
1332     glGetnUniformuiv(
1333         (GLuint)program,
1334         (GLint)location,
1335         (GLsizei)bufSize,
1336         (GLuint *)params
1337     );
1338 
1339 exit:
1340     if (_array) {
1341         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1342     }
1343     if (_exception) {
1344         jniThrowException(_env, _exceptionType, _exceptionMessage);
1345     }
1346 }
1347 
1348 /* void glMinSampleShading ( GLfloat value ) */
1349 static void
android_glMinSampleShading__F(JNIEnv * _env,jobject _this,jfloat value)1350 android_glMinSampleShading__F
1351   (JNIEnv *_env, jobject _this, jfloat value) {
1352     glMinSampleShading(
1353         (GLfloat)value
1354     );
1355 }
1356 
1357 /* void glPatchParameteri ( GLenum pname, GLint value ) */
1358 static void
android_glPatchParameteri__II(JNIEnv * _env,jobject _this,jint pname,jint value)1359 android_glPatchParameteri__II
1360   (JNIEnv *_env, jobject _this, jint pname, jint value) {
1361     glPatchParameteri(
1362         (GLenum)pname,
1363         (GLint)value
1364     );
1365 }
1366 
1367 /* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */
1368 static void
android_glTexParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1369 android_glTexParameterIiv__II_3II
1370   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1371     jint _exception = 0;
1372     const char * _exceptionType = NULL;
1373     const char * _exceptionMessage = NULL;
1374     GLint *params_base = (GLint *) 0;
1375     jint _remaining;
1376     GLint *params = (GLint *) 0;
1377 
1378     if (!params_ref) {
1379         _exception = 1;
1380         _exceptionType = "java/lang/IllegalArgumentException";
1381         _exceptionMessage = "params == null";
1382         goto exit;
1383     }
1384     if (offset < 0) {
1385         _exception = 1;
1386         _exceptionType = "java/lang/IllegalArgumentException";
1387         _exceptionMessage = "offset < 0";
1388         goto exit;
1389     }
1390     _remaining = _env->GetArrayLength(params_ref) - offset;
1391     params_base = (GLint *)
1392         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1393     params = params_base + offset;
1394 
1395     glTexParameterIiv(
1396         (GLenum)target,
1397         (GLenum)pname,
1398         (GLint *)params
1399     );
1400 
1401 exit:
1402     if (params_base) {
1403         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1404             JNI_ABORT);
1405     }
1406     if (_exception) {
1407         jniThrowException(_env, _exceptionType, _exceptionMessage);
1408     }
1409 }
1410 
1411 /* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */
1412 static void
android_glTexParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1413 android_glTexParameterIiv__IILjava_nio_IntBuffer_2
1414   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1415     jint _exception = 0;
1416     const char * _exceptionType = NULL;
1417     const char * _exceptionMessage = NULL;
1418     jintArray _array = (jintArray) 0;
1419     jint _bufferOffset = (jint) 0;
1420     jint _remaining;
1421     GLint *params = (GLint *) 0;
1422 
1423     if (!params_buf) {
1424         _exception = 1;
1425         _exceptionType = "java/lang/IllegalArgumentException";
1426         _exceptionMessage = "params == null";
1427         goto exit;
1428     }
1429     params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1430     if (params == NULL) {
1431         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1432         params = (GLint *) (_paramsBase + _bufferOffset);
1433     }
1434     glTexParameterIiv(
1435         (GLenum)target,
1436         (GLenum)pname,
1437         (GLint *)params
1438     );
1439 
1440 exit:
1441     if (_array) {
1442         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1443     }
1444     if (_exception) {
1445         jniThrowException(_env, _exceptionType, _exceptionMessage);
1446     }
1447 }
1448 
1449 /* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */
1450 static void
android_glTexParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1451 android_glTexParameterIuiv__II_3II
1452   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1453     jint _exception = 0;
1454     const char * _exceptionType = NULL;
1455     const char * _exceptionMessage = NULL;
1456     GLuint *params_base = (GLuint *) 0;
1457     jint _remaining;
1458     GLuint *params = (GLuint *) 0;
1459 
1460     if (!params_ref) {
1461         _exception = 1;
1462         _exceptionType = "java/lang/IllegalArgumentException";
1463         _exceptionMessage = "params == null";
1464         goto exit;
1465     }
1466     if (offset < 0) {
1467         _exception = 1;
1468         _exceptionType = "java/lang/IllegalArgumentException";
1469         _exceptionMessage = "offset < 0";
1470         goto exit;
1471     }
1472     _remaining = _env->GetArrayLength(params_ref) - offset;
1473     params_base = (GLuint *)
1474         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1475     params = params_base + offset;
1476 
1477     glTexParameterIuiv(
1478         (GLenum)target,
1479         (GLenum)pname,
1480         (GLuint *)params
1481     );
1482 
1483 exit:
1484     if (params_base) {
1485         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1486             JNI_ABORT);
1487     }
1488     if (_exception) {
1489         jniThrowException(_env, _exceptionType, _exceptionMessage);
1490     }
1491 }
1492 
1493 /* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */
1494 static void
android_glTexParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1495 android_glTexParameterIuiv__IILjava_nio_IntBuffer_2
1496   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1497     jint _exception = 0;
1498     const char * _exceptionType = NULL;
1499     const char * _exceptionMessage = NULL;
1500     jintArray _array = (jintArray) 0;
1501     jint _bufferOffset = (jint) 0;
1502     jint _remaining;
1503     GLuint *params = (GLuint *) 0;
1504 
1505     if (!params_buf) {
1506         _exception = 1;
1507         _exceptionType = "java/lang/IllegalArgumentException";
1508         _exceptionMessage = "params == null";
1509         goto exit;
1510     }
1511     params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1512     if (params == NULL) {
1513         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1514         params = (GLuint *) (_paramsBase + _bufferOffset);
1515     }
1516     glTexParameterIuiv(
1517         (GLenum)target,
1518         (GLenum)pname,
1519         (GLuint *)params
1520     );
1521 
1522 exit:
1523     if (_array) {
1524         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1525     }
1526     if (_exception) {
1527         jniThrowException(_env, _exceptionType, _exceptionMessage);
1528     }
1529 }
1530 
1531 /* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */
1532 static void
android_glGetTexParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1533 android_glGetTexParameterIiv__II_3II
1534   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1535     jint _exception = 0;
1536     const char * _exceptionType = NULL;
1537     const char * _exceptionMessage = NULL;
1538     GLint *params_base = (GLint *) 0;
1539     jint _remaining;
1540     GLint *params = (GLint *) 0;
1541 
1542     if (!params_ref) {
1543         _exception = 1;
1544         _exceptionType = "java/lang/IllegalArgumentException";
1545         _exceptionMessage = "params == null";
1546         goto exit;
1547     }
1548     if (offset < 0) {
1549         _exception = 1;
1550         _exceptionType = "java/lang/IllegalArgumentException";
1551         _exceptionMessage = "offset < 0";
1552         goto exit;
1553     }
1554     _remaining = _env->GetArrayLength(params_ref) - offset;
1555     params_base = (GLint *)
1556         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1557     params = params_base + offset;
1558 
1559     glGetTexParameterIiv(
1560         (GLenum)target,
1561         (GLenum)pname,
1562         (GLint *)params
1563     );
1564 
1565 exit:
1566     if (params_base) {
1567         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1568             _exception ? JNI_ABORT: 0);
1569     }
1570     if (_exception) {
1571         jniThrowException(_env, _exceptionType, _exceptionMessage);
1572     }
1573 }
1574 
1575 /* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */
1576 static void
android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1577 android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2
1578   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1579     jint _exception = 0;
1580     const char * _exceptionType = NULL;
1581     const char * _exceptionMessage = NULL;
1582     jintArray _array = (jintArray) 0;
1583     jint _bufferOffset = (jint) 0;
1584     jint _remaining;
1585     GLint *params = (GLint *) 0;
1586 
1587     if (!params_buf) {
1588         _exception = 1;
1589         _exceptionType = "java/lang/IllegalArgumentException";
1590         _exceptionMessage = "params == null";
1591         goto exit;
1592     }
1593     params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1594     if (params == NULL) {
1595         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1596         params = (GLint *) (_paramsBase + _bufferOffset);
1597     }
1598     glGetTexParameterIiv(
1599         (GLenum)target,
1600         (GLenum)pname,
1601         (GLint *)params
1602     );
1603 
1604 exit:
1605     if (_array) {
1606         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1607     }
1608     if (_exception) {
1609         jniThrowException(_env, _exceptionType, _exceptionMessage);
1610     }
1611 }
1612 
1613 /* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */
1614 static void
android_glGetTexParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1615 android_glGetTexParameterIuiv__II_3II
1616   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1617     jint _exception = 0;
1618     const char * _exceptionType = NULL;
1619     const char * _exceptionMessage = NULL;
1620     GLuint *params_base = (GLuint *) 0;
1621     jint _remaining;
1622     GLuint *params = (GLuint *) 0;
1623 
1624     if (!params_ref) {
1625         _exception = 1;
1626         _exceptionType = "java/lang/IllegalArgumentException";
1627         _exceptionMessage = "params == null";
1628         goto exit;
1629     }
1630     if (offset < 0) {
1631         _exception = 1;
1632         _exceptionType = "java/lang/IllegalArgumentException";
1633         _exceptionMessage = "offset < 0";
1634         goto exit;
1635     }
1636     _remaining = _env->GetArrayLength(params_ref) - offset;
1637     params_base = (GLuint *)
1638         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1639     params = params_base + offset;
1640 
1641     glGetTexParameterIuiv(
1642         (GLenum)target,
1643         (GLenum)pname,
1644         (GLuint *)params
1645     );
1646 
1647 exit:
1648     if (params_base) {
1649         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1650             _exception ? JNI_ABORT: 0);
1651     }
1652     if (_exception) {
1653         jniThrowException(_env, _exceptionType, _exceptionMessage);
1654     }
1655 }
1656 
1657 /* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */
1658 static void
android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1659 android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2
1660   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1661     jint _exception = 0;
1662     const char * _exceptionType = NULL;
1663     const char * _exceptionMessage = NULL;
1664     jintArray _array = (jintArray) 0;
1665     jint _bufferOffset = (jint) 0;
1666     jint _remaining;
1667     GLuint *params = (GLuint *) 0;
1668 
1669     if (!params_buf) {
1670         _exception = 1;
1671         _exceptionType = "java/lang/IllegalArgumentException";
1672         _exceptionMessage = "params == null";
1673         goto exit;
1674     }
1675     params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1676     if (params == NULL) {
1677         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1678         params = (GLuint *) (_paramsBase + _bufferOffset);
1679     }
1680     glGetTexParameterIuiv(
1681         (GLenum)target,
1682         (GLenum)pname,
1683         (GLuint *)params
1684     );
1685 
1686 exit:
1687     if (_array) {
1688         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1689     }
1690     if (_exception) {
1691         jniThrowException(_env, _exceptionType, _exceptionMessage);
1692     }
1693 }
1694 
1695 /* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */
1696 static void
android_glSamplerParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray param_ref,jint offset)1697 android_glSamplerParameterIiv__II_3II
1698   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1699     jint _exception = 0;
1700     const char * _exceptionType = NULL;
1701     const char * _exceptionMessage = NULL;
1702     GLint *param_base = (GLint *) 0;
1703     jint _remaining;
1704     GLint *param = (GLint *) 0;
1705 
1706     if (!param_ref) {
1707         _exception = 1;
1708         _exceptionType = "java/lang/IllegalArgumentException";
1709         _exceptionMessage = "param == null";
1710         goto exit;
1711     }
1712     if (offset < 0) {
1713         _exception = 1;
1714         _exceptionType = "java/lang/IllegalArgumentException";
1715         _exceptionMessage = "offset < 0";
1716         goto exit;
1717     }
1718     _remaining = _env->GetArrayLength(param_ref) - offset;
1719     param_base = (GLint *)
1720         _env->GetIntArrayElements(param_ref, (jboolean *)0);
1721     param = param_base + offset;
1722 
1723     glSamplerParameterIiv(
1724         (GLuint)sampler,
1725         (GLenum)pname,
1726         (GLint *)param
1727     );
1728 
1729 exit:
1730     if (param_base) {
1731         _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
1732             JNI_ABORT);
1733     }
1734     if (_exception) {
1735         jniThrowException(_env, _exceptionType, _exceptionMessage);
1736     }
1737 }
1738 
1739 /* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */
1740 static void
android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject param_buf)1741 android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2
1742   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
1743     jint _exception = 0;
1744     const char * _exceptionType = NULL;
1745     const char * _exceptionMessage = NULL;
1746     jintArray _array = (jintArray) 0;
1747     jint _bufferOffset = (jint) 0;
1748     jint _remaining;
1749     GLint *param = (GLint *) 0;
1750 
1751     if (!param_buf) {
1752         _exception = 1;
1753         _exceptionType = "java/lang/IllegalArgumentException";
1754         _exceptionMessage = "param == null";
1755         goto exit;
1756     }
1757     param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1758     if (param == NULL) {
1759         char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1760         param = (GLint *) (_paramBase + _bufferOffset);
1761     }
1762     glSamplerParameterIiv(
1763         (GLuint)sampler,
1764         (GLenum)pname,
1765         (GLint *)param
1766     );
1767 
1768 exit:
1769     if (_array) {
1770         _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
1771     }
1772     if (_exception) {
1773         jniThrowException(_env, _exceptionType, _exceptionMessage);
1774     }
1775 }
1776 
1777 /* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */
1778 static void
android_glSamplerParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray param_ref,jint offset)1779 android_glSamplerParameterIuiv__II_3II
1780   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1781     jint _exception = 0;
1782     const char * _exceptionType = NULL;
1783     const char * _exceptionMessage = NULL;
1784     GLuint *param_base = (GLuint *) 0;
1785     jint _remaining;
1786     GLuint *param = (GLuint *) 0;
1787 
1788     if (!param_ref) {
1789         _exception = 1;
1790         _exceptionType = "java/lang/IllegalArgumentException";
1791         _exceptionMessage = "param == null";
1792         goto exit;
1793     }
1794     if (offset < 0) {
1795         _exception = 1;
1796         _exceptionType = "java/lang/IllegalArgumentException";
1797         _exceptionMessage = "offset < 0";
1798         goto exit;
1799     }
1800     _remaining = _env->GetArrayLength(param_ref) - offset;
1801     param_base = (GLuint *)
1802         _env->GetIntArrayElements(param_ref, (jboolean *)0);
1803     param = param_base + offset;
1804 
1805     glSamplerParameterIuiv(
1806         (GLuint)sampler,
1807         (GLenum)pname,
1808         (GLuint *)param
1809     );
1810 
1811 exit:
1812     if (param_base) {
1813         _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
1814             JNI_ABORT);
1815     }
1816     if (_exception) {
1817         jniThrowException(_env, _exceptionType, _exceptionMessage);
1818     }
1819 }
1820 
1821 /* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */
1822 static void
android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject param_buf)1823 android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2
1824   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
1825     jint _exception = 0;
1826     const char * _exceptionType = NULL;
1827     const char * _exceptionMessage = NULL;
1828     jintArray _array = (jintArray) 0;
1829     jint _bufferOffset = (jint) 0;
1830     jint _remaining;
1831     GLuint *param = (GLuint *) 0;
1832 
1833     if (!param_buf) {
1834         _exception = 1;
1835         _exceptionType = "java/lang/IllegalArgumentException";
1836         _exceptionMessage = "param == null";
1837         goto exit;
1838     }
1839     param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1840     if (param == NULL) {
1841         char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1842         param = (GLuint *) (_paramBase + _bufferOffset);
1843     }
1844     glSamplerParameterIuiv(
1845         (GLuint)sampler,
1846         (GLenum)pname,
1847         (GLuint *)param
1848     );
1849 
1850 exit:
1851     if (_array) {
1852         _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
1853     }
1854     if (_exception) {
1855         jniThrowException(_env, _exceptionType, _exceptionMessage);
1856     }
1857 }
1858 
1859 /* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */
1860 static void
android_glGetSamplerParameterIiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray params_ref,jint offset)1861 android_glGetSamplerParameterIiv__II_3II
1862   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1863     jint _exception = 0;
1864     const char * _exceptionType = NULL;
1865     const char * _exceptionMessage = NULL;
1866     GLint *params_base = (GLint *) 0;
1867     jint _remaining;
1868     GLint *params = (GLint *) 0;
1869 
1870     if (!params_ref) {
1871         _exception = 1;
1872         _exceptionType = "java/lang/IllegalArgumentException";
1873         _exceptionMessage = "params == null";
1874         goto exit;
1875     }
1876     if (offset < 0) {
1877         _exception = 1;
1878         _exceptionType = "java/lang/IllegalArgumentException";
1879         _exceptionMessage = "offset < 0";
1880         goto exit;
1881     }
1882     _remaining = _env->GetArrayLength(params_ref) - offset;
1883     params_base = (GLint *)
1884         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1885     params = params_base + offset;
1886 
1887     glGetSamplerParameterIiv(
1888         (GLuint)sampler,
1889         (GLenum)pname,
1890         (GLint *)params
1891     );
1892 
1893 exit:
1894     if (params_base) {
1895         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1896             _exception ? JNI_ABORT: 0);
1897     }
1898     if (_exception) {
1899         jniThrowException(_env, _exceptionType, _exceptionMessage);
1900     }
1901 }
1902 
1903 /* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */
1904 static void
android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject params_buf)1905 android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2
1906   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
1907     jint _exception = 0;
1908     const char * _exceptionType = NULL;
1909     const char * _exceptionMessage = NULL;
1910     jintArray _array = (jintArray) 0;
1911     jint _bufferOffset = (jint) 0;
1912     jint _remaining;
1913     GLint *params = (GLint *) 0;
1914 
1915     if (!params_buf) {
1916         _exception = 1;
1917         _exceptionType = "java/lang/IllegalArgumentException";
1918         _exceptionMessage = "params == null";
1919         goto exit;
1920     }
1921     params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1922     if (params == NULL) {
1923         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1924         params = (GLint *) (_paramsBase + _bufferOffset);
1925     }
1926     glGetSamplerParameterIiv(
1927         (GLuint)sampler,
1928         (GLenum)pname,
1929         (GLint *)params
1930     );
1931 
1932 exit:
1933     if (_array) {
1934         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1935     }
1936     if (_exception) {
1937         jniThrowException(_env, _exceptionType, _exceptionMessage);
1938     }
1939 }
1940 
1941 /* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */
1942 static void
android_glGetSamplerParameterIuiv__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray params_ref,jint offset)1943 android_glGetSamplerParameterIuiv__II_3II
1944   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1945     jint _exception = 0;
1946     const char * _exceptionType = NULL;
1947     const char * _exceptionMessage = NULL;
1948     GLuint *params_base = (GLuint *) 0;
1949     jint _remaining;
1950     GLuint *params = (GLuint *) 0;
1951 
1952     if (!params_ref) {
1953         _exception = 1;
1954         _exceptionType = "java/lang/IllegalArgumentException";
1955         _exceptionMessage = "params == null";
1956         goto exit;
1957     }
1958     if (offset < 0) {
1959         _exception = 1;
1960         _exceptionType = "java/lang/IllegalArgumentException";
1961         _exceptionMessage = "offset < 0";
1962         goto exit;
1963     }
1964     _remaining = _env->GetArrayLength(params_ref) - offset;
1965     params_base = (GLuint *)
1966         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1967     params = params_base + offset;
1968 
1969     glGetSamplerParameterIuiv(
1970         (GLuint)sampler,
1971         (GLenum)pname,
1972         (GLuint *)params
1973     );
1974 
1975 exit:
1976     if (params_base) {
1977         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1978             _exception ? JNI_ABORT: 0);
1979     }
1980     if (_exception) {
1981         jniThrowException(_env, _exceptionType, _exceptionMessage);
1982     }
1983 }
1984 
1985 /* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */
1986 static void
android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject params_buf)1987 android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2
1988   (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
1989     jint _exception = 0;
1990     const char * _exceptionType = NULL;
1991     const char * _exceptionMessage = NULL;
1992     jintArray _array = (jintArray) 0;
1993     jint _bufferOffset = (jint) 0;
1994     jint _remaining;
1995     GLuint *params = (GLuint *) 0;
1996 
1997     if (!params_buf) {
1998         _exception = 1;
1999         _exceptionType = "java/lang/IllegalArgumentException";
2000         _exceptionMessage = "params == null";
2001         goto exit;
2002     }
2003     params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2004     if (params == NULL) {
2005         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2006         params = (GLuint *) (_paramsBase + _bufferOffset);
2007     }
2008     glGetSamplerParameterIuiv(
2009         (GLuint)sampler,
2010         (GLenum)pname,
2011         (GLuint *)params
2012     );
2013 
2014 exit:
2015     if (_array) {
2016         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
2017     }
2018     if (_exception) {
2019         jniThrowException(_env, _exceptionType, _exceptionMessage);
2020     }
2021 }
2022 
2023 /* void glTexBuffer ( GLenum target, GLenum internalformat, GLuint buffer ) */
2024 static void
android_glTexBuffer__III(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint buffer)2025 android_glTexBuffer__III
2026   (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer) {
2027     glTexBuffer(
2028         (GLenum)target,
2029         (GLenum)internalformat,
2030         (GLuint)buffer
2031     );
2032 }
2033 
2034 /* void glTexBufferRange ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
2035 static void
android_glTexBufferRange__IIIII(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint buffer,jint offset,jint size)2036 android_glTexBufferRange__IIIII
2037   (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer, jint offset, jint size) {
2038     glTexBufferRange(
2039         (GLenum)target,
2040         (GLenum)internalformat,
2041         (GLuint)buffer,
2042         (GLintptr)offset,
2043         (GLsizeiptr)size
2044     );
2045 }
2046 
2047 /* void glTexStorage3DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations ) */
2048 static void
android_glTexStorage3DMultisample__IIIIIIZ(JNIEnv * _env,jobject _this,jint target,jint samples,jint internalformat,jint width,jint height,jint depth,jboolean fixedsamplelocations)2049 android_glTexStorage3DMultisample__IIIIIIZ
2050   (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) {
2051     glTexStorage3DMultisample(
2052         (GLenum)target,
2053         (GLsizei)samples,
2054         (GLenum)internalformat,
2055         (GLsizei)width,
2056         (GLsizei)height,
2057         (GLsizei)depth,
2058         (GLboolean)fixedsamplelocations
2059     );
2060 }
2061 
2062 static const char *classPathName = "android/opengl/GLES32";
2063 
2064 static const JNINativeMethod methods[] = {
2065 {"_nativeClassInit", "()V", (void*)nativeClassInit },
2066 {"glBlendBarrier", "()V", (void *) android_glBlendBarrier__ },
2067 {"glCopyImageSubData", "(IIIIIIIIIIIIIII)V", (void *) android_glCopyImageSubData__IIIIIIIIIIIIIII },
2068 {"glDebugMessageControl", "(IIII[IIZ)V", (void *) android_glDebugMessageControl__IIII_3IIZ },
2069 {"glDebugMessageControl", "(IIIILjava/nio/IntBuffer;Z)V", (void *) android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z },
2070 {"glDebugMessageInsert", "(IIIIILjava/lang/String;)V", (void *) android_glDebugMessageInsert__IIIIILjava_lang_String_2 },
2071 {"glDebugMessageCallback", "(Landroid/opengl/GLES32$DebugProc;)V", (void *) android_glDebugMessageCallback },
2072 {"glGetDebugMessageLog", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI },
2073 {"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 },
2074 {"glGetDebugMessageLog", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__I_3II_3II_3II_3II },
2075 {"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 },
2076 {"glPushDebugGroup", "(IIILjava/lang/String;)V", (void *) android_glPushDebugGroup__IIILjava_lang_String_2 },
2077 {"glPopDebugGroup", "()V", (void *) android_glPopDebugGroup__ },
2078 {"glObjectLabel", "(IIILjava/lang/String;)V", (void *) android_glObjectLabel__IIILjava_lang_String_2 },
2079 {"glGetObjectLabel", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabel },
2080 {"glObjectPtrLabel", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabel },
2081 {"glGetObjectPtrLabel", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabel },
2082 {"glGetPointerv", "(I)J", (void *) android_glGetPointerv },
2083 {"glEnablei", "(II)V", (void *) android_glEnablei__II },
2084 {"glDisablei", "(II)V", (void *) android_glDisablei__II },
2085 {"glBlendEquationi", "(II)V", (void *) android_glBlendEquationi__II },
2086 {"glBlendEquationSeparatei", "(III)V", (void *) android_glBlendEquationSeparatei__III },
2087 {"glBlendFunci", "(III)V", (void *) android_glBlendFunci__III },
2088 {"glBlendFuncSeparatei", "(IIIII)V", (void *) android_glBlendFuncSeparatei__IIIII },
2089 {"glColorMaski", "(IZZZZ)V", (void *) android_glColorMaski__IZZZZ },
2090 {"glIsEnabledi", "(II)Z", (void *) android_glIsEnabledi__II },
2091 {"glDrawElementsBaseVertex", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I },
2092 {"glDrawRangeElementsBaseVertex", "(IIIIILjava/nio/Buffer;I)V", (void *) android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I },
2093 {"glDrawElementsInstancedBaseVertex", "(IIILjava/nio/Buffer;II)V", (void *) android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II },
2094 {"glDrawElementsInstancedBaseVertex", "(IIIIII)V", (void *) android_glDrawElementsInstancedBaseVertex__IIIIII },
2095 {"glFramebufferTexture", "(IIII)V", (void *) android_glFramebufferTexture__IIII },
2096 {"glPrimitiveBoundingBox", "(FFFFFFFF)V", (void *) android_glPrimitiveBoundingBox__FFFFFFFF },
2097 {"glGetGraphicsResetStatus", "()I", (void *) android_glGetGraphicsResetStatus__ },
2098 {"glReadnPixels", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glReadnPixels__IIIIIIILjava_nio_Buffer_2 },
2099 {"glGetnUniformfv", "(III[FI)V", (void *) android_glGetnUniformfv__III_3FI },
2100 {"glGetnUniformfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2 },
2101 {"glGetnUniformiv", "(III[II)V", (void *) android_glGetnUniformiv__III_3II },
2102 {"glGetnUniformiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformiv__IIILjava_nio_IntBuffer_2 },
2103 {"glGetnUniformuiv", "(III[II)V", (void *) android_glGetnUniformuiv__III_3II },
2104 {"glGetnUniformuiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2 },
2105 {"glMinSampleShading", "(F)V", (void *) android_glMinSampleShading__F },
2106 {"glPatchParameteri", "(II)V", (void *) android_glPatchParameteri__II },
2107 {"glTexParameterIiv", "(II[II)V", (void *) android_glTexParameterIiv__II_3II },
2108 {"glTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIiv__IILjava_nio_IntBuffer_2 },
2109 {"glTexParameterIuiv", "(II[II)V", (void *) android_glTexParameterIuiv__II_3II },
2110 {"glTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIuiv__IILjava_nio_IntBuffer_2 },
2111 {"glGetTexParameterIiv", "(II[II)V", (void *) android_glGetTexParameterIiv__II_3II },
2112 {"glGetTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2 },
2113 {"glGetTexParameterIuiv", "(II[II)V", (void *) android_glGetTexParameterIuiv__II_3II },
2114 {"glGetTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2 },
2115 {"glSamplerParameterIiv", "(II[II)V", (void *) android_glSamplerParameterIiv__II_3II },
2116 {"glSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2 },
2117 {"glSamplerParameterIuiv", "(II[II)V", (void *) android_glSamplerParameterIuiv__II_3II },
2118 {"glSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2 },
2119 {"glGetSamplerParameterIiv", "(II[II)V", (void *) android_glGetSamplerParameterIiv__II_3II },
2120 {"glGetSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2 },
2121 {"glGetSamplerParameterIuiv", "(II[II)V", (void *) android_glGetSamplerParameterIuiv__II_3II },
2122 {"glGetSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2 },
2123 {"glTexBuffer", "(III)V", (void *) android_glTexBuffer__III },
2124 {"glTexBufferRange", "(IIIII)V", (void *) android_glTexBufferRange__IIIII },
2125 {"glTexStorage3DMultisample", "(IIIIIIZ)V", (void *) android_glTexStorage3DMultisample__IIIIIIZ },
2126 };
2127 
register_android_opengl_jni_GLES32(JNIEnv * _env)2128 int register_android_opengl_jni_GLES32(JNIEnv *_env)
2129 {
2130     int err;
2131     err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
2132     return err;
2133 }
2134