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