blob: 3c50aa0ee814c2f53c03db26ad8cf58107294a33 [file] [log] [blame]
Jesse Halld830e742013-03-29 11:02:35 -07001/*
2**
3** Copyright 2013, The Android Open Source Project
4**
5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at
8**
9** http://www.apache.org/licenses/LICENSE-2.0
10**
11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and
15** limitations under the License.
16*/
17
18// This source file is automatically generated
19
20#include <GLES3/gl3.h>
21#include <GLES3/gl3ext.h>
22
23#include "jni.h"
24#include "JNIHelp.h"
25#include <android_runtime/AndroidRuntime.h>
26#include <utils/misc.h>
27#include <assert.h>
28
29static int initialized = 0;
30
31static jclass nioAccessClass;
32static jclass bufferClass;
33static jmethodID getBasePointerID;
34static jmethodID getBaseArrayID;
35static jmethodID getBaseArrayOffsetID;
36static jfieldID positionID;
37static jfieldID limitID;
38static jfieldID elementSizeShiftID;
39
40
41/* special calls implemented in Android's GLES wrapper used to more
42 * efficiently bound-check passed arrays */
43extern "C" {
44#ifdef GL_VERSION_ES_CM_1_1
45GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
46 const GLvoid *ptr, GLsizei count);
47GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
48 const GLvoid *pointer, GLsizei count);
49GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
50 GLsizei stride, const GLvoid *pointer, GLsizei count);
51GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59#endif
60#ifdef GL_ES_VERSION_2_0
61static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
62 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
63 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
64}
65#endif
66#ifdef GL_ES_VERSION_3_0
67static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
68 GLsizei stride, const GLvoid *pointer, GLsizei count) {
69 glVertexAttribIPointer(indx, size, type, stride, pointer);
70}
71#endif
72}
73
74/* Cache method IDs each time the class is loaded. */
75
76static void
77nativeClassInit(JNIEnv *_env, jclass glImplClass)
78{
79 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
80 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
81
82 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
83 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
84
85 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
86 "getBasePointer", "(Ljava/nio/Buffer;)J");
87 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
88 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
89 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
90 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
91
92 positionID = _env->GetFieldID(bufferClass, "position", "I");
93 limitID = _env->GetFieldID(bufferClass, "limit", "I");
94 elementSizeShiftID =
95 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
96}
97
98static void *
99getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
100{
101 jint position;
102 jint limit;
103 jint elementSizeShift;
104 jlong pointer;
105
106 position = _env->GetIntField(buffer, positionID);
107 limit = _env->GetIntField(buffer, limitID);
108 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
109 *remaining = (limit - position) << elementSizeShift;
110 pointer = _env->CallStaticLongMethod(nioAccessClass,
111 getBasePointerID, buffer);
112 if (pointer != 0L) {
113 *array = NULL;
114 return (void *) (jint) pointer;
115 }
116
117 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
118 getBaseArrayID, buffer);
119 *offset = _env->CallStaticIntMethod(nioAccessClass,
120 getBaseArrayOffsetID, buffer);
121
122 return NULL;
123}
124
125static void
126releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
127{
128 _env->ReleasePrimitiveArrayCritical(array, data,
129 commit ? 0 : JNI_ABORT);
130}
131
132static void *
133getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
134 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
135 if (buf) {
136 jint position = _env->GetIntField(buffer, positionID);
137 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
138 buf += position << elementSizeShift;
139 } else {
140 jniThrowException(_env, "java/lang/IllegalArgumentException",
141 "Must use a native order direct Buffer");
142 }
143 return (void*) buf;
144}
145
146// --------------------------------------------------------------------------
147
148/*
149 * returns the number of values glGet returns for a given pname.
150 *
151 * The code below is written such that pnames requiring only one values
152 * are the default (and are not explicitely tested for). This makes the
153 * checking code much shorter/readable/efficient.
154 *
155 * This means that unknown pnames (e.g.: extensions) will default to 1. If
156 * that unknown pname needs more than 1 value, then the validation check
157 * is incomplete and the app may crash if it passed the wrong number params.
158 */
159static int getNeededCount(GLint pname) {
160 int needed = 1;
161#ifdef GL_ES_VERSION_2_0
162 // GLES 2.x pnames
163 switch (pname) {
164 case GL_ALIASED_LINE_WIDTH_RANGE:
165 case GL_ALIASED_POINT_SIZE_RANGE:
166 needed = 2;
167 break;
168
169 case GL_BLEND_COLOR:
170 case GL_COLOR_CLEAR_VALUE:
171 case GL_COLOR_WRITEMASK:
172 case GL_SCISSOR_BOX:
173 case GL_VIEWPORT:
174 needed = 4;
175 break;
176
177 case GL_COMPRESSED_TEXTURE_FORMATS:
178 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
179 break;
180
181 case GL_SHADER_BINARY_FORMATS:
182 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
183 break;
184 }
185#endif
186
187#ifdef GL_VERSION_ES_CM_1_1
188 // GLES 1.x pnames
189 switch (pname) {
190 case GL_ALIASED_LINE_WIDTH_RANGE:
191 case GL_ALIASED_POINT_SIZE_RANGE:
192 case GL_DEPTH_RANGE:
193 case GL_SMOOTH_LINE_WIDTH_RANGE:
194 case GL_SMOOTH_POINT_SIZE_RANGE:
195 needed = 2;
196 break;
197
198 case GL_CURRENT_NORMAL:
199 case GL_POINT_DISTANCE_ATTENUATION:
200 needed = 3;
201 break;
202
203 case GL_COLOR_CLEAR_VALUE:
204 case GL_COLOR_WRITEMASK:
205 case GL_CURRENT_COLOR:
206 case GL_CURRENT_TEXTURE_COORDS:
207 case GL_FOG_COLOR:
208 case GL_LIGHT_MODEL_AMBIENT:
209 case GL_SCISSOR_BOX:
210 case GL_VIEWPORT:
211 needed = 4;
212 break;
213
214 case GL_MODELVIEW_MATRIX:
215 case GL_PROJECTION_MATRIX:
216 case GL_TEXTURE_MATRIX:
217 needed = 16;
218 break;
219
220 case GL_COMPRESSED_TEXTURE_FORMATS:
221 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
222 break;
223 }
224#endif
225 return needed;
226}
227
228template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
229static void
230get
231 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
232 jint _exception = 0;
233 const char * _exceptionType;
234 const char * _exceptionMessage;
235 CTYPE *params_base = (CTYPE *) 0;
236 jint _remaining;
237 CTYPE *params = (CTYPE *) 0;
238 int _needed = 0;
239
240 if (!params_ref) {
241 _exception = 1;
242 _exceptionType = "java/lang/IllegalArgumentException";
243 _exceptionMessage = "params == null";
244 goto exit;
245 }
246 if (offset < 0) {
247 _exception = 1;
248 _exceptionType = "java/lang/IllegalArgumentException";
249 _exceptionMessage = "offset < 0";
250 goto exit;
251 }
252 _remaining = _env->GetArrayLength(params_ref) - offset;
253 _needed = getNeededCount(pname);
254 // if we didn't find this pname, we just assume the user passed
255 // an array of the right size -- this might happen with extensions
256 // or if we forget an enum here.
257 if (_remaining < _needed) {
258 _exception = 1;
259 _exceptionType = "java/lang/IllegalArgumentException";
260 _exceptionMessage = "length - offset < needed";
261 goto exit;
262 }
263 params_base = (CTYPE *)
264 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
265 params = params_base + offset;
266
267 GET(
268 (GLenum)pname,
269 (CTYPE *)params
270 );
271
272exit:
273 if (params_base) {
274 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
275 _exception ? JNI_ABORT: 0);
276 }
277 if (_exception) {
278 jniThrowException(_env, _exceptionType, _exceptionMessage);
279 }
280}
281
282
283template <typename CTYPE, void GET(GLenum, CTYPE*)>
284static void
285getarray
286 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
287 jint _exception = 0;
288 const char * _exceptionType;
289 const char * _exceptionMessage;
290 jarray _array = (jarray) 0;
291 jint _bufferOffset = (jint) 0;
292 jint _remaining;
293 CTYPE *params = (CTYPE *) 0;
294 int _needed = 0;
295
296 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
297 _needed = getNeededCount(pname);
298 // if we didn't find this pname, we just assume the user passed
299 // an array of the right size -- this might happen with extensions
300 // or if we forget an enum here.
301 if (_needed>0 && _remaining < _needed) {
302 _exception = 1;
303 _exceptionType = "java/lang/IllegalArgumentException";
304 _exceptionMessage = "remaining() < needed";
305 goto exit;
306 }
307 if (params == NULL) {
308 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
309 params = (CTYPE *) (_paramsBase + _bufferOffset);
310 }
311 GET(
312 (GLenum)pname,
313 (CTYPE *)params
314 );
315
316exit:
317 if (_array) {
318 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
319 }
320 if (_exception) {
321 jniThrowException(_env, _exceptionType, _exceptionMessage);
322 }
323}
324
325// --------------------------------------------------------------------------
326/* void glReadBuffer ( GLenum mode ) */
327static void
328android_glReadBuffer__I
329 (JNIEnv *_env, jobject _this, jint mode) {
330 glReadBuffer(
331 (GLenum)mode
332 );
333}
334
335/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) */
336static void
337android_glDrawRangeElements__IIIIILjava_nio_Buffer_2
338 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf) {
339 jarray _array = (jarray) 0;
340 jint _bufferOffset = (jint) 0;
341 jint _remaining;
342 GLvoid *indices = (GLvoid *) 0;
343
344 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
345 if (indices == NULL) {
346 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
347 indices = (GLvoid *) (_indicesBase + _bufferOffset);
348 }
349 glDrawRangeElements(
350 (GLenum)mode,
351 (GLuint)start,
352 (GLuint)end,
353 (GLsizei)count,
354 (GLenum)type,
355 (GLvoid *)indices
356 );
357 if (_array) {
358 releasePointer(_env, _array, indices, JNI_FALSE);
359 }
360}
361
362/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset ) */
363static void
364android_glDrawRangeElements__IIIIII
365 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jint offset) {
366 glDrawRangeElements(
367 (GLenum)mode,
368 (GLuint)start,
369 (GLuint)end,
370 (GLsizei)count,
371 (GLenum)type,
372 (GLvoid *)offset
373 );
374}
375
376/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
377static void
378android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2
379 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject pixels_buf) {
380 jarray _array = (jarray) 0;
381 jint _bufferOffset = (jint) 0;
382 jint _remaining;
383 GLvoid *pixels = (GLvoid *) 0;
384
385 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
386 if (pixels == NULL) {
387 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
388 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
389 }
390 glTexImage3D(
391 (GLenum)target,
392 (GLint)level,
393 (GLint)internalformat,
394 (GLsizei)width,
395 (GLsizei)height,
396 (GLsizei)depth,
397 (GLint)border,
398 (GLenum)format,
399 (GLenum)type,
400 (GLvoid *)pixels
401 );
402 if (_array) {
403 releasePointer(_env, _array, pixels, JNI_FALSE);
404 }
405}
406
407/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset ) */
408static void
409android_glTexImage3D__IIIIIIIIII
410 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jint offset) {
411 glTexImage3D(
412 (GLenum)target,
413 (GLint)level,
414 (GLint)internalformat,
415 (GLsizei)width,
416 (GLsizei)height,
417 (GLsizei)depth,
418 (GLint)border,
419 (GLenum)format,
420 (GLenum)type,
421 (GLvoid *)offset
422 );
423}
424
425/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels ) */
426static void
427android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
428 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jobject pixels_buf) {
429 jarray _array = (jarray) 0;
430 jint _bufferOffset = (jint) 0;
431 jint _remaining;
432 GLvoid *pixels = (GLvoid *) 0;
433
434 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
435 if (pixels == NULL) {
436 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
437 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
438 }
439 glTexSubImage3D(
440 (GLenum)target,
441 (GLint)level,
442 (GLint)xoffset,
443 (GLint)yoffset,
444 (GLint)zoffset,
445 (GLsizei)width,
446 (GLsizei)height,
447 (GLsizei)depth,
448 (GLenum)format,
449 (GLenum)type,
450 (GLvoid *)pixels
451 );
452 if (_array) {
453 releasePointer(_env, _array, pixels, JNI_FALSE);
454 }
455}
456
457/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset ) */
458static void
459android_glTexSubImage3D__IIIIIIIIIII
460 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jint offset) {
461 glTexSubImage3D(
462 (GLenum)target,
463 (GLint)level,
464 (GLint)xoffset,
465 (GLint)yoffset,
466 (GLint)zoffset,
467 (GLsizei)width,
468 (GLsizei)height,
469 (GLsizei)depth,
470 (GLenum)format,
471 (GLenum)type,
472 (GLvoid *)offset
473 );
474}
475
476/* void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
477static void
478android_glCopyTexSubImage3D__IIIIIIIII
479 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) {
480 glCopyTexSubImage3D(
481 (GLenum)target,
482 (GLint)level,
483 (GLint)xoffset,
484 (GLint)yoffset,
485 (GLint)zoffset,
486 (GLint)x,
487 (GLint)y,
488 (GLsizei)width,
489 (GLsizei)height
490 );
491}
492
493/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ) */
494static void
495android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2
496 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jobject data_buf) {
497 jarray _array = (jarray) 0;
498 jint _bufferOffset = (jint) 0;
499 jint _remaining;
500 GLvoid *data = (GLvoid *) 0;
501
502 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
503 if (data == NULL) {
504 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
505 data = (GLvoid *) (_dataBase + _bufferOffset);
506 }
507 glCompressedTexImage3D(
508 (GLenum)target,
509 (GLint)level,
510 (GLenum)internalformat,
511 (GLsizei)width,
512 (GLsizei)height,
513 (GLsizei)depth,
514 (GLint)border,
515 (GLsizei)imageSize,
516 (GLvoid *)data
517 );
518 if (_array) {
519 releasePointer(_env, _array, data, JNI_FALSE);
520 }
521}
522
523/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset ) */
524static void
525android_glCompressedTexImage3D__IIIIIIIII
526 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint offset) {
527 glCompressedTexImage3D(
528 (GLenum)target,
529 (GLint)level,
530 (GLenum)internalformat,
531 (GLsizei)width,
532 (GLsizei)height,
533 (GLsizei)depth,
534 (GLint)border,
535 (GLsizei)imageSize,
536 (GLvoid *)offset
537 );
538}
539
540/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ) */
541static void
542android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
543 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jobject data_buf) {
544 jarray _array = (jarray) 0;
545 jint _bufferOffset = (jint) 0;
546 jint _remaining;
547 GLvoid *data = (GLvoid *) 0;
548
549 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
550 if (data == NULL) {
551 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
552 data = (GLvoid *) (_dataBase + _bufferOffset);
553 }
554 glCompressedTexSubImage3D(
555 (GLenum)target,
556 (GLint)level,
557 (GLint)xoffset,
558 (GLint)yoffset,
559 (GLint)zoffset,
560 (GLsizei)width,
561 (GLsizei)height,
562 (GLsizei)depth,
563 (GLenum)format,
564 (GLsizei)imageSize,
565 (GLvoid *)data
566 );
567 if (_array) {
568 releasePointer(_env, _array, data, JNI_FALSE);
569 }
570}
571
572/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset ) */
573static void
574android_glCompressedTexSubImage3D__IIIIIIIIIII
575 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jint offset) {
576 glCompressedTexSubImage3D(
577 (GLenum)target,
578 (GLint)level,
579 (GLint)xoffset,
580 (GLint)yoffset,
581 (GLint)zoffset,
582 (GLsizei)width,
583 (GLsizei)height,
584 (GLsizei)depth,
585 (GLenum)format,
586 (GLsizei)imageSize,
587 (GLvoid *)offset
588 );
589}
590
591/* void glGenQueries ( GLsizei n, GLuint *ids ) */
592static void
593android_glGenQueries__I_3II
594 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
595 jint _exception = 0;
596 const char * _exceptionType = NULL;
597 const char * _exceptionMessage = NULL;
598 GLuint *ids_base = (GLuint *) 0;
599 jint _remaining;
600 GLuint *ids = (GLuint *) 0;
601
602 if (!ids_ref) {
603 _exception = 1;
604 _exceptionType = "java/lang/IllegalArgumentException";
605 _exceptionMessage = "ids == null";
606 goto exit;
607 }
608 if (offset < 0) {
609 _exception = 1;
610 _exceptionType = "java/lang/IllegalArgumentException";
611 _exceptionMessage = "offset < 0";
612 goto exit;
613 }
614 _remaining = _env->GetArrayLength(ids_ref) - offset;
615 ids_base = (GLuint *)
616 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
617 ids = ids_base + offset;
618
619 glGenQueries(
620 (GLsizei)n,
621 (GLuint *)ids
622 );
623
624exit:
625 if (ids_base) {
626 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
627 _exception ? JNI_ABORT: 0);
628 }
629 if (_exception) {
630 jniThrowException(_env, _exceptionType, _exceptionMessage);
631 }
632}
633
634/* void glGenQueries ( GLsizei n, GLuint *ids ) */
635static void
636android_glGenQueries__ILjava_nio_IntBuffer_2
637 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
638 jarray _array = (jarray) 0;
639 jint _bufferOffset = (jint) 0;
640 jint _remaining;
641 GLuint *ids = (GLuint *) 0;
642
643 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
644 if (ids == NULL) {
645 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
646 ids = (GLuint *) (_idsBase + _bufferOffset);
647 }
648 glGenQueries(
649 (GLsizei)n,
650 (GLuint *)ids
651 );
652 if (_array) {
653 releasePointer(_env, _array, ids, JNI_TRUE);
654 }
655}
656
657/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
658static void
659android_glDeleteQueries__I_3II
660 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
661 jint _exception = 0;
662 const char * _exceptionType = NULL;
663 const char * _exceptionMessage = NULL;
664 GLuint *ids_base = (GLuint *) 0;
665 jint _remaining;
666 GLuint *ids = (GLuint *) 0;
667
668 if (!ids_ref) {
669 _exception = 1;
670 _exceptionType = "java/lang/IllegalArgumentException";
671 _exceptionMessage = "ids == null";
672 goto exit;
673 }
674 if (offset < 0) {
675 _exception = 1;
676 _exceptionType = "java/lang/IllegalArgumentException";
677 _exceptionMessage = "offset < 0";
678 goto exit;
679 }
680 _remaining = _env->GetArrayLength(ids_ref) - offset;
681 ids_base = (GLuint *)
682 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
683 ids = ids_base + offset;
684
685 glDeleteQueries(
686 (GLsizei)n,
687 (GLuint *)ids
688 );
689
690exit:
691 if (ids_base) {
692 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
693 JNI_ABORT);
694 }
695 if (_exception) {
696 jniThrowException(_env, _exceptionType, _exceptionMessage);
697 }
698}
699
700/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
701static void
702android_glDeleteQueries__ILjava_nio_IntBuffer_2
703 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
704 jarray _array = (jarray) 0;
705 jint _bufferOffset = (jint) 0;
706 jint _remaining;
707 GLuint *ids = (GLuint *) 0;
708
709 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
710 if (ids == NULL) {
711 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
712 ids = (GLuint *) (_idsBase + _bufferOffset);
713 }
714 glDeleteQueries(
715 (GLsizei)n,
716 (GLuint *)ids
717 );
718 if (_array) {
719 releasePointer(_env, _array, ids, JNI_FALSE);
720 }
721}
722
723/* GLboolean glIsQuery ( GLuint id ) */
724static jboolean
725android_glIsQuery__I
726 (JNIEnv *_env, jobject _this, jint id) {
727 GLboolean _returnValue;
728 _returnValue = glIsQuery(
729 (GLuint)id
730 );
731 return (jboolean)_returnValue;
732}
733
734/* void glBeginQuery ( GLenum target, GLuint id ) */
735static void
736android_glBeginQuery__II
737 (JNIEnv *_env, jobject _this, jint target, jint id) {
738 glBeginQuery(
739 (GLenum)target,
740 (GLuint)id
741 );
742}
743
744/* void glEndQuery ( GLenum target ) */
745static void
746android_glEndQuery__I
747 (JNIEnv *_env, jobject _this, jint target) {
748 glEndQuery(
749 (GLenum)target
750 );
751}
752
753/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
754static void
755android_glGetQueryiv__II_3II
756 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
757 jint _exception = 0;
758 const char * _exceptionType = NULL;
759 const char * _exceptionMessage = NULL;
760 GLint *params_base = (GLint *) 0;
761 jint _remaining;
762 GLint *params = (GLint *) 0;
763
764 if (!params_ref) {
765 _exception = 1;
766 _exceptionType = "java/lang/IllegalArgumentException";
767 _exceptionMessage = "params == null";
768 goto exit;
769 }
770 if (offset < 0) {
771 _exception = 1;
772 _exceptionType = "java/lang/IllegalArgumentException";
773 _exceptionMessage = "offset < 0";
774 goto exit;
775 }
776 _remaining = _env->GetArrayLength(params_ref) - offset;
777 params_base = (GLint *)
778 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
779 params = params_base + offset;
780
781 glGetQueryiv(
782 (GLenum)target,
783 (GLenum)pname,
784 (GLint *)params
785 );
786
787exit:
788 if (params_base) {
789 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
790 _exception ? JNI_ABORT: 0);
791 }
792 if (_exception) {
793 jniThrowException(_env, _exceptionType, _exceptionMessage);
794 }
795}
796
797/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
798static void
799android_glGetQueryiv__IILjava_nio_IntBuffer_2
800 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
801 jarray _array = (jarray) 0;
802 jint _bufferOffset = (jint) 0;
803 jint _remaining;
804 GLint *params = (GLint *) 0;
805
806 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
807 if (params == NULL) {
808 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
809 params = (GLint *) (_paramsBase + _bufferOffset);
810 }
811 glGetQueryiv(
812 (GLenum)target,
813 (GLenum)pname,
814 (GLint *)params
815 );
816 if (_array) {
817 releasePointer(_env, _array, params, JNI_TRUE);
818 }
819}
820
821/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
822static void
823android_glGetQueryObjectuiv__II_3II
824 (JNIEnv *_env, jobject _this, jint id, jint pname, jintArray params_ref, jint offset) {
825 jint _exception = 0;
826 const char * _exceptionType = NULL;
827 const char * _exceptionMessage = NULL;
828 GLuint *params_base = (GLuint *) 0;
829 jint _remaining;
830 GLuint *params = (GLuint *) 0;
831
832 if (!params_ref) {
833 _exception = 1;
834 _exceptionType = "java/lang/IllegalArgumentException";
835 _exceptionMessage = "params == null";
836 goto exit;
837 }
838 if (offset < 0) {
839 _exception = 1;
840 _exceptionType = "java/lang/IllegalArgumentException";
841 _exceptionMessage = "offset < 0";
842 goto exit;
843 }
844 _remaining = _env->GetArrayLength(params_ref) - offset;
845 params_base = (GLuint *)
846 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
847 params = params_base + offset;
848
849 glGetQueryObjectuiv(
850 (GLuint)id,
851 (GLenum)pname,
852 (GLuint *)params
853 );
854
855exit:
856 if (params_base) {
857 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
858 _exception ? JNI_ABORT: 0);
859 }
860 if (_exception) {
861 jniThrowException(_env, _exceptionType, _exceptionMessage);
862 }
863}
864
865/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
866static void
867android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2
868 (JNIEnv *_env, jobject _this, jint id, jint pname, jobject params_buf) {
869 jarray _array = (jarray) 0;
870 jint _bufferOffset = (jint) 0;
871 jint _remaining;
872 GLuint *params = (GLuint *) 0;
873
874 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
875 if (params == NULL) {
876 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
877 params = (GLuint *) (_paramsBase + _bufferOffset);
878 }
879 glGetQueryObjectuiv(
880 (GLuint)id,
881 (GLenum)pname,
882 (GLuint *)params
883 );
884 if (_array) {
885 releasePointer(_env, _array, params, JNI_TRUE);
886 }
887}
888
889/* GLboolean glUnmapBuffer ( GLenum target ) */
890static jboolean
891android_glUnmapBuffer__I
892 (JNIEnv *_env, jobject _this, jint target) {
893 GLboolean _returnValue;
894 _returnValue = glUnmapBuffer(
895 (GLenum)target
896 );
897 return (jboolean)_returnValue;
898}
899
900/* void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) */
901static jobject
902android_glGetBufferPointerv__II
903 (JNIEnv *_env, jobject _this, jint target, jint pname) {
904 GLint64 _mapLength;
905 GLvoid* _p;
906 glGetBufferParameteri64v((GLenum)target, GL_BUFFER_MAP_LENGTH, &_mapLength);
907 glGetBufferPointerv((GLenum)target, (GLenum)pname, &_p);
908 return _env->NewDirectByteBuffer(_p, _mapLength);
909}
910
911/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
912static void
913android_glDrawBuffers__I_3II
914 (JNIEnv *_env, jobject _this, jint n, jintArray bufs_ref, jint offset) {
915 jint _exception = 0;
916 const char * _exceptionType = NULL;
917 const char * _exceptionMessage = NULL;
918 GLenum *bufs_base = (GLenum *) 0;
919 jint _remaining;
920 GLenum *bufs = (GLenum *) 0;
921
922 if (!bufs_ref) {
923 _exception = 1;
924 _exceptionType = "java/lang/IllegalArgumentException";
925 _exceptionMessage = "bufs == null";
926 goto exit;
927 }
928 if (offset < 0) {
929 _exception = 1;
930 _exceptionType = "java/lang/IllegalArgumentException";
931 _exceptionMessage = "offset < 0";
932 goto exit;
933 }
934 _remaining = _env->GetArrayLength(bufs_ref) - offset;
935 bufs_base = (GLenum *)
936 _env->GetPrimitiveArrayCritical(bufs_ref, (jboolean *)0);
937 bufs = bufs_base + offset;
938
939 glDrawBuffers(
940 (GLsizei)n,
941 (GLenum *)bufs
942 );
943
944exit:
945 if (bufs_base) {
946 _env->ReleasePrimitiveArrayCritical(bufs_ref, bufs_base,
947 JNI_ABORT);
948 }
949 if (_exception) {
950 jniThrowException(_env, _exceptionType, _exceptionMessage);
951 }
952}
953
954/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
955static void
956android_glDrawBuffers__ILjava_nio_IntBuffer_2
957 (JNIEnv *_env, jobject _this, jint n, jobject bufs_buf) {
958 jarray _array = (jarray) 0;
959 jint _bufferOffset = (jint) 0;
960 jint _remaining;
961 GLenum *bufs = (GLenum *) 0;
962
963 bufs = (GLenum *)getPointer(_env, bufs_buf, &_array, &_remaining, &_bufferOffset);
964 if (bufs == NULL) {
965 char * _bufsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
966 bufs = (GLenum *) (_bufsBase + _bufferOffset);
967 }
968 glDrawBuffers(
969 (GLsizei)n,
970 (GLenum *)bufs
971 );
972 if (_array) {
973 releasePointer(_env, _array, bufs, JNI_FALSE);
974 }
975}
976
977/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
978static void
979android_glUniformMatrix2x3fv__IIZ_3FI
980 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
981 jint _exception = 0;
982 const char * _exceptionType = NULL;
983 const char * _exceptionMessage = NULL;
984 GLfloat *value_base = (GLfloat *) 0;
985 jint _remaining;
986 GLfloat *value = (GLfloat *) 0;
987
988 if (!value_ref) {
989 _exception = 1;
990 _exceptionType = "java/lang/IllegalArgumentException";
991 _exceptionMessage = "value == null";
992 goto exit;
993 }
994 if (offset < 0) {
995 _exception = 1;
996 _exceptionType = "java/lang/IllegalArgumentException";
997 _exceptionMessage = "offset < 0";
998 goto exit;
999 }
1000 _remaining = _env->GetArrayLength(value_ref) - offset;
1001 value_base = (GLfloat *)
1002 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1003 value = value_base + offset;
1004
1005 glUniformMatrix2x3fv(
1006 (GLint)location,
1007 (GLsizei)count,
1008 (GLboolean)transpose,
1009 (GLfloat *)value
1010 );
1011
1012exit:
1013 if (value_base) {
1014 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1015 JNI_ABORT);
1016 }
1017 if (_exception) {
1018 jniThrowException(_env, _exceptionType, _exceptionMessage);
1019 }
1020}
1021
1022/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1023static void
1024android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2
1025 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1026 jarray _array = (jarray) 0;
1027 jint _bufferOffset = (jint) 0;
1028 jint _remaining;
1029 GLfloat *value = (GLfloat *) 0;
1030
1031 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1032 if (value == NULL) {
1033 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1034 value = (GLfloat *) (_valueBase + _bufferOffset);
1035 }
1036 glUniformMatrix2x3fv(
1037 (GLint)location,
1038 (GLsizei)count,
1039 (GLboolean)transpose,
1040 (GLfloat *)value
1041 );
1042 if (_array) {
1043 releasePointer(_env, _array, value, JNI_FALSE);
1044 }
1045}
1046
1047/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1048static void
1049android_glUniformMatrix3x2fv__IIZ_3FI
1050 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1051 jint _exception = 0;
1052 const char * _exceptionType = NULL;
1053 const char * _exceptionMessage = NULL;
1054 GLfloat *value_base = (GLfloat *) 0;
1055 jint _remaining;
1056 GLfloat *value = (GLfloat *) 0;
1057
1058 if (!value_ref) {
1059 _exception = 1;
1060 _exceptionType = "java/lang/IllegalArgumentException";
1061 _exceptionMessage = "value == null";
1062 goto exit;
1063 }
1064 if (offset < 0) {
1065 _exception = 1;
1066 _exceptionType = "java/lang/IllegalArgumentException";
1067 _exceptionMessage = "offset < 0";
1068 goto exit;
1069 }
1070 _remaining = _env->GetArrayLength(value_ref) - offset;
1071 value_base = (GLfloat *)
1072 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1073 value = value_base + offset;
1074
1075 glUniformMatrix3x2fv(
1076 (GLint)location,
1077 (GLsizei)count,
1078 (GLboolean)transpose,
1079 (GLfloat *)value
1080 );
1081
1082exit:
1083 if (value_base) {
1084 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1085 JNI_ABORT);
1086 }
1087 if (_exception) {
1088 jniThrowException(_env, _exceptionType, _exceptionMessage);
1089 }
1090}
1091
1092/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1093static void
1094android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2
1095 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1096 jarray _array = (jarray) 0;
1097 jint _bufferOffset = (jint) 0;
1098 jint _remaining;
1099 GLfloat *value = (GLfloat *) 0;
1100
1101 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1102 if (value == NULL) {
1103 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1104 value = (GLfloat *) (_valueBase + _bufferOffset);
1105 }
1106 glUniformMatrix3x2fv(
1107 (GLint)location,
1108 (GLsizei)count,
1109 (GLboolean)transpose,
1110 (GLfloat *)value
1111 );
1112 if (_array) {
1113 releasePointer(_env, _array, value, JNI_FALSE);
1114 }
1115}
1116
1117/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1118static void
1119android_glUniformMatrix2x4fv__IIZ_3FI
1120 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1121 jint _exception = 0;
1122 const char * _exceptionType = NULL;
1123 const char * _exceptionMessage = NULL;
1124 GLfloat *value_base = (GLfloat *) 0;
1125 jint _remaining;
1126 GLfloat *value = (GLfloat *) 0;
1127
1128 if (!value_ref) {
1129 _exception = 1;
1130 _exceptionType = "java/lang/IllegalArgumentException";
1131 _exceptionMessage = "value == null";
1132 goto exit;
1133 }
1134 if (offset < 0) {
1135 _exception = 1;
1136 _exceptionType = "java/lang/IllegalArgumentException";
1137 _exceptionMessage = "offset < 0";
1138 goto exit;
1139 }
1140 _remaining = _env->GetArrayLength(value_ref) - offset;
1141 value_base = (GLfloat *)
1142 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1143 value = value_base + offset;
1144
1145 glUniformMatrix2x4fv(
1146 (GLint)location,
1147 (GLsizei)count,
1148 (GLboolean)transpose,
1149 (GLfloat *)value
1150 );
1151
1152exit:
1153 if (value_base) {
1154 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1155 JNI_ABORT);
1156 }
1157 if (_exception) {
1158 jniThrowException(_env, _exceptionType, _exceptionMessage);
1159 }
1160}
1161
1162/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1163static void
1164android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2
1165 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1166 jarray _array = (jarray) 0;
1167 jint _bufferOffset = (jint) 0;
1168 jint _remaining;
1169 GLfloat *value = (GLfloat *) 0;
1170
1171 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1172 if (value == NULL) {
1173 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1174 value = (GLfloat *) (_valueBase + _bufferOffset);
1175 }
1176 glUniformMatrix2x4fv(
1177 (GLint)location,
1178 (GLsizei)count,
1179 (GLboolean)transpose,
1180 (GLfloat *)value
1181 );
1182 if (_array) {
1183 releasePointer(_env, _array, value, JNI_FALSE);
1184 }
1185}
1186
1187/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1188static void
1189android_glUniformMatrix4x2fv__IIZ_3FI
1190 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1191 jint _exception = 0;
1192 const char * _exceptionType = NULL;
1193 const char * _exceptionMessage = NULL;
1194 GLfloat *value_base = (GLfloat *) 0;
1195 jint _remaining;
1196 GLfloat *value = (GLfloat *) 0;
1197
1198 if (!value_ref) {
1199 _exception = 1;
1200 _exceptionType = "java/lang/IllegalArgumentException";
1201 _exceptionMessage = "value == null";
1202 goto exit;
1203 }
1204 if (offset < 0) {
1205 _exception = 1;
1206 _exceptionType = "java/lang/IllegalArgumentException";
1207 _exceptionMessage = "offset < 0";
1208 goto exit;
1209 }
1210 _remaining = _env->GetArrayLength(value_ref) - offset;
1211 value_base = (GLfloat *)
1212 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1213 value = value_base + offset;
1214
1215 glUniformMatrix4x2fv(
1216 (GLint)location,
1217 (GLsizei)count,
1218 (GLboolean)transpose,
1219 (GLfloat *)value
1220 );
1221
1222exit:
1223 if (value_base) {
1224 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1225 JNI_ABORT);
1226 }
1227 if (_exception) {
1228 jniThrowException(_env, _exceptionType, _exceptionMessage);
1229 }
1230}
1231
1232/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1233static void
1234android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2
1235 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1236 jarray _array = (jarray) 0;
1237 jint _bufferOffset = (jint) 0;
1238 jint _remaining;
1239 GLfloat *value = (GLfloat *) 0;
1240
1241 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1242 if (value == NULL) {
1243 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1244 value = (GLfloat *) (_valueBase + _bufferOffset);
1245 }
1246 glUniformMatrix4x2fv(
1247 (GLint)location,
1248 (GLsizei)count,
1249 (GLboolean)transpose,
1250 (GLfloat *)value
1251 );
1252 if (_array) {
1253 releasePointer(_env, _array, value, JNI_FALSE);
1254 }
1255}
1256
1257/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1258static void
1259android_glUniformMatrix3x4fv__IIZ_3FI
1260 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1261 jint _exception = 0;
1262 const char * _exceptionType = NULL;
1263 const char * _exceptionMessage = NULL;
1264 GLfloat *value_base = (GLfloat *) 0;
1265 jint _remaining;
1266 GLfloat *value = (GLfloat *) 0;
1267
1268 if (!value_ref) {
1269 _exception = 1;
1270 _exceptionType = "java/lang/IllegalArgumentException";
1271 _exceptionMessage = "value == null";
1272 goto exit;
1273 }
1274 if (offset < 0) {
1275 _exception = 1;
1276 _exceptionType = "java/lang/IllegalArgumentException";
1277 _exceptionMessage = "offset < 0";
1278 goto exit;
1279 }
1280 _remaining = _env->GetArrayLength(value_ref) - offset;
1281 value_base = (GLfloat *)
1282 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1283 value = value_base + offset;
1284
1285 glUniformMatrix3x4fv(
1286 (GLint)location,
1287 (GLsizei)count,
1288 (GLboolean)transpose,
1289 (GLfloat *)value
1290 );
1291
1292exit:
1293 if (value_base) {
1294 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1295 JNI_ABORT);
1296 }
1297 if (_exception) {
1298 jniThrowException(_env, _exceptionType, _exceptionMessage);
1299 }
1300}
1301
1302/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1303static void
1304android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2
1305 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1306 jarray _array = (jarray) 0;
1307 jint _bufferOffset = (jint) 0;
1308 jint _remaining;
1309 GLfloat *value = (GLfloat *) 0;
1310
1311 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1312 if (value == NULL) {
1313 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1314 value = (GLfloat *) (_valueBase + _bufferOffset);
1315 }
1316 glUniformMatrix3x4fv(
1317 (GLint)location,
1318 (GLsizei)count,
1319 (GLboolean)transpose,
1320 (GLfloat *)value
1321 );
1322 if (_array) {
1323 releasePointer(_env, _array, value, JNI_FALSE);
1324 }
1325}
1326
1327/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1328static void
1329android_glUniformMatrix4x3fv__IIZ_3FI
1330 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
1331 jint _exception = 0;
1332 const char * _exceptionType = NULL;
1333 const char * _exceptionMessage = NULL;
1334 GLfloat *value_base = (GLfloat *) 0;
1335 jint _remaining;
1336 GLfloat *value = (GLfloat *) 0;
1337
1338 if (!value_ref) {
1339 _exception = 1;
1340 _exceptionType = "java/lang/IllegalArgumentException";
1341 _exceptionMessage = "value == null";
1342 goto exit;
1343 }
1344 if (offset < 0) {
1345 _exception = 1;
1346 _exceptionType = "java/lang/IllegalArgumentException";
1347 _exceptionMessage = "offset < 0";
1348 goto exit;
1349 }
1350 _remaining = _env->GetArrayLength(value_ref) - offset;
1351 value_base = (GLfloat *)
1352 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
1353 value = value_base + offset;
1354
1355 glUniformMatrix4x3fv(
1356 (GLint)location,
1357 (GLsizei)count,
1358 (GLboolean)transpose,
1359 (GLfloat *)value
1360 );
1361
1362exit:
1363 if (value_base) {
1364 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
1365 JNI_ABORT);
1366 }
1367 if (_exception) {
1368 jniThrowException(_env, _exceptionType, _exceptionMessage);
1369 }
1370}
1371
1372/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
1373static void
1374android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2
1375 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
1376 jarray _array = (jarray) 0;
1377 jint _bufferOffset = (jint) 0;
1378 jint _remaining;
1379 GLfloat *value = (GLfloat *) 0;
1380
1381 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
1382 if (value == NULL) {
1383 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1384 value = (GLfloat *) (_valueBase + _bufferOffset);
1385 }
1386 glUniformMatrix4x3fv(
1387 (GLint)location,
1388 (GLsizei)count,
1389 (GLboolean)transpose,
1390 (GLfloat *)value
1391 );
1392 if (_array) {
1393 releasePointer(_env, _array, value, JNI_FALSE);
1394 }
1395}
1396
1397/* void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) */
1398static void
1399android_glBlitFramebuffer__IIIIIIIIII
1400 (JNIEnv *_env, jobject _this, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) {
1401 glBlitFramebuffer(
1402 (GLint)srcX0,
1403 (GLint)srcY0,
1404 (GLint)srcX1,
1405 (GLint)srcY1,
1406 (GLint)dstX0,
1407 (GLint)dstY0,
1408 (GLint)dstX1,
1409 (GLint)dstY1,
1410 (GLbitfield)mask,
1411 (GLenum)filter
1412 );
1413}
1414
1415/* void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) */
1416static void
1417android_glRenderbufferStorageMultisample__IIIII
1418 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height) {
1419 glRenderbufferStorageMultisample(
1420 (GLenum)target,
1421 (GLsizei)samples,
1422 (GLenum)internalformat,
1423 (GLsizei)width,
1424 (GLsizei)height
1425 );
1426}
1427
1428/* void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) */
1429static void
1430android_glFramebufferTextureLayer__IIIII
1431 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level, jint layer) {
1432 glFramebufferTextureLayer(
1433 (GLenum)target,
1434 (GLenum)attachment,
1435 (GLuint)texture,
1436 (GLint)level,
1437 (GLint)layer
1438 );
1439}
1440
1441/* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */
1442static jobject
1443android_glMapBufferRange__IIII
1444 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) {
1445 GLvoid* _p = glMapBufferRange((GLenum)target,
1446 (GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access);
1447 jobject _buf = (jobject)0;
1448 if (_p) {
1449 _buf = _env->NewDirectByteBuffer(_p, length);
1450 }
1451 return _buf;
1452}
1453
1454/* void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length ) */
1455static void
1456android_glFlushMappedBufferRange__III
1457 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length) {
1458 glFlushMappedBufferRange(
1459 (GLenum)target,
1460 (GLintptr)offset,
1461 (GLsizeiptr)length
1462 );
1463}
1464
1465/* void glBindVertexArray ( GLuint array ) */
1466static void
1467android_glBindVertexArray__I
1468 (JNIEnv *_env, jobject _this, jint array) {
1469 glBindVertexArray(
1470 (GLuint)array
1471 );
1472}
1473
1474/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
1475static void
1476android_glDeleteVertexArrays__I_3II
1477 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
1478 jint _exception = 0;
1479 const char * _exceptionType = NULL;
1480 const char * _exceptionMessage = NULL;
1481 GLuint *arrays_base = (GLuint *) 0;
1482 jint _remaining;
1483 GLuint *arrays = (GLuint *) 0;
1484
1485 if (!arrays_ref) {
1486 _exception = 1;
1487 _exceptionType = "java/lang/IllegalArgumentException";
1488 _exceptionMessage = "arrays == null";
1489 goto exit;
1490 }
1491 if (offset < 0) {
1492 _exception = 1;
1493 _exceptionType = "java/lang/IllegalArgumentException";
1494 _exceptionMessage = "offset < 0";
1495 goto exit;
1496 }
1497 _remaining = _env->GetArrayLength(arrays_ref) - offset;
1498 arrays_base = (GLuint *)
1499 _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
1500 arrays = arrays_base + offset;
1501
1502 glDeleteVertexArrays(
1503 (GLsizei)n,
1504 (GLuint *)arrays
1505 );
1506
1507exit:
1508 if (arrays_base) {
1509 _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
1510 JNI_ABORT);
1511 }
1512 if (_exception) {
1513 jniThrowException(_env, _exceptionType, _exceptionMessage);
1514 }
1515}
1516
1517/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
1518static void
1519android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2
1520 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
1521 jarray _array = (jarray) 0;
1522 jint _bufferOffset = (jint) 0;
1523 jint _remaining;
1524 GLuint *arrays = (GLuint *) 0;
1525
1526 arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
1527 if (arrays == NULL) {
1528 char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1529 arrays = (GLuint *) (_arraysBase + _bufferOffset);
1530 }
1531 glDeleteVertexArrays(
1532 (GLsizei)n,
1533 (GLuint *)arrays
1534 );
1535 if (_array) {
1536 releasePointer(_env, _array, arrays, JNI_FALSE);
1537 }
1538}
1539
1540/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
1541static void
1542android_glGenVertexArrays__I_3II
1543 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
1544 jint _exception = 0;
1545 const char * _exceptionType = NULL;
1546 const char * _exceptionMessage = NULL;
1547 GLuint *arrays_base = (GLuint *) 0;
1548 jint _remaining;
1549 GLuint *arrays = (GLuint *) 0;
1550
1551 if (!arrays_ref) {
1552 _exception = 1;
1553 _exceptionType = "java/lang/IllegalArgumentException";
1554 _exceptionMessage = "arrays == null";
1555 goto exit;
1556 }
1557 if (offset < 0) {
1558 _exception = 1;
1559 _exceptionType = "java/lang/IllegalArgumentException";
1560 _exceptionMessage = "offset < 0";
1561 goto exit;
1562 }
1563 _remaining = _env->GetArrayLength(arrays_ref) - offset;
1564 arrays_base = (GLuint *)
1565 _env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
1566 arrays = arrays_base + offset;
1567
1568 glGenVertexArrays(
1569 (GLsizei)n,
1570 (GLuint *)arrays
1571 );
1572
1573exit:
1574 if (arrays_base) {
1575 _env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
1576 _exception ? JNI_ABORT: 0);
1577 }
1578 if (_exception) {
1579 jniThrowException(_env, _exceptionType, _exceptionMessage);
1580 }
1581}
1582
1583/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
1584static void
1585android_glGenVertexArrays__ILjava_nio_IntBuffer_2
1586 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
1587 jarray _array = (jarray) 0;
1588 jint _bufferOffset = (jint) 0;
1589 jint _remaining;
1590 GLuint *arrays = (GLuint *) 0;
1591
1592 arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
1593 if (arrays == NULL) {
1594 char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1595 arrays = (GLuint *) (_arraysBase + _bufferOffset);
1596 }
1597 glGenVertexArrays(
1598 (GLsizei)n,
1599 (GLuint *)arrays
1600 );
1601 if (_array) {
1602 releasePointer(_env, _array, arrays, JNI_TRUE);
1603 }
1604}
1605
1606/* GLboolean glIsVertexArray ( GLuint array ) */
1607static jboolean
1608android_glIsVertexArray__I
1609 (JNIEnv *_env, jobject _this, jint array) {
1610 GLboolean _returnValue;
1611 _returnValue = glIsVertexArray(
1612 (GLuint)array
1613 );
1614 return (jboolean)_returnValue;
1615}
1616
1617/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
1618static void
1619android_glGetIntegeri_v__II_3II
1620 (JNIEnv *_env, jobject _this, jint target, jint index, jintArray data_ref, jint offset) {
1621 jint _exception = 0;
1622 const char * _exceptionType = NULL;
1623 const char * _exceptionMessage = NULL;
1624 GLint *data_base = (GLint *) 0;
1625 jint _remaining;
1626 GLint *data = (GLint *) 0;
1627
1628 if (!data_ref) {
1629 _exception = 1;
1630 _exceptionType = "java/lang/IllegalArgumentException";
1631 _exceptionMessage = "data == null";
1632 goto exit;
1633 }
1634 if (offset < 0) {
1635 _exception = 1;
1636 _exceptionType = "java/lang/IllegalArgumentException";
1637 _exceptionMessage = "offset < 0";
1638 goto exit;
1639 }
1640 _remaining = _env->GetArrayLength(data_ref) - offset;
1641 data_base = (GLint *)
1642 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
1643 data = data_base + offset;
1644
1645 glGetIntegeri_v(
1646 (GLenum)target,
1647 (GLuint)index,
1648 (GLint *)data
1649 );
1650
1651exit:
1652 if (data_base) {
1653 _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
1654 _exception ? JNI_ABORT: 0);
1655 }
1656 if (_exception) {
1657 jniThrowException(_env, _exceptionType, _exceptionMessage);
1658 }
1659}
1660
1661/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
1662static void
1663android_glGetIntegeri_v__IILjava_nio_IntBuffer_2
1664 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
1665 jarray _array = (jarray) 0;
1666 jint _bufferOffset = (jint) 0;
1667 jint _remaining;
1668 GLint *data = (GLint *) 0;
1669
1670 data = (GLint *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
1671 if (data == NULL) {
1672 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1673 data = (GLint *) (_dataBase + _bufferOffset);
1674 }
1675 glGetIntegeri_v(
1676 (GLenum)target,
1677 (GLuint)index,
1678 (GLint *)data
1679 );
1680 if (_array) {
1681 releasePointer(_env, _array, data, JNI_TRUE);
1682 }
1683}
1684
1685/* void glBeginTransformFeedback ( GLenum primitiveMode ) */
1686static void
1687android_glBeginTransformFeedback__I
1688 (JNIEnv *_env, jobject _this, jint primitiveMode) {
1689 glBeginTransformFeedback(
1690 (GLenum)primitiveMode
1691 );
1692}
1693
1694/* void glEndTransformFeedback ( void ) */
1695static void
1696android_glEndTransformFeedback__
1697 (JNIEnv *_env, jobject _this) {
1698 glEndTransformFeedback();
1699}
1700
1701/* void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
1702static void
1703android_glBindBufferRange__IIIII
1704 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer, jint offset, jint size) {
1705 glBindBufferRange(
1706 (GLenum)target,
1707 (GLuint)index,
1708 (GLuint)buffer,
1709 (GLintptr)offset,
1710 (GLsizeiptr)size
1711 );
1712}
1713
1714/* void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer ) */
1715static void
1716android_glBindBufferBase__III
1717 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer) {
1718 glBindBufferBase(
1719 (GLenum)target,
1720 (GLuint)index,
1721 (GLuint)buffer
1722 );
1723}
1724
1725/* void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) */
1726static
1727void
1728android_glTransformFeedbackVaryings
1729 (JNIEnv *_env, jobject _this, jint program, jobjectArray varyings_ref, jint bufferMode) {
1730 jint _exception = 0;
1731 const char* _exceptionType = NULL;
1732 const char* _exceptionMessage = NULL;
1733 jint _count = 0, _i;
1734 const char** _varyings = NULL;
1735 const char* _varying = NULL;
1736
1737 if (!varyings_ref) {
1738 _exception = 1;
1739 _exceptionType = "java/lang/IllegalArgumentException";
1740 _exceptionMessage = "varyings == null";
1741 goto exit;
1742 }
1743
1744 _count = _env->GetArrayLength(varyings_ref);
1745 _varyings = (const char**)calloc(_count, sizeof(const char*));
1746 for (_i = 0; _i < _count; _i++) {
1747 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
1748 if (!_varying) {
1749 _exception = 1;
1750 _exceptionType = "java/lang/IllegalArgumentException";
1751 _exceptionMessage = "null varyings element";
1752 goto exit;
1753 }
1754 _varyings[_i] = _env->GetStringUTFChars(_varying, 0);
1755 }
1756
1757 glTransformFeedbackVaryings(program, _count, _varyings, bufferMode);
1758
1759exit:
1760 for (_i = _count - 1; _i >= 0; _i--) {
1761 if (_varyings[_i]) {
1762 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
1763 if (_varying) {
1764 _env->ReleaseStringUTFChars(_varying, _varyings[_i]);
1765 }
1766 }
1767 }
1768 free(_varyings);
1769 if (_exception) {
1770 jniThrowException(_env, _exceptionType, _exceptionMessage);
1771 }
1772}
1773
1774/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1775static void
1776android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI
1777 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) {
1778 jint _exception = 0;
1779 const char * _exceptionType;
1780 const char * _exceptionMessage;
1781 GLsizei *length_base = (GLsizei *) 0;
1782 jint _lengthRemaining;
1783 GLsizei *length = (GLsizei *) 0;
1784 GLint *size_base = (GLint *) 0;
1785 jint _sizeRemaining;
1786 GLint *size = (GLint *) 0;
1787 GLenum *type_base = (GLenum *) 0;
1788 jint _typeRemaining;
1789 GLenum *type = (GLenum *) 0;
1790 char *name_base = (char *) 0;
1791 jint _nameRemaining;
1792 char *name = (char *) 0;
1793
1794 if (!length_ref) {
1795 _exception = 1;
1796 _exceptionType = "java/lang/IllegalArgumentException";
1797 _exceptionMessage = "length == null";
1798 goto exit;
1799 }
1800 if (lengthOffset < 0) {
1801 _exception = 1;
1802 _exceptionType = "java/lang/IllegalArgumentException";
1803 _exceptionMessage = "lengthOffset < 0";
1804 goto exit;
1805 }
1806 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
1807 length_base = (GLsizei *)
1808 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
1809 length = length_base + lengthOffset;
1810
1811 if (!size_ref) {
1812 _exception = 1;
1813 _exceptionType = "java/lang/IllegalArgumentException";
1814 _exceptionMessage = "size == null";
1815 goto exit;
1816 }
1817 if (sizeOffset < 0) {
1818 _exception = 1;
1819 _exceptionType = "java/lang/IllegalArgumentException";
1820 _exceptionMessage = "sizeOffset < 0";
1821 goto exit;
1822 }
1823 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1824 size_base = (GLint *)
1825 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1826 size = size_base + sizeOffset;
1827
1828 if (!type_ref) {
1829 _exception = 1;
1830 _exceptionType = "java/lang/IllegalArgumentException";
1831 _exceptionMessage = "type == null";
1832 goto exit;
1833 }
1834 if (typeOffset < 0) {
1835 _exception = 1;
1836 _exceptionType = "java/lang/IllegalArgumentException";
1837 _exceptionMessage = "typeOffset < 0";
1838 goto exit;
1839 }
1840 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
1841 type_base = (GLenum *)
1842 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
1843 type = type_base + typeOffset;
1844
1845 if (!name_ref) {
1846 _exception = 1;
1847 _exceptionType = "java/lang/IllegalArgumentException";
1848 _exceptionMessage = "name == null";
1849 goto exit;
1850 }
1851 if (nameOffset < 0) {
1852 _exception = 1;
1853 _exceptionType = "java/lang/IllegalArgumentException";
1854 _exceptionMessage = "nameOffset < 0";
1855 goto exit;
1856 }
1857 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
1858 name_base = (char *)
1859 _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0);
1860 name = name_base + nameOffset;
1861
1862 glGetTransformFeedbackVarying(
1863 (GLuint)program,
1864 (GLuint)index,
1865 (GLsizei)bufsize,
1866 (GLsizei *)length,
1867 (GLint *)size,
1868 (GLenum *)type,
1869 (char *)name
1870 );
1871
1872exit:
1873 if (name_base) {
1874 _env->ReleasePrimitiveArrayCritical(name_ref, name_base,
1875 _exception ? JNI_ABORT: 0);
1876 }
1877 if (type_base) {
1878 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
1879 _exception ? JNI_ABORT: 0);
1880 }
1881 if (size_base) {
1882 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
1883 _exception ? JNI_ABORT: 0);
1884 }
1885 if (length_base) {
1886 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
1887 _exception ? JNI_ABORT: 0);
1888 }
1889 if (_exception) {
1890 jniThrowException(_env, _exceptionType, _exceptionMessage);
1891 }
1892}
1893
1894/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1895static void
1896android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
1897 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
1898 jarray _lengthArray = (jarray) 0;
1899 jint _lengthBufferOffset = (jint) 0;
1900 jarray _sizeArray = (jarray) 0;
1901 jint _sizeBufferOffset = (jint) 0;
1902 jarray _typeArray = (jarray) 0;
1903 jint _typeBufferOffset = (jint) 0;
1904 jint _lengthRemaining;
1905 GLsizei *length = (GLsizei *) 0;
1906 jint _sizeRemaining;
1907 GLint *size = (GLint *) 0;
1908 jint _typeRemaining;
1909 GLenum *type = (GLenum *) 0;
1910
1911 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
1912 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
1913 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
1914 if (length == NULL) {
1915 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
1916 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
1917 }
1918 if (size == NULL) {
1919 char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
1920 size = (GLint *) (_sizeBase + _sizeBufferOffset);
1921 }
1922 if (type == NULL) {
1923 char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
1924 type = (GLenum *) (_typeBase + _typeBufferOffset);
1925 }
1926 glGetTransformFeedbackVarying(
1927 (GLuint)program,
1928 (GLuint)index,
1929 (GLsizei)bufsize,
1930 (GLsizei *)length,
1931 (GLint *)size,
1932 (GLenum *)type,
1933 (char *)name
1934 );
1935 if (_typeArray) {
1936 releasePointer(_env, _typeArray, type, JNI_TRUE);
1937 }
1938 if (_sizeArray) {
1939 releasePointer(_env, _sizeArray, size, JNI_TRUE);
1940 }
1941 if (_lengthArray) {
1942 releasePointer(_env, _lengthArray, length, JNI_TRUE);
1943 }
1944}
1945
1946/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
1947static jstring
1948android_glGetTransformFeedbackVarying1
1949 (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) {
1950 jint _exception = 0;
1951 const char * _exceptionType;
1952 const char * _exceptionMessage;
1953 GLint *size_base = (GLint *) 0;
1954 jint _sizeRemaining;
1955 GLint *size = (GLint *) 0;
1956 GLenum *type_base = (GLenum *) 0;
1957 jint _typeRemaining;
1958 GLenum *type = (GLenum *) 0;
1959
1960 jstring result = 0;
1961
1962 GLint len = 0;
1963 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
1964 if (!len) {
1965 return _env->NewStringUTF("");
1966 }
1967 char* buf = (char*) malloc(len);
1968
1969 if (buf == NULL) {
1970 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
1971 return NULL;
1972 }
1973 if (!size_ref) {
1974 _exception = 1;
1975 _exceptionType = "java/lang/IllegalArgumentException";
1976 _exceptionMessage = "size == null";
1977 goto exit;
1978 }
1979 if (sizeOffset < 0) {
1980 _exception = 1;
1981 _exceptionType = "java/lang/IllegalArgumentException";
1982 _exceptionMessage = "sizeOffset < 0";
1983 goto exit;
1984 }
1985 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1986 size_base = (GLint *)
1987 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1988 size = size_base + sizeOffset;
1989
1990 if (!type_ref) {
1991 _exception = 1;
1992 _exceptionType = "java/lang/IllegalArgumentException";
1993 _exceptionMessage = "type == null";
1994 goto exit;
1995 }
1996 if (typeOffset < 0) {
1997 _exception = 1;
1998 _exceptionType = "java/lang/IllegalArgumentException";
1999 _exceptionMessage = "typeOffset < 0";
2000 goto exit;
2001 }
2002 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
2003 type_base = (GLenum *)
2004 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
2005 type = type_base + typeOffset;
2006
2007 glGetTransformFeedbackVarying(
2008 (GLuint)program,
2009 (GLuint)index,
2010 (GLsizei)len,
2011 NULL,
2012 (GLint *)size,
2013 (GLenum *)type,
2014 (char *)buf
2015 );
2016exit:
2017 if (type_base) {
2018 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
2019 _exception ? JNI_ABORT: 0);
2020 }
2021 if (size_base) {
2022 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
2023 _exception ? JNI_ABORT: 0);
2024 }
2025 if (_exception != 1) {
2026 result = _env->NewStringUTF(buf);
2027 }
2028 if (buf) {
2029 free(buf);
2030 }
2031 if (_exception) {
2032 jniThrowException(_env, _exceptionType, _exceptionMessage);
2033 }
2034 if (result == 0) {
2035 result = _env->NewStringUTF("");
2036 }
2037
2038 return result;
2039}
2040
2041/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
2042static jstring
2043android_glGetTransformFeedbackVarying2
2044 (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) {
2045 jarray _sizeArray = (jarray) 0;
2046 jint _sizeBufferOffset = (jint) 0;
2047 jarray _typeArray = (jarray) 0;
2048 jint _typeBufferOffset = (jint) 0;
2049 jint _lengthRemaining;
2050 GLsizei *length = (GLsizei *) 0;
2051 jint _sizeRemaining;
2052 GLint *size = (GLint *) 0;
2053 jint _typeRemaining;
2054 GLenum *type = (GLenum *) 0;
2055
2056 jstring result = 0;
2057
2058 GLint len = 0;
2059 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
2060 if (!len) {
2061 return _env->NewStringUTF("");
2062 }
2063 char* buf = (char*) malloc(len);
2064
2065 if (buf == NULL) {
2066 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
2067 return NULL;
2068 }
2069
2070 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
2071 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
2072 if (size == NULL) {
2073 char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
2074 size = (GLint *) (_sizeBase + _sizeBufferOffset);
2075 }
2076 if (type == NULL) {
2077 char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
2078 type = (GLenum *) (_typeBase + _typeBufferOffset);
2079 }
2080 glGetTransformFeedbackVarying(
2081 (GLuint)program,
2082 (GLuint)index,
2083 (GLsizei)len,
2084 NULL,
2085 (GLint *)size,
2086 (GLenum *)type,
2087 (char *)buf
2088 );
2089
2090 if (_typeArray) {
2091 releasePointer(_env, _typeArray, type, JNI_TRUE);
2092 }
2093 if (_sizeArray) {
2094 releasePointer(_env, _sizeArray, size, JNI_TRUE);
2095 }
2096 result = _env->NewStringUTF(buf);
2097 if (buf) {
2098 free(buf);
2099 }
2100 return result;
2101}
2102/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2103static void
2104android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I
2105 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2106 jarray _array = (jarray) 0;
2107 jint _bufferOffset = (jint) 0;
2108 jint _remaining;
2109 GLvoid *pointer = (GLvoid *) 0;
2110
2111 if (pointer_buf) {
2112 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2113 if ( ! pointer ) {
2114 return;
2115 }
2116 }
2117 glVertexAttribIPointerBounds(
2118 (GLuint)index,
2119 (GLint)size,
2120 (GLenum)type,
2121 (GLsizei)stride,
2122 (GLvoid *)pointer,
2123 (GLsizei)remaining
2124 );
2125}
2126
2127/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset ) */
2128static void
2129android_glVertexAttribIPointer__IIIII
2130 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jint offset) {
2131 glVertexAttribIPointer(
2132 (GLuint)index,
2133 (GLint)size,
2134 (GLenum)type,
2135 (GLsizei)stride,
2136 (GLvoid *)offset
2137 );
2138}
2139
2140/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
2141static void
2142android_glGetVertexAttribIiv__II_3II
2143 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
2144 jint _exception = 0;
2145 const char * _exceptionType = NULL;
2146 const char * _exceptionMessage = NULL;
2147 GLint *params_base = (GLint *) 0;
2148 jint _remaining;
2149 GLint *params = (GLint *) 0;
2150
2151 if (!params_ref) {
2152 _exception = 1;
2153 _exceptionType = "java/lang/IllegalArgumentException";
2154 _exceptionMessage = "params == null";
2155 goto exit;
2156 }
2157 if (offset < 0) {
2158 _exception = 1;
2159 _exceptionType = "java/lang/IllegalArgumentException";
2160 _exceptionMessage = "offset < 0";
2161 goto exit;
2162 }
2163 _remaining = _env->GetArrayLength(params_ref) - offset;
2164 params_base = (GLint *)
2165 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2166 params = params_base + offset;
2167
2168 glGetVertexAttribIiv(
2169 (GLuint)index,
2170 (GLenum)pname,
2171 (GLint *)params
2172 );
2173
2174exit:
2175 if (params_base) {
2176 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2177 _exception ? JNI_ABORT: 0);
2178 }
2179 if (_exception) {
2180 jniThrowException(_env, _exceptionType, _exceptionMessage);
2181 }
2182}
2183
2184/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
2185static void
2186android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2
2187 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
2188 jarray _array = (jarray) 0;
2189 jint _bufferOffset = (jint) 0;
2190 jint _remaining;
2191 GLint *params = (GLint *) 0;
2192
2193 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2194 if (params == NULL) {
2195 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2196 params = (GLint *) (_paramsBase + _bufferOffset);
2197 }
2198 glGetVertexAttribIiv(
2199 (GLuint)index,
2200 (GLenum)pname,
2201 (GLint *)params
2202 );
2203 if (_array) {
2204 releasePointer(_env, _array, params, JNI_TRUE);
2205 }
2206}
2207
2208/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
2209static void
2210android_glGetVertexAttribIuiv__II_3II
2211 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
2212 jint _exception = 0;
2213 const char * _exceptionType = NULL;
2214 const char * _exceptionMessage = NULL;
2215 GLuint *params_base = (GLuint *) 0;
2216 jint _remaining;
2217 GLuint *params = (GLuint *) 0;
2218
2219 if (!params_ref) {
2220 _exception = 1;
2221 _exceptionType = "java/lang/IllegalArgumentException";
2222 _exceptionMessage = "params == null";
2223 goto exit;
2224 }
2225 if (offset < 0) {
2226 _exception = 1;
2227 _exceptionType = "java/lang/IllegalArgumentException";
2228 _exceptionMessage = "offset < 0";
2229 goto exit;
2230 }
2231 _remaining = _env->GetArrayLength(params_ref) - offset;
2232 params_base = (GLuint *)
2233 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2234 params = params_base + offset;
2235
2236 glGetVertexAttribIuiv(
2237 (GLuint)index,
2238 (GLenum)pname,
2239 (GLuint *)params
2240 );
2241
2242exit:
2243 if (params_base) {
2244 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2245 _exception ? JNI_ABORT: 0);
2246 }
2247 if (_exception) {
2248 jniThrowException(_env, _exceptionType, _exceptionMessage);
2249 }
2250}
2251
2252/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
2253static void
2254android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2
2255 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
2256 jarray _array = (jarray) 0;
2257 jint _bufferOffset = (jint) 0;
2258 jint _remaining;
2259 GLuint *params = (GLuint *) 0;
2260
2261 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2262 if (params == NULL) {
2263 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2264 params = (GLuint *) (_paramsBase + _bufferOffset);
2265 }
2266 glGetVertexAttribIuiv(
2267 (GLuint)index,
2268 (GLenum)pname,
2269 (GLuint *)params
2270 );
2271 if (_array) {
2272 releasePointer(_env, _array, params, JNI_TRUE);
2273 }
2274}
2275
2276/* void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w ) */
2277static void
2278android_glVertexAttribI4i__IIIII
2279 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
2280 glVertexAttribI4i(
2281 (GLuint)index,
2282 (GLint)x,
2283 (GLint)y,
2284 (GLint)z,
2285 (GLint)w
2286 );
2287}
2288
2289/* void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) */
2290static void
2291android_glVertexAttribI4ui__IIIII
2292 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
2293 glVertexAttribI4ui(
2294 (GLuint)index,
2295 (GLuint)x,
2296 (GLuint)y,
2297 (GLuint)z,
2298 (GLuint)w
2299 );
2300}
2301
2302/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
2303static void
2304android_glVertexAttribI4iv__I_3II
2305 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
2306 jint _exception = 0;
2307 const char * _exceptionType = NULL;
2308 const char * _exceptionMessage = NULL;
2309 GLint *v_base = (GLint *) 0;
2310 jint _remaining;
2311 GLint *v = (GLint *) 0;
2312
2313 if (!v_ref) {
2314 _exception = 1;
2315 _exceptionType = "java/lang/IllegalArgumentException";
2316 _exceptionMessage = "v == null";
2317 goto exit;
2318 }
2319 if (offset < 0) {
2320 _exception = 1;
2321 _exceptionType = "java/lang/IllegalArgumentException";
2322 _exceptionMessage = "offset < 0";
2323 goto exit;
2324 }
2325 _remaining = _env->GetArrayLength(v_ref) - offset;
2326 v_base = (GLint *)
2327 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
2328 v = v_base + offset;
2329
2330 glVertexAttribI4iv(
2331 (GLuint)index,
2332 (GLint *)v
2333 );
2334
2335exit:
2336 if (v_base) {
2337 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
2338 JNI_ABORT);
2339 }
2340 if (_exception) {
2341 jniThrowException(_env, _exceptionType, _exceptionMessage);
2342 }
2343}
2344
2345/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
2346static void
2347android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2
2348 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
2349 jarray _array = (jarray) 0;
2350 jint _bufferOffset = (jint) 0;
2351 jint _remaining;
2352 GLint *v = (GLint *) 0;
2353
2354 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
2355 if (v == NULL) {
2356 char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2357 v = (GLint *) (_vBase + _bufferOffset);
2358 }
2359 glVertexAttribI4iv(
2360 (GLuint)index,
2361 (GLint *)v
2362 );
2363 if (_array) {
2364 releasePointer(_env, _array, v, JNI_FALSE);
2365 }
2366}
2367
2368/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
2369static void
2370android_glVertexAttribI4uiv__I_3II
2371 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
2372 jint _exception = 0;
2373 const char * _exceptionType = NULL;
2374 const char * _exceptionMessage = NULL;
2375 GLuint *v_base = (GLuint *) 0;
2376 jint _remaining;
2377 GLuint *v = (GLuint *) 0;
2378
2379 if (!v_ref) {
2380 _exception = 1;
2381 _exceptionType = "java/lang/IllegalArgumentException";
2382 _exceptionMessage = "v == null";
2383 goto exit;
2384 }
2385 if (offset < 0) {
2386 _exception = 1;
2387 _exceptionType = "java/lang/IllegalArgumentException";
2388 _exceptionMessage = "offset < 0";
2389 goto exit;
2390 }
2391 _remaining = _env->GetArrayLength(v_ref) - offset;
2392 v_base = (GLuint *)
2393 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
2394 v = v_base + offset;
2395
2396 glVertexAttribI4uiv(
2397 (GLuint)index,
2398 (GLuint *)v
2399 );
2400
2401exit:
2402 if (v_base) {
2403 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
2404 JNI_ABORT);
2405 }
2406 if (_exception) {
2407 jniThrowException(_env, _exceptionType, _exceptionMessage);
2408 }
2409}
2410
2411/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
2412static void
2413android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2
2414 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
2415 jarray _array = (jarray) 0;
2416 jint _bufferOffset = (jint) 0;
2417 jint _remaining;
2418 GLuint *v = (GLuint *) 0;
2419
2420 v = (GLuint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
2421 if (v == NULL) {
2422 char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2423 v = (GLuint *) (_vBase + _bufferOffset);
2424 }
2425 glVertexAttribI4uiv(
2426 (GLuint)index,
2427 (GLuint *)v
2428 );
2429 if (_array) {
2430 releasePointer(_env, _array, v, JNI_FALSE);
2431 }
2432}
2433
2434/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
2435static void
2436android_glGetUniformuiv__II_3II
2437 (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
2438 jint _exception = 0;
2439 const char * _exceptionType = NULL;
2440 const char * _exceptionMessage = NULL;
2441 GLuint *params_base = (GLuint *) 0;
2442 jint _remaining;
2443 GLuint *params = (GLuint *) 0;
2444
2445 if (!params_ref) {
2446 _exception = 1;
2447 _exceptionType = "java/lang/IllegalArgumentException";
2448 _exceptionMessage = "params == null";
2449 goto exit;
2450 }
2451 if (offset < 0) {
2452 _exception = 1;
2453 _exceptionType = "java/lang/IllegalArgumentException";
2454 _exceptionMessage = "offset < 0";
2455 goto exit;
2456 }
2457 _remaining = _env->GetArrayLength(params_ref) - offset;
2458 params_base = (GLuint *)
2459 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2460 params = params_base + offset;
2461
2462 glGetUniformuiv(
2463 (GLuint)program,
2464 (GLint)location,
2465 (GLuint *)params
2466 );
2467
2468exit:
2469 if (params_base) {
2470 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2471 _exception ? JNI_ABORT: 0);
2472 }
2473 if (_exception) {
2474 jniThrowException(_env, _exceptionType, _exceptionMessage);
2475 }
2476}
2477
2478/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
2479static void
2480android_glGetUniformuiv__IILjava_nio_IntBuffer_2
2481 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
2482 jarray _array = (jarray) 0;
2483 jint _bufferOffset = (jint) 0;
2484 jint _remaining;
2485 GLuint *params = (GLuint *) 0;
2486
2487 params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2488 if (params == NULL) {
2489 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2490 params = (GLuint *) (_paramsBase + _bufferOffset);
2491 }
2492 glGetUniformuiv(
2493 (GLuint)program,
2494 (GLint)location,
2495 (GLuint *)params
2496 );
2497 if (_array) {
2498 releasePointer(_env, _array, params, JNI_TRUE);
2499 }
2500}
2501
2502/* GLint glGetFragDataLocation ( GLuint program, const GLchar *name ) */
2503static jint
2504android_glGetFragDataLocation__ILjava_lang_String_2
2505 (JNIEnv *_env, jobject _this, jint program, jstring name) {
2506 jint _exception = 0;
2507 const char * _exceptionType = NULL;
2508 const char * _exceptionMessage = NULL;
2509 GLint _returnValue = 0;
2510 const char* _nativename = 0;
2511
2512 if (!name) {
2513 _exceptionType = "java/lang/IllegalArgumentException";
2514 _exceptionMessage = "name == null";
2515 goto exit;
2516 }
2517 _nativename = _env->GetStringUTFChars(name, 0);
2518
2519 _returnValue = glGetFragDataLocation(
2520 (GLuint)program,
2521 (GLchar *)_nativename
2522 );
2523
2524exit:
2525 if (_nativename) {
2526 _env->ReleaseStringUTFChars(name, _nativename);
2527 }
2528
2529 if (_exception) {
2530 jniThrowException(_env, _exceptionType, _exceptionMessage);
2531 }
2532 return (jint)_returnValue;
2533}
2534
2535/* void glUniform1ui ( GLint location, GLuint v0 ) */
2536static void
2537android_glUniform1ui__II
2538 (JNIEnv *_env, jobject _this, jint location, jint v0) {
2539 glUniform1ui(
2540 (GLint)location,
2541 (GLuint)v0
2542 );
2543}
2544
2545/* void glUniform2ui ( GLint location, GLuint v0, GLuint v1 ) */
2546static void
2547android_glUniform2ui__III
2548 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1) {
2549 glUniform2ui(
2550 (GLint)location,
2551 (GLuint)v0,
2552 (GLuint)v1
2553 );
2554}
2555
2556/* void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
2557static void
2558android_glUniform3ui__IIII
2559 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2) {
2560 glUniform3ui(
2561 (GLint)location,
2562 (GLuint)v0,
2563 (GLuint)v1,
2564 (GLuint)v2
2565 );
2566}
2567
2568/* void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
2569static void
2570android_glUniform4ui__IIIII
2571 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2, jint v3) {
2572 glUniform4ui(
2573 (GLint)location,
2574 (GLuint)v0,
2575 (GLuint)v1,
2576 (GLuint)v2,
2577 (GLuint)v3
2578 );
2579}
2580
2581/* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
2582static void
2583android_glUniform1uiv__II_3II
2584 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2585 jint _exception = 0;
2586 const char * _exceptionType = NULL;
2587 const char * _exceptionMessage = NULL;
2588 GLuint *value_base = (GLuint *) 0;
2589 jint _remaining;
2590 GLuint *value = (GLuint *) 0;
2591
2592 if (!value_ref) {
2593 _exception = 1;
2594 _exceptionType = "java/lang/IllegalArgumentException";
2595 _exceptionMessage = "value == null";
2596 goto exit;
2597 }
2598 if (offset < 0) {
2599 _exception = 1;
2600 _exceptionType = "java/lang/IllegalArgumentException";
2601 _exceptionMessage = "offset < 0";
2602 goto exit;
2603 }
2604 _remaining = _env->GetArrayLength(value_ref) - offset;
2605 value_base = (GLuint *)
2606 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2607 value = value_base + offset;
2608
2609 glUniform1uiv(
2610 (GLint)location,
2611 (GLsizei)count,
2612 (GLuint *)value
2613 );
2614
2615exit:
2616 if (value_base) {
2617 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2618 JNI_ABORT);
2619 }
2620 if (_exception) {
2621 jniThrowException(_env, _exceptionType, _exceptionMessage);
2622 }
2623}
2624
2625/* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */
2626static void
2627android_glUniform1uiv__IILjava_nio_IntBuffer_2
2628 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2629 jarray _array = (jarray) 0;
2630 jint _bufferOffset = (jint) 0;
2631 jint _remaining;
2632 GLuint *value = (GLuint *) 0;
2633
2634 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2635 if (value == NULL) {
2636 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2637 value = (GLuint *) (_valueBase + _bufferOffset);
2638 }
2639 glUniform1uiv(
2640 (GLint)location,
2641 (GLsizei)count,
2642 (GLuint *)value
2643 );
2644 if (_array) {
2645 releasePointer(_env, _array, value, JNI_FALSE);
2646 }
2647}
2648
2649/* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
2650static void
2651android_glUniform2uiv__II_3II
2652 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2653 jint _exception = 0;
2654 const char * _exceptionType = NULL;
2655 const char * _exceptionMessage = NULL;
2656 GLuint *value_base = (GLuint *) 0;
2657 jint _remaining;
2658 GLuint *value = (GLuint *) 0;
2659
2660 if (!value_ref) {
2661 _exception = 1;
2662 _exceptionType = "java/lang/IllegalArgumentException";
2663 _exceptionMessage = "value == null";
2664 goto exit;
2665 }
2666 if (offset < 0) {
2667 _exception = 1;
2668 _exceptionType = "java/lang/IllegalArgumentException";
2669 _exceptionMessage = "offset < 0";
2670 goto exit;
2671 }
2672 _remaining = _env->GetArrayLength(value_ref) - offset;
2673 value_base = (GLuint *)
2674 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2675 value = value_base + offset;
2676
2677 glUniform2uiv(
2678 (GLint)location,
2679 (GLsizei)count,
2680 (GLuint *)value
2681 );
2682
2683exit:
2684 if (value_base) {
2685 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2686 JNI_ABORT);
2687 }
2688 if (_exception) {
2689 jniThrowException(_env, _exceptionType, _exceptionMessage);
2690 }
2691}
2692
2693/* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */
2694static void
2695android_glUniform2uiv__IILjava_nio_IntBuffer_2
2696 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2697 jarray _array = (jarray) 0;
2698 jint _bufferOffset = (jint) 0;
2699 jint _remaining;
2700 GLuint *value = (GLuint *) 0;
2701
2702 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2703 if (value == NULL) {
2704 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2705 value = (GLuint *) (_valueBase + _bufferOffset);
2706 }
2707 glUniform2uiv(
2708 (GLint)location,
2709 (GLsizei)count,
2710 (GLuint *)value
2711 );
2712 if (_array) {
2713 releasePointer(_env, _array, value, JNI_FALSE);
2714 }
2715}
2716
2717/* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
2718static void
2719android_glUniform3uiv__II_3II
2720 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2721 jint _exception = 0;
2722 const char * _exceptionType = NULL;
2723 const char * _exceptionMessage = NULL;
2724 GLuint *value_base = (GLuint *) 0;
2725 jint _remaining;
2726 GLuint *value = (GLuint *) 0;
2727
2728 if (!value_ref) {
2729 _exception = 1;
2730 _exceptionType = "java/lang/IllegalArgumentException";
2731 _exceptionMessage = "value == null";
2732 goto exit;
2733 }
2734 if (offset < 0) {
2735 _exception = 1;
2736 _exceptionType = "java/lang/IllegalArgumentException";
2737 _exceptionMessage = "offset < 0";
2738 goto exit;
2739 }
2740 _remaining = _env->GetArrayLength(value_ref) - offset;
2741 value_base = (GLuint *)
2742 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2743 value = value_base + offset;
2744
2745 glUniform3uiv(
2746 (GLint)location,
2747 (GLsizei)count,
2748 (GLuint *)value
2749 );
2750
2751exit:
2752 if (value_base) {
2753 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2754 JNI_ABORT);
2755 }
2756 if (_exception) {
2757 jniThrowException(_env, _exceptionType, _exceptionMessage);
2758 }
2759}
2760
2761/* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */
2762static void
2763android_glUniform3uiv__IILjava_nio_IntBuffer_2
2764 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2765 jarray _array = (jarray) 0;
2766 jint _bufferOffset = (jint) 0;
2767 jint _remaining;
2768 GLuint *value = (GLuint *) 0;
2769
2770 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2771 if (value == NULL) {
2772 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2773 value = (GLuint *) (_valueBase + _bufferOffset);
2774 }
2775 glUniform3uiv(
2776 (GLint)location,
2777 (GLsizei)count,
2778 (GLuint *)value
2779 );
2780 if (_array) {
2781 releasePointer(_env, _array, value, JNI_FALSE);
2782 }
2783}
2784
2785/* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
2786static void
2787android_glUniform4uiv__II_3II
2788 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) {
2789 jint _exception = 0;
2790 const char * _exceptionType = NULL;
2791 const char * _exceptionMessage = NULL;
2792 GLuint *value_base = (GLuint *) 0;
2793 jint _remaining;
2794 GLuint *value = (GLuint *) 0;
2795
2796 if (!value_ref) {
2797 _exception = 1;
2798 _exceptionType = "java/lang/IllegalArgumentException";
2799 _exceptionMessage = "value == null";
2800 goto exit;
2801 }
2802 if (offset < 0) {
2803 _exception = 1;
2804 _exceptionType = "java/lang/IllegalArgumentException";
2805 _exceptionMessage = "offset < 0";
2806 goto exit;
2807 }
2808 _remaining = _env->GetArrayLength(value_ref) - offset;
2809 value_base = (GLuint *)
2810 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2811 value = value_base + offset;
2812
2813 glUniform4uiv(
2814 (GLint)location,
2815 (GLsizei)count,
2816 (GLuint *)value
2817 );
2818
2819exit:
2820 if (value_base) {
2821 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2822 JNI_ABORT);
2823 }
2824 if (_exception) {
2825 jniThrowException(_env, _exceptionType, _exceptionMessage);
2826 }
2827}
2828
2829/* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */
2830static void
2831android_glUniform4uiv__IILjava_nio_IntBuffer_2
2832 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) {
2833 jarray _array = (jarray) 0;
2834 jint _bufferOffset = (jint) 0;
2835 jint _remaining;
2836 GLuint *value = (GLuint *) 0;
2837
2838 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2839 if (value == NULL) {
2840 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2841 value = (GLuint *) (_valueBase + _bufferOffset);
2842 }
2843 glUniform4uiv(
2844 (GLint)location,
2845 (GLsizei)count,
2846 (GLuint *)value
2847 );
2848 if (_array) {
2849 releasePointer(_env, _array, value, JNI_FALSE);
2850 }
2851}
2852
2853/* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
2854static void
2855android_glClearBufferiv__II_3II
2856 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
2857 jint _exception = 0;
2858 const char * _exceptionType = NULL;
2859 const char * _exceptionMessage = NULL;
2860 GLint *value_base = (GLint *) 0;
2861 jint _remaining;
2862 GLint *value = (GLint *) 0;
2863
2864 if (!value_ref) {
2865 _exception = 1;
2866 _exceptionType = "java/lang/IllegalArgumentException";
2867 _exceptionMessage = "value == null";
2868 goto exit;
2869 }
2870 if (offset < 0) {
2871 _exception = 1;
2872 _exceptionType = "java/lang/IllegalArgumentException";
2873 _exceptionMessage = "offset < 0";
2874 goto exit;
2875 }
2876 _remaining = _env->GetArrayLength(value_ref) - offset;
2877 value_base = (GLint *)
2878 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2879 value = value_base + offset;
2880
2881 glClearBufferiv(
2882 (GLenum)buffer,
2883 (GLint)drawbuffer,
2884 (GLint *)value
2885 );
2886
2887exit:
2888 if (value_base) {
2889 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2890 JNI_ABORT);
2891 }
2892 if (_exception) {
2893 jniThrowException(_env, _exceptionType, _exceptionMessage);
2894 }
2895}
2896
2897/* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */
2898static void
2899android_glClearBufferiv__IILjava_nio_IntBuffer_2
2900 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
2901 jarray _array = (jarray) 0;
2902 jint _bufferOffset = (jint) 0;
2903 jint _remaining;
2904 GLint *value = (GLint *) 0;
2905
2906 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2907 if (value == NULL) {
2908 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2909 value = (GLint *) (_valueBase + _bufferOffset);
2910 }
2911 glClearBufferiv(
2912 (GLenum)buffer,
2913 (GLint)drawbuffer,
2914 (GLint *)value
2915 );
2916 if (_array) {
2917 releasePointer(_env, _array, value, JNI_FALSE);
2918 }
2919}
2920
2921/* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
2922static void
2923android_glClearBufferuiv__II_3II
2924 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) {
2925 jint _exception = 0;
2926 const char * _exceptionType = NULL;
2927 const char * _exceptionMessage = NULL;
2928 GLuint *value_base = (GLuint *) 0;
2929 jint _remaining;
2930 GLuint *value = (GLuint *) 0;
2931
2932 if (!value_ref) {
2933 _exception = 1;
2934 _exceptionType = "java/lang/IllegalArgumentException";
2935 _exceptionMessage = "value == null";
2936 goto exit;
2937 }
2938 if (offset < 0) {
2939 _exception = 1;
2940 _exceptionType = "java/lang/IllegalArgumentException";
2941 _exceptionMessage = "offset < 0";
2942 goto exit;
2943 }
2944 _remaining = _env->GetArrayLength(value_ref) - offset;
2945 value_base = (GLuint *)
2946 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
2947 value = value_base + offset;
2948
2949 glClearBufferuiv(
2950 (GLenum)buffer,
2951 (GLint)drawbuffer,
2952 (GLuint *)value
2953 );
2954
2955exit:
2956 if (value_base) {
2957 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
2958 JNI_ABORT);
2959 }
2960 if (_exception) {
2961 jniThrowException(_env, _exceptionType, _exceptionMessage);
2962 }
2963}
2964
2965/* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */
2966static void
2967android_glClearBufferuiv__IILjava_nio_IntBuffer_2
2968 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
2969 jarray _array = (jarray) 0;
2970 jint _bufferOffset = (jint) 0;
2971 jint _remaining;
2972 GLuint *value = (GLuint *) 0;
2973
2974 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
2975 if (value == NULL) {
2976 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2977 value = (GLuint *) (_valueBase + _bufferOffset);
2978 }
2979 glClearBufferuiv(
2980 (GLenum)buffer,
2981 (GLint)drawbuffer,
2982 (GLuint *)value
2983 );
2984 if (_array) {
2985 releasePointer(_env, _array, value, JNI_FALSE);
2986 }
2987}
2988
2989/* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
2990static void
2991android_glClearBufferfv__II_3FI
2992 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloatArray value_ref, jint offset) {
2993 jint _exception = 0;
2994 const char * _exceptionType = NULL;
2995 const char * _exceptionMessage = NULL;
2996 GLfloat *value_base = (GLfloat *) 0;
2997 jint _remaining;
2998 GLfloat *value = (GLfloat *) 0;
2999
3000 if (!value_ref) {
3001 _exception = 1;
3002 _exceptionType = "java/lang/IllegalArgumentException";
3003 _exceptionMessage = "value == null";
3004 goto exit;
3005 }
3006 if (offset < 0) {
3007 _exception = 1;
3008 _exceptionType = "java/lang/IllegalArgumentException";
3009 _exceptionMessage = "offset < 0";
3010 goto exit;
3011 }
3012 _remaining = _env->GetArrayLength(value_ref) - offset;
3013 value_base = (GLfloat *)
3014 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
3015 value = value_base + offset;
3016
3017 glClearBufferfv(
3018 (GLenum)buffer,
3019 (GLint)drawbuffer,
3020 (GLfloat *)value
3021 );
3022
3023exit:
3024 if (value_base) {
3025 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
3026 JNI_ABORT);
3027 }
3028 if (_exception) {
3029 jniThrowException(_env, _exceptionType, _exceptionMessage);
3030 }
3031}
3032
3033/* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */
3034static void
3035android_glClearBufferfv__IILjava_nio_FloatBuffer_2
3036 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) {
3037 jarray _array = (jarray) 0;
3038 jint _bufferOffset = (jint) 0;
3039 jint _remaining;
3040 GLfloat *value = (GLfloat *) 0;
3041
3042 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
3043 if (value == NULL) {
3044 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3045 value = (GLfloat *) (_valueBase + _bufferOffset);
3046 }
3047 glClearBufferfv(
3048 (GLenum)buffer,
3049 (GLint)drawbuffer,
3050 (GLfloat *)value
3051 );
3052 if (_array) {
3053 releasePointer(_env, _array, value, JNI_FALSE);
3054 }
3055}
3056
3057/* void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) */
3058static void
3059android_glClearBufferfi__IIFI
3060 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloat depth, jint stencil) {
3061 glClearBufferfi(
3062 (GLenum)buffer,
3063 (GLint)drawbuffer,
3064 (GLfloat)depth,
3065 (GLint)stencil
3066 );
3067}
3068
3069/* const GLubyte * glGetStringi ( GLenum name, GLuint index ) */
3070static jstring
3071android_glGetStringi__II
3072 (JNIEnv *_env, jobject _this, jint name, jint index) {
3073 const GLubyte* _chars = glGetStringi((GLenum)name, (GLuint)index);
3074 return _env->NewStringUTF((const char*)_chars);
3075}
3076
3077/* void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) */
3078static void
3079android_glCopyBufferSubData__IIIII
3080 (JNIEnv *_env, jobject _this, jint readTarget, jint writeTarget, jint readOffset, jint writeOffset, jint size) {
3081 glCopyBufferSubData(
3082 (GLenum)readTarget,
3083 (GLenum)writeTarget,
3084 (GLintptr)readOffset,
3085 (GLintptr)writeOffset,
3086 (GLsizeiptr)size
3087 );
3088}
3089
3090/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
3091static
3092void
3093android_glGetUniformIndices_array
3094 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jintArray uniformIndices_ref, jint uniformIndicesOffset) {
3095 jint _exception = 0;
3096 const char* _exceptionType = NULL;
3097 const char* _exceptionMessage = NULL;
3098 jint _count = 0;
3099 jint _i;
3100 const char** _names = NULL;
3101 GLuint* _indices_base = NULL;
3102 GLuint* _indices = NULL;
3103
3104 if (!uniformNames_ref) {
3105 _exception = 1;
3106 _exceptionType = "java/lang/IllegalArgumentException";
3107 _exceptionMessage = "uniformNames == null";
3108 goto exit;
3109 }
3110 _count = _env->GetArrayLength(uniformNames_ref);
3111 _names = (const char**)calloc(_count, sizeof(const char*));
3112 for (_i = 0; _i < _count; _i++) {
3113 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3114 if (!_name) {
3115 _exception = 1;
3116 _exceptionType = "java/lang/IllegalArgumentException";
3117 _exceptionMessage = "null uniformNames element";
3118 goto exit;
3119 }
3120 _names[_i] = _env->GetStringUTFChars(_name, 0);
3121 }
3122
3123 if (!uniformIndices_ref) {
3124 _exception = 1;
3125 _exceptionType = "java/lang/IllegalArgumentException";
3126 _exceptionMessage = "uniformIndices == null";
3127 goto exit;
3128 }
3129 if (uniformIndicesOffset < 0) {
3130 _exception = 1;
3131 _exceptionType = "java/lang/IllegalArgumentException";
3132 _exceptionMessage = "uniformIndicesOffset < 0";
3133 goto exit;
3134 }
3135 if (_env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset < _count) {
3136 _exception = 1;
3137 _exceptionType = "java/lang/IllegalArgumentException";
3138 _exceptionMessage = "not enough space in uniformIndices";
3139 goto exit;
3140 }
3141 _indices_base = (GLuint*)_env->GetPrimitiveArrayCritical(
3142 uniformIndices_ref, 0);
3143 _indices = _indices_base + uniformIndicesOffset;
3144
3145 glGetUniformIndices(program, _count, _names, _indices);
3146
3147exit:
3148 if (_indices_base) {
3149 _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, _indices_base,
3150 _exception ? JNI_ABORT : 0);
3151 }
3152 for (_i = _count - 1; _i >= 0; _i--) {
3153 if (_names[_i]) {
3154 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3155 if (_name) {
3156 _env->ReleaseStringUTFChars(_name, _names[_i]);
3157 }
3158 }
3159 }
3160 free(_names);
3161 if (_exception) {
3162 jniThrowException(_env, _exceptionType, _exceptionMessage);
3163 }
3164}
3165
3166/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */
3167static
3168void
3169android_glGetUniformIndices_buffer
3170 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jobject uniformIndices_buf) {
3171 jint _exception = 0;
3172 const char* _exceptionType = NULL;
3173 const char* _exceptionMessage = NULL;
3174 jint _count = 0;
3175 jint _i;
3176 const char** _names = NULL;
3177 jarray _uniformIndicesArray = (jarray)0;
3178 jint _uniformIndicesRemaining;
3179 jint _uniformIndicesOffset = 0;
3180 GLuint* _indices = NULL;
3181 char* _indicesBase = NULL;
3182
3183 if (!uniformNames_ref) {
3184 _exception = 1;
3185 _exceptionType = "java/lang/IllegalArgumentException";
3186 _exceptionMessage = "uniformNames == null";
3187 goto exit;
3188 }
3189 if (!uniformIndices_buf) {
3190 _exception = 1;
3191 _exceptionType = "java/lang/IllegalArgumentException";
3192 _exceptionMessage = "uniformIndices == null";
3193 goto exit;
3194 }
3195
3196 _count = _env->GetArrayLength(uniformNames_ref);
3197 _names = (const char**)calloc(_count, sizeof(const char*));
3198 for (_i = 0; _i < _count; _i++) {
3199 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3200 if (!_name) {
3201 _exception = 1;
3202 _exceptionType = "java/lang/IllegalArgumentException";
3203 _exceptionMessage = "null uniformNames element";
3204 goto exit;
3205 }
3206 _names[_i] = _env->GetStringUTFChars(_name, 0);
3207 }
3208
3209 _indices = (GLuint*)getPointer(_env, uniformIndices_buf,
3210 &_uniformIndicesArray, &_uniformIndicesRemaining,
3211 &_uniformIndicesOffset);
3212 if (!_indices) {
3213 _indicesBase = (char*)_env->GetPrimitiveArrayCritical(
3214 _uniformIndicesArray, 0);
3215 _indices = (GLuint*)(_indicesBase + _uniformIndicesOffset);
3216 }
3217 if (_uniformIndicesRemaining < _count) {
3218 _exception = 1;
3219 _exceptionType = "java/lang/IllegalArgumentException";
3220 _exceptionMessage = "not enough space in uniformIndices";
3221 goto exit;
3222 }
3223
3224 glGetUniformIndices(program, _count, _names, _indices);
3225
3226exit:
3227 if (_uniformIndicesArray) {
3228 releasePointer(_env, _uniformIndicesArray, _indicesBase, JNI_TRUE);
3229 }
3230 for (_i = _count - 1; _i >= 0; _i--) {
3231 if (_names[_i]) {
3232 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i);
3233 if (_name) {
3234 _env->ReleaseStringUTFChars(_name, _names[_i]);
3235 }
3236 }
3237 }
3238 free(_names);
3239 if (_exception) {
3240 jniThrowException(_env, _exceptionType, _exceptionMessage);
3241 }
3242}
3243
3244/* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
3245static void
3246android_glGetActiveUniformsiv__II_3III_3II
3247 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jintArray uniformIndices_ref, jint uniformIndicesOffset, jint pname, jintArray params_ref, jint paramsOffset) {
3248 jint _exception = 0;
3249 const char * _exceptionType = NULL;
3250 const char * _exceptionMessage = NULL;
3251 GLuint *uniformIndices_base = (GLuint *) 0;
3252 jint _uniformIndicesRemaining;
3253 GLuint *uniformIndices = (GLuint *) 0;
3254 GLint *params_base = (GLint *) 0;
3255 jint _paramsRemaining;
3256 GLint *params = (GLint *) 0;
3257
3258 if (!uniformIndices_ref) {
3259 _exception = 1;
3260 _exceptionType = "java/lang/IllegalArgumentException";
3261 _exceptionMessage = "uniformIndices == null";
3262 goto exit;
3263 }
3264 if (uniformIndicesOffset < 0) {
3265 _exception = 1;
3266 _exceptionType = "java/lang/IllegalArgumentException";
3267 _exceptionMessage = "uniformIndicesOffset < 0";
3268 goto exit;
3269 }
3270 _uniformIndicesRemaining = _env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset;
3271 uniformIndices_base = (GLuint *)
3272 _env->GetPrimitiveArrayCritical(uniformIndices_ref, (jboolean *)0);
3273 uniformIndices = uniformIndices_base + uniformIndicesOffset;
3274
3275 if (!params_ref) {
3276 _exception = 1;
3277 _exceptionType = "java/lang/IllegalArgumentException";
3278 _exceptionMessage = "params == null";
3279 goto exit;
3280 }
3281 if (paramsOffset < 0) {
3282 _exception = 1;
3283 _exceptionType = "java/lang/IllegalArgumentException";
3284 _exceptionMessage = "paramsOffset < 0";
3285 goto exit;
3286 }
3287 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
3288 params_base = (GLint *)
3289 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3290 params = params_base + paramsOffset;
3291
3292 glGetActiveUniformsiv(
3293 (GLuint)program,
3294 (GLsizei)uniformCount,
3295 (GLuint *)uniformIndices,
3296 (GLenum)pname,
3297 (GLint *)params
3298 );
3299
3300exit:
3301 if (params_base) {
3302 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3303 _exception ? JNI_ABORT: 0);
3304 }
3305 if (uniformIndices_base) {
3306 _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, uniformIndices_base,
3307 JNI_ABORT);
3308 }
3309 if (_exception) {
3310 jniThrowException(_env, _exceptionType, _exceptionMessage);
3311 }
3312}
3313
3314/* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */
3315static void
3316android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2
3317 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jobject uniformIndices_buf, jint pname, jobject params_buf) {
3318 jarray _uniformIndicesArray = (jarray) 0;
3319 jint _uniformIndicesBufferOffset = (jint) 0;
3320 jarray _paramsArray = (jarray) 0;
3321 jint _paramsBufferOffset = (jint) 0;
3322 jint _uniformIndicesRemaining;
3323 GLuint *uniformIndices = (GLuint *) 0;
3324 jint _paramsRemaining;
3325 GLint *params = (GLint *) 0;
3326
3327 uniformIndices = (GLuint *)getPointer(_env, uniformIndices_buf, &_uniformIndicesArray, &_uniformIndicesRemaining, &_uniformIndicesBufferOffset);
3328 params = (GLint *)getPointer(_env, params_buf, &_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
3329 if (uniformIndices == NULL) {
3330 char * _uniformIndicesBase = (char *)_env->GetPrimitiveArrayCritical(_uniformIndicesArray, (jboolean *) 0);
3331 uniformIndices = (GLuint *) (_uniformIndicesBase + _uniformIndicesBufferOffset);
3332 }
3333 if (params == NULL) {
3334 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_paramsArray, (jboolean *) 0);
3335 params = (GLint *) (_paramsBase + _paramsBufferOffset);
3336 }
3337 glGetActiveUniformsiv(
3338 (GLuint)program,
3339 (GLsizei)uniformCount,
3340 (GLuint *)uniformIndices,
3341 (GLenum)pname,
3342 (GLint *)params
3343 );
3344 if (_paramsArray) {
3345 releasePointer(_env, _paramsArray, params, JNI_TRUE);
3346 }
3347 if (_uniformIndicesArray) {
3348 releasePointer(_env, _uniformIndicesArray, uniformIndices, JNI_FALSE);
3349 }
3350}
3351
3352/* GLuint glGetUniformBlockIndex ( GLuint program, const GLchar *uniformBlockName ) */
3353static jint
3354android_glGetUniformBlockIndex__ILjava_lang_String_2
3355 (JNIEnv *_env, jobject _this, jint program, jstring uniformBlockName) {
3356 jint _exception = 0;
3357 const char * _exceptionType = NULL;
3358 const char * _exceptionMessage = NULL;
3359 GLuint _returnValue = 0;
3360 const char* _nativeuniformBlockName = 0;
3361
3362 if (!uniformBlockName) {
3363 _exceptionType = "java/lang/IllegalArgumentException";
3364 _exceptionMessage = "uniformBlockName == null";
3365 goto exit;
3366 }
3367 _nativeuniformBlockName = _env->GetStringUTFChars(uniformBlockName, 0);
3368
3369 _returnValue = glGetUniformBlockIndex(
3370 (GLuint)program,
3371 (GLchar *)_nativeuniformBlockName
3372 );
3373
3374exit:
3375 if (_nativeuniformBlockName) {
3376 _env->ReleaseStringUTFChars(uniformBlockName, _nativeuniformBlockName);
3377 }
3378
3379 if (_exception) {
3380 jniThrowException(_env, _exceptionType, _exceptionMessage);
3381 }
3382 return (jint)_returnValue;
3383}
3384
3385/* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
3386static void
3387android_glGetActiveUniformBlockiv__III_3II
3388 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jintArray params_ref, jint offset) {
3389 jint _exception = 0;
3390 const char * _exceptionType = NULL;
3391 const char * _exceptionMessage = NULL;
3392 GLint *params_base = (GLint *) 0;
3393 jint _remaining;
3394 GLint *params = (GLint *) 0;
3395
3396 if (!params_ref) {
3397 _exception = 1;
3398 _exceptionType = "java/lang/IllegalArgumentException";
3399 _exceptionMessage = "params == null";
3400 goto exit;
3401 }
3402 if (offset < 0) {
3403 _exception = 1;
3404 _exceptionType = "java/lang/IllegalArgumentException";
3405 _exceptionMessage = "offset < 0";
3406 goto exit;
3407 }
3408 _remaining = _env->GetArrayLength(params_ref) - offset;
3409 params_base = (GLint *)
3410 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3411 params = params_base + offset;
3412
3413 glGetActiveUniformBlockiv(
3414 (GLuint)program,
3415 (GLuint)uniformBlockIndex,
3416 (GLenum)pname,
3417 (GLint *)params
3418 );
3419
3420exit:
3421 if (params_base) {
3422 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3423 _exception ? JNI_ABORT: 0);
3424 }
3425 if (_exception) {
3426 jniThrowException(_env, _exceptionType, _exceptionMessage);
3427 }
3428}
3429
3430/* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */
3431static void
3432android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2
3433 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jobject params_buf) {
3434 jarray _array = (jarray) 0;
3435 jint _bufferOffset = (jint) 0;
3436 jint _remaining;
3437 GLint *params = (GLint *) 0;
3438
3439 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3440 if (params == NULL) {
3441 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3442 params = (GLint *) (_paramsBase + _bufferOffset);
3443 }
3444 glGetActiveUniformBlockiv(
3445 (GLuint)program,
3446 (GLuint)uniformBlockIndex,
3447 (GLenum)pname,
3448 (GLint *)params
3449 );
3450 if (_array) {
3451 releasePointer(_env, _array, params, JNI_TRUE);
3452 }
3453}
3454
3455/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3456static void
3457android_glGetActiveUniformBlockName_III_3II_3BI
3458 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, int bufSize, jintArray length_ref, jint lengthOffset, jbyteArray name_ref, jint nameOffset) {
3459 jint _exception = 0;
3460 const char* _exceptionType;
3461 const char* _exceptionMessage;
3462 GLsizei* _length_base = (GLsizei*)0;
3463 jint _lengthRemaining;
3464 GLsizei* _length = (GLsizei*)0;
3465 GLchar* _name_base = (GLchar*)0;
3466 jint _nameRemaining;
3467 GLchar* _name = (GLchar*)0;
3468
3469 if (!length_ref) {
3470 _exception = 1;
3471 _exceptionType = "java/lang/IllegalArgumentException";
3472 _exceptionMessage = "length == null";
3473 goto exit;
3474 }
3475 if (lengthOffset < 0) {
3476 _exception = 1;
3477 _exceptionType = "java/lang/IllegalArgumentException";
3478 _exceptionMessage = "lengthOffset < 0";
3479 goto exit;
3480 }
3481 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
3482 _length_base = (GLsizei*)_env->GetPrimitiveArrayCritical(
3483 length_ref, (jboolean*)0);
3484 _length = _length_base + lengthOffset;
3485
3486 if (!name_ref) {
3487 _exception = 1;
3488 _exceptionType = "java/lang/IllegalArgumentException";
3489 _exceptionMessage = "uniformBlockName == null";
3490 goto exit;
3491 }
3492 if (nameOffset < 0) {
3493 _exception = 1;
3494 _exceptionType = "java/lang/IllegalArgumentException";
3495 _exceptionMessage = "uniformBlockNameOffset < 0";
3496 goto exit;
3497 }
3498 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
3499 _name_base = (GLchar*)_env->GetPrimitiveArrayCritical(
3500 name_ref, (jboolean*)0);
3501 _name = _name_base + nameOffset;
3502
3503 glGetActiveUniformBlockName(
3504 (GLuint)program,
3505 (GLuint)uniformBlockIndex,
3506 (GLsizei)bufSize,
3507 (GLsizei*)_length,
3508 (GLchar*)_name
3509 );
3510
3511exit:
3512 if (_name_base) {
3513 _env->ReleasePrimitiveArrayCritical(name_ref, _name_base,
3514 _exception ? JNI_ABORT: 0);
3515 }
3516 if (_length_base) {
3517 _env->ReleasePrimitiveArrayCritical(length_ref, _length_base,
3518 _exception ? JNI_ABORT: 0);
3519 }
3520 if (_exception) {
3521 jniThrowException(_env, _exceptionType, _exceptionMessage);
3522 }
3523}
3524
3525/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3526static void
3527android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2
3528 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, jobject length_buf, jobject uniformBlockName_buf) {
3529 jint _exception = 0;
3530 const char* _exceptionType;
3531 const char* _exceptionMessage;
3532 jarray _lengthArray = (jarray)0;
3533 jint _lengthBufferOffset = (jint)0;
3534 GLsizei* _length = (GLsizei*)0;
3535 jint _lengthRemaining;
3536 jarray _nameArray = (jarray)0;
3537 jint _nameBufferOffset = (jint)0;
3538 GLchar* _name = (GLchar*)0;
3539 jint _nameRemaining;
3540
3541 _length = (GLsizei*)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
3542 if (_length == NULL) {
3543 GLsizei* _lengthBase = (GLsizei*)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean*)0);
3544 _length = (GLsizei*)(_lengthBase + _lengthBufferOffset);
3545 }
3546
3547 _name = (GLchar*)getPointer(_env, uniformBlockName_buf, &_nameArray, &_nameRemaining, &_nameBufferOffset);
3548 if (_name == NULL) {
3549 GLchar* _nameBase = (GLchar*)_env->GetPrimitiveArrayCritical(_nameArray, (jboolean*)0);
3550 _name = (GLchar*)(_nameBase + _nameBufferOffset);
3551 }
3552
3553 glGetActiveUniformBlockName(
3554 (GLuint)program,
3555 (GLuint)uniformBlockIndex,
3556 (GLsizei)_nameRemaining,
3557 _length, _name
3558 );
3559 if (_nameArray) {
3560 releasePointer(_env, _nameArray, _name, JNI_TRUE);
3561 }
3562 if (_lengthArray) {
3563 releasePointer(_env, _lengthArray, _length, JNI_TRUE);
3564 }
3565}
3566
3567/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */
3568static jstring
3569android_glGetActiveUniformBlockName_II
3570 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex) {
3571 GLint len = 0;
3572 glGetActiveUniformBlockiv((GLuint)program, (GLuint)uniformBlockIndex,
3573 GL_UNIFORM_BLOCK_NAME_LENGTH, &len);
3574 GLchar* name = (GLchar*)malloc(len);
3575 glGetActiveUniformBlockName((GLuint)program, (GLuint)uniformBlockIndex,
3576 len, NULL, name);
3577 jstring result = _env->NewStringUTF(name);
3578 free(name);
3579 return result;
3580}
3581
3582/* void glUniformBlockBinding ( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) */
3583static void
3584android_glUniformBlockBinding__III
3585 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint uniformBlockBinding) {
3586 glUniformBlockBinding(
3587 (GLuint)program,
3588 (GLuint)uniformBlockIndex,
3589 (GLuint)uniformBlockBinding
3590 );
3591}
3592
3593/* void glDrawArraysInstanced ( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) */
3594static void
3595android_glDrawArraysInstanced__IIII
3596 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count, jint instanceCount) {
3597 glDrawArraysInstanced(
3598 (GLenum)mode,
3599 (GLint)first,
3600 (GLsizei)count,
3601 (GLsizei)instanceCount
3602 );
3603}
3604
3605/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
3606static void
3607android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I
3608 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount) {
3609 jarray _array = (jarray) 0;
3610 jint _bufferOffset = (jint) 0;
3611 jint _remaining;
3612 GLvoid *indices = (GLvoid *) 0;
3613
3614 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
3615 if (indices == NULL) {
3616 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3617 indices = (GLvoid *) (_indicesBase + _bufferOffset);
3618 }
3619 glDrawElementsInstanced(
3620 (GLenum)mode,
3621 (GLsizei)count,
3622 (GLenum)type,
3623 (GLvoid *)indices,
3624 (GLsizei)instanceCount
3625 );
3626 if (_array) {
3627 releasePointer(_env, _array, indices, JNI_FALSE);
3628 }
3629}
3630
3631/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */
3632static void
3633android_glDrawElementsInstanced__IIIII
3634 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount) {
3635 glDrawElementsInstanced(
3636 (GLenum)mode,
3637 (GLsizei)count,
3638 (GLenum)type,
3639 (GLvoid *)indicesOffset,
3640 (GLsizei)instanceCount
3641 );
3642}
3643
3644/* GLsync glFenceSync ( GLenum condition, GLbitfield flags ) */
3645static jlong
3646android_glFenceSync__II
3647 (JNIEnv *_env, jobject _this, jint condition, jint flags) {
3648 GLsync _returnValue;
3649 _returnValue = glFenceSync(
3650 (GLenum)condition,
3651 (GLbitfield)flags
3652 );
3653 return (jlong)_returnValue;
3654}
3655
3656/* GLboolean glIsSync ( GLsync sync ) */
3657static jboolean
3658android_glIsSync__J
3659 (JNIEnv *_env, jobject _this, jlong sync) {
3660 GLboolean _returnValue;
3661 _returnValue = glIsSync(
3662 (GLsync)sync
3663 );
3664 return (jboolean)_returnValue;
3665}
3666
3667/* void glDeleteSync ( GLsync sync ) */
3668static void
3669android_glDeleteSync__J
3670 (JNIEnv *_env, jobject _this, jlong sync) {
3671 glDeleteSync(
3672 (GLsync)sync
3673 );
3674}
3675
3676/* GLenum glClientWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
3677static jint
3678android_glClientWaitSync__JIJ
3679 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
3680 GLenum _returnValue;
3681 _returnValue = glClientWaitSync(
3682 (GLsync)sync,
3683 (GLbitfield)flags,
3684 (GLuint64)timeout
3685 );
3686 return (jint)_returnValue;
3687}
3688
3689/* void glWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */
3690static void
3691android_glWaitSync__JIJ
3692 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) {
3693 glWaitSync(
3694 (GLsync)sync,
3695 (GLbitfield)flags,
3696 (GLuint64)timeout
3697 );
3698}
3699
3700/* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
3701static void
3702android_glGetInteger64v__I_3JI
3703 (JNIEnv *_env, jobject _this, jint pname, jlongArray params_ref, jint offset) {
3704 jint _exception = 0;
3705 const char * _exceptionType = NULL;
3706 const char * _exceptionMessage = NULL;
3707 GLint64 *params_base = (GLint64 *) 0;
3708 jint _remaining;
3709 GLint64 *params = (GLint64 *) 0;
3710
3711 if (!params_ref) {
3712 _exception = 1;
3713 _exceptionType = "java/lang/IllegalArgumentException";
3714 _exceptionMessage = "params == null";
3715 goto exit;
3716 }
3717 if (offset < 0) {
3718 _exception = 1;
3719 _exceptionType = "java/lang/IllegalArgumentException";
3720 _exceptionMessage = "offset < 0";
3721 goto exit;
3722 }
3723 _remaining = _env->GetArrayLength(params_ref) - offset;
3724 params_base = (GLint64 *)
3725 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3726 params = params_base + offset;
3727
3728 glGetInteger64v(
3729 (GLenum)pname,
3730 (GLint64 *)params
3731 );
3732
3733exit:
3734 if (params_base) {
3735 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3736 _exception ? JNI_ABORT: 0);
3737 }
3738 if (_exception) {
3739 jniThrowException(_env, _exceptionType, _exceptionMessage);
3740 }
3741}
3742
3743/* void glGetInteger64v ( GLenum pname, GLint64 *params ) */
3744static void
3745android_glGetInteger64v__ILjava_nio_LongBuffer_2
3746 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
3747 jarray _array = (jarray) 0;
3748 jint _bufferOffset = (jint) 0;
3749 jint _remaining;
3750 GLint64 *params = (GLint64 *) 0;
3751
3752 params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3753 if (params == NULL) {
3754 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3755 params = (GLint64 *) (_paramsBase + _bufferOffset);
3756 }
3757 glGetInteger64v(
3758 (GLenum)pname,
3759 (GLint64 *)params
3760 );
3761 if (_array) {
3762 releasePointer(_env, _array, params, JNI_TRUE);
3763 }
3764}
3765
3766/* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
3767static void
3768android_glGetSynciv__JII_3II_3II
3769 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray values_ref, jint valuesOffset) {
3770 jint _exception = 0;
3771 const char * _exceptionType = NULL;
3772 const char * _exceptionMessage = NULL;
3773 GLsizei *length_base = (GLsizei *) 0;
3774 jint _lengthRemaining;
3775 GLsizei *length = (GLsizei *) 0;
3776 GLint *values_base = (GLint *) 0;
3777 jint _valuesRemaining;
3778 GLint *values = (GLint *) 0;
3779
3780 if (!length_ref) {
3781 _exception = 1;
3782 _exceptionType = "java/lang/IllegalArgumentException";
3783 _exceptionMessage = "length == null";
3784 goto exit;
3785 }
3786 if (lengthOffset < 0) {
3787 _exception = 1;
3788 _exceptionType = "java/lang/IllegalArgumentException";
3789 _exceptionMessage = "lengthOffset < 0";
3790 goto exit;
3791 }
3792 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
3793 length_base = (GLsizei *)
3794 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
3795 length = length_base + lengthOffset;
3796
3797 if (!values_ref) {
3798 _exception = 1;
3799 _exceptionType = "java/lang/IllegalArgumentException";
3800 _exceptionMessage = "values == null";
3801 goto exit;
3802 }
3803 if (valuesOffset < 0) {
3804 _exception = 1;
3805 _exceptionType = "java/lang/IllegalArgumentException";
3806 _exceptionMessage = "valuesOffset < 0";
3807 goto exit;
3808 }
3809 _valuesRemaining = _env->GetArrayLength(values_ref) - valuesOffset;
3810 values_base = (GLint *)
3811 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
3812 values = values_base + valuesOffset;
3813
3814 glGetSynciv(
3815 (GLsync)sync,
3816 (GLenum)pname,
3817 (GLsizei)bufSize,
3818 (GLsizei *)length,
3819 (GLint *)values
3820 );
3821
3822exit:
3823 if (values_base) {
3824 _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
3825 _exception ? JNI_ABORT: 0);
3826 }
3827 if (length_base) {
3828 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
3829 _exception ? JNI_ABORT: 0);
3830 }
3831 if (_exception) {
3832 jniThrowException(_env, _exceptionType, _exceptionMessage);
3833 }
3834}
3835
3836/* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */
3837static void
3838android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
3839 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jobject length_buf, jobject values_buf) {
3840 jarray _lengthArray = (jarray) 0;
3841 jint _lengthBufferOffset = (jint) 0;
3842 jarray _valuesArray = (jarray) 0;
3843 jint _valuesBufferOffset = (jint) 0;
3844 jint _lengthRemaining;
3845 GLsizei *length = (GLsizei *) 0;
3846 jint _valuesRemaining;
3847 GLint *values = (GLint *) 0;
3848
3849 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
3850 values = (GLint *)getPointer(_env, values_buf, &_valuesArray, &_valuesRemaining, &_valuesBufferOffset);
3851 if (length == NULL) {
3852 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
3853 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
3854 }
3855 if (values == NULL) {
3856 char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_valuesArray, (jboolean *) 0);
3857 values = (GLint *) (_valuesBase + _valuesBufferOffset);
3858 }
3859 glGetSynciv(
3860 (GLsync)sync,
3861 (GLenum)pname,
3862 (GLsizei)bufSize,
3863 (GLsizei *)length,
3864 (GLint *)values
3865 );
3866 if (_valuesArray) {
3867 releasePointer(_env, _valuesArray, values, JNI_TRUE);
3868 }
3869 if (_lengthArray) {
3870 releasePointer(_env, _lengthArray, length, JNI_TRUE);
3871 }
3872}
3873
3874/* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
3875static void
3876android_glGetInteger64i_v__II_3JI
3877 (JNIEnv *_env, jobject _this, jint target, jint index, jlongArray data_ref, jint offset) {
3878 jint _exception = 0;
3879 const char * _exceptionType = NULL;
3880 const char * _exceptionMessage = NULL;
3881 GLint64 *data_base = (GLint64 *) 0;
3882 jint _remaining;
3883 GLint64 *data = (GLint64 *) 0;
3884
3885 if (!data_ref) {
3886 _exception = 1;
3887 _exceptionType = "java/lang/IllegalArgumentException";
3888 _exceptionMessage = "data == null";
3889 goto exit;
3890 }
3891 if (offset < 0) {
3892 _exception = 1;
3893 _exceptionType = "java/lang/IllegalArgumentException";
3894 _exceptionMessage = "offset < 0";
3895 goto exit;
3896 }
3897 _remaining = _env->GetArrayLength(data_ref) - offset;
3898 data_base = (GLint64 *)
3899 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
3900 data = data_base + offset;
3901
3902 glGetInteger64i_v(
3903 (GLenum)target,
3904 (GLuint)index,
3905 (GLint64 *)data
3906 );
3907
3908exit:
3909 if (data_base) {
3910 _env->ReleasePrimitiveArrayCritical(data_ref, data_base,
3911 _exception ? JNI_ABORT: 0);
3912 }
3913 if (_exception) {
3914 jniThrowException(_env, _exceptionType, _exceptionMessage);
3915 }
3916}
3917
3918/* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */
3919static void
3920android_glGetInteger64i_v__IILjava_nio_LongBuffer_2
3921 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
3922 jarray _array = (jarray) 0;
3923 jint _bufferOffset = (jint) 0;
3924 jint _remaining;
3925 GLint64 *data = (GLint64 *) 0;
3926
3927 data = (GLint64 *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
3928 if (data == NULL) {
3929 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3930 data = (GLint64 *) (_dataBase + _bufferOffset);
3931 }
3932 glGetInteger64i_v(
3933 (GLenum)target,
3934 (GLuint)index,
3935 (GLint64 *)data
3936 );
3937 if (_array) {
3938 releasePointer(_env, _array, data, JNI_TRUE);
3939 }
3940}
3941
3942/* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
3943static void
3944android_glGetBufferParameteri64v__II_3JI
3945 (JNIEnv *_env, jobject _this, jint target, jint pname, jlongArray params_ref, jint offset) {
3946 jint _exception = 0;
3947 const char * _exceptionType = NULL;
3948 const char * _exceptionMessage = NULL;
3949 GLint64 *params_base = (GLint64 *) 0;
3950 jint _remaining;
3951 GLint64 *params = (GLint64 *) 0;
3952
3953 if (!params_ref) {
3954 _exception = 1;
3955 _exceptionType = "java/lang/IllegalArgumentException";
3956 _exceptionMessage = "params == null";
3957 goto exit;
3958 }
3959 if (offset < 0) {
3960 _exception = 1;
3961 _exceptionType = "java/lang/IllegalArgumentException";
3962 _exceptionMessage = "offset < 0";
3963 goto exit;
3964 }
3965 _remaining = _env->GetArrayLength(params_ref) - offset;
3966 params_base = (GLint64 *)
3967 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3968 params = params_base + offset;
3969
3970 glGetBufferParameteri64v(
3971 (GLenum)target,
3972 (GLenum)pname,
3973 (GLint64 *)params
3974 );
3975
3976exit:
3977 if (params_base) {
3978 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3979 _exception ? JNI_ABORT: 0);
3980 }
3981 if (_exception) {
3982 jniThrowException(_env, _exceptionType, _exceptionMessage);
3983 }
3984}
3985
3986/* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */
3987static void
3988android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2
3989 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3990 jarray _array = (jarray) 0;
3991 jint _bufferOffset = (jint) 0;
3992 jint _remaining;
3993 GLint64 *params = (GLint64 *) 0;
3994
3995 params = (GLint64 *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3996 if (params == NULL) {
3997 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3998 params = (GLint64 *) (_paramsBase + _bufferOffset);
3999 }
4000 glGetBufferParameteri64v(
4001 (GLenum)target,
4002 (GLenum)pname,
4003 (GLint64 *)params
4004 );
4005 if (_array) {
4006 releasePointer(_env, _array, params, JNI_TRUE);
4007 }
4008}
4009
4010/* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
4011static void
4012android_glGenSamplers__I_3II
4013 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
4014 jint _exception = 0;
4015 const char * _exceptionType = NULL;
4016 const char * _exceptionMessage = NULL;
4017 GLuint *samplers_base = (GLuint *) 0;
4018 jint _remaining;
4019 GLuint *samplers = (GLuint *) 0;
4020
4021 if (!samplers_ref) {
4022 _exception = 1;
4023 _exceptionType = "java/lang/IllegalArgumentException";
4024 _exceptionMessage = "samplers == null";
4025 goto exit;
4026 }
4027 if (offset < 0) {
4028 _exception = 1;
4029 _exceptionType = "java/lang/IllegalArgumentException";
4030 _exceptionMessage = "offset < 0";
4031 goto exit;
4032 }
4033 _remaining = _env->GetArrayLength(samplers_ref) - offset;
4034 samplers_base = (GLuint *)
4035 _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
4036 samplers = samplers_base + offset;
4037
4038 glGenSamplers(
4039 (GLsizei)count,
4040 (GLuint *)samplers
4041 );
4042
4043exit:
4044 if (samplers_base) {
4045 _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
4046 _exception ? JNI_ABORT: 0);
4047 }
4048 if (_exception) {
4049 jniThrowException(_env, _exceptionType, _exceptionMessage);
4050 }
4051}
4052
4053/* void glGenSamplers ( GLsizei count, GLuint *samplers ) */
4054static void
4055android_glGenSamplers__ILjava_nio_IntBuffer_2
4056 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
4057 jarray _array = (jarray) 0;
4058 jint _bufferOffset = (jint) 0;
4059 jint _remaining;
4060 GLuint *samplers = (GLuint *) 0;
4061
4062 samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
4063 if (samplers == NULL) {
4064 char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4065 samplers = (GLuint *) (_samplersBase + _bufferOffset);
4066 }
4067 glGenSamplers(
4068 (GLsizei)count,
4069 (GLuint *)samplers
4070 );
4071 if (_array) {
4072 releasePointer(_env, _array, samplers, JNI_TRUE);
4073 }
4074}
4075
4076/* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
4077static void
4078android_glDeleteSamplers__I_3II
4079 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) {
4080 jint _exception = 0;
4081 const char * _exceptionType = NULL;
4082 const char * _exceptionMessage = NULL;
4083 GLuint *samplers_base = (GLuint *) 0;
4084 jint _remaining;
4085 GLuint *samplers = (GLuint *) 0;
4086
4087 if (!samplers_ref) {
4088 _exception = 1;
4089 _exceptionType = "java/lang/IllegalArgumentException";
4090 _exceptionMessage = "samplers == null";
4091 goto exit;
4092 }
4093 if (offset < 0) {
4094 _exception = 1;
4095 _exceptionType = "java/lang/IllegalArgumentException";
4096 _exceptionMessage = "offset < 0";
4097 goto exit;
4098 }
4099 _remaining = _env->GetArrayLength(samplers_ref) - offset;
4100 samplers_base = (GLuint *)
4101 _env->GetPrimitiveArrayCritical(samplers_ref, (jboolean *)0);
4102 samplers = samplers_base + offset;
4103
4104 glDeleteSamplers(
4105 (GLsizei)count,
4106 (GLuint *)samplers
4107 );
4108
4109exit:
4110 if (samplers_base) {
4111 _env->ReleasePrimitiveArrayCritical(samplers_ref, samplers_base,
4112 JNI_ABORT);
4113 }
4114 if (_exception) {
4115 jniThrowException(_env, _exceptionType, _exceptionMessage);
4116 }
4117}
4118
4119/* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */
4120static void
4121android_glDeleteSamplers__ILjava_nio_IntBuffer_2
4122 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) {
4123 jarray _array = (jarray) 0;
4124 jint _bufferOffset = (jint) 0;
4125 jint _remaining;
4126 GLuint *samplers = (GLuint *) 0;
4127
4128 samplers = (GLuint *)getPointer(_env, samplers_buf, &_array, &_remaining, &_bufferOffset);
4129 if (samplers == NULL) {
4130 char * _samplersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4131 samplers = (GLuint *) (_samplersBase + _bufferOffset);
4132 }
4133 glDeleteSamplers(
4134 (GLsizei)count,
4135 (GLuint *)samplers
4136 );
4137 if (_array) {
4138 releasePointer(_env, _array, samplers, JNI_FALSE);
4139 }
4140}
4141
4142/* GLboolean glIsSampler ( GLuint sampler ) */
4143static jboolean
4144android_glIsSampler__I
4145 (JNIEnv *_env, jobject _this, jint sampler) {
4146 GLboolean _returnValue;
4147 _returnValue = glIsSampler(
4148 (GLuint)sampler
4149 );
4150 return (jboolean)_returnValue;
4151}
4152
4153/* void glBindSampler ( GLuint unit, GLuint sampler ) */
4154static void
4155android_glBindSampler__II
4156 (JNIEnv *_env, jobject _this, jint unit, jint sampler) {
4157 glBindSampler(
4158 (GLuint)unit,
4159 (GLuint)sampler
4160 );
4161}
4162
4163/* void glSamplerParameteri ( GLuint sampler, GLenum pname, GLint param ) */
4164static void
4165android_glSamplerParameteri__III
4166 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jint param) {
4167 glSamplerParameteri(
4168 (GLuint)sampler,
4169 (GLenum)pname,
4170 (GLint)param
4171 );
4172}
4173
4174/* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
4175static void
4176android_glSamplerParameteriv__II_3II
4177 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) {
4178 jint _exception = 0;
4179 const char * _exceptionType = NULL;
4180 const char * _exceptionMessage = NULL;
4181 GLint *param_base = (GLint *) 0;
4182 jint _remaining;
4183 GLint *param = (GLint *) 0;
4184
4185 if (!param_ref) {
4186 _exception = 1;
4187 _exceptionType = "java/lang/IllegalArgumentException";
4188 _exceptionMessage = "param == null";
4189 goto exit;
4190 }
4191 if (offset < 0) {
4192 _exception = 1;
4193 _exceptionType = "java/lang/IllegalArgumentException";
4194 _exceptionMessage = "offset < 0";
4195 goto exit;
4196 }
4197 _remaining = _env->GetArrayLength(param_ref) - offset;
4198 param_base = (GLint *)
4199 _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
4200 param = param_base + offset;
4201
4202 glSamplerParameteriv(
4203 (GLuint)sampler,
4204 (GLenum)pname,
4205 (GLint *)param
4206 );
4207
4208exit:
4209 if (param_base) {
4210 _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
4211 JNI_ABORT);
4212 }
4213 if (_exception) {
4214 jniThrowException(_env, _exceptionType, _exceptionMessage);
4215 }
4216}
4217
4218/* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */
4219static void
4220android_glSamplerParameteriv__IILjava_nio_IntBuffer_2
4221 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
4222 jarray _array = (jarray) 0;
4223 jint _bufferOffset = (jint) 0;
4224 jint _remaining;
4225 GLint *param = (GLint *) 0;
4226
4227 param = (GLint *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
4228 if (param == NULL) {
4229 char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4230 param = (GLint *) (_paramBase + _bufferOffset);
4231 }
4232 glSamplerParameteriv(
4233 (GLuint)sampler,
4234 (GLenum)pname,
4235 (GLint *)param
4236 );
4237 if (_array) {
4238 releasePointer(_env, _array, param, JNI_FALSE);
4239 }
4240}
4241
4242/* void glSamplerParameterf ( GLuint sampler, GLenum pname, GLfloat param ) */
4243static void
4244android_glSamplerParameterf__IIF
4245 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloat param) {
4246 glSamplerParameterf(
4247 (GLuint)sampler,
4248 (GLenum)pname,
4249 (GLfloat)param
4250 );
4251}
4252
4253/* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
4254static void
4255android_glSamplerParameterfv__II_3FI
4256 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray param_ref, jint offset) {
4257 jint _exception = 0;
4258 const char * _exceptionType = NULL;
4259 const char * _exceptionMessage = NULL;
4260 GLfloat *param_base = (GLfloat *) 0;
4261 jint _remaining;
4262 GLfloat *param = (GLfloat *) 0;
4263
4264 if (!param_ref) {
4265 _exception = 1;
4266 _exceptionType = "java/lang/IllegalArgumentException";
4267 _exceptionMessage = "param == null";
4268 goto exit;
4269 }
4270 if (offset < 0) {
4271 _exception = 1;
4272 _exceptionType = "java/lang/IllegalArgumentException";
4273 _exceptionMessage = "offset < 0";
4274 goto exit;
4275 }
4276 _remaining = _env->GetArrayLength(param_ref) - offset;
4277 param_base = (GLfloat *)
4278 _env->GetPrimitiveArrayCritical(param_ref, (jboolean *)0);
4279 param = param_base + offset;
4280
4281 glSamplerParameterfv(
4282 (GLuint)sampler,
4283 (GLenum)pname,
4284 (GLfloat *)param
4285 );
4286
4287exit:
4288 if (param_base) {
4289 _env->ReleasePrimitiveArrayCritical(param_ref, param_base,
4290 JNI_ABORT);
4291 }
4292 if (_exception) {
4293 jniThrowException(_env, _exceptionType, _exceptionMessage);
4294 }
4295}
4296
4297/* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */
4298static void
4299android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2
4300 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
4301 jarray _array = (jarray) 0;
4302 jint _bufferOffset = (jint) 0;
4303 jint _remaining;
4304 GLfloat *param = (GLfloat *) 0;
4305
4306 param = (GLfloat *)getPointer(_env, param_buf, &_array, &_remaining, &_bufferOffset);
4307 if (param == NULL) {
4308 char * _paramBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4309 param = (GLfloat *) (_paramBase + _bufferOffset);
4310 }
4311 glSamplerParameterfv(
4312 (GLuint)sampler,
4313 (GLenum)pname,
4314 (GLfloat *)param
4315 );
4316 if (_array) {
4317 releasePointer(_env, _array, param, JNI_FALSE);
4318 }
4319}
4320
4321/* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
4322static void
4323android_glGetSamplerParameteriv__II_3II
4324 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) {
4325 jint _exception = 0;
4326 const char * _exceptionType = NULL;
4327 const char * _exceptionMessage = NULL;
4328 GLint *params_base = (GLint *) 0;
4329 jint _remaining;
4330 GLint *params = (GLint *) 0;
4331
4332 if (!params_ref) {
4333 _exception = 1;
4334 _exceptionType = "java/lang/IllegalArgumentException";
4335 _exceptionMessage = "params == null";
4336 goto exit;
4337 }
4338 if (offset < 0) {
4339 _exception = 1;
4340 _exceptionType = "java/lang/IllegalArgumentException";
4341 _exceptionMessage = "offset < 0";
4342 goto exit;
4343 }
4344 _remaining = _env->GetArrayLength(params_ref) - offset;
4345 params_base = (GLint *)
4346 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4347 params = params_base + offset;
4348
4349 glGetSamplerParameteriv(
4350 (GLuint)sampler,
4351 (GLenum)pname,
4352 (GLint *)params
4353 );
4354
4355exit:
4356 if (params_base) {
4357 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4358 _exception ? JNI_ABORT: 0);
4359 }
4360 if (_exception) {
4361 jniThrowException(_env, _exceptionType, _exceptionMessage);
4362 }
4363}
4364
4365/* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */
4366static void
4367android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2
4368 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
4369 jarray _array = (jarray) 0;
4370 jint _bufferOffset = (jint) 0;
4371 jint _remaining;
4372 GLint *params = (GLint *) 0;
4373
4374 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
4375 if (params == NULL) {
4376 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4377 params = (GLint *) (_paramsBase + _bufferOffset);
4378 }
4379 glGetSamplerParameteriv(
4380 (GLuint)sampler,
4381 (GLenum)pname,
4382 (GLint *)params
4383 );
4384 if (_array) {
4385 releasePointer(_env, _array, params, JNI_TRUE);
4386 }
4387}
4388
4389/* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
4390static void
4391android_glGetSamplerParameterfv__II_3FI
4392 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray params_ref, jint offset) {
4393 jint _exception = 0;
4394 const char * _exceptionType = NULL;
4395 const char * _exceptionMessage = NULL;
4396 GLfloat *params_base = (GLfloat *) 0;
4397 jint _remaining;
4398 GLfloat *params = (GLfloat *) 0;
4399
4400 if (!params_ref) {
4401 _exception = 1;
4402 _exceptionType = "java/lang/IllegalArgumentException";
4403 _exceptionMessage = "params == null";
4404 goto exit;
4405 }
4406 if (offset < 0) {
4407 _exception = 1;
4408 _exceptionType = "java/lang/IllegalArgumentException";
4409 _exceptionMessage = "offset < 0";
4410 goto exit;
4411 }
4412 _remaining = _env->GetArrayLength(params_ref) - offset;
4413 params_base = (GLfloat *)
4414 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4415 params = params_base + offset;
4416
4417 glGetSamplerParameterfv(
4418 (GLuint)sampler,
4419 (GLenum)pname,
4420 (GLfloat *)params
4421 );
4422
4423exit:
4424 if (params_base) {
4425 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4426 _exception ? JNI_ABORT: 0);
4427 }
4428 if (_exception) {
4429 jniThrowException(_env, _exceptionType, _exceptionMessage);
4430 }
4431}
4432
4433/* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */
4434static void
4435android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2
4436 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
4437 jarray _array = (jarray) 0;
4438 jint _bufferOffset = (jint) 0;
4439 jint _remaining;
4440 GLfloat *params = (GLfloat *) 0;
4441
4442 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
4443 if (params == NULL) {
4444 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4445 params = (GLfloat *) (_paramsBase + _bufferOffset);
4446 }
4447 glGetSamplerParameterfv(
4448 (GLuint)sampler,
4449 (GLenum)pname,
4450 (GLfloat *)params
4451 );
4452 if (_array) {
4453 releasePointer(_env, _array, params, JNI_TRUE);
4454 }
4455}
4456
4457/* void glVertexAttribDivisor ( GLuint index, GLuint divisor ) */
4458static void
4459android_glVertexAttribDivisor__II
4460 (JNIEnv *_env, jobject _this, jint index, jint divisor) {
4461 glVertexAttribDivisor(
4462 (GLuint)index,
4463 (GLuint)divisor
4464 );
4465}
4466
4467/* void glBindTransformFeedback ( GLenum target, GLuint id ) */
4468static void
4469android_glBindTransformFeedback__II
4470 (JNIEnv *_env, jobject _this, jint target, jint id) {
4471 glBindTransformFeedback(
4472 (GLenum)target,
4473 (GLuint)id
4474 );
4475}
4476
4477/* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
4478static void
4479android_glDeleteTransformFeedbacks__I_3II
4480 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
4481 jint _exception = 0;
4482 const char * _exceptionType = NULL;
4483 const char * _exceptionMessage = NULL;
4484 GLuint *ids_base = (GLuint *) 0;
4485 jint _remaining;
4486 GLuint *ids = (GLuint *) 0;
4487
4488 if (!ids_ref) {
4489 _exception = 1;
4490 _exceptionType = "java/lang/IllegalArgumentException";
4491 _exceptionMessage = "ids == null";
4492 goto exit;
4493 }
4494 if (offset < 0) {
4495 _exception = 1;
4496 _exceptionType = "java/lang/IllegalArgumentException";
4497 _exceptionMessage = "offset < 0";
4498 goto exit;
4499 }
4500 _remaining = _env->GetArrayLength(ids_ref) - offset;
4501 ids_base = (GLuint *)
4502 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
4503 ids = ids_base + offset;
4504
4505 glDeleteTransformFeedbacks(
4506 (GLsizei)n,
4507 (GLuint *)ids
4508 );
4509
4510exit:
4511 if (ids_base) {
4512 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
4513 JNI_ABORT);
4514 }
4515 if (_exception) {
4516 jniThrowException(_env, _exceptionType, _exceptionMessage);
4517 }
4518}
4519
4520/* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */
4521static void
4522android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2
4523 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
4524 jarray _array = (jarray) 0;
4525 jint _bufferOffset = (jint) 0;
4526 jint _remaining;
4527 GLuint *ids = (GLuint *) 0;
4528
4529 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
4530 if (ids == NULL) {
4531 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4532 ids = (GLuint *) (_idsBase + _bufferOffset);
4533 }
4534 glDeleteTransformFeedbacks(
4535 (GLsizei)n,
4536 (GLuint *)ids
4537 );
4538 if (_array) {
4539 releasePointer(_env, _array, ids, JNI_FALSE);
4540 }
4541}
4542
4543/* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
4544static void
4545android_glGenTransformFeedbacks__I_3II
4546 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
4547 jint _exception = 0;
4548 const char * _exceptionType = NULL;
4549 const char * _exceptionMessage = NULL;
4550 GLuint *ids_base = (GLuint *) 0;
4551 jint _remaining;
4552 GLuint *ids = (GLuint *) 0;
4553
4554 if (!ids_ref) {
4555 _exception = 1;
4556 _exceptionType = "java/lang/IllegalArgumentException";
4557 _exceptionMessage = "ids == null";
4558 goto exit;
4559 }
4560 if (offset < 0) {
4561 _exception = 1;
4562 _exceptionType = "java/lang/IllegalArgumentException";
4563 _exceptionMessage = "offset < 0";
4564 goto exit;
4565 }
4566 _remaining = _env->GetArrayLength(ids_ref) - offset;
4567 ids_base = (GLuint *)
4568 _env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
4569 ids = ids_base + offset;
4570
4571 glGenTransformFeedbacks(
4572 (GLsizei)n,
4573 (GLuint *)ids
4574 );
4575
4576exit:
4577 if (ids_base) {
4578 _env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
4579 _exception ? JNI_ABORT: 0);
4580 }
4581 if (_exception) {
4582 jniThrowException(_env, _exceptionType, _exceptionMessage);
4583 }
4584}
4585
4586/* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */
4587static void
4588android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2
4589 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
4590 jarray _array = (jarray) 0;
4591 jint _bufferOffset = (jint) 0;
4592 jint _remaining;
4593 GLuint *ids = (GLuint *) 0;
4594
4595 ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
4596 if (ids == NULL) {
4597 char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4598 ids = (GLuint *) (_idsBase + _bufferOffset);
4599 }
4600 glGenTransformFeedbacks(
4601 (GLsizei)n,
4602 (GLuint *)ids
4603 );
4604 if (_array) {
4605 releasePointer(_env, _array, ids, JNI_TRUE);
4606 }
4607}
4608
4609/* GLboolean glIsTransformFeedback ( GLuint id ) */
4610static jboolean
4611android_glIsTransformFeedback__I
4612 (JNIEnv *_env, jobject _this, jint id) {
4613 GLboolean _returnValue;
4614 _returnValue = glIsTransformFeedback(
4615 (GLuint)id
4616 );
4617 return (jboolean)_returnValue;
4618}
4619
4620/* void glPauseTransformFeedback ( void ) */
4621static void
4622android_glPauseTransformFeedback__
4623 (JNIEnv *_env, jobject _this) {
4624 glPauseTransformFeedback();
4625}
4626
4627/* void glResumeTransformFeedback ( void ) */
4628static void
4629android_glResumeTransformFeedback__
4630 (JNIEnv *_env, jobject _this) {
4631 glResumeTransformFeedback();
4632}
4633
4634/* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
4635static void
4636android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2
4637 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray binaryFormat_ref, jint binaryFormatOffset, jobject binary_buf) {
4638 jint _exception = 0;
4639 const char * _exceptionType = NULL;
4640 const char * _exceptionMessage = NULL;
4641 jarray _array = (jarray) 0;
4642 jint _bufferOffset = (jint) 0;
4643 GLsizei *length_base = (GLsizei *) 0;
4644 jint _lengthRemaining;
4645 GLsizei *length = (GLsizei *) 0;
4646 GLenum *binaryFormat_base = (GLenum *) 0;
4647 jint _binaryFormatRemaining;
4648 GLenum *binaryFormat = (GLenum *) 0;
4649 jint _binaryRemaining;
4650 GLvoid *binary = (GLvoid *) 0;
4651
4652 if (!length_ref) {
4653 _exception = 1;
4654 _exceptionType = "java/lang/IllegalArgumentException";
4655 _exceptionMessage = "length == null";
4656 goto exit;
4657 }
4658 if (lengthOffset < 0) {
4659 _exception = 1;
4660 _exceptionType = "java/lang/IllegalArgumentException";
4661 _exceptionMessage = "lengthOffset < 0";
4662 goto exit;
4663 }
4664 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
4665 length_base = (GLsizei *)
4666 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
4667 length = length_base + lengthOffset;
4668
4669 if (!binaryFormat_ref) {
4670 _exception = 1;
4671 _exceptionType = "java/lang/IllegalArgumentException";
4672 _exceptionMessage = "binaryFormat == null";
4673 goto exit;
4674 }
4675 if (binaryFormatOffset < 0) {
4676 _exception = 1;
4677 _exceptionType = "java/lang/IllegalArgumentException";
4678 _exceptionMessage = "binaryFormatOffset < 0";
4679 goto exit;
4680 }
4681 _binaryFormatRemaining = _env->GetArrayLength(binaryFormat_ref) - binaryFormatOffset;
4682 binaryFormat_base = (GLenum *)
4683 _env->GetPrimitiveArrayCritical(binaryFormat_ref, (jboolean *)0);
4684 binaryFormat = binaryFormat_base + binaryFormatOffset;
4685
4686 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining, &_bufferOffset);
4687 if (binary == NULL) {
4688 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4689 binary = (GLvoid *) (_binaryBase + _bufferOffset);
4690 }
4691 glGetProgramBinary(
4692 (GLuint)program,
4693 (GLsizei)bufSize,
4694 (GLsizei *)length,
4695 (GLenum *)binaryFormat,
4696 (GLvoid *)binary
4697 );
4698
4699exit:
4700 if (_array) {
4701 releasePointer(_env, _array, binary, _exception ? JNI_FALSE : JNI_TRUE);
4702 }
4703 if (binaryFormat_base) {
4704 _env->ReleasePrimitiveArrayCritical(binaryFormat_ref, binaryFormat_base,
4705 _exception ? JNI_ABORT: 0);
4706 }
4707 if (length_base) {
4708 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
4709 _exception ? JNI_ABORT: 0);
4710 }
4711 if (_exception) {
4712 jniThrowException(_env, _exceptionType, _exceptionMessage);
4713 }
4714}
4715
4716/* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */
4717static void
4718android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2
4719 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jobject length_buf, jobject binaryFormat_buf, jobject binary_buf) {
4720 jarray _lengthArray = (jarray) 0;
4721 jint _lengthBufferOffset = (jint) 0;
4722 jarray _binaryFormatArray = (jarray) 0;
4723 jint _binaryFormatBufferOffset = (jint) 0;
4724 jarray _binaryArray = (jarray) 0;
4725 jint _binaryBufferOffset = (jint) 0;
4726 jint _lengthRemaining;
4727 GLsizei *length = (GLsizei *) 0;
4728 jint _binaryFormatRemaining;
4729 GLenum *binaryFormat = (GLenum *) 0;
4730 jint _binaryRemaining;
4731 GLvoid *binary = (GLvoid *) 0;
4732
4733 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
4734 binaryFormat = (GLenum *)getPointer(_env, binaryFormat_buf, &_binaryFormatArray, &_binaryFormatRemaining, &_binaryFormatBufferOffset);
4735 binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining, &_binaryBufferOffset);
4736 if (length == NULL) {
4737 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
4738 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
4739 }
4740 if (binaryFormat == NULL) {
4741 char * _binaryFormatBase = (char *)_env->GetPrimitiveArrayCritical(_binaryFormatArray, (jboolean *) 0);
4742 binaryFormat = (GLenum *) (_binaryFormatBase + _binaryFormatBufferOffset);
4743 }
4744 if (binary == NULL) {
4745 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_binaryArray, (jboolean *) 0);
4746 binary = (GLvoid *) (_binaryBase + _binaryBufferOffset);
4747 }
4748 glGetProgramBinary(
4749 (GLuint)program,
4750 (GLsizei)bufSize,
4751 (GLsizei *)length,
4752 (GLenum *)binaryFormat,
4753 (GLvoid *)binary
4754 );
4755 if (_binaryArray) {
4756 releasePointer(_env, _binaryArray, binary, JNI_TRUE);
4757 }
4758 if (_binaryFormatArray) {
4759 releasePointer(_env, _binaryFormatArray, binaryFormat, JNI_TRUE);
4760 }
4761 if (_lengthArray) {
4762 releasePointer(_env, _lengthArray, length, JNI_TRUE);
4763 }
4764}
4765
4766/* void glProgramBinary ( GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length ) */
4767static void
4768android_glProgramBinary__IILjava_nio_Buffer_2I
4769 (JNIEnv *_env, jobject _this, jint program, jint binaryFormat, jobject binary_buf, jint length) {
4770 jarray _array = (jarray) 0;
4771 jint _bufferOffset = (jint) 0;
4772 jint _remaining;
4773 GLvoid *binary = (GLvoid *) 0;
4774
4775 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_remaining, &_bufferOffset);
4776 if (binary == NULL) {
4777 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4778 binary = (GLvoid *) (_binaryBase + _bufferOffset);
4779 }
4780 glProgramBinary(
4781 (GLuint)program,
4782 (GLenum)binaryFormat,
4783 (GLvoid *)binary,
4784 (GLsizei)length
4785 );
4786 if (_array) {
4787 releasePointer(_env, _array, binary, JNI_FALSE);
4788 }
4789}
4790
4791/* void glProgramParameteri ( GLuint program, GLenum pname, GLint value ) */
4792static void
4793android_glProgramParameteri__III
4794 (JNIEnv *_env, jobject _this, jint program, jint pname, jint value) {
4795 glProgramParameteri(
4796 (GLuint)program,
4797 (GLenum)pname,
4798 (GLint)value
4799 );
4800}
4801
4802/* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
4803static void
4804android_glInvalidateFramebuffer__II_3II
4805 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset) {
4806 jint _exception = 0;
4807 const char * _exceptionType = NULL;
4808 const char * _exceptionMessage = NULL;
4809 GLenum *attachments_base = (GLenum *) 0;
4810 jint _remaining;
4811 GLenum *attachments = (GLenum *) 0;
4812
4813 if (!attachments_ref) {
4814 _exception = 1;
4815 _exceptionType = "java/lang/IllegalArgumentException";
4816 _exceptionMessage = "attachments == null";
4817 goto exit;
4818 }
4819 if (offset < 0) {
4820 _exception = 1;
4821 _exceptionType = "java/lang/IllegalArgumentException";
4822 _exceptionMessage = "offset < 0";
4823 goto exit;
4824 }
4825 _remaining = _env->GetArrayLength(attachments_ref) - offset;
4826 attachments_base = (GLenum *)
4827 _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
4828 attachments = attachments_base + offset;
4829
4830 glInvalidateFramebuffer(
4831 (GLenum)target,
4832 (GLsizei)numAttachments,
4833 (GLenum *)attachments
4834 );
4835
4836exit:
4837 if (attachments_base) {
4838 _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
4839 JNI_ABORT);
4840 }
4841 if (_exception) {
4842 jniThrowException(_env, _exceptionType, _exceptionMessage);
4843 }
4844}
4845
4846/* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */
4847static void
4848android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2
4849 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf) {
4850 jarray _array = (jarray) 0;
4851 jint _bufferOffset = (jint) 0;
4852 jint _remaining;
4853 GLenum *attachments = (GLenum *) 0;
4854
4855 attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
4856 if (attachments == NULL) {
4857 char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4858 attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
4859 }
4860 glInvalidateFramebuffer(
4861 (GLenum)target,
4862 (GLsizei)numAttachments,
4863 (GLenum *)attachments
4864 );
4865 if (_array) {
4866 releasePointer(_env, _array, attachments, JNI_FALSE);
4867 }
4868}
4869
4870/* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
4871static void
4872android_glInvalidateSubFramebuffer__II_3IIIIII
4873 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset, jint x, jint y, jint width, jint height) {
4874 jint _exception = 0;
4875 const char * _exceptionType = NULL;
4876 const char * _exceptionMessage = NULL;
4877 GLenum *attachments_base = (GLenum *) 0;
4878 jint _remaining;
4879 GLenum *attachments = (GLenum *) 0;
4880
4881 if (!attachments_ref) {
4882 _exception = 1;
4883 _exceptionType = "java/lang/IllegalArgumentException";
4884 _exceptionMessage = "attachments == null";
4885 goto exit;
4886 }
4887 if (offset < 0) {
4888 _exception = 1;
4889 _exceptionType = "java/lang/IllegalArgumentException";
4890 _exceptionMessage = "offset < 0";
4891 goto exit;
4892 }
4893 _remaining = _env->GetArrayLength(attachments_ref) - offset;
4894 attachments_base = (GLenum *)
4895 _env->GetPrimitiveArrayCritical(attachments_ref, (jboolean *)0);
4896 attachments = attachments_base + offset;
4897
4898 glInvalidateSubFramebuffer(
4899 (GLenum)target,
4900 (GLsizei)numAttachments,
4901 (GLenum *)attachments,
4902 (GLint)x,
4903 (GLint)y,
4904 (GLsizei)width,
4905 (GLsizei)height
4906 );
4907
4908exit:
4909 if (attachments_base) {
4910 _env->ReleasePrimitiveArrayCritical(attachments_ref, attachments_base,
4911 JNI_ABORT);
4912 }
4913 if (_exception) {
4914 jniThrowException(_env, _exceptionType, _exceptionMessage);
4915 }
4916}
4917
4918/* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */
4919static void
4920android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII
4921 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf, jint x, jint y, jint width, jint height) {
4922 jarray _array = (jarray) 0;
4923 jint _bufferOffset = (jint) 0;
4924 jint _remaining;
4925 GLenum *attachments = (GLenum *) 0;
4926
4927 attachments = (GLenum *)getPointer(_env, attachments_buf, &_array, &_remaining, &_bufferOffset);
4928 if (attachments == NULL) {
4929 char * _attachmentsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4930 attachments = (GLenum *) (_attachmentsBase + _bufferOffset);
4931 }
4932 glInvalidateSubFramebuffer(
4933 (GLenum)target,
4934 (GLsizei)numAttachments,
4935 (GLenum *)attachments,
4936 (GLint)x,
4937 (GLint)y,
4938 (GLsizei)width,
4939 (GLsizei)height
4940 );
4941 if (_array) {
4942 releasePointer(_env, _array, attachments, JNI_FALSE);
4943 }
4944}
4945
4946/* void glTexStorage2D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) */
4947static void
4948android_glTexStorage2D__IIIII
4949 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height) {
4950 glTexStorage2D(
4951 (GLenum)target,
4952 (GLsizei)levels,
4953 (GLenum)internalformat,
4954 (GLsizei)width,
4955 (GLsizei)height
4956 );
4957}
4958
4959/* void glTexStorage3D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) */
4960static void
4961android_glTexStorage3D__IIIIII
4962 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) {
4963 glTexStorage3D(
4964 (GLenum)target,
4965 (GLsizei)levels,
4966 (GLenum)internalformat,
4967 (GLsizei)width,
4968 (GLsizei)height,
4969 (GLsizei)depth
4970 );
4971}
4972
4973/* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
4974static void
4975android_glGetInternalformativ__IIII_3II
4976 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jintArray params_ref, jint offset) {
4977 jint _exception = 0;
4978 const char * _exceptionType = NULL;
4979 const char * _exceptionMessage = NULL;
4980 GLint *params_base = (GLint *) 0;
4981 jint _remaining;
4982 GLint *params = (GLint *) 0;
4983
4984 if (!params_ref) {
4985 _exception = 1;
4986 _exceptionType = "java/lang/IllegalArgumentException";
4987 _exceptionMessage = "params == null";
4988 goto exit;
4989 }
4990 if (offset < 0) {
4991 _exception = 1;
4992 _exceptionType = "java/lang/IllegalArgumentException";
4993 _exceptionMessage = "offset < 0";
4994 goto exit;
4995 }
4996 _remaining = _env->GetArrayLength(params_ref) - offset;
4997 params_base = (GLint *)
4998 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4999 params = params_base + offset;
5000
5001 glGetInternalformativ(
5002 (GLenum)target,
5003 (GLenum)internalformat,
5004 (GLenum)pname,
5005 (GLsizei)bufSize,
5006 (GLint *)params
5007 );
5008
5009exit:
5010 if (params_base) {
5011 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5012 _exception ? JNI_ABORT: 0);
5013 }
5014 if (_exception) {
5015 jniThrowException(_env, _exceptionType, _exceptionMessage);
5016 }
5017}
5018
5019/* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */
5020static void
5021android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2
5022 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jobject params_buf) {
5023 jarray _array = (jarray) 0;
5024 jint _bufferOffset = (jint) 0;
5025 jint _remaining;
5026 GLint *params = (GLint *) 0;
5027
5028 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
5029 if (params == NULL) {
5030 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
5031 params = (GLint *) (_paramsBase + _bufferOffset);
5032 }
5033 glGetInternalformativ(
5034 (GLenum)target,
5035 (GLenum)internalformat,
5036 (GLenum)pname,
5037 (GLsizei)bufSize,
5038 (GLint *)params
5039 );
5040 if (_array) {
5041 releasePointer(_env, _array, params, JNI_TRUE);
5042 }
5043}
5044
5045static const char *classPathName = "android/opengl/GLES30";
5046
5047static JNINativeMethod methods[] = {
5048{"_nativeClassInit", "()V", (void*)nativeClassInit },
5049{"glReadBuffer", "(I)V", (void *) android_glReadBuffer__I },
5050{"glDrawRangeElements", "(IIIIILjava/nio/Buffer;)V", (void *) android_glDrawRangeElements__IIIIILjava_nio_Buffer_2 },
5051{"glDrawRangeElements", "(IIIIII)V", (void *) android_glDrawRangeElements__IIIIII },
5052{"glTexImage3D", "(IIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2 },
5053{"glTexImage3D", "(IIIIIIIIII)V", (void *) android_glTexImage3D__IIIIIIIIII },
5054{"glTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
5055{"glTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glTexSubImage3D__IIIIIIIIIII },
5056{"glCopyTexSubImage3D", "(IIIIIIIII)V", (void *) android_glCopyTexSubImage3D__IIIIIIIII },
5057{"glCompressedTexImage3D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2 },
5058{"glCompressedTexImage3D", "(IIIIIIIII)V", (void *) android_glCompressedTexImage3D__IIIIIIIII },
5059{"glCompressedTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 },
5060{"glCompressedTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIII },
5061{"glGenQueries", "(I[II)V", (void *) android_glGenQueries__I_3II },
5062{"glGenQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenQueries__ILjava_nio_IntBuffer_2 },
5063{"glDeleteQueries", "(I[II)V", (void *) android_glDeleteQueries__I_3II },
5064{"glDeleteQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteQueries__ILjava_nio_IntBuffer_2 },
5065{"glIsQuery", "(I)Z", (void *) android_glIsQuery__I },
5066{"glBeginQuery", "(II)V", (void *) android_glBeginQuery__II },
5067{"glEndQuery", "(I)V", (void *) android_glEndQuery__I },
5068{"glGetQueryiv", "(II[II)V", (void *) android_glGetQueryiv__II_3II },
5069{"glGetQueryiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryiv__IILjava_nio_IntBuffer_2 },
5070{"glGetQueryObjectuiv", "(II[II)V", (void *) android_glGetQueryObjectuiv__II_3II },
5071{"glGetQueryObjectuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2 },
5072{"glUnmapBuffer", "(I)Z", (void *) android_glUnmapBuffer__I },
5073{"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II },
5074{"glDrawBuffers", "(I[II)V", (void *) android_glDrawBuffers__I_3II },
5075{"glDrawBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDrawBuffers__ILjava_nio_IntBuffer_2 },
5076{"glUniformMatrix2x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x3fv__IIZ_3FI },
5077{"glUniformMatrix2x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2 },
5078{"glUniformMatrix3x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x2fv__IIZ_3FI },
5079{"glUniformMatrix3x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2 },
5080{"glUniformMatrix2x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x4fv__IIZ_3FI },
5081{"glUniformMatrix2x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2 },
5082{"glUniformMatrix4x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x2fv__IIZ_3FI },
5083{"glUniformMatrix4x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2 },
5084{"glUniformMatrix3x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x4fv__IIZ_3FI },
5085{"glUniformMatrix3x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2 },
5086{"glUniformMatrix4x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x3fv__IIZ_3FI },
5087{"glUniformMatrix4x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2 },
5088{"glBlitFramebuffer", "(IIIIIIIIII)V", (void *) android_glBlitFramebuffer__IIIIIIIIII },
5089{"glRenderbufferStorageMultisample", "(IIIII)V", (void *) android_glRenderbufferStorageMultisample__IIIII },
5090{"glFramebufferTextureLayer", "(IIIII)V", (void *) android_glFramebufferTextureLayer__IIIII },
5091{"glMapBufferRange", "(IIII)Ljava/nio/Buffer;", (void *) android_glMapBufferRange__IIII },
5092{"glFlushMappedBufferRange", "(III)V", (void *) android_glFlushMappedBufferRange__III },
5093{"glBindVertexArray", "(I)V", (void *) android_glBindVertexArray__I },
5094{"glDeleteVertexArrays", "(I[II)V", (void *) android_glDeleteVertexArrays__I_3II },
5095{"glDeleteVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2 },
5096{"glGenVertexArrays", "(I[II)V", (void *) android_glGenVertexArrays__I_3II },
5097{"glGenVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenVertexArrays__ILjava_nio_IntBuffer_2 },
5098{"glIsVertexArray", "(I)Z", (void *) android_glIsVertexArray__I },
5099{"glGetIntegeri_v", "(II[II)V", (void *) android_glGetIntegeri_v__II_3II },
5100{"glGetIntegeri_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetIntegeri_v__IILjava_nio_IntBuffer_2 },
5101{"glBeginTransformFeedback", "(I)V", (void *) android_glBeginTransformFeedback__I },
5102{"glEndTransformFeedback", "()V", (void *) android_glEndTransformFeedback__ },
5103{"glBindBufferRange", "(IIIII)V", (void *) android_glBindBufferRange__IIIII },
5104{"glBindBufferBase", "(III)V", (void *) android_glBindBufferBase__III },
5105{"glTransformFeedbackVaryings", "(I[Ljava/lang/String;I)V", (void *) android_glTransformFeedbackVaryings },
5106{"glGetTransformFeedbackVarying", "(III[II[II[II[BI)V", (void *) android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI },
5107{"glGetTransformFeedbackVarying", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B },
5108{"glGetTransformFeedbackVarying", "(II[II[II)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying1 },
5109{"glGetTransformFeedbackVarying", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying2 },
5110{"glVertexAttribIPointerBounds", "(IIIILjava/nio/Buffer;I)V", (void *) android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I },
5111{"glVertexAttribIPointer", "(IIIII)V", (void *) android_glVertexAttribIPointer__IIIII },
5112{"glGetVertexAttribIiv", "(II[II)V", (void *) android_glGetVertexAttribIiv__II_3II },
5113{"glGetVertexAttribIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2 },
5114{"glGetVertexAttribIuiv", "(II[II)V", (void *) android_glGetVertexAttribIuiv__II_3II },
5115{"glGetVertexAttribIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2 },
5116{"glVertexAttribI4i", "(IIIII)V", (void *) android_glVertexAttribI4i__IIIII },
5117{"glVertexAttribI4ui", "(IIIII)V", (void *) android_glVertexAttribI4ui__IIIII },
5118{"glVertexAttribI4iv", "(I[II)V", (void *) android_glVertexAttribI4iv__I_3II },
5119{"glVertexAttribI4iv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2 },
5120{"glVertexAttribI4uiv", "(I[II)V", (void *) android_glVertexAttribI4uiv__I_3II },
5121{"glVertexAttribI4uiv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2 },
5122{"glGetUniformuiv", "(II[II)V", (void *) android_glGetUniformuiv__II_3II },
5123{"glGetUniformuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformuiv__IILjava_nio_IntBuffer_2 },
5124{"glGetFragDataLocation", "(ILjava/lang/String;)I", (void *) android_glGetFragDataLocation__ILjava_lang_String_2 },
5125{"glUniform1ui", "(II)V", (void *) android_glUniform1ui__II },
5126{"glUniform2ui", "(III)V", (void *) android_glUniform2ui__III },
5127{"glUniform3ui", "(IIII)V", (void *) android_glUniform3ui__IIII },
5128{"glUniform4ui", "(IIIII)V", (void *) android_glUniform4ui__IIIII },
5129{"glUniform1uiv", "(II[II)V", (void *) android_glUniform1uiv__II_3II },
5130{"glUniform1uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1uiv__IILjava_nio_IntBuffer_2 },
5131{"glUniform2uiv", "(II[II)V", (void *) android_glUniform2uiv__II_3II },
5132{"glUniform2uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2uiv__IILjava_nio_IntBuffer_2 },
5133{"glUniform3uiv", "(II[II)V", (void *) android_glUniform3uiv__II_3II },
5134{"glUniform3uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3uiv__IILjava_nio_IntBuffer_2 },
5135{"glUniform4uiv", "(II[II)V", (void *) android_glUniform4uiv__II_3II },
5136{"glUniform4uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4uiv__IILjava_nio_IntBuffer_2 },
5137{"glClearBufferiv", "(II[II)V", (void *) android_glClearBufferiv__II_3II },
5138{"glClearBufferiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferiv__IILjava_nio_IntBuffer_2 },
5139{"glClearBufferuiv", "(II[II)V", (void *) android_glClearBufferuiv__II_3II },
5140{"glClearBufferuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferuiv__IILjava_nio_IntBuffer_2 },
5141{"glClearBufferfv", "(II[FI)V", (void *) android_glClearBufferfv__II_3FI },
5142{"glClearBufferfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glClearBufferfv__IILjava_nio_FloatBuffer_2 },
5143{"glClearBufferfi", "(IIFI)V", (void *) android_glClearBufferfi__IIFI },
5144{"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II },
5145{"glCopyBufferSubData", "(IIIII)V", (void *) android_glCopyBufferSubData__IIIII },
5146{"glGetUniformIndices", "(I[Ljava/lang/String;[II)V", (void *) android_glGetUniformIndices_array },
Jesse Halld877efe2013-04-29 15:59:35 -07005147{"glGetUniformIndices", "(I[Ljava/lang/String;Ljava/nio/IntBuffer;)V", (void *) android_glGetUniformIndices_buffer },
Jesse Halld830e742013-03-29 11:02:35 -07005148{"glGetActiveUniformsiv", "(II[III[II)V", (void *) android_glGetActiveUniformsiv__II_3III_3II },
5149{"glGetActiveUniformsiv", "(IILjava/nio/IntBuffer;ILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2 },
5150{"glGetUniformBlockIndex", "(ILjava/lang/String;)I", (void *) android_glGetUniformBlockIndex__ILjava_lang_String_2 },
5151{"glGetActiveUniformBlockiv", "(III[II)V", (void *) android_glGetActiveUniformBlockiv__III_3II },
5152{"glGetActiveUniformBlockiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2 },
5153{"glGetActiveUniformBlockName", "(III[II[BI)V", (void *) android_glGetActiveUniformBlockName_III_3II_3BI },
5154{"glGetActiveUniformBlockName", "(IILjava/nio/Buffer;Ljava/nio/Buffer;)V", (void *) android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 },
5155{"glGetActiveUniformBlockName", "(II)Ljava/lang/String;", (void *) android_glGetActiveUniformBlockName_II },
5156{"glUniformBlockBinding", "(III)V", (void *) android_glUniformBlockBinding__III },
5157{"glDrawArraysInstanced", "(IIII)V", (void *) android_glDrawArraysInstanced__IIII },
5158{"glDrawElementsInstanced", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I },
5159{"glDrawElementsInstanced", "(IIIII)V", (void *) android_glDrawElementsInstanced__IIIII },
5160{"glFenceSync", "(II)J", (void *) android_glFenceSync__II },
5161{"glIsSync", "(J)Z", (void *) android_glIsSync__J },
5162{"glDeleteSync", "(J)V", (void *) android_glDeleteSync__J },
5163{"glClientWaitSync", "(JIJ)I", (void *) android_glClientWaitSync__JIJ },
5164{"glWaitSync", "(JIJ)V", (void *) android_glWaitSync__JIJ },
5165{"glGetInteger64v", "(I[JI)V", (void *) android_glGetInteger64v__I_3JI },
5166{"glGetInteger64v", "(ILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64v__ILjava_nio_LongBuffer_2 },
5167{"glGetSynciv", "(JII[II[II)V", (void *) android_glGetSynciv__JII_3II_3II },
5168{"glGetSynciv", "(JIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
5169{"glGetInteger64i_v", "(II[JI)V", (void *) android_glGetInteger64i_v__II_3JI },
5170{"glGetInteger64i_v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64i_v__IILjava_nio_LongBuffer_2 },
5171{"glGetBufferParameteri64v", "(II[JI)V", (void *) android_glGetBufferParameteri64v__II_3JI },
5172{"glGetBufferParameteri64v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2 },
5173{"glGenSamplers", "(I[II)V", (void *) android_glGenSamplers__I_3II },
5174{"glGenSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenSamplers__ILjava_nio_IntBuffer_2 },
5175{"glDeleteSamplers", "(I[II)V", (void *) android_glDeleteSamplers__I_3II },
5176{"glDeleteSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteSamplers__ILjava_nio_IntBuffer_2 },
5177{"glIsSampler", "(I)Z", (void *) android_glIsSampler__I },
5178{"glBindSampler", "(II)V", (void *) android_glBindSampler__II },
5179{"glSamplerParameteri", "(III)V", (void *) android_glSamplerParameteri__III },
5180{"glSamplerParameteriv", "(II[II)V", (void *) android_glSamplerParameteriv__II_3II },
5181{"glSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameteriv__IILjava_nio_IntBuffer_2 },
5182{"glSamplerParameterf", "(IIF)V", (void *) android_glSamplerParameterf__IIF },
5183{"glSamplerParameterfv", "(II[FI)V", (void *) android_glSamplerParameterfv__II_3FI },
5184{"glSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
5185{"glGetSamplerParameteriv", "(II[II)V", (void *) android_glGetSamplerParameteriv__II_3II },
5186{"glGetSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2 },
5187{"glGetSamplerParameterfv", "(II[FI)V", (void *) android_glGetSamplerParameterfv__II_3FI },
5188{"glGetSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2 },
5189{"glVertexAttribDivisor", "(II)V", (void *) android_glVertexAttribDivisor__II },
5190{"glBindTransformFeedback", "(II)V", (void *) android_glBindTransformFeedback__II },
5191{"glDeleteTransformFeedbacks", "(I[II)V", (void *) android_glDeleteTransformFeedbacks__I_3II },
5192{"glDeleteTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2 },
5193{"glGenTransformFeedbacks", "(I[II)V", (void *) android_glGenTransformFeedbacks__I_3II },
5194{"glGenTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2 },
5195{"glIsTransformFeedback", "(I)Z", (void *) android_glIsTransformFeedback__I },
5196{"glPauseTransformFeedback", "()V", (void *) android_glPauseTransformFeedback__ },
5197{"glResumeTransformFeedback", "()V", (void *) android_glResumeTransformFeedback__ },
5198{"glGetProgramBinary", "(II[II[IILjava/nio/Buffer;)V", (void *) android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2 },
5199{"glGetProgramBinary", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/Buffer;)V", (void *) android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2 },
5200{"glProgramBinary", "(IILjava/nio/Buffer;I)V", (void *) android_glProgramBinary__IILjava_nio_Buffer_2I },
5201{"glProgramParameteri", "(III)V", (void *) android_glProgramParameteri__III },
5202{"glInvalidateFramebuffer", "(II[II)V", (void *) android_glInvalidateFramebuffer__II_3II },
5203{"glInvalidateFramebuffer", "(IILjava/nio/IntBuffer;)V", (void *) android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2 },
5204{"glInvalidateSubFramebuffer", "(II[IIIIII)V", (void *) android_glInvalidateSubFramebuffer__II_3IIIIII },
5205{"glInvalidateSubFramebuffer", "(IILjava/nio/IntBuffer;IIII)V", (void *) android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII },
5206{"glTexStorage2D", "(IIIII)V", (void *) android_glTexStorage2D__IIIII },
5207{"glTexStorage3D", "(IIIIII)V", (void *) android_glTexStorage3D__IIIIII },
5208{"glGetInternalformativ", "(IIII[II)V", (void *) android_glGetInternalformativ__IIII_3II },
5209{"glGetInternalformativ", "(IIIILjava/nio/IntBuffer;)V", (void *) android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2 },
5210};
5211
5212int register_android_opengl_jni_GLES30(JNIEnv *_env)
5213{
5214 int err;
5215 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
5216 return err;
5217}