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