com_google_android_gles_jni_GLImpl.cpp revision f013e1afd1e68af5e3b868c26a653bbfb39538f8
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
48void
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 ) */
1657jstring
1658android_glGetString
1659  (JNIEnv *_env, jobject _this, jint name) {
1660    const char * chars = (const char *)glGetString((GLenum)name);
1661    jstring output = _env->NewStringUTF(chars);
1662    return output;
1663}
1664/* void glHint ( GLenum target, GLenum mode ) */
1665static void
1666android_glHint__II
1667  (JNIEnv *_env, jobject _this, jint target, jint mode) {
1668    glHint(
1669        (GLenum)target,
1670        (GLenum)mode
1671    );
1672}
1673
1674/* void glLightModelf ( GLenum pname, GLfloat param ) */
1675static void
1676android_glLightModelf__IF
1677  (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
1678    glLightModelf(
1679        (GLenum)pname,
1680        (GLfloat)param
1681    );
1682}
1683
1684/* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
1685static void
1686android_glLightModelfv__I_3FI
1687  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
1688    GLfloat *params_base = (GLfloat *) 0;
1689    jint _remaining;
1690    GLfloat *params = (GLfloat *) 0;
1691
1692    if (!params_ref) {
1693        _env->ThrowNew(IAEClass, "params == null");
1694        goto exit;
1695    }
1696    if (offset < 0) {
1697        _env->ThrowNew(IAEClass, "offset < 0");
1698        goto exit;
1699    }
1700    _remaining = _env->GetArrayLength(params_ref) - offset;
1701    int _needed;
1702    switch (pname) {
1703#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1704        case GL_LIGHT_MODEL_TWO_SIDE:
1705#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1706            _needed = 1;
1707            break;
1708#if defined(GL_LIGHT_MODEL_AMBIENT)
1709        case GL_LIGHT_MODEL_AMBIENT:
1710#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1711            _needed = 4;
1712            break;
1713        default:
1714            _needed = 0;
1715            break;
1716    }
1717    if (_remaining < _needed) {
1718        _env->ThrowNew(IAEClass, "length - offset < needed");
1719        goto exit;
1720    }
1721    params_base = (GLfloat *)
1722        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1723    params = params_base + offset;
1724
1725    glLightModelfv(
1726        (GLenum)pname,
1727        (GLfloat *)params
1728    );
1729
1730exit:
1731    if (params_base) {
1732        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1733            JNI_ABORT);
1734    }
1735}
1736
1737/* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
1738static void
1739android_glLightModelfv__ILjava_nio_FloatBuffer_2
1740  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1741    jarray _array = (jarray) 0;
1742    jint _remaining;
1743    GLfloat *params = (GLfloat *) 0;
1744
1745    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
1746    int _needed;
1747    switch (pname) {
1748#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1749        case GL_LIGHT_MODEL_TWO_SIDE:
1750#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1751            _needed = 1;
1752            break;
1753#if defined(GL_LIGHT_MODEL_AMBIENT)
1754        case GL_LIGHT_MODEL_AMBIENT:
1755#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1756            _needed = 4;
1757            break;
1758        default:
1759            _needed = 0;
1760            break;
1761    }
1762    if (_remaining < _needed) {
1763        _env->ThrowNew(IAEClass, "remaining() < needed");
1764        goto exit;
1765    }
1766    glLightModelfv(
1767        (GLenum)pname,
1768        (GLfloat *)params
1769    );
1770
1771exit:
1772    if (_array) {
1773        releasePointer(_env, _array, params, JNI_FALSE);
1774    }
1775}
1776
1777/* void glLightModelx ( GLenum pname, GLfixed param ) */
1778static void
1779android_glLightModelx__II
1780  (JNIEnv *_env, jobject _this, jint pname, jint param) {
1781    glLightModelx(
1782        (GLenum)pname,
1783        (GLfixed)param
1784    );
1785}
1786
1787/* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
1788static void
1789android_glLightModelxv__I_3II
1790  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
1791    GLfixed *params_base = (GLfixed *) 0;
1792    jint _remaining;
1793    GLfixed *params = (GLfixed *) 0;
1794
1795    if (!params_ref) {
1796        _env->ThrowNew(IAEClass, "params == null");
1797        goto exit;
1798    }
1799    if (offset < 0) {
1800        _env->ThrowNew(IAEClass, "offset < 0");
1801        goto exit;
1802    }
1803    _remaining = _env->GetArrayLength(params_ref) - offset;
1804    int _needed;
1805    switch (pname) {
1806#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1807        case GL_LIGHT_MODEL_TWO_SIDE:
1808#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1809            _needed = 1;
1810            break;
1811#if defined(GL_LIGHT_MODEL_AMBIENT)
1812        case GL_LIGHT_MODEL_AMBIENT:
1813#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1814            _needed = 4;
1815            break;
1816        default:
1817            _needed = 0;
1818            break;
1819    }
1820    if (_remaining < _needed) {
1821        _env->ThrowNew(IAEClass, "length - offset < needed");
1822        goto exit;
1823    }
1824    params_base = (GLfixed *)
1825        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1826    params = params_base + offset;
1827
1828    glLightModelxv(
1829        (GLenum)pname,
1830        (GLfixed *)params
1831    );
1832
1833exit:
1834    if (params_base) {
1835        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1836            JNI_ABORT);
1837    }
1838}
1839
1840/* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
1841static void
1842android_glLightModelxv__ILjava_nio_IntBuffer_2
1843  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1844    jarray _array = (jarray) 0;
1845    jint _remaining;
1846    GLfixed *params = (GLfixed *) 0;
1847
1848    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1849    int _needed;
1850    switch (pname) {
1851#if defined(GL_LIGHT_MODEL_TWO_SIDE)
1852        case GL_LIGHT_MODEL_TWO_SIDE:
1853#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1854            _needed = 1;
1855            break;
1856#if defined(GL_LIGHT_MODEL_AMBIENT)
1857        case GL_LIGHT_MODEL_AMBIENT:
1858#endif // defined(GL_LIGHT_MODEL_AMBIENT)
1859            _needed = 4;
1860            break;
1861        default:
1862            _needed = 0;
1863            break;
1864    }
1865    if (_remaining < _needed) {
1866        _env->ThrowNew(IAEClass, "remaining() < needed");
1867        goto exit;
1868    }
1869    glLightModelxv(
1870        (GLenum)pname,
1871        (GLfixed *)params
1872    );
1873
1874exit:
1875    if (_array) {
1876        releasePointer(_env, _array, params, JNI_FALSE);
1877    }
1878}
1879
1880/* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */
1881static void
1882android_glLightf__IIF
1883  (JNIEnv *_env, jobject _this, jint light, jint pname, jfloat param) {
1884    glLightf(
1885        (GLenum)light,
1886        (GLenum)pname,
1887        (GLfloat)param
1888    );
1889}
1890
1891/* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
1892static void
1893android_glLightfv__II_3FI
1894  (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
1895    GLfloat *params_base = (GLfloat *) 0;
1896    jint _remaining;
1897    GLfloat *params = (GLfloat *) 0;
1898
1899    if (!params_ref) {
1900        _env->ThrowNew(IAEClass, "params == null");
1901        goto exit;
1902    }
1903    if (offset < 0) {
1904        _env->ThrowNew(IAEClass, "offset < 0");
1905        goto exit;
1906    }
1907    _remaining = _env->GetArrayLength(params_ref) - offset;
1908    int _needed;
1909    switch (pname) {
1910#if defined(GL_SPOT_EXPONENT)
1911        case GL_SPOT_EXPONENT:
1912#endif // defined(GL_SPOT_EXPONENT)
1913#if defined(GL_SPOT_CUTOFF)
1914        case GL_SPOT_CUTOFF:
1915#endif // defined(GL_SPOT_CUTOFF)
1916#if defined(GL_CONSTANT_ATTENUATION)
1917        case GL_CONSTANT_ATTENUATION:
1918#endif // defined(GL_CONSTANT_ATTENUATION)
1919#if defined(GL_LINEAR_ATTENUATION)
1920        case GL_LINEAR_ATTENUATION:
1921#endif // defined(GL_LINEAR_ATTENUATION)
1922#if defined(GL_QUADRATIC_ATTENUATION)
1923        case GL_QUADRATIC_ATTENUATION:
1924#endif // defined(GL_QUADRATIC_ATTENUATION)
1925            _needed = 1;
1926            break;
1927#if defined(GL_SPOT_DIRECTION)
1928        case GL_SPOT_DIRECTION:
1929#endif // defined(GL_SPOT_DIRECTION)
1930            _needed = 3;
1931            break;
1932#if defined(GL_AMBIENT)
1933        case GL_AMBIENT:
1934#endif // defined(GL_AMBIENT)
1935#if defined(GL_DIFFUSE)
1936        case GL_DIFFUSE:
1937#endif // defined(GL_DIFFUSE)
1938#if defined(GL_SPECULAR)
1939        case GL_SPECULAR:
1940#endif // defined(GL_SPECULAR)
1941#if defined(GL_EMISSION)
1942        case GL_EMISSION:
1943#endif // defined(GL_EMISSION)
1944            _needed = 4;
1945            break;
1946        default:
1947            _needed = 0;
1948            break;
1949    }
1950    if (_remaining < _needed) {
1951        _env->ThrowNew(IAEClass, "length - offset < needed");
1952        goto exit;
1953    }
1954    params_base = (GLfloat *)
1955        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1956    params = params_base + offset;
1957
1958    glLightfv(
1959        (GLenum)light,
1960        (GLenum)pname,
1961        (GLfloat *)params
1962    );
1963
1964exit:
1965    if (params_base) {
1966        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1967            JNI_ABORT);
1968    }
1969}
1970
1971/* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
1972static void
1973android_glLightfv__IILjava_nio_FloatBuffer_2
1974  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
1975    jarray _array = (jarray) 0;
1976    jint _remaining;
1977    GLfloat *params = (GLfloat *) 0;
1978
1979    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
1980    int _needed;
1981    switch (pname) {
1982#if defined(GL_SPOT_EXPONENT)
1983        case GL_SPOT_EXPONENT:
1984#endif // defined(GL_SPOT_EXPONENT)
1985#if defined(GL_SPOT_CUTOFF)
1986        case GL_SPOT_CUTOFF:
1987#endif // defined(GL_SPOT_CUTOFF)
1988#if defined(GL_CONSTANT_ATTENUATION)
1989        case GL_CONSTANT_ATTENUATION:
1990#endif // defined(GL_CONSTANT_ATTENUATION)
1991#if defined(GL_LINEAR_ATTENUATION)
1992        case GL_LINEAR_ATTENUATION:
1993#endif // defined(GL_LINEAR_ATTENUATION)
1994#if defined(GL_QUADRATIC_ATTENUATION)
1995        case GL_QUADRATIC_ATTENUATION:
1996#endif // defined(GL_QUADRATIC_ATTENUATION)
1997            _needed = 1;
1998            break;
1999#if defined(GL_SPOT_DIRECTION)
2000        case GL_SPOT_DIRECTION:
2001#endif // defined(GL_SPOT_DIRECTION)
2002            _needed = 3;
2003            break;
2004#if defined(GL_AMBIENT)
2005        case GL_AMBIENT:
2006#endif // defined(GL_AMBIENT)
2007#if defined(GL_DIFFUSE)
2008        case GL_DIFFUSE:
2009#endif // defined(GL_DIFFUSE)
2010#if defined(GL_SPECULAR)
2011        case GL_SPECULAR:
2012#endif // defined(GL_SPECULAR)
2013#if defined(GL_EMISSION)
2014        case GL_EMISSION:
2015#endif // defined(GL_EMISSION)
2016            _needed = 4;
2017            break;
2018        default:
2019            _needed = 0;
2020            break;
2021    }
2022    if (_remaining < _needed) {
2023        _env->ThrowNew(IAEClass, "remaining() < needed");
2024        goto exit;
2025    }
2026    glLightfv(
2027        (GLenum)light,
2028        (GLenum)pname,
2029        (GLfloat *)params
2030    );
2031
2032exit:
2033    if (_array) {
2034        releasePointer(_env, _array, params, JNI_FALSE);
2035    }
2036}
2037
2038/* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */
2039static void
2040android_glLightx__III
2041  (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
2042    glLightx(
2043        (GLenum)light,
2044        (GLenum)pname,
2045        (GLfixed)param
2046    );
2047}
2048
2049/* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
2050static void
2051android_glLightxv__II_3II
2052  (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
2053    GLfixed *params_base = (GLfixed *) 0;
2054    jint _remaining;
2055    GLfixed *params = (GLfixed *) 0;
2056
2057    if (!params_ref) {
2058        _env->ThrowNew(IAEClass, "params == null");
2059        goto exit;
2060    }
2061    if (offset < 0) {
2062        _env->ThrowNew(IAEClass, "offset < 0");
2063        goto exit;
2064    }
2065    _remaining = _env->GetArrayLength(params_ref) - offset;
2066    int _needed;
2067    switch (pname) {
2068#if defined(GL_SPOT_EXPONENT)
2069        case GL_SPOT_EXPONENT:
2070#endif // defined(GL_SPOT_EXPONENT)
2071#if defined(GL_SPOT_CUTOFF)
2072        case GL_SPOT_CUTOFF:
2073#endif // defined(GL_SPOT_CUTOFF)
2074#if defined(GL_CONSTANT_ATTENUATION)
2075        case GL_CONSTANT_ATTENUATION:
2076#endif // defined(GL_CONSTANT_ATTENUATION)
2077#if defined(GL_LINEAR_ATTENUATION)
2078        case GL_LINEAR_ATTENUATION:
2079#endif // defined(GL_LINEAR_ATTENUATION)
2080#if defined(GL_QUADRATIC_ATTENUATION)
2081        case GL_QUADRATIC_ATTENUATION:
2082#endif // defined(GL_QUADRATIC_ATTENUATION)
2083            _needed = 1;
2084            break;
2085#if defined(GL_SPOT_DIRECTION)
2086        case GL_SPOT_DIRECTION:
2087#endif // defined(GL_SPOT_DIRECTION)
2088            _needed = 3;
2089            break;
2090#if defined(GL_AMBIENT)
2091        case GL_AMBIENT:
2092#endif // defined(GL_AMBIENT)
2093#if defined(GL_DIFFUSE)
2094        case GL_DIFFUSE:
2095#endif // defined(GL_DIFFUSE)
2096#if defined(GL_SPECULAR)
2097        case GL_SPECULAR:
2098#endif // defined(GL_SPECULAR)
2099#if defined(GL_EMISSION)
2100        case GL_EMISSION:
2101#endif // defined(GL_EMISSION)
2102            _needed = 4;
2103            break;
2104        default:
2105            _needed = 0;
2106            break;
2107    }
2108    if (_remaining < _needed) {
2109        _env->ThrowNew(IAEClass, "length - offset < needed");
2110        goto exit;
2111    }
2112    params_base = (GLfixed *)
2113        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2114    params = params_base + offset;
2115
2116    glLightxv(
2117        (GLenum)light,
2118        (GLenum)pname,
2119        (GLfixed *)params
2120    );
2121
2122exit:
2123    if (params_base) {
2124        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2125            JNI_ABORT);
2126    }
2127}
2128
2129/* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
2130static void
2131android_glLightxv__IILjava_nio_IntBuffer_2
2132  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
2133    jarray _array = (jarray) 0;
2134    jint _remaining;
2135    GLfixed *params = (GLfixed *) 0;
2136
2137    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
2138    int _needed;
2139    switch (pname) {
2140#if defined(GL_SPOT_EXPONENT)
2141        case GL_SPOT_EXPONENT:
2142#endif // defined(GL_SPOT_EXPONENT)
2143#if defined(GL_SPOT_CUTOFF)
2144        case GL_SPOT_CUTOFF:
2145#endif // defined(GL_SPOT_CUTOFF)
2146#if defined(GL_CONSTANT_ATTENUATION)
2147        case GL_CONSTANT_ATTENUATION:
2148#endif // defined(GL_CONSTANT_ATTENUATION)
2149#if defined(GL_LINEAR_ATTENUATION)
2150        case GL_LINEAR_ATTENUATION:
2151#endif // defined(GL_LINEAR_ATTENUATION)
2152#if defined(GL_QUADRATIC_ATTENUATION)
2153        case GL_QUADRATIC_ATTENUATION:
2154#endif // defined(GL_QUADRATIC_ATTENUATION)
2155            _needed = 1;
2156            break;
2157#if defined(GL_SPOT_DIRECTION)
2158        case GL_SPOT_DIRECTION:
2159#endif // defined(GL_SPOT_DIRECTION)
2160            _needed = 3;
2161            break;
2162#if defined(GL_AMBIENT)
2163        case GL_AMBIENT:
2164#endif // defined(GL_AMBIENT)
2165#if defined(GL_DIFFUSE)
2166        case GL_DIFFUSE:
2167#endif // defined(GL_DIFFUSE)
2168#if defined(GL_SPECULAR)
2169        case GL_SPECULAR:
2170#endif // defined(GL_SPECULAR)
2171#if defined(GL_EMISSION)
2172        case GL_EMISSION:
2173#endif // defined(GL_EMISSION)
2174            _needed = 4;
2175            break;
2176        default:
2177            _needed = 0;
2178            break;
2179    }
2180    if (_remaining < _needed) {
2181        _env->ThrowNew(IAEClass, "remaining() < needed");
2182        goto exit;
2183    }
2184    glLightxv(
2185        (GLenum)light,
2186        (GLenum)pname,
2187        (GLfixed *)params
2188    );
2189
2190exit:
2191    if (_array) {
2192        releasePointer(_env, _array, params, JNI_FALSE);
2193    }
2194}
2195
2196/* void glLineWidth ( GLfloat width ) */
2197static void
2198android_glLineWidth__F
2199  (JNIEnv *_env, jobject _this, jfloat width) {
2200    glLineWidth(
2201        (GLfloat)width
2202    );
2203}
2204
2205/* void glLineWidthx ( GLfixed width ) */
2206static void
2207android_glLineWidthx__I
2208  (JNIEnv *_env, jobject _this, jint width) {
2209    glLineWidthx(
2210        (GLfixed)width
2211    );
2212}
2213
2214/* void glLoadIdentity ( void ) */
2215static void
2216android_glLoadIdentity__
2217  (JNIEnv *_env, jobject _this) {
2218    glLoadIdentity();
2219}
2220
2221/* void glLoadMatrixf ( const GLfloat *m ) */
2222static void
2223android_glLoadMatrixf___3FI
2224  (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
2225    GLfloat *m_base = (GLfloat *) 0;
2226    jint _remaining;
2227    GLfloat *m = (GLfloat *) 0;
2228
2229    if (!m_ref) {
2230        _env->ThrowNew(IAEClass, "m == null");
2231        goto exit;
2232    }
2233    if (offset < 0) {
2234        _env->ThrowNew(IAEClass, "offset < 0");
2235        goto exit;
2236    }
2237    _remaining = _env->GetArrayLength(m_ref) - offset;
2238    m_base = (GLfloat *)
2239        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2240    m = m_base + offset;
2241
2242    glLoadMatrixf(
2243        (GLfloat *)m
2244    );
2245
2246exit:
2247    if (m_base) {
2248        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2249            JNI_ABORT);
2250    }
2251}
2252
2253/* void glLoadMatrixf ( const GLfloat *m ) */
2254static void
2255android_glLoadMatrixf__Ljava_nio_FloatBuffer_2
2256  (JNIEnv *_env, jobject _this, jobject m_buf) {
2257    jarray _array = (jarray) 0;
2258    jint _remaining;
2259    GLfloat *m = (GLfloat *) 0;
2260
2261    m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
2262    glLoadMatrixf(
2263        (GLfloat *)m
2264    );
2265    if (_array) {
2266        releasePointer(_env, _array, m, JNI_FALSE);
2267    }
2268}
2269
2270/* void glLoadMatrixx ( const GLfixed *m ) */
2271static void
2272android_glLoadMatrixx___3II
2273  (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
2274    GLfixed *m_base = (GLfixed *) 0;
2275    jint _remaining;
2276    GLfixed *m = (GLfixed *) 0;
2277
2278    if (!m_ref) {
2279        _env->ThrowNew(IAEClass, "m == null");
2280        goto exit;
2281    }
2282    if (offset < 0) {
2283        _env->ThrowNew(IAEClass, "offset < 0");
2284        goto exit;
2285    }
2286    _remaining = _env->GetArrayLength(m_ref) - offset;
2287    m_base = (GLfixed *)
2288        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2289    m = m_base + offset;
2290
2291    glLoadMatrixx(
2292        (GLfixed *)m
2293    );
2294
2295exit:
2296    if (m_base) {
2297        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2298            JNI_ABORT);
2299    }
2300}
2301
2302/* void glLoadMatrixx ( const GLfixed *m ) */
2303static void
2304android_glLoadMatrixx__Ljava_nio_IntBuffer_2
2305  (JNIEnv *_env, jobject _this, jobject m_buf) {
2306    jarray _array = (jarray) 0;
2307    jint _remaining;
2308    GLfixed *m = (GLfixed *) 0;
2309
2310    m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
2311    glLoadMatrixx(
2312        (GLfixed *)m
2313    );
2314    if (_array) {
2315        releasePointer(_env, _array, m, JNI_FALSE);
2316    }
2317}
2318
2319/* void glLogicOp ( GLenum opcode ) */
2320static void
2321android_glLogicOp__I
2322  (JNIEnv *_env, jobject _this, jint opcode) {
2323    glLogicOp(
2324        (GLenum)opcode
2325    );
2326}
2327
2328/* void glMaterialf ( GLenum face, GLenum pname, GLfloat param ) */
2329static void
2330android_glMaterialf__IIF
2331  (JNIEnv *_env, jobject _this, jint face, jint pname, jfloat param) {
2332    glMaterialf(
2333        (GLenum)face,
2334        (GLenum)pname,
2335        (GLfloat)param
2336    );
2337}
2338
2339/* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
2340static void
2341android_glMaterialfv__II_3FI
2342  (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
2343    GLfloat *params_base = (GLfloat *) 0;
2344    jint _remaining;
2345    GLfloat *params = (GLfloat *) 0;
2346
2347    if (!params_ref) {
2348        _env->ThrowNew(IAEClass, "params == null");
2349        goto exit;
2350    }
2351    if (offset < 0) {
2352        _env->ThrowNew(IAEClass, "offset < 0");
2353        goto exit;
2354    }
2355    _remaining = _env->GetArrayLength(params_ref) - offset;
2356    int _needed;
2357    switch (pname) {
2358#if defined(GL_SHININESS)
2359        case GL_SHININESS:
2360#endif // defined(GL_SHININESS)
2361            _needed = 1;
2362            break;
2363#if defined(GL_AMBIENT)
2364        case GL_AMBIENT:
2365#endif // defined(GL_AMBIENT)
2366#if defined(GL_DIFFUSE)
2367        case GL_DIFFUSE:
2368#endif // defined(GL_DIFFUSE)
2369#if defined(GL_SPECULAR)
2370        case GL_SPECULAR:
2371#endif // defined(GL_SPECULAR)
2372#if defined(GL_EMISSION)
2373        case GL_EMISSION:
2374#endif // defined(GL_EMISSION)
2375#if defined(GL_AMBIENT_AND_DIFFUSE)
2376        case GL_AMBIENT_AND_DIFFUSE:
2377#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2378            _needed = 4;
2379            break;
2380        default:
2381            _needed = 0;
2382            break;
2383    }
2384    if (_remaining < _needed) {
2385        _env->ThrowNew(IAEClass, "length - offset < needed");
2386        goto exit;
2387    }
2388    params_base = (GLfloat *)
2389        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2390    params = params_base + offset;
2391
2392    glMaterialfv(
2393        (GLenum)face,
2394        (GLenum)pname,
2395        (GLfloat *)params
2396    );
2397
2398exit:
2399    if (params_base) {
2400        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2401            JNI_ABORT);
2402    }
2403}
2404
2405/* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
2406static void
2407android_glMaterialfv__IILjava_nio_FloatBuffer_2
2408  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
2409    jarray _array = (jarray) 0;
2410    jint _remaining;
2411    GLfloat *params = (GLfloat *) 0;
2412
2413    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2414    int _needed;
2415    switch (pname) {
2416#if defined(GL_SHININESS)
2417        case GL_SHININESS:
2418#endif // defined(GL_SHININESS)
2419            _needed = 1;
2420            break;
2421#if defined(GL_AMBIENT)
2422        case GL_AMBIENT:
2423#endif // defined(GL_AMBIENT)
2424#if defined(GL_DIFFUSE)
2425        case GL_DIFFUSE:
2426#endif // defined(GL_DIFFUSE)
2427#if defined(GL_SPECULAR)
2428        case GL_SPECULAR:
2429#endif // defined(GL_SPECULAR)
2430#if defined(GL_EMISSION)
2431        case GL_EMISSION:
2432#endif // defined(GL_EMISSION)
2433#if defined(GL_AMBIENT_AND_DIFFUSE)
2434        case GL_AMBIENT_AND_DIFFUSE:
2435#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2436            _needed = 4;
2437            break;
2438        default:
2439            _needed = 0;
2440            break;
2441    }
2442    if (_remaining < _needed) {
2443        _env->ThrowNew(IAEClass, "remaining() < needed");
2444        goto exit;
2445    }
2446    glMaterialfv(
2447        (GLenum)face,
2448        (GLenum)pname,
2449        (GLfloat *)params
2450    );
2451
2452exit:
2453    if (_array) {
2454        releasePointer(_env, _array, params, JNI_FALSE);
2455    }
2456}
2457
2458/* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */
2459static void
2460android_glMaterialx__III
2461  (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
2462    glMaterialx(
2463        (GLenum)face,
2464        (GLenum)pname,
2465        (GLfixed)param
2466    );
2467}
2468
2469/* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
2470static void
2471android_glMaterialxv__II_3II
2472  (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
2473    GLfixed *params_base = (GLfixed *) 0;
2474    jint _remaining;
2475    GLfixed *params = (GLfixed *) 0;
2476
2477    if (!params_ref) {
2478        _env->ThrowNew(IAEClass, "params == null");
2479        goto exit;
2480    }
2481    if (offset < 0) {
2482        _env->ThrowNew(IAEClass, "offset < 0");
2483        goto exit;
2484    }
2485    _remaining = _env->GetArrayLength(params_ref) - offset;
2486    int _needed;
2487    switch (pname) {
2488#if defined(GL_SHININESS)
2489        case GL_SHININESS:
2490#endif // defined(GL_SHININESS)
2491            _needed = 1;
2492            break;
2493#if defined(GL_AMBIENT)
2494        case GL_AMBIENT:
2495#endif // defined(GL_AMBIENT)
2496#if defined(GL_DIFFUSE)
2497        case GL_DIFFUSE:
2498#endif // defined(GL_DIFFUSE)
2499#if defined(GL_SPECULAR)
2500        case GL_SPECULAR:
2501#endif // defined(GL_SPECULAR)
2502#if defined(GL_EMISSION)
2503        case GL_EMISSION:
2504#endif // defined(GL_EMISSION)
2505#if defined(GL_AMBIENT_AND_DIFFUSE)
2506        case GL_AMBIENT_AND_DIFFUSE:
2507#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2508            _needed = 4;
2509            break;
2510        default:
2511            _needed = 0;
2512            break;
2513    }
2514    if (_remaining < _needed) {
2515        _env->ThrowNew(IAEClass, "length - offset < needed");
2516        goto exit;
2517    }
2518    params_base = (GLfixed *)
2519        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2520    params = params_base + offset;
2521
2522    glMaterialxv(
2523        (GLenum)face,
2524        (GLenum)pname,
2525        (GLfixed *)params
2526    );
2527
2528exit:
2529    if (params_base) {
2530        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2531            JNI_ABORT);
2532    }
2533}
2534
2535/* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
2536static void
2537android_glMaterialxv__IILjava_nio_IntBuffer_2
2538  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
2539    jarray _array = (jarray) 0;
2540    jint _remaining;
2541    GLfixed *params = (GLfixed *) 0;
2542
2543    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
2544    int _needed;
2545    switch (pname) {
2546#if defined(GL_SHININESS)
2547        case GL_SHININESS:
2548#endif // defined(GL_SHININESS)
2549            _needed = 1;
2550            break;
2551#if defined(GL_AMBIENT)
2552        case GL_AMBIENT:
2553#endif // defined(GL_AMBIENT)
2554#if defined(GL_DIFFUSE)
2555        case GL_DIFFUSE:
2556#endif // defined(GL_DIFFUSE)
2557#if defined(GL_SPECULAR)
2558        case GL_SPECULAR:
2559#endif // defined(GL_SPECULAR)
2560#if defined(GL_EMISSION)
2561        case GL_EMISSION:
2562#endif // defined(GL_EMISSION)
2563#if defined(GL_AMBIENT_AND_DIFFUSE)
2564        case GL_AMBIENT_AND_DIFFUSE:
2565#endif // defined(GL_AMBIENT_AND_DIFFUSE)
2566            _needed = 4;
2567            break;
2568        default:
2569            _needed = 0;
2570            break;
2571    }
2572    if (_remaining < _needed) {
2573        _env->ThrowNew(IAEClass, "remaining() < needed");
2574        goto exit;
2575    }
2576    glMaterialxv(
2577        (GLenum)face,
2578        (GLenum)pname,
2579        (GLfixed *)params
2580    );
2581
2582exit:
2583    if (_array) {
2584        releasePointer(_env, _array, params, JNI_FALSE);
2585    }
2586}
2587
2588/* void glMatrixMode ( GLenum mode ) */
2589static void
2590android_glMatrixMode__I
2591  (JNIEnv *_env, jobject _this, jint mode) {
2592    glMatrixMode(
2593        (GLenum)mode
2594    );
2595}
2596
2597/* void glMultMatrixf ( const GLfloat *m ) */
2598static void
2599android_glMultMatrixf___3FI
2600  (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
2601    GLfloat *m_base = (GLfloat *) 0;
2602    jint _remaining;
2603    GLfloat *m = (GLfloat *) 0;
2604
2605    if (!m_ref) {
2606        _env->ThrowNew(IAEClass, "m == null");
2607        goto exit;
2608    }
2609    if (offset < 0) {
2610        _env->ThrowNew(IAEClass, "offset < 0");
2611        goto exit;
2612    }
2613    _remaining = _env->GetArrayLength(m_ref) - offset;
2614    m_base = (GLfloat *)
2615        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2616    m = m_base + offset;
2617
2618    glMultMatrixf(
2619        (GLfloat *)m
2620    );
2621
2622exit:
2623    if (m_base) {
2624        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2625            JNI_ABORT);
2626    }
2627}
2628
2629/* void glMultMatrixf ( const GLfloat *m ) */
2630static void
2631android_glMultMatrixf__Ljava_nio_FloatBuffer_2
2632  (JNIEnv *_env, jobject _this, jobject m_buf) {
2633    jarray _array = (jarray) 0;
2634    jint _remaining;
2635    GLfloat *m = (GLfloat *) 0;
2636
2637    m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
2638    glMultMatrixf(
2639        (GLfloat *)m
2640    );
2641    if (_array) {
2642        releasePointer(_env, _array, m, JNI_FALSE);
2643    }
2644}
2645
2646/* void glMultMatrixx ( const GLfixed *m ) */
2647static void
2648android_glMultMatrixx___3II
2649  (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
2650    GLfixed *m_base = (GLfixed *) 0;
2651    jint _remaining;
2652    GLfixed *m = (GLfixed *) 0;
2653
2654    if (!m_ref) {
2655        _env->ThrowNew(IAEClass, "m == null");
2656        goto exit;
2657    }
2658    if (offset < 0) {
2659        _env->ThrowNew(IAEClass, "offset < 0");
2660        goto exit;
2661    }
2662    _remaining = _env->GetArrayLength(m_ref) - offset;
2663    m_base = (GLfixed *)
2664        _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
2665    m = m_base + offset;
2666
2667    glMultMatrixx(
2668        (GLfixed *)m
2669    );
2670
2671exit:
2672    if (m_base) {
2673        _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
2674            JNI_ABORT);
2675    }
2676}
2677
2678/* void glMultMatrixx ( const GLfixed *m ) */
2679static void
2680android_glMultMatrixx__Ljava_nio_IntBuffer_2
2681  (JNIEnv *_env, jobject _this, jobject m_buf) {
2682    jarray _array = (jarray) 0;
2683    jint _remaining;
2684    GLfixed *m = (GLfixed *) 0;
2685
2686    m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
2687    glMultMatrixx(
2688        (GLfixed *)m
2689    );
2690    if (_array) {
2691        releasePointer(_env, _array, m, JNI_FALSE);
2692    }
2693}
2694
2695/* void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) */
2696static void
2697android_glMultiTexCoord4f__IFFFF
2698  (JNIEnv *_env, jobject _this, jint target, jfloat s, jfloat t, jfloat r, jfloat q) {
2699    glMultiTexCoord4f(
2700        (GLenum)target,
2701        (GLfloat)s,
2702        (GLfloat)t,
2703        (GLfloat)r,
2704        (GLfloat)q
2705    );
2706}
2707
2708/* void glMultiTexCoord4x ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
2709static void
2710android_glMultiTexCoord4x__IIIII
2711  (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
2712    glMultiTexCoord4x(
2713        (GLenum)target,
2714        (GLfixed)s,
2715        (GLfixed)t,
2716        (GLfixed)r,
2717        (GLfixed)q
2718    );
2719}
2720
2721/* void glNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz ) */
2722static void
2723android_glNormal3f__FFF
2724  (JNIEnv *_env, jobject _this, jfloat nx, jfloat ny, jfloat nz) {
2725    glNormal3f(
2726        (GLfloat)nx,
2727        (GLfloat)ny,
2728        (GLfloat)nz
2729    );
2730}
2731
2732/* void glNormal3x ( GLfixed nx, GLfixed ny, GLfixed nz ) */
2733static void
2734android_glNormal3x__III
2735  (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
2736    glNormal3x(
2737        (GLfixed)nx,
2738        (GLfixed)ny,
2739        (GLfixed)nz
2740    );
2741}
2742
2743/* void glNormalPointer ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
2744static void
2745android_glNormalPointerBounds__IILjava_nio_Buffer_2I
2746  (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
2747    jarray _array = (jarray) 0;
2748    jint _remaining;
2749    GLvoid *pointer = (GLvoid *) 0;
2750
2751    pointer = (GLvoid *)getPointer(_env, pointer_buf, &_array, &_remaining);
2752    glNormalPointerBounds(
2753        (GLenum)type,
2754        (GLsizei)stride,
2755        (GLvoid *)pointer,
2756        (GLsizei)remaining
2757    );
2758    if (_array) {
2759        releasePointer(_env, _array, pointer, JNI_FALSE);
2760    }
2761}
2762
2763/* void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2764static void
2765android_glOrthof__FFFFFF
2766  (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
2767    glOrthof(
2768        (GLfloat)left,
2769        (GLfloat)right,
2770        (GLfloat)bottom,
2771        (GLfloat)top,
2772        (GLfloat)zNear,
2773        (GLfloat)zFar
2774    );
2775}
2776
2777/* void glOrthox ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
2778static void
2779android_glOrthox__IIIIII
2780  (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
2781    glOrthox(
2782        (GLfixed)left,
2783        (GLfixed)right,
2784        (GLfixed)bottom,
2785        (GLfixed)top,
2786        (GLfixed)zNear,
2787        (GLfixed)zFar
2788    );
2789}
2790
2791/* void glPixelStorei ( GLenum pname, GLint param ) */
2792static void
2793android_glPixelStorei__II
2794  (JNIEnv *_env, jobject _this, jint pname, jint param) {
2795    glPixelStorei(
2796        (GLenum)pname,
2797        (GLint)param
2798    );
2799}
2800
2801/* void glPointSize ( GLfloat size ) */
2802static void
2803android_glPointSize__F
2804  (JNIEnv *_env, jobject _this, jfloat size) {
2805    glPointSize(
2806        (GLfloat)size
2807    );
2808}
2809
2810/* void glPointSizex ( GLfixed size ) */
2811static void
2812android_glPointSizex__I
2813  (JNIEnv *_env, jobject _this, jint size) {
2814    glPointSizex(
2815        (GLfixed)size
2816    );
2817}
2818
2819/* void glPolygonOffset ( GLfloat factor, GLfloat units ) */
2820static void
2821android_glPolygonOffset__FF
2822  (JNIEnv *_env, jobject _this, jfloat factor, jfloat units) {
2823    glPolygonOffset(
2824        (GLfloat)factor,
2825        (GLfloat)units
2826    );
2827}
2828
2829/* void glPolygonOffsetx ( GLfixed factor, GLfixed units ) */
2830static void
2831android_glPolygonOffsetx__II
2832  (JNIEnv *_env, jobject _this, jint factor, jint units) {
2833    glPolygonOffsetx(
2834        (GLfixed)factor,
2835        (GLfixed)units
2836    );
2837}
2838
2839/* void glPopMatrix ( void ) */
2840static void
2841android_glPopMatrix__
2842  (JNIEnv *_env, jobject _this) {
2843    glPopMatrix();
2844}
2845
2846/* void glPushMatrix ( void ) */
2847static void
2848android_glPushMatrix__
2849  (JNIEnv *_env, jobject _this) {
2850    glPushMatrix();
2851}
2852
2853/* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) */
2854static void
2855android_glReadPixels__IIIIIILjava_nio_Buffer_2
2856  (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
2857    jint _exception = 0;
2858    jarray _array = (jarray) 0;
2859    jint _remaining;
2860    GLvoid *pixels = (GLvoid *) 0;
2861
2862    pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
2863    glReadPixels(
2864        (GLint)x,
2865        (GLint)y,
2866        (GLsizei)width,
2867        (GLsizei)height,
2868        (GLenum)format,
2869        (GLenum)type,
2870        (GLvoid *)pixels
2871    );
2872    if (_array) {
2873        releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
2874    }
2875}
2876
2877/* void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) */
2878static void
2879android_glRotatef__FFFF
2880  (JNIEnv *_env, jobject _this, jfloat angle, jfloat x, jfloat y, jfloat z) {
2881    glRotatef(
2882        (GLfloat)angle,
2883        (GLfloat)x,
2884        (GLfloat)y,
2885        (GLfloat)z
2886    );
2887}
2888
2889/* void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
2890static void
2891android_glRotatex__IIII
2892  (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
2893    glRotatex(
2894        (GLfixed)angle,
2895        (GLfixed)x,
2896        (GLfixed)y,
2897        (GLfixed)z
2898    );
2899}
2900
2901/* void glSampleCoverage ( GLclampf value, GLboolean invert ) */
2902static void
2903android_glSampleCoverage__FZ
2904  (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) {
2905    glSampleCoverage(
2906        (GLclampf)value,
2907        (GLboolean)invert
2908    );
2909}
2910
2911/* void glSampleCoveragex ( GLclampx value, GLboolean invert ) */
2912static void
2913android_glSampleCoveragex__IZ
2914  (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
2915    glSampleCoveragex(
2916        (GLclampx)value,
2917        (GLboolean)invert
2918    );
2919}
2920
2921/* void glScalef ( GLfloat x, GLfloat y, GLfloat z ) */
2922static void
2923android_glScalef__FFF
2924  (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
2925    glScalef(
2926        (GLfloat)x,
2927        (GLfloat)y,
2928        (GLfloat)z
2929    );
2930}
2931
2932/* void glScalex ( GLfixed x, GLfixed y, GLfixed z ) */
2933static void
2934android_glScalex__III
2935  (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
2936    glScalex(
2937        (GLfixed)x,
2938        (GLfixed)y,
2939        (GLfixed)z
2940    );
2941}
2942
2943/* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */
2944static void
2945android_glScissor__IIII
2946  (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
2947    glScissor(
2948        (GLint)x,
2949        (GLint)y,
2950        (GLsizei)width,
2951        (GLsizei)height
2952    );
2953}
2954
2955/* void glShadeModel ( GLenum mode ) */
2956static void
2957android_glShadeModel__I
2958  (JNIEnv *_env, jobject _this, jint mode) {
2959    glShadeModel(
2960        (GLenum)mode
2961    );
2962}
2963
2964/* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */
2965static void
2966android_glStencilFunc__III
2967  (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) {
2968    glStencilFunc(
2969        (GLenum)func,
2970        (GLint)ref,
2971        (GLuint)mask
2972    );
2973}
2974
2975/* void glStencilMask ( GLuint mask ) */
2976static void
2977android_glStencilMask__I
2978  (JNIEnv *_env, jobject _this, jint mask) {
2979    glStencilMask(
2980        (GLuint)mask
2981    );
2982}
2983
2984/* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */
2985static void
2986android_glStencilOp__III
2987  (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) {
2988    glStencilOp(
2989        (GLenum)fail,
2990        (GLenum)zfail,
2991        (GLenum)zpass
2992    );
2993}
2994
2995/* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2996static void
2997android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
2998  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2999    jarray _array = (jarray) 0;
3000    jint _remaining;
3001    GLvoid *pointer = (GLvoid *) 0;
3002
3003    pointer = (GLvoid *)getPointer(_env, pointer_buf, &_array, &_remaining);
3004    glTexCoordPointerBounds(
3005        (GLint)size,
3006        (GLenum)type,
3007        (GLsizei)stride,
3008        (GLvoid *)pointer,
3009        (GLsizei)remaining
3010    );
3011    if (_array) {
3012        releasePointer(_env, _array, pointer, JNI_FALSE);
3013    }
3014}
3015
3016/* void glTexEnvf ( GLenum target, GLenum pname, GLfloat param ) */
3017static void
3018android_glTexEnvf__IIF
3019  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3020    glTexEnvf(
3021        (GLenum)target,
3022        (GLenum)pname,
3023        (GLfloat)param
3024    );
3025}
3026
3027/* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3028static void
3029android_glTexEnvfv__II_3FI
3030  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
3031    GLfloat *params_base = (GLfloat *) 0;
3032    jint _remaining;
3033    GLfloat *params = (GLfloat *) 0;
3034
3035    if (!params_ref) {
3036        _env->ThrowNew(IAEClass, "params == null");
3037        goto exit;
3038    }
3039    if (offset < 0) {
3040        _env->ThrowNew(IAEClass, "offset < 0");
3041        goto exit;
3042    }
3043    _remaining = _env->GetArrayLength(params_ref) - offset;
3044    int _needed;
3045    switch (pname) {
3046#if defined(GL_TEXTURE_ENV_MODE)
3047        case GL_TEXTURE_ENV_MODE:
3048#endif // defined(GL_TEXTURE_ENV_MODE)
3049#if defined(GL_COMBINE_RGB)
3050        case GL_COMBINE_RGB:
3051#endif // defined(GL_COMBINE_RGB)
3052#if defined(GL_COMBINE_ALPHA)
3053        case GL_COMBINE_ALPHA:
3054#endif // defined(GL_COMBINE_ALPHA)
3055            _needed = 1;
3056            break;
3057#if defined(GL_TEXTURE_ENV_COLOR)
3058        case GL_TEXTURE_ENV_COLOR:
3059#endif // defined(GL_TEXTURE_ENV_COLOR)
3060            _needed = 4;
3061            break;
3062        default:
3063            _needed = 0;
3064            break;
3065    }
3066    if (_remaining < _needed) {
3067        _env->ThrowNew(IAEClass, "length - offset < needed");
3068        goto exit;
3069    }
3070    params_base = (GLfloat *)
3071        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3072    params = params_base + offset;
3073
3074    glTexEnvfv(
3075        (GLenum)target,
3076        (GLenum)pname,
3077        (GLfloat *)params
3078    );
3079
3080exit:
3081    if (params_base) {
3082        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3083            JNI_ABORT);
3084    }
3085}
3086
3087/* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3088static void
3089android_glTexEnvfv__IILjava_nio_FloatBuffer_2
3090  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3091    jarray _array = (jarray) 0;
3092    jint _remaining;
3093    GLfloat *params = (GLfloat *) 0;
3094
3095    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
3096    int _needed;
3097    switch (pname) {
3098#if defined(GL_TEXTURE_ENV_MODE)
3099        case GL_TEXTURE_ENV_MODE:
3100#endif // defined(GL_TEXTURE_ENV_MODE)
3101#if defined(GL_COMBINE_RGB)
3102        case GL_COMBINE_RGB:
3103#endif // defined(GL_COMBINE_RGB)
3104#if defined(GL_COMBINE_ALPHA)
3105        case GL_COMBINE_ALPHA:
3106#endif // defined(GL_COMBINE_ALPHA)
3107            _needed = 1;
3108            break;
3109#if defined(GL_TEXTURE_ENV_COLOR)
3110        case GL_TEXTURE_ENV_COLOR:
3111#endif // defined(GL_TEXTURE_ENV_COLOR)
3112            _needed = 4;
3113            break;
3114        default:
3115            _needed = 0;
3116            break;
3117    }
3118    if (_remaining < _needed) {
3119        _env->ThrowNew(IAEClass, "remaining() < needed");
3120        goto exit;
3121    }
3122    glTexEnvfv(
3123        (GLenum)target,
3124        (GLenum)pname,
3125        (GLfloat *)params
3126    );
3127
3128exit:
3129    if (_array) {
3130        releasePointer(_env, _array, params, JNI_FALSE);
3131    }
3132}
3133
3134/* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */
3135static void
3136android_glTexEnvx__III
3137  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3138    glTexEnvx(
3139        (GLenum)target,
3140        (GLenum)pname,
3141        (GLfixed)param
3142    );
3143}
3144
3145/* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3146static void
3147android_glTexEnvxv__II_3II
3148  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3149    GLfixed *params_base = (GLfixed *) 0;
3150    jint _remaining;
3151    GLfixed *params = (GLfixed *) 0;
3152
3153    if (!params_ref) {
3154        _env->ThrowNew(IAEClass, "params == null");
3155        goto exit;
3156    }
3157    if (offset < 0) {
3158        _env->ThrowNew(IAEClass, "offset < 0");
3159        goto exit;
3160    }
3161    _remaining = _env->GetArrayLength(params_ref) - offset;
3162    int _needed;
3163    switch (pname) {
3164#if defined(GL_TEXTURE_ENV_MODE)
3165        case GL_TEXTURE_ENV_MODE:
3166#endif // defined(GL_TEXTURE_ENV_MODE)
3167#if defined(GL_COMBINE_RGB)
3168        case GL_COMBINE_RGB:
3169#endif // defined(GL_COMBINE_RGB)
3170#if defined(GL_COMBINE_ALPHA)
3171        case GL_COMBINE_ALPHA:
3172#endif // defined(GL_COMBINE_ALPHA)
3173            _needed = 1;
3174            break;
3175#if defined(GL_TEXTURE_ENV_COLOR)
3176        case GL_TEXTURE_ENV_COLOR:
3177#endif // defined(GL_TEXTURE_ENV_COLOR)
3178            _needed = 4;
3179            break;
3180        default:
3181            _needed = 0;
3182            break;
3183    }
3184    if (_remaining < _needed) {
3185        _env->ThrowNew(IAEClass, "length - offset < needed");
3186        goto exit;
3187    }
3188    params_base = (GLfixed *)
3189        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3190    params = params_base + offset;
3191
3192    glTexEnvxv(
3193        (GLenum)target,
3194        (GLenum)pname,
3195        (GLfixed *)params
3196    );
3197
3198exit:
3199    if (params_base) {
3200        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3201            JNI_ABORT);
3202    }
3203}
3204
3205/* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3206static void
3207android_glTexEnvxv__IILjava_nio_IntBuffer_2
3208  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3209    jarray _array = (jarray) 0;
3210    jint _remaining;
3211    GLfixed *params = (GLfixed *) 0;
3212
3213    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
3214    int _needed;
3215    switch (pname) {
3216#if defined(GL_TEXTURE_ENV_MODE)
3217        case GL_TEXTURE_ENV_MODE:
3218#endif // defined(GL_TEXTURE_ENV_MODE)
3219#if defined(GL_COMBINE_RGB)
3220        case GL_COMBINE_RGB:
3221#endif // defined(GL_COMBINE_RGB)
3222#if defined(GL_COMBINE_ALPHA)
3223        case GL_COMBINE_ALPHA:
3224#endif // defined(GL_COMBINE_ALPHA)
3225            _needed = 1;
3226            break;
3227#if defined(GL_TEXTURE_ENV_COLOR)
3228        case GL_TEXTURE_ENV_COLOR:
3229#endif // defined(GL_TEXTURE_ENV_COLOR)
3230            _needed = 4;
3231            break;
3232        default:
3233            _needed = 0;
3234            break;
3235    }
3236    if (_remaining < _needed) {
3237        _env->ThrowNew(IAEClass, "remaining() < needed");
3238        goto exit;
3239    }
3240    glTexEnvxv(
3241        (GLenum)target,
3242        (GLenum)pname,
3243        (GLfixed *)params
3244    );
3245
3246exit:
3247    if (_array) {
3248        releasePointer(_env, _array, params, JNI_FALSE);
3249    }
3250}
3251
3252/* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
3253static void
3254android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
3255  (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
3256    jarray _array = (jarray) 0;
3257    jint _remaining;
3258    GLvoid *pixels = (GLvoid *) 0;
3259
3260    if (pixels_buf) {
3261        pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
3262    }
3263    glTexImage2D(
3264        (GLenum)target,
3265        (GLint)level,
3266        (GLint)internalformat,
3267        (GLsizei)width,
3268        (GLsizei)height,
3269        (GLint)border,
3270        (GLenum)format,
3271        (GLenum)type,
3272        (GLvoid *)pixels
3273    );
3274    if (_array) {
3275        releasePointer(_env, _array, pixels, JNI_FALSE);
3276    }
3277}
3278
3279/* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
3280static void
3281android_glTexParameterf__IIF
3282  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3283    glTexParameterf(
3284        (GLenum)target,
3285        (GLenum)pname,
3286        (GLfloat)param
3287    );
3288}
3289
3290/* void glTexParameterx ( GLenum target, GLenum pname, GLfixed param ) */
3291static void
3292android_glTexParameterx__III
3293  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3294    glTexParameterx(
3295        (GLenum)target,
3296        (GLenum)pname,
3297        (GLfixed)param
3298    );
3299}
3300
3301/* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */
3302static void
3303android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
3304  (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
3305    jarray _array = (jarray) 0;
3306    jint _remaining;
3307    GLvoid *pixels = (GLvoid *) 0;
3308
3309    if (pixels_buf) {
3310        pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
3311    }
3312    glTexSubImage2D(
3313        (GLenum)target,
3314        (GLint)level,
3315        (GLint)xoffset,
3316        (GLint)yoffset,
3317        (GLsizei)width,
3318        (GLsizei)height,
3319        (GLenum)format,
3320        (GLenum)type,
3321        (GLvoid *)pixels
3322    );
3323    if (_array) {
3324        releasePointer(_env, _array, pixels, JNI_FALSE);
3325    }
3326}
3327
3328/* void glTranslatef ( GLfloat x, GLfloat y, GLfloat z ) */
3329static void
3330android_glTranslatef__FFF
3331  (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
3332    glTranslatef(
3333        (GLfloat)x,
3334        (GLfloat)y,
3335        (GLfloat)z
3336    );
3337}
3338
3339/* void glTranslatex ( GLfixed x, GLfixed y, GLfixed z ) */
3340static void
3341android_glTranslatex__III
3342  (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
3343    glTranslatex(
3344        (GLfixed)x,
3345        (GLfixed)y,
3346        (GLfixed)z
3347    );
3348}
3349
3350/* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3351static void
3352android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
3353  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
3354    jarray _array = (jarray) 0;
3355    jint _remaining;
3356    GLvoid *pointer = (GLvoid *) 0;
3357
3358    pointer = (GLvoid *)getPointer(_env, pointer_buf, &_array, &_remaining);
3359    glVertexPointerBounds(
3360        (GLint)size,
3361        (GLenum)type,
3362        (GLsizei)stride,
3363        (GLvoid *)pointer,
3364        (GLsizei)remaining
3365    );
3366    if (_array) {
3367        releasePointer(_env, _array, pointer, JNI_FALSE);
3368    }
3369}
3370
3371/* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */
3372static void
3373android_glViewport__IIII
3374  (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
3375    glViewport(
3376        (GLint)x,
3377        (GLint)y,
3378        (GLsizei)width,
3379        (GLsizei)height
3380    );
3381}
3382
3383/* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
3384static jint
3385android_glQueryMatrixxOES___3II_3II
3386  (JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) {
3387    jint _exception = 0;
3388    GLbitfield _returnValue = -1;
3389    GLfixed *mantissa_base = (GLfixed *) 0;
3390    jint _mantissaRemaining;
3391    GLfixed *mantissa = (GLfixed *) 0;
3392    GLint *exponent_base = (GLint *) 0;
3393    jint _exponentRemaining;
3394    GLint *exponent = (GLint *) 0;
3395
3396    if (!mantissa_ref) {
3397        _exception = 1;
3398        _env->ThrowNew(IAEClass, "mantissa == null");
3399        goto exit;
3400    }
3401    if (mantissaOffset < 0) {
3402        _exception = 1;
3403        _env->ThrowNew(IAEClass, "mantissaOffset < 0");
3404        goto exit;
3405    }
3406    _mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset;
3407    if (_mantissaRemaining < 16) {
3408        _exception = 1;
3409        _env->ThrowNew(IAEClass, "length - mantissaOffset < 16");
3410        goto exit;
3411    }
3412    mantissa_base = (GLfixed *)
3413        _env->GetPrimitiveArrayCritical(mantissa_ref, (jboolean *)0);
3414    mantissa = mantissa_base + mantissaOffset;
3415
3416    if (!exponent_ref) {
3417        _exception = 1;
3418        _env->ThrowNew(IAEClass, "exponent == null");
3419        goto exit;
3420    }
3421    if (exponentOffset < 0) {
3422        _exception = 1;
3423        _env->ThrowNew(IAEClass, "exponentOffset < 0");
3424        goto exit;
3425    }
3426    _exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset;
3427    if (_exponentRemaining < 16) {
3428        _exception = 1;
3429        _env->ThrowNew(IAEClass, "length - exponentOffset < 16");
3430        goto exit;
3431    }
3432    exponent_base = (GLint *)
3433        _env->GetPrimitiveArrayCritical(exponent_ref, (jboolean *)0);
3434    exponent = exponent_base + exponentOffset;
3435
3436    _returnValue = glQueryMatrixxOES(
3437        (GLfixed *)mantissa,
3438        (GLint *)exponent
3439    );
3440
3441exit:
3442    if (exponent_base) {
3443        _env->ReleasePrimitiveArrayCritical(exponent_ref, exponent_base,
3444            _exception ? JNI_ABORT: 0);
3445    }
3446    if (mantissa_base) {
3447        _env->ReleasePrimitiveArrayCritical(mantissa_ref, mantissa_base,
3448            _exception ? JNI_ABORT: 0);
3449    }
3450    return _returnValue;
3451}
3452
3453/* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
3454static jint
3455android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
3456  (JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) {
3457    jint _exception = 0;
3458    jarray _mantissaArray = (jarray) 0;
3459    jarray _exponentArray = (jarray) 0;
3460    GLbitfield _returnValue = -1;
3461    jint _mantissaRemaining;
3462    GLfixed *mantissa = (GLfixed *) 0;
3463    jint _exponentRemaining;
3464    GLint *exponent = (GLint *) 0;
3465
3466    mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining);
3467    if (_mantissaRemaining < 16) {
3468        _exception = 1;
3469        _env->ThrowNew(IAEClass, "remaining() < 16");
3470        goto exit;
3471    }
3472    exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining);
3473    if (_exponentRemaining < 16) {
3474        _exception = 1;
3475        _env->ThrowNew(IAEClass, "remaining() < 16");
3476        goto exit;
3477    }
3478    _returnValue = glQueryMatrixxOES(
3479        (GLfixed *)mantissa,
3480        (GLint *)exponent
3481    );
3482
3483exit:
3484    if (_mantissaArray) {
3485        releasePointer(_env, _mantissaArray, exponent, _exception ? JNI_FALSE : JNI_TRUE);
3486    }
3487    if (_exponentArray) {
3488        releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
3489    }
3490    return _returnValue;
3491}
3492
3493/* void glBindBuffer ( GLenum target, GLuint buffer ) */
3494static void
3495android_glBindBuffer__II
3496  (JNIEnv *_env, jobject _this, jint target, jint buffer) {
3497    glBindBuffer(
3498        (GLenum)target,
3499        (GLuint)buffer
3500    );
3501}
3502
3503/* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */
3504static void
3505android_glBufferData__IILjava_nio_Buffer_2I
3506  (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
3507    jarray _array = (jarray) 0;
3508    jint _remaining;
3509    GLvoid *data = (GLvoid *) 0;
3510
3511    if (data_buf) {
3512        data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
3513    }
3514    glBufferData(
3515        (GLenum)target,
3516        (GLsizeiptr)size,
3517        (GLvoid *)data,
3518        (GLenum)usage
3519    );
3520    if (_array) {
3521        releasePointer(_env, _array, data, JNI_FALSE);
3522    }
3523}
3524
3525/* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
3526static void
3527android_glBufferSubData__IIILjava_nio_Buffer_2
3528  (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
3529    jarray _array = (jarray) 0;
3530    jint _remaining;
3531    GLvoid *data = (GLvoid *) 0;
3532
3533    data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
3534    glBufferSubData(
3535        (GLenum)target,
3536        (GLintptr)offset,
3537        (GLsizeiptr)size,
3538        (GLvoid *)data
3539    );
3540    if (_array) {
3541        releasePointer(_env, _array, data, JNI_FALSE);
3542    }
3543}
3544
3545/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
3546static void
3547android_glClipPlanef__I_3FI
3548  (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
3549    GLfloat *equation_base = (GLfloat *) 0;
3550    jint _remaining;
3551    GLfloat *equation = (GLfloat *) 0;
3552
3553    if (!equation_ref) {
3554        _env->ThrowNew(IAEClass, "equation == null");
3555        goto exit;
3556    }
3557    if (offset < 0) {
3558        _env->ThrowNew(IAEClass, "offset < 0");
3559        goto exit;
3560    }
3561    _remaining = _env->GetArrayLength(equation_ref) - offset;
3562    if (_remaining < 4) {
3563        _env->ThrowNew(IAEClass, "length - offset < 4");
3564        goto exit;
3565    }
3566    equation_base = (GLfloat *)
3567        _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
3568    equation = equation_base + offset;
3569
3570    glClipPlanef(
3571        (GLenum)plane,
3572        (GLfloat *)equation
3573    );
3574
3575exit:
3576    if (equation_base) {
3577        _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
3578            JNI_ABORT);
3579    }
3580}
3581
3582/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
3583static void
3584android_glClipPlanef__ILjava_nio_FloatBuffer_2
3585  (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
3586    jarray _array = (jarray) 0;
3587    jint _remaining;
3588    GLfloat *equation = (GLfloat *) 0;
3589
3590    equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
3591    if (_remaining < 4) {
3592        _env->ThrowNew(IAEClass, "remaining() < 4");
3593        goto exit;
3594    }
3595    glClipPlanef(
3596        (GLenum)plane,
3597        (GLfloat *)equation
3598    );
3599
3600exit:
3601    if (_array) {
3602        releasePointer(_env, _array, equation, JNI_FALSE);
3603    }
3604}
3605
3606/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
3607static void
3608android_glClipPlanex__I_3II
3609  (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
3610    GLfixed *equation_base = (GLfixed *) 0;
3611    jint _remaining;
3612    GLfixed *equation = (GLfixed *) 0;
3613
3614    if (!equation_ref) {
3615        _env->ThrowNew(IAEClass, "equation == null");
3616        goto exit;
3617    }
3618    if (offset < 0) {
3619        _env->ThrowNew(IAEClass, "offset < 0");
3620        goto exit;
3621    }
3622    _remaining = _env->GetArrayLength(equation_ref) - offset;
3623    if (_remaining < 4) {
3624        _env->ThrowNew(IAEClass, "length - offset < 4");
3625        goto exit;
3626    }
3627    equation_base = (GLfixed *)
3628        _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
3629    equation = equation_base + offset;
3630
3631    glClipPlanex(
3632        (GLenum)plane,
3633        (GLfixed *)equation
3634    );
3635
3636exit:
3637    if (equation_base) {
3638        _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
3639            JNI_ABORT);
3640    }
3641}
3642
3643/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
3644static void
3645android_glClipPlanex__ILjava_nio_IntBuffer_2
3646  (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
3647    jarray _array = (jarray) 0;
3648    jint _remaining;
3649    GLfixed *equation = (GLfixed *) 0;
3650
3651    equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
3652    if (_remaining < 4) {
3653        _env->ThrowNew(IAEClass, "remaining() < 4");
3654        goto exit;
3655    }
3656    glClipPlanex(
3657        (GLenum)plane,
3658        (GLfixed *)equation
3659    );
3660
3661exit:
3662    if (_array) {
3663        releasePointer(_env, _array, equation, JNI_FALSE);
3664    }
3665}
3666
3667/* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */
3668static void
3669android_glColor4ub__BBBB
3670  (JNIEnv *_env, jobject _this, jbyte red, jbyte green, jbyte blue, jbyte alpha) {
3671    glColor4ub(
3672        (GLubyte)red,
3673        (GLubyte)green,
3674        (GLubyte)blue,
3675        (GLubyte)alpha
3676    );
3677}
3678
3679/* void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
3680static void
3681android_glColorPointer__IIII
3682  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
3683    glColorPointer(
3684        (GLint)size,
3685        (GLenum)type,
3686        (GLsizei)stride,
3687        (const GLvoid *)offset
3688    );
3689}
3690
3691/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
3692static void
3693android_glDeleteBuffers__I_3II
3694  (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
3695    GLuint *buffers_base = (GLuint *) 0;
3696    jint _remaining;
3697    GLuint *buffers = (GLuint *) 0;
3698
3699    if (!buffers_ref) {
3700        _env->ThrowNew(IAEClass, "buffers == null");
3701        goto exit;
3702    }
3703    if (offset < 0) {
3704        _env->ThrowNew(IAEClass, "offset < 0");
3705        goto exit;
3706    }
3707    _remaining = _env->GetArrayLength(buffers_ref) - offset;
3708    if (_remaining < n) {
3709        _env->ThrowNew(IAEClass, "length - offset < n");
3710        goto exit;
3711    }
3712    buffers_base = (GLuint *)
3713        _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
3714    buffers = buffers_base + offset;
3715
3716    glDeleteBuffers(
3717        (GLsizei)n,
3718        (GLuint *)buffers
3719    );
3720
3721exit:
3722    if (buffers_base) {
3723        _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
3724            JNI_ABORT);
3725    }
3726}
3727
3728/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
3729static void
3730android_glDeleteBuffers__ILjava_nio_IntBuffer_2
3731  (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
3732    jarray _array = (jarray) 0;
3733    jint _remaining;
3734    GLuint *buffers = (GLuint *) 0;
3735
3736    buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
3737    if (_remaining < n) {
3738        _env->ThrowNew(IAEClass, "remaining() < n");
3739        goto exit;
3740    }
3741    glDeleteBuffers(
3742        (GLsizei)n,
3743        (GLuint *)buffers
3744    );
3745
3746exit:
3747    if (_array) {
3748        releasePointer(_env, _array, buffers, JNI_FALSE);
3749    }
3750}
3751
3752/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
3753static void
3754android_glDrawElements__IIII
3755  (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
3756    glDrawElements(
3757        (GLenum)mode,
3758        (GLsizei)count,
3759        (GLenum)type,
3760        (const GLvoid *)offset
3761    );
3762}
3763
3764/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
3765static void
3766android_glGenBuffers__I_3II
3767  (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
3768    jint _exception = 0;
3769    GLuint *buffers_base = (GLuint *) 0;
3770    jint _remaining;
3771    GLuint *buffers = (GLuint *) 0;
3772
3773    if (!buffers_ref) {
3774        _exception = 1;
3775        _env->ThrowNew(IAEClass, "buffers == null");
3776        goto exit;
3777    }
3778    if (offset < 0) {
3779        _exception = 1;
3780        _env->ThrowNew(IAEClass, "offset < 0");
3781        goto exit;
3782    }
3783    _remaining = _env->GetArrayLength(buffers_ref) - offset;
3784    if (_remaining < n) {
3785        _exception = 1;
3786        _env->ThrowNew(IAEClass, "length - offset < n");
3787        goto exit;
3788    }
3789    buffers_base = (GLuint *)
3790        _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
3791    buffers = buffers_base + offset;
3792
3793    glGenBuffers(
3794        (GLsizei)n,
3795        (GLuint *)buffers
3796    );
3797
3798exit:
3799    if (buffers_base) {
3800        _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
3801            _exception ? JNI_ABORT: 0);
3802    }
3803}
3804
3805/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
3806static void
3807android_glGenBuffers__ILjava_nio_IntBuffer_2
3808  (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
3809    jint _exception = 0;
3810    jarray _array = (jarray) 0;
3811    jint _remaining;
3812    GLuint *buffers = (GLuint *) 0;
3813
3814    buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
3815    if (_remaining < n) {
3816        _exception = 1;
3817        _env->ThrowNew(IAEClass, "remaining() < n");
3818        goto exit;
3819    }
3820    glGenBuffers(
3821        (GLsizei)n,
3822        (GLuint *)buffers
3823    );
3824
3825exit:
3826    if (_array) {
3827        releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE);
3828    }
3829}
3830
3831/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
3832static void
3833android_glGetBooleanv__I_3ZI
3834  (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
3835    jint _exception = 0;
3836    GLboolean *params_base = (GLboolean *) 0;
3837    jint _remaining;
3838    GLboolean *params = (GLboolean *) 0;
3839
3840    if (!params_ref) {
3841        _exception = 1;
3842        _env->ThrowNew(IAEClass, "params == null");
3843        goto exit;
3844    }
3845    if (offset < 0) {
3846        _exception = 1;
3847        _env->ThrowNew(IAEClass, "offset < 0");
3848        goto exit;
3849    }
3850    _remaining = _env->GetArrayLength(params_ref) - offset;
3851    params_base = (GLboolean *)
3852        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3853    params = params_base + offset;
3854
3855    glGetBooleanv(
3856        (GLenum)pname,
3857        (GLboolean *)params
3858    );
3859
3860exit:
3861    if (params_base) {
3862        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3863            _exception ? JNI_ABORT: 0);
3864    }
3865}
3866
3867/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
3868static void
3869android_glGetBooleanv__ILjava_nio_IntBuffer_2
3870  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
3871    jint _exception = 0;
3872    jarray _array = (jarray) 0;
3873    jint _remaining;
3874    GLboolean *params = (GLboolean *) 0;
3875
3876    params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining);
3877    glGetBooleanv(
3878        (GLenum)pname,
3879        (GLboolean *)params
3880    );
3881    if (_array) {
3882        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3883    }
3884}
3885
3886/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3887static void
3888android_glGetBufferParameteriv__II_3II
3889  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3890    _env->ThrowNew(UOEClass,
3891        "glGetBufferParameteriv");
3892}
3893
3894/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3895static void
3896android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
3897  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3898    _env->ThrowNew(UOEClass,
3899        "glGetBufferParameteriv");
3900}
3901
3902/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
3903static void
3904android_glGetClipPlanef__I_3FI
3905  (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
3906    jint _exception = 0;
3907    GLfloat *eqn_base = (GLfloat *) 0;
3908    jint _remaining;
3909    GLfloat *eqn = (GLfloat *) 0;
3910
3911    if (!eqn_ref) {
3912        _exception = 1;
3913        _env->ThrowNew(IAEClass, "eqn == null");
3914        goto exit;
3915    }
3916    if (offset < 0) {
3917        _exception = 1;
3918        _env->ThrowNew(IAEClass, "offset < 0");
3919        goto exit;
3920    }
3921    _remaining = _env->GetArrayLength(eqn_ref) - offset;
3922    eqn_base = (GLfloat *)
3923        _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
3924    eqn = eqn_base + offset;
3925
3926    glGetClipPlanef(
3927        (GLenum)pname,
3928        (GLfloat *)eqn
3929    );
3930
3931exit:
3932    if (eqn_base) {
3933        _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
3934            _exception ? JNI_ABORT: 0);
3935    }
3936}
3937
3938/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
3939static void
3940android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
3941  (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
3942    jint _exception = 0;
3943    jarray _array = (jarray) 0;
3944    jint _remaining;
3945    GLfloat *eqn = (GLfloat *) 0;
3946
3947    eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
3948    glGetClipPlanef(
3949        (GLenum)pname,
3950        (GLfloat *)eqn
3951    );
3952    if (_array) {
3953        releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
3954    }
3955}
3956
3957/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
3958static void
3959android_glGetClipPlanex__I_3II
3960  (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
3961    jint _exception = 0;
3962    GLfixed *eqn_base = (GLfixed *) 0;
3963    jint _remaining;
3964    GLfixed *eqn = (GLfixed *) 0;
3965
3966    if (!eqn_ref) {
3967        _exception = 1;
3968        _env->ThrowNew(IAEClass, "eqn == null");
3969        goto exit;
3970    }
3971    if (offset < 0) {
3972        _exception = 1;
3973        _env->ThrowNew(IAEClass, "offset < 0");
3974        goto exit;
3975    }
3976    _remaining = _env->GetArrayLength(eqn_ref) - offset;
3977    eqn_base = (GLfixed *)
3978        _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
3979    eqn = eqn_base + offset;
3980
3981    glGetClipPlanex(
3982        (GLenum)pname,
3983        (GLfixed *)eqn
3984    );
3985
3986exit:
3987    if (eqn_base) {
3988        _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
3989            _exception ? JNI_ABORT: 0);
3990    }
3991}
3992
3993/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
3994static void
3995android_glGetClipPlanex__ILjava_nio_IntBuffer_2
3996  (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
3997    jint _exception = 0;
3998    jarray _array = (jarray) 0;
3999    jint _remaining;
4000    GLfixed *eqn = (GLfixed *) 0;
4001
4002    eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
4003    glGetClipPlanex(
4004        (GLenum)pname,
4005        (GLfixed *)eqn
4006    );
4007    if (_array) {
4008        releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
4009    }
4010}
4011
4012/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
4013static void
4014android_glGetFixedv__I_3II
4015  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
4016    jint _exception = 0;
4017    GLfixed *params_base = (GLfixed *) 0;
4018    jint _remaining;
4019    GLfixed *params = (GLfixed *) 0;
4020
4021    if (!params_ref) {
4022        _exception = 1;
4023        _env->ThrowNew(IAEClass, "params == null");
4024        goto exit;
4025    }
4026    if (offset < 0) {
4027        _exception = 1;
4028        _env->ThrowNew(IAEClass, "offset < 0");
4029        goto exit;
4030    }
4031    _remaining = _env->GetArrayLength(params_ref) - offset;
4032    params_base = (GLfixed *)
4033        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4034    params = params_base + offset;
4035
4036    glGetFixedv(
4037        (GLenum)pname,
4038        (GLfixed *)params
4039    );
4040
4041exit:
4042    if (params_base) {
4043        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4044            _exception ? JNI_ABORT: 0);
4045    }
4046}
4047
4048/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
4049static void
4050android_glGetFixedv__ILjava_nio_IntBuffer_2
4051  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4052    jint _exception = 0;
4053    jarray _array = (jarray) 0;
4054    jint _remaining;
4055    GLfixed *params = (GLfixed *) 0;
4056
4057    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4058    glGetFixedv(
4059        (GLenum)pname,
4060        (GLfixed *)params
4061    );
4062    if (_array) {
4063        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4064    }
4065}
4066
4067/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
4068static void
4069android_glGetFloatv__I_3FI
4070  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
4071    jint _exception = 0;
4072    GLfloat *params_base = (GLfloat *) 0;
4073    jint _remaining;
4074    GLfloat *params = (GLfloat *) 0;
4075
4076    if (!params_ref) {
4077        _exception = 1;
4078        _env->ThrowNew(IAEClass, "params == null");
4079        goto exit;
4080    }
4081    if (offset < 0) {
4082        _exception = 1;
4083        _env->ThrowNew(IAEClass, "offset < 0");
4084        goto exit;
4085    }
4086    _remaining = _env->GetArrayLength(params_ref) - offset;
4087    params_base = (GLfloat *)
4088        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4089    params = params_base + offset;
4090
4091    glGetFloatv(
4092        (GLenum)pname,
4093        (GLfloat *)params
4094    );
4095
4096exit:
4097    if (params_base) {
4098        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4099            _exception ? JNI_ABORT: 0);
4100    }
4101}
4102
4103/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
4104static void
4105android_glGetFloatv__ILjava_nio_FloatBuffer_2
4106  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4107    jint _exception = 0;
4108    jarray _array = (jarray) 0;
4109    jint _remaining;
4110    GLfloat *params = (GLfloat *) 0;
4111
4112    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4113    glGetFloatv(
4114        (GLenum)pname,
4115        (GLfloat *)params
4116    );
4117    if (_array) {
4118        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4119    }
4120}
4121
4122/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
4123static void
4124android_glGetLightfv__II_3FI
4125  (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
4126    jint _exception = 0;
4127    GLfloat *params_base = (GLfloat *) 0;
4128    jint _remaining;
4129    GLfloat *params = (GLfloat *) 0;
4130
4131    if (!params_ref) {
4132        _exception = 1;
4133        _env->ThrowNew(IAEClass, "params == null");
4134        goto exit;
4135    }
4136    if (offset < 0) {
4137        _exception = 1;
4138        _env->ThrowNew(IAEClass, "offset < 0");
4139        goto exit;
4140    }
4141    _remaining = _env->GetArrayLength(params_ref) - offset;
4142    int _needed;
4143    switch (pname) {
4144#if defined(GL_SPOT_EXPONENT)
4145        case GL_SPOT_EXPONENT:
4146#endif // defined(GL_SPOT_EXPONENT)
4147#if defined(GL_SPOT_CUTOFF)
4148        case GL_SPOT_CUTOFF:
4149#endif // defined(GL_SPOT_CUTOFF)
4150#if defined(GL_CONSTANT_ATTENUATION)
4151        case GL_CONSTANT_ATTENUATION:
4152#endif // defined(GL_CONSTANT_ATTENUATION)
4153#if defined(GL_LINEAR_ATTENUATION)
4154        case GL_LINEAR_ATTENUATION:
4155#endif // defined(GL_LINEAR_ATTENUATION)
4156#if defined(GL_QUADRATIC_ATTENUATION)
4157        case GL_QUADRATIC_ATTENUATION:
4158#endif // defined(GL_QUADRATIC_ATTENUATION)
4159            _needed = 1;
4160            break;
4161#if defined(GL_SPOT_DIRECTION)
4162        case GL_SPOT_DIRECTION:
4163#endif // defined(GL_SPOT_DIRECTION)
4164            _needed = 3;
4165            break;
4166#if defined(GL_AMBIENT)
4167        case GL_AMBIENT:
4168#endif // defined(GL_AMBIENT)
4169#if defined(GL_DIFFUSE)
4170        case GL_DIFFUSE:
4171#endif // defined(GL_DIFFUSE)
4172#if defined(GL_SPECULAR)
4173        case GL_SPECULAR:
4174#endif // defined(GL_SPECULAR)
4175#if defined(GL_EMISSION)
4176        case GL_EMISSION:
4177#endif // defined(GL_EMISSION)
4178            _needed = 4;
4179            break;
4180        default:
4181            _needed = 0;
4182            break;
4183    }
4184    if (_remaining < _needed) {
4185        _exception = 1;
4186        _env->ThrowNew(IAEClass, "length - offset < needed");
4187        goto exit;
4188    }
4189    params_base = (GLfloat *)
4190        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4191    params = params_base + offset;
4192
4193    glGetLightfv(
4194        (GLenum)light,
4195        (GLenum)pname,
4196        (GLfloat *)params
4197    );
4198
4199exit:
4200    if (params_base) {
4201        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4202            _exception ? JNI_ABORT: 0);
4203    }
4204}
4205
4206/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
4207static void
4208android_glGetLightfv__IILjava_nio_FloatBuffer_2
4209  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
4210    jint _exception = 0;
4211    jarray _array = (jarray) 0;
4212    jint _remaining;
4213    GLfloat *params = (GLfloat *) 0;
4214
4215    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4216    int _needed;
4217    switch (pname) {
4218#if defined(GL_SPOT_EXPONENT)
4219        case GL_SPOT_EXPONENT:
4220#endif // defined(GL_SPOT_EXPONENT)
4221#if defined(GL_SPOT_CUTOFF)
4222        case GL_SPOT_CUTOFF:
4223#endif // defined(GL_SPOT_CUTOFF)
4224#if defined(GL_CONSTANT_ATTENUATION)
4225        case GL_CONSTANT_ATTENUATION:
4226#endif // defined(GL_CONSTANT_ATTENUATION)
4227#if defined(GL_LINEAR_ATTENUATION)
4228        case GL_LINEAR_ATTENUATION:
4229#endif // defined(GL_LINEAR_ATTENUATION)
4230#if defined(GL_QUADRATIC_ATTENUATION)
4231        case GL_QUADRATIC_ATTENUATION:
4232#endif // defined(GL_QUADRATIC_ATTENUATION)
4233            _needed = 1;
4234            break;
4235#if defined(GL_SPOT_DIRECTION)
4236        case GL_SPOT_DIRECTION:
4237#endif // defined(GL_SPOT_DIRECTION)
4238            _needed = 3;
4239            break;
4240#if defined(GL_AMBIENT)
4241        case GL_AMBIENT:
4242#endif // defined(GL_AMBIENT)
4243#if defined(GL_DIFFUSE)
4244        case GL_DIFFUSE:
4245#endif // defined(GL_DIFFUSE)
4246#if defined(GL_SPECULAR)
4247        case GL_SPECULAR:
4248#endif // defined(GL_SPECULAR)
4249#if defined(GL_EMISSION)
4250        case GL_EMISSION:
4251#endif // defined(GL_EMISSION)
4252            _needed = 4;
4253            break;
4254        default:
4255            _needed = 0;
4256            break;
4257    }
4258    if (_remaining < _needed) {
4259        _exception = 1;
4260        _env->ThrowNew(IAEClass, "remaining() < needed");
4261        goto exit;
4262    }
4263    glGetLightfv(
4264        (GLenum)light,
4265        (GLenum)pname,
4266        (GLfloat *)params
4267    );
4268
4269exit:
4270    if (_array) {
4271        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4272    }
4273}
4274
4275/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
4276static void
4277android_glGetLightxv__II_3II
4278  (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
4279    jint _exception = 0;
4280    GLfixed *params_base = (GLfixed *) 0;
4281    jint _remaining;
4282    GLfixed *params = (GLfixed *) 0;
4283
4284    if (!params_ref) {
4285        _exception = 1;
4286        _env->ThrowNew(IAEClass, "params == null");
4287        goto exit;
4288    }
4289    if (offset < 0) {
4290        _exception = 1;
4291        _env->ThrowNew(IAEClass, "offset < 0");
4292        goto exit;
4293    }
4294    _remaining = _env->GetArrayLength(params_ref) - offset;
4295    int _needed;
4296    switch (pname) {
4297#if defined(GL_SPOT_EXPONENT)
4298        case GL_SPOT_EXPONENT:
4299#endif // defined(GL_SPOT_EXPONENT)
4300#if defined(GL_SPOT_CUTOFF)
4301        case GL_SPOT_CUTOFF:
4302#endif // defined(GL_SPOT_CUTOFF)
4303#if defined(GL_CONSTANT_ATTENUATION)
4304        case GL_CONSTANT_ATTENUATION:
4305#endif // defined(GL_CONSTANT_ATTENUATION)
4306#if defined(GL_LINEAR_ATTENUATION)
4307        case GL_LINEAR_ATTENUATION:
4308#endif // defined(GL_LINEAR_ATTENUATION)
4309#if defined(GL_QUADRATIC_ATTENUATION)
4310        case GL_QUADRATIC_ATTENUATION:
4311#endif // defined(GL_QUADRATIC_ATTENUATION)
4312            _needed = 1;
4313            break;
4314#if defined(GL_SPOT_DIRECTION)
4315        case GL_SPOT_DIRECTION:
4316#endif // defined(GL_SPOT_DIRECTION)
4317            _needed = 3;
4318            break;
4319#if defined(GL_AMBIENT)
4320        case GL_AMBIENT:
4321#endif // defined(GL_AMBIENT)
4322#if defined(GL_DIFFUSE)
4323        case GL_DIFFUSE:
4324#endif // defined(GL_DIFFUSE)
4325#if defined(GL_SPECULAR)
4326        case GL_SPECULAR:
4327#endif // defined(GL_SPECULAR)
4328#if defined(GL_EMISSION)
4329        case GL_EMISSION:
4330#endif // defined(GL_EMISSION)
4331            _needed = 4;
4332            break;
4333        default:
4334            _needed = 0;
4335            break;
4336    }
4337    if (_remaining < _needed) {
4338        _exception = 1;
4339        _env->ThrowNew(IAEClass, "length - offset < needed");
4340        goto exit;
4341    }
4342    params_base = (GLfixed *)
4343        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4344    params = params_base + offset;
4345
4346    glGetLightxv(
4347        (GLenum)light,
4348        (GLenum)pname,
4349        (GLfixed *)params
4350    );
4351
4352exit:
4353    if (params_base) {
4354        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4355            _exception ? JNI_ABORT: 0);
4356    }
4357}
4358
4359/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
4360static void
4361android_glGetLightxv__IILjava_nio_IntBuffer_2
4362  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
4363    jint _exception = 0;
4364    jarray _array = (jarray) 0;
4365    jint _remaining;
4366    GLfixed *params = (GLfixed *) 0;
4367
4368    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4369    int _needed;
4370    switch (pname) {
4371#if defined(GL_SPOT_EXPONENT)
4372        case GL_SPOT_EXPONENT:
4373#endif // defined(GL_SPOT_EXPONENT)
4374#if defined(GL_SPOT_CUTOFF)
4375        case GL_SPOT_CUTOFF:
4376#endif // defined(GL_SPOT_CUTOFF)
4377#if defined(GL_CONSTANT_ATTENUATION)
4378        case GL_CONSTANT_ATTENUATION:
4379#endif // defined(GL_CONSTANT_ATTENUATION)
4380#if defined(GL_LINEAR_ATTENUATION)
4381        case GL_LINEAR_ATTENUATION:
4382#endif // defined(GL_LINEAR_ATTENUATION)
4383#if defined(GL_QUADRATIC_ATTENUATION)
4384        case GL_QUADRATIC_ATTENUATION:
4385#endif // defined(GL_QUADRATIC_ATTENUATION)
4386            _needed = 1;
4387            break;
4388#if defined(GL_SPOT_DIRECTION)
4389        case GL_SPOT_DIRECTION:
4390#endif // defined(GL_SPOT_DIRECTION)
4391            _needed = 3;
4392            break;
4393#if defined(GL_AMBIENT)
4394        case GL_AMBIENT:
4395#endif // defined(GL_AMBIENT)
4396#if defined(GL_DIFFUSE)
4397        case GL_DIFFUSE:
4398#endif // defined(GL_DIFFUSE)
4399#if defined(GL_SPECULAR)
4400        case GL_SPECULAR:
4401#endif // defined(GL_SPECULAR)
4402#if defined(GL_EMISSION)
4403        case GL_EMISSION:
4404#endif // defined(GL_EMISSION)
4405            _needed = 4;
4406            break;
4407        default:
4408            _needed = 0;
4409            break;
4410    }
4411    if (_remaining < _needed) {
4412        _exception = 1;
4413        _env->ThrowNew(IAEClass, "remaining() < needed");
4414        goto exit;
4415    }
4416    glGetLightxv(
4417        (GLenum)light,
4418        (GLenum)pname,
4419        (GLfixed *)params
4420    );
4421
4422exit:
4423    if (_array) {
4424        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4425    }
4426}
4427
4428/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
4429static void
4430android_glGetMaterialfv__II_3FI
4431  (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
4432    jint _exception = 0;
4433    GLfloat *params_base = (GLfloat *) 0;
4434    jint _remaining;
4435    GLfloat *params = (GLfloat *) 0;
4436
4437    if (!params_ref) {
4438        _exception = 1;
4439        _env->ThrowNew(IAEClass, "params == null");
4440        goto exit;
4441    }
4442    if (offset < 0) {
4443        _exception = 1;
4444        _env->ThrowNew(IAEClass, "offset < 0");
4445        goto exit;
4446    }
4447    _remaining = _env->GetArrayLength(params_ref) - offset;
4448    int _needed;
4449    switch (pname) {
4450#if defined(GL_SHININESS)
4451        case GL_SHININESS:
4452#endif // defined(GL_SHININESS)
4453            _needed = 1;
4454            break;
4455#if defined(GL_AMBIENT)
4456        case GL_AMBIENT:
4457#endif // defined(GL_AMBIENT)
4458#if defined(GL_DIFFUSE)
4459        case GL_DIFFUSE:
4460#endif // defined(GL_DIFFUSE)
4461#if defined(GL_SPECULAR)
4462        case GL_SPECULAR:
4463#endif // defined(GL_SPECULAR)
4464#if defined(GL_EMISSION)
4465        case GL_EMISSION:
4466#endif // defined(GL_EMISSION)
4467#if defined(GL_AMBIENT_AND_DIFFUSE)
4468        case GL_AMBIENT_AND_DIFFUSE:
4469#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4470            _needed = 4;
4471            break;
4472        default:
4473            _needed = 0;
4474            break;
4475    }
4476    if (_remaining < _needed) {
4477        _exception = 1;
4478        _env->ThrowNew(IAEClass, "length - offset < needed");
4479        goto exit;
4480    }
4481    params_base = (GLfloat *)
4482        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4483    params = params_base + offset;
4484
4485    glGetMaterialfv(
4486        (GLenum)face,
4487        (GLenum)pname,
4488        (GLfloat *)params
4489    );
4490
4491exit:
4492    if (params_base) {
4493        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4494            _exception ? JNI_ABORT: 0);
4495    }
4496}
4497
4498/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
4499static void
4500android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
4501  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
4502    jint _exception = 0;
4503    jarray _array = (jarray) 0;
4504    jint _remaining;
4505    GLfloat *params = (GLfloat *) 0;
4506
4507    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4508    int _needed;
4509    switch (pname) {
4510#if defined(GL_SHININESS)
4511        case GL_SHININESS:
4512#endif // defined(GL_SHININESS)
4513            _needed = 1;
4514            break;
4515#if defined(GL_AMBIENT)
4516        case GL_AMBIENT:
4517#endif // defined(GL_AMBIENT)
4518#if defined(GL_DIFFUSE)
4519        case GL_DIFFUSE:
4520#endif // defined(GL_DIFFUSE)
4521#if defined(GL_SPECULAR)
4522        case GL_SPECULAR:
4523#endif // defined(GL_SPECULAR)
4524#if defined(GL_EMISSION)
4525        case GL_EMISSION:
4526#endif // defined(GL_EMISSION)
4527#if defined(GL_AMBIENT_AND_DIFFUSE)
4528        case GL_AMBIENT_AND_DIFFUSE:
4529#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4530            _needed = 4;
4531            break;
4532        default:
4533            _needed = 0;
4534            break;
4535    }
4536    if (_remaining < _needed) {
4537        _exception = 1;
4538        _env->ThrowNew(IAEClass, "remaining() < needed");
4539        goto exit;
4540    }
4541    glGetMaterialfv(
4542        (GLenum)face,
4543        (GLenum)pname,
4544        (GLfloat *)params
4545    );
4546
4547exit:
4548    if (_array) {
4549        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4550    }
4551}
4552
4553/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
4554static void
4555android_glGetMaterialxv__II_3II
4556  (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
4557    jint _exception = 0;
4558    GLfixed *params_base = (GLfixed *) 0;
4559    jint _remaining;
4560    GLfixed *params = (GLfixed *) 0;
4561
4562    if (!params_ref) {
4563        _exception = 1;
4564        _env->ThrowNew(IAEClass, "params == null");
4565        goto exit;
4566    }
4567    if (offset < 0) {
4568        _exception = 1;
4569        _env->ThrowNew(IAEClass, "offset < 0");
4570        goto exit;
4571    }
4572    _remaining = _env->GetArrayLength(params_ref) - offset;
4573    int _needed;
4574    switch (pname) {
4575#if defined(GL_SHININESS)
4576        case GL_SHININESS:
4577#endif // defined(GL_SHININESS)
4578            _needed = 1;
4579            break;
4580#if defined(GL_AMBIENT)
4581        case GL_AMBIENT:
4582#endif // defined(GL_AMBIENT)
4583#if defined(GL_DIFFUSE)
4584        case GL_DIFFUSE:
4585#endif // defined(GL_DIFFUSE)
4586#if defined(GL_SPECULAR)
4587        case GL_SPECULAR:
4588#endif // defined(GL_SPECULAR)
4589#if defined(GL_EMISSION)
4590        case GL_EMISSION:
4591#endif // defined(GL_EMISSION)
4592#if defined(GL_AMBIENT_AND_DIFFUSE)
4593        case GL_AMBIENT_AND_DIFFUSE:
4594#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4595            _needed = 4;
4596            break;
4597        default:
4598            _needed = 0;
4599            break;
4600    }
4601    if (_remaining < _needed) {
4602        _exception = 1;
4603        _env->ThrowNew(IAEClass, "length - offset < needed");
4604        goto exit;
4605    }
4606    params_base = (GLfixed *)
4607        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4608    params = params_base + offset;
4609
4610    glGetMaterialxv(
4611        (GLenum)face,
4612        (GLenum)pname,
4613        (GLfixed *)params
4614    );
4615
4616exit:
4617    if (params_base) {
4618        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4619            _exception ? JNI_ABORT: 0);
4620    }
4621}
4622
4623/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
4624static void
4625android_glGetMaterialxv__IILjava_nio_IntBuffer_2
4626  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
4627    jint _exception = 0;
4628    jarray _array = (jarray) 0;
4629    jint _remaining;
4630    GLfixed *params = (GLfixed *) 0;
4631
4632    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4633    int _needed;
4634    switch (pname) {
4635#if defined(GL_SHININESS)
4636        case GL_SHININESS:
4637#endif // defined(GL_SHININESS)
4638            _needed = 1;
4639            break;
4640#if defined(GL_AMBIENT)
4641        case GL_AMBIENT:
4642#endif // defined(GL_AMBIENT)
4643#if defined(GL_DIFFUSE)
4644        case GL_DIFFUSE:
4645#endif // defined(GL_DIFFUSE)
4646#if defined(GL_SPECULAR)
4647        case GL_SPECULAR:
4648#endif // defined(GL_SPECULAR)
4649#if defined(GL_EMISSION)
4650        case GL_EMISSION:
4651#endif // defined(GL_EMISSION)
4652#if defined(GL_AMBIENT_AND_DIFFUSE)
4653        case GL_AMBIENT_AND_DIFFUSE:
4654#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4655            _needed = 4;
4656            break;
4657        default:
4658            _needed = 0;
4659            break;
4660    }
4661    if (_remaining < _needed) {
4662        _exception = 1;
4663        _env->ThrowNew(IAEClass, "remaining() < needed");
4664        goto exit;
4665    }
4666    glGetMaterialxv(
4667        (GLenum)face,
4668        (GLenum)pname,
4669        (GLfixed *)params
4670    );
4671
4672exit:
4673    if (_array) {
4674        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4675    }
4676}
4677
4678/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
4679static void
4680android_glGetTexEnviv__II_3II
4681  (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
4682    jint _exception = 0;
4683    GLint *params_base = (GLint *) 0;
4684    jint _remaining;
4685    GLint *params = (GLint *) 0;
4686
4687    if (!params_ref) {
4688        _exception = 1;
4689        _env->ThrowNew(IAEClass, "params == null");
4690        goto exit;
4691    }
4692    if (offset < 0) {
4693        _exception = 1;
4694        _env->ThrowNew(IAEClass, "offset < 0");
4695        goto exit;
4696    }
4697    _remaining = _env->GetArrayLength(params_ref) - offset;
4698    int _needed;
4699    switch (pname) {
4700#if defined(GL_TEXTURE_ENV_MODE)
4701        case GL_TEXTURE_ENV_MODE:
4702#endif // defined(GL_TEXTURE_ENV_MODE)
4703#if defined(GL_COMBINE_RGB)
4704        case GL_COMBINE_RGB:
4705#endif // defined(GL_COMBINE_RGB)
4706#if defined(GL_COMBINE_ALPHA)
4707        case GL_COMBINE_ALPHA:
4708#endif // defined(GL_COMBINE_ALPHA)
4709            _needed = 1;
4710            break;
4711#if defined(GL_TEXTURE_ENV_COLOR)
4712        case GL_TEXTURE_ENV_COLOR:
4713#endif // defined(GL_TEXTURE_ENV_COLOR)
4714            _needed = 4;
4715            break;
4716        default:
4717            _needed = 0;
4718            break;
4719    }
4720    if (_remaining < _needed) {
4721        _exception = 1;
4722        _env->ThrowNew(IAEClass, "length - offset < needed");
4723        goto exit;
4724    }
4725    params_base = (GLint *)
4726        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4727    params = params_base + offset;
4728
4729    glGetTexEnviv(
4730        (GLenum)env,
4731        (GLenum)pname,
4732        (GLint *)params
4733    );
4734
4735exit:
4736    if (params_base) {
4737        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4738            _exception ? JNI_ABORT: 0);
4739    }
4740}
4741
4742/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
4743static void
4744android_glGetTexEnviv__IILjava_nio_IntBuffer_2
4745  (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
4746    jint _exception = 0;
4747    jarray _array = (jarray) 0;
4748    jint _remaining;
4749    GLint *params = (GLint *) 0;
4750
4751    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
4752    int _needed;
4753    switch (pname) {
4754#if defined(GL_TEXTURE_ENV_MODE)
4755        case GL_TEXTURE_ENV_MODE:
4756#endif // defined(GL_TEXTURE_ENV_MODE)
4757#if defined(GL_COMBINE_RGB)
4758        case GL_COMBINE_RGB:
4759#endif // defined(GL_COMBINE_RGB)
4760#if defined(GL_COMBINE_ALPHA)
4761        case GL_COMBINE_ALPHA:
4762#endif // defined(GL_COMBINE_ALPHA)
4763            _needed = 1;
4764            break;
4765#if defined(GL_TEXTURE_ENV_COLOR)
4766        case GL_TEXTURE_ENV_COLOR:
4767#endif // defined(GL_TEXTURE_ENV_COLOR)
4768            _needed = 4;
4769            break;
4770        default:
4771            _needed = 0;
4772            break;
4773    }
4774    if (_remaining < _needed) {
4775        _exception = 1;
4776        _env->ThrowNew(IAEClass, "remaining() < needed");
4777        goto exit;
4778    }
4779    glGetTexEnviv(
4780        (GLenum)env,
4781        (GLenum)pname,
4782        (GLint *)params
4783    );
4784
4785exit:
4786    if (_array) {
4787        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4788    }
4789}
4790
4791/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
4792static void
4793android_glGetTexEnvxv__II_3II
4794  (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
4795    jint _exception = 0;
4796    GLfixed *params_base = (GLfixed *) 0;
4797    jint _remaining;
4798    GLfixed *params = (GLfixed *) 0;
4799
4800    if (!params_ref) {
4801        _exception = 1;
4802        _env->ThrowNew(IAEClass, "params == null");
4803        goto exit;
4804    }
4805    if (offset < 0) {
4806        _exception = 1;
4807        _env->ThrowNew(IAEClass, "offset < 0");
4808        goto exit;
4809    }
4810    _remaining = _env->GetArrayLength(params_ref) - offset;
4811    int _needed;
4812    switch (pname) {
4813#if defined(GL_TEXTURE_ENV_MODE)
4814        case GL_TEXTURE_ENV_MODE:
4815#endif // defined(GL_TEXTURE_ENV_MODE)
4816#if defined(GL_COMBINE_RGB)
4817        case GL_COMBINE_RGB:
4818#endif // defined(GL_COMBINE_RGB)
4819#if defined(GL_COMBINE_ALPHA)
4820        case GL_COMBINE_ALPHA:
4821#endif // defined(GL_COMBINE_ALPHA)
4822            _needed = 1;
4823            break;
4824#if defined(GL_TEXTURE_ENV_COLOR)
4825        case GL_TEXTURE_ENV_COLOR:
4826#endif // defined(GL_TEXTURE_ENV_COLOR)
4827            _needed = 4;
4828            break;
4829        default:
4830            _needed = 0;
4831            break;
4832    }
4833    if (_remaining < _needed) {
4834        _exception = 1;
4835        _env->ThrowNew(IAEClass, "length - offset < needed");
4836        goto exit;
4837    }
4838    params_base = (GLfixed *)
4839        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4840    params = params_base + offset;
4841
4842    glGetTexEnvxv(
4843        (GLenum)env,
4844        (GLenum)pname,
4845        (GLfixed *)params
4846    );
4847
4848exit:
4849    if (params_base) {
4850        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4851            _exception ? JNI_ABORT: 0);
4852    }
4853}
4854
4855/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
4856static void
4857android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
4858  (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
4859    jint _exception = 0;
4860    jarray _array = (jarray) 0;
4861    jint _remaining;
4862    GLfixed *params = (GLfixed *) 0;
4863
4864    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4865    int _needed;
4866    switch (pname) {
4867#if defined(GL_TEXTURE_ENV_MODE)
4868        case GL_TEXTURE_ENV_MODE:
4869#endif // defined(GL_TEXTURE_ENV_MODE)
4870#if defined(GL_COMBINE_RGB)
4871        case GL_COMBINE_RGB:
4872#endif // defined(GL_COMBINE_RGB)
4873#if defined(GL_COMBINE_ALPHA)
4874        case GL_COMBINE_ALPHA:
4875#endif // defined(GL_COMBINE_ALPHA)
4876            _needed = 1;
4877            break;
4878#if defined(GL_TEXTURE_ENV_COLOR)
4879        case GL_TEXTURE_ENV_COLOR:
4880#endif // defined(GL_TEXTURE_ENV_COLOR)
4881            _needed = 4;
4882            break;
4883        default:
4884            _needed = 0;
4885            break;
4886    }
4887    if (_remaining < _needed) {
4888        _exception = 1;
4889        _env->ThrowNew(IAEClass, "remaining() < needed");
4890        goto exit;
4891    }
4892    glGetTexEnvxv(
4893        (GLenum)env,
4894        (GLenum)pname,
4895        (GLfixed *)params
4896    );
4897
4898exit:
4899    if (_array) {
4900        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4901    }
4902}
4903
4904/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
4905static void
4906android_glGetTexParameterfv__II_3FI
4907  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
4908    jint _exception = 0;
4909    GLfloat *params_base = (GLfloat *) 0;
4910    jint _remaining;
4911    GLfloat *params = (GLfloat *) 0;
4912
4913    if (!params_ref) {
4914        _exception = 1;
4915        _env->ThrowNew(IAEClass, "params == null");
4916        goto exit;
4917    }
4918    if (offset < 0) {
4919        _exception = 1;
4920        _env->ThrowNew(IAEClass, "offset < 0");
4921        goto exit;
4922    }
4923    _remaining = _env->GetArrayLength(params_ref) - offset;
4924    if (_remaining < 1) {
4925        _exception = 1;
4926        _env->ThrowNew(IAEClass, "length - offset < 1");
4927        goto exit;
4928    }
4929    params_base = (GLfloat *)
4930        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4931    params = params_base + offset;
4932
4933    glGetTexParameterfv(
4934        (GLenum)target,
4935        (GLenum)pname,
4936        (GLfloat *)params
4937    );
4938
4939exit:
4940    if (params_base) {
4941        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4942            _exception ? JNI_ABORT: 0);
4943    }
4944}
4945
4946/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
4947static void
4948android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
4949  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
4950    jint _exception = 0;
4951    jarray _array = (jarray) 0;
4952    jint _remaining;
4953    GLfloat *params = (GLfloat *) 0;
4954
4955    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4956    if (_remaining < 1) {
4957        _exception = 1;
4958        _env->ThrowNew(IAEClass, "remaining() < 1");
4959        goto exit;
4960    }
4961    glGetTexParameterfv(
4962        (GLenum)target,
4963        (GLenum)pname,
4964        (GLfloat *)params
4965    );
4966
4967exit:
4968    if (_array) {
4969        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4970    }
4971}
4972
4973/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
4974static void
4975android_glGetTexParameteriv__II_3II
4976  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
4977    jint _exception = 0;
4978    GLint *params_base = (GLint *) 0;
4979    jint _remaining;
4980    GLint *params = (GLint *) 0;
4981
4982    if (!params_ref) {
4983        _exception = 1;
4984        _env->ThrowNew(IAEClass, "params == null");
4985        goto exit;
4986    }
4987    if (offset < 0) {
4988        _exception = 1;
4989        _env->ThrowNew(IAEClass, "offset < 0");
4990        goto exit;
4991    }
4992    _remaining = _env->GetArrayLength(params_ref) - offset;
4993    if (_remaining < 1) {
4994        _exception = 1;
4995        _env->ThrowNew(IAEClass, "length - offset < 1");
4996        goto exit;
4997    }
4998    params_base = (GLint *)
4999        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5000    params = params_base + offset;
5001
5002    glGetTexParameteriv(
5003        (GLenum)target,
5004        (GLenum)pname,
5005        (GLint *)params
5006    );
5007
5008exit:
5009    if (params_base) {
5010        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5011            _exception ? JNI_ABORT: 0);
5012    }
5013}
5014
5015/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
5016static void
5017android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
5018  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5019    jint _exception = 0;
5020    jarray _array = (jarray) 0;
5021    jint _remaining;
5022    GLint *params = (GLint *) 0;
5023
5024    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5025    if (_remaining < 1) {
5026        _exception = 1;
5027        _env->ThrowNew(IAEClass, "remaining() < 1");
5028        goto exit;
5029    }
5030    glGetTexParameteriv(
5031        (GLenum)target,
5032        (GLenum)pname,
5033        (GLint *)params
5034    );
5035
5036exit:
5037    if (_array) {
5038        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5039    }
5040}
5041
5042/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
5043static void
5044android_glGetTexParameterxv__II_3II
5045  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5046    jint _exception = 0;
5047    GLfixed *params_base = (GLfixed *) 0;
5048    jint _remaining;
5049    GLfixed *params = (GLfixed *) 0;
5050
5051    if (!params_ref) {
5052        _exception = 1;
5053        _env->ThrowNew(IAEClass, "params == null");
5054        goto exit;
5055    }
5056    if (offset < 0) {
5057        _exception = 1;
5058        _env->ThrowNew(IAEClass, "offset < 0");
5059        goto exit;
5060    }
5061    _remaining = _env->GetArrayLength(params_ref) - offset;
5062    if (_remaining < 1) {
5063        _exception = 1;
5064        _env->ThrowNew(IAEClass, "length - offset < 1");
5065        goto exit;
5066    }
5067    params_base = (GLfixed *)
5068        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5069    params = params_base + offset;
5070
5071    glGetTexParameterxv(
5072        (GLenum)target,
5073        (GLenum)pname,
5074        (GLfixed *)params
5075    );
5076
5077exit:
5078    if (params_base) {
5079        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5080            _exception ? JNI_ABORT: 0);
5081    }
5082}
5083
5084/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
5085static void
5086android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
5087  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5088    jint _exception = 0;
5089    jarray _array = (jarray) 0;
5090    jint _remaining;
5091    GLfixed *params = (GLfixed *) 0;
5092
5093    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5094    if (_remaining < 1) {
5095        _exception = 1;
5096        _env->ThrowNew(IAEClass, "remaining() < 1");
5097        goto exit;
5098    }
5099    glGetTexParameterxv(
5100        (GLenum)target,
5101        (GLenum)pname,
5102        (GLfixed *)params
5103    );
5104
5105exit:
5106    if (_array) {
5107        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5108    }
5109}
5110
5111/* GLboolean glIsBuffer ( GLuint buffer ) */
5112static jboolean
5113android_glIsBuffer__I
5114  (JNIEnv *_env, jobject _this, jint buffer) {
5115    GLboolean _returnValue;
5116    _returnValue = glIsBuffer(
5117        (GLuint)buffer
5118    );
5119    return _returnValue;
5120}
5121
5122/* GLboolean glIsEnabled ( GLenum cap ) */
5123static jboolean
5124android_glIsEnabled__I
5125  (JNIEnv *_env, jobject _this, jint cap) {
5126    GLboolean _returnValue;
5127    _returnValue = glIsEnabled(
5128        (GLenum)cap
5129    );
5130    return _returnValue;
5131}
5132
5133/* GLboolean glIsTexture ( GLuint texture ) */
5134static jboolean
5135android_glIsTexture__I
5136  (JNIEnv *_env, jobject _this, jint texture) {
5137    GLboolean _returnValue;
5138    _returnValue = glIsTexture(
5139        (GLuint)texture
5140    );
5141    return _returnValue;
5142}
5143
5144/* void glNormalPointer ( GLenum type, GLsizei stride, GLint offset ) */
5145static void
5146android_glNormalPointer__III
5147  (JNIEnv *_env, jobject _this, jint type, jint stride, jint offset) {
5148    glNormalPointer(
5149        (GLenum)type,
5150        (GLsizei)stride,
5151        (const GLvoid *)offset
5152    );
5153}
5154
5155/* void glPointParameterf ( GLenum pname, GLfloat param ) */
5156static void
5157android_glPointParameterf__IF
5158  (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
5159    glPointParameterf(
5160        (GLenum)pname,
5161        (GLfloat)param
5162    );
5163}
5164
5165/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
5166static void
5167android_glPointParameterfv__I_3FI
5168  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
5169    GLfloat *params_base = (GLfloat *) 0;
5170    jint _remaining;
5171    GLfloat *params = (GLfloat *) 0;
5172
5173    if (!params_ref) {
5174        _env->ThrowNew(IAEClass, "params == null");
5175        goto exit;
5176    }
5177    if (offset < 0) {
5178        _env->ThrowNew(IAEClass, "offset < 0");
5179        goto exit;
5180    }
5181    _remaining = _env->GetArrayLength(params_ref) - offset;
5182    if (_remaining < 1) {
5183        _env->ThrowNew(IAEClass, "length - offset < 1");
5184        goto exit;
5185    }
5186    params_base = (GLfloat *)
5187        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5188    params = params_base + offset;
5189
5190    glPointParameterfv(
5191        (GLenum)pname,
5192        (GLfloat *)params
5193    );
5194
5195exit:
5196    if (params_base) {
5197        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5198            JNI_ABORT);
5199    }
5200}
5201
5202/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
5203static void
5204android_glPointParameterfv__ILjava_nio_FloatBuffer_2
5205  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5206    jarray _array = (jarray) 0;
5207    jint _remaining;
5208    GLfloat *params = (GLfloat *) 0;
5209
5210    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5211    if (_remaining < 1) {
5212        _env->ThrowNew(IAEClass, "remaining() < 1");
5213        goto exit;
5214    }
5215    glPointParameterfv(
5216        (GLenum)pname,
5217        (GLfloat *)params
5218    );
5219
5220exit:
5221    if (_array) {
5222        releasePointer(_env, _array, params, JNI_FALSE);
5223    }
5224}
5225
5226/* void glPointParameterx ( GLenum pname, GLfixed param ) */
5227static void
5228android_glPointParameterx__II
5229  (JNIEnv *_env, jobject _this, jint pname, jint param) {
5230    glPointParameterx(
5231        (GLenum)pname,
5232        (GLfixed)param
5233    );
5234}
5235
5236/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
5237static void
5238android_glPointParameterxv__I_3II
5239  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
5240    GLfixed *params_base = (GLfixed *) 0;
5241    jint _remaining;
5242    GLfixed *params = (GLfixed *) 0;
5243
5244    if (!params_ref) {
5245        _env->ThrowNew(IAEClass, "params == null");
5246        goto exit;
5247    }
5248    if (offset < 0) {
5249        _env->ThrowNew(IAEClass, "offset < 0");
5250        goto exit;
5251    }
5252    _remaining = _env->GetArrayLength(params_ref) - offset;
5253    if (_remaining < 1) {
5254        _env->ThrowNew(IAEClass, "length - offset < 1");
5255        goto exit;
5256    }
5257    params_base = (GLfixed *)
5258        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5259    params = params_base + offset;
5260
5261    glPointParameterxv(
5262        (GLenum)pname,
5263        (GLfixed *)params
5264    );
5265
5266exit:
5267    if (params_base) {
5268        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5269            JNI_ABORT);
5270    }
5271}
5272
5273/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
5274static void
5275android_glPointParameterxv__ILjava_nio_IntBuffer_2
5276  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5277    jarray _array = (jarray) 0;
5278    jint _remaining;
5279    GLfixed *params = (GLfixed *) 0;
5280
5281    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5282    if (_remaining < 1) {
5283        _env->ThrowNew(IAEClass, "remaining() < 1");
5284        goto exit;
5285    }
5286    glPointParameterxv(
5287        (GLenum)pname,
5288        (GLfixed *)params
5289    );
5290
5291exit:
5292    if (_array) {
5293        releasePointer(_env, _array, params, JNI_FALSE);
5294    }
5295}
5296
5297/* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
5298static void
5299android_glPointSizePointerOES__IILjava_nio_Buffer_2
5300  (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf) {
5301    jarray _array = (jarray) 0;
5302    jint _remaining;
5303    GLvoid *pointer = (GLvoid *) 0;
5304
5305    pointer = (GLvoid *)getPointer(_env, pointer_buf, &_array, &_remaining);
5306    glPointSizePointerOES(
5307        (GLenum)type,
5308        (GLsizei)stride,
5309        (GLvoid *)pointer
5310    );
5311    if (_array) {
5312        releasePointer(_env, _array, pointer, JNI_FALSE);
5313    }
5314}
5315
5316/* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5317static void
5318android_glTexCoordPointer__IIII
5319  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5320    glTexCoordPointer(
5321        (GLint)size,
5322        (GLenum)type,
5323        (GLsizei)stride,
5324        (const GLvoid *)offset
5325    );
5326}
5327
5328/* void glTexEnvi ( GLenum target, GLenum pname, GLint param ) */
5329static void
5330android_glTexEnvi__III
5331  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
5332    glTexEnvi(
5333        (GLenum)target,
5334        (GLenum)pname,
5335        (GLint)param
5336    );
5337}
5338
5339/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
5340static void
5341android_glTexEnviv__II_3II
5342  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5343    GLint *params_base = (GLint *) 0;
5344    jint _remaining;
5345    GLint *params = (GLint *) 0;
5346
5347    if (!params_ref) {
5348        _env->ThrowNew(IAEClass, "params == null");
5349        goto exit;
5350    }
5351    if (offset < 0) {
5352        _env->ThrowNew(IAEClass, "offset < 0");
5353        goto exit;
5354    }
5355    _remaining = _env->GetArrayLength(params_ref) - offset;
5356    int _needed;
5357    switch (pname) {
5358#if defined(GL_TEXTURE_ENV_MODE)
5359        case GL_TEXTURE_ENV_MODE:
5360#endif // defined(GL_TEXTURE_ENV_MODE)
5361#if defined(GL_COMBINE_RGB)
5362        case GL_COMBINE_RGB:
5363#endif // defined(GL_COMBINE_RGB)
5364#if defined(GL_COMBINE_ALPHA)
5365        case GL_COMBINE_ALPHA:
5366#endif // defined(GL_COMBINE_ALPHA)
5367            _needed = 1;
5368            break;
5369#if defined(GL_TEXTURE_ENV_COLOR)
5370        case GL_TEXTURE_ENV_COLOR:
5371#endif // defined(GL_TEXTURE_ENV_COLOR)
5372            _needed = 4;
5373            break;
5374        default:
5375            _needed = 0;
5376            break;
5377    }
5378    if (_remaining < _needed) {
5379        _env->ThrowNew(IAEClass, "length - offset < needed");
5380        goto exit;
5381    }
5382    params_base = (GLint *)
5383        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5384    params = params_base + offset;
5385
5386    glTexEnviv(
5387        (GLenum)target,
5388        (GLenum)pname,
5389        (GLint *)params
5390    );
5391
5392exit:
5393    if (params_base) {
5394        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5395            JNI_ABORT);
5396    }
5397}
5398
5399/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
5400static void
5401android_glTexEnviv__IILjava_nio_IntBuffer_2
5402  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5403    jarray _array = (jarray) 0;
5404    jint _remaining;
5405    GLint *params = (GLint *) 0;
5406
5407    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5408    int _needed;
5409    switch (pname) {
5410#if defined(GL_TEXTURE_ENV_MODE)
5411        case GL_TEXTURE_ENV_MODE:
5412#endif // defined(GL_TEXTURE_ENV_MODE)
5413#if defined(GL_COMBINE_RGB)
5414        case GL_COMBINE_RGB:
5415#endif // defined(GL_COMBINE_RGB)
5416#if defined(GL_COMBINE_ALPHA)
5417        case GL_COMBINE_ALPHA:
5418#endif // defined(GL_COMBINE_ALPHA)
5419            _needed = 1;
5420            break;
5421#if defined(GL_TEXTURE_ENV_COLOR)
5422        case GL_TEXTURE_ENV_COLOR:
5423#endif // defined(GL_TEXTURE_ENV_COLOR)
5424            _needed = 4;
5425            break;
5426        default:
5427            _needed = 0;
5428            break;
5429    }
5430    if (_remaining < _needed) {
5431        _env->ThrowNew(IAEClass, "remaining() < needed");
5432        goto exit;
5433    }
5434    glTexEnviv(
5435        (GLenum)target,
5436        (GLenum)pname,
5437        (GLint *)params
5438    );
5439
5440exit:
5441    if (_array) {
5442        releasePointer(_env, _array, params, JNI_FALSE);
5443    }
5444}
5445
5446/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
5447static void
5448android_glTexParameterfv__II_3FI
5449  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
5450    GLfloat *params_base = (GLfloat *) 0;
5451    jint _remaining;
5452    GLfloat *params = (GLfloat *) 0;
5453
5454    if (!params_ref) {
5455        _env->ThrowNew(IAEClass, "params == null");
5456        goto exit;
5457    }
5458    if (offset < 0) {
5459        _env->ThrowNew(IAEClass, "offset < 0");
5460        goto exit;
5461    }
5462    _remaining = _env->GetArrayLength(params_ref) - offset;
5463    if (_remaining < 1) {
5464        _env->ThrowNew(IAEClass, "length - offset < 1");
5465        goto exit;
5466    }
5467    params_base = (GLfloat *)
5468        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5469    params = params_base + offset;
5470
5471    glTexParameterfv(
5472        (GLenum)target,
5473        (GLenum)pname,
5474        (GLfloat *)params
5475    );
5476
5477exit:
5478    if (params_base) {
5479        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5480            JNI_ABORT);
5481    }
5482}
5483
5484/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
5485static void
5486android_glTexParameterfv__IILjava_nio_FloatBuffer_2
5487  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5488    jarray _array = (jarray) 0;
5489    jint _remaining;
5490    GLfloat *params = (GLfloat *) 0;
5491
5492    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5493    if (_remaining < 1) {
5494        _env->ThrowNew(IAEClass, "remaining() < 1");
5495        goto exit;
5496    }
5497    glTexParameterfv(
5498        (GLenum)target,
5499        (GLenum)pname,
5500        (GLfloat *)params
5501    );
5502
5503exit:
5504    if (_array) {
5505        releasePointer(_env, _array, params, JNI_FALSE);
5506    }
5507}
5508
5509/* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
5510static void
5511android_glTexParameteri__III
5512  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
5513    glTexParameteri(
5514        (GLenum)target,
5515        (GLenum)pname,
5516        (GLint)param
5517    );
5518}
5519
5520/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
5521static void
5522android_glTexParameteriv__II_3II
5523  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5524    GLint *params_base = (GLint *) 0;
5525    jint _remaining;
5526    GLint *params = (GLint *) 0;
5527
5528    if (!params_ref) {
5529        _env->ThrowNew(IAEClass, "params == null");
5530        goto exit;
5531    }
5532    if (offset < 0) {
5533        _env->ThrowNew(IAEClass, "offset < 0");
5534        goto exit;
5535    }
5536    _remaining = _env->GetArrayLength(params_ref) - offset;
5537    if (_remaining < 1) {
5538        _env->ThrowNew(IAEClass, "length - offset < 1");
5539        goto exit;
5540    }
5541    params_base = (GLint *)
5542        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5543    params = params_base + offset;
5544
5545    glTexParameteriv(
5546        (GLenum)target,
5547        (GLenum)pname,
5548        (GLint *)params
5549    );
5550
5551exit:
5552    if (params_base) {
5553        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5554            JNI_ABORT);
5555    }
5556}
5557
5558/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
5559static void
5560android_glTexParameteriv__IILjava_nio_IntBuffer_2
5561  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5562    jarray _array = (jarray) 0;
5563    jint _remaining;
5564    GLint *params = (GLint *) 0;
5565
5566    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5567    if (_remaining < 1) {
5568        _env->ThrowNew(IAEClass, "remaining() < 1");
5569        goto exit;
5570    }
5571    glTexParameteriv(
5572        (GLenum)target,
5573        (GLenum)pname,
5574        (GLint *)params
5575    );
5576
5577exit:
5578    if (_array) {
5579        releasePointer(_env, _array, params, JNI_FALSE);
5580    }
5581}
5582
5583/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
5584static void
5585android_glTexParameterxv__II_3II
5586  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5587    GLfixed *params_base = (GLfixed *) 0;
5588    jint _remaining;
5589    GLfixed *params = (GLfixed *) 0;
5590
5591    if (!params_ref) {
5592        _env->ThrowNew(IAEClass, "params == null");
5593        goto exit;
5594    }
5595    if (offset < 0) {
5596        _env->ThrowNew(IAEClass, "offset < 0");
5597        goto exit;
5598    }
5599    _remaining = _env->GetArrayLength(params_ref) - offset;
5600    if (_remaining < 1) {
5601        _env->ThrowNew(IAEClass, "length - offset < 1");
5602        goto exit;
5603    }
5604    params_base = (GLfixed *)
5605        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5606    params = params_base + offset;
5607
5608    glTexParameterxv(
5609        (GLenum)target,
5610        (GLenum)pname,
5611        (GLfixed *)params
5612    );
5613
5614exit:
5615    if (params_base) {
5616        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5617            JNI_ABORT);
5618    }
5619}
5620
5621/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
5622static void
5623android_glTexParameterxv__IILjava_nio_IntBuffer_2
5624  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5625    jarray _array = (jarray) 0;
5626    jint _remaining;
5627    GLfixed *params = (GLfixed *) 0;
5628
5629    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5630    if (_remaining < 1) {
5631        _env->ThrowNew(IAEClass, "remaining() < 1");
5632        goto exit;
5633    }
5634    glTexParameterxv(
5635        (GLenum)target,
5636        (GLenum)pname,
5637        (GLfixed *)params
5638    );
5639
5640exit:
5641    if (_array) {
5642        releasePointer(_env, _array, params, JNI_FALSE);
5643    }
5644}
5645
5646/* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5647static void
5648android_glVertexPointer__IIII
5649  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5650    glVertexPointer(
5651        (GLint)size,
5652        (GLenum)type,
5653        (GLsizei)stride,
5654        (const GLvoid *)offset
5655    );
5656}
5657
5658/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
5659static void
5660android_glCurrentPaletteMatrixOES__I
5661  (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
5662    _env->ThrowNew(UOEClass,
5663        "glCurrentPaletteMatrixOES");
5664}
5665
5666/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
5667static void
5668android_glDrawTexfOES__FFFFF
5669  (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
5670    glDrawTexfOES(
5671        (GLfloat)x,
5672        (GLfloat)y,
5673        (GLfloat)z,
5674        (GLfloat)width,
5675        (GLfloat)height
5676    );
5677}
5678
5679/* void glDrawTexfvOES ( const GLfloat *coords ) */
5680static void
5681android_glDrawTexfvOES___3FI
5682  (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
5683    GLfloat *coords_base = (GLfloat *) 0;
5684    jint _remaining;
5685    GLfloat *coords = (GLfloat *) 0;
5686
5687    if (!coords_ref) {
5688        _env->ThrowNew(IAEClass, "coords == null");
5689        goto exit;
5690    }
5691    if (offset < 0) {
5692        _env->ThrowNew(IAEClass, "offset < 0");
5693        goto exit;
5694    }
5695    _remaining = _env->GetArrayLength(coords_ref) - offset;
5696    if (_remaining < 5) {
5697        _env->ThrowNew(IAEClass, "length - offset < 5");
5698        goto exit;
5699    }
5700    coords_base = (GLfloat *)
5701        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5702    coords = coords_base + offset;
5703
5704    glDrawTexfvOES(
5705        (GLfloat *)coords
5706    );
5707
5708exit:
5709    if (coords_base) {
5710        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5711            JNI_ABORT);
5712    }
5713}
5714
5715/* void glDrawTexfvOES ( const GLfloat *coords ) */
5716static void
5717android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
5718  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5719    jarray _array = (jarray) 0;
5720    jint _remaining;
5721    GLfloat *coords = (GLfloat *) 0;
5722
5723    coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
5724    if (_remaining < 5) {
5725        _env->ThrowNew(IAEClass, "remaining() < 5");
5726        goto exit;
5727    }
5728    glDrawTexfvOES(
5729        (GLfloat *)coords
5730    );
5731
5732exit:
5733    if (_array) {
5734        releasePointer(_env, _array, coords, JNI_FALSE);
5735    }
5736}
5737
5738/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
5739static void
5740android_glDrawTexiOES__IIIII
5741  (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
5742    glDrawTexiOES(
5743        (GLint)x,
5744        (GLint)y,
5745        (GLint)z,
5746        (GLint)width,
5747        (GLint)height
5748    );
5749}
5750
5751/* void glDrawTexivOES ( const GLint *coords ) */
5752static void
5753android_glDrawTexivOES___3II
5754  (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
5755    GLint *coords_base = (GLint *) 0;
5756    jint _remaining;
5757    GLint *coords = (GLint *) 0;
5758
5759    if (!coords_ref) {
5760        _env->ThrowNew(IAEClass, "coords == null");
5761        goto exit;
5762    }
5763    if (offset < 0) {
5764        _env->ThrowNew(IAEClass, "offset < 0");
5765        goto exit;
5766    }
5767    _remaining = _env->GetArrayLength(coords_ref) - offset;
5768    if (_remaining < 5) {
5769        _env->ThrowNew(IAEClass, "length - offset < 5");
5770        goto exit;
5771    }
5772    coords_base = (GLint *)
5773        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5774    coords = coords_base + offset;
5775
5776    glDrawTexivOES(
5777        (GLint *)coords
5778    );
5779
5780exit:
5781    if (coords_base) {
5782        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5783            JNI_ABORT);
5784    }
5785}
5786
5787/* void glDrawTexivOES ( const GLint *coords ) */
5788static void
5789android_glDrawTexivOES__Ljava_nio_IntBuffer_2
5790  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5791    jarray _array = (jarray) 0;
5792    jint _remaining;
5793    GLint *coords = (GLint *) 0;
5794
5795    coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
5796    if (_remaining < 5) {
5797        _env->ThrowNew(IAEClass, "remaining() < 5");
5798        goto exit;
5799    }
5800    glDrawTexivOES(
5801        (GLint *)coords
5802    );
5803
5804exit:
5805    if (_array) {
5806        releasePointer(_env, _array, coords, JNI_FALSE);
5807    }
5808}
5809
5810/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
5811static void
5812android_glDrawTexsOES__SSSSS
5813  (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
5814    glDrawTexsOES(
5815        (GLshort)x,
5816        (GLshort)y,
5817        (GLshort)z,
5818        (GLshort)width,
5819        (GLshort)height
5820    );
5821}
5822
5823/* void glDrawTexsvOES ( const GLshort *coords ) */
5824static void
5825android_glDrawTexsvOES___3SI
5826  (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
5827    GLshort *coords_base = (GLshort *) 0;
5828    jint _remaining;
5829    GLshort *coords = (GLshort *) 0;
5830
5831    if (!coords_ref) {
5832        _env->ThrowNew(IAEClass, "coords == null");
5833        goto exit;
5834    }
5835    if (offset < 0) {
5836        _env->ThrowNew(IAEClass, "offset < 0");
5837        goto exit;
5838    }
5839    _remaining = _env->GetArrayLength(coords_ref) - offset;
5840    if (_remaining < 5) {
5841        _env->ThrowNew(IAEClass, "length - offset < 5");
5842        goto exit;
5843    }
5844    coords_base = (GLshort *)
5845        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5846    coords = coords_base + offset;
5847
5848    glDrawTexsvOES(
5849        (GLshort *)coords
5850    );
5851
5852exit:
5853    if (coords_base) {
5854        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5855            JNI_ABORT);
5856    }
5857}
5858
5859/* void glDrawTexsvOES ( const GLshort *coords ) */
5860static void
5861android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
5862  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5863    jarray _array = (jarray) 0;
5864    jint _remaining;
5865    GLshort *coords = (GLshort *) 0;
5866
5867    coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
5868    if (_remaining < 5) {
5869        _env->ThrowNew(IAEClass, "remaining() < 5");
5870        goto exit;
5871    }
5872    glDrawTexsvOES(
5873        (GLshort *)coords
5874    );
5875
5876exit:
5877    if (_array) {
5878        releasePointer(_env, _array, coords, JNI_FALSE);
5879    }
5880}
5881
5882/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
5883static void
5884android_glDrawTexxOES__IIIII
5885  (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
5886    glDrawTexxOES(
5887        (GLfixed)x,
5888        (GLfixed)y,
5889        (GLfixed)z,
5890        (GLfixed)width,
5891        (GLfixed)height
5892    );
5893}
5894
5895/* void glDrawTexxvOES ( const GLfixed *coords ) */
5896static void
5897android_glDrawTexxvOES___3II
5898  (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
5899    GLfixed *coords_base = (GLfixed *) 0;
5900    jint _remaining;
5901    GLfixed *coords = (GLfixed *) 0;
5902
5903    if (!coords_ref) {
5904        _env->ThrowNew(IAEClass, "coords == null");
5905        goto exit;
5906    }
5907    if (offset < 0) {
5908        _env->ThrowNew(IAEClass, "offset < 0");
5909        goto exit;
5910    }
5911    _remaining = _env->GetArrayLength(coords_ref) - offset;
5912    if (_remaining < 5) {
5913        _env->ThrowNew(IAEClass, "length - offset < 5");
5914        goto exit;
5915    }
5916    coords_base = (GLfixed *)
5917        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5918    coords = coords_base + offset;
5919
5920    glDrawTexxvOES(
5921        (GLfixed *)coords
5922    );
5923
5924exit:
5925    if (coords_base) {
5926        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5927            JNI_ABORT);
5928    }
5929}
5930
5931/* void glDrawTexxvOES ( const GLfixed *coords ) */
5932static void
5933android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
5934  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5935    jarray _array = (jarray) 0;
5936    jint _remaining;
5937    GLfixed *coords = (GLfixed *) 0;
5938
5939    coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
5940    if (_remaining < 5) {
5941        _env->ThrowNew(IAEClass, "remaining() < 5");
5942        goto exit;
5943    }
5944    glDrawTexxvOES(
5945        (GLfixed *)coords
5946    );
5947
5948exit:
5949    if (_array) {
5950        releasePointer(_env, _array, coords, JNI_FALSE);
5951    }
5952}
5953
5954/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
5955static void
5956android_glLoadPaletteFromModelViewMatrixOES__
5957  (JNIEnv *_env, jobject _this) {
5958    _env->ThrowNew(UOEClass,
5959        "glLoadPaletteFromModelViewMatrixOES");
5960}
5961
5962/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
5963static void
5964android_glMatrixIndexPointerOES__IIILjava_nio_Buffer_2
5965  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf) {
5966    _env->ThrowNew(UOEClass,
5967        "glMatrixIndexPointerOES");
5968}
5969
5970/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5971static void
5972android_glMatrixIndexPointerOES__IIII
5973  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5974    _env->ThrowNew(UOEClass,
5975        "glMatrixIndexPointerOES");
5976}
5977
5978/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
5979static void
5980android_glWeightPointerOES__IIILjava_nio_Buffer_2
5981  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf) {
5982    _env->ThrowNew(UOEClass,
5983        "glWeightPointerOES");
5984}
5985
5986/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5987static void
5988android_glWeightPointerOES__IIII
5989  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5990    _env->ThrowNew(UOEClass,
5991        "glWeightPointerOES");
5992}
5993
5994/* void glBindFramebufferOES ( GLint target, GLint framebuffer ) */
5995static void
5996android_glBindFramebufferOES__II
5997  (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
5998    _env->ThrowNew(UOEClass,
5999        "glBindFramebufferOES");
6000}
6001
6002/* void glBindRenderbufferOES ( GLint target, GLint renderbuffer ) */
6003static void
6004android_glBindRenderbufferOES__II
6005  (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
6006    _env->ThrowNew(UOEClass,
6007        "glBindRenderbufferOES");
6008}
6009
6010/* void glBlendEquation ( GLint mode ) */
6011static void
6012android_glBlendEquation__I
6013  (JNIEnv *_env, jobject _this, jint mode) {
6014    _env->ThrowNew(UOEClass,
6015        "glBlendEquation");
6016}
6017
6018/* void glBlendEquationSeparate ( GLint modeRGB, GLint modeAlpha ) */
6019static void
6020android_glBlendEquationSeparate__II
6021  (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
6022    _env->ThrowNew(UOEClass,
6023        "glBlendEquationSeparate");
6024}
6025
6026/* void glBlendFuncSeparate ( GLint srcRGB, GLint dstRGB, GLint srcAlpha, GLint dstAlpha ) */
6027static void
6028android_glBlendFuncSeparate__IIII
6029  (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
6030    _env->ThrowNew(UOEClass,
6031        "glBlendFuncSeparate");
6032}
6033
6034/* GLint glCheckFramebufferStatusOES ( GLint target ) */
6035static jint
6036android_glCheckFramebufferStatusOES__I
6037  (JNIEnv *_env, jobject _this, jint target) {
6038    _env->ThrowNew(UOEClass,
6039        "glCheckFramebufferStatusOES");
6040    return 0;
6041}
6042
6043/* void glDeleteFramebuffersOES ( GLint n, GLint *framebuffers ) */
6044static void
6045android_glDeleteFramebuffersOES__I_3II
6046  (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
6047    _env->ThrowNew(UOEClass,
6048        "glDeleteFramebuffersOES");
6049}
6050
6051/* void glDeleteFramebuffersOES ( GLint n, GLint *framebuffers ) */
6052static void
6053android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
6054  (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
6055    _env->ThrowNew(UOEClass,
6056        "glDeleteFramebuffersOES");
6057}
6058
6059/* void glDeleteRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6060static void
6061android_glDeleteRenderbuffersOES__I_3II
6062  (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
6063    _env->ThrowNew(UOEClass,
6064        "glDeleteRenderbuffersOES");
6065}
6066
6067/* void glDeleteRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6068static void
6069android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
6070  (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
6071    _env->ThrowNew(UOEClass,
6072        "glDeleteRenderbuffersOES");
6073}
6074
6075/* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */
6076static void
6077android_glFramebufferRenderbufferOES__IIII
6078  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
6079    _env->ThrowNew(UOEClass,
6080        "glFramebufferRenderbufferOES");
6081}
6082
6083/* void glFramebufferTexture2DOES ( GLint target, GLint attachment, GLint textarget, GLint texture, GLint level ) */
6084static void
6085android_glFramebufferTexture2DOES__IIIII
6086  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
6087    _env->ThrowNew(UOEClass,
6088        "glFramebufferTexture2DOES");
6089}
6090
6091/* void glGenerateMipmapOES ( GLint target ) */
6092static void
6093android_glGenerateMipmapOES__I
6094  (JNIEnv *_env, jobject _this, jint target) {
6095    _env->ThrowNew(UOEClass,
6096        "glGenerateMipmapOES");
6097}
6098
6099/* void glGenFramebuffersOES ( GLint n, GLint *framebuffers ) */
6100static void
6101android_glGenFramebuffersOES__I_3II
6102  (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
6103    _env->ThrowNew(UOEClass,
6104        "glGenFramebuffersOES");
6105}
6106
6107/* void glGenFramebuffersOES ( GLint n, GLint *framebuffers ) */
6108static void
6109android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
6110  (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
6111    _env->ThrowNew(UOEClass,
6112        "glGenFramebuffersOES");
6113}
6114
6115/* void glGenRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6116static void
6117android_glGenRenderbuffersOES__I_3II
6118  (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
6119    _env->ThrowNew(UOEClass,
6120        "glGenRenderbuffersOES");
6121}
6122
6123/* void glGenRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6124static void
6125android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
6126  (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
6127    _env->ThrowNew(UOEClass,
6128        "glGenRenderbuffersOES");
6129}
6130
6131/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
6132static void
6133android_glGetFramebufferAttachmentParameterivOES__III_3II
6134  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
6135    _env->ThrowNew(UOEClass,
6136        "glGetFramebufferAttachmentParameterivOES");
6137}
6138
6139/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
6140static void
6141android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
6142  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
6143    _env->ThrowNew(UOEClass,
6144        "glGetFramebufferAttachmentParameterivOES");
6145}
6146
6147/* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
6148static void
6149android_glGetRenderbufferParameterivOES__II_3II
6150  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6151    _env->ThrowNew(UOEClass,
6152        "glGetRenderbufferParameterivOES");
6153}
6154
6155/* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
6156static void
6157android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
6158  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6159    _env->ThrowNew(UOEClass,
6160        "glGetRenderbufferParameterivOES");
6161}
6162
6163/* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6164static void
6165android_glGetTexGenfv__II_3FI
6166  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
6167    _env->ThrowNew(UOEClass,
6168        "glGetTexGenfv");
6169}
6170
6171/* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6172static void
6173android_glGetTexGenfv__IILjava_nio_FloatBuffer_2
6174  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6175    _env->ThrowNew(UOEClass,
6176        "glGetTexGenfv");
6177}
6178
6179/* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6180static void
6181android_glGetTexGeniv__II_3II
6182  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6183    _env->ThrowNew(UOEClass,
6184        "glGetTexGeniv");
6185}
6186
6187/* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6188static void
6189android_glGetTexGeniv__IILjava_nio_IntBuffer_2
6190  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6191    _env->ThrowNew(UOEClass,
6192        "glGetTexGeniv");
6193}
6194
6195/* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6196static void
6197android_glGetTexGenxv__II_3II
6198  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6199    _env->ThrowNew(UOEClass,
6200        "glGetTexGenxv");
6201}
6202
6203/* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6204static void
6205android_glGetTexGenxv__IILjava_nio_IntBuffer_2
6206  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6207    _env->ThrowNew(UOEClass,
6208        "glGetTexGenxv");
6209}
6210
6211/* GLboolean glIsFramebufferOES ( GLint framebuffer ) */
6212static jboolean
6213android_glIsFramebufferOES__I
6214  (JNIEnv *_env, jobject _this, jint framebuffer) {
6215    _env->ThrowNew(UOEClass,
6216        "glIsFramebufferOES");
6217    return JNI_FALSE;
6218}
6219
6220/* GLboolean glIsRenderbufferOES ( GLint renderbuffer ) */
6221static jboolean
6222android_glIsRenderbufferOES__I
6223  (JNIEnv *_env, jobject _this, jint renderbuffer) {
6224    _env->ThrowNew(UOEClass,
6225        "glIsRenderbufferOES");
6226    return JNI_FALSE;
6227}
6228
6229/* void glRenderbufferStorageOES ( GLint target, GLint internalformat, GLint width, GLint height ) */
6230static void
6231android_glRenderbufferStorageOES__IIII
6232  (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
6233    _env->ThrowNew(UOEClass,
6234        "glRenderbufferStorageOES");
6235}
6236
6237/* void glTexGenf ( GLint coord, GLint pname, GLfloat param ) */
6238static void
6239android_glTexGenf__IIF
6240  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
6241    _env->ThrowNew(UOEClass,
6242        "glTexGenf");
6243}
6244
6245/* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6246static void
6247android_glTexGenfv__II_3FI
6248  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
6249    _env->ThrowNew(UOEClass,
6250        "glTexGenfv");
6251}
6252
6253/* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6254static void
6255android_glTexGenfv__IILjava_nio_FloatBuffer_2
6256  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6257    _env->ThrowNew(UOEClass,
6258        "glTexGenfv");
6259}
6260
6261/* void glTexGeni ( GLint coord, GLint pname, GLint param ) */
6262static void
6263android_glTexGeni__III
6264  (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
6265    _env->ThrowNew(UOEClass,
6266        "glTexGeni");
6267}
6268
6269/* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6270static void
6271android_glTexGeniv__II_3II
6272  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6273    _env->ThrowNew(UOEClass,
6274        "glTexGeniv");
6275}
6276
6277/* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6278static void
6279android_glTexGeniv__IILjava_nio_IntBuffer_2
6280  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6281    _env->ThrowNew(UOEClass,
6282        "glTexGeniv");
6283}
6284
6285/* void glTexGenx ( GLint coord, GLint pname, GLint param ) */
6286static void
6287android_glTexGenx__III
6288  (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
6289    _env->ThrowNew(UOEClass,
6290        "glTexGenx");
6291}
6292
6293/* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6294static void
6295android_glTexGenxv__II_3II
6296  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6297    _env->ThrowNew(UOEClass,
6298        "glTexGenxv");
6299}
6300
6301/* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6302static void
6303android_glTexGenxv__IILjava_nio_IntBuffer_2
6304  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6305    _env->ThrowNew(UOEClass,
6306        "glTexGenxv");
6307}
6308
6309static const char *classPathName = "com/google/android/gles_jni/GLImpl";
6310
6311static JNINativeMethod methods[] = {
6312{"_nativeClassInit", "()V", (void*)nativeClassInit },
6313{"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I },
6314{"glAlphaFunc", "(IF)V", (void *) android_glAlphaFunc__IF },
6315{"glAlphaFuncx", "(II)V", (void *) android_glAlphaFuncx__II },
6316{"glBindTexture", "(II)V", (void *) android_glBindTexture__II },
6317{"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II },
6318{"glClear", "(I)V", (void *) android_glClear__I },
6319{"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF },
6320{"glClearColorx", "(IIII)V", (void *) android_glClearColorx__IIII },
6321{"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F },
6322{"glClearDepthx", "(I)V", (void *) android_glClearDepthx__I },
6323{"glClearStencil", "(I)V", (void *) android_glClearStencil__I },
6324{"glClientActiveTexture", "(I)V", (void *) android_glClientActiveTexture__I },
6325{"glColor4f", "(FFFF)V", (void *) android_glColor4f__FFFF },
6326{"glColor4x", "(IIII)V", (void *) android_glColor4x__IIII },
6327{"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ },
6328{"glColorPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glColorPointerBounds__IIILjava_nio_Buffer_2I },
6329{"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 },
6330{"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6331{"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII },
6332{"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII },
6333{"glCullFace", "(I)V", (void *) android_glCullFace__I },
6334{"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II },
6335{"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 },
6336{"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I },
6337{"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z },
6338{"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF },
6339{"glDepthRangex", "(II)V", (void *) android_glDepthRangex__II },
6340{"glDisable", "(I)V", (void *) android_glDisable__I },
6341{"glDisableClientState", "(I)V", (void *) android_glDisableClientState__I },
6342{"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
6343{"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
6344{"glEnable", "(I)V", (void *) android_glEnable__I },
6345{"glEnableClientState", "(I)V", (void *) android_glEnableClientState__I },
6346{"glFinish", "()V", (void *) android_glFinish__ },
6347{"glFlush", "()V", (void *) android_glFlush__ },
6348{"glFogf", "(IF)V", (void *) android_glFogf__IF },
6349{"glFogfv", "(I[FI)V", (void *) android_glFogfv__I_3FI },
6350{"glFogfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glFogfv__ILjava_nio_FloatBuffer_2 },
6351{"glFogx", "(II)V", (void *) android_glFogx__II },
6352{"glFogxv", "(I[II)V", (void *) android_glFogxv__I_3II },
6353{"glFogxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxv__ILjava_nio_IntBuffer_2 },
6354{"glFrontFace", "(I)V", (void *) android_glFrontFace__I },
6355{"glFrustumf", "(FFFFFF)V", (void *) android_glFrustumf__FFFFFF },
6356{"glFrustumx", "(IIIIII)V", (void *) android_glFrustumx__IIIIII },
6357{"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II },
6358{"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 },
6359{"glGetError", "()I", (void *) android_glGetError__ },
6360{"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II },
6361{"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 },
6362{"_glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
6363{"glHint", "(II)V", (void *) android_glHint__II },
6364{"glLightModelf", "(IF)V", (void *) android_glLightModelf__IF },
6365{"glLightModelfv", "(I[FI)V", (void *) android_glLightModelfv__I_3FI },
6366{"glLightModelfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glLightModelfv__ILjava_nio_FloatBuffer_2 },
6367{"glLightModelx", "(II)V", (void *) android_glLightModelx__II },
6368{"glLightModelxv", "(I[II)V", (void *) android_glLightModelxv__I_3II },
6369{"glLightModelxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxv__ILjava_nio_IntBuffer_2 },
6370{"glLightf", "(IIF)V", (void *) android_glLightf__IIF },
6371{"glLightfv", "(II[FI)V", (void *) android_glLightfv__II_3FI },
6372{"glLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glLightfv__IILjava_nio_FloatBuffer_2 },
6373{"glLightx", "(III)V", (void *) android_glLightx__III },
6374{"glLightxv", "(II[II)V", (void *) android_glLightxv__II_3II },
6375{"glLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxv__IILjava_nio_IntBuffer_2 },
6376{"glLineWidth", "(F)V", (void *) android_glLineWidth__F },
6377{"glLineWidthx", "(I)V", (void *) android_glLineWidthx__I },
6378{"glLoadIdentity", "()V", (void *) android_glLoadIdentity__ },
6379{"glLoadMatrixf", "([FI)V", (void *) android_glLoadMatrixf___3FI },
6380{"glLoadMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 },
6381{"glLoadMatrixx", "([II)V", (void *) android_glLoadMatrixx___3II },
6382{"glLoadMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixx__Ljava_nio_IntBuffer_2 },
6383{"glLogicOp", "(I)V", (void *) android_glLogicOp__I },
6384{"glMaterialf", "(IIF)V", (void *) android_glMaterialf__IIF },
6385{"glMaterialfv", "(II[FI)V", (void *) android_glMaterialfv__II_3FI },
6386{"glMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glMaterialfv__IILjava_nio_FloatBuffer_2 },
6387{"glMaterialx", "(III)V", (void *) android_glMaterialx__III },
6388{"glMaterialxv", "(II[II)V", (void *) android_glMaterialxv__II_3II },
6389{"glMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxv__IILjava_nio_IntBuffer_2 },
6390{"glMatrixMode", "(I)V", (void *) android_glMatrixMode__I },
6391{"glMultMatrixf", "([FI)V", (void *) android_glMultMatrixf___3FI },
6392{"glMultMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glMultMatrixf__Ljava_nio_FloatBuffer_2 },
6393{"glMultMatrixx", "([II)V", (void *) android_glMultMatrixx___3II },
6394{"glMultMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixx__Ljava_nio_IntBuffer_2 },
6395{"glMultiTexCoord4f", "(IFFFF)V", (void *) android_glMultiTexCoord4f__IFFFF },
6396{"glMultiTexCoord4x", "(IIIII)V", (void *) android_glMultiTexCoord4x__IIIII },
6397{"glNormal3f", "(FFF)V", (void *) android_glNormal3f__FFF },
6398{"glNormal3x", "(III)V", (void *) android_glNormal3x__III },
6399{"glNormalPointerBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glNormalPointerBounds__IILjava_nio_Buffer_2I },
6400{"glOrthof", "(FFFFFF)V", (void *) android_glOrthof__FFFFFF },
6401{"glOrthox", "(IIIIII)V", (void *) android_glOrthox__IIIIII },
6402{"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II },
6403{"glPointSize", "(F)V", (void *) android_glPointSize__F },
6404{"glPointSizex", "(I)V", (void *) android_glPointSizex__I },
6405{"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF },
6406{"glPolygonOffsetx", "(II)V", (void *) android_glPolygonOffsetx__II },
6407{"glPopMatrix", "()V", (void *) android_glPopMatrix__ },
6408{"glPushMatrix", "()V", (void *) android_glPushMatrix__ },
6409{"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 },
6410{"glRotatef", "(FFFF)V", (void *) android_glRotatef__FFFF },
6411{"glRotatex", "(IIII)V", (void *) android_glRotatex__IIII },
6412{"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ },
6413{"glSampleCoveragex", "(IZ)V", (void *) android_glSampleCoveragex__IZ },
6414{"glScalef", "(FFF)V", (void *) android_glScalef__FFF },
6415{"glScalex", "(III)V", (void *) android_glScalex__III },
6416{"glScissor", "(IIII)V", (void *) android_glScissor__IIII },
6417{"glShadeModel", "(I)V", (void *) android_glShadeModel__I },
6418{"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III },
6419{"glStencilMask", "(I)V", (void *) android_glStencilMask__I },
6420{"glStencilOp", "(III)V", (void *) android_glStencilOp__III },
6421{"glTexCoordPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I },
6422{"glTexEnvf", "(IIF)V", (void *) android_glTexEnvf__IIF },
6423{"glTexEnvfv", "(II[FI)V", (void *) android_glTexEnvfv__II_3FI },
6424{"glTexEnvfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexEnvfv__IILjava_nio_FloatBuffer_2 },
6425{"glTexEnvx", "(III)V", (void *) android_glTexEnvx__III },
6426{"glTexEnvxv", "(II[II)V", (void *) android_glTexEnvxv__II_3II },
6427{"glTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxv__IILjava_nio_IntBuffer_2 },
6428{"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 },
6429{"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF },
6430{"glTexParameterx", "(III)V", (void *) android_glTexParameterx__III },
6431{"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6432{"glTranslatef", "(FFF)V", (void *) android_glTranslatef__FFF },
6433{"glTranslatex", "(III)V", (void *) android_glTranslatex__III },
6434{"glVertexPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glVertexPointerBounds__IIILjava_nio_Buffer_2I },
6435{"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
6436{"glQueryMatrixxOES", "([II[II)I", (void *) android_glQueryMatrixxOES___3II_3II },
6437{"glQueryMatrixxOES", "(Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)I", (void *) android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
6438{"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II },
6439{"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I },
6440{"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 },
6441{"glClipPlanef", "(I[FI)V", (void *) android_glClipPlanef__I_3FI },
6442{"glClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanef__ILjava_nio_FloatBuffer_2 },
6443{"glClipPlanex", "(I[II)V", (void *) android_glClipPlanex__I_3II },
6444{"glClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanex__ILjava_nio_IntBuffer_2 },
6445{"glColor4ub", "(BBBB)V", (void *) android_glColor4ub__BBBB },
6446{"glColorPointer", "(IIII)V", (void *) android_glColorPointer__IIII },
6447{"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II },
6448{"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 },
6449{"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
6450{"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II },
6451{"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 },
6452{"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI },
6453{"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 },
6454{"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II },
6455{"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 },
6456{"glGetClipPlanef", "(I[FI)V", (void *) android_glGetClipPlanef__I_3FI },
6457{"glGetClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 },
6458{"glGetClipPlanex", "(I[II)V", (void *) android_glGetClipPlanex__I_3II },
6459{"glGetClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanex__ILjava_nio_IntBuffer_2 },
6460{"glGetFixedv", "(I[II)V", (void *) android_glGetFixedv__I_3II },
6461{"glGetFixedv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedv__ILjava_nio_IntBuffer_2 },
6462{"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI },
6463{"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 },
6464{"glGetLightfv", "(II[FI)V", (void *) android_glGetLightfv__II_3FI },
6465{"glGetLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetLightfv__IILjava_nio_FloatBuffer_2 },
6466{"glGetLightxv", "(II[II)V", (void *) android_glGetLightxv__II_3II },
6467{"glGetLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxv__IILjava_nio_IntBuffer_2 },
6468{"glGetMaterialfv", "(II[FI)V", (void *) android_glGetMaterialfv__II_3FI },
6469{"glGetMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 },
6470{"glGetMaterialxv", "(II[II)V", (void *) android_glGetMaterialxv__II_3II },
6471{"glGetMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxv__IILjava_nio_IntBuffer_2 },
6472{"glGetTexEnviv", "(II[II)V", (void *) android_glGetTexEnviv__II_3II },
6473{"glGetTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnviv__IILjava_nio_IntBuffer_2 },
6474{"glGetTexEnvxv", "(II[II)V", (void *) android_glGetTexEnvxv__II_3II },
6475{"glGetTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 },
6476{"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI },
6477{"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 },
6478{"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II },
6479{"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 },
6480{"glGetTexParameterxv", "(II[II)V", (void *) android_glGetTexParameterxv__II_3II },
6481{"glGetTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 },
6482{"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I },
6483{"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I },
6484{"glIsTexture", "(I)Z", (void *) android_glIsTexture__I },
6485{"glNormalPointer", "(III)V", (void *) android_glNormalPointer__III },
6486{"glPointParameterf", "(IF)V", (void *) android_glPointParameterf__IF },
6487{"glPointParameterfv", "(I[FI)V", (void *) android_glPointParameterfv__I_3FI },
6488{"glPointParameterfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glPointParameterfv__ILjava_nio_FloatBuffer_2 },
6489{"glPointParameterx", "(II)V", (void *) android_glPointParameterx__II },
6490{"glPointParameterxv", "(I[II)V", (void *) android_glPointParameterxv__I_3II },
6491{"glPointParameterxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxv__ILjava_nio_IntBuffer_2 },
6492{"glPointSizePointerOES", "(IILjava/nio/Buffer;)V", (void *) android_glPointSizePointerOES__IILjava_nio_Buffer_2 },
6493{"glTexCoordPointer", "(IIII)V", (void *) android_glTexCoordPointer__IIII },
6494{"glTexEnvi", "(III)V", (void *) android_glTexEnvi__III },
6495{"glTexEnviv", "(II[II)V", (void *) android_glTexEnviv__II_3II },
6496{"glTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnviv__IILjava_nio_IntBuffer_2 },
6497{"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI },
6498{"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 },
6499{"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III },
6500{"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II },
6501{"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 },
6502{"glTexParameterxv", "(II[II)V", (void *) android_glTexParameterxv__II_3II },
6503{"glTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxv__IILjava_nio_IntBuffer_2 },
6504{"glVertexPointer", "(IIII)V", (void *) android_glVertexPointer__IIII },
6505{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
6506{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
6507{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
6508{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
6509{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
6510{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
6511{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
6512{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
6513{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
6514{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
6515{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
6516{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
6517{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
6518{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
6519{"glMatrixIndexPointerOES", "(IIILjava/nio/Buffer;)V", (void *) android_glMatrixIndexPointerOES__IIILjava_nio_Buffer_2 },
6520{"glMatrixIndexPointerOES", "(IIII)V", (void *) android_glMatrixIndexPointerOES__IIII },
6521{"glWeightPointerOES", "(IIILjava/nio/Buffer;)V", (void *) android_glWeightPointerOES__IIILjava_nio_Buffer_2 },
6522{"glWeightPointerOES", "(IIII)V", (void *) android_glWeightPointerOES__IIII },
6523{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
6524{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
6525{"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I },
6526{"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II },
6527{"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII },
6528{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
6529{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
6530{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
6531{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
6532{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
6533{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
6534{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
6535{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
6536{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
6537{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
6538{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
6539{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
6540{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
6541{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
6542{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
6543{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
6544{"glGetTexGenfv", "(II[FI)V", (void *) android_glGetTexGenfv__II_3FI },
6545{"glGetTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 },
6546{"glGetTexGeniv", "(II[II)V", (void *) android_glGetTexGeniv__II_3II },
6547{"glGetTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGeniv__IILjava_nio_IntBuffer_2 },
6548{"glGetTexGenxv", "(II[II)V", (void *) android_glGetTexGenxv__II_3II },
6549{"glGetTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxv__IILjava_nio_IntBuffer_2 },
6550{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
6551{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
6552{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
6553{"glTexGenf", "(IIF)V", (void *) android_glTexGenf__IIF },
6554{"glTexGenfv", "(II[FI)V", (void *) android_glTexGenfv__II_3FI },
6555{"glTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfv__IILjava_nio_FloatBuffer_2 },
6556{"glTexGeni", "(III)V", (void *) android_glTexGeni__III },
6557{"glTexGeniv", "(II[II)V", (void *) android_glTexGeniv__II_3II },
6558{"glTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGeniv__IILjava_nio_IntBuffer_2 },
6559{"glTexGenx", "(III)V", (void *) android_glTexGenx__III },
6560{"glTexGenxv", "(II[II)V", (void *) android_glTexGenxv__II_3II },
6561{"glTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxv__IILjava_nio_IntBuffer_2 },
6562};
6563
6564int register_com_google_android_gles_jni_GLImpl(JNIEnv *_env)
6565{
6566    int err;
6567    err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
6568    return err;
6569}
6570