blob: dcaf4a58cd53dd210daad6ddbc35311499fd06f9 [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"
Andreas Gampebfe63332014-11-12 14:12:45 -080020#pragma GCC diagnostic ignored "-Wunused-function"
21
Jesse Hall7ab63ac2014-05-19 15:13:41 -070022#include <GLES3/gl31.h>
23#include <GLES2/gl2ext.h>
24
Jesse Hall9626f822014-05-19 20:57:49 -070025#include <jni.h>
Steven Moreland2279b252017-07-19 09:50:45 -070026#include <nativehelper/JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070027#include <android_runtime/AndroidRuntime.h>
28#include <utils/misc.h>
29#include <assert.h>
30
Jesse Hall7ab63ac2014-05-19 15:13:41 -070031
32/* special calls implemented in Android's GLES wrapper used to more
33 * efficiently bound-check passed arrays */
34extern "C" {
35#ifdef GL_VERSION_ES_CM_1_1
36GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
37 const GLvoid *ptr, GLsizei count);
38GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
39 const GLvoid *pointer, GLsizei count);
40GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
41 GLsizei stride, const GLvoid *pointer, GLsizei count);
42GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
43 GLsizei stride, const GLvoid *pointer, GLsizei count);
44GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
45 GLsizei stride, const GLvoid *pointer, GLsizei count);
46GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
47 GLsizei stride, const GLvoid *pointer, GLsizei count);
48GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
49 GLsizei stride, const GLvoid *pointer, GLsizei count);
50#endif
51#ifdef GL_ES_VERSION_2_0
52static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
53 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
54 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
55}
56#endif
57#ifdef GL_ES_VERSION_3_0
58static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
59 GLsizei stride, const GLvoid *pointer, GLsizei count) {
60 glVertexAttribIPointer(indx, size, type, stride, pointer);
61}
62#endif
63}
64
Jesse Hall7ab63ac2014-05-19 15:13:41 -070065static void
66nativeClassInit(JNIEnv *_env, jclass glImplClass)
67{
Jesse Hall7ab63ac2014-05-19 15:13:41 -070068}
69
70static void *
71getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
72{
73 jint position;
74 jint limit;
75 jint elementSizeShift;
76 jlong pointer;
77
Orion Hodson02440d32019-02-28 15:15:34 +000078 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
Jesse Hall7ab63ac2014-05-19 15:13:41 -070079 *remaining = (limit - position) << elementSizeShift;
Jesse Hall7ab63ac2014-05-19 15:13:41 -070080 if (pointer != 0L) {
Orion Hodson02440d32019-02-28 15:15:34 +000081 *array = nullptr;
82 pointer += position << elementSizeShift;
Jesse Hall7ab63ac2014-05-19 15:13:41 -070083 return reinterpret_cast<void*>(pointer);
84 }
85
Orion Hodson02440d32019-02-28 15:15:34 +000086 *array = jniGetNioBufferBaseArray(_env, buffer);
87 *offset = jniGetNioBufferBaseArrayOffset(_env, buffer);
88 return nullptr;
Jesse Hall7ab63ac2014-05-19 15:13:41 -070089}
90
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -070091class ByteArrayGetter {
92public:
93 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
94 return _env->GetByteArrayElements(array, is_copy);
95 }
96};
97class BooleanArrayGetter {
98public:
99 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
100 return _env->GetBooleanArrayElements(array, is_copy);
101 }
102};
103class CharArrayGetter {
104public:
105 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
106 return _env->GetCharArrayElements(array, is_copy);
107 }
108};
109class ShortArrayGetter {
110public:
111 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
112 return _env->GetShortArrayElements(array, is_copy);
113 }
114};
115class IntArrayGetter {
116public:
117 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
118 return _env->GetIntArrayElements(array, is_copy);
119 }
120};
121class LongArrayGetter {
122public:
123 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
124 return _env->GetLongArrayElements(array, is_copy);
125 }
126};
127class FloatArrayGetter {
128public:
129 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
130 return _env->GetFloatArrayElements(array, is_copy);
131 }
132};
133class DoubleArrayGetter {
134public:
135 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
136 return _env->GetDoubleArrayElements(array, is_copy);
137 }
138};
139
140template<typename JTYPEARRAY, typename ARRAYGETTER>
141static void*
142getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
143 return ARRAYGETTER::Get(_env, array, is_copy);
144}
145
146class ByteArrayReleaser {
147public:
148 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
149 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
150 }
151};
152class BooleanArrayReleaser {
153public:
154 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
155 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
156 }
157};
158class CharArrayReleaser {
159public:
160 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
161 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
162 }
163};
164class ShortArrayReleaser {
165public:
166 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
167 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
168 }
169};
170class IntArrayReleaser {
171public:
172 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
173 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
174 }
175};
176class LongArrayReleaser {
177public:
178 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
179 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
180 }
181};
182class FloatArrayReleaser {
183public:
184 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
185 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
186 }
187};
188class DoubleArrayReleaser {
189public:
190 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
191 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
192 }
193};
194
195template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
196static void
197releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
198 ARRAYRELEASER::Release(_env, array, data, commit);
199}
200
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700201static void
202releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
203{
204 _env->ReleasePrimitiveArrayCritical(array, data,
205 commit ? 0 : JNI_ABORT);
206}
207
208static void *
209getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
Orion Hodson02440d32019-02-28 15:15:34 +0000210 jint position;
211 jint limit;
212 jint elementSizeShift;
213 jlong pointer;
214 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
215 if (pointer == 0) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700216 jniThrowException(_env, "java/lang/IllegalArgumentException",
217 "Must use a native order direct Buffer");
Orion Hodson02440d32019-02-28 15:15:34 +0000218 return nullptr;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700219 }
Orion Hodson02440d32019-02-28 15:15:34 +0000220 pointer += position << elementSizeShift;
221 return reinterpret_cast<void*>(pointer);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700222}
223
224// --------------------------------------------------------------------------
225
226/*
227 * returns the number of values glGet returns for a given pname.
228 *
229 * The code below is written such that pnames requiring only one values
230 * are the default (and are not explicitely tested for). This makes the
231 * checking code much shorter/readable/efficient.
232 *
233 * This means that unknown pnames (e.g.: extensions) will default to 1. If
234 * that unknown pname needs more than 1 value, then the validation check
235 * is incomplete and the app may crash if it passed the wrong number params.
236 */
237static int getNeededCount(GLint pname) {
238 int needed = 1;
Romain Guydc43a6c2017-02-17 19:54:25 -0800239#ifdef GL_ES_VERSION_3_0
240 // GLES 3.x pnames
241 switch (pname) {
242 case GL_MAX_VIEWPORT_DIMS:
243 needed = 2;
244 break;
245
246 case GL_PROGRAM_BINARY_FORMATS:
247 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
248 break;
249 }
250#endif
251
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700252#ifdef GL_ES_VERSION_2_0
253 // GLES 2.x pnames
254 switch (pname) {
255 case GL_ALIASED_LINE_WIDTH_RANGE:
256 case GL_ALIASED_POINT_SIZE_RANGE:
257 needed = 2;
258 break;
259
260 case GL_BLEND_COLOR:
261 case GL_COLOR_CLEAR_VALUE:
262 case GL_COLOR_WRITEMASK:
263 case GL_SCISSOR_BOX:
264 case GL_VIEWPORT:
265 needed = 4;
266 break;
267
268 case GL_COMPRESSED_TEXTURE_FORMATS:
269 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
270 break;
271
272 case GL_SHADER_BINARY_FORMATS:
273 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
274 break;
275 }
276#endif
277
278#ifdef GL_VERSION_ES_CM_1_1
279 // GLES 1.x pnames
280 switch (pname) {
281 case GL_ALIASED_LINE_WIDTH_RANGE:
282 case GL_ALIASED_POINT_SIZE_RANGE:
283 case GL_DEPTH_RANGE:
284 case GL_SMOOTH_LINE_WIDTH_RANGE:
285 case GL_SMOOTH_POINT_SIZE_RANGE:
286 needed = 2;
287 break;
288
289 case GL_CURRENT_NORMAL:
290 case GL_POINT_DISTANCE_ATTENUATION:
291 needed = 3;
292 break;
293
294 case GL_COLOR_CLEAR_VALUE:
295 case GL_COLOR_WRITEMASK:
296 case GL_CURRENT_COLOR:
297 case GL_CURRENT_TEXTURE_COORDS:
298 case GL_FOG_COLOR:
299 case GL_LIGHT_MODEL_AMBIENT:
300 case GL_SCISSOR_BOX:
301 case GL_VIEWPORT:
302 needed = 4;
303 break;
304
305 case GL_MODELVIEW_MATRIX:
306 case GL_PROJECTION_MATRIX:
307 case GL_TEXTURE_MATRIX:
308 needed = 16;
309 break;
310
311 case GL_COMPRESSED_TEXTURE_FORMATS:
312 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
313 break;
314 }
315#endif
316 return needed;
317}
318
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700319template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
320 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700321static void
322get
323 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
324 jint _exception = 0;
325 const char * _exceptionType;
326 const char * _exceptionMessage;
327 CTYPE *params_base = (CTYPE *) 0;
328 jint _remaining;
329 CTYPE *params = (CTYPE *) 0;
330 int _needed = 0;
331
332 if (!params_ref) {
333 _exception = 1;
334 _exceptionType = "java/lang/IllegalArgumentException";
335 _exceptionMessage = "params == null";
336 goto exit;
337 }
338 if (offset < 0) {
339 _exception = 1;
340 _exceptionType = "java/lang/IllegalArgumentException";
341 _exceptionMessage = "offset < 0";
342 goto exit;
343 }
344 _remaining = _env->GetArrayLength(params_ref) - offset;
345 _needed = getNeededCount(pname);
346 // if we didn't find this pname, we just assume the user passed
347 // an array of the right size -- this might happen with extensions
348 // or if we forget an enum here.
349 if (_remaining < _needed) {
350 _exception = 1;
351 _exceptionType = "java/lang/IllegalArgumentException";
352 _exceptionMessage = "length - offset < needed";
353 goto exit;
354 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700355 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
356 _env, params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700357 params = params_base + offset;
358
359 GET(
360 (GLenum)pname,
361 (CTYPE *)params
362 );
363
364exit:
365 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700366 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
367 _env, params_ref, params_base, !_exception);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700368 }
369 if (_exception) {
370 jniThrowException(_env, _exceptionType, _exceptionMessage);
371 }
372}
373
374
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700375template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
376 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700377static void
378getarray
379 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
380 jint _exception = 0;
381 const char * _exceptionType;
382 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700383 JTYPEARRAY _array = (JTYPEARRAY) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700384 jint _bufferOffset = (jint) 0;
385 jint _remaining;
386 CTYPE *params = (CTYPE *) 0;
387 int _needed = 0;
388
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700389 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700390 _remaining /= sizeof(CTYPE); // convert from bytes to item count
391 _needed = getNeededCount(pname);
392 // if we didn't find this pname, we just assume the user passed
393 // an array of the right size -- this might happen with extensions
394 // or if we forget an enum here.
395 if (_needed>0 && _remaining < _needed) {
396 _exception = 1;
397 _exceptionType = "java/lang/IllegalArgumentException";
398 _exceptionMessage = "remaining() < needed";
399 goto exit;
400 }
401 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700402 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
403 _env, _array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700404 params = (CTYPE *) (_paramsBase + _bufferOffset);
405 }
406 GET(
407 (GLenum)pname,
408 (CTYPE *)params
409 );
410
411exit:
412 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700413 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
414 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700415 }
416 if (_exception) {
417 jniThrowException(_env, _exceptionType, _exceptionMessage);
418 }
419}
420
421// --------------------------------------------------------------------------
422/* void glBlendBarrierKHR ( void ) */
423static void
424android_glBlendBarrierKHR__
425 (JNIEnv *_env, jobject _this) {
426 glBlendBarrierKHR();
427}
428
429/* void glDebugMessageControlKHR ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
430static void
431android_glDebugMessageControlKHR__IIII_3IIZ
432 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jintArray ids_ref, jint offset, jboolean enabled) {
433 jint _exception = 0;
434 const char * _exceptionType = NULL;
435 const char * _exceptionMessage = NULL;
436 GLuint *ids_base = (GLuint *) 0;
437 jint _remaining;
438 GLuint *ids = (GLuint *) 0;
439
440 if (!ids_ref) {
441 _exception = 1;
442 _exceptionType = "java/lang/IllegalArgumentException";
443 _exceptionMessage = "ids == null";
444 goto exit;
445 }
446 if (offset < 0) {
447 _exception = 1;
448 _exceptionType = "java/lang/IllegalArgumentException";
449 _exceptionMessage = "offset < 0";
450 goto exit;
451 }
452 _remaining = _env->GetArrayLength(ids_ref) - offset;
453 ids_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700454 _env->GetIntArrayElements(ids_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700455 ids = ids_base + offset;
456
457 glDebugMessageControlKHR(
458 (GLenum)source,
459 (GLenum)type,
460 (GLenum)severity,
461 (GLsizei)count,
462 (GLuint *)ids,
463 (GLboolean)enabled
464 );
465
466exit:
467 if (ids_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700468 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700469 JNI_ABORT);
470 }
471 if (_exception) {
472 jniThrowException(_env, _exceptionType, _exceptionMessage);
473 }
474}
475
476/* void glDebugMessageControlKHR ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */
477static void
478android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z
479 (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) {
Romain Guy84cac202016-12-05 12:26:02 -0800480 jint _exception = 0;
481 const char * _exceptionType = NULL;
482 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700483 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700484 jint _bufferOffset = (jint) 0;
485 jint _remaining;
486 GLuint *ids = (GLuint *) 0;
487
Romain Guy84cac202016-12-05 12:26:02 -0800488 if (!ids_buf) {
489 _exception = 1;
490 _exceptionType = "java/lang/IllegalArgumentException";
491 _exceptionMessage = "ids == null";
492 goto exit;
493 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700494 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700495 if (ids == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700496 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700497 ids = (GLuint *) (_idsBase + _bufferOffset);
498 }
499 glDebugMessageControlKHR(
500 (GLenum)source,
501 (GLenum)type,
502 (GLenum)severity,
503 (GLsizei)count,
504 (GLuint *)ids,
505 (GLboolean)enabled
506 );
Romain Guy84cac202016-12-05 12:26:02 -0800507
508exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700509 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700510 _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700511 }
Romain Guy84cac202016-12-05 12:26:02 -0800512 if (_exception) {
513 jniThrowException(_env, _exceptionType, _exceptionMessage);
514 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700515}
516
517/* void glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
518static void
519android_glDebugMessageInsertKHR__IIIILjava_lang_String_2
520 (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jstring buf) {
521 jint _exception = 0;
522 const char * _exceptionType = NULL;
523 const char * _exceptionMessage = NULL;
524 const char* _nativebuf = 0;
525 jint _length = 0;
526
527 if (!buf) {
528 _exception = 1;
529 _exceptionType = "java/lang/IllegalArgumentException";
530 _exceptionMessage = "buf == null";
531 goto exit;
532 }
533 _nativebuf = _env->GetStringUTFChars(buf, 0);
534 _length = _env->GetStringUTFLength(buf);
535
536 glDebugMessageInsertKHR(
537 (GLenum)source,
538 (GLenum)type,
539 (GLuint)id,
540 (GLenum)severity,
541 (GLsizei)_length,
542 (GLchar *)_nativebuf
543 );
544
545exit:
546 if (_nativebuf) {
547 _env->ReleaseStringUTFChars(buf, _nativebuf);
548 }
549
550 if (_exception) {
551 jniThrowException(_env, _exceptionType, _exceptionMessage);
552 }
553}
554
555/* void glDebugMessageCallbackKHR ( GLDEBUGPROCKHR callback, const void *userParam ) */
556static void
557android_glDebugMessageCallbackKHR(JNIEnv *_env, jobject _this, jobject callback) {
558 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
559}
560/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
561static jint
562android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI
563 (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) {
564 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
565 return 0;
566}
567
568/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
569static uint
570android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
571 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
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 jobjectArray
578android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II
579 (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) {
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__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
587 (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
588 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
589 return 0;
590}
591/* void glPushDebugGroupKHR ( GLenum source, GLuint id, GLsizei length, const GLchar *message ) */
592static void
593android_glPushDebugGroupKHR__IIILjava_lang_String_2
594 (JNIEnv *_env, jobject _this, jint source, jint id, jint length, jstring message) {
595 jint _exception = 0;
596 const char * _exceptionType = NULL;
597 const char * _exceptionMessage = NULL;
598 const char* _nativemessage = 0;
599
600 if (!message) {
601 _exception = 1;
602 _exceptionType = "java/lang/IllegalArgumentException";
603 _exceptionMessage = "message == null";
604 goto exit;
605 }
606 _nativemessage = _env->GetStringUTFChars(message, 0);
607
608 glPushDebugGroupKHR(
609 (GLenum)source,
610 (GLuint)id,
611 (GLsizei)length,
612 (GLchar *)_nativemessage
613 );
614
615exit:
616 if (_nativemessage) {
617 _env->ReleaseStringUTFChars(message, _nativemessage);
618 }
619
620 if (_exception) {
621 jniThrowException(_env, _exceptionType, _exceptionMessage);
622 }
623}
624
625/* void glPopDebugGroupKHR ( void ) */
626static void
627android_glPopDebugGroupKHR__
628 (JNIEnv *_env, jobject _this) {
629 glPopDebugGroupKHR();
630}
631
632/* void glObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */
633static void
634android_glObjectLabelKHR__IIILjava_lang_String_2
635 (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) {
636 jint _exception = 0;
637 const char * _exceptionType = NULL;
638 const char * _exceptionMessage = NULL;
639 const char* _nativelabel = 0;
640
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700641 if (label) {
642 _nativelabel = _env->GetStringUTFChars(label, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700643 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700644
645 glObjectLabelKHR(
646 (GLenum)identifier,
647 (GLuint)name,
648 (GLsizei)length,
649 (GLchar *)_nativelabel
650 );
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700651 if (_nativelabel) {
652 _env->ReleaseStringUTFChars(label, _nativelabel);
653 }
654
655 if (_exception) {
656 jniThrowException(_env, _exceptionType, _exceptionMessage);
657 }
658}
659
660/* void glGetObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
661static jstring
662android_glGetObjectLabelKHR(JNIEnv *_env, jobject _this, jint identifier, jint name) {
663 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
664 return NULL;
665}
666
667/* void glObjectPtrLabelKHR ( const void *ptr, GLsizei length, const GLchar *label ) */
668static void
669android_glObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
670 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
671}
672
673/* void glGetObjectPtrLabelKHR ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
674static jstring
675android_glGetObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr) {
676 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
677 return NULL;
678}
679
680/* void glGetPointervKHR ( GLenum pname, void **params ) */
681static jobject
682android_glGetDebugMessageCallbackKHR(JNIEnv *_env, jobject _this) {
683 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
684 return NULL;
685}
686
687/* void glMinSampleShadingOES ( GLfloat value ) */
688static void
689android_glMinSampleShadingOES__F
690 (JNIEnv *_env, jobject _this, jfloat value) {
691 glMinSampleShadingOES(
692 (GLfloat)value
693 );
694}
695
696/* void glTexStorage3DMultisampleOES ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations ) */
697static void
698android_glTexStorage3DMultisampleOES__IIIIIIZ
699 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) {
700 glTexStorage3DMultisampleOES(
701 (GLenum)target,
702 (GLsizei)samples,
703 (GLenum)internalformat,
704 (GLsizei)width,
705 (GLsizei)height,
706 (GLsizei)depth,
707 (GLboolean)fixedsamplelocations
708 );
709}
710
711/* 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 ) */
712static void
713android_glCopyImageSubDataEXT__IIIIIIIIIIIIIII
714 (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) {
715 glCopyImageSubDataEXT(
716 (GLuint)srcName,
717 (GLenum)srcTarget,
718 (GLint)srcLevel,
719 (GLint)srcX,
720 (GLint)srcY,
721 (GLint)srcZ,
722 (GLuint)dstName,
723 (GLenum)dstTarget,
724 (GLint)dstLevel,
725 (GLint)dstX,
726 (GLint)dstY,
727 (GLint)dstZ,
728 (GLsizei)srcWidth,
729 (GLsizei)srcHeight,
730 (GLsizei)srcDepth
731 );
732}
733
734/* void glEnableiEXT ( GLenum target, GLuint index ) */
735static void
736android_glEnableiEXT__II
737 (JNIEnv *_env, jobject _this, jint target, jint index) {
738 glEnableiEXT(
739 (GLenum)target,
740 (GLuint)index
741 );
742}
743
744/* void glDisableiEXT ( GLenum target, GLuint index ) */
745static void
746android_glDisableiEXT__II
747 (JNIEnv *_env, jobject _this, jint target, jint index) {
748 glDisableiEXT(
749 (GLenum)target,
750 (GLuint)index
751 );
752}
753
754/* void glBlendEquationiEXT ( GLuint buf, GLenum mode ) */
755static void
756android_glBlendEquationiEXT__II
757 (JNIEnv *_env, jobject _this, jint buf, jint mode) {
758 glBlendEquationiEXT(
759 (GLuint)buf,
760 (GLenum)mode
761 );
762}
763
764/* void glBlendEquationSeparateiEXT ( GLuint buf, GLenum modeRGB, GLenum modeAlpha ) */
765static void
766android_glBlendEquationSeparateiEXT__III
767 (JNIEnv *_env, jobject _this, jint buf, jint modeRGB, jint modeAlpha) {
768 glBlendEquationSeparateiEXT(
769 (GLuint)buf,
770 (GLenum)modeRGB,
771 (GLenum)modeAlpha
772 );
773}
774
775/* void glBlendFunciEXT ( GLuint buf, GLenum src, GLenum dst ) */
776static void
777android_glBlendFunciEXT__III
778 (JNIEnv *_env, jobject _this, jint buf, jint src, jint dst) {
779 glBlendFunciEXT(
780 (GLuint)buf,
781 (GLenum)src,
782 (GLenum)dst
783 );
784}
785
786/* void glBlendFuncSeparateiEXT ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
787static void
788android_glBlendFuncSeparateiEXT__IIIII
789 (JNIEnv *_env, jobject _this, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
790 glBlendFuncSeparateiEXT(
791 (GLuint)buf,
792 (GLenum)srcRGB,
793 (GLenum)dstRGB,
794 (GLenum)srcAlpha,
795 (GLenum)dstAlpha
796 );
797}
798
799/* void glColorMaskiEXT ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) */
800static void
801android_glColorMaskiEXT__IZZZZ
802 (JNIEnv *_env, jobject _this, jint index, jboolean r, jboolean g, jboolean b, jboolean a) {
803 glColorMaskiEXT(
804 (GLuint)index,
805 (GLboolean)r,
806 (GLboolean)g,
807 (GLboolean)b,
808 (GLboolean)a
809 );
810}
811
812/* GLboolean glIsEnablediEXT ( GLenum target, GLuint index ) */
813static jboolean
814android_glIsEnablediEXT__II
815 (JNIEnv *_env, jobject _this, jint target, jint index) {
816 GLboolean _returnValue;
817 _returnValue = glIsEnablediEXT(
818 (GLenum)target,
819 (GLuint)index
820 );
821 return (jboolean)_returnValue;
822}
823
824/* void glFramebufferTextureEXT ( GLenum target, GLenum attachment, GLuint texture, GLint level ) */
825static void
826android_glFramebufferTextureEXT__IIII
827 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level) {
828 glFramebufferTextureEXT(
829 (GLenum)target,
830 (GLenum)attachment,
831 (GLuint)texture,
832 (GLint)level
833 );
834}
835
836/* void glPrimitiveBoundingBoxEXT ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ) */
837static void
838android_glPrimitiveBoundingBoxEXT__FFFFFFFF
839 (JNIEnv *_env, jobject _this, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) {
840 glPrimitiveBoundingBoxEXT(
841 (GLfloat)minX,
842 (GLfloat)minY,
843 (GLfloat)minZ,
844 (GLfloat)minW,
845 (GLfloat)maxX,
846 (GLfloat)maxY,
847 (GLfloat)maxZ,
848 (GLfloat)maxW
849 );
850}
851
852/* void glPatchParameteriEXT ( GLenum pname, GLint value ) */
853static void
854android_glPatchParameteriEXT__II
855 (JNIEnv *_env, jobject _this, jint pname, jint value) {
856 glPatchParameteriEXT(
857 (GLenum)pname,
858 (GLint)value
859 );
860}
861
862/* void glTexParameterIivEXT ( GLenum target, GLenum pname, const GLint *params ) */
863static void
864android_glTexParameterIivEXT__II_3II
865 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
866 jint _exception = 0;
867 const char * _exceptionType = NULL;
868 const char * _exceptionMessage = NULL;
869 GLint *params_base = (GLint *) 0;
870 jint _remaining;
871 GLint *params = (GLint *) 0;
872
873 if (!params_ref) {
874 _exception = 1;
875 _exceptionType = "java/lang/IllegalArgumentException";
876 _exceptionMessage = "params == null";
877 goto exit;
878 }
879 if (offset < 0) {
880 _exception = 1;
881 _exceptionType = "java/lang/IllegalArgumentException";
882 _exceptionMessage = "offset < 0";
883 goto exit;
884 }
885 _remaining = _env->GetArrayLength(params_ref) - offset;
886 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700887 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700888 params = params_base + offset;
889
890 glTexParameterIivEXT(
891 (GLenum)target,
892 (GLenum)pname,
893 (GLint *)params
894 );
895
896exit:
897 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700898 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700899 JNI_ABORT);
900 }
901 if (_exception) {
902 jniThrowException(_env, _exceptionType, _exceptionMessage);
903 }
904}
905
906/* void glTexParameterIivEXT ( GLenum target, GLenum pname, const GLint *params ) */
907static void
908android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2
909 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800910 jint _exception = 0;
911 const char * _exceptionType = NULL;
912 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700913 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700914 jint _bufferOffset = (jint) 0;
915 jint _remaining;
916 GLint *params = (GLint *) 0;
917
Romain Guy84cac202016-12-05 12:26:02 -0800918 if (!params_buf) {
919 _exception = 1;
920 _exceptionType = "java/lang/IllegalArgumentException";
921 _exceptionMessage = "params == null";
922 goto exit;
923 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700924 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700925 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700926 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700927 params = (GLint *) (_paramsBase + _bufferOffset);
928 }
929 glTexParameterIivEXT(
930 (GLenum)target,
931 (GLenum)pname,
932 (GLint *)params
933 );
Romain Guy84cac202016-12-05 12:26:02 -0800934
935exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700936 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700937 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700938 }
Romain Guy84cac202016-12-05 12:26:02 -0800939 if (_exception) {
940 jniThrowException(_env, _exceptionType, _exceptionMessage);
941 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700942}
943
944/* void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params ) */
945static void
946android_glTexParameterIuivEXT__II_3II
947 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
948 jint _exception = 0;
949 const char * _exceptionType = NULL;
950 const char * _exceptionMessage = NULL;
951 GLuint *params_base = (GLuint *) 0;
952 jint _remaining;
953 GLuint *params = (GLuint *) 0;
954
955 if (!params_ref) {
956 _exception = 1;
957 _exceptionType = "java/lang/IllegalArgumentException";
958 _exceptionMessage = "params == null";
959 goto exit;
960 }
961 if (offset < 0) {
962 _exception = 1;
963 _exceptionType = "java/lang/IllegalArgumentException";
964 _exceptionMessage = "offset < 0";
965 goto exit;
966 }
967 _remaining = _env->GetArrayLength(params_ref) - offset;
968 params_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700969 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700970 params = params_base + offset;
971
972 glTexParameterIuivEXT(
973 (GLenum)target,
974 (GLenum)pname,
975 (GLuint *)params
976 );
977
978exit:
979 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700980 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700981 JNI_ABORT);
982 }
983 if (_exception) {
984 jniThrowException(_env, _exceptionType, _exceptionMessage);
985 }
986}
987
988/* void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params ) */
989static void
990android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2
991 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800992 jint _exception = 0;
993 const char * _exceptionType = NULL;
994 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700995 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700996 jint _bufferOffset = (jint) 0;
997 jint _remaining;
998 GLuint *params = (GLuint *) 0;
999
Romain Guy84cac202016-12-05 12:26:02 -08001000 if (!params_buf) {
1001 _exception = 1;
1002 _exceptionType = "java/lang/IllegalArgumentException";
1003 _exceptionMessage = "params == null";
1004 goto exit;
1005 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001006 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001007 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001008 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001009 params = (GLuint *) (_paramsBase + _bufferOffset);
1010 }
1011 glTexParameterIuivEXT(
1012 (GLenum)target,
1013 (GLenum)pname,
1014 (GLuint *)params
1015 );
Romain Guy84cac202016-12-05 12:26:02 -08001016
1017exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001018 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001019 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001020 }
Romain Guy84cac202016-12-05 12:26:02 -08001021 if (_exception) {
1022 jniThrowException(_env, _exceptionType, _exceptionMessage);
1023 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001024}
1025
1026/* void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params ) */
1027static void
1028android_glGetTexParameterIivEXT__II_3II
1029 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1030 jint _exception = 0;
1031 const char * _exceptionType = NULL;
1032 const char * _exceptionMessage = NULL;
1033 GLint *params_base = (GLint *) 0;
1034 jint _remaining;
1035 GLint *params = (GLint *) 0;
1036
1037 if (!params_ref) {
1038 _exception = 1;
1039 _exceptionType = "java/lang/IllegalArgumentException";
1040 _exceptionMessage = "params == null";
1041 goto exit;
1042 }
1043 if (offset < 0) {
1044 _exception = 1;
1045 _exceptionType = "java/lang/IllegalArgumentException";
1046 _exceptionMessage = "offset < 0";
1047 goto exit;
1048 }
1049 _remaining = _env->GetArrayLength(params_ref) - offset;
1050 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001051 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001052 params = params_base + offset;
1053
1054 glGetTexParameterIivEXT(
1055 (GLenum)target,
1056 (GLenum)pname,
1057 (GLint *)params
1058 );
1059
1060exit:
1061 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001062 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001063 _exception ? JNI_ABORT: 0);
1064 }
1065 if (_exception) {
1066 jniThrowException(_env, _exceptionType, _exceptionMessage);
1067 }
1068}
1069
1070/* void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params ) */
1071static void
1072android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2
1073 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001074 jint _exception = 0;
1075 const char * _exceptionType = NULL;
1076 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001077 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001078 jint _bufferOffset = (jint) 0;
1079 jint _remaining;
1080 GLint *params = (GLint *) 0;
1081
Romain Guy84cac202016-12-05 12:26:02 -08001082 if (!params_buf) {
1083 _exception = 1;
1084 _exceptionType = "java/lang/IllegalArgumentException";
1085 _exceptionMessage = "params == null";
1086 goto exit;
1087 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001088 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001089 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001090 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001091 params = (GLint *) (_paramsBase + _bufferOffset);
1092 }
1093 glGetTexParameterIivEXT(
1094 (GLenum)target,
1095 (GLenum)pname,
1096 (GLint *)params
1097 );
Romain Guy84cac202016-12-05 12:26:02 -08001098
1099exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001100 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001101 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1102 }
1103 if (_exception) {
1104 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001105 }
1106}
1107
1108/* void glGetTexParameterIuivEXT ( GLenum target, GLenum pname, GLuint *params ) */
1109static void
1110android_glGetTexParameterIuivEXT__II_3II
1111 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1112 jint _exception = 0;
1113 const char * _exceptionType = NULL;
1114 const char * _exceptionMessage = NULL;
1115 GLuint *params_base = (GLuint *) 0;
1116 jint _remaining;
1117 GLuint *params = (GLuint *) 0;
1118
1119 if (!params_ref) {
1120 _exception = 1;
1121 _exceptionType = "java/lang/IllegalArgumentException";
1122 _exceptionMessage = "params == null";
1123 goto exit;
1124 }
1125 if (offset < 0) {
1126 _exception = 1;
1127 _exceptionType = "java/lang/IllegalArgumentException";
1128 _exceptionMessage = "offset < 0";
1129 goto exit;
1130 }
1131 _remaining = _env->GetArrayLength(params_ref) - offset;
1132 params_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001133 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001134 params = params_base + offset;
1135
1136 glGetTexParameterIuivEXT(
1137 (GLenum)target,
1138 (GLenum)pname,
1139 (GLuint *)params
1140 );
1141
1142exit:
1143 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001144 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001145 _exception ? JNI_ABORT: 0);
1146 }
1147 if (_exception) {
1148 jniThrowException(_env, _exceptionType, _exceptionMessage);
1149 }
1150}
1151
1152/* void glGetTexParameterIuivEXT ( GLenum target, GLenum pname, GLuint *params ) */
1153static void
1154android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2
1155 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001156 jint _exception = 0;
1157 const char * _exceptionType = NULL;
1158 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001159 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001160 jint _bufferOffset = (jint) 0;
1161 jint _remaining;
1162 GLuint *params = (GLuint *) 0;
1163
Romain Guy84cac202016-12-05 12:26:02 -08001164 if (!params_buf) {
1165 _exception = 1;
1166 _exceptionType = "java/lang/IllegalArgumentException";
1167 _exceptionMessage = "params == null";
1168 goto exit;
1169 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001170 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001171 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001172 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001173 params = (GLuint *) (_paramsBase + _bufferOffset);
1174 }
1175 glGetTexParameterIuivEXT(
1176 (GLenum)target,
1177 (GLenum)pname,
1178 (GLuint *)params
1179 );
Romain Guy84cac202016-12-05 12:26:02 -08001180
1181exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001182 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001183 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1184 }
1185 if (_exception) {
1186 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001187 }
1188}
1189
1190/* void glSamplerParameterIivEXT ( GLuint sampler, GLenum pname, const GLint *param ) */
1191static void
1192android_glSamplerParameterIivEXT__II_3II
1193 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1194 jint _exception = 0;
1195 const char * _exceptionType = NULL;
1196 const char * _exceptionMessage = NULL;
1197 GLint *param_base = (GLint *) 0;
1198 jint _remaining;
1199 GLint *param = (GLint *) 0;
1200
1201 if (!param_ref) {
1202 _exception = 1;
1203 _exceptionType = "java/lang/IllegalArgumentException";
1204 _exceptionMessage = "param == null";
1205 goto exit;
1206 }
1207 if (offset < 0) {
1208 _exception = 1;
1209 _exceptionType = "java/lang/IllegalArgumentException";
1210 _exceptionMessage = "offset < 0";
1211 goto exit;
1212 }
1213 _remaining = _env->GetArrayLength(param_ref) - offset;
1214 param_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001215 _env->GetIntArrayElements(param_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001216 param = param_base + offset;
1217
1218 glSamplerParameterIivEXT(
1219 (GLuint)sampler,
1220 (GLenum)pname,
1221 (GLint *)param
1222 );
1223
1224exit:
1225 if (param_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001226 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001227 JNI_ABORT);
1228 }
1229 if (_exception) {
1230 jniThrowException(_env, _exceptionType, _exceptionMessage);
1231 }
1232}
1233
1234/* void glSamplerParameterIivEXT ( GLuint sampler, GLenum pname, const GLint *param ) */
1235static void
1236android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
1237 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001238 jint _exception = 0;
1239 const char * _exceptionType = NULL;
1240 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001241 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001242 jint _bufferOffset = (jint) 0;
1243 jint _remaining;
1244 GLint *param = (GLint *) 0;
1245
Romain Guy84cac202016-12-05 12:26:02 -08001246 if (!param_buf) {
1247 _exception = 1;
1248 _exceptionType = "java/lang/IllegalArgumentException";
1249 _exceptionMessage = "param == null";
1250 goto exit;
1251 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001252 param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001253 if (param == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001254 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001255 param = (GLint *) (_paramBase + _bufferOffset);
1256 }
1257 glSamplerParameterIivEXT(
1258 (GLuint)sampler,
1259 (GLenum)pname,
1260 (GLint *)param
1261 );
Romain Guy84cac202016-12-05 12:26:02 -08001262
1263exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001264 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001265 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001266 }
Romain Guy84cac202016-12-05 12:26:02 -08001267 if (_exception) {
1268 jniThrowException(_env, _exceptionType, _exceptionMessage);
1269 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001270}
1271
1272/* void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param ) */
1273static void
1274android_glSamplerParameterIuivEXT__II_3II
1275 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
1276 jint _exception = 0;
1277 const char * _exceptionType = NULL;
1278 const char * _exceptionMessage = NULL;
1279 GLuint *param_base = (GLuint *) 0;
1280 jint _remaining;
1281 GLuint *param = (GLuint *) 0;
1282
1283 if (!param_ref) {
1284 _exception = 1;
1285 _exceptionType = "java/lang/IllegalArgumentException";
1286 _exceptionMessage = "param == null";
1287 goto exit;
1288 }
1289 if (offset < 0) {
1290 _exception = 1;
1291 _exceptionType = "java/lang/IllegalArgumentException";
1292 _exceptionMessage = "offset < 0";
1293 goto exit;
1294 }
1295 _remaining = _env->GetArrayLength(param_ref) - offset;
1296 param_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001297 _env->GetIntArrayElements(param_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001298 param = param_base + offset;
1299
1300 glSamplerParameterIuivEXT(
1301 (GLuint)sampler,
1302 (GLenum)pname,
1303 (GLuint *)param
1304 );
1305
1306exit:
1307 if (param_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001308 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001309 JNI_ABORT);
1310 }
1311 if (_exception) {
1312 jniThrowException(_env, _exceptionType, _exceptionMessage);
1313 }
1314}
1315
1316/* void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param ) */
1317static void
1318android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
1319 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001320 jint _exception = 0;
1321 const char * _exceptionType = NULL;
1322 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001323 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001324 jint _bufferOffset = (jint) 0;
1325 jint _remaining;
1326 GLuint *param = (GLuint *) 0;
1327
Romain Guy84cac202016-12-05 12:26:02 -08001328 if (!param_buf) {
1329 _exception = 1;
1330 _exceptionType = "java/lang/IllegalArgumentException";
1331 _exceptionMessage = "param == null";
1332 goto exit;
1333 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001334 param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001335 if (param == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001336 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001337 param = (GLuint *) (_paramBase + _bufferOffset);
1338 }
1339 glSamplerParameterIuivEXT(
1340 (GLuint)sampler,
1341 (GLenum)pname,
1342 (GLuint *)param
1343 );
Romain Guy84cac202016-12-05 12:26:02 -08001344
1345exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001346 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001347 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001348 }
Romain Guy84cac202016-12-05 12:26:02 -08001349 if (_exception) {
1350 jniThrowException(_env, _exceptionType, _exceptionMessage);
1351 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001352}
1353
1354/* void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params ) */
1355static void
1356android_glGetSamplerParameterIivEXT__II_3II
1357 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1358 jint _exception = 0;
1359 const char * _exceptionType = NULL;
1360 const char * _exceptionMessage = NULL;
1361 GLint *params_base = (GLint *) 0;
1362 jint _remaining;
1363 GLint *params = (GLint *) 0;
1364
1365 if (!params_ref) {
1366 _exception = 1;
1367 _exceptionType = "java/lang/IllegalArgumentException";
1368 _exceptionMessage = "params == null";
1369 goto exit;
1370 }
1371 if (offset < 0) {
1372 _exception = 1;
1373 _exceptionType = "java/lang/IllegalArgumentException";
1374 _exceptionMessage = "offset < 0";
1375 goto exit;
1376 }
1377 _remaining = _env->GetArrayLength(params_ref) - offset;
1378 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001379 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001380 params = params_base + offset;
1381
1382 glGetSamplerParameterIivEXT(
1383 (GLuint)sampler,
1384 (GLenum)pname,
1385 (GLint *)params
1386 );
1387
1388exit:
1389 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001390 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001391 _exception ? JNI_ABORT: 0);
1392 }
1393 if (_exception) {
1394 jniThrowException(_env, _exceptionType, _exceptionMessage);
1395 }
1396}
1397
1398/* void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params ) */
1399static void
1400android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
1401 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001402 jint _exception = 0;
1403 const char * _exceptionType = NULL;
1404 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001405 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001406 jint _bufferOffset = (jint) 0;
1407 jint _remaining;
1408 GLint *params = (GLint *) 0;
1409
Romain Guy84cac202016-12-05 12:26:02 -08001410 if (!params_buf) {
1411 _exception = 1;
1412 _exceptionType = "java/lang/IllegalArgumentException";
1413 _exceptionMessage = "params == null";
1414 goto exit;
1415 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001416 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001417 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001418 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001419 params = (GLint *) (_paramsBase + _bufferOffset);
1420 }
1421 glGetSamplerParameterIivEXT(
1422 (GLuint)sampler,
1423 (GLenum)pname,
1424 (GLint *)params
1425 );
Romain Guy84cac202016-12-05 12:26:02 -08001426
1427exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001428 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001429 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1430 }
1431 if (_exception) {
1432 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001433 }
1434}
1435
1436/* void glGetSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, GLuint *params ) */
1437static void
1438android_glGetSamplerParameterIuivEXT__II_3II
1439 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
1440 jint _exception = 0;
1441 const char * _exceptionType = NULL;
1442 const char * _exceptionMessage = NULL;
1443 GLuint *params_base = (GLuint *) 0;
1444 jint _remaining;
1445 GLuint *params = (GLuint *) 0;
1446
1447 if (!params_ref) {
1448 _exception = 1;
1449 _exceptionType = "java/lang/IllegalArgumentException";
1450 _exceptionMessage = "params == null";
1451 goto exit;
1452 }
1453 if (offset < 0) {
1454 _exception = 1;
1455 _exceptionType = "java/lang/IllegalArgumentException";
1456 _exceptionMessage = "offset < 0";
1457 goto exit;
1458 }
1459 _remaining = _env->GetArrayLength(params_ref) - offset;
1460 params_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001461 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001462 params = params_base + offset;
1463
1464 glGetSamplerParameterIuivEXT(
1465 (GLuint)sampler,
1466 (GLenum)pname,
1467 (GLuint *)params
1468 );
1469
1470exit:
1471 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001472 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001473 _exception ? JNI_ABORT: 0);
1474 }
1475 if (_exception) {
1476 jniThrowException(_env, _exceptionType, _exceptionMessage);
1477 }
1478}
1479
1480/* void glGetSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, GLuint *params ) */
1481static void
1482android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
1483 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001484 jint _exception = 0;
1485 const char * _exceptionType = NULL;
1486 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001487 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001488 jint _bufferOffset = (jint) 0;
1489 jint _remaining;
1490 GLuint *params = (GLuint *) 0;
1491
Romain Guy84cac202016-12-05 12:26:02 -08001492 if (!params_buf) {
1493 _exception = 1;
1494 _exceptionType = "java/lang/IllegalArgumentException";
1495 _exceptionMessage = "params == null";
1496 goto exit;
1497 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001498 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001499 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001500 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001501 params = (GLuint *) (_paramsBase + _bufferOffset);
1502 }
1503 glGetSamplerParameterIuivEXT(
1504 (GLuint)sampler,
1505 (GLenum)pname,
1506 (GLuint *)params
1507 );
Romain Guy84cac202016-12-05 12:26:02 -08001508
1509exit:
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001510 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001511 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1512 }
1513 if (_exception) {
1514 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001515 }
1516}
1517
1518/* void glTexBufferEXT ( GLenum target, GLenum internalformat, GLuint buffer ) */
1519static void
1520android_glTexBufferEXT__III
1521 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer) {
1522 glTexBufferEXT(
1523 (GLenum)target,
1524 (GLenum)internalformat,
1525 (GLuint)buffer
1526 );
1527}
1528
1529/* void glTexBufferRangeEXT ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
1530static void
1531android_glTexBufferRangeEXT__IIIII
1532 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer, jint offset, jint size) {
1533 glTexBufferRangeEXT(
1534 (GLenum)target,
1535 (GLenum)internalformat,
1536 (GLuint)buffer,
1537 (GLintptr)offset,
1538 (GLsizeiptr)size
1539 );
1540}
1541
1542static const char *classPathName = "android/opengl/GLES31Ext";
1543
Daniel Micay76f6a862015-09-19 17:31:01 -04001544static const JNINativeMethod methods[] = {
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001545{"_nativeClassInit", "()V", (void*)nativeClassInit },
1546{"glBlendBarrierKHR", "()V", (void *) android_glBlendBarrierKHR__ },
1547{"glDebugMessageControlKHR", "(IIII[IIZ)V", (void *) android_glDebugMessageControlKHR__IIII_3IIZ },
1548{"glDebugMessageControlKHR", "(IIIILjava/nio/IntBuffer;Z)V", (void *) android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z },
1549{"glDebugMessageInsertKHR", "(IIIILjava/lang/String;)V", (void *) android_glDebugMessageInsertKHR__IIIILjava_lang_String_2 },
1550{"glDebugMessageCallbackKHR", "(Landroid/opengl/GLES31Ext$DebugProcKHR;)V", (void *) android_glDebugMessageCallbackKHR },
1551{"glGetDebugMessageLogKHR", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI },
1552{"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 },
1553{"glGetDebugMessageLogKHR", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II },
1554{"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 },
1555{"glPushDebugGroupKHR", "(IIILjava/lang/String;)V", (void *) android_glPushDebugGroupKHR__IIILjava_lang_String_2 },
1556{"glPopDebugGroupKHR", "()V", (void *) android_glPopDebugGroupKHR__ },
1557{"glObjectLabelKHR", "(IIILjava/lang/String;)V", (void *) android_glObjectLabelKHR__IIILjava_lang_String_2 },
1558{"glGetObjectLabelKHR", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabelKHR },
1559{"glObjectPtrLabelKHR", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabelKHR },
1560{"glGetObjectPtrLabelKHR", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabelKHR },
1561{"glGetDebugMessageCallbackKHR", "()Landroid/opengl/GLES31Ext$DebugProcKHR;", (void *) android_glGetDebugMessageCallbackKHR },
1562{"glMinSampleShadingOES", "(F)V", (void *) android_glMinSampleShadingOES__F },
1563{"glTexStorage3DMultisampleOES", "(IIIIIIZ)V", (void *) android_glTexStorage3DMultisampleOES__IIIIIIZ },
1564{"glCopyImageSubDataEXT", "(IIIIIIIIIIIIIII)V", (void *) android_glCopyImageSubDataEXT__IIIIIIIIIIIIIII },
1565{"glEnableiEXT", "(II)V", (void *) android_glEnableiEXT__II },
1566{"glDisableiEXT", "(II)V", (void *) android_glDisableiEXT__II },
1567{"glBlendEquationiEXT", "(II)V", (void *) android_glBlendEquationiEXT__II },
1568{"glBlendEquationSeparateiEXT", "(III)V", (void *) android_glBlendEquationSeparateiEXT__III },
1569{"glBlendFunciEXT", "(III)V", (void *) android_glBlendFunciEXT__III },
1570{"glBlendFuncSeparateiEXT", "(IIIII)V", (void *) android_glBlendFuncSeparateiEXT__IIIII },
1571{"glColorMaskiEXT", "(IZZZZ)V", (void *) android_glColorMaskiEXT__IZZZZ },
1572{"glIsEnablediEXT", "(II)Z", (void *) android_glIsEnablediEXT__II },
1573{"glFramebufferTextureEXT", "(IIII)V", (void *) android_glFramebufferTextureEXT__IIII },
1574{"glPrimitiveBoundingBoxEXT", "(FFFFFFFF)V", (void *) android_glPrimitiveBoundingBoxEXT__FFFFFFFF },
1575{"glPatchParameteriEXT", "(II)V", (void *) android_glPatchParameteriEXT__II },
1576{"glTexParameterIivEXT", "(II[II)V", (void *) android_glTexParameterIivEXT__II_3II },
1577{"glTexParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2 },
1578{"glTexParameterIuivEXT", "(II[II)V", (void *) android_glTexParameterIuivEXT__II_3II },
1579{"glTexParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1580{"glGetTexParameterIivEXT", "(II[II)V", (void *) android_glGetTexParameterIivEXT__II_3II },
1581{"glGetTexParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2 },
1582{"glGetTexParameterIuivEXT", "(II[II)V", (void *) android_glGetTexParameterIuivEXT__II_3II },
1583{"glGetTexParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1584{"glSamplerParameterIivEXT", "(II[II)V", (void *) android_glSamplerParameterIivEXT__II_3II },
1585{"glSamplerParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2 },
1586{"glSamplerParameterIuivEXT", "(II[II)V", (void *) android_glSamplerParameterIuivEXT__II_3II },
1587{"glSamplerParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1588{"glGetSamplerParameterIivEXT", "(II[II)V", (void *) android_glGetSamplerParameterIivEXT__II_3II },
1589{"glGetSamplerParameterIivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2 },
1590{"glGetSamplerParameterIuivEXT", "(II[II)V", (void *) android_glGetSamplerParameterIuivEXT__II_3II },
1591{"glGetSamplerParameterIuivEXT", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2 },
1592{"glTexBufferEXT", "(III)V", (void *) android_glTexBufferEXT__III },
1593{"glTexBufferRangeEXT", "(IIIII)V", (void *) android_glTexBufferRangeEXT__IIIII },
1594};
1595
1596int register_android_opengl_jni_GLES31Ext(JNIEnv *_env)
1597{
1598 int err;
1599 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
1600 return err;
1601}