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