com_google_android_gles_jni_GLImpl.cpp revision 16e7972f0d986eebf846ea8feb50f4435a9c6970
1/* //device/libs/android_runtime/com_google_android_gles_jni_GLImpl.cpp
2**
3** Copyright 2006, 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 <android_runtime/AndroidRuntime.h>
21#include <utils/misc.h>
22
23#include <assert.h>
24#include <GLES/gl.h>
25#include <GLES/glext.h>
26
27/* special calls implemented in Android's GLES wrapper used to more
28 * efficiently bound-check passed arrays */
29extern "C" {
30GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
31        const GLvoid *ptr, GLsizei count);
32GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
33        const GLvoid *pointer, GLsizei count);
34GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
35        GLsizei stride, const GLvoid *pointer, GLsizei count);
36GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
37        GLsizei stride, const GLvoid *pointer, GLsizei count);
38}
39
40static int initialized = 0;
41
42static jclass nioAccessClass;
43static jclass bufferClass;
44static jclass OOMEClass;
45static jclass UOEClass;
46static jclass IAEClass;
47static jclass AIOOBEClass;
48static jmethodID getBasePointerID;
49static jmethodID getBaseArrayID;
50static jmethodID getBaseArrayOffsetID;
51static jfieldID positionID;
52static jfieldID limitID;
53static jfieldID elementSizeShiftID;
54
55/* Cache method IDs each time the class is loaded. */
56
57static void
58nativeClassInitBuffer(JNIEnv *_env)
59{
60    jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
61    nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
62
63    jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
64    bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
65
66    getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
67            "getBasePointer", "(Ljava/nio/Buffer;)J");
68    getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
69            "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
70    getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
71            "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
72
73    positionID = _env->GetFieldID(bufferClass, "position", "I");
74    limitID = _env->GetFieldID(bufferClass, "limit", "I");
75    elementSizeShiftID =
76        _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
77}
78
79static void
80nativeClassInit(JNIEnv *_env, jclass glImplClass)
81{
82    nativeClassInitBuffer(_env);
83
84    jclass IAEClassLocal =
85        _env->FindClass("java/lang/IllegalArgumentException");
86    jclass OOMEClassLocal =
87         _env->FindClass("java/lang/OutOfMemoryError");
88    jclass UOEClassLocal =
89         _env->FindClass("java/lang/UnsupportedOperationException");
90    jclass AIOOBEClassLocal =
91         _env->FindClass("java/lang/ArrayIndexOutOfBoundsException");
92
93    IAEClass = (jclass) _env->NewGlobalRef(IAEClassLocal);
94    OOMEClass = (jclass) _env->NewGlobalRef(OOMEClassLocal);
95    UOEClass = (jclass) _env->NewGlobalRef(UOEClassLocal);
96    AIOOBEClass = (jclass) _env->NewGlobalRef(AIOOBEClassLocal);
97}
98
99static void *
100getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
101{
102    jint position;
103    jint limit;
104    jint elementSizeShift;
105    jlong pointer;
106    jint offset;
107    void *data;
108
109    position = _env->GetIntField(buffer, positionID);
110    limit = _env->GetIntField(buffer, limitID);
111    elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
112    *remaining = (limit - position) << elementSizeShift;
113    pointer = _env->CallStaticLongMethod(nioAccessClass,
114            getBasePointerID, buffer);
115    if (pointer != 0L) {
116        *array = NULL;
117        return (void *) (jint) pointer;
118    }
119
120    *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
121            getBaseArrayID, buffer);
122    offset = _env->CallStaticIntMethod(nioAccessClass,
123            getBaseArrayOffsetID, buffer);
124    data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
125
126    return (void *) ((char *) data + offset);
127}
128
129static void
130releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
131{
132    _env->ReleasePrimitiveArrayCritical(array, data,
133					   commit ? 0 : JNI_ABORT);
134}
135
136static void *
137getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
138    char* buf = (char*) _env->GetDirectBufferAddress(buffer);
139    if (buf) {
140        jint position = _env->GetIntField(buffer, positionID);
141        jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
142        buf += position << elementSizeShift;
143    } else {
144        _env->ThrowNew(IAEClass, "Must use a native order direct Buffer");
145    }
146    return (void*) buf;
147}
148
149static int
150getNumCompressedTextureFormats() {
151    int numCompressedTextureFormats = 0;
152    glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats);
153    return numCompressedTextureFormats;
154}
155
156// --------------------------------------------------------------------------
157
158/* void glActiveTexture ( GLenum texture ) */
159static void
160android_glActiveTexture__I
161  (JNIEnv *_env, jobject _this, jint texture) {
162    glActiveTexture(
163        (GLenum)texture
164    );
165}
166
167/* void glAlphaFunc ( GLenum func, GLclampf ref ) */
168static void
169android_glAlphaFunc__IF
170  (JNIEnv *_env, jobject _this, jint func, jfloat ref) {
171    glAlphaFunc(
172        (GLenum)func,
173        (GLclampf)ref
174    );
175}
176
177/* void glAlphaFuncx ( GLenum func, GLclampx ref ) */
178static void
179android_glAlphaFuncx__II
180  (JNIEnv *_env, jobject _this, jint func, jint ref) {
181    glAlphaFuncx(
182        (GLenum)func,
183        (GLclampx)ref
184    );
185}
186
187/* void glBindTexture ( GLenum target, GLuint texture ) */
188static void
189android_glBindTexture__II
190  (JNIEnv *_env, jobject _this, jint target, jint texture) {
191    glBindTexture(
192        (GLenum)target,
193        (GLuint)texture
194    );
195}
196
197/* void glBlendFunc ( GLenum sfactor, GLenum dfactor ) */
198static void
199android_glBlendFunc__II
200  (JNIEnv *_env, jobject _this, jint sfactor, jint dfactor) {
201    glBlendFunc(
202        (GLenum)sfactor,
203        (GLenum)dfactor
204    );
205}
206
207/* void glClear ( GLbitfield mask ) */
208static void
209android_glClear__I
210  (JNIEnv *_env, jobject _this, jint mask) {
211    glClear(
212        (GLbitfield)mask
213    );
214}
215
216/* void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */
217static void
218android_glClearColor__FFFF
219  (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
220    glClearColor(
221        (GLclampf)red,
222        (GLclampf)green,
223        (GLclampf)blue,
224        (GLclampf)alpha
225    );
226}
227
228/* void glClearColorx ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
229static void
230android_glClearColorx__IIII
231  (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
232    glClearColorx(
233        (GLclampx)red,
234        (GLclampx)green,
235        (GLclampx)blue,
236        (GLclampx)alpha
237    );
238}
239
240/* void glClearDepthf ( GLclampf depth ) */
241static void
242android_glClearDepthf__F
243  (JNIEnv *_env, jobject _this, jfloat depth) {
244    glClearDepthf(
245        (GLclampf)depth
246    );
247}
248
249/* void glClearDepthx ( GLclampx depth ) */
250static void
251android_glClearDepthx__I
252  (JNIEnv *_env, jobject _this, jint depth) {
253    glClearDepthx(
254        (GLclampx)depth
255    );
256}
257
258/* void glClearStencil ( GLint s ) */
259static void
260android_glClearStencil__I
261  (JNIEnv *_env, jobject _this, jint s) {
262    glClearStencil(
263        (GLint)s
264    );
265}
266
267/* void glClientActiveTexture ( GLenum texture ) */
268static void
269android_glClientActiveTexture__I
270  (JNIEnv *_env, jobject _this, jint texture) {
271    glClientActiveTexture(
272        (GLenum)texture
273    );
274}
275
276/* void glColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) */
277static void
278android_glColor4f__FFFF
279  (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
280    glColor4f(
281        (GLfloat)red,
282        (GLfloat)green,
283        (GLfloat)blue,
284        (GLfloat)alpha
285    );
286}
287
288/* void glColor4x ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
289static void
290android_glColor4x__IIII
291  (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
292    glColor4x(
293        (GLfixed)red,
294        (GLfixed)green,
295        (GLfixed)blue,
296        (GLfixed)alpha
297    );
298}
299
300/* void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) */
301static void
302android_glColorMask__ZZZZ
303  (JNIEnv *_env, jobject _this, jboolean red, jboolean green, jboolean blue, jboolean alpha) {
304    glColorMask(
305        (GLboolean)red,
306        (GLboolean)green,
307        (GLboolean)blue,
308        (GLboolean)alpha
309    );
310}
311
312/* void glColorPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
313static void
314android_glColorPointerBounds__IIILjava_nio_Buffer_2I
315  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
316    jarray _array = (jarray) 0;
317    jint _remaining;
318    GLvoid *pointer = (GLvoid *) 0;
319
320    if (pointer_buf) {
321        pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
322        if ( ! pointer ) {
323            return;
324        }
325    }
326    glColorPointerBounds(
327        (GLint)size,
328        (GLenum)type,
329        (GLsizei)stride,
330        (GLvoid *)pointer,
331        (GLsizei)remaining
332    );
333}
334
335/* void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) */
336static void
337android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
338  (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
339    jarray _array = (jarray) 0;
340    jint _remaining;
341    GLvoid *data = (GLvoid *) 0;
342
343    data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
344    glCompressedTexImage2D(
345        (GLenum)target,
346        (GLint)level,
347        (GLenum)internalformat,
348        (GLsizei)width,
349        (GLsizei)height,
350        (GLint)border,
351        (GLsizei)imageSize,
352        (GLvoid *)data
353    );
354    if (_array) {
355        releasePointer(_env, _array, data, JNI_FALSE);
356    }
357}
358
359/* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */
360static void
361android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
362  (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
363    jarray _array = (jarray) 0;
364    jint _remaining;
365    GLvoid *data = (GLvoid *) 0;
366
367    data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
368    glCompressedTexSubImage2D(
369        (GLenum)target,
370        (GLint)level,
371        (GLint)xoffset,
372        (GLint)yoffset,
373        (GLsizei)width,
374        (GLsizei)height,
375        (GLenum)format,
376        (GLsizei)imageSize,
377        (GLvoid *)data
378    );
379    if (_array) {
380        releasePointer(_env, _array, data, JNI_FALSE);
381    }
382}
383
384/* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */
385static void
386android_glCopyTexImage2D__IIIIIIII
387  (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) {
388    glCopyTexImage2D(
389        (GLenum)target,
390        (GLint)level,
391        (GLenum)internalformat,
392        (GLint)x,
393        (GLint)y,
394        (GLsizei)width,
395        (GLsizei)height,
396        (GLint)border
397    );
398}
399
400/* void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
401static void
402android_glCopyTexSubImage2D__IIIIIIII
403  (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) {
404    glCopyTexSubImage2D(
405        (GLenum)target,
406        (GLint)level,
407        (GLint)xoffset,
408        (GLint)yoffset,
409        (GLint)x,
410        (GLint)y,
411        (GLsizei)width,
412        (GLsizei)height
413    );
414}
415
416/* void glCullFace ( GLenum mode ) */
417static void
418android_glCullFace__I
419  (JNIEnv *_env, jobject _this, jint mode) {
420    glCullFace(
421        (GLenum)mode
422    );
423}
424
425/* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
426static void
427android_glDeleteTextures__I_3II
428  (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
429    GLuint *textures_base = (GLuint *) 0;
430    jint _remaining;
431    GLuint *textures = (GLuint *) 0;
432
433    if (!textures_ref) {
434        _env->ThrowNew(IAEClass, "textures == null");
435        goto exit;
436    }
437    if (offset < 0) {
438        _env->ThrowNew(IAEClass, "offset < 0");
439        goto exit;
440    }
441    _remaining = _env->GetArrayLength(textures_ref) - offset;
442    if (_remaining < n) {
443        _env->ThrowNew(IAEClass, "length - offset < n");
444        goto exit;
445    }
446    textures_base = (GLuint *)
447        _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0);
448    textures = textures_base + offset;
449
450    glDeleteTextures(
451        (GLsizei)n,
452        (GLuint *)textures
453    );
454
455exit:
456    if (textures_base) {
457        _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
458            JNI_ABORT);
459    }
460}
461
462/* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
463static void
464android_glDeleteTextures__ILjava_nio_IntBuffer_2
465  (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
466    jarray _array = (jarray) 0;
467    jint _remaining;
468    GLuint *textures = (GLuint *) 0;
469
470    textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
471    if (_remaining < n) {
472        _env->ThrowNew(IAEClass, "remaining() < n");
473        goto exit;
474    }
475    glDeleteTextures(
476        (GLsizei)n,
477        (GLuint *)textures
478    );
479
480exit:
481    if (_array) {
482        releasePointer(_env, _array, textures, JNI_FALSE);
483    }
484}
485
486/* void glDepthFunc ( GLenum func ) */
487static void
488android_glDepthFunc__I
489  (JNIEnv *_env, jobject _this, jint func) {
490    glDepthFunc(
491        (GLenum)func
492    );
493}
494
495/* void glDepthMask ( GLboolean flag ) */
496static void
497android_glDepthMask__Z
498  (JNIEnv *_env, jobject _this, jboolean flag) {
499    glDepthMask(
500        (GLboolean)flag
501    );
502}
503
504/* void glDepthRangef ( GLclampf zNear, GLclampf zFar ) */
505static void
506android_glDepthRangef__FF
507  (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
508    glDepthRangef(
509        (GLclampf)zNear,
510        (GLclampf)zFar
511    );
512}
513
514/* void glDepthRangex ( GLclampx zNear, GLclampx zFar ) */
515static void
516android_glDepthRangex__II
517  (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
518    glDepthRangex(
519        (GLclampx)zNear,
520        (GLclampx)zFar
521    );
522}
523
524/* void glDisable ( GLenum cap ) */
525static void
526android_glDisable__I
527  (JNIEnv *_env, jobject _this, jint cap) {
528    glDisable(
529        (GLenum)cap
530    );
531}
532
533/* void glDisableClientState ( GLenum array ) */
534static void
535android_glDisableClientState__I
536  (JNIEnv *_env, jobject _this, jint array) {
537    glDisableClientState(
538        (GLenum)array
539    );
540}
541
542/* void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) */
543static void
544android_glDrawArrays__III
545  (JNIEnv *_env, jobject _this, jint mode, jint first, jint count) {
546    glDrawArrays(
547        (GLenum)mode,
548        (GLint)first,
549        (GLsizei)count
550    );
551}
552
553/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
554static void
555android_glDrawElements__IIILjava_nio_Buffer_2
556  (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) {
557    jarray _array = (jarray) 0;
558    jint _remaining;
559    GLvoid *indices = (GLvoid *) 0;
560
561    indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
562    if (_remaining < count) {
563        _env->ThrowNew(AIOOBEClass, "remaining() < count");
564        goto exit;
565    }
566    glDrawElements(
567        (GLenum)mode,
568        (GLsizei)count,
569        (GLenum)type,
570        (GLvoid *)indices
571    );
572
573exit:
574    if (_array) {
575        releasePointer(_env, _array, indices, JNI_FALSE);
576    }
577}
578
579/* void glEnable ( GLenum cap ) */
580static void
581android_glEnable__I
582  (JNIEnv *_env, jobject _this, jint cap) {
583    glEnable(
584        (GLenum)cap
585    );
586}
587
588/* void glEnableClientState ( GLenum array ) */
589static void
590android_glEnableClientState__I
591  (JNIEnv *_env, jobject _this, jint array) {
592    glEnableClientState(
593        (GLenum)array
594    );
595}
596
597/* void glFinish ( void ) */
598static void
599android_glFinish__
600  (JNIEnv *_env, jobject _this) {
601    glFinish();
602}
603
604/* void glFlush ( void ) */
605static void
606android_glFlush__
607  (JNIEnv *_env, jobject _this) {
608    glFlush();
609}
610
611/* void glFogf ( GLenum pname, GLfloat param ) */
612static void
613android_glFogf__IF
614  (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
615    glFogf(
616        (GLenum)pname,
617        (GLfloat)param
618    );
619}
620
621/* void glFogfv ( GLenum pname, const GLfloat *params ) */
622static void
623android_glFogfv__I_3FI
624  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
625    GLfloat *params_base = (GLfloat *) 0;
626    jint _remaining;
627    GLfloat *params = (GLfloat *) 0;
628
629    if (!params_ref) {
630        _env->ThrowNew(IAEClass, "params == null");
631        goto exit;
632    }
633    if (offset < 0) {
634        _env->ThrowNew(IAEClass, "offset < 0");
635        goto exit;
636    }
637    _remaining = _env->GetArrayLength(params_ref) - offset;
638    int _needed;
639    switch (pname) {
640#if defined(GL_FOG_MODE)
641        case GL_FOG_MODE:
642#endif // defined(GL_FOG_MODE)
643#if defined(GL_FOG_DENSITY)
644        case GL_FOG_DENSITY:
645#endif // defined(GL_FOG_DENSITY)
646#if defined(GL_FOG_START)
647        case GL_FOG_START:
648#endif // defined(GL_FOG_START)
649#if defined(GL_FOG_END)
650        case GL_FOG_END:
651#endif // defined(GL_FOG_END)
652            _needed = 1;
653            break;
654#if defined(GL_FOG_COLOR)
655        case GL_FOG_COLOR:
656#endif // defined(GL_FOG_COLOR)
657            _needed = 4;
658            break;
659        default:
660            _needed = 0;
661            break;
662    }
663    if (_remaining < _needed) {
664        _env->ThrowNew(IAEClass, "length - offset < needed");
665        goto exit;
666    }
667    params_base = (GLfloat *)
668        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
669    params = params_base + offset;
670
671    glFogfv(
672        (GLenum)pname,
673        (GLfloat *)params
674    );
675
676exit:
677    if (params_base) {
678        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
679            JNI_ABORT);
680    }
681}
682
683/* void glFogfv ( GLenum pname, const GLfloat *params ) */
684static void
685android_glFogfv__ILjava_nio_FloatBuffer_2
686  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
687    jarray _array = (jarray) 0;
688    jint _remaining;
689    GLfloat *params = (GLfloat *) 0;
690
691    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
692    int _needed;
693    switch (pname) {
694#if defined(GL_FOG_MODE)
695        case GL_FOG_MODE:
696#endif // defined(GL_FOG_MODE)
697#if defined(GL_FOG_DENSITY)
698        case GL_FOG_DENSITY:
699#endif // defined(GL_FOG_DENSITY)
700#if defined(GL_FOG_START)
701        case GL_FOG_START:
702#endif // defined(GL_FOG_START)
703#if defined(GL_FOG_END)
704        case GL_FOG_END:
705#endif // defined(GL_FOG_END)
706            _needed = 1;
707            break;
708#if defined(GL_FOG_COLOR)
709        case GL_FOG_COLOR:
710#endif // defined(GL_FOG_COLOR)
711            _needed = 4;
712            break;
713        default:
714            _needed = 0;
715            break;
716    }
717    if (_remaining < _needed) {
718        _env->ThrowNew(IAEClass, "remaining() < needed");
719        goto exit;
720    }
721    glFogfv(
722        (GLenum)pname,
723        (GLfloat *)params
724    );
725
726exit:
727    if (_array) {
728        releasePointer(_env, _array, params, JNI_FALSE);
729    }
730}
731
732/* void glFogx ( GLenum pname, GLfixed param ) */
733static void
734android_glFogx__II
735  (JNIEnv *_env, jobject _this, jint pname, jint param) {
736    glFogx(
737        (GLenum)pname,
738        (GLfixed)param
739    );
740}
741
742/* void glFogxv ( GLenum pname, const GLfixed *params ) */
743static void
744android_glFogxv__I_3II
745  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
746    GLfixed *params_base = (GLfixed *) 0;
747    jint _remaining;
748    GLfixed *params = (GLfixed *) 0;
749
750    if (!params_ref) {
751        _env->ThrowNew(IAEClass, "params == null");
752        goto exit;
753    }
754    if (offset < 0) {
755        _env->ThrowNew(IAEClass, "offset < 0");
756        goto exit;
757    }
758    _remaining = _env->GetArrayLength(params_ref) - offset;
759    int _needed;
760    switch (pname) {
761#if defined(GL_FOG_MODE)
762        case GL_FOG_MODE:
763#endif // defined(GL_FOG_MODE)
764#if defined(GL_FOG_DENSITY)
765        case GL_FOG_DENSITY:
766#endif // defined(GL_FOG_DENSITY)
767#if defined(GL_FOG_START)
768        case GL_FOG_START:
769#endif // defined(GL_FOG_START)
770#if defined(GL_FOG_END)
771        case GL_FOG_END:
772#endif // defined(GL_FOG_END)
773            _needed = 1;
774            break;
775#if defined(GL_FOG_COLOR)
776        case GL_FOG_COLOR:
777#endif // defined(GL_FOG_COLOR)
778            _needed = 4;
779            break;
780        default:
781            _needed = 0;
782            break;
783    }
784    if (_remaining < _needed) {
785        _env->ThrowNew(IAEClass, "length - offset < needed");
786        goto exit;
787    }
788    params_base = (GLfixed *)
789        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
790    params = params_base + offset;
791
792    glFogxv(
793        (GLenum)pname,
794        (GLfixed *)params
795    );
796
797exit:
798    if (params_base) {
799        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
800            JNI_ABORT);
801    }
802}
803
804/* void glFogxv ( GLenum pname, const GLfixed *params ) */
805static void
806android_glFogxv__ILjava_nio_IntBuffer_2
807  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
808    jarray _array = (jarray) 0;
809    jint _remaining;
810    GLfixed *params = (GLfixed *) 0;
811
812    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
813    int _needed;
814    switch (pname) {
815#if defined(GL_FOG_MODE)
816        case GL_FOG_MODE:
817#endif // defined(GL_FOG_MODE)
818#if defined(GL_FOG_DENSITY)
819        case GL_FOG_DENSITY:
820#endif // defined(GL_FOG_DENSITY)
821#if defined(GL_FOG_START)
822        case GL_FOG_START:
823#endif // defined(GL_FOG_START)
824#if defined(GL_FOG_END)
825        case GL_FOG_END:
826#endif // defined(GL_FOG_END)
827            _needed = 1;
828            break;
829#if defined(GL_FOG_COLOR)
830        case GL_FOG_COLOR:
831#endif // defined(GL_FOG_COLOR)
832            _needed = 4;
833            break;
834        default:
835            _needed = 0;
836            break;
837    }
838    if (_remaining < _needed) {
839        _env->ThrowNew(IAEClass, "remaining() < needed");
840        goto exit;
841    }
842    glFogxv(
843        (GLenum)pname,
844        (GLfixed *)params
845    );
846
847exit:
848    if (_array) {
849        releasePointer(_env, _array, params, JNI_FALSE);
850    }
851}
852
853/* void glFrontFace ( GLenum mode ) */
854static void
855android_glFrontFace__I
856  (JNIEnv *_env, jobject _this, jint mode) {
857    glFrontFace(
858        (GLenum)mode
859    );
860}
861
862/* void glFrustumf ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
863static void
864android_glFrustumf__FFFFFF
865  (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
866    glFrustumf(
867        (GLfloat)left,
868        (GLfloat)right,
869        (GLfloat)bottom,
870        (GLfloat)top,
871        (GLfloat)zNear,
872        (GLfloat)zFar
873    );
874}
875
876/* void glFrustumx ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
877static void
878android_glFrustumx__IIIIII
879  (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
880    glFrustumx(
881        (GLfixed)left,
882        (GLfixed)right,
883        (GLfixed)bottom,
884        (GLfixed)top,
885        (GLfixed)zNear,
886        (GLfixed)zFar
887    );
888}
889
890/* void glGenTextures ( GLsizei n, GLuint *textures ) */
891static void
892android_glGenTextures__I_3II
893  (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
894    jint _exception = 0;
895    GLuint *textures_base = (GLuint *) 0;
896    jint _remaining;
897    GLuint *textures = (GLuint *) 0;
898
899    if (!textures_ref) {
900        _exception = 1;
901        _env->ThrowNew(IAEClass, "textures == null");
902        goto exit;
903    }
904    if (offset < 0) {
905        _exception = 1;
906        _env->ThrowNew(IAEClass, "offset < 0");
907        goto exit;
908    }
909    _remaining = _env->GetArrayLength(textures_ref) - offset;
910    if (_remaining < n) {
911        _exception = 1;
912        _env->ThrowNew(IAEClass, "length - offset < n");
913        goto exit;
914    }
915    textures_base = (GLuint *)
916        _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0);
917    textures = textures_base + offset;
918
919    glGenTextures(
920        (GLsizei)n,
921        (GLuint *)textures
922    );
923
924exit:
925    if (textures_base) {
926        _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
927            _exception ? JNI_ABORT: 0);
928    }
929}
930
931/* void glGenTextures ( GLsizei n, GLuint *textures ) */
932static void
933android_glGenTextures__ILjava_nio_IntBuffer_2
934  (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
935    jint _exception = 0;
936    jarray _array = (jarray) 0;
937    jint _remaining;
938    GLuint *textures = (GLuint *) 0;
939
940    textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
941    if (_remaining < n) {
942        _exception = 1;
943        _env->ThrowNew(IAEClass, "remaining() < n");
944        goto exit;
945    }
946    glGenTextures(
947        (GLsizei)n,
948        (GLuint *)textures
949    );
950
951exit:
952    if (_array) {
953        releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE);
954    }
955}
956
957/* GLenum glGetError ( void ) */
958static jint
959android_glGetError__
960  (JNIEnv *_env, jobject _this) {
961    GLenum _returnValue;
962    _returnValue = glGetError();
963    return _returnValue;
964}
965
966/* void glGetIntegerv ( GLenum pname, GLint *params ) */
967static void
968android_glGetIntegerv__I_3II
969  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
970    jint _exception = 0;
971    GLint *params_base = (GLint *) 0;
972    jint _remaining;
973    GLint *params = (GLint *) 0;
974
975    if (!params_ref) {
976        _exception = 1;
977        _env->ThrowNew(IAEClass, "params == null");
978        goto exit;
979    }
980    if (offset < 0) {
981        _exception = 1;
982        _env->ThrowNew(IAEClass, "offset < 0");
983        goto exit;
984    }
985    _remaining = _env->GetArrayLength(params_ref) - offset;
986    int _needed;
987    switch (pname) {
988#if defined(GL_ALPHA_BITS)
989        case GL_ALPHA_BITS:
990#endif // defined(GL_ALPHA_BITS)
991#if defined(GL_ALPHA_TEST_FUNC)
992        case GL_ALPHA_TEST_FUNC:
993#endif // defined(GL_ALPHA_TEST_FUNC)
994#if defined(GL_ALPHA_TEST_REF)
995        case GL_ALPHA_TEST_REF:
996#endif // defined(GL_ALPHA_TEST_REF)
997#if defined(GL_BLEND_DST)
998        case GL_BLEND_DST:
999#endif // defined(GL_BLEND_DST)
1000#if defined(GL_BLUE_BITS)
1001        case GL_BLUE_BITS:
1002#endif // defined(GL_BLUE_BITS)
1003#if defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1004        case GL_COLOR_ARRAY_BUFFER_BINDING:
1005#endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1006#if defined(GL_COLOR_ARRAY_SIZE)
1007        case GL_COLOR_ARRAY_SIZE:
1008#endif // defined(GL_COLOR_ARRAY_SIZE)
1009#if defined(GL_COLOR_ARRAY_STRIDE)
1010        case GL_COLOR_ARRAY_STRIDE:
1011#endif // defined(GL_COLOR_ARRAY_STRIDE)
1012#if defined(GL_COLOR_ARRAY_TYPE)
1013        case GL_COLOR_ARRAY_TYPE:
1014#endif // defined(GL_COLOR_ARRAY_TYPE)
1015#if defined(GL_CULL_FACE)
1016        case GL_CULL_FACE:
1017#endif // defined(GL_CULL_FACE)
1018#if defined(GL_DEPTH_BITS)
1019        case GL_DEPTH_BITS:
1020#endif // defined(GL_DEPTH_BITS)
1021#if defined(GL_DEPTH_CLEAR_VALUE)
1022        case GL_DEPTH_CLEAR_VALUE:
1023#endif // defined(GL_DEPTH_CLEAR_VALUE)
1024#if defined(GL_DEPTH_FUNC)
1025        case GL_DEPTH_FUNC:
1026#endif // defined(GL_DEPTH_FUNC)
1027#if defined(GL_DEPTH_WRITEMASK)
1028        case GL_DEPTH_WRITEMASK:
1029#endif // defined(GL_DEPTH_WRITEMASK)
1030#if defined(GL_FOG_DENSITY)
1031        case GL_FOG_DENSITY:
1032#endif // defined(GL_FOG_DENSITY)
1033#if defined(GL_FOG_END)
1034        case GL_FOG_END:
1035#endif // defined(GL_FOG_END)
1036#if defined(GL_FOG_MODE)
1037        case GL_FOG_MODE:
1038#endif // defined(GL_FOG_MODE)
1039#if defined(GL_FOG_START)
1040        case GL_FOG_START:
1041#endif // defined(GL_FOG_START)
1042#if defined(GL_FRONT_FACE)
1043        case GL_FRONT_FACE:
1044#endif // defined(GL_FRONT_FACE)
1045#if defined(GL_GREEN_BITS)
1046        case GL_GREEN_BITS:
1047#endif // defined(GL_GREEN_BITS)
1048#if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1049        case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
1050#endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1051#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1052        case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
1053#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1054#if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1055        case GL_LIGHT_MODEL_COLOR_CONTROL:
1056#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1057#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1058        case GL_LIGHT_MODEL_LOCAL_VIEWER:
1059#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1060#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1061        case GL_LIGHT_MODEL_TWO_SIDE:
1062#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1063#if defined(GL_LINE_SMOOTH_HINT)
1064        case GL_LINE_SMOOTH_HINT:
1065#endif // defined(GL_LINE_SMOOTH_HINT)
1066#if defined(GL_LINE_WIDTH)
1067        case GL_LINE_WIDTH:
1068#endif // defined(GL_LINE_WIDTH)
1069#if defined(GL_LOGIC_OP_MODE)
1070        case GL_LOGIC_OP_MODE:
1071#endif // defined(GL_LOGIC_OP_MODE)
1072#if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1073        case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES:
1074#endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1075#if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1076        case GL_MATRIX_INDEX_ARRAY_SIZE_OES:
1077#endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1078#if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1079        case GL_MATRIX_INDEX_ARRAY_STRIDE_OES:
1080#endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1081#if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1082        case GL_MATRIX_INDEX_ARRAY_TYPE_OES:
1083#endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1084#if defined(GL_MATRIX_MODE)
1085        case GL_MATRIX_MODE:
1086#endif // defined(GL_MATRIX_MODE)
1087#if defined(GL_MAX_CLIP_PLANES)
1088        case GL_MAX_CLIP_PLANES:
1089#endif // defined(GL_MAX_CLIP_PLANES)
1090#if defined(GL_MAX_ELEMENTS_INDICES)
1091        case GL_MAX_ELEMENTS_INDICES:
1092#endif // defined(GL_MAX_ELEMENTS_INDICES)
1093#if defined(GL_MAX_ELEMENTS_VERTICES)
1094        case GL_MAX_ELEMENTS_VERTICES:
1095#endif // defined(GL_MAX_ELEMENTS_VERTICES)
1096#if defined(GL_MAX_LIGHTS)
1097        case GL_MAX_LIGHTS:
1098#endif // defined(GL_MAX_LIGHTS)
1099#if defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1100        case GL_MAX_MODELVIEW_STACK_DEPTH:
1101#endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1102#if defined(GL_MAX_PALETTE_MATRICES_OES)
1103        case GL_MAX_PALETTE_MATRICES_OES:
1104#endif // defined(GL_MAX_PALETTE_MATRICES_OES)
1105#if defined(GL_MAX_PROJECTION_STACK_DEPTH)
1106        case GL_MAX_PROJECTION_STACK_DEPTH:
1107#endif // defined(GL_MAX_PROJECTION_STACK_DEPTH)
1108#if defined(GL_MAX_TEXTURE_SIZE)
1109        case GL_MAX_TEXTURE_SIZE:
1110#endif // defined(GL_MAX_TEXTURE_SIZE)
1111#if defined(GL_MAX_TEXTURE_STACK_DEPTH)
1112        case GL_MAX_TEXTURE_STACK_DEPTH:
1113#endif // defined(GL_MAX_TEXTURE_STACK_DEPTH)
1114#if defined(GL_MAX_TEXTURE_UNITS)
1115        case GL_MAX_TEXTURE_UNITS:
1116#endif // defined(GL_MAX_TEXTURE_UNITS)
1117#if defined(GL_MAX_VERTEX_UNITS_OES)
1118        case GL_MAX_VERTEX_UNITS_OES:
1119#endif // defined(GL_MAX_VERTEX_UNITS_OES)
1120#if defined(GL_MODELVIEW_STACK_DEPTH)
1121        case GL_MODELVIEW_STACK_DEPTH:
1122#endif // defined(GL_MODELVIEW_STACK_DEPTH)
1123#if defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1124        case GL_NORMAL_ARRAY_BUFFER_BINDING:
1125#endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1126#if defined(GL_NORMAL_ARRAY_STRIDE)
1127        case GL_NORMAL_ARRAY_STRIDE:
1128#endif // defined(GL_NORMAL_ARRAY_STRIDE)
1129#if defined(GL_NORMAL_ARRAY_TYPE)
1130        case GL_NORMAL_ARRAY_TYPE:
1131#endif // defined(GL_NORMAL_ARRAY_TYPE)
1132#if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1133        case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
1134#endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1135#if defined(GL_PACK_ALIGNMENT)
1136        case GL_PACK_ALIGNMENT:
1137#endif // defined(GL_PACK_ALIGNMENT)
1138#if defined(GL_PERSPECTIVE_CORRECTION_HINT)
1139        case GL_PERSPECTIVE_CORRECTION_HINT:
1140#endif // defined(GL_PERSPECTIVE_CORRECTION_HINT)
1141#if defined(GL_POINT_SIZE)
1142        case GL_POINT_SIZE:
1143#endif // defined(GL_POINT_SIZE)
1144#if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1145        case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
1146#endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1147#if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1148        case GL_POINT_SIZE_ARRAY_STRIDE_OES:
1149#endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1150#if defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1151        case GL_POINT_SIZE_ARRAY_TYPE_OES:
1152#endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1153#if defined(GL_POINT_SMOOTH_HINT)
1154        case GL_POINT_SMOOTH_HINT:
1155#endif // defined(GL_POINT_SMOOTH_HINT)
1156#if defined(GL_POLYGON_OFFSET_FACTOR)
1157        case GL_POLYGON_OFFSET_FACTOR:
1158#endif // defined(GL_POLYGON_OFFSET_FACTOR)
1159#if defined(GL_POLYGON_OFFSET_UNITS)
1160        case GL_POLYGON_OFFSET_UNITS:
1161#endif // defined(GL_POLYGON_OFFSET_UNITS)
1162#if defined(GL_PROJECTION_STACK_DEPTH)
1163        case GL_PROJECTION_STACK_DEPTH:
1164#endif // defined(GL_PROJECTION_STACK_DEPTH)
1165#if defined(GL_RED_BITS)
1166        case GL_RED_BITS:
1167#endif // defined(GL_RED_BITS)
1168#if defined(GL_SHADE_MODEL)
1169        case GL_SHADE_MODEL:
1170#endif // defined(GL_SHADE_MODEL)
1171#if defined(GL_STENCIL_BITS)
1172        case GL_STENCIL_BITS:
1173#endif // defined(GL_STENCIL_BITS)
1174#if defined(GL_STENCIL_CLEAR_VALUE)
1175        case GL_STENCIL_CLEAR_VALUE:
1176#endif // defined(GL_STENCIL_CLEAR_VALUE)
1177#if defined(GL_STENCIL_FAIL)
1178        case GL_STENCIL_FAIL:
1179#endif // defined(GL_STENCIL_FAIL)
1180#if defined(GL_STENCIL_FUNC)
1181        case GL_STENCIL_FUNC:
1182#endif // defined(GL_STENCIL_FUNC)
1183#if defined(GL_STENCIL_PASS_DEPTH_FAIL)
1184        case GL_STENCIL_PASS_DEPTH_FAIL:
1185#endif // defined(GL_STENCIL_PASS_DEPTH_FAIL)
1186#if defined(GL_STENCIL_PASS_DEPTH_PASS)
1187        case GL_STENCIL_PASS_DEPTH_PASS:
1188#endif // defined(GL_STENCIL_PASS_DEPTH_PASS)
1189#if defined(GL_STENCIL_REF)
1190        case GL_STENCIL_REF:
1191#endif // defined(GL_STENCIL_REF)
1192#if defined(GL_STENCIL_VALUE_MASK)
1193        case GL_STENCIL_VALUE_MASK:
1194#endif // defined(GL_STENCIL_VALUE_MASK)
1195#if defined(GL_STENCIL_WRITEMASK)
1196        case GL_STENCIL_WRITEMASK:
1197#endif // defined(GL_STENCIL_WRITEMASK)
1198#if defined(GL_SUBPIXEL_BITS)
1199        case GL_SUBPIXEL_BITS:
1200#endif // defined(GL_SUBPIXEL_BITS)
1201#if defined(GL_TEXTURE_BINDING_2D)
1202        case GL_TEXTURE_BINDING_2D:
1203#endif // defined(GL_TEXTURE_BINDING_2D)
1204#if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1205        case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING:
1206#endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1207#if defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1208        case GL_TEXTURE_COORD_ARRAY_SIZE:
1209#endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1210#if defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1211        case GL_TEXTURE_COORD_ARRAY_STRIDE:
1212#endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1213#if defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1214        case GL_TEXTURE_COORD_ARRAY_TYPE:
1215#endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1216#if defined(GL_TEXTURE_STACK_DEPTH)
1217        case GL_TEXTURE_STACK_DEPTH:
1218#endif // defined(GL_TEXTURE_STACK_DEPTH)
1219#if defined(GL_UNPACK_ALIGNMENT)
1220        case GL_UNPACK_ALIGNMENT:
1221#endif // defined(GL_UNPACK_ALIGNMENT)
1222#if defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1223        case GL_VERTEX_ARRAY_BUFFER_BINDING:
1224#endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1225#if defined(GL_VERTEX_ARRAY_SIZE)
1226        case GL_VERTEX_ARRAY_SIZE:
1227#endif // defined(GL_VERTEX_ARRAY_SIZE)
1228#if defined(GL_VERTEX_ARRAY_STRIDE)
1229        case GL_VERTEX_ARRAY_STRIDE:
1230#endif // defined(GL_VERTEX_ARRAY_STRIDE)
1231#if defined(GL_VERTEX_ARRAY_TYPE)
1232        case GL_VERTEX_ARRAY_TYPE:
1233#endif // defined(GL_VERTEX_ARRAY_TYPE)
1234#if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1235        case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES:
1236#endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1237#if defined(GL_WEIGHT_ARRAY_SIZE_OES)
1238        case GL_WEIGHT_ARRAY_SIZE_OES:
1239#endif // defined(GL_WEIGHT_ARRAY_SIZE_OES)
1240#if defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1241        case GL_WEIGHT_ARRAY_STRIDE_OES:
1242#endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1243#if defined(GL_WEIGHT_ARRAY_TYPE_OES)
1244        case GL_WEIGHT_ARRAY_TYPE_OES:
1245#endif // defined(GL_WEIGHT_ARRAY_TYPE_OES)
1246            _needed = 1;
1247            break;
1248#if defined(GL_ALIASED_POINT_SIZE_RANGE)
1249        case GL_ALIASED_POINT_SIZE_RANGE:
1250#endif // defined(GL_ALIASED_POINT_SIZE_RANGE)
1251#if defined(GL_ALIASED_LINE_WIDTH_RANGE)
1252        case GL_ALIASED_LINE_WIDTH_RANGE:
1253#endif // defined(GL_ALIASED_LINE_WIDTH_RANGE)
1254#if defined(GL_DEPTH_RANGE)
1255        case GL_DEPTH_RANGE:
1256#endif // defined(GL_DEPTH_RANGE)
1257#if defined(GL_MAX_VIEWPORT_DIMS)
1258        case GL_MAX_VIEWPORT_DIMS:
1259#endif // defined(GL_MAX_VIEWPORT_DIMS)
1260#if defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1261        case GL_SMOOTH_LINE_WIDTH_RANGE:
1262#endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1263#if defined(GL_SMOOTH_POINT_SIZE_RANGE)
1264        case GL_SMOOTH_POINT_SIZE_RANGE:
1265#endif // defined(GL_SMOOTH_POINT_SIZE_RANGE)
1266            _needed = 2;
1267            break;
1268#if defined(GL_COLOR_CLEAR_VALUE)
1269        case GL_COLOR_CLEAR_VALUE:
1270#endif // defined(GL_COLOR_CLEAR_VALUE)
1271#if defined(GL_COLOR_WRITEMASK)
1272        case GL_COLOR_WRITEMASK:
1273#endif // defined(GL_COLOR_WRITEMASK)
1274#if defined(GL_FOG_COLOR)
1275        case GL_FOG_COLOR:
1276#endif // defined(GL_FOG_COLOR)
1277#if defined(GL_LIGHT_MODEL_AMBIENT)
1278        case GL_LIGHT_MODEL_AMBIENT:
1279#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1280#if defined(GL_SCISSOR_BOX)
1281        case GL_SCISSOR_BOX:
1282#endif // defined(GL_SCISSOR_BOX)
1283#if defined(GL_VIEWPORT)
1284        case GL_VIEWPORT:
1285#endif // defined(GL_VIEWPORT)
1286            _needed = 4;
1287            break;
1288#if defined(GL_MODELVIEW_MATRIX)
1289        case GL_MODELVIEW_MATRIX:
1290#endif // defined(GL_MODELVIEW_MATRIX)
1291#if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1292        case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES:
1293#endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1294#if defined(GL_PROJECTION_MATRIX)
1295        case GL_PROJECTION_MATRIX:
1296#endif // defined(GL_PROJECTION_MATRIX)
1297#if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1298        case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES:
1299#endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1300#if defined(GL_TEXTURE_MATRIX)
1301        case GL_TEXTURE_MATRIX:
1302#endif // defined(GL_TEXTURE_MATRIX)
1303#if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1304        case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES:
1305#endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1306            _needed = 16;
1307            break;
1308#if defined(GL_COMPRESSED_TEXTURE_FORMATS)
1309        case GL_COMPRESSED_TEXTURE_FORMATS:
1310#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
1311            _needed = getNumCompressedTextureFormats();
1312            break;
1313        default:
1314            _needed = 0;
1315            break;
1316    }
1317    if (_remaining < _needed) {
1318        _exception = 1;
1319        _env->ThrowNew(IAEClass, "length - offset < needed");
1320        goto exit;
1321    }
1322    params_base = (GLint *)
1323        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1324    params = params_base + offset;
1325
1326    glGetIntegerv(
1327        (GLenum)pname,
1328        (GLint *)params
1329    );
1330
1331exit:
1332    if (params_base) {
1333        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1334            _exception ? JNI_ABORT: 0);
1335    }
1336}
1337
1338/* void glGetIntegerv ( GLenum pname, GLint *params ) */
1339static void
1340android_glGetIntegerv__ILjava_nio_IntBuffer_2
1341  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1342    jint _exception = 0;
1343    jarray _array = (jarray) 0;
1344    jint _remaining;
1345    GLint *params = (GLint *) 0;
1346
1347    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
1348    int _needed;
1349    switch (pname) {
1350#if defined(GL_ALPHA_BITS)
1351        case GL_ALPHA_BITS:
1352#endif // defined(GL_ALPHA_BITS)
1353#if defined(GL_ALPHA_TEST_FUNC)
1354        case GL_ALPHA_TEST_FUNC:
1355#endif // defined(GL_ALPHA_TEST_FUNC)
1356#if defined(GL_ALPHA_TEST_REF)
1357        case GL_ALPHA_TEST_REF:
1358#endif // defined(GL_ALPHA_TEST_REF)
1359#if defined(GL_BLEND_DST)
1360        case GL_BLEND_DST:
1361#endif // defined(GL_BLEND_DST)
1362#if defined(GL_BLUE_BITS)
1363        case GL_BLUE_BITS:
1364#endif // defined(GL_BLUE_BITS)
1365#if defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1366        case GL_COLOR_ARRAY_BUFFER_BINDING:
1367#endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1368#if defined(GL_COLOR_ARRAY_SIZE)
1369        case GL_COLOR_ARRAY_SIZE:
1370#endif // defined(GL_COLOR_ARRAY_SIZE)
1371#if defined(GL_COLOR_ARRAY_STRIDE)
1372        case GL_COLOR_ARRAY_STRIDE:
1373#endif // defined(GL_COLOR_ARRAY_STRIDE)
1374#if defined(GL_COLOR_ARRAY_TYPE)
1375        case GL_COLOR_ARRAY_TYPE:
1376#endif // defined(GL_COLOR_ARRAY_TYPE)
1377#if defined(GL_CULL_FACE)
1378        case GL_CULL_FACE:
1379#endif // defined(GL_CULL_FACE)
1380#if defined(GL_DEPTH_BITS)
1381        case GL_DEPTH_BITS:
1382#endif // defined(GL_DEPTH_BITS)
1383#if defined(GL_DEPTH_CLEAR_VALUE)
1384        case GL_DEPTH_CLEAR_VALUE:
1385#endif // defined(GL_DEPTH_CLEAR_VALUE)
1386#if defined(GL_DEPTH_FUNC)
1387        case GL_DEPTH_FUNC:
1388#endif // defined(GL_DEPTH_FUNC)
1389#if defined(GL_DEPTH_WRITEMASK)
1390        case GL_DEPTH_WRITEMASK:
1391#endif // defined(GL_DEPTH_WRITEMASK)
1392#if defined(GL_FOG_DENSITY)
1393        case GL_FOG_DENSITY:
1394#endif // defined(GL_FOG_DENSITY)
1395#if defined(GL_FOG_END)
1396        case GL_FOG_END:
1397#endif // defined(GL_FOG_END)
1398#if defined(GL_FOG_MODE)
1399        case GL_FOG_MODE:
1400#endif // defined(GL_FOG_MODE)
1401#if defined(GL_FOG_START)
1402        case GL_FOG_START:
1403#endif // defined(GL_FOG_START)
1404#if defined(GL_FRONT_FACE)
1405        case GL_FRONT_FACE:
1406#endif // defined(GL_FRONT_FACE)
1407#if defined(GL_GREEN_BITS)
1408        case GL_GREEN_BITS:
1409#endif // defined(GL_GREEN_BITS)
1410#if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1411        case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
1412#endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1413#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1414        case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
1415#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1416#if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1417        case GL_LIGHT_MODEL_COLOR_CONTROL:
1418#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1419#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1420        case GL_LIGHT_MODEL_LOCAL_VIEWER:
1421#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1422#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1423        case GL_LIGHT_MODEL_TWO_SIDE:
1424#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1425#if defined(GL_LINE_SMOOTH_HINT)
1426        case GL_LINE_SMOOTH_HINT:
1427#endif // defined(GL_LINE_SMOOTH_HINT)
1428#if defined(GL_LINE_WIDTH)
1429        case GL_LINE_WIDTH:
1430#endif // defined(GL_LINE_WIDTH)
1431#if defined(GL_LOGIC_OP_MODE)
1432        case GL_LOGIC_OP_MODE:
1433#endif // defined(GL_LOGIC_OP_MODE)
1434#if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1435        case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES:
1436#endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1437#if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1438        case GL_MATRIX_INDEX_ARRAY_SIZE_OES:
1439#endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1440#if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1441        case GL_MATRIX_INDEX_ARRAY_STRIDE_OES:
1442#endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1443#if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1444        case GL_MATRIX_INDEX_ARRAY_TYPE_OES:
1445#endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1446#if defined(GL_MATRIX_MODE)
1447        case GL_MATRIX_MODE:
1448#endif // defined(GL_MATRIX_MODE)
1449#if defined(GL_MAX_CLIP_PLANES)
1450        case GL_MAX_CLIP_PLANES:
1451#endif // defined(GL_MAX_CLIP_PLANES)
1452#if defined(GL_MAX_ELEMENTS_INDICES)
1453        case GL_MAX_ELEMENTS_INDICES:
1454#endif // defined(GL_MAX_ELEMENTS_INDICES)
1455#if defined(GL_MAX_ELEMENTS_VERTICES)
1456        case GL_MAX_ELEMENTS_VERTICES:
1457#endif // defined(GL_MAX_ELEMENTS_VERTICES)
1458#if defined(GL_MAX_LIGHTS)
1459        case GL_MAX_LIGHTS:
1460#endif // defined(GL_MAX_LIGHTS)
1461#if defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1462        case GL_MAX_MODELVIEW_STACK_DEPTH:
1463#endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1464#if defined(GL_MAX_PALETTE_MATRICES_OES)
1465        case GL_MAX_PALETTE_MATRICES_OES:
1466#endif // defined(GL_MAX_PALETTE_MATRICES_OES)
1467#if defined(GL_MAX_PROJECTION_STACK_DEPTH)
1468        case GL_MAX_PROJECTION_STACK_DEPTH:
1469#endif // defined(GL_MAX_PROJECTION_STACK_DEPTH)
1470#if defined(GL_MAX_TEXTURE_SIZE)
1471        case GL_MAX_TEXTURE_SIZE:
1472#endif // defined(GL_MAX_TEXTURE_SIZE)
1473#if defined(GL_MAX_TEXTURE_STACK_DEPTH)
1474        case GL_MAX_TEXTURE_STACK_DEPTH:
1475#endif // defined(GL_MAX_TEXTURE_STACK_DEPTH)
1476#if defined(GL_MAX_TEXTURE_UNITS)
1477        case GL_MAX_TEXTURE_UNITS:
1478#endif // defined(GL_MAX_TEXTURE_UNITS)
1479#if defined(GL_MAX_VERTEX_UNITS_OES)
1480        case GL_MAX_VERTEX_UNITS_OES:
1481#endif // defined(GL_MAX_VERTEX_UNITS_OES)
1482#if defined(GL_MODELVIEW_STACK_DEPTH)
1483        case GL_MODELVIEW_STACK_DEPTH:
1484#endif // defined(GL_MODELVIEW_STACK_DEPTH)
1485#if defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1486        case GL_NORMAL_ARRAY_BUFFER_BINDING:
1487#endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1488#if defined(GL_NORMAL_ARRAY_STRIDE)
1489        case GL_NORMAL_ARRAY_STRIDE:
1490#endif // defined(GL_NORMAL_ARRAY_STRIDE)
1491#if defined(GL_NORMAL_ARRAY_TYPE)
1492        case GL_NORMAL_ARRAY_TYPE:
1493#endif // defined(GL_NORMAL_ARRAY_TYPE)
1494#if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1495        case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
1496#endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1497#if defined(GL_PACK_ALIGNMENT)
1498        case GL_PACK_ALIGNMENT:
1499#endif // defined(GL_PACK_ALIGNMENT)
1500#if defined(GL_PERSPECTIVE_CORRECTION_HINT)
1501        case GL_PERSPECTIVE_CORRECTION_HINT:
1502#endif // defined(GL_PERSPECTIVE_CORRECTION_HINT)
1503#if defined(GL_POINT_SIZE)
1504        case GL_POINT_SIZE:
1505#endif // defined(GL_POINT_SIZE)
1506#if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1507        case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
1508#endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1509#if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1510        case GL_POINT_SIZE_ARRAY_STRIDE_OES:
1511#endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1512#if defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1513        case GL_POINT_SIZE_ARRAY_TYPE_OES:
1514#endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1515#if defined(GL_POINT_SMOOTH_HINT)
1516        case GL_POINT_SMOOTH_HINT:
1517#endif // defined(GL_POINT_SMOOTH_HINT)
1518#if defined(GL_POLYGON_OFFSET_FACTOR)
1519        case GL_POLYGON_OFFSET_FACTOR:
1520#endif // defined(GL_POLYGON_OFFSET_FACTOR)
1521#if defined(GL_POLYGON_OFFSET_UNITS)
1522        case GL_POLYGON_OFFSET_UNITS:
1523#endif // defined(GL_POLYGON_OFFSET_UNITS)
1524#if defined(GL_PROJECTION_STACK_DEPTH)
1525        case GL_PROJECTION_STACK_DEPTH:
1526#endif // defined(GL_PROJECTION_STACK_DEPTH)
1527#if defined(GL_RED_BITS)
1528        case GL_RED_BITS:
1529#endif // defined(GL_RED_BITS)
1530#if defined(GL_SHADE_MODEL)
1531        case GL_SHADE_MODEL:
1532#endif // defined(GL_SHADE_MODEL)
1533#if defined(GL_STENCIL_BITS)
1534        case GL_STENCIL_BITS:
1535#endif // defined(GL_STENCIL_BITS)
1536#if defined(GL_STENCIL_CLEAR_VALUE)
1537        case GL_STENCIL_CLEAR_VALUE:
1538#endif // defined(GL_STENCIL_CLEAR_VALUE)
1539#if defined(GL_STENCIL_FAIL)
1540        case GL_STENCIL_FAIL:
1541#endif // defined(GL_STENCIL_FAIL)
1542#if defined(GL_STENCIL_FUNC)
1543        case GL_STENCIL_FUNC:
1544#endif // defined(GL_STENCIL_FUNC)
1545#if defined(GL_STENCIL_PASS_DEPTH_FAIL)
1546        case GL_STENCIL_PASS_DEPTH_FAIL:
1547#endif // defined(GL_STENCIL_PASS_DEPTH_FAIL)
1548#if defined(GL_STENCIL_PASS_DEPTH_PASS)
1549        case GL_STENCIL_PASS_DEPTH_PASS:
1550#endif // defined(GL_STENCIL_PASS_DEPTH_PASS)
1551#if defined(GL_STENCIL_REF)
1552        case GL_STENCIL_REF:
1553#endif // defined(GL_STENCIL_REF)
1554#if defined(GL_STENCIL_VALUE_MASK)
1555        case GL_STENCIL_VALUE_MASK:
1556#endif // defined(GL_STENCIL_VALUE_MASK)
1557#if defined(GL_STENCIL_WRITEMASK)
1558        case GL_STENCIL_WRITEMASK:
1559#endif // defined(GL_STENCIL_WRITEMASK)
1560#if defined(GL_SUBPIXEL_BITS)
1561        case GL_SUBPIXEL_BITS:
1562#endif // defined(GL_SUBPIXEL_BITS)
1563#if defined(GL_TEXTURE_BINDING_2D)
1564        case GL_TEXTURE_BINDING_2D:
1565#endif // defined(GL_TEXTURE_BINDING_2D)
1566#if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1567        case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING:
1568#endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1569#if defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1570        case GL_TEXTURE_COORD_ARRAY_SIZE:
1571#endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1572#if defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1573        case GL_TEXTURE_COORD_ARRAY_STRIDE:
1574#endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1575#if defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1576        case GL_TEXTURE_COORD_ARRAY_TYPE:
1577#endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1578#if defined(GL_TEXTURE_STACK_DEPTH)
1579        case GL_TEXTURE_STACK_DEPTH:
1580#endif // defined(GL_TEXTURE_STACK_DEPTH)
1581#if defined(GL_UNPACK_ALIGNMENT)
1582        case GL_UNPACK_ALIGNMENT:
1583#endif // defined(GL_UNPACK_ALIGNMENT)
1584#if defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1585        case GL_VERTEX_ARRAY_BUFFER_BINDING:
1586#endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1587#if defined(GL_VERTEX_ARRAY_SIZE)
1588        case GL_VERTEX_ARRAY_SIZE:
1589#endif // defined(GL_VERTEX_ARRAY_SIZE)
1590#if defined(GL_VERTEX_ARRAY_STRIDE)
1591        case GL_VERTEX_ARRAY_STRIDE:
1592#endif // defined(GL_VERTEX_ARRAY_STRIDE)
1593#if defined(GL_VERTEX_ARRAY_TYPE)
1594        case GL_VERTEX_ARRAY_TYPE:
1595#endif // defined(GL_VERTEX_ARRAY_TYPE)
1596#if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1597        case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES:
1598#endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1599#if defined(GL_WEIGHT_ARRAY_SIZE_OES)
1600        case GL_WEIGHT_ARRAY_SIZE_OES:
1601#endif // defined(GL_WEIGHT_ARRAY_SIZE_OES)
1602#if defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1603        case GL_WEIGHT_ARRAY_STRIDE_OES:
1604#endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1605#if defined(GL_WEIGHT_ARRAY_TYPE_OES)
1606        case GL_WEIGHT_ARRAY_TYPE_OES:
1607#endif // defined(GL_WEIGHT_ARRAY_TYPE_OES)
1608            _needed = 1;
1609            break;
1610#if defined(GL_ALIASED_POINT_SIZE_RANGE)
1611        case GL_ALIASED_POINT_SIZE_RANGE:
1612#endif // defined(GL_ALIASED_POINT_SIZE_RANGE)
1613#if defined(GL_ALIASED_LINE_WIDTH_RANGE)
1614        case GL_ALIASED_LINE_WIDTH_RANGE:
1615#endif // defined(GL_ALIASED_LINE_WIDTH_RANGE)
1616#if defined(GL_DEPTH_RANGE)
1617        case GL_DEPTH_RANGE:
1618#endif // defined(GL_DEPTH_RANGE)
1619#if defined(GL_MAX_VIEWPORT_DIMS)
1620        case GL_MAX_VIEWPORT_DIMS:
1621#endif // defined(GL_MAX_VIEWPORT_DIMS)
1622#if defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1623        case GL_SMOOTH_LINE_WIDTH_RANGE:
1624#endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1625#if defined(GL_SMOOTH_POINT_SIZE_RANGE)
1626        case GL_SMOOTH_POINT_SIZE_RANGE:
1627#endif // defined(GL_SMOOTH_POINT_SIZE_RANGE)
1628            _needed = 2;
1629            break;
1630#if defined(GL_COLOR_CLEAR_VALUE)
1631        case GL_COLOR_CLEAR_VALUE:
1632#endif // defined(GL_COLOR_CLEAR_VALUE)
1633#if defined(GL_COLOR_WRITEMASK)
1634        case GL_COLOR_WRITEMASK:
1635#endif // defined(GL_COLOR_WRITEMASK)
1636#if defined(GL_FOG_COLOR)
1637        case GL_FOG_COLOR:
1638#endif // defined(GL_FOG_COLOR)
1639#if defined(GL_LIGHT_MODEL_AMBIENT)
1640        case GL_LIGHT_MODEL_AMBIENT:
1641#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1642#if defined(GL_SCISSOR_BOX)
1643        case GL_SCISSOR_BOX:
1644#endif // defined(GL_SCISSOR_BOX)
1645#if defined(GL_VIEWPORT)
1646        case GL_VIEWPORT:
1647#endif // defined(GL_VIEWPORT)
1648            _needed = 4;
1649            break;
1650#if defined(GL_MODELVIEW_MATRIX)
1651        case GL_MODELVIEW_MATRIX:
1652#endif // defined(GL_MODELVIEW_MATRIX)
1653#if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1654        case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES:
1655#endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1656#if defined(GL_PROJECTION_MATRIX)
1657        case GL_PROJECTION_MATRIX:
1658#endif // defined(GL_PROJECTION_MATRIX)
1659#if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1660        case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES:
1661#endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1662#if defined(GL_TEXTURE_MATRIX)
1663        case GL_TEXTURE_MATRIX:
1664#endif // defined(GL_TEXTURE_MATRIX)
1665#if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1666        case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES:
1667#endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1668            _needed = 16;
1669            break;
1670#if defined(GL_COMPRESSED_TEXTURE_FORMATS)
1671        case GL_COMPRESSED_TEXTURE_FORMATS:
1672#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
1673            _needed = getNumCompressedTextureFormats();
1674            break;
1675        default:
1676            _needed = 0;
1677            break;
1678    }
1679    if (_remaining < _needed) {
1680        _exception = 1;
1681        _env->ThrowNew(IAEClass, "remaining() < needed");
1682        goto exit;
1683    }
1684    glGetIntegerv(
1685        (GLenum)pname,
1686        (GLint *)params
1687    );
1688
1689exit:
1690    if (_array) {
1691        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
1692    }
1693}
1694
1695#include <string.h>
1696
1697/* const GLubyte * glGetString ( GLenum name ) */
1698static
1699jstring
1700android_glGetString
1701  (JNIEnv *_env, jobject _this, jint name) {
1702    const char * chars = (const char *)glGetString((GLenum)name);
1703    jstring output = _env->NewStringUTF(chars);
1704    return output;
1705}
1706/* void glHint ( GLenum target, GLenum mode ) */
1707static void
1708android_glHint__II
1709  (JNIEnv *_env, jobject _this, jint target, jint mode) {
1710    glHint(
1711        (GLenum)target,
1712        (GLenum)mode
1713    );
1714}
1715
1716/* void glLightModelf ( GLenum pname, GLfloat param ) */
1717static void
1718android_glLightModelf__IF
1719  (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
1720    glLightModelf(
1721        (GLenum)pname,
1722        (GLfloat)param
1723    );
1724}
1725
1726/* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
1727static void
1728android_glLightModelfv__I_3FI
1729  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
1730    GLfloat *params_base = (GLfloat *) 0;
1731    jint _remaining;
1732    GLfloat *params = (GLfloat *) 0;
1733
1734    if (!params_ref) {
1735        _env->ThrowNew(IAEClass, "params == null");
1736        goto exit;
1737    }
1738    if (offset < 0) {
1739        _env->ThrowNew(IAEClass, "offset < 0");
1740        goto exit;
1741    }
1742    _remaining = _env->GetArrayLength(params_ref) - offset;
1743    int _needed;
1744    switch (pname) {
1745#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1746        case GL_LIGHT_MODEL_TWO_SIDE:
1747#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1748            _needed = 1;
1749            break;
1750#if defined(GL_LIGHT_MODEL_AMBIENT)
1751        case GL_LIGHT_MODEL_AMBIENT:
1752#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1753            _needed = 4;
1754            break;
1755        default:
1756            _needed = 0;
1757            break;
1758    }
1759    if (_remaining < _needed) {
1760        _env->ThrowNew(IAEClass, "length - offset < needed");
1761        goto exit;
1762    }
1763    params_base = (GLfloat *)
1764        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1765    params = params_base + offset;
1766
1767    glLightModelfv(
1768        (GLenum)pname,
1769        (GLfloat *)params
1770    );
1771
1772exit:
1773    if (params_base) {
1774        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1775            JNI_ABORT);
1776    }
1777}
1778
1779/* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
1780static void
1781android_glLightModelfv__ILjava_nio_FloatBuffer_2
1782  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1783    jarray _array = (jarray) 0;
1784    jint _remaining;
1785    GLfloat *params = (GLfloat *) 0;
1786
1787    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
1788    int _needed;
1789    switch (pname) {
1790#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1791        case GL_LIGHT_MODEL_TWO_SIDE:
1792#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1793            _needed = 1;
1794            break;
1795#if defined(GL_LIGHT_MODEL_AMBIENT)
1796        case GL_LIGHT_MODEL_AMBIENT:
1797#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1798            _needed = 4;
1799            break;
1800        default:
1801            _needed = 0;
1802            break;
1803    }
1804    if (_remaining < _needed) {
1805        _env->ThrowNew(IAEClass, "remaining() < needed");
1806        goto exit;
1807    }
1808    glLightModelfv(
1809        (GLenum)pname,
1810        (GLfloat *)params
1811    );
1812
1813exit:
1814    if (_array) {
1815        releasePointer(_env, _array, params, JNI_FALSE);
1816    }
1817}
1818
1819/* void glLightModelx ( GLenum pname, GLfixed param ) */
1820static void
1821android_glLightModelx__II
1822  (JNIEnv *_env, jobject _this, jint pname, jint param) {
1823    glLightModelx(
1824        (GLenum)pname,
1825        (GLfixed)param
1826    );
1827}
1828
1829/* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
1830static void
1831android_glLightModelxv__I_3II
1832  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
1833    GLfixed *params_base = (GLfixed *) 0;
1834    jint _remaining;
1835    GLfixed *params = (GLfixed *) 0;
1836
1837    if (!params_ref) {
1838        _env->ThrowNew(IAEClass, "params == null");
1839        goto exit;
1840    }
1841    if (offset < 0) {
1842        _env->ThrowNew(IAEClass, "offset < 0");
1843        goto exit;
1844    }
1845    _remaining = _env->GetArrayLength(params_ref) - offset;
1846    int _needed;
1847    switch (pname) {
1848#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1849        case GL_LIGHT_MODEL_TWO_SIDE:
1850#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1851            _needed = 1;
1852            break;
1853#if defined(GL_LIGHT_MODEL_AMBIENT)
1854        case GL_LIGHT_MODEL_AMBIENT:
1855#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1856            _needed = 4;
1857            break;
1858        default:
1859            _needed = 0;
1860            break;
1861    }
1862    if (_remaining < _needed) {
1863        _env->ThrowNew(IAEClass, "length - offset < needed");
1864        goto exit;
1865    }
1866    params_base = (GLfixed *)
1867        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1868    params = params_base + offset;
1869
1870    glLightModelxv(
1871        (GLenum)pname,
1872        (GLfixed *)params
1873    );
1874
1875exit:
1876    if (params_base) {
1877        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1878            JNI_ABORT);
1879    }
1880}
1881
1882/* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
1883static void
1884android_glLightModelxv__ILjava_nio_IntBuffer_2
1885  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1886    jarray _array = (jarray) 0;
1887    jint _remaining;
1888    GLfixed *params = (GLfixed *) 0;
1889
1890    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1891    int _needed;
1892    switch (pname) {
1893#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1894        case GL_LIGHT_MODEL_TWO_SIDE:
1895#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1896            _needed = 1;
1897            break;
1898#if defined(GL_LIGHT_MODEL_AMBIENT)
1899        case GL_LIGHT_MODEL_AMBIENT:
1900#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1901            _needed = 4;
1902            break;
1903        default:
1904            _needed = 0;
1905            break;
1906    }
1907    if (_remaining < _needed) {
1908        _env->ThrowNew(IAEClass, "remaining() < needed");
1909        goto exit;
1910    }
1911    glLightModelxv(
1912        (GLenum)pname,
1913        (GLfixed *)params
1914    );
1915
1916exit:
1917    if (_array) {
1918        releasePointer(_env, _array, params, JNI_FALSE);
1919    }
1920}
1921
1922/* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */
1923static void
1924android_glLightf__IIF
1925  (JNIEnv *_env, jobject _this, jint light, jint pname, jfloat param) {
1926    glLightf(
1927        (GLenum)light,
1928        (GLenum)pname,
1929        (GLfloat)param
1930    );
1931}
1932
1933/* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
1934static void
1935android_glLightfv__II_3FI
1936  (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
1937    GLfloat *params_base = (GLfloat *) 0;
1938    jint _remaining;
1939    GLfloat *params = (GLfloat *) 0;
1940
1941    if (!params_ref) {
1942        _env->ThrowNew(IAEClass, "params == null");
1943        goto exit;
1944    }
1945    if (offset < 0) {
1946        _env->ThrowNew(IAEClass, "offset < 0");
1947        goto exit;
1948    }
1949    _remaining = _env->GetArrayLength(params_ref) - offset;
1950    int _needed;
1951    switch (pname) {
1952#if defined(GL_SPOT_EXPONENT)
1953        case GL_SPOT_EXPONENT:
1954#endif // defined(GL_SPOT_EXPONENT)
1955#if defined(GL_SPOT_CUTOFF)
1956        case GL_SPOT_CUTOFF:
1957#endif // defined(GL_SPOT_CUTOFF)
1958#if defined(GL_CONSTANT_ATTENUATION)
1959        case GL_CONSTANT_ATTENUATION:
1960#endif // defined(GL_CONSTANT_ATTENUATION)
1961#if defined(GL_LINEAR_ATTENUATION)
1962        case GL_LINEAR_ATTENUATION:
1963#endif // defined(GL_LINEAR_ATTENUATION)
1964#if defined(GL_QUADRATIC_ATTENUATION)
1965        case GL_QUADRATIC_ATTENUATION:
1966#endif // defined(GL_QUADRATIC_ATTENUATION)
1967            _needed = 1;
1968            break;
1969#if defined(GL_SPOT_DIRECTION)
1970        case GL_SPOT_DIRECTION:
1971#endif // defined(GL_SPOT_DIRECTION)
1972            _needed = 3;
1973            break;
1974#if defined(GL_AMBIENT)
1975        case GL_AMBIENT:
1976#endif // defined(GL_AMBIENT)
1977#if defined(GL_DIFFUSE)
1978        case GL_DIFFUSE:
1979#endif // defined(GL_DIFFUSE)
1980#if defined(GL_SPECULAR)
1981        case GL_SPECULAR:
1982#endif // defined(GL_SPECULAR)
1983#if defined(GL_EMISSION)
1984        case GL_EMISSION:
1985#endif // defined(GL_EMISSION)
1986            _needed = 4;
1987            break;
1988        default:
1989            _needed = 0;
1990            break;
1991    }
1992    if (_remaining < _needed) {
1993        _env->ThrowNew(IAEClass, "length - offset < needed");
1994        goto exit;
1995    }
1996    params_base = (GLfloat *)
1997        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1998    params = params_base + offset;
1999
2000    glLightfv(
2001        (GLenum)light,
2002        (GLenum)pname,
2003        (GLfloat *)params
2004    );
2005
2006exit:
2007    if (params_base) {
2008        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2009            JNI_ABORT);
2010    }
2011}
2012
2013/* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
2014static void
2015android_glLightfv__IILjava_nio_FloatBuffer_2
2016  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
2017    jarray _array = (jarray) 0;
2018    jint _remaining;
2019    GLfloat *params = (GLfloat *) 0;
2020
2021    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2022    int _needed;
2023    switch (pname) {
2024#if defined(GL_SPOT_EXPONENT)
2025        case GL_SPOT_EXPONENT:
2026#endif // defined(GL_SPOT_EXPONENT)
2027#if defined(GL_SPOT_CUTOFF)
2028        case GL_SPOT_CUTOFF:
2029#endif // defined(GL_SPOT_CUTOFF)
2030#if defined(GL_CONSTANT_ATTENUATION)
2031        case GL_CONSTANT_ATTENUATION:
2032#endif // defined(GL_CONSTANT_ATTENUATION)
2033#if defined(GL_LINEAR_ATTENUATION)
2034        case GL_LINEAR_ATTENUATION:
2035#endif // defined(GL_LINEAR_ATTENUATION)
2036#if defined(GL_QUADRATIC_ATTENUATION)
2037        case GL_QUADRATIC_ATTENUATION:
2038#endif // defined(GL_QUADRATIC_ATTENUATION)
2039            _needed = 1;
2040            break;
2041#if defined(GL_SPOT_DIRECTION)
2042        case GL_SPOT_DIRECTION:
2043#endif // defined(GL_SPOT_DIRECTION)
2044            _needed = 3;
2045            break;
2046#if defined(GL_AMBIENT)
2047        case GL_AMBIENT:
2048#endif // defined(GL_AMBIENT)
2049#if defined(GL_DIFFUSE)
2050        case GL_DIFFUSE:
2051#endif // defined(GL_DIFFUSE)
2052#if defined(GL_SPECULAR)
2053        case GL_SPECULAR:
2054#endif // defined(GL_SPECULAR)
2055#if defined(GL_EMISSION)
2056        case GL_EMISSION:
2057#endif // defined(GL_EMISSION)
2058            _needed = 4;
2059            break;
2060        default:
2061            _needed = 0;
2062            break;
2063    }
2064    if (_remaining < _needed) {
2065        _env->ThrowNew(IAEClass, "remaining() < needed");
2066        goto exit;
2067    }
2068    glLightfv(
2069        (GLenum)light,
2070        (GLenum)pname,
2071        (GLfloat *)params
2072    );
2073
2074exit:
2075    if (_array) {
2076        releasePointer(_env, _array, params, JNI_FALSE);
2077    }
2078}
2079
2080/* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */
2081static void
2082android_glLightx__III
2083  (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
2084    glLightx(
2085        (GLenum)light,
2086        (GLenum)pname,
2087        (GLfixed)param
2088    );
2089}
2090
2091/* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
2092static void
2093android_glLightxv__II_3II
2094  (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
2095    GLfixed *params_base = (GLfixed *) 0;
2096    jint _remaining;
2097    GLfixed *params = (GLfixed *) 0;
2098
2099    if (!params_ref) {
2100        _env->ThrowNew(IAEClass, "params == null");
2101        goto exit;
2102    }
2103    if (offset < 0) {
2104        _env->ThrowNew(IAEClass, "offset < 0");
2105        goto exit;
2106    }
2107    _remaining = _env->GetArrayLength(params_ref) - offset;
2108    int _needed;
2109    switch (pname) {
2110#if defined(GL_SPOT_EXPONENT)
2111        case GL_SPOT_EXPONENT:
2112#endif // defined(GL_SPOT_EXPONENT)
2113#if defined(GL_SPOT_CUTOFF)
2114        case GL_SPOT_CUTOFF:
2115#endif // defined(GL_SPOT_CUTOFF)
2116#if defined(GL_CONSTANT_ATTENUATION)
2117        case GL_CONSTANT_ATTENUATION:
2118#endif // defined(GL_CONSTANT_ATTENUATION)
2119#if defined(GL_LINEAR_ATTENUATION)
2120        case GL_LINEAR_ATTENUATION:
2121#endif // defined(GL_LINEAR_ATTENUATION)
2122#if defined(GL_QUADRATIC_ATTENUATION)
2123        case GL_QUADRATIC_ATTENUATION:
2124#endif // defined(GL_QUADRATIC_ATTENUATION)
2125            _needed = 1;
2126            break;
2127#if defined(GL_SPOT_DIRECTION)
2128        case GL_SPOT_DIRECTION:
2129#endif // defined(GL_SPOT_DIRECTION)
2130            _needed = 3;
2131            break;
2132#if defined(GL_AMBIENT)
2133        case GL_AMBIENT:
2134#endif // defined(GL_AMBIENT)
2135#if defined(GL_DIFFUSE)
2136        case GL_DIFFUSE:
2137#endif // defined(GL_DIFFUSE)
2138#if defined(GL_SPECULAR)
2139        case GL_SPECULAR:
2140#endif // defined(GL_SPECULAR)
2141#if defined(GL_EMISSION)
2142        case GL_EMISSION:
2143#endif // defined(GL_EMISSION)
2144            _needed = 4;
2145            break;
2146        default:
2147            _needed = 0;
2148            break;
2149    }
2150    if (_remaining < _needed) {
2151        _env->ThrowNew(IAEClass, "length - offset < needed");
2152        goto exit;
2153    }
2154    params_base = (GLfixed *)
2155        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2156    params = params_base + offset;
2157
2158    glLightxv(
2159        (GLenum)light,
2160        (GLenum)pname,
2161        (GLfixed *)params
2162    );
2163
2164exit:
2165    if (params_base) {
2166        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2167            JNI_ABORT);
2168    }
2169}
2170
2171/* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
2172static void
2173android_glLightxv__IILjava_nio_IntBuffer_2
2174  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
2175    jarray _array = (jarray) 0;
2176    jint _remaining;
2177    GLfixed *params = (GLfixed *) 0;
2178
2179    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
2180    int _needed;
2181    switch (pname) {
2182#if defined(GL_SPOT_EXPONENT)
2183        case GL_SPOT_EXPONENT:
2184#endif // defined(GL_SPOT_EXPONENT)
2185#if defined(GL_SPOT_CUTOFF)
2186        case GL_SPOT_CUTOFF:
2187#endif // defined(GL_SPOT_CUTOFF)
2188#if defined(GL_CONSTANT_ATTENUATION)
2189        case GL_CONSTANT_ATTENUATION:
2190#endif // defined(GL_CONSTANT_ATTENUATION)
2191#if defined(GL_LINEAR_ATTENUATION)
2192        case GL_LINEAR_ATTENUATION:
2193#endif // defined(GL_LINEAR_ATTENUATION)
2194#if defined(GL_QUADRATIC_ATTENUATION)
2195        case GL_QUADRATIC_ATTENUATION:
2196#endif // defined(GL_QUADRATIC_ATTENUATION)
2197            _needed = 1;
2198            break;
2199#if defined(GL_SPOT_DIRECTION)
2200        case GL_SPOT_DIRECTION:
2201#endif // defined(GL_SPOT_DIRECTION)
2202            _needed = 3;
2203            break;
2204#if defined(GL_AMBIENT)
2205        case GL_AMBIENT:
2206#endif // defined(GL_AMBIENT)
2207#if defined(GL_DIFFUSE)
2208        case GL_DIFFUSE:
2209#endif // defined(GL_DIFFUSE)
2210#if defined(GL_SPECULAR)
2211        case GL_SPECULAR:
2212#endif // defined(GL_SPECULAR)
2213#if defined(GL_EMISSION)
2214        case GL_EMISSION:
2215#endif // defined(GL_EMISSION)
2216            _needed = 4;
2217            break;
2218        default:
2219            _needed = 0;
2220            break;
2221    }
2222    if (_remaining < _needed) {
2223        _env->ThrowNew(IAEClass, "remaining() < needed");
2224        goto exit;
2225    }
2226    glLightxv(
2227        (GLenum)light,
2228        (GLenum)pname,
2229        (GLfixed *)params
2230    );
2231
2232exit:
2233    if (_array) {
2234        releasePointer(_env, _array, params, JNI_FALSE);
2235    }
2236}
2237
2238/* void glLineWidth ( GLfloat width ) */
2239static void
2240android_glLineWidth__F
2241  (JNIEnv *_env, jobject _this, jfloat width) {
2242    glLineWidth(
2243        (GLfloat)width
2244    );
2245}
2246
2247/* void glLineWidthx ( GLfixed width ) */
2248static void
2249android_glLineWidthx__I
2250  (JNIEnv *_env, jobject _this, jint width) {
2251    glLineWidthx(
2252        (GLfixed)width
2253    );
2254}
2255
2256/* void glLoadIdentity ( void ) */
2257static void
2258android_glLoadIdentity__
2259  (JNIEnv *_env, jobject _this) {
2260    glLoadIdentity();
2261}
2262
2263/* void glLoadMatrixf ( const GLfloat *m ) */
2264static void
2265android_glLoadMatrixf___3FI
2266  (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
2267    GLfloat *m_base = (GLfloat *) 0;
2268    jint _remaining;
2269    GLfloat *m = (GLfloat *) 0;
2270
2271    if (!m_ref) {
2272        _env->ThrowNew(IAEClass, "m == null");
2273        goto exit;
2274    }
2275    if (offset < 0) {
2276        _env->ThrowNew(IAEClass, "offset < 0");
2277        goto exit;
2278    }
2279    _remaining = _env->GetArrayLength(m_ref) - offset;
2280    m_base = (GLfloat *)
2281        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2282    m = m_base + offset;
2283
2284    glLoadMatrixf(
2285        (GLfloat *)m
2286    );
2287
2288exit:
2289    if (m_base) {
2290        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2291            JNI_ABORT);
2292    }
2293}
2294
2295/* void glLoadMatrixf ( const GLfloat *m ) */
2296static void
2297android_glLoadMatrixf__Ljava_nio_FloatBuffer_2
2298  (JNIEnv *_env, jobject _this, jobject m_buf) {
2299    jarray _array = (jarray) 0;
2300    jint _remaining;
2301    GLfloat *m = (GLfloat *) 0;
2302
2303    m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
2304    glLoadMatrixf(
2305        (GLfloat *)m
2306    );
2307    if (_array) {
2308        releasePointer(_env, _array, m, JNI_FALSE);
2309    }
2310}
2311
2312/* void glLoadMatrixx ( const GLfixed *m ) */
2313static void
2314android_glLoadMatrixx___3II
2315  (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
2316    GLfixed *m_base = (GLfixed *) 0;
2317    jint _remaining;
2318    GLfixed *m = (GLfixed *) 0;
2319
2320    if (!m_ref) {
2321        _env->ThrowNew(IAEClass, "m == null");
2322        goto exit;
2323    }
2324    if (offset < 0) {
2325        _env->ThrowNew(IAEClass, "offset < 0");
2326        goto exit;
2327    }
2328    _remaining = _env->GetArrayLength(m_ref) - offset;
2329    m_base = (GLfixed *)
2330        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2331    m = m_base + offset;
2332
2333    glLoadMatrixx(
2334        (GLfixed *)m
2335    );
2336
2337exit:
2338    if (m_base) {
2339        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2340            JNI_ABORT);
2341    }
2342}
2343
2344/* void glLoadMatrixx ( const GLfixed *m ) */
2345static void
2346android_glLoadMatrixx__Ljava_nio_IntBuffer_2
2347  (JNIEnv *_env, jobject _this, jobject m_buf) {
2348    jarray _array = (jarray) 0;
2349    jint _remaining;
2350    GLfixed *m = (GLfixed *) 0;
2351
2352    m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
2353    glLoadMatrixx(
2354        (GLfixed *)m
2355    );
2356    if (_array) {
2357        releasePointer(_env, _array, m, JNI_FALSE);
2358    }
2359}
2360
2361/* void glLogicOp ( GLenum opcode ) */
2362static void
2363android_glLogicOp__I
2364  (JNIEnv *_env, jobject _this, jint opcode) {
2365    glLogicOp(
2366        (GLenum)opcode
2367    );
2368}
2369
2370/* void glMaterialf ( GLenum face, GLenum pname, GLfloat param ) */
2371static void
2372android_glMaterialf__IIF
2373  (JNIEnv *_env, jobject _this, jint face, jint pname, jfloat param) {
2374    glMaterialf(
2375        (GLenum)face,
2376        (GLenum)pname,
2377        (GLfloat)param
2378    );
2379}
2380
2381/* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
2382static void
2383android_glMaterialfv__II_3FI
2384  (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
2385    GLfloat *params_base = (GLfloat *) 0;
2386    jint _remaining;
2387    GLfloat *params = (GLfloat *) 0;
2388
2389    if (!params_ref) {
2390        _env->ThrowNew(IAEClass, "params == null");
2391        goto exit;
2392    }
2393    if (offset < 0) {
2394        _env->ThrowNew(IAEClass, "offset < 0");
2395        goto exit;
2396    }
2397    _remaining = _env->GetArrayLength(params_ref) - offset;
2398    int _needed;
2399    switch (pname) {
2400#if defined(GL_SHININESS)
2401        case GL_SHININESS:
2402#endif // defined(GL_SHININESS)
2403            _needed = 1;
2404            break;
2405#if defined(GL_AMBIENT)
2406        case GL_AMBIENT:
2407#endif // defined(GL_AMBIENT)
2408#if defined(GL_DIFFUSE)
2409        case GL_DIFFUSE:
2410#endif // defined(GL_DIFFUSE)
2411#if defined(GL_SPECULAR)
2412        case GL_SPECULAR:
2413#endif // defined(GL_SPECULAR)
2414#if defined(GL_EMISSION)
2415        case GL_EMISSION:
2416#endif // defined(GL_EMISSION)
2417#if defined(GL_AMBIENT_AND_DIFFUSE)
2418        case GL_AMBIENT_AND_DIFFUSE:
2419#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2420            _needed = 4;
2421            break;
2422        default:
2423            _needed = 0;
2424            break;
2425    }
2426    if (_remaining < _needed) {
2427        _env->ThrowNew(IAEClass, "length - offset < needed");
2428        goto exit;
2429    }
2430    params_base = (GLfloat *)
2431        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2432    params = params_base + offset;
2433
2434    glMaterialfv(
2435        (GLenum)face,
2436        (GLenum)pname,
2437        (GLfloat *)params
2438    );
2439
2440exit:
2441    if (params_base) {
2442        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2443            JNI_ABORT);
2444    }
2445}
2446
2447/* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
2448static void
2449android_glMaterialfv__IILjava_nio_FloatBuffer_2
2450  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
2451    jarray _array = (jarray) 0;
2452    jint _remaining;
2453    GLfloat *params = (GLfloat *) 0;
2454
2455    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2456    int _needed;
2457    switch (pname) {
2458#if defined(GL_SHININESS)
2459        case GL_SHININESS:
2460#endif // defined(GL_SHININESS)
2461            _needed = 1;
2462            break;
2463#if defined(GL_AMBIENT)
2464        case GL_AMBIENT:
2465#endif // defined(GL_AMBIENT)
2466#if defined(GL_DIFFUSE)
2467        case GL_DIFFUSE:
2468#endif // defined(GL_DIFFUSE)
2469#if defined(GL_SPECULAR)
2470        case GL_SPECULAR:
2471#endif // defined(GL_SPECULAR)
2472#if defined(GL_EMISSION)
2473        case GL_EMISSION:
2474#endif // defined(GL_EMISSION)
2475#if defined(GL_AMBIENT_AND_DIFFUSE)
2476        case GL_AMBIENT_AND_DIFFUSE:
2477#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2478            _needed = 4;
2479            break;
2480        default:
2481            _needed = 0;
2482            break;
2483    }
2484    if (_remaining < _needed) {
2485        _env->ThrowNew(IAEClass, "remaining() < needed");
2486        goto exit;
2487    }
2488    glMaterialfv(
2489        (GLenum)face,
2490        (GLenum)pname,
2491        (GLfloat *)params
2492    );
2493
2494exit:
2495    if (_array) {
2496        releasePointer(_env, _array, params, JNI_FALSE);
2497    }
2498}
2499
2500/* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */
2501static void
2502android_glMaterialx__III
2503  (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
2504    glMaterialx(
2505        (GLenum)face,
2506        (GLenum)pname,
2507        (GLfixed)param
2508    );
2509}
2510
2511/* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
2512static void
2513android_glMaterialxv__II_3II
2514  (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
2515    GLfixed *params_base = (GLfixed *) 0;
2516    jint _remaining;
2517    GLfixed *params = (GLfixed *) 0;
2518
2519    if (!params_ref) {
2520        _env->ThrowNew(IAEClass, "params == null");
2521        goto exit;
2522    }
2523    if (offset < 0) {
2524        _env->ThrowNew(IAEClass, "offset < 0");
2525        goto exit;
2526    }
2527    _remaining = _env->GetArrayLength(params_ref) - offset;
2528    int _needed;
2529    switch (pname) {
2530#if defined(GL_SHININESS)
2531        case GL_SHININESS:
2532#endif // defined(GL_SHININESS)
2533            _needed = 1;
2534            break;
2535#if defined(GL_AMBIENT)
2536        case GL_AMBIENT:
2537#endif // defined(GL_AMBIENT)
2538#if defined(GL_DIFFUSE)
2539        case GL_DIFFUSE:
2540#endif // defined(GL_DIFFUSE)
2541#if defined(GL_SPECULAR)
2542        case GL_SPECULAR:
2543#endif // defined(GL_SPECULAR)
2544#if defined(GL_EMISSION)
2545        case GL_EMISSION:
2546#endif // defined(GL_EMISSION)
2547#if defined(GL_AMBIENT_AND_DIFFUSE)
2548        case GL_AMBIENT_AND_DIFFUSE:
2549#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2550            _needed = 4;
2551            break;
2552        default:
2553            _needed = 0;
2554            break;
2555    }
2556    if (_remaining < _needed) {
2557        _env->ThrowNew(IAEClass, "length - offset < needed");
2558        goto exit;
2559    }
2560    params_base = (GLfixed *)
2561        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2562    params = params_base + offset;
2563
2564    glMaterialxv(
2565        (GLenum)face,
2566        (GLenum)pname,
2567        (GLfixed *)params
2568    );
2569
2570exit:
2571    if (params_base) {
2572        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2573            JNI_ABORT);
2574    }
2575}
2576
2577/* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
2578static void
2579android_glMaterialxv__IILjava_nio_IntBuffer_2
2580  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
2581    jarray _array = (jarray) 0;
2582    jint _remaining;
2583    GLfixed *params = (GLfixed *) 0;
2584
2585    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
2586    int _needed;
2587    switch (pname) {
2588#if defined(GL_SHININESS)
2589        case GL_SHININESS:
2590#endif // defined(GL_SHININESS)
2591            _needed = 1;
2592            break;
2593#if defined(GL_AMBIENT)
2594        case GL_AMBIENT:
2595#endif // defined(GL_AMBIENT)
2596#if defined(GL_DIFFUSE)
2597        case GL_DIFFUSE:
2598#endif // defined(GL_DIFFUSE)
2599#if defined(GL_SPECULAR)
2600        case GL_SPECULAR:
2601#endif // defined(GL_SPECULAR)
2602#if defined(GL_EMISSION)
2603        case GL_EMISSION:
2604#endif // defined(GL_EMISSION)
2605#if defined(GL_AMBIENT_AND_DIFFUSE)
2606        case GL_AMBIENT_AND_DIFFUSE:
2607#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2608            _needed = 4;
2609            break;
2610        default:
2611            _needed = 0;
2612            break;
2613    }
2614    if (_remaining < _needed) {
2615        _env->ThrowNew(IAEClass, "remaining() < needed");
2616        goto exit;
2617    }
2618    glMaterialxv(
2619        (GLenum)face,
2620        (GLenum)pname,
2621        (GLfixed *)params
2622    );
2623
2624exit:
2625    if (_array) {
2626        releasePointer(_env, _array, params, JNI_FALSE);
2627    }
2628}
2629
2630/* void glMatrixMode ( GLenum mode ) */
2631static void
2632android_glMatrixMode__I
2633  (JNIEnv *_env, jobject _this, jint mode) {
2634    glMatrixMode(
2635        (GLenum)mode
2636    );
2637}
2638
2639/* void glMultMatrixf ( const GLfloat *m ) */
2640static void
2641android_glMultMatrixf___3FI
2642  (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
2643    GLfloat *m_base = (GLfloat *) 0;
2644    jint _remaining;
2645    GLfloat *m = (GLfloat *) 0;
2646
2647    if (!m_ref) {
2648        _env->ThrowNew(IAEClass, "m == null");
2649        goto exit;
2650    }
2651    if (offset < 0) {
2652        _env->ThrowNew(IAEClass, "offset < 0");
2653        goto exit;
2654    }
2655    _remaining = _env->GetArrayLength(m_ref) - offset;
2656    m_base = (GLfloat *)
2657        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2658    m = m_base + offset;
2659
2660    glMultMatrixf(
2661        (GLfloat *)m
2662    );
2663
2664exit:
2665    if (m_base) {
2666        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2667            JNI_ABORT);
2668    }
2669}
2670
2671/* void glMultMatrixf ( const GLfloat *m ) */
2672static void
2673android_glMultMatrixf__Ljava_nio_FloatBuffer_2
2674  (JNIEnv *_env, jobject _this, jobject m_buf) {
2675    jarray _array = (jarray) 0;
2676    jint _remaining;
2677    GLfloat *m = (GLfloat *) 0;
2678
2679    m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
2680    glMultMatrixf(
2681        (GLfloat *)m
2682    );
2683    if (_array) {
2684        releasePointer(_env, _array, m, JNI_FALSE);
2685    }
2686}
2687
2688/* void glMultMatrixx ( const GLfixed *m ) */
2689static void
2690android_glMultMatrixx___3II
2691  (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
2692    GLfixed *m_base = (GLfixed *) 0;
2693    jint _remaining;
2694    GLfixed *m = (GLfixed *) 0;
2695
2696    if (!m_ref) {
2697        _env->ThrowNew(IAEClass, "m == null");
2698        goto exit;
2699    }
2700    if (offset < 0) {
2701        _env->ThrowNew(IAEClass, "offset < 0");
2702        goto exit;
2703    }
2704    _remaining = _env->GetArrayLength(m_ref) - offset;
2705    m_base = (GLfixed *)
2706        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2707    m = m_base + offset;
2708
2709    glMultMatrixx(
2710        (GLfixed *)m
2711    );
2712
2713exit:
2714    if (m_base) {
2715        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2716            JNI_ABORT);
2717    }
2718}
2719
2720/* void glMultMatrixx ( const GLfixed *m ) */
2721static void
2722android_glMultMatrixx__Ljava_nio_IntBuffer_2
2723  (JNIEnv *_env, jobject _this, jobject m_buf) {
2724    jarray _array = (jarray) 0;
2725    jint _remaining;
2726    GLfixed *m = (GLfixed *) 0;
2727
2728    m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
2729    glMultMatrixx(
2730        (GLfixed *)m
2731    );
2732    if (_array) {
2733        releasePointer(_env, _array, m, JNI_FALSE);
2734    }
2735}
2736
2737/* void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) */
2738static void
2739android_glMultiTexCoord4f__IFFFF
2740  (JNIEnv *_env, jobject _this, jint target, jfloat s, jfloat t, jfloat r, jfloat q) {
2741    glMultiTexCoord4f(
2742        (GLenum)target,
2743        (GLfloat)s,
2744        (GLfloat)t,
2745        (GLfloat)r,
2746        (GLfloat)q
2747    );
2748}
2749
2750/* void glMultiTexCoord4x ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
2751static void
2752android_glMultiTexCoord4x__IIIII
2753  (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
2754    glMultiTexCoord4x(
2755        (GLenum)target,
2756        (GLfixed)s,
2757        (GLfixed)t,
2758        (GLfixed)r,
2759        (GLfixed)q
2760    );
2761}
2762
2763/* void glNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz ) */
2764static void
2765android_glNormal3f__FFF
2766  (JNIEnv *_env, jobject _this, jfloat nx, jfloat ny, jfloat nz) {
2767    glNormal3f(
2768        (GLfloat)nx,
2769        (GLfloat)ny,
2770        (GLfloat)nz
2771    );
2772}
2773
2774/* void glNormal3x ( GLfixed nx, GLfixed ny, GLfixed nz ) */
2775static void
2776android_glNormal3x__III
2777  (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
2778    glNormal3x(
2779        (GLfixed)nx,
2780        (GLfixed)ny,
2781        (GLfixed)nz
2782    );
2783}
2784
2785/* void glNormalPointer ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
2786static void
2787android_glNormalPointerBounds__IILjava_nio_Buffer_2I
2788  (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
2789    jarray _array = (jarray) 0;
2790    jint _remaining;
2791    GLvoid *pointer = (GLvoid *) 0;
2792
2793    if (pointer_buf) {
2794        pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2795        if ( ! pointer ) {
2796            return;
2797        }
2798    }
2799    glNormalPointerBounds(
2800        (GLenum)type,
2801        (GLsizei)stride,
2802        (GLvoid *)pointer,
2803        (GLsizei)remaining
2804    );
2805}
2806
2807/* void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2808static void
2809android_glOrthof__FFFFFF
2810  (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
2811    glOrthof(
2812        (GLfloat)left,
2813        (GLfloat)right,
2814        (GLfloat)bottom,
2815        (GLfloat)top,
2816        (GLfloat)zNear,
2817        (GLfloat)zFar
2818    );
2819}
2820
2821/* void glOrthox ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
2822static void
2823android_glOrthox__IIIIII
2824  (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
2825    glOrthox(
2826        (GLfixed)left,
2827        (GLfixed)right,
2828        (GLfixed)bottom,
2829        (GLfixed)top,
2830        (GLfixed)zNear,
2831        (GLfixed)zFar
2832    );
2833}
2834
2835/* void glPixelStorei ( GLenum pname, GLint param ) */
2836static void
2837android_glPixelStorei__II
2838  (JNIEnv *_env, jobject _this, jint pname, jint param) {
2839    glPixelStorei(
2840        (GLenum)pname,
2841        (GLint)param
2842    );
2843}
2844
2845/* void glPointSize ( GLfloat size ) */
2846static void
2847android_glPointSize__F
2848  (JNIEnv *_env, jobject _this, jfloat size) {
2849    glPointSize(
2850        (GLfloat)size
2851    );
2852}
2853
2854/* void glPointSizex ( GLfixed size ) */
2855static void
2856android_glPointSizex__I
2857  (JNIEnv *_env, jobject _this, jint size) {
2858    glPointSizex(
2859        (GLfixed)size
2860    );
2861}
2862
2863/* void glPolygonOffset ( GLfloat factor, GLfloat units ) */
2864static void
2865android_glPolygonOffset__FF
2866  (JNIEnv *_env, jobject _this, jfloat factor, jfloat units) {
2867    glPolygonOffset(
2868        (GLfloat)factor,
2869        (GLfloat)units
2870    );
2871}
2872
2873/* void glPolygonOffsetx ( GLfixed factor, GLfixed units ) */
2874static void
2875android_glPolygonOffsetx__II
2876  (JNIEnv *_env, jobject _this, jint factor, jint units) {
2877    glPolygonOffsetx(
2878        (GLfixed)factor,
2879        (GLfixed)units
2880    );
2881}
2882
2883/* void glPopMatrix ( void ) */
2884static void
2885android_glPopMatrix__
2886  (JNIEnv *_env, jobject _this) {
2887    glPopMatrix();
2888}
2889
2890/* void glPushMatrix ( void ) */
2891static void
2892android_glPushMatrix__
2893  (JNIEnv *_env, jobject _this) {
2894    glPushMatrix();
2895}
2896
2897/* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) */
2898static void
2899android_glReadPixels__IIIIIILjava_nio_Buffer_2
2900  (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
2901    jint _exception = 0;
2902    jarray _array = (jarray) 0;
2903    jint _remaining;
2904    GLvoid *pixels = (GLvoid *) 0;
2905
2906    pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
2907    glReadPixels(
2908        (GLint)x,
2909        (GLint)y,
2910        (GLsizei)width,
2911        (GLsizei)height,
2912        (GLenum)format,
2913        (GLenum)type,
2914        (GLvoid *)pixels
2915    );
2916    if (_array) {
2917        releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
2918    }
2919}
2920
2921/* void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) */
2922static void
2923android_glRotatef__FFFF
2924  (JNIEnv *_env, jobject _this, jfloat angle, jfloat x, jfloat y, jfloat z) {
2925    glRotatef(
2926        (GLfloat)angle,
2927        (GLfloat)x,
2928        (GLfloat)y,
2929        (GLfloat)z
2930    );
2931}
2932
2933/* void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
2934static void
2935android_glRotatex__IIII
2936  (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
2937    glRotatex(
2938        (GLfixed)angle,
2939        (GLfixed)x,
2940        (GLfixed)y,
2941        (GLfixed)z
2942    );
2943}
2944
2945/* void glSampleCoverage ( GLclampf value, GLboolean invert ) */
2946static void
2947android_glSampleCoverage__FZ
2948  (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) {
2949    glSampleCoverage(
2950        (GLclampf)value,
2951        (GLboolean)invert
2952    );
2953}
2954
2955/* void glSampleCoveragex ( GLclampx value, GLboolean invert ) */
2956static void
2957android_glSampleCoveragex__IZ
2958  (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
2959    glSampleCoveragex(
2960        (GLclampx)value,
2961        (GLboolean)invert
2962    );
2963}
2964
2965/* void glScalef ( GLfloat x, GLfloat y, GLfloat z ) */
2966static void
2967android_glScalef__FFF
2968  (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
2969    glScalef(
2970        (GLfloat)x,
2971        (GLfloat)y,
2972        (GLfloat)z
2973    );
2974}
2975
2976/* void glScalex ( GLfixed x, GLfixed y, GLfixed z ) */
2977static void
2978android_glScalex__III
2979  (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
2980    glScalex(
2981        (GLfixed)x,
2982        (GLfixed)y,
2983        (GLfixed)z
2984    );
2985}
2986
2987/* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */
2988static void
2989android_glScissor__IIII
2990  (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
2991    glScissor(
2992        (GLint)x,
2993        (GLint)y,
2994        (GLsizei)width,
2995        (GLsizei)height
2996    );
2997}
2998
2999/* void glShadeModel ( GLenum mode ) */
3000static void
3001android_glShadeModel__I
3002  (JNIEnv *_env, jobject _this, jint mode) {
3003    glShadeModel(
3004        (GLenum)mode
3005    );
3006}
3007
3008/* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */
3009static void
3010android_glStencilFunc__III
3011  (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) {
3012    glStencilFunc(
3013        (GLenum)func,
3014        (GLint)ref,
3015        (GLuint)mask
3016    );
3017}
3018
3019/* void glStencilMask ( GLuint mask ) */
3020static void
3021android_glStencilMask__I
3022  (JNIEnv *_env, jobject _this, jint mask) {
3023    glStencilMask(
3024        (GLuint)mask
3025    );
3026}
3027
3028/* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */
3029static void
3030android_glStencilOp__III
3031  (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) {
3032    glStencilOp(
3033        (GLenum)fail,
3034        (GLenum)zfail,
3035        (GLenum)zpass
3036    );
3037}
3038
3039/* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3040static void
3041android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
3042  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
3043    jarray _array = (jarray) 0;
3044    jint _remaining;
3045    GLvoid *pointer = (GLvoid *) 0;
3046
3047    if (pointer_buf) {
3048        pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3049        if ( ! pointer ) {
3050            return;
3051        }
3052    }
3053    glTexCoordPointerBounds(
3054        (GLint)size,
3055        (GLenum)type,
3056        (GLsizei)stride,
3057        (GLvoid *)pointer,
3058        (GLsizei)remaining
3059    );
3060}
3061
3062/* void glTexEnvf ( GLenum target, GLenum pname, GLfloat param ) */
3063static void
3064android_glTexEnvf__IIF
3065  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3066    glTexEnvf(
3067        (GLenum)target,
3068        (GLenum)pname,
3069        (GLfloat)param
3070    );
3071}
3072
3073/* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3074static void
3075android_glTexEnvfv__II_3FI
3076  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
3077    GLfloat *params_base = (GLfloat *) 0;
3078    jint _remaining;
3079    GLfloat *params = (GLfloat *) 0;
3080
3081    if (!params_ref) {
3082        _env->ThrowNew(IAEClass, "params == null");
3083        goto exit;
3084    }
3085    if (offset < 0) {
3086        _env->ThrowNew(IAEClass, "offset < 0");
3087        goto exit;
3088    }
3089    _remaining = _env->GetArrayLength(params_ref) - offset;
3090    int _needed;
3091    switch (pname) {
3092#if defined(GL_TEXTURE_ENV_MODE)
3093        case GL_TEXTURE_ENV_MODE:
3094#endif // defined(GL_TEXTURE_ENV_MODE)
3095#if defined(GL_COMBINE_RGB)
3096        case GL_COMBINE_RGB:
3097#endif // defined(GL_COMBINE_RGB)
3098#if defined(GL_COMBINE_ALPHA)
3099        case GL_COMBINE_ALPHA:
3100#endif // defined(GL_COMBINE_ALPHA)
3101            _needed = 1;
3102            break;
3103#if defined(GL_TEXTURE_ENV_COLOR)
3104        case GL_TEXTURE_ENV_COLOR:
3105#endif // defined(GL_TEXTURE_ENV_COLOR)
3106            _needed = 4;
3107            break;
3108        default:
3109            _needed = 0;
3110            break;
3111    }
3112    if (_remaining < _needed) {
3113        _env->ThrowNew(IAEClass, "length - offset < needed");
3114        goto exit;
3115    }
3116    params_base = (GLfloat *)
3117        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3118    params = params_base + offset;
3119
3120    glTexEnvfv(
3121        (GLenum)target,
3122        (GLenum)pname,
3123        (GLfloat *)params
3124    );
3125
3126exit:
3127    if (params_base) {
3128        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3129            JNI_ABORT);
3130    }
3131}
3132
3133/* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3134static void
3135android_glTexEnvfv__IILjava_nio_FloatBuffer_2
3136  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3137    jarray _array = (jarray) 0;
3138    jint _remaining;
3139    GLfloat *params = (GLfloat *) 0;
3140
3141    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
3142    int _needed;
3143    switch (pname) {
3144#if defined(GL_TEXTURE_ENV_MODE)
3145        case GL_TEXTURE_ENV_MODE:
3146#endif // defined(GL_TEXTURE_ENV_MODE)
3147#if defined(GL_COMBINE_RGB)
3148        case GL_COMBINE_RGB:
3149#endif // defined(GL_COMBINE_RGB)
3150#if defined(GL_COMBINE_ALPHA)
3151        case GL_COMBINE_ALPHA:
3152#endif // defined(GL_COMBINE_ALPHA)
3153            _needed = 1;
3154            break;
3155#if defined(GL_TEXTURE_ENV_COLOR)
3156        case GL_TEXTURE_ENV_COLOR:
3157#endif // defined(GL_TEXTURE_ENV_COLOR)
3158            _needed = 4;
3159            break;
3160        default:
3161            _needed = 0;
3162            break;
3163    }
3164    if (_remaining < _needed) {
3165        _env->ThrowNew(IAEClass, "remaining() < needed");
3166        goto exit;
3167    }
3168    glTexEnvfv(
3169        (GLenum)target,
3170        (GLenum)pname,
3171        (GLfloat *)params
3172    );
3173
3174exit:
3175    if (_array) {
3176        releasePointer(_env, _array, params, JNI_FALSE);
3177    }
3178}
3179
3180/* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */
3181static void
3182android_glTexEnvx__III
3183  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3184    glTexEnvx(
3185        (GLenum)target,
3186        (GLenum)pname,
3187        (GLfixed)param
3188    );
3189}
3190
3191/* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3192static void
3193android_glTexEnvxv__II_3II
3194  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3195    GLfixed *params_base = (GLfixed *) 0;
3196    jint _remaining;
3197    GLfixed *params = (GLfixed *) 0;
3198
3199    if (!params_ref) {
3200        _env->ThrowNew(IAEClass, "params == null");
3201        goto exit;
3202    }
3203    if (offset < 0) {
3204        _env->ThrowNew(IAEClass, "offset < 0");
3205        goto exit;
3206    }
3207    _remaining = _env->GetArrayLength(params_ref) - offset;
3208    int _needed;
3209    switch (pname) {
3210#if defined(GL_TEXTURE_ENV_MODE)
3211        case GL_TEXTURE_ENV_MODE:
3212#endif // defined(GL_TEXTURE_ENV_MODE)
3213#if defined(GL_COMBINE_RGB)
3214        case GL_COMBINE_RGB:
3215#endif // defined(GL_COMBINE_RGB)
3216#if defined(GL_COMBINE_ALPHA)
3217        case GL_COMBINE_ALPHA:
3218#endif // defined(GL_COMBINE_ALPHA)
3219            _needed = 1;
3220            break;
3221#if defined(GL_TEXTURE_ENV_COLOR)
3222        case GL_TEXTURE_ENV_COLOR:
3223#endif // defined(GL_TEXTURE_ENV_COLOR)
3224            _needed = 4;
3225            break;
3226        default:
3227            _needed = 0;
3228            break;
3229    }
3230    if (_remaining < _needed) {
3231        _env->ThrowNew(IAEClass, "length - offset < needed");
3232        goto exit;
3233    }
3234    params_base = (GLfixed *)
3235        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3236    params = params_base + offset;
3237
3238    glTexEnvxv(
3239        (GLenum)target,
3240        (GLenum)pname,
3241        (GLfixed *)params
3242    );
3243
3244exit:
3245    if (params_base) {
3246        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3247            JNI_ABORT);
3248    }
3249}
3250
3251/* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3252static void
3253android_glTexEnvxv__IILjava_nio_IntBuffer_2
3254  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3255    jarray _array = (jarray) 0;
3256    jint _remaining;
3257    GLfixed *params = (GLfixed *) 0;
3258
3259    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
3260    int _needed;
3261    switch (pname) {
3262#if defined(GL_TEXTURE_ENV_MODE)
3263        case GL_TEXTURE_ENV_MODE:
3264#endif // defined(GL_TEXTURE_ENV_MODE)
3265#if defined(GL_COMBINE_RGB)
3266        case GL_COMBINE_RGB:
3267#endif // defined(GL_COMBINE_RGB)
3268#if defined(GL_COMBINE_ALPHA)
3269        case GL_COMBINE_ALPHA:
3270#endif // defined(GL_COMBINE_ALPHA)
3271            _needed = 1;
3272            break;
3273#if defined(GL_TEXTURE_ENV_COLOR)
3274        case GL_TEXTURE_ENV_COLOR:
3275#endif // defined(GL_TEXTURE_ENV_COLOR)
3276            _needed = 4;
3277            break;
3278        default:
3279            _needed = 0;
3280            break;
3281    }
3282    if (_remaining < _needed) {
3283        _env->ThrowNew(IAEClass, "remaining() < needed");
3284        goto exit;
3285    }
3286    glTexEnvxv(
3287        (GLenum)target,
3288        (GLenum)pname,
3289        (GLfixed *)params
3290    );
3291
3292exit:
3293    if (_array) {
3294        releasePointer(_env, _array, params, JNI_FALSE);
3295    }
3296}
3297
3298/* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
3299static void
3300android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
3301  (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
3302    jarray _array = (jarray) 0;
3303    jint _remaining;
3304    GLvoid *pixels = (GLvoid *) 0;
3305
3306    if (pixels_buf) {
3307        pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
3308    }
3309    glTexImage2D(
3310        (GLenum)target,
3311        (GLint)level,
3312        (GLint)internalformat,
3313        (GLsizei)width,
3314        (GLsizei)height,
3315        (GLint)border,
3316        (GLenum)format,
3317        (GLenum)type,
3318        (GLvoid *)pixels
3319    );
3320    if (_array) {
3321        releasePointer(_env, _array, pixels, JNI_FALSE);
3322    }
3323}
3324
3325/* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
3326static void
3327android_glTexParameterf__IIF
3328  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3329    glTexParameterf(
3330        (GLenum)target,
3331        (GLenum)pname,
3332        (GLfloat)param
3333    );
3334}
3335
3336/* void glTexParameterx ( GLenum target, GLenum pname, GLfixed param ) */
3337static void
3338android_glTexParameterx__III
3339  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3340    glTexParameterx(
3341        (GLenum)target,
3342        (GLenum)pname,
3343        (GLfixed)param
3344    );
3345}
3346
3347/* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */
3348static void
3349android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
3350  (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
3351    jarray _array = (jarray) 0;
3352    jint _remaining;
3353    GLvoid *pixels = (GLvoid *) 0;
3354
3355    if (pixels_buf) {
3356        pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
3357    }
3358    glTexSubImage2D(
3359        (GLenum)target,
3360        (GLint)level,
3361        (GLint)xoffset,
3362        (GLint)yoffset,
3363        (GLsizei)width,
3364        (GLsizei)height,
3365        (GLenum)format,
3366        (GLenum)type,
3367        (GLvoid *)pixels
3368    );
3369    if (_array) {
3370        releasePointer(_env, _array, pixels, JNI_FALSE);
3371    }
3372}
3373
3374/* void glTranslatef ( GLfloat x, GLfloat y, GLfloat z ) */
3375static void
3376android_glTranslatef__FFF
3377  (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
3378    glTranslatef(
3379        (GLfloat)x,
3380        (GLfloat)y,
3381        (GLfloat)z
3382    );
3383}
3384
3385/* void glTranslatex ( GLfixed x, GLfixed y, GLfixed z ) */
3386static void
3387android_glTranslatex__III
3388  (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
3389    glTranslatex(
3390        (GLfixed)x,
3391        (GLfixed)y,
3392        (GLfixed)z
3393    );
3394}
3395
3396/* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3397static void
3398android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
3399  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
3400    jarray _array = (jarray) 0;
3401    jint _remaining;
3402    GLvoid *pointer = (GLvoid *) 0;
3403
3404    if (pointer_buf) {
3405        pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3406        if ( ! pointer ) {
3407            return;
3408        }
3409    }
3410    glVertexPointerBounds(
3411        (GLint)size,
3412        (GLenum)type,
3413        (GLsizei)stride,
3414        (GLvoid *)pointer,
3415        (GLsizei)remaining
3416    );
3417}
3418
3419/* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */
3420static void
3421android_glViewport__IIII
3422  (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
3423    glViewport(
3424        (GLint)x,
3425        (GLint)y,
3426        (GLsizei)width,
3427        (GLsizei)height
3428    );
3429}
3430
3431/* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
3432static jint
3433android_glQueryMatrixxOES___3II_3II
3434  (JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) {
3435    jint _exception = 0;
3436    GLbitfield _returnValue = -1;
3437    GLfixed *mantissa_base = (GLfixed *) 0;
3438    jint _mantissaRemaining;
3439    GLfixed *mantissa = (GLfixed *) 0;
3440    GLint *exponent_base = (GLint *) 0;
3441    jint _exponentRemaining;
3442    GLint *exponent = (GLint *) 0;
3443
3444    if (!mantissa_ref) {
3445        _exception = 1;
3446        _env->ThrowNew(IAEClass, "mantissa == null");
3447        goto exit;
3448    }
3449    if (mantissaOffset < 0) {
3450        _exception = 1;
3451        _env->ThrowNew(IAEClass, "mantissaOffset < 0");
3452        goto exit;
3453    }
3454    _mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset;
3455    if (_mantissaRemaining < 16) {
3456        _exception = 1;
3457        _env->ThrowNew(IAEClass, "length - mantissaOffset < 16");
3458        goto exit;
3459    }
3460    mantissa_base = (GLfixed *)
3461        _env->GetPrimitiveArrayCritical(mantissa_ref, (jboolean *)0);
3462    mantissa = mantissa_base + mantissaOffset;
3463
3464    if (!exponent_ref) {
3465        _exception = 1;
3466        _env->ThrowNew(IAEClass, "exponent == null");
3467        goto exit;
3468    }
3469    if (exponentOffset < 0) {
3470        _exception = 1;
3471        _env->ThrowNew(IAEClass, "exponentOffset < 0");
3472        goto exit;
3473    }
3474    _exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset;
3475    if (_exponentRemaining < 16) {
3476        _exception = 1;
3477        _env->ThrowNew(IAEClass, "length - exponentOffset < 16");
3478        goto exit;
3479    }
3480    exponent_base = (GLint *)
3481        _env->GetPrimitiveArrayCritical(exponent_ref, (jboolean *)0);
3482    exponent = exponent_base + exponentOffset;
3483
3484    _returnValue = glQueryMatrixxOES(
3485        (GLfixed *)mantissa,
3486        (GLint *)exponent
3487    );
3488
3489exit:
3490    if (exponent_base) {
3491        _env->ReleasePrimitiveArrayCritical(exponent_ref, exponent_base,
3492            _exception ? JNI_ABORT: 0);
3493    }
3494    if (mantissa_base) {
3495        _env->ReleasePrimitiveArrayCritical(mantissa_ref, mantissa_base,
3496            _exception ? JNI_ABORT: 0);
3497    }
3498    return _returnValue;
3499}
3500
3501/* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
3502static jint
3503android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
3504  (JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) {
3505    jint _exception = 0;
3506    jarray _mantissaArray = (jarray) 0;
3507    jarray _exponentArray = (jarray) 0;
3508    GLbitfield _returnValue = -1;
3509    jint _mantissaRemaining;
3510    GLfixed *mantissa = (GLfixed *) 0;
3511    jint _exponentRemaining;
3512    GLint *exponent = (GLint *) 0;
3513
3514    mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining);
3515    if (_mantissaRemaining < 16) {
3516        _exception = 1;
3517        _env->ThrowNew(IAEClass, "remaining() < 16");
3518        goto exit;
3519    }
3520    exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining);
3521    if (_exponentRemaining < 16) {
3522        _exception = 1;
3523        _env->ThrowNew(IAEClass, "remaining() < 16");
3524        goto exit;
3525    }
3526    _returnValue = glQueryMatrixxOES(
3527        (GLfixed *)mantissa,
3528        (GLint *)exponent
3529    );
3530
3531exit:
3532    if (_mantissaArray) {
3533        releasePointer(_env, _mantissaArray, exponent, _exception ? JNI_FALSE : JNI_TRUE);
3534    }
3535    if (_exponentArray) {
3536        releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
3537    }
3538    return _returnValue;
3539}
3540
3541/* void glBindBuffer ( GLenum target, GLuint buffer ) */
3542static void
3543android_glBindBuffer__II
3544  (JNIEnv *_env, jobject _this, jint target, jint buffer) {
3545    glBindBuffer(
3546        (GLenum)target,
3547        (GLuint)buffer
3548    );
3549}
3550
3551/* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */
3552static void
3553android_glBufferData__IILjava_nio_Buffer_2I
3554  (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
3555    jarray _array = (jarray) 0;
3556    jint _remaining;
3557    GLvoid *data = (GLvoid *) 0;
3558
3559    if (data_buf) {
3560        data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
3561    }
3562    glBufferData(
3563        (GLenum)target,
3564        (GLsizeiptr)size,
3565        (GLvoid *)data,
3566        (GLenum)usage
3567    );
3568    if (_array) {
3569        releasePointer(_env, _array, data, JNI_FALSE);
3570    }
3571}
3572
3573/* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
3574static void
3575android_glBufferSubData__IIILjava_nio_Buffer_2
3576  (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
3577    jarray _array = (jarray) 0;
3578    jint _remaining;
3579    GLvoid *data = (GLvoid *) 0;
3580
3581    data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
3582    glBufferSubData(
3583        (GLenum)target,
3584        (GLintptr)offset,
3585        (GLsizeiptr)size,
3586        (GLvoid *)data
3587    );
3588    if (_array) {
3589        releasePointer(_env, _array, data, JNI_FALSE);
3590    }
3591}
3592
3593/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
3594static void
3595android_glClipPlanef__I_3FI
3596  (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
3597    GLfloat *equation_base = (GLfloat *) 0;
3598    jint _remaining;
3599    GLfloat *equation = (GLfloat *) 0;
3600
3601    if (!equation_ref) {
3602        _env->ThrowNew(IAEClass, "equation == null");
3603        goto exit;
3604    }
3605    if (offset < 0) {
3606        _env->ThrowNew(IAEClass, "offset < 0");
3607        goto exit;
3608    }
3609    _remaining = _env->GetArrayLength(equation_ref) - offset;
3610    if (_remaining < 4) {
3611        _env->ThrowNew(IAEClass, "length - offset < 4");
3612        goto exit;
3613    }
3614    equation_base = (GLfloat *)
3615        _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
3616    equation = equation_base + offset;
3617
3618    glClipPlanef(
3619        (GLenum)plane,
3620        (GLfloat *)equation
3621    );
3622
3623exit:
3624    if (equation_base) {
3625        _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
3626            JNI_ABORT);
3627    }
3628}
3629
3630/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
3631static void
3632android_glClipPlanef__ILjava_nio_FloatBuffer_2
3633  (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
3634    jarray _array = (jarray) 0;
3635    jint _remaining;
3636    GLfloat *equation = (GLfloat *) 0;
3637
3638    equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
3639    if (_remaining < 4) {
3640        _env->ThrowNew(IAEClass, "remaining() < 4");
3641        goto exit;
3642    }
3643    glClipPlanef(
3644        (GLenum)plane,
3645        (GLfloat *)equation
3646    );
3647
3648exit:
3649    if (_array) {
3650        releasePointer(_env, _array, equation, JNI_FALSE);
3651    }
3652}
3653
3654/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
3655static void
3656android_glClipPlanex__I_3II
3657  (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
3658    GLfixed *equation_base = (GLfixed *) 0;
3659    jint _remaining;
3660    GLfixed *equation = (GLfixed *) 0;
3661
3662    if (!equation_ref) {
3663        _env->ThrowNew(IAEClass, "equation == null");
3664        goto exit;
3665    }
3666    if (offset < 0) {
3667        _env->ThrowNew(IAEClass, "offset < 0");
3668        goto exit;
3669    }
3670    _remaining = _env->GetArrayLength(equation_ref) - offset;
3671    if (_remaining < 4) {
3672        _env->ThrowNew(IAEClass, "length - offset < 4");
3673        goto exit;
3674    }
3675    equation_base = (GLfixed *)
3676        _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
3677    equation = equation_base + offset;
3678
3679    glClipPlanex(
3680        (GLenum)plane,
3681        (GLfixed *)equation
3682    );
3683
3684exit:
3685    if (equation_base) {
3686        _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
3687            JNI_ABORT);
3688    }
3689}
3690
3691/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
3692static void
3693android_glClipPlanex__ILjava_nio_IntBuffer_2
3694  (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
3695    jarray _array = (jarray) 0;
3696    jint _remaining;
3697    GLfixed *equation = (GLfixed *) 0;
3698
3699    equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
3700    if (_remaining < 4) {
3701        _env->ThrowNew(IAEClass, "remaining() < 4");
3702        goto exit;
3703    }
3704    glClipPlanex(
3705        (GLenum)plane,
3706        (GLfixed *)equation
3707    );
3708
3709exit:
3710    if (_array) {
3711        releasePointer(_env, _array, equation, JNI_FALSE);
3712    }
3713}
3714
3715/* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */
3716static void
3717android_glColor4ub__BBBB
3718  (JNIEnv *_env, jobject _this, jbyte red, jbyte green, jbyte blue, jbyte alpha) {
3719    glColor4ub(
3720        (GLubyte)red,
3721        (GLubyte)green,
3722        (GLubyte)blue,
3723        (GLubyte)alpha
3724    );
3725}
3726
3727/* void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
3728static void
3729android_glColorPointer__IIII
3730  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
3731    glColorPointer(
3732        (GLint)size,
3733        (GLenum)type,
3734        (GLsizei)stride,
3735        (const GLvoid *)offset
3736    );
3737}
3738
3739/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
3740static void
3741android_glDeleteBuffers__I_3II
3742  (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
3743    GLuint *buffers_base = (GLuint *) 0;
3744    jint _remaining;
3745    GLuint *buffers = (GLuint *) 0;
3746
3747    if (!buffers_ref) {
3748        _env->ThrowNew(IAEClass, "buffers == null");
3749        goto exit;
3750    }
3751    if (offset < 0) {
3752        _env->ThrowNew(IAEClass, "offset < 0");
3753        goto exit;
3754    }
3755    _remaining = _env->GetArrayLength(buffers_ref) - offset;
3756    if (_remaining < n) {
3757        _env->ThrowNew(IAEClass, "length - offset < n");
3758        goto exit;
3759    }
3760    buffers_base = (GLuint *)
3761        _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
3762    buffers = buffers_base + offset;
3763
3764    glDeleteBuffers(
3765        (GLsizei)n,
3766        (GLuint *)buffers
3767    );
3768
3769exit:
3770    if (buffers_base) {
3771        _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
3772            JNI_ABORT);
3773    }
3774}
3775
3776/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
3777static void
3778android_glDeleteBuffers__ILjava_nio_IntBuffer_2
3779  (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
3780    jarray _array = (jarray) 0;
3781    jint _remaining;
3782    GLuint *buffers = (GLuint *) 0;
3783
3784    buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
3785    if (_remaining < n) {
3786        _env->ThrowNew(IAEClass, "remaining() < n");
3787        goto exit;
3788    }
3789    glDeleteBuffers(
3790        (GLsizei)n,
3791        (GLuint *)buffers
3792    );
3793
3794exit:
3795    if (_array) {
3796        releasePointer(_env, _array, buffers, JNI_FALSE);
3797    }
3798}
3799
3800/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
3801static void
3802android_glDrawElements__IIII
3803  (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
3804    glDrawElements(
3805        (GLenum)mode,
3806        (GLsizei)count,
3807        (GLenum)type,
3808        (const GLvoid *)offset
3809    );
3810}
3811
3812/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
3813static void
3814android_glGenBuffers__I_3II
3815  (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
3816    jint _exception = 0;
3817    GLuint *buffers_base = (GLuint *) 0;
3818    jint _remaining;
3819    GLuint *buffers = (GLuint *) 0;
3820
3821    if (!buffers_ref) {
3822        _exception = 1;
3823        _env->ThrowNew(IAEClass, "buffers == null");
3824        goto exit;
3825    }
3826    if (offset < 0) {
3827        _exception = 1;
3828        _env->ThrowNew(IAEClass, "offset < 0");
3829        goto exit;
3830    }
3831    _remaining = _env->GetArrayLength(buffers_ref) - offset;
3832    if (_remaining < n) {
3833        _exception = 1;
3834        _env->ThrowNew(IAEClass, "length - offset < n");
3835        goto exit;
3836    }
3837    buffers_base = (GLuint *)
3838        _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
3839    buffers = buffers_base + offset;
3840
3841    glGenBuffers(
3842        (GLsizei)n,
3843        (GLuint *)buffers
3844    );
3845
3846exit:
3847    if (buffers_base) {
3848        _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
3849            _exception ? JNI_ABORT: 0);
3850    }
3851}
3852
3853/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
3854static void
3855android_glGenBuffers__ILjava_nio_IntBuffer_2
3856  (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
3857    jint _exception = 0;
3858    jarray _array = (jarray) 0;
3859    jint _remaining;
3860    GLuint *buffers = (GLuint *) 0;
3861
3862    buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
3863    if (_remaining < n) {
3864        _exception = 1;
3865        _env->ThrowNew(IAEClass, "remaining() < n");
3866        goto exit;
3867    }
3868    glGenBuffers(
3869        (GLsizei)n,
3870        (GLuint *)buffers
3871    );
3872
3873exit:
3874    if (_array) {
3875        releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE);
3876    }
3877}
3878
3879/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
3880static void
3881android_glGetBooleanv__I_3ZI
3882  (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
3883    jint _exception = 0;
3884    GLboolean *params_base = (GLboolean *) 0;
3885    jint _remaining;
3886    GLboolean *params = (GLboolean *) 0;
3887
3888    if (!params_ref) {
3889        _exception = 1;
3890        _env->ThrowNew(IAEClass, "params == null");
3891        goto exit;
3892    }
3893    if (offset < 0) {
3894        _exception = 1;
3895        _env->ThrowNew(IAEClass, "offset < 0");
3896        goto exit;
3897    }
3898    _remaining = _env->GetArrayLength(params_ref) - offset;
3899    params_base = (GLboolean *)
3900        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3901    params = params_base + offset;
3902
3903    glGetBooleanv(
3904        (GLenum)pname,
3905        (GLboolean *)params
3906    );
3907
3908exit:
3909    if (params_base) {
3910        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3911            _exception ? JNI_ABORT: 0);
3912    }
3913}
3914
3915/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
3916static void
3917android_glGetBooleanv__ILjava_nio_IntBuffer_2
3918  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
3919    jint _exception = 0;
3920    jarray _array = (jarray) 0;
3921    jint _remaining;
3922    GLboolean *params = (GLboolean *) 0;
3923
3924    params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining);
3925    glGetBooleanv(
3926        (GLenum)pname,
3927        (GLboolean *)params
3928    );
3929    if (_array) {
3930        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3931    }
3932}
3933
3934/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3935static void
3936android_glGetBufferParameteriv__II_3II
3937  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3938    _env->ThrowNew(UOEClass,
3939        "glGetBufferParameteriv");
3940}
3941
3942/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3943static void
3944android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
3945  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3946    _env->ThrowNew(UOEClass,
3947        "glGetBufferParameteriv");
3948}
3949
3950/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
3951static void
3952android_glGetClipPlanef__I_3FI
3953  (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
3954    jint _exception = 0;
3955    GLfloat *eqn_base = (GLfloat *) 0;
3956    jint _remaining;
3957    GLfloat *eqn = (GLfloat *) 0;
3958
3959    if (!eqn_ref) {
3960        _exception = 1;
3961        _env->ThrowNew(IAEClass, "eqn == null");
3962        goto exit;
3963    }
3964    if (offset < 0) {
3965        _exception = 1;
3966        _env->ThrowNew(IAEClass, "offset < 0");
3967        goto exit;
3968    }
3969    _remaining = _env->GetArrayLength(eqn_ref) - offset;
3970    eqn_base = (GLfloat *)
3971        _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
3972    eqn = eqn_base + offset;
3973
3974    glGetClipPlanef(
3975        (GLenum)pname,
3976        (GLfloat *)eqn
3977    );
3978
3979exit:
3980    if (eqn_base) {
3981        _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
3982            _exception ? JNI_ABORT: 0);
3983    }
3984}
3985
3986/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
3987static void
3988android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
3989  (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
3990    jint _exception = 0;
3991    jarray _array = (jarray) 0;
3992    jint _remaining;
3993    GLfloat *eqn = (GLfloat *) 0;
3994
3995    eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
3996    glGetClipPlanef(
3997        (GLenum)pname,
3998        (GLfloat *)eqn
3999    );
4000    if (_array) {
4001        releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
4002    }
4003}
4004
4005/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4006static void
4007android_glGetClipPlanex__I_3II
4008  (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
4009    jint _exception = 0;
4010    GLfixed *eqn_base = (GLfixed *) 0;
4011    jint _remaining;
4012    GLfixed *eqn = (GLfixed *) 0;
4013
4014    if (!eqn_ref) {
4015        _exception = 1;
4016        _env->ThrowNew(IAEClass, "eqn == null");
4017        goto exit;
4018    }
4019    if (offset < 0) {
4020        _exception = 1;
4021        _env->ThrowNew(IAEClass, "offset < 0");
4022        goto exit;
4023    }
4024    _remaining = _env->GetArrayLength(eqn_ref) - offset;
4025    eqn_base = (GLfixed *)
4026        _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
4027    eqn = eqn_base + offset;
4028
4029    glGetClipPlanex(
4030        (GLenum)pname,
4031        (GLfixed *)eqn
4032    );
4033
4034exit:
4035    if (eqn_base) {
4036        _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
4037            _exception ? JNI_ABORT: 0);
4038    }
4039}
4040
4041/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4042static void
4043android_glGetClipPlanex__ILjava_nio_IntBuffer_2
4044  (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
4045    jint _exception = 0;
4046    jarray _array = (jarray) 0;
4047    jint _remaining;
4048    GLfixed *eqn = (GLfixed *) 0;
4049
4050    eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
4051    glGetClipPlanex(
4052        (GLenum)pname,
4053        (GLfixed *)eqn
4054    );
4055    if (_array) {
4056        releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
4057    }
4058}
4059
4060/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
4061static void
4062android_glGetFixedv__I_3II
4063  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
4064    jint _exception = 0;
4065    GLfixed *params_base = (GLfixed *) 0;
4066    jint _remaining;
4067    GLfixed *params = (GLfixed *) 0;
4068
4069    if (!params_ref) {
4070        _exception = 1;
4071        _env->ThrowNew(IAEClass, "params == null");
4072        goto exit;
4073    }
4074    if (offset < 0) {
4075        _exception = 1;
4076        _env->ThrowNew(IAEClass, "offset < 0");
4077        goto exit;
4078    }
4079    _remaining = _env->GetArrayLength(params_ref) - offset;
4080    params_base = (GLfixed *)
4081        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4082    params = params_base + offset;
4083
4084    glGetFixedv(
4085        (GLenum)pname,
4086        (GLfixed *)params
4087    );
4088
4089exit:
4090    if (params_base) {
4091        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4092            _exception ? JNI_ABORT: 0);
4093    }
4094}
4095
4096/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
4097static void
4098android_glGetFixedv__ILjava_nio_IntBuffer_2
4099  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4100    jint _exception = 0;
4101    jarray _array = (jarray) 0;
4102    jint _remaining;
4103    GLfixed *params = (GLfixed *) 0;
4104
4105    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4106    glGetFixedv(
4107        (GLenum)pname,
4108        (GLfixed *)params
4109    );
4110    if (_array) {
4111        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4112    }
4113}
4114
4115/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
4116static void
4117android_glGetFloatv__I_3FI
4118  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
4119    jint _exception = 0;
4120    GLfloat *params_base = (GLfloat *) 0;
4121    jint _remaining;
4122    GLfloat *params = (GLfloat *) 0;
4123
4124    if (!params_ref) {
4125        _exception = 1;
4126        _env->ThrowNew(IAEClass, "params == null");
4127        goto exit;
4128    }
4129    if (offset < 0) {
4130        _exception = 1;
4131        _env->ThrowNew(IAEClass, "offset < 0");
4132        goto exit;
4133    }
4134    _remaining = _env->GetArrayLength(params_ref) - offset;
4135    params_base = (GLfloat *)
4136        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4137    params = params_base + offset;
4138
4139    glGetFloatv(
4140        (GLenum)pname,
4141        (GLfloat *)params
4142    );
4143
4144exit:
4145    if (params_base) {
4146        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4147            _exception ? JNI_ABORT: 0);
4148    }
4149}
4150
4151/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
4152static void
4153android_glGetFloatv__ILjava_nio_FloatBuffer_2
4154  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4155    jint _exception = 0;
4156    jarray _array = (jarray) 0;
4157    jint _remaining;
4158    GLfloat *params = (GLfloat *) 0;
4159
4160    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4161    glGetFloatv(
4162        (GLenum)pname,
4163        (GLfloat *)params
4164    );
4165    if (_array) {
4166        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4167    }
4168}
4169
4170/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
4171static void
4172android_glGetLightfv__II_3FI
4173  (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
4174    jint _exception = 0;
4175    GLfloat *params_base = (GLfloat *) 0;
4176    jint _remaining;
4177    GLfloat *params = (GLfloat *) 0;
4178
4179    if (!params_ref) {
4180        _exception = 1;
4181        _env->ThrowNew(IAEClass, "params == null");
4182        goto exit;
4183    }
4184    if (offset < 0) {
4185        _exception = 1;
4186        _env->ThrowNew(IAEClass, "offset < 0");
4187        goto exit;
4188    }
4189    _remaining = _env->GetArrayLength(params_ref) - offset;
4190    int _needed;
4191    switch (pname) {
4192#if defined(GL_SPOT_EXPONENT)
4193        case GL_SPOT_EXPONENT:
4194#endif // defined(GL_SPOT_EXPONENT)
4195#if defined(GL_SPOT_CUTOFF)
4196        case GL_SPOT_CUTOFF:
4197#endif // defined(GL_SPOT_CUTOFF)
4198#if defined(GL_CONSTANT_ATTENUATION)
4199        case GL_CONSTANT_ATTENUATION:
4200#endif // defined(GL_CONSTANT_ATTENUATION)
4201#if defined(GL_LINEAR_ATTENUATION)
4202        case GL_LINEAR_ATTENUATION:
4203#endif // defined(GL_LINEAR_ATTENUATION)
4204#if defined(GL_QUADRATIC_ATTENUATION)
4205        case GL_QUADRATIC_ATTENUATION:
4206#endif // defined(GL_QUADRATIC_ATTENUATION)
4207            _needed = 1;
4208            break;
4209#if defined(GL_SPOT_DIRECTION)
4210        case GL_SPOT_DIRECTION:
4211#endif // defined(GL_SPOT_DIRECTION)
4212            _needed = 3;
4213            break;
4214#if defined(GL_AMBIENT)
4215        case GL_AMBIENT:
4216#endif // defined(GL_AMBIENT)
4217#if defined(GL_DIFFUSE)
4218        case GL_DIFFUSE:
4219#endif // defined(GL_DIFFUSE)
4220#if defined(GL_SPECULAR)
4221        case GL_SPECULAR:
4222#endif // defined(GL_SPECULAR)
4223#if defined(GL_EMISSION)
4224        case GL_EMISSION:
4225#endif // defined(GL_EMISSION)
4226            _needed = 4;
4227            break;
4228        default:
4229            _needed = 0;
4230            break;
4231    }
4232    if (_remaining < _needed) {
4233        _exception = 1;
4234        _env->ThrowNew(IAEClass, "length - offset < needed");
4235        goto exit;
4236    }
4237    params_base = (GLfloat *)
4238        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4239    params = params_base + offset;
4240
4241    glGetLightfv(
4242        (GLenum)light,
4243        (GLenum)pname,
4244        (GLfloat *)params
4245    );
4246
4247exit:
4248    if (params_base) {
4249        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4250            _exception ? JNI_ABORT: 0);
4251    }
4252}
4253
4254/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
4255static void
4256android_glGetLightfv__IILjava_nio_FloatBuffer_2
4257  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
4258    jint _exception = 0;
4259    jarray _array = (jarray) 0;
4260    jint _remaining;
4261    GLfloat *params = (GLfloat *) 0;
4262
4263    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4264    int _needed;
4265    switch (pname) {
4266#if defined(GL_SPOT_EXPONENT)
4267        case GL_SPOT_EXPONENT:
4268#endif // defined(GL_SPOT_EXPONENT)
4269#if defined(GL_SPOT_CUTOFF)
4270        case GL_SPOT_CUTOFF:
4271#endif // defined(GL_SPOT_CUTOFF)
4272#if defined(GL_CONSTANT_ATTENUATION)
4273        case GL_CONSTANT_ATTENUATION:
4274#endif // defined(GL_CONSTANT_ATTENUATION)
4275#if defined(GL_LINEAR_ATTENUATION)
4276        case GL_LINEAR_ATTENUATION:
4277#endif // defined(GL_LINEAR_ATTENUATION)
4278#if defined(GL_QUADRATIC_ATTENUATION)
4279        case GL_QUADRATIC_ATTENUATION:
4280#endif // defined(GL_QUADRATIC_ATTENUATION)
4281            _needed = 1;
4282            break;
4283#if defined(GL_SPOT_DIRECTION)
4284        case GL_SPOT_DIRECTION:
4285#endif // defined(GL_SPOT_DIRECTION)
4286            _needed = 3;
4287            break;
4288#if defined(GL_AMBIENT)
4289        case GL_AMBIENT:
4290#endif // defined(GL_AMBIENT)
4291#if defined(GL_DIFFUSE)
4292        case GL_DIFFUSE:
4293#endif // defined(GL_DIFFUSE)
4294#if defined(GL_SPECULAR)
4295        case GL_SPECULAR:
4296#endif // defined(GL_SPECULAR)
4297#if defined(GL_EMISSION)
4298        case GL_EMISSION:
4299#endif // defined(GL_EMISSION)
4300            _needed = 4;
4301            break;
4302        default:
4303            _needed = 0;
4304            break;
4305    }
4306    if (_remaining < _needed) {
4307        _exception = 1;
4308        _env->ThrowNew(IAEClass, "remaining() < needed");
4309        goto exit;
4310    }
4311    glGetLightfv(
4312        (GLenum)light,
4313        (GLenum)pname,
4314        (GLfloat *)params
4315    );
4316
4317exit:
4318    if (_array) {
4319        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4320    }
4321}
4322
4323/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
4324static void
4325android_glGetLightxv__II_3II
4326  (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
4327    jint _exception = 0;
4328    GLfixed *params_base = (GLfixed *) 0;
4329    jint _remaining;
4330    GLfixed *params = (GLfixed *) 0;
4331
4332    if (!params_ref) {
4333        _exception = 1;
4334        _env->ThrowNew(IAEClass, "params == null");
4335        goto exit;
4336    }
4337    if (offset < 0) {
4338        _exception = 1;
4339        _env->ThrowNew(IAEClass, "offset < 0");
4340        goto exit;
4341    }
4342    _remaining = _env->GetArrayLength(params_ref) - offset;
4343    int _needed;
4344    switch (pname) {
4345#if defined(GL_SPOT_EXPONENT)
4346        case GL_SPOT_EXPONENT:
4347#endif // defined(GL_SPOT_EXPONENT)
4348#if defined(GL_SPOT_CUTOFF)
4349        case GL_SPOT_CUTOFF:
4350#endif // defined(GL_SPOT_CUTOFF)
4351#if defined(GL_CONSTANT_ATTENUATION)
4352        case GL_CONSTANT_ATTENUATION:
4353#endif // defined(GL_CONSTANT_ATTENUATION)
4354#if defined(GL_LINEAR_ATTENUATION)
4355        case GL_LINEAR_ATTENUATION:
4356#endif // defined(GL_LINEAR_ATTENUATION)
4357#if defined(GL_QUADRATIC_ATTENUATION)
4358        case GL_QUADRATIC_ATTENUATION:
4359#endif // defined(GL_QUADRATIC_ATTENUATION)
4360            _needed = 1;
4361            break;
4362#if defined(GL_SPOT_DIRECTION)
4363        case GL_SPOT_DIRECTION:
4364#endif // defined(GL_SPOT_DIRECTION)
4365            _needed = 3;
4366            break;
4367#if defined(GL_AMBIENT)
4368        case GL_AMBIENT:
4369#endif // defined(GL_AMBIENT)
4370#if defined(GL_DIFFUSE)
4371        case GL_DIFFUSE:
4372#endif // defined(GL_DIFFUSE)
4373#if defined(GL_SPECULAR)
4374        case GL_SPECULAR:
4375#endif // defined(GL_SPECULAR)
4376#if defined(GL_EMISSION)
4377        case GL_EMISSION:
4378#endif // defined(GL_EMISSION)
4379            _needed = 4;
4380            break;
4381        default:
4382            _needed = 0;
4383            break;
4384    }
4385    if (_remaining < _needed) {
4386        _exception = 1;
4387        _env->ThrowNew(IAEClass, "length - offset < needed");
4388        goto exit;
4389    }
4390    params_base = (GLfixed *)
4391        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4392    params = params_base + offset;
4393
4394    glGetLightxv(
4395        (GLenum)light,
4396        (GLenum)pname,
4397        (GLfixed *)params
4398    );
4399
4400exit:
4401    if (params_base) {
4402        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4403            _exception ? JNI_ABORT: 0);
4404    }
4405}
4406
4407/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
4408static void
4409android_glGetLightxv__IILjava_nio_IntBuffer_2
4410  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
4411    jint _exception = 0;
4412    jarray _array = (jarray) 0;
4413    jint _remaining;
4414    GLfixed *params = (GLfixed *) 0;
4415
4416    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4417    int _needed;
4418    switch (pname) {
4419#if defined(GL_SPOT_EXPONENT)
4420        case GL_SPOT_EXPONENT:
4421#endif // defined(GL_SPOT_EXPONENT)
4422#if defined(GL_SPOT_CUTOFF)
4423        case GL_SPOT_CUTOFF:
4424#endif // defined(GL_SPOT_CUTOFF)
4425#if defined(GL_CONSTANT_ATTENUATION)
4426        case GL_CONSTANT_ATTENUATION:
4427#endif // defined(GL_CONSTANT_ATTENUATION)
4428#if defined(GL_LINEAR_ATTENUATION)
4429        case GL_LINEAR_ATTENUATION:
4430#endif // defined(GL_LINEAR_ATTENUATION)
4431#if defined(GL_QUADRATIC_ATTENUATION)
4432        case GL_QUADRATIC_ATTENUATION:
4433#endif // defined(GL_QUADRATIC_ATTENUATION)
4434            _needed = 1;
4435            break;
4436#if defined(GL_SPOT_DIRECTION)
4437        case GL_SPOT_DIRECTION:
4438#endif // defined(GL_SPOT_DIRECTION)
4439            _needed = 3;
4440            break;
4441#if defined(GL_AMBIENT)
4442        case GL_AMBIENT:
4443#endif // defined(GL_AMBIENT)
4444#if defined(GL_DIFFUSE)
4445        case GL_DIFFUSE:
4446#endif // defined(GL_DIFFUSE)
4447#if defined(GL_SPECULAR)
4448        case GL_SPECULAR:
4449#endif // defined(GL_SPECULAR)
4450#if defined(GL_EMISSION)
4451        case GL_EMISSION:
4452#endif // defined(GL_EMISSION)
4453            _needed = 4;
4454            break;
4455        default:
4456            _needed = 0;
4457            break;
4458    }
4459    if (_remaining < _needed) {
4460        _exception = 1;
4461        _env->ThrowNew(IAEClass, "remaining() < needed");
4462        goto exit;
4463    }
4464    glGetLightxv(
4465        (GLenum)light,
4466        (GLenum)pname,
4467        (GLfixed *)params
4468    );
4469
4470exit:
4471    if (_array) {
4472        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4473    }
4474}
4475
4476/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
4477static void
4478android_glGetMaterialfv__II_3FI
4479  (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
4480    jint _exception = 0;
4481    GLfloat *params_base = (GLfloat *) 0;
4482    jint _remaining;
4483    GLfloat *params = (GLfloat *) 0;
4484
4485    if (!params_ref) {
4486        _exception = 1;
4487        _env->ThrowNew(IAEClass, "params == null");
4488        goto exit;
4489    }
4490    if (offset < 0) {
4491        _exception = 1;
4492        _env->ThrowNew(IAEClass, "offset < 0");
4493        goto exit;
4494    }
4495    _remaining = _env->GetArrayLength(params_ref) - offset;
4496    int _needed;
4497    switch (pname) {
4498#if defined(GL_SHININESS)
4499        case GL_SHININESS:
4500#endif // defined(GL_SHININESS)
4501            _needed = 1;
4502            break;
4503#if defined(GL_AMBIENT)
4504        case GL_AMBIENT:
4505#endif // defined(GL_AMBIENT)
4506#if defined(GL_DIFFUSE)
4507        case GL_DIFFUSE:
4508#endif // defined(GL_DIFFUSE)
4509#if defined(GL_SPECULAR)
4510        case GL_SPECULAR:
4511#endif // defined(GL_SPECULAR)
4512#if defined(GL_EMISSION)
4513        case GL_EMISSION:
4514#endif // defined(GL_EMISSION)
4515#if defined(GL_AMBIENT_AND_DIFFUSE)
4516        case GL_AMBIENT_AND_DIFFUSE:
4517#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4518            _needed = 4;
4519            break;
4520        default:
4521            _needed = 0;
4522            break;
4523    }
4524    if (_remaining < _needed) {
4525        _exception = 1;
4526        _env->ThrowNew(IAEClass, "length - offset < needed");
4527        goto exit;
4528    }
4529    params_base = (GLfloat *)
4530        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4531    params = params_base + offset;
4532
4533    glGetMaterialfv(
4534        (GLenum)face,
4535        (GLenum)pname,
4536        (GLfloat *)params
4537    );
4538
4539exit:
4540    if (params_base) {
4541        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4542            _exception ? JNI_ABORT: 0);
4543    }
4544}
4545
4546/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
4547static void
4548android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
4549  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
4550    jint _exception = 0;
4551    jarray _array = (jarray) 0;
4552    jint _remaining;
4553    GLfloat *params = (GLfloat *) 0;
4554
4555    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4556    int _needed;
4557    switch (pname) {
4558#if defined(GL_SHININESS)
4559        case GL_SHININESS:
4560#endif // defined(GL_SHININESS)
4561            _needed = 1;
4562            break;
4563#if defined(GL_AMBIENT)
4564        case GL_AMBIENT:
4565#endif // defined(GL_AMBIENT)
4566#if defined(GL_DIFFUSE)
4567        case GL_DIFFUSE:
4568#endif // defined(GL_DIFFUSE)
4569#if defined(GL_SPECULAR)
4570        case GL_SPECULAR:
4571#endif // defined(GL_SPECULAR)
4572#if defined(GL_EMISSION)
4573        case GL_EMISSION:
4574#endif // defined(GL_EMISSION)
4575#if defined(GL_AMBIENT_AND_DIFFUSE)
4576        case GL_AMBIENT_AND_DIFFUSE:
4577#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4578            _needed = 4;
4579            break;
4580        default:
4581            _needed = 0;
4582            break;
4583    }
4584    if (_remaining < _needed) {
4585        _exception = 1;
4586        _env->ThrowNew(IAEClass, "remaining() < needed");
4587        goto exit;
4588    }
4589    glGetMaterialfv(
4590        (GLenum)face,
4591        (GLenum)pname,
4592        (GLfloat *)params
4593    );
4594
4595exit:
4596    if (_array) {
4597        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4598    }
4599}
4600
4601/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
4602static void
4603android_glGetMaterialxv__II_3II
4604  (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
4605    jint _exception = 0;
4606    GLfixed *params_base = (GLfixed *) 0;
4607    jint _remaining;
4608    GLfixed *params = (GLfixed *) 0;
4609
4610    if (!params_ref) {
4611        _exception = 1;
4612        _env->ThrowNew(IAEClass, "params == null");
4613        goto exit;
4614    }
4615    if (offset < 0) {
4616        _exception = 1;
4617        _env->ThrowNew(IAEClass, "offset < 0");
4618        goto exit;
4619    }
4620    _remaining = _env->GetArrayLength(params_ref) - offset;
4621    int _needed;
4622    switch (pname) {
4623#if defined(GL_SHININESS)
4624        case GL_SHININESS:
4625#endif // defined(GL_SHININESS)
4626            _needed = 1;
4627            break;
4628#if defined(GL_AMBIENT)
4629        case GL_AMBIENT:
4630#endif // defined(GL_AMBIENT)
4631#if defined(GL_DIFFUSE)
4632        case GL_DIFFUSE:
4633#endif // defined(GL_DIFFUSE)
4634#if defined(GL_SPECULAR)
4635        case GL_SPECULAR:
4636#endif // defined(GL_SPECULAR)
4637#if defined(GL_EMISSION)
4638        case GL_EMISSION:
4639#endif // defined(GL_EMISSION)
4640#if defined(GL_AMBIENT_AND_DIFFUSE)
4641        case GL_AMBIENT_AND_DIFFUSE:
4642#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4643            _needed = 4;
4644            break;
4645        default:
4646            _needed = 0;
4647            break;
4648    }
4649    if (_remaining < _needed) {
4650        _exception = 1;
4651        _env->ThrowNew(IAEClass, "length - offset < needed");
4652        goto exit;
4653    }
4654    params_base = (GLfixed *)
4655        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4656    params = params_base + offset;
4657
4658    glGetMaterialxv(
4659        (GLenum)face,
4660        (GLenum)pname,
4661        (GLfixed *)params
4662    );
4663
4664exit:
4665    if (params_base) {
4666        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4667            _exception ? JNI_ABORT: 0);
4668    }
4669}
4670
4671/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
4672static void
4673android_glGetMaterialxv__IILjava_nio_IntBuffer_2
4674  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
4675    jint _exception = 0;
4676    jarray _array = (jarray) 0;
4677    jint _remaining;
4678    GLfixed *params = (GLfixed *) 0;
4679
4680    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4681    int _needed;
4682    switch (pname) {
4683#if defined(GL_SHININESS)
4684        case GL_SHININESS:
4685#endif // defined(GL_SHININESS)
4686            _needed = 1;
4687            break;
4688#if defined(GL_AMBIENT)
4689        case GL_AMBIENT:
4690#endif // defined(GL_AMBIENT)
4691#if defined(GL_DIFFUSE)
4692        case GL_DIFFUSE:
4693#endif // defined(GL_DIFFUSE)
4694#if defined(GL_SPECULAR)
4695        case GL_SPECULAR:
4696#endif // defined(GL_SPECULAR)
4697#if defined(GL_EMISSION)
4698        case GL_EMISSION:
4699#endif // defined(GL_EMISSION)
4700#if defined(GL_AMBIENT_AND_DIFFUSE)
4701        case GL_AMBIENT_AND_DIFFUSE:
4702#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4703            _needed = 4;
4704            break;
4705        default:
4706            _needed = 0;
4707            break;
4708    }
4709    if (_remaining < _needed) {
4710        _exception = 1;
4711        _env->ThrowNew(IAEClass, "remaining() < needed");
4712        goto exit;
4713    }
4714    glGetMaterialxv(
4715        (GLenum)face,
4716        (GLenum)pname,
4717        (GLfixed *)params
4718    );
4719
4720exit:
4721    if (_array) {
4722        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4723    }
4724}
4725
4726/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
4727static void
4728android_glGetTexEnviv__II_3II
4729  (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
4730    jint _exception = 0;
4731    GLint *params_base = (GLint *) 0;
4732    jint _remaining;
4733    GLint *params = (GLint *) 0;
4734
4735    if (!params_ref) {
4736        _exception = 1;
4737        _env->ThrowNew(IAEClass, "params == null");
4738        goto exit;
4739    }
4740    if (offset < 0) {
4741        _exception = 1;
4742        _env->ThrowNew(IAEClass, "offset < 0");
4743        goto exit;
4744    }
4745    _remaining = _env->GetArrayLength(params_ref) - offset;
4746    int _needed;
4747    switch (pname) {
4748#if defined(GL_TEXTURE_ENV_MODE)
4749        case GL_TEXTURE_ENV_MODE:
4750#endif // defined(GL_TEXTURE_ENV_MODE)
4751#if defined(GL_COMBINE_RGB)
4752        case GL_COMBINE_RGB:
4753#endif // defined(GL_COMBINE_RGB)
4754#if defined(GL_COMBINE_ALPHA)
4755        case GL_COMBINE_ALPHA:
4756#endif // defined(GL_COMBINE_ALPHA)
4757            _needed = 1;
4758            break;
4759#if defined(GL_TEXTURE_ENV_COLOR)
4760        case GL_TEXTURE_ENV_COLOR:
4761#endif // defined(GL_TEXTURE_ENV_COLOR)
4762            _needed = 4;
4763            break;
4764        default:
4765            _needed = 0;
4766            break;
4767    }
4768    if (_remaining < _needed) {
4769        _exception = 1;
4770        _env->ThrowNew(IAEClass, "length - offset < needed");
4771        goto exit;
4772    }
4773    params_base = (GLint *)
4774        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4775    params = params_base + offset;
4776
4777    glGetTexEnviv(
4778        (GLenum)env,
4779        (GLenum)pname,
4780        (GLint *)params
4781    );
4782
4783exit:
4784    if (params_base) {
4785        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4786            _exception ? JNI_ABORT: 0);
4787    }
4788}
4789
4790/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
4791static void
4792android_glGetTexEnviv__IILjava_nio_IntBuffer_2
4793  (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
4794    jint _exception = 0;
4795    jarray _array = (jarray) 0;
4796    jint _remaining;
4797    GLint *params = (GLint *) 0;
4798
4799    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
4800    int _needed;
4801    switch (pname) {
4802#if defined(GL_TEXTURE_ENV_MODE)
4803        case GL_TEXTURE_ENV_MODE:
4804#endif // defined(GL_TEXTURE_ENV_MODE)
4805#if defined(GL_COMBINE_RGB)
4806        case GL_COMBINE_RGB:
4807#endif // defined(GL_COMBINE_RGB)
4808#if defined(GL_COMBINE_ALPHA)
4809        case GL_COMBINE_ALPHA:
4810#endif // defined(GL_COMBINE_ALPHA)
4811            _needed = 1;
4812            break;
4813#if defined(GL_TEXTURE_ENV_COLOR)
4814        case GL_TEXTURE_ENV_COLOR:
4815#endif // defined(GL_TEXTURE_ENV_COLOR)
4816            _needed = 4;
4817            break;
4818        default:
4819            _needed = 0;
4820            break;
4821    }
4822    if (_remaining < _needed) {
4823        _exception = 1;
4824        _env->ThrowNew(IAEClass, "remaining() < needed");
4825        goto exit;
4826    }
4827    glGetTexEnviv(
4828        (GLenum)env,
4829        (GLenum)pname,
4830        (GLint *)params
4831    );
4832
4833exit:
4834    if (_array) {
4835        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4836    }
4837}
4838
4839/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
4840static void
4841android_glGetTexEnvxv__II_3II
4842  (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
4843    jint _exception = 0;
4844    GLfixed *params_base = (GLfixed *) 0;
4845    jint _remaining;
4846    GLfixed *params = (GLfixed *) 0;
4847
4848    if (!params_ref) {
4849        _exception = 1;
4850        _env->ThrowNew(IAEClass, "params == null");
4851        goto exit;
4852    }
4853    if (offset < 0) {
4854        _exception = 1;
4855        _env->ThrowNew(IAEClass, "offset < 0");
4856        goto exit;
4857    }
4858    _remaining = _env->GetArrayLength(params_ref) - offset;
4859    int _needed;
4860    switch (pname) {
4861#if defined(GL_TEXTURE_ENV_MODE)
4862        case GL_TEXTURE_ENV_MODE:
4863#endif // defined(GL_TEXTURE_ENV_MODE)
4864#if defined(GL_COMBINE_RGB)
4865        case GL_COMBINE_RGB:
4866#endif // defined(GL_COMBINE_RGB)
4867#if defined(GL_COMBINE_ALPHA)
4868        case GL_COMBINE_ALPHA:
4869#endif // defined(GL_COMBINE_ALPHA)
4870            _needed = 1;
4871            break;
4872#if defined(GL_TEXTURE_ENV_COLOR)
4873        case GL_TEXTURE_ENV_COLOR:
4874#endif // defined(GL_TEXTURE_ENV_COLOR)
4875            _needed = 4;
4876            break;
4877        default:
4878            _needed = 0;
4879            break;
4880    }
4881    if (_remaining < _needed) {
4882        _exception = 1;
4883        _env->ThrowNew(IAEClass, "length - offset < needed");
4884        goto exit;
4885    }
4886    params_base = (GLfixed *)
4887        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4888    params = params_base + offset;
4889
4890    glGetTexEnvxv(
4891        (GLenum)env,
4892        (GLenum)pname,
4893        (GLfixed *)params
4894    );
4895
4896exit:
4897    if (params_base) {
4898        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4899            _exception ? JNI_ABORT: 0);
4900    }
4901}
4902
4903/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
4904static void
4905android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
4906  (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
4907    jint _exception = 0;
4908    jarray _array = (jarray) 0;
4909    jint _remaining;
4910    GLfixed *params = (GLfixed *) 0;
4911
4912    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4913    int _needed;
4914    switch (pname) {
4915#if defined(GL_TEXTURE_ENV_MODE)
4916        case GL_TEXTURE_ENV_MODE:
4917#endif // defined(GL_TEXTURE_ENV_MODE)
4918#if defined(GL_COMBINE_RGB)
4919        case GL_COMBINE_RGB:
4920#endif // defined(GL_COMBINE_RGB)
4921#if defined(GL_COMBINE_ALPHA)
4922        case GL_COMBINE_ALPHA:
4923#endif // defined(GL_COMBINE_ALPHA)
4924            _needed = 1;
4925            break;
4926#if defined(GL_TEXTURE_ENV_COLOR)
4927        case GL_TEXTURE_ENV_COLOR:
4928#endif // defined(GL_TEXTURE_ENV_COLOR)
4929            _needed = 4;
4930            break;
4931        default:
4932            _needed = 0;
4933            break;
4934    }
4935    if (_remaining < _needed) {
4936        _exception = 1;
4937        _env->ThrowNew(IAEClass, "remaining() < needed");
4938        goto exit;
4939    }
4940    glGetTexEnvxv(
4941        (GLenum)env,
4942        (GLenum)pname,
4943        (GLfixed *)params
4944    );
4945
4946exit:
4947    if (_array) {
4948        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4949    }
4950}
4951
4952/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
4953static void
4954android_glGetTexParameterfv__II_3FI
4955  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
4956    jint _exception = 0;
4957    GLfloat *params_base = (GLfloat *) 0;
4958    jint _remaining;
4959    GLfloat *params = (GLfloat *) 0;
4960
4961    if (!params_ref) {
4962        _exception = 1;
4963        _env->ThrowNew(IAEClass, "params == null");
4964        goto exit;
4965    }
4966    if (offset < 0) {
4967        _exception = 1;
4968        _env->ThrowNew(IAEClass, "offset < 0");
4969        goto exit;
4970    }
4971    _remaining = _env->GetArrayLength(params_ref) - offset;
4972    if (_remaining < 1) {
4973        _exception = 1;
4974        _env->ThrowNew(IAEClass, "length - offset < 1");
4975        goto exit;
4976    }
4977    params_base = (GLfloat *)
4978        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4979    params = params_base + offset;
4980
4981    glGetTexParameterfv(
4982        (GLenum)target,
4983        (GLenum)pname,
4984        (GLfloat *)params
4985    );
4986
4987exit:
4988    if (params_base) {
4989        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4990            _exception ? JNI_ABORT: 0);
4991    }
4992}
4993
4994/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
4995static void
4996android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
4997  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
4998    jint _exception = 0;
4999    jarray _array = (jarray) 0;
5000    jint _remaining;
5001    GLfloat *params = (GLfloat *) 0;
5002
5003    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5004    if (_remaining < 1) {
5005        _exception = 1;
5006        _env->ThrowNew(IAEClass, "remaining() < 1");
5007        goto exit;
5008    }
5009    glGetTexParameterfv(
5010        (GLenum)target,
5011        (GLenum)pname,
5012        (GLfloat *)params
5013    );
5014
5015exit:
5016    if (_array) {
5017        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5018    }
5019}
5020
5021/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
5022static void
5023android_glGetTexParameteriv__II_3II
5024  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5025    jint _exception = 0;
5026    GLint *params_base = (GLint *) 0;
5027    jint _remaining;
5028    GLint *params = (GLint *) 0;
5029
5030    if (!params_ref) {
5031        _exception = 1;
5032        _env->ThrowNew(IAEClass, "params == null");
5033        goto exit;
5034    }
5035    if (offset < 0) {
5036        _exception = 1;
5037        _env->ThrowNew(IAEClass, "offset < 0");
5038        goto exit;
5039    }
5040    _remaining = _env->GetArrayLength(params_ref) - offset;
5041    if (_remaining < 1) {
5042        _exception = 1;
5043        _env->ThrowNew(IAEClass, "length - offset < 1");
5044        goto exit;
5045    }
5046    params_base = (GLint *)
5047        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5048    params = params_base + offset;
5049
5050    glGetTexParameteriv(
5051        (GLenum)target,
5052        (GLenum)pname,
5053        (GLint *)params
5054    );
5055
5056exit:
5057    if (params_base) {
5058        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5059            _exception ? JNI_ABORT: 0);
5060    }
5061}
5062
5063/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
5064static void
5065android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
5066  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5067    jint _exception = 0;
5068    jarray _array = (jarray) 0;
5069    jint _remaining;
5070    GLint *params = (GLint *) 0;
5071
5072    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5073    if (_remaining < 1) {
5074        _exception = 1;
5075        _env->ThrowNew(IAEClass, "remaining() < 1");
5076        goto exit;
5077    }
5078    glGetTexParameteriv(
5079        (GLenum)target,
5080        (GLenum)pname,
5081        (GLint *)params
5082    );
5083
5084exit:
5085    if (_array) {
5086        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5087    }
5088}
5089
5090/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
5091static void
5092android_glGetTexParameterxv__II_3II
5093  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5094    jint _exception = 0;
5095    GLfixed *params_base = (GLfixed *) 0;
5096    jint _remaining;
5097    GLfixed *params = (GLfixed *) 0;
5098
5099    if (!params_ref) {
5100        _exception = 1;
5101        _env->ThrowNew(IAEClass, "params == null");
5102        goto exit;
5103    }
5104    if (offset < 0) {
5105        _exception = 1;
5106        _env->ThrowNew(IAEClass, "offset < 0");
5107        goto exit;
5108    }
5109    _remaining = _env->GetArrayLength(params_ref) - offset;
5110    if (_remaining < 1) {
5111        _exception = 1;
5112        _env->ThrowNew(IAEClass, "length - offset < 1");
5113        goto exit;
5114    }
5115    params_base = (GLfixed *)
5116        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5117    params = params_base + offset;
5118
5119    glGetTexParameterxv(
5120        (GLenum)target,
5121        (GLenum)pname,
5122        (GLfixed *)params
5123    );
5124
5125exit:
5126    if (params_base) {
5127        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5128            _exception ? JNI_ABORT: 0);
5129    }
5130}
5131
5132/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
5133static void
5134android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
5135  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5136    jint _exception = 0;
5137    jarray _array = (jarray) 0;
5138    jint _remaining;
5139    GLfixed *params = (GLfixed *) 0;
5140
5141    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5142    if (_remaining < 1) {
5143        _exception = 1;
5144        _env->ThrowNew(IAEClass, "remaining() < 1");
5145        goto exit;
5146    }
5147    glGetTexParameterxv(
5148        (GLenum)target,
5149        (GLenum)pname,
5150        (GLfixed *)params
5151    );
5152
5153exit:
5154    if (_array) {
5155        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5156    }
5157}
5158
5159/* GLboolean glIsBuffer ( GLuint buffer ) */
5160static jboolean
5161android_glIsBuffer__I
5162  (JNIEnv *_env, jobject _this, jint buffer) {
5163    GLboolean _returnValue;
5164    _returnValue = glIsBuffer(
5165        (GLuint)buffer
5166    );
5167    return _returnValue;
5168}
5169
5170/* GLboolean glIsEnabled ( GLenum cap ) */
5171static jboolean
5172android_glIsEnabled__I
5173  (JNIEnv *_env, jobject _this, jint cap) {
5174    GLboolean _returnValue;
5175    _returnValue = glIsEnabled(
5176        (GLenum)cap
5177    );
5178    return _returnValue;
5179}
5180
5181/* GLboolean glIsTexture ( GLuint texture ) */
5182static jboolean
5183android_glIsTexture__I
5184  (JNIEnv *_env, jobject _this, jint texture) {
5185    GLboolean _returnValue;
5186    _returnValue = glIsTexture(
5187        (GLuint)texture
5188    );
5189    return _returnValue;
5190}
5191
5192/* void glNormalPointer ( GLenum type, GLsizei stride, GLint offset ) */
5193static void
5194android_glNormalPointer__III
5195  (JNIEnv *_env, jobject _this, jint type, jint stride, jint offset) {
5196    glNormalPointer(
5197        (GLenum)type,
5198        (GLsizei)stride,
5199        (const GLvoid *)offset
5200    );
5201}
5202
5203/* void glPointParameterf ( GLenum pname, GLfloat param ) */
5204static void
5205android_glPointParameterf__IF
5206  (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
5207    glPointParameterf(
5208        (GLenum)pname,
5209        (GLfloat)param
5210    );
5211}
5212
5213/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
5214static void
5215android_glPointParameterfv__I_3FI
5216  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
5217    GLfloat *params_base = (GLfloat *) 0;
5218    jint _remaining;
5219    GLfloat *params = (GLfloat *) 0;
5220
5221    if (!params_ref) {
5222        _env->ThrowNew(IAEClass, "params == null");
5223        goto exit;
5224    }
5225    if (offset < 0) {
5226        _env->ThrowNew(IAEClass, "offset < 0");
5227        goto exit;
5228    }
5229    _remaining = _env->GetArrayLength(params_ref) - offset;
5230    if (_remaining < 1) {
5231        _env->ThrowNew(IAEClass, "length - offset < 1");
5232        goto exit;
5233    }
5234    params_base = (GLfloat *)
5235        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5236    params = params_base + offset;
5237
5238    glPointParameterfv(
5239        (GLenum)pname,
5240        (GLfloat *)params
5241    );
5242
5243exit:
5244    if (params_base) {
5245        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5246            JNI_ABORT);
5247    }
5248}
5249
5250/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
5251static void
5252android_glPointParameterfv__ILjava_nio_FloatBuffer_2
5253  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5254    jarray _array = (jarray) 0;
5255    jint _remaining;
5256    GLfloat *params = (GLfloat *) 0;
5257
5258    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5259    if (_remaining < 1) {
5260        _env->ThrowNew(IAEClass, "remaining() < 1");
5261        goto exit;
5262    }
5263    glPointParameterfv(
5264        (GLenum)pname,
5265        (GLfloat *)params
5266    );
5267
5268exit:
5269    if (_array) {
5270        releasePointer(_env, _array, params, JNI_FALSE);
5271    }
5272}
5273
5274/* void glPointParameterx ( GLenum pname, GLfixed param ) */
5275static void
5276android_glPointParameterx__II
5277  (JNIEnv *_env, jobject _this, jint pname, jint param) {
5278    glPointParameterx(
5279        (GLenum)pname,
5280        (GLfixed)param
5281    );
5282}
5283
5284/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
5285static void
5286android_glPointParameterxv__I_3II
5287  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
5288    GLfixed *params_base = (GLfixed *) 0;
5289    jint _remaining;
5290    GLfixed *params = (GLfixed *) 0;
5291
5292    if (!params_ref) {
5293        _env->ThrowNew(IAEClass, "params == null");
5294        goto exit;
5295    }
5296    if (offset < 0) {
5297        _env->ThrowNew(IAEClass, "offset < 0");
5298        goto exit;
5299    }
5300    _remaining = _env->GetArrayLength(params_ref) - offset;
5301    if (_remaining < 1) {
5302        _env->ThrowNew(IAEClass, "length - offset < 1");
5303        goto exit;
5304    }
5305    params_base = (GLfixed *)
5306        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5307    params = params_base + offset;
5308
5309    glPointParameterxv(
5310        (GLenum)pname,
5311        (GLfixed *)params
5312    );
5313
5314exit:
5315    if (params_base) {
5316        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5317            JNI_ABORT);
5318    }
5319}
5320
5321/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
5322static void
5323android_glPointParameterxv__ILjava_nio_IntBuffer_2
5324  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5325    jarray _array = (jarray) 0;
5326    jint _remaining;
5327    GLfixed *params = (GLfixed *) 0;
5328
5329    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5330    if (_remaining < 1) {
5331        _env->ThrowNew(IAEClass, "remaining() < 1");
5332        goto exit;
5333    }
5334    glPointParameterxv(
5335        (GLenum)pname,
5336        (GLfixed *)params
5337    );
5338
5339exit:
5340    if (_array) {
5341        releasePointer(_env, _array, params, JNI_FALSE);
5342    }
5343}
5344
5345/* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
5346static void
5347android_glPointSizePointerOES__IILjava_nio_Buffer_2
5348  (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf) {
5349    jarray _array = (jarray) 0;
5350    jint _remaining;
5351    GLvoid *pointer = (GLvoid *) 0;
5352
5353    pointer = (GLvoid *)getPointer(_env, pointer_buf, &_array, &_remaining);
5354    glPointSizePointerOES(
5355        (GLenum)type,
5356        (GLsizei)stride,
5357        (GLvoid *)pointer
5358    );
5359    if (_array) {
5360        releasePointer(_env, _array, pointer, JNI_FALSE);
5361    }
5362}
5363
5364/* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5365static void
5366android_glTexCoordPointer__IIII
5367  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5368    glTexCoordPointer(
5369        (GLint)size,
5370        (GLenum)type,
5371        (GLsizei)stride,
5372        (const GLvoid *)offset
5373    );
5374}
5375
5376/* void glTexEnvi ( GLenum target, GLenum pname, GLint param ) */
5377static void
5378android_glTexEnvi__III
5379  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
5380    glTexEnvi(
5381        (GLenum)target,
5382        (GLenum)pname,
5383        (GLint)param
5384    );
5385}
5386
5387/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
5388static void
5389android_glTexEnviv__II_3II
5390  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5391    GLint *params_base = (GLint *) 0;
5392    jint _remaining;
5393    GLint *params = (GLint *) 0;
5394
5395    if (!params_ref) {
5396        _env->ThrowNew(IAEClass, "params == null");
5397        goto exit;
5398    }
5399    if (offset < 0) {
5400        _env->ThrowNew(IAEClass, "offset < 0");
5401        goto exit;
5402    }
5403    _remaining = _env->GetArrayLength(params_ref) - offset;
5404    int _needed;
5405    switch (pname) {
5406#if defined(GL_TEXTURE_ENV_MODE)
5407        case GL_TEXTURE_ENV_MODE:
5408#endif // defined(GL_TEXTURE_ENV_MODE)
5409#if defined(GL_COMBINE_RGB)
5410        case GL_COMBINE_RGB:
5411#endif // defined(GL_COMBINE_RGB)
5412#if defined(GL_COMBINE_ALPHA)
5413        case GL_COMBINE_ALPHA:
5414#endif // defined(GL_COMBINE_ALPHA)
5415            _needed = 1;
5416            break;
5417#if defined(GL_TEXTURE_ENV_COLOR)
5418        case GL_TEXTURE_ENV_COLOR:
5419#endif // defined(GL_TEXTURE_ENV_COLOR)
5420            _needed = 4;
5421            break;
5422        default:
5423            _needed = 0;
5424            break;
5425    }
5426    if (_remaining < _needed) {
5427        _env->ThrowNew(IAEClass, "length - offset < needed");
5428        goto exit;
5429    }
5430    params_base = (GLint *)
5431        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5432    params = params_base + offset;
5433
5434    glTexEnviv(
5435        (GLenum)target,
5436        (GLenum)pname,
5437        (GLint *)params
5438    );
5439
5440exit:
5441    if (params_base) {
5442        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5443            JNI_ABORT);
5444    }
5445}
5446
5447/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
5448static void
5449android_glTexEnviv__IILjava_nio_IntBuffer_2
5450  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5451    jarray _array = (jarray) 0;
5452    jint _remaining;
5453    GLint *params = (GLint *) 0;
5454
5455    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5456    int _needed;
5457    switch (pname) {
5458#if defined(GL_TEXTURE_ENV_MODE)
5459        case GL_TEXTURE_ENV_MODE:
5460#endif // defined(GL_TEXTURE_ENV_MODE)
5461#if defined(GL_COMBINE_RGB)
5462        case GL_COMBINE_RGB:
5463#endif // defined(GL_COMBINE_RGB)
5464#if defined(GL_COMBINE_ALPHA)
5465        case GL_COMBINE_ALPHA:
5466#endif // defined(GL_COMBINE_ALPHA)
5467            _needed = 1;
5468            break;
5469#if defined(GL_TEXTURE_ENV_COLOR)
5470        case GL_TEXTURE_ENV_COLOR:
5471#endif // defined(GL_TEXTURE_ENV_COLOR)
5472            _needed = 4;
5473            break;
5474        default:
5475            _needed = 0;
5476            break;
5477    }
5478    if (_remaining < _needed) {
5479        _env->ThrowNew(IAEClass, "remaining() < needed");
5480        goto exit;
5481    }
5482    glTexEnviv(
5483        (GLenum)target,
5484        (GLenum)pname,
5485        (GLint *)params
5486    );
5487
5488exit:
5489    if (_array) {
5490        releasePointer(_env, _array, params, JNI_FALSE);
5491    }
5492}
5493
5494/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
5495static void
5496android_glTexParameterfv__II_3FI
5497  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
5498    GLfloat *params_base = (GLfloat *) 0;
5499    jint _remaining;
5500    GLfloat *params = (GLfloat *) 0;
5501
5502    if (!params_ref) {
5503        _env->ThrowNew(IAEClass, "params == null");
5504        goto exit;
5505    }
5506    if (offset < 0) {
5507        _env->ThrowNew(IAEClass, "offset < 0");
5508        goto exit;
5509    }
5510    _remaining = _env->GetArrayLength(params_ref) - offset;
5511    if (_remaining < 1) {
5512        _env->ThrowNew(IAEClass, "length - offset < 1");
5513        goto exit;
5514    }
5515    params_base = (GLfloat *)
5516        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5517    params = params_base + offset;
5518
5519    glTexParameterfv(
5520        (GLenum)target,
5521        (GLenum)pname,
5522        (GLfloat *)params
5523    );
5524
5525exit:
5526    if (params_base) {
5527        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5528            JNI_ABORT);
5529    }
5530}
5531
5532/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
5533static void
5534android_glTexParameterfv__IILjava_nio_FloatBuffer_2
5535  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5536    jarray _array = (jarray) 0;
5537    jint _remaining;
5538    GLfloat *params = (GLfloat *) 0;
5539
5540    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5541    if (_remaining < 1) {
5542        _env->ThrowNew(IAEClass, "remaining() < 1");
5543        goto exit;
5544    }
5545    glTexParameterfv(
5546        (GLenum)target,
5547        (GLenum)pname,
5548        (GLfloat *)params
5549    );
5550
5551exit:
5552    if (_array) {
5553        releasePointer(_env, _array, params, JNI_FALSE);
5554    }
5555}
5556
5557/* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
5558static void
5559android_glTexParameteri__III
5560  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
5561    glTexParameteri(
5562        (GLenum)target,
5563        (GLenum)pname,
5564        (GLint)param
5565    );
5566}
5567
5568/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
5569static void
5570android_glTexParameteriv__II_3II
5571  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5572    GLint *params_base = (GLint *) 0;
5573    jint _remaining;
5574    GLint *params = (GLint *) 0;
5575
5576    if (!params_ref) {
5577        _env->ThrowNew(IAEClass, "params == null");
5578        goto exit;
5579    }
5580    if (offset < 0) {
5581        _env->ThrowNew(IAEClass, "offset < 0");
5582        goto exit;
5583    }
5584    _remaining = _env->GetArrayLength(params_ref) - offset;
5585    if (_remaining < 1) {
5586        _env->ThrowNew(IAEClass, "length - offset < 1");
5587        goto exit;
5588    }
5589    params_base = (GLint *)
5590        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5591    params = params_base + offset;
5592
5593    glTexParameteriv(
5594        (GLenum)target,
5595        (GLenum)pname,
5596        (GLint *)params
5597    );
5598
5599exit:
5600    if (params_base) {
5601        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5602            JNI_ABORT);
5603    }
5604}
5605
5606/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
5607static void
5608android_glTexParameteriv__IILjava_nio_IntBuffer_2
5609  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5610    jarray _array = (jarray) 0;
5611    jint _remaining;
5612    GLint *params = (GLint *) 0;
5613
5614    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5615    if (_remaining < 1) {
5616        _env->ThrowNew(IAEClass, "remaining() < 1");
5617        goto exit;
5618    }
5619    glTexParameteriv(
5620        (GLenum)target,
5621        (GLenum)pname,
5622        (GLint *)params
5623    );
5624
5625exit:
5626    if (_array) {
5627        releasePointer(_env, _array, params, JNI_FALSE);
5628    }
5629}
5630
5631/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
5632static void
5633android_glTexParameterxv__II_3II
5634  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5635    GLfixed *params_base = (GLfixed *) 0;
5636    jint _remaining;
5637    GLfixed *params = (GLfixed *) 0;
5638
5639    if (!params_ref) {
5640        _env->ThrowNew(IAEClass, "params == null");
5641        goto exit;
5642    }
5643    if (offset < 0) {
5644        _env->ThrowNew(IAEClass, "offset < 0");
5645        goto exit;
5646    }
5647    _remaining = _env->GetArrayLength(params_ref) - offset;
5648    if (_remaining < 1) {
5649        _env->ThrowNew(IAEClass, "length - offset < 1");
5650        goto exit;
5651    }
5652    params_base = (GLfixed *)
5653        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5654    params = params_base + offset;
5655
5656    glTexParameterxv(
5657        (GLenum)target,
5658        (GLenum)pname,
5659        (GLfixed *)params
5660    );
5661
5662exit:
5663    if (params_base) {
5664        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5665            JNI_ABORT);
5666    }
5667}
5668
5669/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
5670static void
5671android_glTexParameterxv__IILjava_nio_IntBuffer_2
5672  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5673    jarray _array = (jarray) 0;
5674    jint _remaining;
5675    GLfixed *params = (GLfixed *) 0;
5676
5677    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5678    if (_remaining < 1) {
5679        _env->ThrowNew(IAEClass, "remaining() < 1");
5680        goto exit;
5681    }
5682    glTexParameterxv(
5683        (GLenum)target,
5684        (GLenum)pname,
5685        (GLfixed *)params
5686    );
5687
5688exit:
5689    if (_array) {
5690        releasePointer(_env, _array, params, JNI_FALSE);
5691    }
5692}
5693
5694/* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5695static void
5696android_glVertexPointer__IIII
5697  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5698    glVertexPointer(
5699        (GLint)size,
5700        (GLenum)type,
5701        (GLsizei)stride,
5702        (const GLvoid *)offset
5703    );
5704}
5705
5706/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
5707static void
5708android_glCurrentPaletteMatrixOES__I
5709  (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
5710    _env->ThrowNew(UOEClass,
5711        "glCurrentPaletteMatrixOES");
5712}
5713
5714/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
5715static void
5716android_glDrawTexfOES__FFFFF
5717  (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
5718    glDrawTexfOES(
5719        (GLfloat)x,
5720        (GLfloat)y,
5721        (GLfloat)z,
5722        (GLfloat)width,
5723        (GLfloat)height
5724    );
5725}
5726
5727/* void glDrawTexfvOES ( const GLfloat *coords ) */
5728static void
5729android_glDrawTexfvOES___3FI
5730  (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
5731    GLfloat *coords_base = (GLfloat *) 0;
5732    jint _remaining;
5733    GLfloat *coords = (GLfloat *) 0;
5734
5735    if (!coords_ref) {
5736        _env->ThrowNew(IAEClass, "coords == null");
5737        goto exit;
5738    }
5739    if (offset < 0) {
5740        _env->ThrowNew(IAEClass, "offset < 0");
5741        goto exit;
5742    }
5743    _remaining = _env->GetArrayLength(coords_ref) - offset;
5744    if (_remaining < 5) {
5745        _env->ThrowNew(IAEClass, "length - offset < 5");
5746        goto exit;
5747    }
5748    coords_base = (GLfloat *)
5749        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5750    coords = coords_base + offset;
5751
5752    glDrawTexfvOES(
5753        (GLfloat *)coords
5754    );
5755
5756exit:
5757    if (coords_base) {
5758        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5759            JNI_ABORT);
5760    }
5761}
5762
5763/* void glDrawTexfvOES ( const GLfloat *coords ) */
5764static void
5765android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
5766  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5767    jarray _array = (jarray) 0;
5768    jint _remaining;
5769    GLfloat *coords = (GLfloat *) 0;
5770
5771    coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
5772    if (_remaining < 5) {
5773        _env->ThrowNew(IAEClass, "remaining() < 5");
5774        goto exit;
5775    }
5776    glDrawTexfvOES(
5777        (GLfloat *)coords
5778    );
5779
5780exit:
5781    if (_array) {
5782        releasePointer(_env, _array, coords, JNI_FALSE);
5783    }
5784}
5785
5786/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
5787static void
5788android_glDrawTexiOES__IIIII
5789  (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
5790    glDrawTexiOES(
5791        (GLint)x,
5792        (GLint)y,
5793        (GLint)z,
5794        (GLint)width,
5795        (GLint)height
5796    );
5797}
5798
5799/* void glDrawTexivOES ( const GLint *coords ) */
5800static void
5801android_glDrawTexivOES___3II
5802  (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
5803    GLint *coords_base = (GLint *) 0;
5804    jint _remaining;
5805    GLint *coords = (GLint *) 0;
5806
5807    if (!coords_ref) {
5808        _env->ThrowNew(IAEClass, "coords == null");
5809        goto exit;
5810    }
5811    if (offset < 0) {
5812        _env->ThrowNew(IAEClass, "offset < 0");
5813        goto exit;
5814    }
5815    _remaining = _env->GetArrayLength(coords_ref) - offset;
5816    if (_remaining < 5) {
5817        _env->ThrowNew(IAEClass, "length - offset < 5");
5818        goto exit;
5819    }
5820    coords_base = (GLint *)
5821        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5822    coords = coords_base + offset;
5823
5824    glDrawTexivOES(
5825        (GLint *)coords
5826    );
5827
5828exit:
5829    if (coords_base) {
5830        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5831            JNI_ABORT);
5832    }
5833}
5834
5835/* void glDrawTexivOES ( const GLint *coords ) */
5836static void
5837android_glDrawTexivOES__Ljava_nio_IntBuffer_2
5838  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5839    jarray _array = (jarray) 0;
5840    jint _remaining;
5841    GLint *coords = (GLint *) 0;
5842
5843    coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
5844    if (_remaining < 5) {
5845        _env->ThrowNew(IAEClass, "remaining() < 5");
5846        goto exit;
5847    }
5848    glDrawTexivOES(
5849        (GLint *)coords
5850    );
5851
5852exit:
5853    if (_array) {
5854        releasePointer(_env, _array, coords, JNI_FALSE);
5855    }
5856}
5857
5858/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
5859static void
5860android_glDrawTexsOES__SSSSS
5861  (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
5862    glDrawTexsOES(
5863        (GLshort)x,
5864        (GLshort)y,
5865        (GLshort)z,
5866        (GLshort)width,
5867        (GLshort)height
5868    );
5869}
5870
5871/* void glDrawTexsvOES ( const GLshort *coords ) */
5872static void
5873android_glDrawTexsvOES___3SI
5874  (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
5875    GLshort *coords_base = (GLshort *) 0;
5876    jint _remaining;
5877    GLshort *coords = (GLshort *) 0;
5878
5879    if (!coords_ref) {
5880        _env->ThrowNew(IAEClass, "coords == null");
5881        goto exit;
5882    }
5883    if (offset < 0) {
5884        _env->ThrowNew(IAEClass, "offset < 0");
5885        goto exit;
5886    }
5887    _remaining = _env->GetArrayLength(coords_ref) - offset;
5888    if (_remaining < 5) {
5889        _env->ThrowNew(IAEClass, "length - offset < 5");
5890        goto exit;
5891    }
5892    coords_base = (GLshort *)
5893        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5894    coords = coords_base + offset;
5895
5896    glDrawTexsvOES(
5897        (GLshort *)coords
5898    );
5899
5900exit:
5901    if (coords_base) {
5902        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5903            JNI_ABORT);
5904    }
5905}
5906
5907/* void glDrawTexsvOES ( const GLshort *coords ) */
5908static void
5909android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
5910  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5911    jarray _array = (jarray) 0;
5912    jint _remaining;
5913    GLshort *coords = (GLshort *) 0;
5914
5915    coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
5916    if (_remaining < 5) {
5917        _env->ThrowNew(IAEClass, "remaining() < 5");
5918        goto exit;
5919    }
5920    glDrawTexsvOES(
5921        (GLshort *)coords
5922    );
5923
5924exit:
5925    if (_array) {
5926        releasePointer(_env, _array, coords, JNI_FALSE);
5927    }
5928}
5929
5930/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
5931static void
5932android_glDrawTexxOES__IIIII
5933  (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
5934    glDrawTexxOES(
5935        (GLfixed)x,
5936        (GLfixed)y,
5937        (GLfixed)z,
5938        (GLfixed)width,
5939        (GLfixed)height
5940    );
5941}
5942
5943/* void glDrawTexxvOES ( const GLfixed *coords ) */
5944static void
5945android_glDrawTexxvOES___3II
5946  (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
5947    GLfixed *coords_base = (GLfixed *) 0;
5948    jint _remaining;
5949    GLfixed *coords = (GLfixed *) 0;
5950
5951    if (!coords_ref) {
5952        _env->ThrowNew(IAEClass, "coords == null");
5953        goto exit;
5954    }
5955    if (offset < 0) {
5956        _env->ThrowNew(IAEClass, "offset < 0");
5957        goto exit;
5958    }
5959    _remaining = _env->GetArrayLength(coords_ref) - offset;
5960    if (_remaining < 5) {
5961        _env->ThrowNew(IAEClass, "length - offset < 5");
5962        goto exit;
5963    }
5964    coords_base = (GLfixed *)
5965        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5966    coords = coords_base + offset;
5967
5968    glDrawTexxvOES(
5969        (GLfixed *)coords
5970    );
5971
5972exit:
5973    if (coords_base) {
5974        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5975            JNI_ABORT);
5976    }
5977}
5978
5979/* void glDrawTexxvOES ( const GLfixed *coords ) */
5980static void
5981android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
5982  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5983    jarray _array = (jarray) 0;
5984    jint _remaining;
5985    GLfixed *coords = (GLfixed *) 0;
5986
5987    coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
5988    if (_remaining < 5) {
5989        _env->ThrowNew(IAEClass, "remaining() < 5");
5990        goto exit;
5991    }
5992    glDrawTexxvOES(
5993        (GLfixed *)coords
5994    );
5995
5996exit:
5997    if (_array) {
5998        releasePointer(_env, _array, coords, JNI_FALSE);
5999    }
6000}
6001
6002/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
6003static void
6004android_glLoadPaletteFromModelViewMatrixOES__
6005  (JNIEnv *_env, jobject _this) {
6006    _env->ThrowNew(UOEClass,
6007        "glLoadPaletteFromModelViewMatrixOES");
6008}
6009
6010/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
6011static void
6012android_glMatrixIndexPointerOES__IIILjava_nio_Buffer_2
6013  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf) {
6014    _env->ThrowNew(UOEClass,
6015        "glMatrixIndexPointerOES");
6016}
6017
6018/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
6019static void
6020android_glMatrixIndexPointerOES__IIII
6021  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
6022    _env->ThrowNew(UOEClass,
6023        "glMatrixIndexPointerOES");
6024}
6025
6026/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
6027static void
6028android_glWeightPointerOES__IIILjava_nio_Buffer_2
6029  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf) {
6030    _env->ThrowNew(UOEClass,
6031        "glWeightPointerOES");
6032}
6033
6034/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
6035static void
6036android_glWeightPointerOES__IIII
6037  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
6038    _env->ThrowNew(UOEClass,
6039        "glWeightPointerOES");
6040}
6041
6042/* void glBindFramebufferOES ( GLint target, GLint framebuffer ) */
6043static void
6044android_glBindFramebufferOES__II
6045  (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
6046    _env->ThrowNew(UOEClass,
6047        "glBindFramebufferOES");
6048}
6049
6050/* void glBindRenderbufferOES ( GLint target, GLint renderbuffer ) */
6051static void
6052android_glBindRenderbufferOES__II
6053  (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
6054    _env->ThrowNew(UOEClass,
6055        "glBindRenderbufferOES");
6056}
6057
6058/* void glBlendEquation ( GLint mode ) */
6059static void
6060android_glBlendEquation__I
6061  (JNIEnv *_env, jobject _this, jint mode) {
6062    _env->ThrowNew(UOEClass,
6063        "glBlendEquation");
6064}
6065
6066/* void glBlendEquationSeparate ( GLint modeRGB, GLint modeAlpha ) */
6067static void
6068android_glBlendEquationSeparate__II
6069  (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
6070    _env->ThrowNew(UOEClass,
6071        "glBlendEquationSeparate");
6072}
6073
6074/* void glBlendFuncSeparate ( GLint srcRGB, GLint dstRGB, GLint srcAlpha, GLint dstAlpha ) */
6075static void
6076android_glBlendFuncSeparate__IIII
6077  (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
6078    _env->ThrowNew(UOEClass,
6079        "glBlendFuncSeparate");
6080}
6081
6082/* GLint glCheckFramebufferStatusOES ( GLint target ) */
6083static jint
6084android_glCheckFramebufferStatusOES__I
6085  (JNIEnv *_env, jobject _this, jint target) {
6086    _env->ThrowNew(UOEClass,
6087        "glCheckFramebufferStatusOES");
6088    return 0;
6089}
6090
6091/* void glDeleteFramebuffersOES ( GLint n, GLint *framebuffers ) */
6092static void
6093android_glDeleteFramebuffersOES__I_3II
6094  (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
6095    _env->ThrowNew(UOEClass,
6096        "glDeleteFramebuffersOES");
6097}
6098
6099/* void glDeleteFramebuffersOES ( GLint n, GLint *framebuffers ) */
6100static void
6101android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
6102  (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
6103    _env->ThrowNew(UOEClass,
6104        "glDeleteFramebuffersOES");
6105}
6106
6107/* void glDeleteRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6108static void
6109android_glDeleteRenderbuffersOES__I_3II
6110  (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
6111    _env->ThrowNew(UOEClass,
6112        "glDeleteRenderbuffersOES");
6113}
6114
6115/* void glDeleteRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6116static void
6117android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
6118  (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
6119    _env->ThrowNew(UOEClass,
6120        "glDeleteRenderbuffersOES");
6121}
6122
6123/* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */
6124static void
6125android_glFramebufferRenderbufferOES__IIII
6126  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
6127    _env->ThrowNew(UOEClass,
6128        "glFramebufferRenderbufferOES");
6129}
6130
6131/* void glFramebufferTexture2DOES ( GLint target, GLint attachment, GLint textarget, GLint texture, GLint level ) */
6132static void
6133android_glFramebufferTexture2DOES__IIIII
6134  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
6135    _env->ThrowNew(UOEClass,
6136        "glFramebufferTexture2DOES");
6137}
6138
6139/* void glGenerateMipmapOES ( GLint target ) */
6140static void
6141android_glGenerateMipmapOES__I
6142  (JNIEnv *_env, jobject _this, jint target) {
6143    _env->ThrowNew(UOEClass,
6144        "glGenerateMipmapOES");
6145}
6146
6147/* void glGenFramebuffersOES ( GLint n, GLint *framebuffers ) */
6148static void
6149android_glGenFramebuffersOES__I_3II
6150  (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
6151    _env->ThrowNew(UOEClass,
6152        "glGenFramebuffersOES");
6153}
6154
6155/* void glGenFramebuffersOES ( GLint n, GLint *framebuffers ) */
6156static void
6157android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
6158  (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
6159    _env->ThrowNew(UOEClass,
6160        "glGenFramebuffersOES");
6161}
6162
6163/* void glGenRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6164static void
6165android_glGenRenderbuffersOES__I_3II
6166  (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
6167    _env->ThrowNew(UOEClass,
6168        "glGenRenderbuffersOES");
6169}
6170
6171/* void glGenRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6172static void
6173android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
6174  (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
6175    _env->ThrowNew(UOEClass,
6176        "glGenRenderbuffersOES");
6177}
6178
6179/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
6180static void
6181android_glGetFramebufferAttachmentParameterivOES__III_3II
6182  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
6183    _env->ThrowNew(UOEClass,
6184        "glGetFramebufferAttachmentParameterivOES");
6185}
6186
6187/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
6188static void
6189android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
6190  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
6191    _env->ThrowNew(UOEClass,
6192        "glGetFramebufferAttachmentParameterivOES");
6193}
6194
6195/* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
6196static void
6197android_glGetRenderbufferParameterivOES__II_3II
6198  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6199    _env->ThrowNew(UOEClass,
6200        "glGetRenderbufferParameterivOES");
6201}
6202
6203/* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
6204static void
6205android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
6206  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6207    _env->ThrowNew(UOEClass,
6208        "glGetRenderbufferParameterivOES");
6209}
6210
6211/* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6212static void
6213android_glGetTexGenfv__II_3FI
6214  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
6215    _env->ThrowNew(UOEClass,
6216        "glGetTexGenfv");
6217}
6218
6219/* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6220static void
6221android_glGetTexGenfv__IILjava_nio_FloatBuffer_2
6222  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6223    _env->ThrowNew(UOEClass,
6224        "glGetTexGenfv");
6225}
6226
6227/* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6228static void
6229android_glGetTexGeniv__II_3II
6230  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6231    _env->ThrowNew(UOEClass,
6232        "glGetTexGeniv");
6233}
6234
6235/* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6236static void
6237android_glGetTexGeniv__IILjava_nio_IntBuffer_2
6238  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6239    _env->ThrowNew(UOEClass,
6240        "glGetTexGeniv");
6241}
6242
6243/* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6244static void
6245android_glGetTexGenxv__II_3II
6246  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6247    _env->ThrowNew(UOEClass,
6248        "glGetTexGenxv");
6249}
6250
6251/* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6252static void
6253android_glGetTexGenxv__IILjava_nio_IntBuffer_2
6254  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6255    _env->ThrowNew(UOEClass,
6256        "glGetTexGenxv");
6257}
6258
6259/* GLboolean glIsFramebufferOES ( GLint framebuffer ) */
6260static jboolean
6261android_glIsFramebufferOES__I
6262  (JNIEnv *_env, jobject _this, jint framebuffer) {
6263    _env->ThrowNew(UOEClass,
6264        "glIsFramebufferOES");
6265    return JNI_FALSE;
6266}
6267
6268/* GLboolean glIsRenderbufferOES ( GLint renderbuffer ) */
6269static jboolean
6270android_glIsRenderbufferOES__I
6271  (JNIEnv *_env, jobject _this, jint renderbuffer) {
6272    _env->ThrowNew(UOEClass,
6273        "glIsRenderbufferOES");
6274    return JNI_FALSE;
6275}
6276
6277/* void glRenderbufferStorageOES ( GLint target, GLint internalformat, GLint width, GLint height ) */
6278static void
6279android_glRenderbufferStorageOES__IIII
6280  (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
6281    _env->ThrowNew(UOEClass,
6282        "glRenderbufferStorageOES");
6283}
6284
6285/* void glTexGenf ( GLint coord, GLint pname, GLfloat param ) */
6286static void
6287android_glTexGenf__IIF
6288  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
6289    _env->ThrowNew(UOEClass,
6290        "glTexGenf");
6291}
6292
6293/* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6294static void
6295android_glTexGenfv__II_3FI
6296  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
6297    _env->ThrowNew(UOEClass,
6298        "glTexGenfv");
6299}
6300
6301/* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6302static void
6303android_glTexGenfv__IILjava_nio_FloatBuffer_2
6304  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6305    _env->ThrowNew(UOEClass,
6306        "glTexGenfv");
6307}
6308
6309/* void glTexGeni ( GLint coord, GLint pname, GLint param ) */
6310static void
6311android_glTexGeni__III
6312  (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
6313    _env->ThrowNew(UOEClass,
6314        "glTexGeni");
6315}
6316
6317/* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6318static void
6319android_glTexGeniv__II_3II
6320  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6321    _env->ThrowNew(UOEClass,
6322        "glTexGeniv");
6323}
6324
6325/* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6326static void
6327android_glTexGeniv__IILjava_nio_IntBuffer_2
6328  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6329    _env->ThrowNew(UOEClass,
6330        "glTexGeniv");
6331}
6332
6333/* void glTexGenx ( GLint coord, GLint pname, GLint param ) */
6334static void
6335android_glTexGenx__III
6336  (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
6337    _env->ThrowNew(UOEClass,
6338        "glTexGenx");
6339}
6340
6341/* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6342static void
6343android_glTexGenxv__II_3II
6344  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6345    _env->ThrowNew(UOEClass,
6346        "glTexGenxv");
6347}
6348
6349/* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6350static void
6351android_glTexGenxv__IILjava_nio_IntBuffer_2
6352  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6353    _env->ThrowNew(UOEClass,
6354        "glTexGenxv");
6355}
6356
6357static const char *classPathName = "com/google/android/gles_jni/GLImpl";
6358
6359static JNINativeMethod methods[] = {
6360{"_nativeClassInit", "()V", (void*)nativeClassInit },
6361{"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I },
6362{"glAlphaFunc", "(IF)V", (void *) android_glAlphaFunc__IF },
6363{"glAlphaFuncx", "(II)V", (void *) android_glAlphaFuncx__II },
6364{"glBindTexture", "(II)V", (void *) android_glBindTexture__II },
6365{"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II },
6366{"glClear", "(I)V", (void *) android_glClear__I },
6367{"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF },
6368{"glClearColorx", "(IIII)V", (void *) android_glClearColorx__IIII },
6369{"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F },
6370{"glClearDepthx", "(I)V", (void *) android_glClearDepthx__I },
6371{"glClearStencil", "(I)V", (void *) android_glClearStencil__I },
6372{"glClientActiveTexture", "(I)V", (void *) android_glClientActiveTexture__I },
6373{"glColor4f", "(FFFF)V", (void *) android_glColor4f__FFFF },
6374{"glColor4x", "(IIII)V", (void *) android_glColor4x__IIII },
6375{"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ },
6376{"glColorPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glColorPointerBounds__IIILjava_nio_Buffer_2I },
6377{"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 },
6378{"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6379{"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII },
6380{"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII },
6381{"glCullFace", "(I)V", (void *) android_glCullFace__I },
6382{"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II },
6383{"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 },
6384{"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I },
6385{"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z },
6386{"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF },
6387{"glDepthRangex", "(II)V", (void *) android_glDepthRangex__II },
6388{"glDisable", "(I)V", (void *) android_glDisable__I },
6389{"glDisableClientState", "(I)V", (void *) android_glDisableClientState__I },
6390{"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
6391{"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
6392{"glEnable", "(I)V", (void *) android_glEnable__I },
6393{"glEnableClientState", "(I)V", (void *) android_glEnableClientState__I },
6394{"glFinish", "()V", (void *) android_glFinish__ },
6395{"glFlush", "()V", (void *) android_glFlush__ },
6396{"glFogf", "(IF)V", (void *) android_glFogf__IF },
6397{"glFogfv", "(I[FI)V", (void *) android_glFogfv__I_3FI },
6398{"glFogfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glFogfv__ILjava_nio_FloatBuffer_2 },
6399{"glFogx", "(II)V", (void *) android_glFogx__II },
6400{"glFogxv", "(I[II)V", (void *) android_glFogxv__I_3II },
6401{"glFogxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxv__ILjava_nio_IntBuffer_2 },
6402{"glFrontFace", "(I)V", (void *) android_glFrontFace__I },
6403{"glFrustumf", "(FFFFFF)V", (void *) android_glFrustumf__FFFFFF },
6404{"glFrustumx", "(IIIIII)V", (void *) android_glFrustumx__IIIIII },
6405{"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II },
6406{"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 },
6407{"glGetError", "()I", (void *) android_glGetError__ },
6408{"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II },
6409{"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 },
6410{"_glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
6411{"glHint", "(II)V", (void *) android_glHint__II },
6412{"glLightModelf", "(IF)V", (void *) android_glLightModelf__IF },
6413{"glLightModelfv", "(I[FI)V", (void *) android_glLightModelfv__I_3FI },
6414{"glLightModelfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glLightModelfv__ILjava_nio_FloatBuffer_2 },
6415{"glLightModelx", "(II)V", (void *) android_glLightModelx__II },
6416{"glLightModelxv", "(I[II)V", (void *) android_glLightModelxv__I_3II },
6417{"glLightModelxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxv__ILjava_nio_IntBuffer_2 },
6418{"glLightf", "(IIF)V", (void *) android_glLightf__IIF },
6419{"glLightfv", "(II[FI)V", (void *) android_glLightfv__II_3FI },
6420{"glLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glLightfv__IILjava_nio_FloatBuffer_2 },
6421{"glLightx", "(III)V", (void *) android_glLightx__III },
6422{"glLightxv", "(II[II)V", (void *) android_glLightxv__II_3II },
6423{"glLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxv__IILjava_nio_IntBuffer_2 },
6424{"glLineWidth", "(F)V", (void *) android_glLineWidth__F },
6425{"glLineWidthx", "(I)V", (void *) android_glLineWidthx__I },
6426{"glLoadIdentity", "()V", (void *) android_glLoadIdentity__ },
6427{"glLoadMatrixf", "([FI)V", (void *) android_glLoadMatrixf___3FI },
6428{"glLoadMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 },
6429{"glLoadMatrixx", "([II)V", (void *) android_glLoadMatrixx___3II },
6430{"glLoadMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixx__Ljava_nio_IntBuffer_2 },
6431{"glLogicOp", "(I)V", (void *) android_glLogicOp__I },
6432{"glMaterialf", "(IIF)V", (void *) android_glMaterialf__IIF },
6433{"glMaterialfv", "(II[FI)V", (void *) android_glMaterialfv__II_3FI },
6434{"glMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glMaterialfv__IILjava_nio_FloatBuffer_2 },
6435{"glMaterialx", "(III)V", (void *) android_glMaterialx__III },
6436{"glMaterialxv", "(II[II)V", (void *) android_glMaterialxv__II_3II },
6437{"glMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxv__IILjava_nio_IntBuffer_2 },
6438{"glMatrixMode", "(I)V", (void *) android_glMatrixMode__I },
6439{"glMultMatrixf", "([FI)V", (void *) android_glMultMatrixf___3FI },
6440{"glMultMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glMultMatrixf__Ljava_nio_FloatBuffer_2 },
6441{"glMultMatrixx", "([II)V", (void *) android_glMultMatrixx___3II },
6442{"glMultMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixx__Ljava_nio_IntBuffer_2 },
6443{"glMultiTexCoord4f", "(IFFFF)V", (void *) android_glMultiTexCoord4f__IFFFF },
6444{"glMultiTexCoord4x", "(IIIII)V", (void *) android_glMultiTexCoord4x__IIIII },
6445{"glNormal3f", "(FFF)V", (void *) android_glNormal3f__FFF },
6446{"glNormal3x", "(III)V", (void *) android_glNormal3x__III },
6447{"glNormalPointerBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glNormalPointerBounds__IILjava_nio_Buffer_2I },
6448{"glOrthof", "(FFFFFF)V", (void *) android_glOrthof__FFFFFF },
6449{"glOrthox", "(IIIIII)V", (void *) android_glOrthox__IIIIII },
6450{"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II },
6451{"glPointSize", "(F)V", (void *) android_glPointSize__F },
6452{"glPointSizex", "(I)V", (void *) android_glPointSizex__I },
6453{"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF },
6454{"glPolygonOffsetx", "(II)V", (void *) android_glPolygonOffsetx__II },
6455{"glPopMatrix", "()V", (void *) android_glPopMatrix__ },
6456{"glPushMatrix", "()V", (void *) android_glPushMatrix__ },
6457{"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 },
6458{"glRotatef", "(FFFF)V", (void *) android_glRotatef__FFFF },
6459{"glRotatex", "(IIII)V", (void *) android_glRotatex__IIII },
6460{"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ },
6461{"glSampleCoveragex", "(IZ)V", (void *) android_glSampleCoveragex__IZ },
6462{"glScalef", "(FFF)V", (void *) android_glScalef__FFF },
6463{"glScalex", "(III)V", (void *) android_glScalex__III },
6464{"glScissor", "(IIII)V", (void *) android_glScissor__IIII },
6465{"glShadeModel", "(I)V", (void *) android_glShadeModel__I },
6466{"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III },
6467{"glStencilMask", "(I)V", (void *) android_glStencilMask__I },
6468{"glStencilOp", "(III)V", (void *) android_glStencilOp__III },
6469{"glTexCoordPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I },
6470{"glTexEnvf", "(IIF)V", (void *) android_glTexEnvf__IIF },
6471{"glTexEnvfv", "(II[FI)V", (void *) android_glTexEnvfv__II_3FI },
6472{"glTexEnvfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexEnvfv__IILjava_nio_FloatBuffer_2 },
6473{"glTexEnvx", "(III)V", (void *) android_glTexEnvx__III },
6474{"glTexEnvxv", "(II[II)V", (void *) android_glTexEnvxv__II_3II },
6475{"glTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxv__IILjava_nio_IntBuffer_2 },
6476{"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 },
6477{"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF },
6478{"glTexParameterx", "(III)V", (void *) android_glTexParameterx__III },
6479{"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6480{"glTranslatef", "(FFF)V", (void *) android_glTranslatef__FFF },
6481{"glTranslatex", "(III)V", (void *) android_glTranslatex__III },
6482{"glVertexPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glVertexPointerBounds__IIILjava_nio_Buffer_2I },
6483{"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
6484{"glQueryMatrixxOES", "([II[II)I", (void *) android_glQueryMatrixxOES___3II_3II },
6485{"glQueryMatrixxOES", "(Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)I", (void *) android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
6486{"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II },
6487{"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I },
6488{"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 },
6489{"glClipPlanef", "(I[FI)V", (void *) android_glClipPlanef__I_3FI },
6490{"glClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanef__ILjava_nio_FloatBuffer_2 },
6491{"glClipPlanex", "(I[II)V", (void *) android_glClipPlanex__I_3II },
6492{"glClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanex__ILjava_nio_IntBuffer_2 },
6493{"glColor4ub", "(BBBB)V", (void *) android_glColor4ub__BBBB },
6494{"glColorPointer", "(IIII)V", (void *) android_glColorPointer__IIII },
6495{"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II },
6496{"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 },
6497{"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
6498{"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II },
6499{"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 },
6500{"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI },
6501{"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 },
6502{"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II },
6503{"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 },
6504{"glGetClipPlanef", "(I[FI)V", (void *) android_glGetClipPlanef__I_3FI },
6505{"glGetClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 },
6506{"glGetClipPlanex", "(I[II)V", (void *) android_glGetClipPlanex__I_3II },
6507{"glGetClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanex__ILjava_nio_IntBuffer_2 },
6508{"glGetFixedv", "(I[II)V", (void *) android_glGetFixedv__I_3II },
6509{"glGetFixedv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedv__ILjava_nio_IntBuffer_2 },
6510{"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI },
6511{"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 },
6512{"glGetLightfv", "(II[FI)V", (void *) android_glGetLightfv__II_3FI },
6513{"glGetLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetLightfv__IILjava_nio_FloatBuffer_2 },
6514{"glGetLightxv", "(II[II)V", (void *) android_glGetLightxv__II_3II },
6515{"glGetLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxv__IILjava_nio_IntBuffer_2 },
6516{"glGetMaterialfv", "(II[FI)V", (void *) android_glGetMaterialfv__II_3FI },
6517{"glGetMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 },
6518{"glGetMaterialxv", "(II[II)V", (void *) android_glGetMaterialxv__II_3II },
6519{"glGetMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxv__IILjava_nio_IntBuffer_2 },
6520{"glGetTexEnviv", "(II[II)V", (void *) android_glGetTexEnviv__II_3II },
6521{"glGetTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnviv__IILjava_nio_IntBuffer_2 },
6522{"glGetTexEnvxv", "(II[II)V", (void *) android_glGetTexEnvxv__II_3II },
6523{"glGetTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 },
6524{"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI },
6525{"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 },
6526{"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II },
6527{"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 },
6528{"glGetTexParameterxv", "(II[II)V", (void *) android_glGetTexParameterxv__II_3II },
6529{"glGetTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 },
6530{"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I },
6531{"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I },
6532{"glIsTexture", "(I)Z", (void *) android_glIsTexture__I },
6533{"glNormalPointer", "(III)V", (void *) android_glNormalPointer__III },
6534{"glPointParameterf", "(IF)V", (void *) android_glPointParameterf__IF },
6535{"glPointParameterfv", "(I[FI)V", (void *) android_glPointParameterfv__I_3FI },
6536{"glPointParameterfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glPointParameterfv__ILjava_nio_FloatBuffer_2 },
6537{"glPointParameterx", "(II)V", (void *) android_glPointParameterx__II },
6538{"glPointParameterxv", "(I[II)V", (void *) android_glPointParameterxv__I_3II },
6539{"glPointParameterxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxv__ILjava_nio_IntBuffer_2 },
6540{"glPointSizePointerOES", "(IILjava/nio/Buffer;)V", (void *) android_glPointSizePointerOES__IILjava_nio_Buffer_2 },
6541{"glTexCoordPointer", "(IIII)V", (void *) android_glTexCoordPointer__IIII },
6542{"glTexEnvi", "(III)V", (void *) android_glTexEnvi__III },
6543{"glTexEnviv", "(II[II)V", (void *) android_glTexEnviv__II_3II },
6544{"glTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnviv__IILjava_nio_IntBuffer_2 },
6545{"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI },
6546{"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 },
6547{"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III },
6548{"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II },
6549{"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 },
6550{"glTexParameterxv", "(II[II)V", (void *) android_glTexParameterxv__II_3II },
6551{"glTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxv__IILjava_nio_IntBuffer_2 },
6552{"glVertexPointer", "(IIII)V", (void *) android_glVertexPointer__IIII },
6553{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
6554{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
6555{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
6556{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
6557{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
6558{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
6559{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
6560{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
6561{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
6562{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
6563{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
6564{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
6565{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
6566{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
6567{"glMatrixIndexPointerOES", "(IIILjava/nio/Buffer;)V", (void *) android_glMatrixIndexPointerOES__IIILjava_nio_Buffer_2 },
6568{"glMatrixIndexPointerOES", "(IIII)V", (void *) android_glMatrixIndexPointerOES__IIII },
6569{"glWeightPointerOES", "(IIILjava/nio/Buffer;)V", (void *) android_glWeightPointerOES__IIILjava_nio_Buffer_2 },
6570{"glWeightPointerOES", "(IIII)V", (void *) android_glWeightPointerOES__IIII },
6571{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
6572{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
6573{"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I },
6574{"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II },
6575{"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII },
6576{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
6577{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
6578{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
6579{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
6580{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
6581{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
6582{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
6583{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
6584{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
6585{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
6586{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
6587{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
6588{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
6589{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
6590{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
6591{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
6592{"glGetTexGenfv", "(II[FI)V", (void *) android_glGetTexGenfv__II_3FI },
6593{"glGetTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 },
6594{"glGetTexGeniv", "(II[II)V", (void *) android_glGetTexGeniv__II_3II },
6595{"glGetTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGeniv__IILjava_nio_IntBuffer_2 },
6596{"glGetTexGenxv", "(II[II)V", (void *) android_glGetTexGenxv__II_3II },
6597{"glGetTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxv__IILjava_nio_IntBuffer_2 },
6598{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
6599{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
6600{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
6601{"glTexGenf", "(IIF)V", (void *) android_glTexGenf__IIF },
6602{"glTexGenfv", "(II[FI)V", (void *) android_glTexGenfv__II_3FI },
6603{"glTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfv__IILjava_nio_FloatBuffer_2 },
6604{"glTexGeni", "(III)V", (void *) android_glTexGeni__III },
6605{"glTexGeniv", "(II[II)V", (void *) android_glTexGeniv__II_3II },
6606{"glTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGeniv__IILjava_nio_IntBuffer_2 },
6607{"glTexGenx", "(III)V", (void *) android_glTexGenx__III },
6608{"glTexGenxv", "(II[II)V", (void *) android_glTexGenxv__II_3II },
6609{"glTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxv__IILjava_nio_IntBuffer_2 },
6610};
6611
6612int register_com_google_android_gles_jni_GLImpl(JNIEnv *_env)
6613{
6614    int err;
6615    err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
6616    return err;
6617}
6618