blob: 5be7be04f58106c741bd6f8b65108088473e80ec [file] [log] [blame]
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001/*
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
Andreas Gampebfe63332014-11-12 14:12:45 -080019#pragma GCC diagnostic ignored "-Wunused-variable"
20#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
21#pragma GCC diagnostic ignored "-Wunused-function"
22
Jesse Hall7ab63ac2014-05-19 15:13:41 -070023#include <GLES3/gl31.h>
24#include <GLES2/gl2ext.h>
25
Jesse Hall9626f822014-05-19 20:57:49 -070026#include <jni.h>
27#include <JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070028#include <android_runtime/AndroidRuntime.h>
29#include <utils/misc.h>
30#include <assert.h>
31
32static int initialized = 0;
33
34static jclass nioAccessClass;
35static jclass bufferClass;
36static jmethodID getBasePointerID;
37static jmethodID getBaseArrayID;
38static jmethodID getBaseArrayOffsetID;
39static jfieldID positionID;
40static jfieldID limitID;
41static jfieldID elementSizeShiftID;
42
43
44/* special calls implemented in Android's GLES wrapper used to more
45 * efficiently bound-check passed arrays */
46extern "C" {
47#ifdef GL_VERSION_ES_CM_1_1
48GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
49 const GLvoid *ptr, GLsizei count);
50GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
51 const GLvoid *pointer, GLsizei count);
52GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
53 GLsizei stride, const GLvoid *pointer, GLsizei count);
54GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
55 GLsizei stride, const GLvoid *pointer, GLsizei count);
56GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
57 GLsizei stride, const GLvoid *pointer, GLsizei count);
58GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
59 GLsizei stride, const GLvoid *pointer, GLsizei count);
60GL_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
64static 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
70static 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
79static void
80nativeClassInit(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
101static void *
102getPointer(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
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700128class ByteArrayGetter {
129public:
130 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
131 return _env->GetByteArrayElements(array, is_copy);
132 }
133};
134class BooleanArrayGetter {
135public:
136 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
137 return _env->GetBooleanArrayElements(array, is_copy);
138 }
139};
140class CharArrayGetter {
141public:
142 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
143 return _env->GetCharArrayElements(array, is_copy);
144 }
145};
146class ShortArrayGetter {
147public:
148 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
149 return _env->GetShortArrayElements(array, is_copy);
150 }
151};
152class IntArrayGetter {
153public:
154 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
155 return _env->GetIntArrayElements(array, is_copy);
156 }
157};
158class LongArrayGetter {
159public:
160 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
161 return _env->GetLongArrayElements(array, is_copy);
162 }
163};
164class FloatArrayGetter {
165public:
166 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
167 return _env->GetFloatArrayElements(array, is_copy);
168 }
169};
170class DoubleArrayGetter {
171public:
172 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
173 return _env->GetDoubleArrayElements(array, is_copy);
174 }
175};
176
177template<typename JTYPEARRAY, typename ARRAYGETTER>
178static void*
179getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
180 return ARRAYGETTER::Get(_env, array, is_copy);
181}
182
183class ByteArrayReleaser {
184public:
185 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
186 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
187 }
188};
189class BooleanArrayReleaser {
190public:
191 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
192 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
193 }
194};
195class CharArrayReleaser {
196public:
197 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
198 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
199 }
200};
201class ShortArrayReleaser {
202public:
203 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
204 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
205 }
206};
207class IntArrayReleaser {
208public:
209 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
210 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
211 }
212};
213class LongArrayReleaser {
214public:
215 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
216 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
217 }
218};
219class FloatArrayReleaser {
220public:
221 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
222 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
223 }
224};
225class DoubleArrayReleaser {
226public:
227 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
228 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
229 }
230};
231
232template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
233static void
234releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
235 ARRAYRELEASER::Release(_env, array, data, commit);
236}
237
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700238static void
239releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
240{
241 _env->ReleasePrimitiveArrayCritical(array, data,
242 commit ? 0 : JNI_ABORT);
243}
244
245static void *
246getDirectBufferPointer(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 */
272static int getNeededCount(GLint pname) {
273 int needed = 1;
274#ifdef GL_ES_VERSION_2_0
275 // GLES 2.x pnames
276 switch (pname) {
277 case GL_ALIASED_LINE_WIDTH_RANGE:
278 case GL_ALIASED_POINT_SIZE_RANGE:
279 needed = 2;
280 break;
281
282 case GL_BLEND_COLOR:
283 case GL_COLOR_CLEAR_VALUE:
284 case GL_COLOR_WRITEMASK:
285 case GL_SCISSOR_BOX:
286 case GL_VIEWPORT:
287 needed = 4;
288 break;
289
290 case GL_COMPRESSED_TEXTURE_FORMATS:
291 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
292 break;
293
294 case GL_SHADER_BINARY_FORMATS:
295 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
296 break;
297 }
298#endif
299
300#ifdef GL_VERSION_ES_CM_1_1
301 // GLES 1.x pnames
302 switch (pname) {
303 case GL_ALIASED_LINE_WIDTH_RANGE:
304 case GL_ALIASED_POINT_SIZE_RANGE:
305 case GL_DEPTH_RANGE:
306 case GL_SMOOTH_LINE_WIDTH_RANGE:
307 case GL_SMOOTH_POINT_SIZE_RANGE:
308 needed = 2;
309 break;
310
311 case GL_CURRENT_NORMAL:
312 case GL_POINT_DISTANCE_ATTENUATION:
313 needed = 3;
314 break;
315
316 case GL_COLOR_CLEAR_VALUE:
317 case GL_COLOR_WRITEMASK:
318 case GL_CURRENT_COLOR:
319 case GL_CURRENT_TEXTURE_COORDS:
320 case GL_FOG_COLOR:
321 case GL_LIGHT_MODEL_AMBIENT:
322 case GL_SCISSOR_BOX:
323 case GL_VIEWPORT:
324 needed = 4;
325 break;
326
327 case GL_MODELVIEW_MATRIX:
328 case GL_PROJECTION_MATRIX:
329 case GL_TEXTURE_MATRIX:
330 needed = 16;
331 break;
332
333 case GL_COMPRESSED_TEXTURE_FORMATS:
334 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
335 break;
336 }
337#endif
338 return needed;
339}
340
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700341template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
342 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700343static void
344get
345 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
346 jint _exception = 0;
347 const char * _exceptionType;
348 const char * _exceptionMessage;
349 CTYPE *params_base = (CTYPE *) 0;
350 jint _remaining;
351 CTYPE *params = (CTYPE *) 0;
352 int _needed = 0;
353
354 if (!params_ref) {
355 _exception = 1;
356 _exceptionType = "java/lang/IllegalArgumentException";
357 _exceptionMessage = "params == null";
358 goto exit;
359 }
360 if (offset < 0) {
361 _exception = 1;
362 _exceptionType = "java/lang/IllegalArgumentException";
363 _exceptionMessage = "offset < 0";
364 goto exit;
365 }
366 _remaining = _env->GetArrayLength(params_ref) - offset;
367 _needed = getNeededCount(pname);
368 // if we didn't find this pname, we just assume the user passed
369 // an array of the right size -- this might happen with extensions
370 // or if we forget an enum here.
371 if (_remaining < _needed) {
372 _exception = 1;
373 _exceptionType = "java/lang/IllegalArgumentException";
374 _exceptionMessage = "length - offset < needed";
375 goto exit;
376 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700377 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
378 _env, params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700379 params = params_base + offset;
380
381 GET(
382 (GLenum)pname,
383 (CTYPE *)params
384 );
385
386exit:
387 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700388 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
389 _env, params_ref, params_base, !_exception);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700390 }
391 if (_exception) {
392 jniThrowException(_env, _exceptionType, _exceptionMessage);
393 }
394}
395
396
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700397template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
398 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700399static void
400getarray
401 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
402 jint _exception = 0;
403 const char * _exceptionType;
404 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700405 JTYPEARRAY _array = (JTYPEARRAY) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700406 jint _bufferOffset = (jint) 0;
407 jint _remaining;
408 CTYPE *params = (CTYPE *) 0;
409 int _needed = 0;
410
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700411 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700412 _remaining /= sizeof(CTYPE); // convert from bytes to item count
413 _needed = getNeededCount(pname);
414 // if we didn't find this pname, we just assume the user passed
415 // an array of the right size -- this might happen with extensions
416 // or if we forget an enum here.
417 if (_needed>0 && _remaining < _needed) {
418 _exception = 1;
419 _exceptionType = "java/lang/IllegalArgumentException";
420 _exceptionMessage = "remaining() < needed";
421 goto exit;
422 }
423 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700424 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
425 _env, _array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700426 params = (CTYPE *) (_paramsBase + _bufferOffset);
427 }
428 GET(
429 (GLenum)pname,
430 (CTYPE *)params
431 );
432
433exit:
434 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700435 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
436 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700437 }
438 if (_exception) {
439 jniThrowException(_env, _exceptionType, _exceptionMessage);
440 }
441}
442
443// --------------------------------------------------------------------------
444/* void glBlendBarrierKHR ( void ) */
445static void
446android_glBlendBarrierKHR__
447 (JNIEnv *_env, jobject _this) {
448 glBlendBarrierKHR();
449}
450
451/* void glDebugMessageControlKHR ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
452static void
453android_glDebugMessageControlKHR__IIII_3IIZ
454 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jintArray ids_ref, jint offset, jboolean enabled) {
455 jint _exception = 0;
456 const char * _exceptionType = NULL;
457 const char * _exceptionMessage = NULL;
458 GLuint *ids_base = (GLuint *) 0;
459 jint _remaining;
460 GLuint *ids = (GLuint *) 0;
461
462 if (!ids_ref) {
463 _exception = 1;
464 _exceptionType = "java/lang/IllegalArgumentException";
465 _exceptionMessage = "ids == null";
466 goto exit;
467 }
468 if (offset < 0) {
469 _exception = 1;
470 _exceptionType = "java/lang/IllegalArgumentException";
471 _exceptionMessage = "offset < 0";
472 goto exit;
473 }
474 _remaining = _env->GetArrayLength(ids_ref) - offset;
475 ids_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700476 _env->GetIntArrayElements(ids_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700477 ids = ids_base + offset;
478
479 glDebugMessageControlKHR(
480 (GLenum)source,
481 (GLenum)type,
482 (GLenum)severity,
483 (GLsizei)count,
484 (GLuint *)ids,
485 (GLboolean)enabled
486 );
487
488exit:
489 if (ids_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700490 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700491 JNI_ABORT);
492 }
493 if (_exception) {
494 jniThrowException(_env, _exceptionType, _exceptionMessage);
495 }
496}
497
498/* void glDebugMessageControlKHR ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
499static void
500android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z
501 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700502 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700503 jint _bufferOffset = (jint) 0;
504 jint _remaining;
505 GLuint *ids = (GLuint *) 0;
506
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700507 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700508 if (ids == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700509 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700510 ids = (GLuint *) (_idsBase + _bufferOffset);
511 }
512 glDebugMessageControlKHR(
513 (GLenum)source,
514 (GLenum)type,
515 (GLenum)severity,
516 (GLsizei)count,
517 (GLuint *)ids,
518 (GLboolean)enabled
519 );
520 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700521 _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700522 }
523}
524
525/* void glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
526static void
527android_glDebugMessageInsertKHR__IIIILjava_lang_String_2
528 (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jstring buf) {
529 jint _exception = 0;
530 const char * _exceptionType = NULL;
531 const char * _exceptionMessage = NULL;
532 const char* _nativebuf = 0;
533 jint _length = 0;
534
535 if (!buf) {
536 _exception = 1;
537 _exceptionType = "java/lang/IllegalArgumentException";
538 _exceptionMessage = "buf == null";
539 goto exit;
540 }
541 _nativebuf = _env->GetStringUTFChars(buf, 0);
542 _length = _env->GetStringUTFLength(buf);
543
544 glDebugMessageInsertKHR(
545 (GLenum)source,
546 (GLenum)type,
547 (GLuint)id,
548 (GLenum)severity,
549 (GLsizei)_length,
550 (GLchar *)_nativebuf
551 );
552
553exit:
554 if (_nativebuf) {
555 _env->ReleaseStringUTFChars(buf, _nativebuf);
556 }
557
558 if (_exception) {
559 jniThrowException(_env, _exceptionType, _exceptionMessage);
560 }
561}
562
563/* void glDebugMessageCallbackKHR ( GLDEBUGPROCKHR callback, const void *userParam ) */
564static void
565android_glDebugMessageCallbackKHR(JNIEnv *_env, jobject _this, jobject callback) {
566 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
567}
568/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
569static jint
570android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI
571 (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) {
572 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
573 return 0;
574}
575
576/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
577static uint
578android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
579 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
580 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
581 return 0;
582}
583
584/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
585static jobjectArray
586android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II
587 (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) {
588 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
589 return 0;
590}
591
592/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
593static jobjectArray
594android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
595 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
596 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
597 return 0;
598}
599/* void glPushDebugGroupKHR ( GLenum source, GLuint id, GLsizei length, const GLchar *message ) */
600static void
601android_glPushDebugGroupKHR__IIILjava_lang_String_2
602 (JNIEnv *_env, jobject _this, jint source, jint id, jint length, jstring message) {
603 jint _exception = 0;
604 const char * _exceptionType = NULL;
605 const char * _exceptionMessage = NULL;
606 const char* _nativemessage = 0;
607
608 if (!message) {
609 _exception = 1;
610 _exceptionType = "java/lang/IllegalArgumentException";
611 _exceptionMessage = "message == null";
612 goto exit;
613 }
614 _nativemessage = _env->GetStringUTFChars(message, 0);
615
616 glPushDebugGroupKHR(
617 (GLenum)source,
618 (GLuint)id,
619 (GLsizei)length,
620 (GLchar *)_nativemessage
621 );
622
623exit:
624 if (_nativemessage) {
625 _env->ReleaseStringUTFChars(message, _nativemessage);
626 }
627
628 if (_exception) {
629 jniThrowException(_env, _exceptionType, _exceptionMessage);
630 }
631}
632
633/* void glPopDebugGroupKHR ( void ) */
634static void
635android_glPopDebugGroupKHR__
636 (JNIEnv *_env, jobject _this) {
637 glPopDebugGroupKHR();
638}
639
640/* void glObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */
641static void
642android_glObjectLabelKHR__IIILjava_lang_String_2
643 (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) {
644 jint _exception = 0;
645 const char * _exceptionType = NULL;
646 const char * _exceptionMessage = NULL;
647 const char* _nativelabel = 0;
648
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700649 if (label) {
650 _nativelabel = _env->GetStringUTFChars(label, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700651 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700652
653 glObjectLabelKHR(
654 (GLenum)identifier,
655 (GLuint)name,
656 (GLsizei)length,
657 (GLchar *)_nativelabel
658 );
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700659 if (_nativelabel) {
660 _env->ReleaseStringUTFChars(label, _nativelabel);
661 }
662
663 if (_exception) {
664 jniThrowException(_env, _exceptionType, _exceptionMessage);
665 }
666}
667
668/* void glGetObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
669static jstring
670android_glGetObjectLabelKHR(JNIEnv *_env, jobject _this, jint identifier, jint name) {
671 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
672 return NULL;
673}
674
675/* void glObjectPtrLabelKHR ( const void *ptr, GLsizei length, const GLchar *label ) */
676static void
677android_glObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
678 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
679}
680
681/* void glGetObjectPtrLabelKHR ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
682static jstring
683android_glGetObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr) {
684 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
685 return NULL;
686}
687
688/* void glGetPointervKHR ( GLenum pname, void **params ) */
689static jobject
690android_glGetDebugMessageCallbackKHR(JNIEnv *_env, jobject _this) {
691 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
692 return NULL;
693}
694
695/* void glMinSampleShadingOES ( GLfloat value ) */
696static void
697android_glMinSampleShadingOES__F
698 (JNIEnv *_env, jobject _this, jfloat value) {
699 glMinSampleShadingOES(
700 (GLfloat)value
701 );
702}
703
704/* void glTexStorage3DMultisampleOES ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations ) */
705static void
706android_glTexStorage3DMultisampleOES__IIIIIIZ
707 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) {
708 glTexStorage3DMultisampleOES(
709 (GLenum)target,
710 (GLsizei)samples,
711 (GLenum)internalformat,
712 (GLsizei)width,
713 (GLsizei)height,
714 (GLsizei)depth,
715 (GLboolean)fixedsamplelocations
716 );
717}
718
719/* 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 ) */
720static void
721android_glCopyImageSubDataEXT__IIIIIIIIIIIIIII
722 (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) {
723 glCopyImageSubDataEXT(
724 (GLuint)srcName,
725 (GLenum)srcTarget,
726 (GLint)srcLevel,
727 (GLint)srcX,
728 (GLint)srcY,
729 (GLint)srcZ,
730 (GLuint)dstName,
731 (GLenum)dstTarget,
732 (GLint)dstLevel,
733 (GLint)dstX,
734 (GLint)dstY,
735 (GLint)dstZ,
736 (GLsizei)srcWidth,
737 (GLsizei)srcHeight,
738 (GLsizei)srcDepth
739 );
740}
741
742/* void glEnableiEXT ( GLenum target, GLuint index ) */
743static void
744android_glEnableiEXT__II
745 (JNIEnv *_env, jobject _this, jint target, jint index) {
746 glEnableiEXT(
747 (GLenum)target,
748 (GLuint)index
749 );
750}
751
752/* void glDisableiEXT ( GLenum target, GLuint index ) */
753static void
754android_glDisableiEXT__II
755 (JNIEnv *_env, jobject _this, jint target, jint index) {
756 glDisableiEXT(
757 (GLenum)target,
758 (GLuint)index
759 );
760}
761
762/* void glBlendEquationiEXT ( GLuint buf, GLenum mode ) */
763static void
764android_glBlendEquationiEXT__II
765 (JNIEnv *_env, jobject _this, jint buf, jint mode) {
766 glBlendEquationiEXT(
767 (GLuint)buf,
768 (GLenum)mode
769 );
770}
771
772/* void glBlendEquationSeparateiEXT ( GLuint buf, GLenum modeRGB, GLenum modeAlpha ) */
773static void
774android_glBlendEquationSeparateiEXT__III
775 (JNIEnv *_env, jobject _this, jint buf, jint modeRGB, jint modeAlpha) {
776 glBlendEquationSeparateiEXT(
777 (GLuint)buf,
778 (GLenum)modeRGB,
779 (GLenum)modeAlpha
780 );
781}
782
783/* void glBlendFunciEXT ( GLuint buf, GLenum src, GLenum dst ) */
784static void
785android_glBlendFunciEXT__III
786 (JNIEnv *_env, jobject _this, jint buf, jint src, jint dst) {
787 glBlendFunciEXT(
788 (GLuint)buf,
789 (GLenum)src,
790 (GLenum)dst
791 );
792}
793
794/* void glBlendFuncSeparateiEXT ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
795static void
796android_glBlendFuncSeparateiEXT__IIIII
797 (JNIEnv *_env, jobject _this, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
798 glBlendFuncSeparateiEXT(
799 (GLuint)buf,
800 (GLenum)srcRGB,
801 (GLenum)dstRGB,
802 (GLenum)srcAlpha,
803 (GLenum)dstAlpha
804 );
805}
806
807/* void glColorMaskiEXT ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) */
808static void
809android_glColorMaskiEXT__IZZZZ
810 (JNIEnv *_env, jobject _this, jint index, jboolean r, jboolean g, jboolean b, jboolean a) {
811 glColorMaskiEXT(
812 (GLuint)index,
813 (GLboolean)r,
814 (GLboolean)g,
815 (GLboolean)b,
816 (GLboolean)a
817 );
818}
819
820/* GLboolean glIsEnablediEXT ( GLenum target, GLuint index ) */
821static jboolean
822android_glIsEnablediEXT__II
823 (JNIEnv *_env, jobject _this, jint target, jint index) {
824 GLboolean _returnValue;
825 _returnValue = glIsEnablediEXT(
826 (GLenum)target,
827 (GLuint)index
828 );
829 return (jboolean)_returnValue;
830}
831
832/* void glFramebufferTextureEXT ( GLenum target, GLenum attachment, GLuint texture, GLint level ) */
833static void
834android_glFramebufferTextureEXT__IIII
835 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level) {
836 glFramebufferTextureEXT(
837 (GLenum)target,
838 (GLenum)attachment,
839 (GLuint)texture,
840 (GLint)level
841 );
842}
843
844/* void glPrimitiveBoundingBoxEXT ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ) */
845static void
846android_glPrimitiveBoundingBoxEXT__FFFFFFFF
847 (JNIEnv *_env, jobject _this, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) {
848 glPrimitiveBoundingBoxEXT(
849 (GLfloat)minX,
850 (GLfloat)minY,
851 (GLfloat)minZ,
852 (GLfloat)minW,
853 (GLfloat)maxX,
854 (GLfloat)maxY,
855 (GLfloat)maxZ,
856 (GLfloat)maxW
857 );
858}
859
860/* void glPatchParameteriEXT ( GLenum pname, GLint value ) */
861static void
862android_glPatchParameteriEXT__II
863 (JNIEnv *_env, jobject _this, jint pname, jint value) {
864 glPatchParameteriEXT(
865 (GLenum)pname,
866 (GLint)value
867 );
868}
869
870/* void glTexParameterIivEXT ( GLenum target, GLenum pname, const GLint *params ) */
871static void
872android_glTexParameterIivEXT__II_3II
873 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
874 jint _exception = 0;
875 const char * _exceptionType = NULL;
876 const char * _exceptionMessage = NULL;
877 GLint *params_base = (GLint *) 0;
878 jint _remaining;
879 GLint *params = (GLint *) 0;
880
881 if (!params_ref) {
882 _exception = 1;
883 _exceptionType = "java/lang/IllegalArgumentException";
884 _exceptionMessage = "params == null";
885 goto exit;
886 }
887 if (offset < 0) {
888 _exception = 1;
889 _exceptionType = "java/lang/IllegalArgumentException";
890 _exceptionMessage = "offset < 0";
891 goto exit;
892 }
893 _remaining = _env->GetArrayLength(params_ref) - offset;
894 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700895 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700896 params = params_base + offset;
897
898 glTexParameterIivEXT(
899 (GLenum)target,
900 (GLenum)pname,
901 (GLint *)params
902 );
903
904exit:
905 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700906 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700907 JNI_ABORT);
908 }
909 if (_exception) {
910 jniThrowException(_env, _exceptionType, _exceptionMessage);
911 }
912}
913
914/* void glTexParameterIivEXT ( GLenum target, GLenum pname, const GLint *params ) */
915static void
916android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2
917 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700918 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700919 jint _bufferOffset = (jint) 0;
920 jint _remaining;
921 GLint *params = (GLint *) 0;
922
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700923 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700924 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700925 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700926 params = (GLint *) (_paramsBase + _bufferOffset);
927 }
928 glTexParameterIivEXT(
929 (GLenum)target,
930 (GLenum)pname,
931 (GLint *)params
932 );
933 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700934 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700935 }
936}
937
938/* void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params ) */
939static void
940android_glTexParameterIuivEXT__II_3II
941 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
942 jint _exception = 0;
943 const char * _exceptionType = NULL;
944 const char * _exceptionMessage = NULL;
945 GLuint *params_base = (GLuint *) 0;
946 jint _remaining;
947 GLuint *params = (GLuint *) 0;
948
949 if (!params_ref) {
950 _exception = 1;
951 _exceptionType = "java/lang/IllegalArgumentException";
952 _exceptionMessage = "params == null";
953 goto exit;
954 }
955 if (offset < 0) {
956 _exception = 1;
957 _exceptionType = "java/lang/IllegalArgumentException";
958 _exceptionMessage = "offset < 0";
959 goto exit;
960 }
961 _remaining = _env->GetArrayLength(params_ref) - offset;
962 params_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700963 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700964 params = params_base + offset;
965
966 glTexParameterIuivEXT(
967 (GLenum)target,
968 (GLenum)pname,
969 (GLuint *)params
970 );
971
972exit:
973 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700974 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700975 JNI_ABORT);
976 }
977 if (_exception) {
978 jniThrowException(_env, _exceptionType, _exceptionMessage);
979 }
980}
981
982/* void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params ) */
983static void
984android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2
985 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700986 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700987 jint _bufferOffset = (jint) 0;
988 jint _remaining;
989 GLuint *params = (GLuint *) 0;
990
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700991 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700992 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700993 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700994 params = (GLuint *) (_paramsBase + _bufferOffset);
995 }
996 glTexParameterIuivEXT(
997 (GLenum)target,
998 (GLenum)pname,
999 (GLuint *)params
1000 );
1001 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001002 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001003 }
1004}
1005
1006/* void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params ) */
1007static void
1008android_glGetTexParameterIivEXT__II_3II
1009 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1010 jint _exception = 0;
1011 const char * _exceptionType = NULL;
1012 const char * _exceptionMessage = NULL;
1013 GLint *params_base = (GLint *) 0;
1014 jint _remaining;
1015 GLint *params = (GLint *) 0;
1016
1017 if (!params_ref) {
1018 _exception = 1;
1019 _exceptionType = "java/lang/IllegalArgumentException";
1020 _exceptionMessage = "params == null";
1021 goto exit;
1022 }
1023 if (offset < 0) {
1024 _exception = 1;
1025 _exceptionType = "java/lang/IllegalArgumentException";
1026 _exceptionMessage = "offset < 0";
1027 goto exit;
1028 }
1029 _remaining = _env->GetArrayLength(params_ref) - offset;
1030 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001031 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001032 params = params_base + offset;
1033
1034 glGetTexParameterIivEXT(
1035 (GLenum)target,
1036 (GLenum)pname,
1037 (GLint *)params
1038 );
1039
1040exit:
1041 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001042 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001043 _exception ? JNI_ABORT: 0);
1044 }
1045 if (_exception) {
1046 jniThrowException(_env, _exceptionType, _exceptionMessage);
1047 }
1048}
1049
1050/* void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params ) */
1051static void
1052android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2
1053 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001054 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001055 jint _bufferOffset = (jint) 0;
1056 jint _remaining;
1057 GLint *params = (GLint *) 0;
1058
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001059 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001060 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001061 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001062 params = (GLint *) (_paramsBase + _bufferOffset);
1063 }
1064 glGetTexParameterIivEXT(
1065 (GLenum)target,
1066 (GLenum)pname,
1067 (GLint *)params
1068 );
1069 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001070 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001071 }
1072}
1073
1074/* void glGetTexParameterIuivEXT ( GLenum target, GLenum pname, GLuint *params ) */
1075static void
1076android_glGetTexParameterIuivEXT__II_3II
1077 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1078 jint _exception = 0;
1079 const char * _exceptionType = NULL;
1080 const char * _exceptionMessage = NULL;
1081 GLuint *params_base = (GLuint *) 0;
1082 jint _remaining;
1083 GLuint *params = (GLuint *) 0;
1084
1085 if (!params_ref) {
1086 _exception = 1;
1087 _exceptionType = "java/lang/IllegalArgumentException";
1088 _exceptionMessage = "params == null";
1089 goto exit;
1090 }
1091 if (offset < 0) {
1092 _exception = 1;
1093 _exceptionType = "java/lang/IllegalArgumentException";
1094 _exceptionMessage = "offset < 0";
1095 goto exit;
1096 }
1097 _remaining = _env->GetArrayLength(params_ref) - offset;
1098 params_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001099 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001100 params = params_base + offset;
1101
1102 glGetTexParameterIuivEXT(
1103 (GLenum)target,
1104 (GLenum)pname,
1105 (GLuint *)params
1106 );
1107
1108exit:
1109 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001110 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001111 _exception ? JNI_ABORT: 0);
1112 }
1113 if (_exception) {
1114 jniThrowException(_env, _exceptionType, _exceptionMessage);
1115 }
1116}
1117
1118/* void glGetTexParameterIuivEXT ( GLenum target, GLenum pname, GLuint *params ) */
1119static void
1120android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2
1121 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001122 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001123 jint _bufferOffset = (jint) 0;
1124 jint _remaining;
1125 GLuint *params = (GLuint *) 0;
1126
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001127 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001128 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001129 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001130 params = (GLuint *) (_paramsBase + _bufferOffset);
1131 }
1132 glGetTexParameterIuivEXT(
1133 (GLenum)target,
1134 (GLenum)pname,
1135 (GLuint *)params
1136 );
1137 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001138 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001139 }
1140}
1141
1142/* void glSamplerParameterIivEXT ( GLuint sampler, GLenum pname, const GLint *param ) */
1143static void
1144android_glSamplerParameterIivEXT__II_3II
1145 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1146 jint _exception = 0;
1147 const char * _exceptionType = NULL;
1148 const char * _exceptionMessage = NULL;
1149 GLint *param_base = (GLint *) 0;
1150 jint _remaining;
1151 GLint *param = (GLint *) 0;
1152
1153 if (!param_ref) {
1154 _exception = 1;
1155 _exceptionType = "java/lang/IllegalArgumentException";
1156 _exceptionMessage = "param == null";
1157 goto exit;
1158 }
1159 if (offset < 0) {
1160 _exception = 1;
1161 _exceptionType = "java/lang/IllegalArgumentException";
1162 _exceptionMessage = "offset < 0";
1163 goto exit;
1164 }
1165 _remaining = _env->GetArrayLength(param_ref) - offset;
1166 param_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001167 _env->GetIntArrayElements(param_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001168 param = param_base + offset;
1169
1170 glSamplerParameterIivEXT(
1171 (GLuint)sampler,
1172 (GLenum)pname,
1173 (GLint *)param
1174 );
1175
1176exit:
1177 if (param_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001178 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001179 JNI_ABORT);
1180 }
1181 if (_exception) {
1182 jniThrowException(_env, _exceptionType, _exceptionMessage);
1183 }
1184}
1185
1186/* void glSamplerParameterIivEXT ( GLuint sampler, GLenum pname, const GLint *param ) */
1187static void
1188android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
1189 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001190 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001191 jint _bufferOffset = (jint) 0;
1192 jint _remaining;
1193 GLint *param = (GLint *) 0;
1194
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001195 param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001196 if (param == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001197 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001198 param = (GLint *) (_paramBase + _bufferOffset);
1199 }
1200 glSamplerParameterIivEXT(
1201 (GLuint)sampler,
1202 (GLenum)pname,
1203 (GLint *)param
1204 );
1205 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001206 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001207 }
1208}
1209
1210/* void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param ) */
1211static void
1212android_glSamplerParameterIuivEXT__II_3II
1213 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1214 jint _exception = 0;
1215 const char * _exceptionType = NULL;
1216 const char * _exceptionMessage = NULL;
1217 GLuint *param_base = (GLuint *) 0;
1218 jint _remaining;
1219 GLuint *param = (GLuint *) 0;
1220
1221 if (!param_ref) {
1222 _exception = 1;
1223 _exceptionType = "java/lang/IllegalArgumentException";
1224 _exceptionMessage = "param == null";
1225 goto exit;
1226 }
1227 if (offset < 0) {
1228 _exception = 1;
1229 _exceptionType = "java/lang/IllegalArgumentException";
1230 _exceptionMessage = "offset < 0";
1231 goto exit;
1232 }
1233 _remaining = _env->GetArrayLength(param_ref) - offset;
1234 param_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001235 _env->GetIntArrayElements(param_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001236 param = param_base + offset;
1237
1238 glSamplerParameterIuivEXT(
1239 (GLuint)sampler,
1240 (GLenum)pname,
1241 (GLuint *)param
1242 );
1243
1244exit:
1245 if (param_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001246 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001247 JNI_ABORT);
1248 }
1249 if (_exception) {
1250 jniThrowException(_env, _exceptionType, _exceptionMessage);
1251 }
1252}
1253
1254/* void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param ) */
1255static void
1256android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
1257 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001258 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001259 jint _bufferOffset = (jint) 0;
1260 jint _remaining;
1261 GLuint *param = (GLuint *) 0;
1262
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001263 param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001264 if (param == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001265 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001266 param = (GLuint *) (_paramBase + _bufferOffset);
1267 }
1268 glSamplerParameterIuivEXT(
1269 (GLuint)sampler,
1270 (GLenum)pname,
1271 (GLuint *)param
1272 );
1273 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001274 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001275 }
1276}
1277
1278/* void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params ) */
1279static void
1280android_glGetSamplerParameterIivEXT__II_3II
1281 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1282 jint _exception = 0;
1283 const char * _exceptionType = NULL;
1284 const char * _exceptionMessage = NULL;
1285 GLint *params_base = (GLint *) 0;
1286 jint _remaining;
1287 GLint *params = (GLint *) 0;
1288
1289 if (!params_ref) {
1290 _exception = 1;
1291 _exceptionType = "java/lang/IllegalArgumentException";
1292 _exceptionMessage = "params == null";
1293 goto exit;
1294 }
1295 if (offset < 0) {
1296 _exception = 1;
1297 _exceptionType = "java/lang/IllegalArgumentException";
1298 _exceptionMessage = "offset < 0";
1299 goto exit;
1300 }
1301 _remaining = _env->GetArrayLength(params_ref) - offset;
1302 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001303 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001304 params = params_base + offset;
1305
1306 glGetSamplerParameterIivEXT(
1307 (GLuint)sampler,
1308 (GLenum)pname,
1309 (GLint *)params
1310 );
1311
1312exit:
1313 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001314 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001315 _exception ? JNI_ABORT: 0);
1316 }
1317 if (_exception) {
1318 jniThrowException(_env, _exceptionType, _exceptionMessage);
1319 }
1320}
1321
1322/* void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params ) */
1323static void
1324android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
1325 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001326 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001327 jint _bufferOffset = (jint) 0;
1328 jint _remaining;
1329 GLint *params = (GLint *) 0;
1330
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001331 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001332 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001333 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001334 params = (GLint *) (_paramsBase + _bufferOffset);
1335 }
1336 glGetSamplerParameterIivEXT(
1337 (GLuint)sampler,
1338 (GLenum)pname,
1339 (GLint *)params
1340 );
1341 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001342 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001343 }
1344}
1345
1346/* void glGetSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, GLuint *params ) */
1347static void
1348android_glGetSamplerParameterIuivEXT__II_3II
1349 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1350 jint _exception = 0;
1351 const char * _exceptionType = NULL;
1352 const char * _exceptionMessage = NULL;
1353 GLuint *params_base = (GLuint *) 0;
1354 jint _remaining;
1355 GLuint *params = (GLuint *) 0;
1356
1357 if (!params_ref) {
1358 _exception = 1;
1359 _exceptionType = "java/lang/IllegalArgumentException";
1360 _exceptionMessage = "params == null";
1361 goto exit;
1362 }
1363 if (offset < 0) {
1364 _exception = 1;
1365 _exceptionType = "java/lang/IllegalArgumentException";
1366 _exceptionMessage = "offset < 0";
1367 goto exit;
1368 }
1369 _remaining = _env->GetArrayLength(params_ref) - offset;
1370 params_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001371 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001372 params = params_base + offset;
1373
1374 glGetSamplerParameterIuivEXT(
1375 (GLuint)sampler,
1376 (GLenum)pname,
1377 (GLuint *)params
1378 );
1379
1380exit:
1381 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001382 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001383 _exception ? JNI_ABORT: 0);
1384 }
1385 if (_exception) {
1386 jniThrowException(_env, _exceptionType, _exceptionMessage);
1387 }
1388}
1389
1390/* void glGetSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, GLuint *params ) */
1391static void
1392android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
1393 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001394 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001395 jint _bufferOffset = (jint) 0;
1396 jint _remaining;
1397 GLuint *params = (GLuint *) 0;
1398
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001399 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001400 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001401 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001402 params = (GLuint *) (_paramsBase + _bufferOffset);
1403 }
1404 glGetSamplerParameterIuivEXT(
1405 (GLuint)sampler,
1406 (GLenum)pname,
1407 (GLuint *)params
1408 );
1409 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001410 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001411 }
1412}
1413
1414/* void glTexBufferEXT ( GLenum target, GLenum internalformat, GLuint buffer ) */
1415static void
1416android_glTexBufferEXT__III
1417 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer) {
1418 glTexBufferEXT(
1419 (GLenum)target,
1420 (GLenum)internalformat,
1421 (GLuint)buffer
1422 );
1423}
1424
1425/* void glTexBufferRangeEXT ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
1426static void
1427android_glTexBufferRangeEXT__IIIII
1428 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer, jint offset, jint size) {
1429 glTexBufferRangeEXT(
1430 (GLenum)target,
1431 (GLenum)internalformat,
1432 (GLuint)buffer,
1433 (GLintptr)offset,
1434 (GLsizeiptr)size
1435 );
1436}
1437
1438static const char *classPathName = "android/opengl/GLES31Ext";
1439
Daniel Micay76f6a862015-09-19 17:31:01 -04001440static const JNINativeMethod methods[] = {
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001441{"_nativeClassInit", "()V", (void*)nativeClassInit },
1442{"glBlendBarrierKHR", "()V", (void *) android_glBlendBarrierKHR__ },
1443{"glDebugMessageControlKHR", "(IIII[IIZ)V", (void *) android_glDebugMessageControlKHR__IIII_3IIZ },
1444{"glDebugMessageControlKHR", "(IIIILjava/nio/IntBuffer;Z)V", (void *) android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z },
1445{"glDebugMessageInsertKHR", "(IIIILjava/lang/String;)V", (void *) android_glDebugMessageInsertKHR__IIIILjava_lang_String_2 },
1446{"glDebugMessageCallbackKHR", "(Landroid/opengl/GLES31Ext$DebugProcKHR;)V", (void *) android_glDebugMessageCallbackKHR },
1447{"glGetDebugMessageLogKHR", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI },
1448{"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 },
1449{"glGetDebugMessageLogKHR", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II },
1450{"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 },
1451{"glPushDebugGroupKHR", "(IIILjava/lang/String;)V", (void *) android_glPushDebugGroupKHR__IIILjava_lang_String_2 },
1452{"glPopDebugGroupKHR", "()V", (void *) android_glPopDebugGroupKHR__ },
1453{"glObjectLabelKHR", "(IIILjava/lang/String;)V", (void *) android_glObjectLabelKHR__IIILjava_lang_String_2 },
1454{"glGetObjectLabelKHR", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabelKHR },
1455{"glObjectPtrLabelKHR", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabelKHR },
1456{"glGetObjectPtrLabelKHR", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabelKHR },
1457{"glGetDebugMessageCallbackKHR", "()Landroid/opengl/GLES31Ext$DebugProcKHR;", (void *) android_glGetDebugMessageCallbackKHR },
1458{"glMinSampleShadingOES", "(F)V", (void *) android_glMinSampleShadingOES__F },
1459{"glTexStorage3DMultisampleOES", "(IIIIIIZ)V", (void *) android_glTexStorage3DMultisampleOES__IIIIIIZ },
1460{"glCopyImageSubDataEXT", "(IIIIIIIIIIIIIII)V", (void *) android_glCopyImageSubDataEXT__IIIIIIIIIIIIIII },
1461{"glEnableiEXT", "(II)V", (void *) android_glEnableiEXT__II },
1462{"glDisableiEXT", "(II)V", (void *) android_glDisableiEXT__II },
1463{"glBlendEquationiEXT", "(II)V", (void *) android_glBlendEquationiEXT__II },
1464{"glBlendEquationSeparateiEXT", "(III)V", (void *) android_glBlendEquationSeparateiEXT__III },
1465{"glBlendFunciEXT", "(III)V", (void *) android_glBlendFunciEXT__III },
1466{"glBlendFuncSeparateiEXT", "(IIIII)V", (void *) android_glBlendFuncSeparateiEXT__IIIII },
1467{"glColorMaskiEXT", "(IZZZZ)V", (void *) android_glColorMaskiEXT__IZZZZ },
1468{"glIsEnablediEXT", "(II)Z", (void *) android_glIsEnablediEXT__II },
1469{"glFramebufferTextureEXT", "(IIII)V", (void *) android_glFramebufferTextureEXT__IIII },
1470{"glPrimitiveBoundingBoxEXT", "(FFFFFFFF)V", (void *) android_glPrimitiveBoundingBoxEXT__FFFFFFFF },
1471{"glPatchParameteriEXT", "(II)V", (void *) android_glPatchParameteriEXT__II },
1472{"glTexParameterIivEXT", "(II[II)V", (void *) android_glTexParameterIivEXT__II_3II },
1473{"glTexParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2 },
1474{"glTexParameterIuivEXT", "(II[II)V", (void *) android_glTexParameterIuivEXT__II_3II },
1475{"glTexParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1476{"glGetTexParameterIivEXT", "(II[II)V", (void *) android_glGetTexParameterIivEXT__II_3II },
1477{"glGetTexParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2 },
1478{"glGetTexParameterIuivEXT", "(II[II)V", (void *) android_glGetTexParameterIuivEXT__II_3II },
1479{"glGetTexParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1480{"glSamplerParameterIivEXT", "(II[II)V", (void *) android_glSamplerParameterIivEXT__II_3II },
1481{"glSamplerParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2 },
1482{"glSamplerParameterIuivEXT", "(II[II)V", (void *) android_glSamplerParameterIuivEXT__II_3II },
1483{"glSamplerParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1484{"glGetSamplerParameterIivEXT", "(II[II)V", (void *) android_glGetSamplerParameterIivEXT__II_3II },
1485{"glGetSamplerParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2 },
1486{"glGetSamplerParameterIuivEXT", "(II[II)V", (void *) android_glGetSamplerParameterIuivEXT__II_3II },
1487{"glGetSamplerParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1488{"glTexBufferEXT", "(III)V", (void *) android_glTexBufferEXT__III },
1489{"glTexBufferRangeEXT", "(IIIII)V", (void *) android_glTexBufferRangeEXT__IIIII },
1490};
1491
1492int register_android_opengl_jni_GLES31Ext(JNIEnv *_env)
1493{
1494 int err;
1495 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
1496 return err;
1497}