1 /*
2 * Copyright 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 // This source file is automatically generated
18
19 #pragma GCC diagnostic ignored "-Wunused-variable"
20 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
21 #pragma GCC diagnostic ignored "-Wunused-function"
22
23 #include <GLES3/gl31.h>
24 #include <GLES2/gl2ext.h>
25
26 #include <jni.h>
27 #include <nativehelper/JNIHelp.h>
28 #include <android_runtime/AndroidRuntime.h>
29 #include <utils/misc.h>
30 #include <assert.h>
31
32 static int initialized = 0;
33
34 static jclass nioAccessClass;
35 static jclass bufferClass;
36 static jmethodID getBasePointerID;
37 static jmethodID getBaseArrayID;
38 static jmethodID getBaseArrayOffsetID;
39 static jfieldID positionID;
40 static jfieldID limitID;
41 static jfieldID elementSizeShiftID;
42
43
44 /* special calls implemented in Android's GLES wrapper used to more
45 * efficiently bound-check passed arrays */
46 extern "C" {
47 #ifdef GL_VERSION_ES_CM_1_1
48 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
49 const GLvoid *ptr, GLsizei count);
50 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
51 const GLvoid *pointer, GLsizei count);
52 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
53 GLsizei stride, const GLvoid *pointer, GLsizei count);
54 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
55 GLsizei stride, const GLvoid *pointer, GLsizei count);
56 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
57 GLsizei stride, const GLvoid *pointer, GLsizei count);
58 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
59 GLsizei stride, const GLvoid *pointer, GLsizei count);
60 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
61 GLsizei stride, const GLvoid *pointer, GLsizei count);
62 #endif
63 #ifdef GL_ES_VERSION_2_0
glVertexAttribPointerBounds(GLuint indx,GLint size,GLenum type,GLboolean normalized,GLsizei stride,const GLvoid * pointer,GLsizei count)64 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
65 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
66 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
67 }
68 #endif
69 #ifdef GL_ES_VERSION_3_0
glVertexAttribIPointerBounds(GLuint indx,GLint size,GLenum type,GLsizei stride,const GLvoid * pointer,GLsizei count)70 static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
71 GLsizei stride, const GLvoid *pointer, GLsizei count) {
72 glVertexAttribIPointer(indx, size, type, stride, pointer);
73 }
74 #endif
75 }
76
77 /* Cache method IDs each time the class is loaded. */
78
79 static void
nativeClassInit(JNIEnv * _env,jclass glImplClass)80 nativeClassInit(JNIEnv *_env, jclass glImplClass)
81 {
82 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
83 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
84
85 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
86 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
87
88 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
89 "getBasePointer", "(Ljava/nio/Buffer;)J");
90 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
91 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
92 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
93 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
94
95 positionID = _env->GetFieldID(bufferClass, "position", "I");
96 limitID = _env->GetFieldID(bufferClass, "limit", "I");
97 elementSizeShiftID =
98 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
99 }
100
101 static void *
getPointer(JNIEnv * _env,jobject buffer,jarray * array,jint * remaining,jint * offset)102 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
103 {
104 jint position;
105 jint limit;
106 jint elementSizeShift;
107 jlong pointer;
108
109 position = _env->GetIntField(buffer, positionID);
110 limit = _env->GetIntField(buffer, limitID);
111 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
112 *remaining = (limit - position) << elementSizeShift;
113 pointer = _env->CallStaticLongMethod(nioAccessClass,
114 getBasePointerID, buffer);
115 if (pointer != 0L) {
116 *array = NULL;
117 return reinterpret_cast<void*>(pointer);
118 }
119
120 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
121 getBaseArrayID, buffer);
122 *offset = _env->CallStaticIntMethod(nioAccessClass,
123 getBaseArrayOffsetID, buffer);
124
125 return NULL;
126 }
127
128 class ByteArrayGetter {
129 public:
Get(JNIEnv * _env,jbyteArray array,jboolean * is_copy)130 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
131 return _env->GetByteArrayElements(array, is_copy);
132 }
133 };
134 class BooleanArrayGetter {
135 public:
Get(JNIEnv * _env,jbooleanArray array,jboolean * is_copy)136 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
137 return _env->GetBooleanArrayElements(array, is_copy);
138 }
139 };
140 class CharArrayGetter {
141 public:
Get(JNIEnv * _env,jcharArray array,jboolean * is_copy)142 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
143 return _env->GetCharArrayElements(array, is_copy);
144 }
145 };
146 class ShortArrayGetter {
147 public:
Get(JNIEnv * _env,jshortArray array,jboolean * is_copy)148 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
149 return _env->GetShortArrayElements(array, is_copy);
150 }
151 };
152 class IntArrayGetter {
153 public:
Get(JNIEnv * _env,jintArray array,jboolean * is_copy)154 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
155 return _env->GetIntArrayElements(array, is_copy);
156 }
157 };
158 class LongArrayGetter {
159 public:
Get(JNIEnv * _env,jlongArray array,jboolean * is_copy)160 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
161 return _env->GetLongArrayElements(array, is_copy);
162 }
163 };
164 class FloatArrayGetter {
165 public:
Get(JNIEnv * _env,jfloatArray array,jboolean * is_copy)166 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
167 return _env->GetFloatArrayElements(array, is_copy);
168 }
169 };
170 class DoubleArrayGetter {
171 public:
Get(JNIEnv * _env,jdoubleArray array,jboolean * is_copy)172 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
173 return _env->GetDoubleArrayElements(array, is_copy);
174 }
175 };
176
177 template<typename JTYPEARRAY, typename ARRAYGETTER>
178 static void*
getArrayPointer(JNIEnv * _env,JTYPEARRAY array,jboolean * is_copy)179 getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
180 return ARRAYGETTER::Get(_env, array, is_copy);
181 }
182
183 class ByteArrayReleaser {
184 public:
Release(JNIEnv * _env,jbyteArray array,jbyte * data,jboolean commit)185 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
186 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
187 }
188 };
189 class BooleanArrayReleaser {
190 public:
Release(JNIEnv * _env,jbooleanArray array,jboolean * data,jboolean commit)191 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
192 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
193 }
194 };
195 class CharArrayReleaser {
196 public:
Release(JNIEnv * _env,jcharArray array,jchar * data,jboolean commit)197 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
198 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
199 }
200 };
201 class ShortArrayReleaser {
202 public:
Release(JNIEnv * _env,jshortArray array,jshort * data,jboolean commit)203 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
204 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
205 }
206 };
207 class IntArrayReleaser {
208 public:
Release(JNIEnv * _env,jintArray array,jint * data,jboolean commit)209 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
210 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
211 }
212 };
213 class LongArrayReleaser {
214 public:
Release(JNIEnv * _env,jlongArray array,jlong * data,jboolean commit)215 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
216 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
217 }
218 };
219 class FloatArrayReleaser {
220 public:
Release(JNIEnv * _env,jfloatArray array,jfloat * data,jboolean commit)221 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
222 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
223 }
224 };
225 class DoubleArrayReleaser {
226 public:
Release(JNIEnv * _env,jdoubleArray array,jdouble * data,jboolean commit)227 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
228 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
229 }
230 };
231
232 template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
233 static void
releaseArrayPointer(JNIEnv * _env,JTYPEARRAY array,NTYPEARRAY data,jboolean commit)234 releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
235 ARRAYRELEASER::Release(_env, array, data, commit);
236 }
237
238 static void
releasePointer(JNIEnv * _env,jarray array,void * data,jboolean commit)239 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
240 {
241 _env->ReleasePrimitiveArrayCritical(array, data,
242 commit ? 0 : JNI_ABORT);
243 }
244
245 static void *
getDirectBufferPointer(JNIEnv * _env,jobject buffer)246 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
247 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
248 if (buf) {
249 jint position = _env->GetIntField(buffer, positionID);
250 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
251 buf += position << elementSizeShift;
252 } else {
253 jniThrowException(_env, "java/lang/IllegalArgumentException",
254 "Must use a native order direct Buffer");
255 }
256 return (void*) buf;
257 }
258
259 // --------------------------------------------------------------------------
260
261 /*
262 * returns the number of values glGet returns for a given pname.
263 *
264 * The code below is written such that pnames requiring only one values
265 * are the default (and are not explicitely tested for). This makes the
266 * checking code much shorter/readable/efficient.
267 *
268 * This means that unknown pnames (e.g.: extensions) will default to 1. If
269 * that unknown pname needs more than 1 value, then the validation check
270 * is incomplete and the app may crash if it passed the wrong number params.
271 */
getNeededCount(GLint pname)272 static int getNeededCount(GLint pname) {
273 int needed = 1;
274 #ifdef GL_ES_VERSION_3_0
275 // GLES 3.x pnames
276 switch (pname) {
277 case GL_MAX_VIEWPORT_DIMS:
278 needed = 2;
279 break;
280
281 case GL_PROGRAM_BINARY_FORMATS:
282 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
283 break;
284 }
285 #endif
286
287 #ifdef GL_ES_VERSION_2_0
288 // GLES 2.x pnames
289 switch (pname) {
290 case GL_ALIASED_LINE_WIDTH_RANGE:
291 case GL_ALIASED_POINT_SIZE_RANGE:
292 needed = 2;
293 break;
294
295 case GL_BLEND_COLOR:
296 case GL_COLOR_CLEAR_VALUE:
297 case GL_COLOR_WRITEMASK:
298 case GL_SCISSOR_BOX:
299 case GL_VIEWPORT:
300 needed = 4;
301 break;
302
303 case GL_COMPRESSED_TEXTURE_FORMATS:
304 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
305 break;
306
307 case GL_SHADER_BINARY_FORMATS:
308 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
309 break;
310 }
311 #endif
312
313 #ifdef GL_VERSION_ES_CM_1_1
314 // GLES 1.x pnames
315 switch (pname) {
316 case GL_ALIASED_LINE_WIDTH_RANGE:
317 case GL_ALIASED_POINT_SIZE_RANGE:
318 case GL_DEPTH_RANGE:
319 case GL_SMOOTH_LINE_WIDTH_RANGE:
320 case GL_SMOOTH_POINT_SIZE_RANGE:
321 needed = 2;
322 break;
323
324 case GL_CURRENT_NORMAL:
325 case GL_POINT_DISTANCE_ATTENUATION:
326 needed = 3;
327 break;
328
329 case GL_COLOR_CLEAR_VALUE:
330 case GL_COLOR_WRITEMASK:
331 case GL_CURRENT_COLOR:
332 case GL_CURRENT_TEXTURE_COORDS:
333 case GL_FOG_COLOR:
334 case GL_LIGHT_MODEL_AMBIENT:
335 case GL_SCISSOR_BOX:
336 case GL_VIEWPORT:
337 needed = 4;
338 break;
339
340 case GL_MODELVIEW_MATRIX:
341 case GL_PROJECTION_MATRIX:
342 case GL_TEXTURE_MATRIX:
343 needed = 16;
344 break;
345
346 case GL_COMPRESSED_TEXTURE_FORMATS:
347 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
348 break;
349 }
350 #endif
351 return needed;
352 }
353
354 template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
355 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
356 static void
get(JNIEnv * _env,jobject _this,jint pname,JTYPEARRAY params_ref,jint offset)357 get
358 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
359 jint _exception = 0;
360 const char * _exceptionType;
361 const char * _exceptionMessage;
362 CTYPE *params_base = (CTYPE *) 0;
363 jint _remaining;
364 CTYPE *params = (CTYPE *) 0;
365 int _needed = 0;
366
367 if (!params_ref) {
368 _exception = 1;
369 _exceptionType = "java/lang/IllegalArgumentException";
370 _exceptionMessage = "params == null";
371 goto exit;
372 }
373 if (offset < 0) {
374 _exception = 1;
375 _exceptionType = "java/lang/IllegalArgumentException";
376 _exceptionMessage = "offset < 0";
377 goto exit;
378 }
379 _remaining = _env->GetArrayLength(params_ref) - offset;
380 _needed = getNeededCount(pname);
381 // if we didn't find this pname, we just assume the user passed
382 // an array of the right size -- this might happen with extensions
383 // or if we forget an enum here.
384 if (_remaining < _needed) {
385 _exception = 1;
386 _exceptionType = "java/lang/IllegalArgumentException";
387 _exceptionMessage = "length - offset < needed";
388 goto exit;
389 }
390 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
391 _env, params_ref, (jboolean *)0);
392 params = params_base + offset;
393
394 GET(
395 (GLenum)pname,
396 (CTYPE *)params
397 );
398
399 exit:
400 if (params_base) {
401 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
402 _env, params_ref, params_base, !_exception);
403 }
404 if (_exception) {
405 jniThrowException(_env, _exceptionType, _exceptionMessage);
406 }
407 }
408
409
410 template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
411 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
412 static void
getarray(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)413 getarray
414 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
415 jint _exception = 0;
416 const char * _exceptionType;
417 const char * _exceptionMessage;
418 JTYPEARRAY _array = (JTYPEARRAY) 0;
419 jint _bufferOffset = (jint) 0;
420 jint _remaining;
421 CTYPE *params = (CTYPE *) 0;
422 int _needed = 0;
423
424 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
425 _remaining /= sizeof(CTYPE); // convert from bytes to item count
426 _needed = getNeededCount(pname);
427 // if we didn't find this pname, we just assume the user passed
428 // an array of the right size -- this might happen with extensions
429 // or if we forget an enum here.
430 if (_needed>0 && _remaining < _needed) {
431 _exception = 1;
432 _exceptionType = "java/lang/IllegalArgumentException";
433 _exceptionMessage = "remaining() < needed";
434 goto exit;
435 }
436 if (params == NULL) {
437 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
438 _env, _array, (jboolean *) 0);
439 params = (CTYPE *) (_paramsBase + _bufferOffset);
440 }
441 GET(
442 (GLenum)pname,
443 (CTYPE *)params
444 );
445
446 exit:
447 if (_array) {
448 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
449 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
450 }
451 if (_exception) {
452 jniThrowException(_env, _exceptionType, _exceptionMessage);
453 }
454 }
455
456 // --------------------------------------------------------------------------
457 /* void glBlendBarrierKHR ( void ) */
458 static void
android_glBlendBarrierKHR__(JNIEnv * _env,jobject _this)459 android_glBlendBarrierKHR__
460 (JNIEnv *_env, jobject _this) {
461 glBlendBarrierKHR();
462 }
463
464 /* void glDebugMessageControlKHR ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
465 static void
android_glDebugMessageControlKHR__IIII_3IIZ(JNIEnv * _env,jobject _this,jint source,jint type,jint severity,jint count,jintArray ids_ref,jint offset,jboolean enabled)466 android_glDebugMessageControlKHR__IIII_3IIZ
467 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jintArray ids_ref, jint offset, jboolean enabled) {
468 jint _exception = 0;
469 const char * _exceptionType = NULL;
470 const char * _exceptionMessage = NULL;
471 GLuint *ids_base = (GLuint *) 0;
472 jint _remaining;
473 GLuint *ids = (GLuint *) 0;
474
475 if (!ids_ref) {
476 _exception = 1;
477 _exceptionType = "java/lang/IllegalArgumentException";
478 _exceptionMessage = "ids == null";
479 goto exit;
480 }
481 if (offset < 0) {
482 _exception = 1;
483 _exceptionType = "java/lang/IllegalArgumentException";
484 _exceptionMessage = "offset < 0";
485 goto exit;
486 }
487 _remaining = _env->GetArrayLength(ids_ref) - offset;
488 ids_base = (GLuint *)
489 _env->GetIntArrayElements(ids_ref, (jboolean *)0);
490 ids = ids_base + offset;
491
492 glDebugMessageControlKHR(
493 (GLenum)source,
494 (GLenum)type,
495 (GLenum)severity,
496 (GLsizei)count,
497 (GLuint *)ids,
498 (GLboolean)enabled
499 );
500
501 exit:
502 if (ids_base) {
503 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base,
504 JNI_ABORT);
505 }
506 if (_exception) {
507 jniThrowException(_env, _exceptionType, _exceptionMessage);
508 }
509 }
510
511 /* void glDebugMessageControlKHR ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
512 static void
android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z(JNIEnv * _env,jobject _this,jint source,jint type,jint severity,jint count,jobject ids_buf,jboolean enabled)513 android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z
514 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) {
515 jint _exception = 0;
516 const char * _exceptionType = NULL;
517 const char * _exceptionMessage = NULL;
518 jintArray _array = (jintArray) 0;
519 jint _bufferOffset = (jint) 0;
520 jint _remaining;
521 GLuint *ids = (GLuint *) 0;
522
523 if (!ids_buf) {
524 _exception = 1;
525 _exceptionType = "java/lang/IllegalArgumentException";
526 _exceptionMessage = "ids == null";
527 goto exit;
528 }
529 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
530 if (ids == NULL) {
531 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
532 ids = (GLuint *) (_idsBase + _bufferOffset);
533 }
534 glDebugMessageControlKHR(
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 glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
553 static void
android_glDebugMessageInsertKHR__IIIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint source,jint type,jint id,jint severity,jstring buf)554 android_glDebugMessageInsertKHR__IIIILjava_lang_String_2
555 (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jstring buf) {
556 jint _exception = 0;
557 const char * _exceptionType = NULL;
558 const char * _exceptionMessage = NULL;
559 const char* _nativebuf = 0;
560 jint _length = 0;
561
562 if (!buf) {
563 _exception = 1;
564 _exceptionType = "java/lang/IllegalArgumentException";
565 _exceptionMessage = "buf == null";
566 goto exit;
567 }
568 _nativebuf = _env->GetStringUTFChars(buf, 0);
569 _length = _env->GetStringUTFLength(buf);
570
571 glDebugMessageInsertKHR(
572 (GLenum)source,
573 (GLenum)type,
574 (GLuint)id,
575 (GLenum)severity,
576 (GLsizei)_length,
577 (GLchar *)_nativebuf
578 );
579
580 exit:
581 if (_nativebuf) {
582 _env->ReleaseStringUTFChars(buf, _nativebuf);
583 }
584
585 if (_exception) {
586 jniThrowException(_env, _exceptionType, _exceptionMessage);
587 }
588 }
589
590 /* void glDebugMessageCallbackKHR ( GLDEBUGPROCKHR callback, const void *userParam ) */
591 static void
android_glDebugMessageCallbackKHR(JNIEnv * _env,jobject _this,jobject callback)592 android_glDebugMessageCallbackKHR(JNIEnv *_env, jobject _this, jobject callback) {
593 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
594 }
595 /* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
596 static jint
android_glGetDebugMessageLogKHR__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)597 android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI
598 (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) {
599 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
600 return 0;
601 }
602
603 /* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
604 static uint
android_glGetDebugMessageLogKHR__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)605 android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
606 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
607 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
608 return 0;
609 }
610
611 /* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
612 static jobjectArray
android_glGetDebugMessageLogKHR__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)613 android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II
614 (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) {
615 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
616 return 0;
617 }
618
619 /* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
620 static jobjectArray
android_glGetDebugMessageLogKHR__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)621 android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
622 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
623 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
624 return 0;
625 }
626 /* void glPushDebugGroupKHR ( GLenum source, GLuint id, GLsizei length, const GLchar *message ) */
627 static void
android_glPushDebugGroupKHR__IIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint source,jint id,jint length,jstring message)628 android_glPushDebugGroupKHR__IIILjava_lang_String_2
629 (JNIEnv *_env, jobject _this, jint source, jint id, jint length, jstring message) {
630 jint _exception = 0;
631 const char * _exceptionType = NULL;
632 const char * _exceptionMessage = NULL;
633 const char* _nativemessage = 0;
634
635 if (!message) {
636 _exception = 1;
637 _exceptionType = "java/lang/IllegalArgumentException";
638 _exceptionMessage = "message == null";
639 goto exit;
640 }
641 _nativemessage = _env->GetStringUTFChars(message, 0);
642
643 glPushDebugGroupKHR(
644 (GLenum)source,
645 (GLuint)id,
646 (GLsizei)length,
647 (GLchar *)_nativemessage
648 );
649
650 exit:
651 if (_nativemessage) {
652 _env->ReleaseStringUTFChars(message, _nativemessage);
653 }
654
655 if (_exception) {
656 jniThrowException(_env, _exceptionType, _exceptionMessage);
657 }
658 }
659
660 /* void glPopDebugGroupKHR ( void ) */
661 static void
android_glPopDebugGroupKHR__(JNIEnv * _env,jobject _this)662 android_glPopDebugGroupKHR__
663 (JNIEnv *_env, jobject _this) {
664 glPopDebugGroupKHR();
665 }
666
667 /* void glObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */
668 static void
android_glObjectLabelKHR__IIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint identifier,jint name,jint length,jstring label)669 android_glObjectLabelKHR__IIILjava_lang_String_2
670 (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) {
671 jint _exception = 0;
672 const char * _exceptionType = NULL;
673 const char * _exceptionMessage = NULL;
674 const char* _nativelabel = 0;
675
676 if (label) {
677 _nativelabel = _env->GetStringUTFChars(label, 0);
678 }
679
680 glObjectLabelKHR(
681 (GLenum)identifier,
682 (GLuint)name,
683 (GLsizei)length,
684 (GLchar *)_nativelabel
685 );
686 if (_nativelabel) {
687 _env->ReleaseStringUTFChars(label, _nativelabel);
688 }
689
690 if (_exception) {
691 jniThrowException(_env, _exceptionType, _exceptionMessage);
692 }
693 }
694
695 /* void glGetObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
696 static jstring
android_glGetObjectLabelKHR(JNIEnv * _env,jobject _this,jint identifier,jint name)697 android_glGetObjectLabelKHR(JNIEnv *_env, jobject _this, jint identifier, jint name) {
698 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
699 return NULL;
700 }
701
702 /* void glObjectPtrLabelKHR ( const void *ptr, GLsizei length, const GLchar *label ) */
703 static void
android_glObjectPtrLabelKHR(JNIEnv * _env,jobject _this,jlong ptr,jstring label)704 android_glObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
705 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
706 }
707
708 /* void glGetObjectPtrLabelKHR ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
709 static jstring
android_glGetObjectPtrLabelKHR(JNIEnv * _env,jobject _this,jlong ptr)710 android_glGetObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr) {
711 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
712 return NULL;
713 }
714
715 /* void glGetPointervKHR ( GLenum pname, void **params ) */
716 static jobject
android_glGetDebugMessageCallbackKHR(JNIEnv * _env,jobject _this)717 android_glGetDebugMessageCallbackKHR(JNIEnv *_env, jobject _this) {
718 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
719 return NULL;
720 }
721
722 /* void glMinSampleShadingOES ( GLfloat value ) */
723 static void
android_glMinSampleShadingOES__F(JNIEnv * _env,jobject _this,jfloat value)724 android_glMinSampleShadingOES__F
725 (JNIEnv *_env, jobject _this, jfloat value) {
726 glMinSampleShadingOES(
727 (GLfloat)value
728 );
729 }
730
731 /* void glTexStorage3DMultisampleOES ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations ) */
732 static void
android_glTexStorage3DMultisampleOES__IIIIIIZ(JNIEnv * _env,jobject _this,jint target,jint samples,jint internalformat,jint width,jint height,jint depth,jboolean fixedsamplelocations)733 android_glTexStorage3DMultisampleOES__IIIIIIZ
734 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) {
735 glTexStorage3DMultisampleOES(
736 (GLenum)target,
737 (GLsizei)samples,
738 (GLenum)internalformat,
739 (GLsizei)width,
740 (GLsizei)height,
741 (GLsizei)depth,
742 (GLboolean)fixedsamplelocations
743 );
744 }
745
746 /* void glCopyImageSubDataEXT ( 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 ) */
747 static void
android_glCopyImageSubDataEXT__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)748 android_glCopyImageSubDataEXT__IIIIIIIIIIIIIII
749 (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) {
750 glCopyImageSubDataEXT(
751 (GLuint)srcName,
752 (GLenum)srcTarget,
753 (GLint)srcLevel,
754 (GLint)srcX,
755 (GLint)srcY,
756 (GLint)srcZ,
757 (GLuint)dstName,
758 (GLenum)dstTarget,
759 (GLint)dstLevel,
760 (GLint)dstX,
761 (GLint)dstY,
762 (GLint)dstZ,
763 (GLsizei)srcWidth,
764 (GLsizei)srcHeight,
765 (GLsizei)srcDepth
766 );
767 }
768
769 /* void glEnableiEXT ( GLenum target, GLuint index ) */
770 static void
android_glEnableiEXT__II(JNIEnv * _env,jobject _this,jint target,jint index)771 android_glEnableiEXT__II
772 (JNIEnv *_env, jobject _this, jint target, jint index) {
773 glEnableiEXT(
774 (GLenum)target,
775 (GLuint)index
776 );
777 }
778
779 /* void glDisableiEXT ( GLenum target, GLuint index ) */
780 static void
android_glDisableiEXT__II(JNIEnv * _env,jobject _this,jint target,jint index)781 android_glDisableiEXT__II
782 (JNIEnv *_env, jobject _this, jint target, jint index) {
783 glDisableiEXT(
784 (GLenum)target,
785 (GLuint)index
786 );
787 }
788
789 /* void glBlendEquationiEXT ( GLuint buf, GLenum mode ) */
790 static void
android_glBlendEquationiEXT__II(JNIEnv * _env,jobject _this,jint buf,jint mode)791 android_glBlendEquationiEXT__II
792 (JNIEnv *_env, jobject _this, jint buf, jint mode) {
793 glBlendEquationiEXT(
794 (GLuint)buf,
795 (GLenum)mode
796 );
797 }
798
799 /* void glBlendEquationSeparateiEXT ( GLuint buf, GLenum modeRGB, GLenum modeAlpha ) */
800 static void
android_glBlendEquationSeparateiEXT__III(JNIEnv * _env,jobject _this,jint buf,jint modeRGB,jint modeAlpha)801 android_glBlendEquationSeparateiEXT__III
802 (JNIEnv *_env, jobject _this, jint buf, jint modeRGB, jint modeAlpha) {
803 glBlendEquationSeparateiEXT(
804 (GLuint)buf,
805 (GLenum)modeRGB,
806 (GLenum)modeAlpha
807 );
808 }
809
810 /* void glBlendFunciEXT ( GLuint buf, GLenum src, GLenum dst ) */
811 static void
android_glBlendFunciEXT__III(JNIEnv * _env,jobject _this,jint buf,jint src,jint dst)812 android_glBlendFunciEXT__III
813 (JNIEnv *_env, jobject _this, jint buf, jint src, jint dst) {
814 glBlendFunciEXT(
815 (GLuint)buf,
816 (GLenum)src,
817 (GLenum)dst
818 );
819 }
820
821 /* void glBlendFuncSeparateiEXT ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
822 static void
android_glBlendFuncSeparateiEXT__IIIII(JNIEnv * _env,jobject _this,jint buf,jint srcRGB,jint dstRGB,jint srcAlpha,jint dstAlpha)823 android_glBlendFuncSeparateiEXT__IIIII
824 (JNIEnv *_env, jobject _this, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
825 glBlendFuncSeparateiEXT(
826 (GLuint)buf,
827 (GLenum)srcRGB,
828 (GLenum)dstRGB,
829 (GLenum)srcAlpha,
830 (GLenum)dstAlpha
831 );
832 }
833
834 /* void glColorMaskiEXT ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) */
835 static void
android_glColorMaskiEXT__IZZZZ(JNIEnv * _env,jobject _this,jint index,jboolean r,jboolean g,jboolean b,jboolean a)836 android_glColorMaskiEXT__IZZZZ
837 (JNIEnv *_env, jobject _this, jint index, jboolean r, jboolean g, jboolean b, jboolean a) {
838 glColorMaskiEXT(
839 (GLuint)index,
840 (GLboolean)r,
841 (GLboolean)g,
842 (GLboolean)b,
843 (GLboolean)a
844 );
845 }
846
847 /* GLboolean glIsEnablediEXT ( GLenum target, GLuint index ) */
848 static jboolean
android_glIsEnablediEXT__II(JNIEnv * _env,jobject _this,jint target,jint index)849 android_glIsEnablediEXT__II
850 (JNIEnv *_env, jobject _this, jint target, jint index) {
851 GLboolean _returnValue;
852 _returnValue = glIsEnablediEXT(
853 (GLenum)target,
854 (GLuint)index
855 );
856 return (jboolean)_returnValue;
857 }
858
859 /* void glFramebufferTextureEXT ( GLenum target, GLenum attachment, GLuint texture, GLint level ) */
860 static void
android_glFramebufferTextureEXT__IIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint texture,jint level)861 android_glFramebufferTextureEXT__IIII
862 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level) {
863 glFramebufferTextureEXT(
864 (GLenum)target,
865 (GLenum)attachment,
866 (GLuint)texture,
867 (GLint)level
868 );
869 }
870
871 /* void glPrimitiveBoundingBoxEXT ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ) */
872 static void
android_glPrimitiveBoundingBoxEXT__FFFFFFFF(JNIEnv * _env,jobject _this,jfloat minX,jfloat minY,jfloat minZ,jfloat minW,jfloat maxX,jfloat maxY,jfloat maxZ,jfloat maxW)873 android_glPrimitiveBoundingBoxEXT__FFFFFFFF
874 (JNIEnv *_env, jobject _this, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) {
875 glPrimitiveBoundingBoxEXT(
876 (GLfloat)minX,
877 (GLfloat)minY,
878 (GLfloat)minZ,
879 (GLfloat)minW,
880 (GLfloat)maxX,
881 (GLfloat)maxY,
882 (GLfloat)maxZ,
883 (GLfloat)maxW
884 );
885 }
886
887 /* void glPatchParameteriEXT ( GLenum pname, GLint value ) */
888 static void
android_glPatchParameteriEXT__II(JNIEnv * _env,jobject _this,jint pname,jint value)889 android_glPatchParameteriEXT__II
890 (JNIEnv *_env, jobject _this, jint pname, jint value) {
891 glPatchParameteriEXT(
892 (GLenum)pname,
893 (GLint)value
894 );
895 }
896
897 /* void glTexParameterIivEXT ( GLenum target, GLenum pname, const GLint *params ) */
898 static void
android_glTexParameterIivEXT__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)899 android_glTexParameterIivEXT__II_3II
900 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
901 jint _exception = 0;
902 const char * _exceptionType = NULL;
903 const char * _exceptionMessage = NULL;
904 GLint *params_base = (GLint *) 0;
905 jint _remaining;
906 GLint *params = (GLint *) 0;
907
908 if (!params_ref) {
909 _exception = 1;
910 _exceptionType = "java/lang/IllegalArgumentException";
911 _exceptionMessage = "params == null";
912 goto exit;
913 }
914 if (offset < 0) {
915 _exception = 1;
916 _exceptionType = "java/lang/IllegalArgumentException";
917 _exceptionMessage = "offset < 0";
918 goto exit;
919 }
920 _remaining = _env->GetArrayLength(params_ref) - offset;
921 params_base = (GLint *)
922 _env->GetIntArrayElements(params_ref, (jboolean *)0);
923 params = params_base + offset;
924
925 glTexParameterIivEXT(
926 (GLenum)target,
927 (GLenum)pname,
928 (GLint *)params
929 );
930
931 exit:
932 if (params_base) {
933 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
934 JNI_ABORT);
935 }
936 if (_exception) {
937 jniThrowException(_env, _exceptionType, _exceptionMessage);
938 }
939 }
940
941 /* void glTexParameterIivEXT ( GLenum target, GLenum pname, const GLint *params ) */
942 static void
android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)943 android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2
944 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
945 jint _exception = 0;
946 const char * _exceptionType = NULL;
947 const char * _exceptionMessage = NULL;
948 jintArray _array = (jintArray) 0;
949 jint _bufferOffset = (jint) 0;
950 jint _remaining;
951 GLint *params = (GLint *) 0;
952
953 if (!params_buf) {
954 _exception = 1;
955 _exceptionType = "java/lang/IllegalArgumentException";
956 _exceptionMessage = "params == null";
957 goto exit;
958 }
959 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
960 if (params == NULL) {
961 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
962 params = (GLint *) (_paramsBase + _bufferOffset);
963 }
964 glTexParameterIivEXT(
965 (GLenum)target,
966 (GLenum)pname,
967 (GLint *)params
968 );
969
970 exit:
971 if (_array) {
972 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
973 }
974 if (_exception) {
975 jniThrowException(_env, _exceptionType, _exceptionMessage);
976 }
977 }
978
979 /* void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params ) */
980 static void
android_glTexParameterIuivEXT__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)981 android_glTexParameterIuivEXT__II_3II
982 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
983 jint _exception = 0;
984 const char * _exceptionType = NULL;
985 const char * _exceptionMessage = NULL;
986 GLuint *params_base = (GLuint *) 0;
987 jint _remaining;
988 GLuint *params = (GLuint *) 0;
989
990 if (!params_ref) {
991 _exception = 1;
992 _exceptionType = "java/lang/IllegalArgumentException";
993 _exceptionMessage = "params == null";
994 goto exit;
995 }
996 if (offset < 0) {
997 _exception = 1;
998 _exceptionType = "java/lang/IllegalArgumentException";
999 _exceptionMessage = "offset < 0";
1000 goto exit;
1001 }
1002 _remaining = _env->GetArrayLength(params_ref) - offset;
1003 params_base = (GLuint *)
1004 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1005 params = params_base + offset;
1006
1007 glTexParameterIuivEXT(
1008 (GLenum)target,
1009 (GLenum)pname,
1010 (GLuint *)params
1011 );
1012
1013 exit:
1014 if (params_base) {
1015 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1016 JNI_ABORT);
1017 }
1018 if (_exception) {
1019 jniThrowException(_env, _exceptionType, _exceptionMessage);
1020 }
1021 }
1022
1023 /* void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params ) */
1024 static void
android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1025 android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2
1026 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1027 jint _exception = 0;
1028 const char * _exceptionType = NULL;
1029 const char * _exceptionMessage = NULL;
1030 jintArray _array = (jintArray) 0;
1031 jint _bufferOffset = (jint) 0;
1032 jint _remaining;
1033 GLuint *params = (GLuint *) 0;
1034
1035 if (!params_buf) {
1036 _exception = 1;
1037 _exceptionType = "java/lang/IllegalArgumentException";
1038 _exceptionMessage = "params == null";
1039 goto exit;
1040 }
1041 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1042 if (params == NULL) {
1043 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1044 params = (GLuint *) (_paramsBase + _bufferOffset);
1045 }
1046 glTexParameterIuivEXT(
1047 (GLenum)target,
1048 (GLenum)pname,
1049 (GLuint *)params
1050 );
1051
1052 exit:
1053 if (_array) {
1054 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1055 }
1056 if (_exception) {
1057 jniThrowException(_env, _exceptionType, _exceptionMessage);
1058 }
1059 }
1060
1061 /* void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params ) */
1062 static void
android_glGetTexParameterIivEXT__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1063 android_glGetTexParameterIivEXT__II_3II
1064 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1065 jint _exception = 0;
1066 const char * _exceptionType = NULL;
1067 const char * _exceptionMessage = NULL;
1068 GLint *params_base = (GLint *) 0;
1069 jint _remaining;
1070 GLint *params = (GLint *) 0;
1071
1072 if (!params_ref) {
1073 _exception = 1;
1074 _exceptionType = "java/lang/IllegalArgumentException";
1075 _exceptionMessage = "params == null";
1076 goto exit;
1077 }
1078 if (offset < 0) {
1079 _exception = 1;
1080 _exceptionType = "java/lang/IllegalArgumentException";
1081 _exceptionMessage = "offset < 0";
1082 goto exit;
1083 }
1084 _remaining = _env->GetArrayLength(params_ref) - offset;
1085 params_base = (GLint *)
1086 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1087 params = params_base + offset;
1088
1089 glGetTexParameterIivEXT(
1090 (GLenum)target,
1091 (GLenum)pname,
1092 (GLint *)params
1093 );
1094
1095 exit:
1096 if (params_base) {
1097 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1098 _exception ? JNI_ABORT: 0);
1099 }
1100 if (_exception) {
1101 jniThrowException(_env, _exceptionType, _exceptionMessage);
1102 }
1103 }
1104
1105 /* void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params ) */
1106 static void
android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1107 android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2
1108 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1109 jint _exception = 0;
1110 const char * _exceptionType = NULL;
1111 const char * _exceptionMessage = NULL;
1112 jintArray _array = (jintArray) 0;
1113 jint _bufferOffset = (jint) 0;
1114 jint _remaining;
1115 GLint *params = (GLint *) 0;
1116
1117 if (!params_buf) {
1118 _exception = 1;
1119 _exceptionType = "java/lang/IllegalArgumentException";
1120 _exceptionMessage = "params == null";
1121 goto exit;
1122 }
1123 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1124 if (params == NULL) {
1125 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1126 params = (GLint *) (_paramsBase + _bufferOffset);
1127 }
1128 glGetTexParameterIivEXT(
1129 (GLenum)target,
1130 (GLenum)pname,
1131 (GLint *)params
1132 );
1133
1134 exit:
1135 if (_array) {
1136 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1137 }
1138 if (_exception) {
1139 jniThrowException(_env, _exceptionType, _exceptionMessage);
1140 }
1141 }
1142
1143 /* void glGetTexParameterIuivEXT ( GLenum target, GLenum pname, GLuint *params ) */
1144 static void
android_glGetTexParameterIuivEXT__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1145 android_glGetTexParameterIuivEXT__II_3II
1146 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1147 jint _exception = 0;
1148 const char * _exceptionType = NULL;
1149 const char * _exceptionMessage = NULL;
1150 GLuint *params_base = (GLuint *) 0;
1151 jint _remaining;
1152 GLuint *params = (GLuint *) 0;
1153
1154 if (!params_ref) {
1155 _exception = 1;
1156 _exceptionType = "java/lang/IllegalArgumentException";
1157 _exceptionMessage = "params == null";
1158 goto exit;
1159 }
1160 if (offset < 0) {
1161 _exception = 1;
1162 _exceptionType = "java/lang/IllegalArgumentException";
1163 _exceptionMessage = "offset < 0";
1164 goto exit;
1165 }
1166 _remaining = _env->GetArrayLength(params_ref) - offset;
1167 params_base = (GLuint *)
1168 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1169 params = params_base + offset;
1170
1171 glGetTexParameterIuivEXT(
1172 (GLenum)target,
1173 (GLenum)pname,
1174 (GLuint *)params
1175 );
1176
1177 exit:
1178 if (params_base) {
1179 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1180 _exception ? JNI_ABORT: 0);
1181 }
1182 if (_exception) {
1183 jniThrowException(_env, _exceptionType, _exceptionMessage);
1184 }
1185 }
1186
1187 /* void glGetTexParameterIuivEXT ( GLenum target, GLenum pname, GLuint *params ) */
1188 static void
android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1189 android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2
1190 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1191 jint _exception = 0;
1192 const char * _exceptionType = NULL;
1193 const char * _exceptionMessage = NULL;
1194 jintArray _array = (jintArray) 0;
1195 jint _bufferOffset = (jint) 0;
1196 jint _remaining;
1197 GLuint *params = (GLuint *) 0;
1198
1199 if (!params_buf) {
1200 _exception = 1;
1201 _exceptionType = "java/lang/IllegalArgumentException";
1202 _exceptionMessage = "params == null";
1203 goto exit;
1204 }
1205 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1206 if (params == NULL) {
1207 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1208 params = (GLuint *) (_paramsBase + _bufferOffset);
1209 }
1210 glGetTexParameterIuivEXT(
1211 (GLenum)target,
1212 (GLenum)pname,
1213 (GLuint *)params
1214 );
1215
1216 exit:
1217 if (_array) {
1218 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1219 }
1220 if (_exception) {
1221 jniThrowException(_env, _exceptionType, _exceptionMessage);
1222 }
1223 }
1224
1225 /* void glSamplerParameterIivEXT ( GLuint sampler, GLenum pname, const GLint *param ) */
1226 static void
android_glSamplerParameterIivEXT__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray param_ref,jint offset)1227 android_glSamplerParameterIivEXT__II_3II
1228 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1229 jint _exception = 0;
1230 const char * _exceptionType = NULL;
1231 const char * _exceptionMessage = NULL;
1232 GLint *param_base = (GLint *) 0;
1233 jint _remaining;
1234 GLint *param = (GLint *) 0;
1235
1236 if (!param_ref) {
1237 _exception = 1;
1238 _exceptionType = "java/lang/IllegalArgumentException";
1239 _exceptionMessage = "param == null";
1240 goto exit;
1241 }
1242 if (offset < 0) {
1243 _exception = 1;
1244 _exceptionType = "java/lang/IllegalArgumentException";
1245 _exceptionMessage = "offset < 0";
1246 goto exit;
1247 }
1248 _remaining = _env->GetArrayLength(param_ref) - offset;
1249 param_base = (GLint *)
1250 _env->GetIntArrayElements(param_ref, (jboolean *)0);
1251 param = param_base + offset;
1252
1253 glSamplerParameterIivEXT(
1254 (GLuint)sampler,
1255 (GLenum)pname,
1256 (GLint *)param
1257 );
1258
1259 exit:
1260 if (param_base) {
1261 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
1262 JNI_ABORT);
1263 }
1264 if (_exception) {
1265 jniThrowException(_env, _exceptionType, _exceptionMessage);
1266 }
1267 }
1268
1269 /* void glSamplerParameterIivEXT ( GLuint sampler, GLenum pname, const GLint *param ) */
1270 static void
android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject param_buf)1271 android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
1272 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
1273 jint _exception = 0;
1274 const char * _exceptionType = NULL;
1275 const char * _exceptionMessage = NULL;
1276 jintArray _array = (jintArray) 0;
1277 jint _bufferOffset = (jint) 0;
1278 jint _remaining;
1279 GLint *param = (GLint *) 0;
1280
1281 if (!param_buf) {
1282 _exception = 1;
1283 _exceptionType = "java/lang/IllegalArgumentException";
1284 _exceptionMessage = "param == null";
1285 goto exit;
1286 }
1287 param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1288 if (param == NULL) {
1289 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1290 param = (GLint *) (_paramBase + _bufferOffset);
1291 }
1292 glSamplerParameterIivEXT(
1293 (GLuint)sampler,
1294 (GLenum)pname,
1295 (GLint *)param
1296 );
1297
1298 exit:
1299 if (_array) {
1300 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
1301 }
1302 if (_exception) {
1303 jniThrowException(_env, _exceptionType, _exceptionMessage);
1304 }
1305 }
1306
1307 /* void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param ) */
1308 static void
android_glSamplerParameterIuivEXT__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray param_ref,jint offset)1309 android_glSamplerParameterIuivEXT__II_3II
1310 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1311 jint _exception = 0;
1312 const char * _exceptionType = NULL;
1313 const char * _exceptionMessage = NULL;
1314 GLuint *param_base = (GLuint *) 0;
1315 jint _remaining;
1316 GLuint *param = (GLuint *) 0;
1317
1318 if (!param_ref) {
1319 _exception = 1;
1320 _exceptionType = "java/lang/IllegalArgumentException";
1321 _exceptionMessage = "param == null";
1322 goto exit;
1323 }
1324 if (offset < 0) {
1325 _exception = 1;
1326 _exceptionType = "java/lang/IllegalArgumentException";
1327 _exceptionMessage = "offset < 0";
1328 goto exit;
1329 }
1330 _remaining = _env->GetArrayLength(param_ref) - offset;
1331 param_base = (GLuint *)
1332 _env->GetIntArrayElements(param_ref, (jboolean *)0);
1333 param = param_base + offset;
1334
1335 glSamplerParameterIuivEXT(
1336 (GLuint)sampler,
1337 (GLenum)pname,
1338 (GLuint *)param
1339 );
1340
1341 exit:
1342 if (param_base) {
1343 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
1344 JNI_ABORT);
1345 }
1346 if (_exception) {
1347 jniThrowException(_env, _exceptionType, _exceptionMessage);
1348 }
1349 }
1350
1351 /* void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param ) */
1352 static void
android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject param_buf)1353 android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
1354 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
1355 jint _exception = 0;
1356 const char * _exceptionType = NULL;
1357 const char * _exceptionMessage = NULL;
1358 jintArray _array = (jintArray) 0;
1359 jint _bufferOffset = (jint) 0;
1360 jint _remaining;
1361 GLuint *param = (GLuint *) 0;
1362
1363 if (!param_buf) {
1364 _exception = 1;
1365 _exceptionType = "java/lang/IllegalArgumentException";
1366 _exceptionMessage = "param == null";
1367 goto exit;
1368 }
1369 param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1370 if (param == NULL) {
1371 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1372 param = (GLuint *) (_paramBase + _bufferOffset);
1373 }
1374 glSamplerParameterIuivEXT(
1375 (GLuint)sampler,
1376 (GLenum)pname,
1377 (GLuint *)param
1378 );
1379
1380 exit:
1381 if (_array) {
1382 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
1383 }
1384 if (_exception) {
1385 jniThrowException(_env, _exceptionType, _exceptionMessage);
1386 }
1387 }
1388
1389 /* void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params ) */
1390 static void
android_glGetSamplerParameterIivEXT__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray params_ref,jint offset)1391 android_glGetSamplerParameterIivEXT__II_3II
1392 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1393 jint _exception = 0;
1394 const char * _exceptionType = NULL;
1395 const char * _exceptionMessage = NULL;
1396 GLint *params_base = (GLint *) 0;
1397 jint _remaining;
1398 GLint *params = (GLint *) 0;
1399
1400 if (!params_ref) {
1401 _exception = 1;
1402 _exceptionType = "java/lang/IllegalArgumentException";
1403 _exceptionMessage = "params == null";
1404 goto exit;
1405 }
1406 if (offset < 0) {
1407 _exception = 1;
1408 _exceptionType = "java/lang/IllegalArgumentException";
1409 _exceptionMessage = "offset < 0";
1410 goto exit;
1411 }
1412 _remaining = _env->GetArrayLength(params_ref) - offset;
1413 params_base = (GLint *)
1414 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1415 params = params_base + offset;
1416
1417 glGetSamplerParameterIivEXT(
1418 (GLuint)sampler,
1419 (GLenum)pname,
1420 (GLint *)params
1421 );
1422
1423 exit:
1424 if (params_base) {
1425 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1426 _exception ? JNI_ABORT: 0);
1427 }
1428 if (_exception) {
1429 jniThrowException(_env, _exceptionType, _exceptionMessage);
1430 }
1431 }
1432
1433 /* void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params ) */
1434 static void
android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject params_buf)1435 android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
1436 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
1437 jint _exception = 0;
1438 const char * _exceptionType = NULL;
1439 const char * _exceptionMessage = NULL;
1440 jintArray _array = (jintArray) 0;
1441 jint _bufferOffset = (jint) 0;
1442 jint _remaining;
1443 GLint *params = (GLint *) 0;
1444
1445 if (!params_buf) {
1446 _exception = 1;
1447 _exceptionType = "java/lang/IllegalArgumentException";
1448 _exceptionMessage = "params == null";
1449 goto exit;
1450 }
1451 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1452 if (params == NULL) {
1453 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1454 params = (GLint *) (_paramsBase + _bufferOffset);
1455 }
1456 glGetSamplerParameterIivEXT(
1457 (GLuint)sampler,
1458 (GLenum)pname,
1459 (GLint *)params
1460 );
1461
1462 exit:
1463 if (_array) {
1464 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1465 }
1466 if (_exception) {
1467 jniThrowException(_env, _exceptionType, _exceptionMessage);
1468 }
1469 }
1470
1471 /* void glGetSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, GLuint *params ) */
1472 static void
android_glGetSamplerParameterIuivEXT__II_3II(JNIEnv * _env,jobject _this,jint sampler,jint pname,jintArray params_ref,jint offset)1473 android_glGetSamplerParameterIuivEXT__II_3II
1474 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1475 jint _exception = 0;
1476 const char * _exceptionType = NULL;
1477 const char * _exceptionMessage = NULL;
1478 GLuint *params_base = (GLuint *) 0;
1479 jint _remaining;
1480 GLuint *params = (GLuint *) 0;
1481
1482 if (!params_ref) {
1483 _exception = 1;
1484 _exceptionType = "java/lang/IllegalArgumentException";
1485 _exceptionMessage = "params == null";
1486 goto exit;
1487 }
1488 if (offset < 0) {
1489 _exception = 1;
1490 _exceptionType = "java/lang/IllegalArgumentException";
1491 _exceptionMessage = "offset < 0";
1492 goto exit;
1493 }
1494 _remaining = _env->GetArrayLength(params_ref) - offset;
1495 params_base = (GLuint *)
1496 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1497 params = params_base + offset;
1498
1499 glGetSamplerParameterIuivEXT(
1500 (GLuint)sampler,
1501 (GLenum)pname,
1502 (GLuint *)params
1503 );
1504
1505 exit:
1506 if (params_base) {
1507 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1508 _exception ? JNI_ABORT: 0);
1509 }
1510 if (_exception) {
1511 jniThrowException(_env, _exceptionType, _exceptionMessage);
1512 }
1513 }
1514
1515 /* void glGetSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, GLuint *params ) */
1516 static void
android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint sampler,jint pname,jobject params_buf)1517 android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
1518 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
1519 jint _exception = 0;
1520 const char * _exceptionType = NULL;
1521 const char * _exceptionMessage = NULL;
1522 jintArray _array = (jintArray) 0;
1523 jint _bufferOffset = (jint) 0;
1524 jint _remaining;
1525 GLuint *params = (GLuint *) 0;
1526
1527 if (!params_buf) {
1528 _exception = 1;
1529 _exceptionType = "java/lang/IllegalArgumentException";
1530 _exceptionMessage = "params == null";
1531 goto exit;
1532 }
1533 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1534 if (params == NULL) {
1535 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1536 params = (GLuint *) (_paramsBase + _bufferOffset);
1537 }
1538 glGetSamplerParameterIuivEXT(
1539 (GLuint)sampler,
1540 (GLenum)pname,
1541 (GLuint *)params
1542 );
1543
1544 exit:
1545 if (_array) {
1546 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1547 }
1548 if (_exception) {
1549 jniThrowException(_env, _exceptionType, _exceptionMessage);
1550 }
1551 }
1552
1553 /* void glTexBufferEXT ( GLenum target, GLenum internalformat, GLuint buffer ) */
1554 static void
android_glTexBufferEXT__III(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint buffer)1555 android_glTexBufferEXT__III
1556 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer) {
1557 glTexBufferEXT(
1558 (GLenum)target,
1559 (GLenum)internalformat,
1560 (GLuint)buffer
1561 );
1562 }
1563
1564 /* void glTexBufferRangeEXT ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
1565 static void
android_glTexBufferRangeEXT__IIIII(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint buffer,jint offset,jint size)1566 android_glTexBufferRangeEXT__IIIII
1567 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer, jint offset, jint size) {
1568 glTexBufferRangeEXT(
1569 (GLenum)target,
1570 (GLenum)internalformat,
1571 (GLuint)buffer,
1572 (GLintptr)offset,
1573 (GLsizeiptr)size
1574 );
1575 }
1576
1577 static const char *classPathName = "android/opengl/GLES31Ext";
1578
1579 static const JNINativeMethod methods[] = {
1580 {"_nativeClassInit", "()V", (void*)nativeClassInit },
1581 {"glBlendBarrierKHR", "()V", (void *) android_glBlendBarrierKHR__ },
1582 {"glDebugMessageControlKHR", "(IIII[IIZ)V", (void *) android_glDebugMessageControlKHR__IIII_3IIZ },
1583 {"glDebugMessageControlKHR", "(IIIILjava/nio/IntBuffer;Z)V", (void *) android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z },
1584 {"glDebugMessageInsertKHR", "(IIIILjava/lang/String;)V", (void *) android_glDebugMessageInsertKHR__IIIILjava_lang_String_2 },
1585 {"glDebugMessageCallbackKHR", "(Landroid/opengl/GLES31Ext$DebugProcKHR;)V", (void *) android_glDebugMessageCallbackKHR },
1586 {"glGetDebugMessageLogKHR", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI },
1587 {"glGetDebugMessageLogKHR", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)I", (void *) android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 },
1588 {"glGetDebugMessageLogKHR", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II },
1589 {"glGetDebugMessageLogKHR", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)[Ljava/lang/String;", (void *) android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
1590 {"glPushDebugGroupKHR", "(IIILjava/lang/String;)V", (void *) android_glPushDebugGroupKHR__IIILjava_lang_String_2 },
1591 {"glPopDebugGroupKHR", "()V", (void *) android_glPopDebugGroupKHR__ },
1592 {"glObjectLabelKHR", "(IIILjava/lang/String;)V", (void *) android_glObjectLabelKHR__IIILjava_lang_String_2 },
1593 {"glGetObjectLabelKHR", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabelKHR },
1594 {"glObjectPtrLabelKHR", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabelKHR },
1595 {"glGetObjectPtrLabelKHR", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabelKHR },
1596 {"glGetDebugMessageCallbackKHR", "()Landroid/opengl/GLES31Ext$DebugProcKHR;", (void *) android_glGetDebugMessageCallbackKHR },
1597 {"glMinSampleShadingOES", "(F)V", (void *) android_glMinSampleShadingOES__F },
1598 {"glTexStorage3DMultisampleOES", "(IIIIIIZ)V", (void *) android_glTexStorage3DMultisampleOES__IIIIIIZ },
1599 {"glCopyImageSubDataEXT", "(IIIIIIIIIIIIIII)V", (void *) android_glCopyImageSubDataEXT__IIIIIIIIIIIIIII },
1600 {"glEnableiEXT", "(II)V", (void *) android_glEnableiEXT__II },
1601 {"glDisableiEXT", "(II)V", (void *) android_glDisableiEXT__II },
1602 {"glBlendEquationiEXT", "(II)V", (void *) android_glBlendEquationiEXT__II },
1603 {"glBlendEquationSeparateiEXT", "(III)V", (void *) android_glBlendEquationSeparateiEXT__III },
1604 {"glBlendFunciEXT", "(III)V", (void *) android_glBlendFunciEXT__III },
1605 {"glBlendFuncSeparateiEXT", "(IIIII)V", (void *) android_glBlendFuncSeparateiEXT__IIIII },
1606 {"glColorMaskiEXT", "(IZZZZ)V", (void *) android_glColorMaskiEXT__IZZZZ },
1607 {"glIsEnablediEXT", "(II)Z", (void *) android_glIsEnablediEXT__II },
1608 {"glFramebufferTextureEXT", "(IIII)V", (void *) android_glFramebufferTextureEXT__IIII },
1609 {"glPrimitiveBoundingBoxEXT", "(FFFFFFFF)V", (void *) android_glPrimitiveBoundingBoxEXT__FFFFFFFF },
1610 {"glPatchParameteriEXT", "(II)V", (void *) android_glPatchParameteriEXT__II },
1611 {"glTexParameterIivEXT", "(II[II)V", (void *) android_glTexParameterIivEXT__II_3II },
1612 {"glTexParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2 },
1613 {"glTexParameterIuivEXT", "(II[II)V", (void *) android_glTexParameterIuivEXT__II_3II },
1614 {"glTexParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1615 {"glGetTexParameterIivEXT", "(II[II)V", (void *) android_glGetTexParameterIivEXT__II_3II },
1616 {"glGetTexParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2 },
1617 {"glGetTexParameterIuivEXT", "(II[II)V", (void *) android_glGetTexParameterIuivEXT__II_3II },
1618 {"glGetTexParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1619 {"glSamplerParameterIivEXT", "(II[II)V", (void *) android_glSamplerParameterIivEXT__II_3II },
1620 {"glSamplerParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2 },
1621 {"glSamplerParameterIuivEXT", "(II[II)V", (void *) android_glSamplerParameterIuivEXT__II_3II },
1622 {"glSamplerParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1623 {"glGetSamplerParameterIivEXT", "(II[II)V", (void *) android_glGetSamplerParameterIivEXT__II_3II },
1624 {"glGetSamplerParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2 },
1625 {"glGetSamplerParameterIuivEXT", "(II[II)V", (void *) android_glGetSamplerParameterIuivEXT__II_3II },
1626 {"glGetSamplerParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1627 {"glTexBufferEXT", "(III)V", (void *) android_glTexBufferEXT__III },
1628 {"glTexBufferRangeEXT", "(IIIII)V", (void *) android_glTexBufferRangeEXT__IIIII },
1629 };
1630
register_android_opengl_jni_GLES31Ext(JNIEnv * _env)1631 int register_android_opengl_jni_GLES31Ext(JNIEnv *_env)
1632 {
1633 int err;
1634 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
1635 return err;
1636 }
1637