com_google_android_gles_jni_GLImpl.cpp revision c620a52b69a5f29563e06497e30877809f5d67a5
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        if (_remaining < size) {
3597            _env->ThrowNew(IAEClass, "remaining() < size");
3598            goto exit;
3599        }
3600    }
3601    glBufferData(
3602        (GLenum)target,
3603        (GLsizeiptr)size,
3604        (GLvoid *)data,
3605        (GLenum)usage
3606    );
3607
3608exit:
3609    if (_array) {
3610        releasePointer(_env, _array, data, JNI_FALSE);
3611    }
3612}
3613
3614/* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
3615static void
3616android_glBufferSubData__IIILjava_nio_Buffer_2
3617  (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
3618    jarray _array = (jarray) 0;
3619    jint _remaining;
3620    GLvoid *data = (GLvoid *) 0;
3621
3622    data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
3623    if (_remaining < size) {
3624        _env->ThrowNew(IAEClass, "remaining() < size");
3625        goto exit;
3626    }
3627    glBufferSubData(
3628        (GLenum)target,
3629        (GLintptr)offset,
3630        (GLsizeiptr)size,
3631        (GLvoid *)data
3632    );
3633
3634exit:
3635    if (_array) {
3636        releasePointer(_env, _array, data, JNI_FALSE);
3637    }
3638}
3639
3640/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
3641static void
3642android_glClipPlanef__I_3FI
3643  (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
3644    GLfloat *equation_base = (GLfloat *) 0;
3645    jint _remaining;
3646    GLfloat *equation = (GLfloat *) 0;
3647
3648    if (!equation_ref) {
3649        _env->ThrowNew(IAEClass, "equation == null");
3650        goto exit;
3651    }
3652    if (offset < 0) {
3653        _env->ThrowNew(IAEClass, "offset < 0");
3654        goto exit;
3655    }
3656    _remaining = _env->GetArrayLength(equation_ref) - offset;
3657    if (_remaining < 4) {
3658        _env->ThrowNew(IAEClass, "length - offset < 4");
3659        goto exit;
3660    }
3661    equation_base = (GLfloat *)
3662        _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
3663    equation = equation_base + offset;
3664
3665    glClipPlanef(
3666        (GLenum)plane,
3667        (GLfloat *)equation
3668    );
3669
3670exit:
3671    if (equation_base) {
3672        _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
3673            JNI_ABORT);
3674    }
3675}
3676
3677/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
3678static void
3679android_glClipPlanef__ILjava_nio_FloatBuffer_2
3680  (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
3681    jarray _array = (jarray) 0;
3682    jint _remaining;
3683    GLfloat *equation = (GLfloat *) 0;
3684
3685    equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
3686    if (_remaining < 4) {
3687        _env->ThrowNew(IAEClass, "remaining() < 4");
3688        goto exit;
3689    }
3690    glClipPlanef(
3691        (GLenum)plane,
3692        (GLfloat *)equation
3693    );
3694
3695exit:
3696    if (_array) {
3697        releasePointer(_env, _array, equation, JNI_FALSE);
3698    }
3699}
3700
3701/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
3702static void
3703android_glClipPlanex__I_3II
3704  (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
3705    GLfixed *equation_base = (GLfixed *) 0;
3706    jint _remaining;
3707    GLfixed *equation = (GLfixed *) 0;
3708
3709    if (!equation_ref) {
3710        _env->ThrowNew(IAEClass, "equation == null");
3711        goto exit;
3712    }
3713    if (offset < 0) {
3714        _env->ThrowNew(IAEClass, "offset < 0");
3715        goto exit;
3716    }
3717    _remaining = _env->GetArrayLength(equation_ref) - offset;
3718    if (_remaining < 4) {
3719        _env->ThrowNew(IAEClass, "length - offset < 4");
3720        goto exit;
3721    }
3722    equation_base = (GLfixed *)
3723        _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
3724    equation = equation_base + offset;
3725
3726    glClipPlanex(
3727        (GLenum)plane,
3728        (GLfixed *)equation
3729    );
3730
3731exit:
3732    if (equation_base) {
3733        _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
3734            JNI_ABORT);
3735    }
3736}
3737
3738/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
3739static void
3740android_glClipPlanex__ILjava_nio_IntBuffer_2
3741  (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
3742    jarray _array = (jarray) 0;
3743    jint _remaining;
3744    GLfixed *equation = (GLfixed *) 0;
3745
3746    equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
3747    if (_remaining < 4) {
3748        _env->ThrowNew(IAEClass, "remaining() < 4");
3749        goto exit;
3750    }
3751    glClipPlanex(
3752        (GLenum)plane,
3753        (GLfixed *)equation
3754    );
3755
3756exit:
3757    if (_array) {
3758        releasePointer(_env, _array, equation, JNI_FALSE);
3759    }
3760}
3761
3762/* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */
3763static void
3764android_glColor4ub__BBBB
3765  (JNIEnv *_env, jobject _this, jbyte red, jbyte green, jbyte blue, jbyte alpha) {
3766    glColor4ub(
3767        (GLubyte)red,
3768        (GLubyte)green,
3769        (GLubyte)blue,
3770        (GLubyte)alpha
3771    );
3772}
3773
3774/* void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
3775static void
3776android_glColorPointer__IIII
3777  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
3778    glColorPointer(
3779        (GLint)size,
3780        (GLenum)type,
3781        (GLsizei)stride,
3782        (const GLvoid *)offset
3783    );
3784}
3785
3786/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
3787static void
3788android_glDeleteBuffers__I_3II
3789  (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
3790    GLuint *buffers_base = (GLuint *) 0;
3791    jint _remaining;
3792    GLuint *buffers = (GLuint *) 0;
3793
3794    if (!buffers_ref) {
3795        _env->ThrowNew(IAEClass, "buffers == null");
3796        goto exit;
3797    }
3798    if (offset < 0) {
3799        _env->ThrowNew(IAEClass, "offset < 0");
3800        goto exit;
3801    }
3802    _remaining = _env->GetArrayLength(buffers_ref) - offset;
3803    if (_remaining < n) {
3804        _env->ThrowNew(IAEClass, "length - offset < n");
3805        goto exit;
3806    }
3807    buffers_base = (GLuint *)
3808        _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
3809    buffers = buffers_base + offset;
3810
3811    glDeleteBuffers(
3812        (GLsizei)n,
3813        (GLuint *)buffers
3814    );
3815
3816exit:
3817    if (buffers_base) {
3818        _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
3819            JNI_ABORT);
3820    }
3821}
3822
3823/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
3824static void
3825android_glDeleteBuffers__ILjava_nio_IntBuffer_2
3826  (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
3827    jarray _array = (jarray) 0;
3828    jint _remaining;
3829    GLuint *buffers = (GLuint *) 0;
3830
3831    buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
3832    if (_remaining < n) {
3833        _env->ThrowNew(IAEClass, "remaining() < n");
3834        goto exit;
3835    }
3836    glDeleteBuffers(
3837        (GLsizei)n,
3838        (GLuint *)buffers
3839    );
3840
3841exit:
3842    if (_array) {
3843        releasePointer(_env, _array, buffers, JNI_FALSE);
3844    }
3845}
3846
3847/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
3848static void
3849android_glDrawElements__IIII
3850  (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
3851    glDrawElements(
3852        (GLenum)mode,
3853        (GLsizei)count,
3854        (GLenum)type,
3855        (const GLvoid *)offset
3856    );
3857}
3858
3859/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
3860static void
3861android_glGenBuffers__I_3II
3862  (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
3863    jint _exception = 0;
3864    GLuint *buffers_base = (GLuint *) 0;
3865    jint _remaining;
3866    GLuint *buffers = (GLuint *) 0;
3867
3868    if (!buffers_ref) {
3869        _exception = 1;
3870        _env->ThrowNew(IAEClass, "buffers == null");
3871        goto exit;
3872    }
3873    if (offset < 0) {
3874        _exception = 1;
3875        _env->ThrowNew(IAEClass, "offset < 0");
3876        goto exit;
3877    }
3878    _remaining = _env->GetArrayLength(buffers_ref) - offset;
3879    if (_remaining < n) {
3880        _exception = 1;
3881        _env->ThrowNew(IAEClass, "length - offset < n");
3882        goto exit;
3883    }
3884    buffers_base = (GLuint *)
3885        _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
3886    buffers = buffers_base + offset;
3887
3888    glGenBuffers(
3889        (GLsizei)n,
3890        (GLuint *)buffers
3891    );
3892
3893exit:
3894    if (buffers_base) {
3895        _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
3896            _exception ? JNI_ABORT: 0);
3897    }
3898}
3899
3900/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
3901static void
3902android_glGenBuffers__ILjava_nio_IntBuffer_2
3903  (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
3904    jint _exception = 0;
3905    jarray _array = (jarray) 0;
3906    jint _remaining;
3907    GLuint *buffers = (GLuint *) 0;
3908
3909    buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
3910    if (_remaining < n) {
3911        _exception = 1;
3912        _env->ThrowNew(IAEClass, "remaining() < n");
3913        goto exit;
3914    }
3915    glGenBuffers(
3916        (GLsizei)n,
3917        (GLuint *)buffers
3918    );
3919
3920exit:
3921    if (_array) {
3922        releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE);
3923    }
3924}
3925
3926/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
3927static void
3928android_glGetBooleanv__I_3ZI
3929  (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
3930    jint _exception = 0;
3931    GLboolean *params_base = (GLboolean *) 0;
3932    jint _remaining;
3933    GLboolean *params = (GLboolean *) 0;
3934
3935    if (!params_ref) {
3936        _exception = 1;
3937        _env->ThrowNew(IAEClass, "params == null");
3938        goto exit;
3939    }
3940    if (offset < 0) {
3941        _exception = 1;
3942        _env->ThrowNew(IAEClass, "offset < 0");
3943        goto exit;
3944    }
3945    _remaining = _env->GetArrayLength(params_ref) - offset;
3946    params_base = (GLboolean *)
3947        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3948    params = params_base + offset;
3949
3950    glGetBooleanv(
3951        (GLenum)pname,
3952        (GLboolean *)params
3953    );
3954
3955exit:
3956    if (params_base) {
3957        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3958            _exception ? JNI_ABORT: 0);
3959    }
3960}
3961
3962/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
3963static void
3964android_glGetBooleanv__ILjava_nio_IntBuffer_2
3965  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
3966    jint _exception = 0;
3967    jarray _array = (jarray) 0;
3968    jint _remaining;
3969    GLboolean *params = (GLboolean *) 0;
3970
3971    params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining);
3972    glGetBooleanv(
3973        (GLenum)pname,
3974        (GLboolean *)params
3975    );
3976    if (_array) {
3977        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3978    }
3979}
3980
3981/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3982static void
3983android_glGetBufferParameteriv__II_3II
3984  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3985    _env->ThrowNew(UOEClass,
3986        "glGetBufferParameteriv");
3987}
3988
3989/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3990static void
3991android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
3992  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3993    _env->ThrowNew(UOEClass,
3994        "glGetBufferParameteriv");
3995}
3996
3997/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
3998static void
3999android_glGetClipPlanef__I_3FI
4000  (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
4001    jint _exception = 0;
4002    GLfloat *eqn_base = (GLfloat *) 0;
4003    jint _remaining;
4004    GLfloat *eqn = (GLfloat *) 0;
4005
4006    if (!eqn_ref) {
4007        _exception = 1;
4008        _env->ThrowNew(IAEClass, "eqn == null");
4009        goto exit;
4010    }
4011    if (offset < 0) {
4012        _exception = 1;
4013        _env->ThrowNew(IAEClass, "offset < 0");
4014        goto exit;
4015    }
4016    _remaining = _env->GetArrayLength(eqn_ref) - offset;
4017    eqn_base = (GLfloat *)
4018        _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
4019    eqn = eqn_base + offset;
4020
4021    glGetClipPlanef(
4022        (GLenum)pname,
4023        (GLfloat *)eqn
4024    );
4025
4026exit:
4027    if (eqn_base) {
4028        _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
4029            _exception ? JNI_ABORT: 0);
4030    }
4031}
4032
4033/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
4034static void
4035android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
4036  (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
4037    jint _exception = 0;
4038    jarray _array = (jarray) 0;
4039    jint _remaining;
4040    GLfloat *eqn = (GLfloat *) 0;
4041
4042    eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
4043    glGetClipPlanef(
4044        (GLenum)pname,
4045        (GLfloat *)eqn
4046    );
4047    if (_array) {
4048        releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
4049    }
4050}
4051
4052/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4053static void
4054android_glGetClipPlanex__I_3II
4055  (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
4056    jint _exception = 0;
4057    GLfixed *eqn_base = (GLfixed *) 0;
4058    jint _remaining;
4059    GLfixed *eqn = (GLfixed *) 0;
4060
4061    if (!eqn_ref) {
4062        _exception = 1;
4063        _env->ThrowNew(IAEClass, "eqn == null");
4064        goto exit;
4065    }
4066    if (offset < 0) {
4067        _exception = 1;
4068        _env->ThrowNew(IAEClass, "offset < 0");
4069        goto exit;
4070    }
4071    _remaining = _env->GetArrayLength(eqn_ref) - offset;
4072    eqn_base = (GLfixed *)
4073        _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
4074    eqn = eqn_base + offset;
4075
4076    glGetClipPlanex(
4077        (GLenum)pname,
4078        (GLfixed *)eqn
4079    );
4080
4081exit:
4082    if (eqn_base) {
4083        _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
4084            _exception ? JNI_ABORT: 0);
4085    }
4086}
4087
4088/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4089static void
4090android_glGetClipPlanex__ILjava_nio_IntBuffer_2
4091  (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
4092    jint _exception = 0;
4093    jarray _array = (jarray) 0;
4094    jint _remaining;
4095    GLfixed *eqn = (GLfixed *) 0;
4096
4097    eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
4098    glGetClipPlanex(
4099        (GLenum)pname,
4100        (GLfixed *)eqn
4101    );
4102    if (_array) {
4103        releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
4104    }
4105}
4106
4107/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
4108static void
4109android_glGetFixedv__I_3II
4110  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
4111    jint _exception = 0;
4112    GLfixed *params_base = (GLfixed *) 0;
4113    jint _remaining;
4114    GLfixed *params = (GLfixed *) 0;
4115
4116    if (!params_ref) {
4117        _exception = 1;
4118        _env->ThrowNew(IAEClass, "params == null");
4119        goto exit;
4120    }
4121    if (offset < 0) {
4122        _exception = 1;
4123        _env->ThrowNew(IAEClass, "offset < 0");
4124        goto exit;
4125    }
4126    _remaining = _env->GetArrayLength(params_ref) - offset;
4127    params_base = (GLfixed *)
4128        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4129    params = params_base + offset;
4130
4131    glGetFixedv(
4132        (GLenum)pname,
4133        (GLfixed *)params
4134    );
4135
4136exit:
4137    if (params_base) {
4138        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4139            _exception ? JNI_ABORT: 0);
4140    }
4141}
4142
4143/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
4144static void
4145android_glGetFixedv__ILjava_nio_IntBuffer_2
4146  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4147    jint _exception = 0;
4148    jarray _array = (jarray) 0;
4149    jint _remaining;
4150    GLfixed *params = (GLfixed *) 0;
4151
4152    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4153    glGetFixedv(
4154        (GLenum)pname,
4155        (GLfixed *)params
4156    );
4157    if (_array) {
4158        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4159    }
4160}
4161
4162/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
4163static void
4164android_glGetFloatv__I_3FI
4165  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
4166    jint _exception = 0;
4167    GLfloat *params_base = (GLfloat *) 0;
4168    jint _remaining;
4169    GLfloat *params = (GLfloat *) 0;
4170
4171    if (!params_ref) {
4172        _exception = 1;
4173        _env->ThrowNew(IAEClass, "params == null");
4174        goto exit;
4175    }
4176    if (offset < 0) {
4177        _exception = 1;
4178        _env->ThrowNew(IAEClass, "offset < 0");
4179        goto exit;
4180    }
4181    _remaining = _env->GetArrayLength(params_ref) - offset;
4182    params_base = (GLfloat *)
4183        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4184    params = params_base + offset;
4185
4186    glGetFloatv(
4187        (GLenum)pname,
4188        (GLfloat *)params
4189    );
4190
4191exit:
4192    if (params_base) {
4193        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4194            _exception ? JNI_ABORT: 0);
4195    }
4196}
4197
4198/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
4199static void
4200android_glGetFloatv__ILjava_nio_FloatBuffer_2
4201  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4202    jint _exception = 0;
4203    jarray _array = (jarray) 0;
4204    jint _remaining;
4205    GLfloat *params = (GLfloat *) 0;
4206
4207    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4208    glGetFloatv(
4209        (GLenum)pname,
4210        (GLfloat *)params
4211    );
4212    if (_array) {
4213        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4214    }
4215}
4216
4217/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
4218static void
4219android_glGetLightfv__II_3FI
4220  (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
4221    jint _exception = 0;
4222    GLfloat *params_base = (GLfloat *) 0;
4223    jint _remaining;
4224    GLfloat *params = (GLfloat *) 0;
4225
4226    if (!params_ref) {
4227        _exception = 1;
4228        _env->ThrowNew(IAEClass, "params == null");
4229        goto exit;
4230    }
4231    if (offset < 0) {
4232        _exception = 1;
4233        _env->ThrowNew(IAEClass, "offset < 0");
4234        goto exit;
4235    }
4236    _remaining = _env->GetArrayLength(params_ref) - offset;
4237    int _needed;
4238    switch (pname) {
4239#if defined(GL_SPOT_EXPONENT)
4240        case GL_SPOT_EXPONENT:
4241#endif // defined(GL_SPOT_EXPONENT)
4242#if defined(GL_SPOT_CUTOFF)
4243        case GL_SPOT_CUTOFF:
4244#endif // defined(GL_SPOT_CUTOFF)
4245#if defined(GL_CONSTANT_ATTENUATION)
4246        case GL_CONSTANT_ATTENUATION:
4247#endif // defined(GL_CONSTANT_ATTENUATION)
4248#if defined(GL_LINEAR_ATTENUATION)
4249        case GL_LINEAR_ATTENUATION:
4250#endif // defined(GL_LINEAR_ATTENUATION)
4251#if defined(GL_QUADRATIC_ATTENUATION)
4252        case GL_QUADRATIC_ATTENUATION:
4253#endif // defined(GL_QUADRATIC_ATTENUATION)
4254            _needed = 1;
4255            break;
4256#if defined(GL_SPOT_DIRECTION)
4257        case GL_SPOT_DIRECTION:
4258#endif // defined(GL_SPOT_DIRECTION)
4259            _needed = 3;
4260            break;
4261#if defined(GL_AMBIENT)
4262        case GL_AMBIENT:
4263#endif // defined(GL_AMBIENT)
4264#if defined(GL_DIFFUSE)
4265        case GL_DIFFUSE:
4266#endif // defined(GL_DIFFUSE)
4267#if defined(GL_SPECULAR)
4268        case GL_SPECULAR:
4269#endif // defined(GL_SPECULAR)
4270#if defined(GL_EMISSION)
4271        case GL_EMISSION:
4272#endif // defined(GL_EMISSION)
4273            _needed = 4;
4274            break;
4275        default:
4276            _needed = 0;
4277            break;
4278    }
4279    if (_remaining < _needed) {
4280        _exception = 1;
4281        _env->ThrowNew(IAEClass, "length - offset < needed");
4282        goto exit;
4283    }
4284    params_base = (GLfloat *)
4285        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4286    params = params_base + offset;
4287
4288    glGetLightfv(
4289        (GLenum)light,
4290        (GLenum)pname,
4291        (GLfloat *)params
4292    );
4293
4294exit:
4295    if (params_base) {
4296        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4297            _exception ? JNI_ABORT: 0);
4298    }
4299}
4300
4301/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
4302static void
4303android_glGetLightfv__IILjava_nio_FloatBuffer_2
4304  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
4305    jint _exception = 0;
4306    jarray _array = (jarray) 0;
4307    jint _remaining;
4308    GLfloat *params = (GLfloat *) 0;
4309
4310    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4311    int _needed;
4312    switch (pname) {
4313#if defined(GL_SPOT_EXPONENT)
4314        case GL_SPOT_EXPONENT:
4315#endif // defined(GL_SPOT_EXPONENT)
4316#if defined(GL_SPOT_CUTOFF)
4317        case GL_SPOT_CUTOFF:
4318#endif // defined(GL_SPOT_CUTOFF)
4319#if defined(GL_CONSTANT_ATTENUATION)
4320        case GL_CONSTANT_ATTENUATION:
4321#endif // defined(GL_CONSTANT_ATTENUATION)
4322#if defined(GL_LINEAR_ATTENUATION)
4323        case GL_LINEAR_ATTENUATION:
4324#endif // defined(GL_LINEAR_ATTENUATION)
4325#if defined(GL_QUADRATIC_ATTENUATION)
4326        case GL_QUADRATIC_ATTENUATION:
4327#endif // defined(GL_QUADRATIC_ATTENUATION)
4328            _needed = 1;
4329            break;
4330#if defined(GL_SPOT_DIRECTION)
4331        case GL_SPOT_DIRECTION:
4332#endif // defined(GL_SPOT_DIRECTION)
4333            _needed = 3;
4334            break;
4335#if defined(GL_AMBIENT)
4336        case GL_AMBIENT:
4337#endif // defined(GL_AMBIENT)
4338#if defined(GL_DIFFUSE)
4339        case GL_DIFFUSE:
4340#endif // defined(GL_DIFFUSE)
4341#if defined(GL_SPECULAR)
4342        case GL_SPECULAR:
4343#endif // defined(GL_SPECULAR)
4344#if defined(GL_EMISSION)
4345        case GL_EMISSION:
4346#endif // defined(GL_EMISSION)
4347            _needed = 4;
4348            break;
4349        default:
4350            _needed = 0;
4351            break;
4352    }
4353    if (_remaining < _needed) {
4354        _exception = 1;
4355        _env->ThrowNew(IAEClass, "remaining() < needed");
4356        goto exit;
4357    }
4358    glGetLightfv(
4359        (GLenum)light,
4360        (GLenum)pname,
4361        (GLfloat *)params
4362    );
4363
4364exit:
4365    if (_array) {
4366        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4367    }
4368}
4369
4370/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
4371static void
4372android_glGetLightxv__II_3II
4373  (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
4374    jint _exception = 0;
4375    GLfixed *params_base = (GLfixed *) 0;
4376    jint _remaining;
4377    GLfixed *params = (GLfixed *) 0;
4378
4379    if (!params_ref) {
4380        _exception = 1;
4381        _env->ThrowNew(IAEClass, "params == null");
4382        goto exit;
4383    }
4384    if (offset < 0) {
4385        _exception = 1;
4386        _env->ThrowNew(IAEClass, "offset < 0");
4387        goto exit;
4388    }
4389    _remaining = _env->GetArrayLength(params_ref) - offset;
4390    int _needed;
4391    switch (pname) {
4392#if defined(GL_SPOT_EXPONENT)
4393        case GL_SPOT_EXPONENT:
4394#endif // defined(GL_SPOT_EXPONENT)
4395#if defined(GL_SPOT_CUTOFF)
4396        case GL_SPOT_CUTOFF:
4397#endif // defined(GL_SPOT_CUTOFF)
4398#if defined(GL_CONSTANT_ATTENUATION)
4399        case GL_CONSTANT_ATTENUATION:
4400#endif // defined(GL_CONSTANT_ATTENUATION)
4401#if defined(GL_LINEAR_ATTENUATION)
4402        case GL_LINEAR_ATTENUATION:
4403#endif // defined(GL_LINEAR_ATTENUATION)
4404#if defined(GL_QUADRATIC_ATTENUATION)
4405        case GL_QUADRATIC_ATTENUATION:
4406#endif // defined(GL_QUADRATIC_ATTENUATION)
4407            _needed = 1;
4408            break;
4409#if defined(GL_SPOT_DIRECTION)
4410        case GL_SPOT_DIRECTION:
4411#endif // defined(GL_SPOT_DIRECTION)
4412            _needed = 3;
4413            break;
4414#if defined(GL_AMBIENT)
4415        case GL_AMBIENT:
4416#endif // defined(GL_AMBIENT)
4417#if defined(GL_DIFFUSE)
4418        case GL_DIFFUSE:
4419#endif // defined(GL_DIFFUSE)
4420#if defined(GL_SPECULAR)
4421        case GL_SPECULAR:
4422#endif // defined(GL_SPECULAR)
4423#if defined(GL_EMISSION)
4424        case GL_EMISSION:
4425#endif // defined(GL_EMISSION)
4426            _needed = 4;
4427            break;
4428        default:
4429            _needed = 0;
4430            break;
4431    }
4432    if (_remaining < _needed) {
4433        _exception = 1;
4434        _env->ThrowNew(IAEClass, "length - offset < needed");
4435        goto exit;
4436    }
4437    params_base = (GLfixed *)
4438        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4439    params = params_base + offset;
4440
4441    glGetLightxv(
4442        (GLenum)light,
4443        (GLenum)pname,
4444        (GLfixed *)params
4445    );
4446
4447exit:
4448    if (params_base) {
4449        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4450            _exception ? JNI_ABORT: 0);
4451    }
4452}
4453
4454/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
4455static void
4456android_glGetLightxv__IILjava_nio_IntBuffer_2
4457  (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
4458    jint _exception = 0;
4459    jarray _array = (jarray) 0;
4460    jint _remaining;
4461    GLfixed *params = (GLfixed *) 0;
4462
4463    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4464    int _needed;
4465    switch (pname) {
4466#if defined(GL_SPOT_EXPONENT)
4467        case GL_SPOT_EXPONENT:
4468#endif // defined(GL_SPOT_EXPONENT)
4469#if defined(GL_SPOT_CUTOFF)
4470        case GL_SPOT_CUTOFF:
4471#endif // defined(GL_SPOT_CUTOFF)
4472#if defined(GL_CONSTANT_ATTENUATION)
4473        case GL_CONSTANT_ATTENUATION:
4474#endif // defined(GL_CONSTANT_ATTENUATION)
4475#if defined(GL_LINEAR_ATTENUATION)
4476        case GL_LINEAR_ATTENUATION:
4477#endif // defined(GL_LINEAR_ATTENUATION)
4478#if defined(GL_QUADRATIC_ATTENUATION)
4479        case GL_QUADRATIC_ATTENUATION:
4480#endif // defined(GL_QUADRATIC_ATTENUATION)
4481            _needed = 1;
4482            break;
4483#if defined(GL_SPOT_DIRECTION)
4484        case GL_SPOT_DIRECTION:
4485#endif // defined(GL_SPOT_DIRECTION)
4486            _needed = 3;
4487            break;
4488#if defined(GL_AMBIENT)
4489        case GL_AMBIENT:
4490#endif // defined(GL_AMBIENT)
4491#if defined(GL_DIFFUSE)
4492        case GL_DIFFUSE:
4493#endif // defined(GL_DIFFUSE)
4494#if defined(GL_SPECULAR)
4495        case GL_SPECULAR:
4496#endif // defined(GL_SPECULAR)
4497#if defined(GL_EMISSION)
4498        case GL_EMISSION:
4499#endif // defined(GL_EMISSION)
4500            _needed = 4;
4501            break;
4502        default:
4503            _needed = 0;
4504            break;
4505    }
4506    if (_remaining < _needed) {
4507        _exception = 1;
4508        _env->ThrowNew(IAEClass, "remaining() < needed");
4509        goto exit;
4510    }
4511    glGetLightxv(
4512        (GLenum)light,
4513        (GLenum)pname,
4514        (GLfixed *)params
4515    );
4516
4517exit:
4518    if (_array) {
4519        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4520    }
4521}
4522
4523/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
4524static void
4525android_glGetMaterialfv__II_3FI
4526  (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
4527    jint _exception = 0;
4528    GLfloat *params_base = (GLfloat *) 0;
4529    jint _remaining;
4530    GLfloat *params = (GLfloat *) 0;
4531
4532    if (!params_ref) {
4533        _exception = 1;
4534        _env->ThrowNew(IAEClass, "params == null");
4535        goto exit;
4536    }
4537    if (offset < 0) {
4538        _exception = 1;
4539        _env->ThrowNew(IAEClass, "offset < 0");
4540        goto exit;
4541    }
4542    _remaining = _env->GetArrayLength(params_ref) - offset;
4543    int _needed;
4544    switch (pname) {
4545#if defined(GL_SHININESS)
4546        case GL_SHININESS:
4547#endif // defined(GL_SHININESS)
4548            _needed = 1;
4549            break;
4550#if defined(GL_AMBIENT)
4551        case GL_AMBIENT:
4552#endif // defined(GL_AMBIENT)
4553#if defined(GL_DIFFUSE)
4554        case GL_DIFFUSE:
4555#endif // defined(GL_DIFFUSE)
4556#if defined(GL_SPECULAR)
4557        case GL_SPECULAR:
4558#endif // defined(GL_SPECULAR)
4559#if defined(GL_EMISSION)
4560        case GL_EMISSION:
4561#endif // defined(GL_EMISSION)
4562#if defined(GL_AMBIENT_AND_DIFFUSE)
4563        case GL_AMBIENT_AND_DIFFUSE:
4564#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4565            _needed = 4;
4566            break;
4567        default:
4568            _needed = 0;
4569            break;
4570    }
4571    if (_remaining < _needed) {
4572        _exception = 1;
4573        _env->ThrowNew(IAEClass, "length - offset < needed");
4574        goto exit;
4575    }
4576    params_base = (GLfloat *)
4577        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4578    params = params_base + offset;
4579
4580    glGetMaterialfv(
4581        (GLenum)face,
4582        (GLenum)pname,
4583        (GLfloat *)params
4584    );
4585
4586exit:
4587    if (params_base) {
4588        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4589            _exception ? JNI_ABORT: 0);
4590    }
4591}
4592
4593/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
4594static void
4595android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
4596  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
4597    jint _exception = 0;
4598    jarray _array = (jarray) 0;
4599    jint _remaining;
4600    GLfloat *params = (GLfloat *) 0;
4601
4602    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
4603    int _needed;
4604    switch (pname) {
4605#if defined(GL_SHININESS)
4606        case GL_SHININESS:
4607#endif // defined(GL_SHININESS)
4608            _needed = 1;
4609            break;
4610#if defined(GL_AMBIENT)
4611        case GL_AMBIENT:
4612#endif // defined(GL_AMBIENT)
4613#if defined(GL_DIFFUSE)
4614        case GL_DIFFUSE:
4615#endif // defined(GL_DIFFUSE)
4616#if defined(GL_SPECULAR)
4617        case GL_SPECULAR:
4618#endif // defined(GL_SPECULAR)
4619#if defined(GL_EMISSION)
4620        case GL_EMISSION:
4621#endif // defined(GL_EMISSION)
4622#if defined(GL_AMBIENT_AND_DIFFUSE)
4623        case GL_AMBIENT_AND_DIFFUSE:
4624#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4625            _needed = 4;
4626            break;
4627        default:
4628            _needed = 0;
4629            break;
4630    }
4631    if (_remaining < _needed) {
4632        _exception = 1;
4633        _env->ThrowNew(IAEClass, "remaining() < needed");
4634        goto exit;
4635    }
4636    glGetMaterialfv(
4637        (GLenum)face,
4638        (GLenum)pname,
4639        (GLfloat *)params
4640    );
4641
4642exit:
4643    if (_array) {
4644        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4645    }
4646}
4647
4648/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
4649static void
4650android_glGetMaterialxv__II_3II
4651  (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
4652    jint _exception = 0;
4653    GLfixed *params_base = (GLfixed *) 0;
4654    jint _remaining;
4655    GLfixed *params = (GLfixed *) 0;
4656
4657    if (!params_ref) {
4658        _exception = 1;
4659        _env->ThrowNew(IAEClass, "params == null");
4660        goto exit;
4661    }
4662    if (offset < 0) {
4663        _exception = 1;
4664        _env->ThrowNew(IAEClass, "offset < 0");
4665        goto exit;
4666    }
4667    _remaining = _env->GetArrayLength(params_ref) - offset;
4668    int _needed;
4669    switch (pname) {
4670#if defined(GL_SHININESS)
4671        case GL_SHININESS:
4672#endif // defined(GL_SHININESS)
4673            _needed = 1;
4674            break;
4675#if defined(GL_AMBIENT)
4676        case GL_AMBIENT:
4677#endif // defined(GL_AMBIENT)
4678#if defined(GL_DIFFUSE)
4679        case GL_DIFFUSE:
4680#endif // defined(GL_DIFFUSE)
4681#if defined(GL_SPECULAR)
4682        case GL_SPECULAR:
4683#endif // defined(GL_SPECULAR)
4684#if defined(GL_EMISSION)
4685        case GL_EMISSION:
4686#endif // defined(GL_EMISSION)
4687#if defined(GL_AMBIENT_AND_DIFFUSE)
4688        case GL_AMBIENT_AND_DIFFUSE:
4689#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4690            _needed = 4;
4691            break;
4692        default:
4693            _needed = 0;
4694            break;
4695    }
4696    if (_remaining < _needed) {
4697        _exception = 1;
4698        _env->ThrowNew(IAEClass, "length - offset < needed");
4699        goto exit;
4700    }
4701    params_base = (GLfixed *)
4702        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4703    params = params_base + offset;
4704
4705    glGetMaterialxv(
4706        (GLenum)face,
4707        (GLenum)pname,
4708        (GLfixed *)params
4709    );
4710
4711exit:
4712    if (params_base) {
4713        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4714            _exception ? JNI_ABORT: 0);
4715    }
4716}
4717
4718/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
4719static void
4720android_glGetMaterialxv__IILjava_nio_IntBuffer_2
4721  (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
4722    jint _exception = 0;
4723    jarray _array = (jarray) 0;
4724    jint _remaining;
4725    GLfixed *params = (GLfixed *) 0;
4726
4727    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4728    int _needed;
4729    switch (pname) {
4730#if defined(GL_SHININESS)
4731        case GL_SHININESS:
4732#endif // defined(GL_SHININESS)
4733            _needed = 1;
4734            break;
4735#if defined(GL_AMBIENT)
4736        case GL_AMBIENT:
4737#endif // defined(GL_AMBIENT)
4738#if defined(GL_DIFFUSE)
4739        case GL_DIFFUSE:
4740#endif // defined(GL_DIFFUSE)
4741#if defined(GL_SPECULAR)
4742        case GL_SPECULAR:
4743#endif // defined(GL_SPECULAR)
4744#if defined(GL_EMISSION)
4745        case GL_EMISSION:
4746#endif // defined(GL_EMISSION)
4747#if defined(GL_AMBIENT_AND_DIFFUSE)
4748        case GL_AMBIENT_AND_DIFFUSE:
4749#endif // defined(GL_AMBIENT_AND_DIFFUSE)
4750            _needed = 4;
4751            break;
4752        default:
4753            _needed = 0;
4754            break;
4755    }
4756    if (_remaining < _needed) {
4757        _exception = 1;
4758        _env->ThrowNew(IAEClass, "remaining() < needed");
4759        goto exit;
4760    }
4761    glGetMaterialxv(
4762        (GLenum)face,
4763        (GLenum)pname,
4764        (GLfixed *)params
4765    );
4766
4767exit:
4768    if (_array) {
4769        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4770    }
4771}
4772
4773/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
4774static void
4775android_glGetTexEnviv__II_3II
4776  (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
4777    jint _exception = 0;
4778    GLint *params_base = (GLint *) 0;
4779    jint _remaining;
4780    GLint *params = (GLint *) 0;
4781
4782    if (!params_ref) {
4783        _exception = 1;
4784        _env->ThrowNew(IAEClass, "params == null");
4785        goto exit;
4786    }
4787    if (offset < 0) {
4788        _exception = 1;
4789        _env->ThrowNew(IAEClass, "offset < 0");
4790        goto exit;
4791    }
4792    _remaining = _env->GetArrayLength(params_ref) - offset;
4793    int _needed;
4794    switch (pname) {
4795#if defined(GL_TEXTURE_ENV_MODE)
4796        case GL_TEXTURE_ENV_MODE:
4797#endif // defined(GL_TEXTURE_ENV_MODE)
4798#if defined(GL_COMBINE_RGB)
4799        case GL_COMBINE_RGB:
4800#endif // defined(GL_COMBINE_RGB)
4801#if defined(GL_COMBINE_ALPHA)
4802        case GL_COMBINE_ALPHA:
4803#endif // defined(GL_COMBINE_ALPHA)
4804            _needed = 1;
4805            break;
4806#if defined(GL_TEXTURE_ENV_COLOR)
4807        case GL_TEXTURE_ENV_COLOR:
4808#endif // defined(GL_TEXTURE_ENV_COLOR)
4809            _needed = 4;
4810            break;
4811        default:
4812            _needed = 0;
4813            break;
4814    }
4815    if (_remaining < _needed) {
4816        _exception = 1;
4817        _env->ThrowNew(IAEClass, "length - offset < needed");
4818        goto exit;
4819    }
4820    params_base = (GLint *)
4821        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4822    params = params_base + offset;
4823
4824    glGetTexEnviv(
4825        (GLenum)env,
4826        (GLenum)pname,
4827        (GLint *)params
4828    );
4829
4830exit:
4831    if (params_base) {
4832        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4833            _exception ? JNI_ABORT: 0);
4834    }
4835}
4836
4837/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
4838static void
4839android_glGetTexEnviv__IILjava_nio_IntBuffer_2
4840  (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
4841    jint _exception = 0;
4842    jarray _array = (jarray) 0;
4843    jint _remaining;
4844    GLint *params = (GLint *) 0;
4845
4846    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
4847    int _needed;
4848    switch (pname) {
4849#if defined(GL_TEXTURE_ENV_MODE)
4850        case GL_TEXTURE_ENV_MODE:
4851#endif // defined(GL_TEXTURE_ENV_MODE)
4852#if defined(GL_COMBINE_RGB)
4853        case GL_COMBINE_RGB:
4854#endif // defined(GL_COMBINE_RGB)
4855#if defined(GL_COMBINE_ALPHA)
4856        case GL_COMBINE_ALPHA:
4857#endif // defined(GL_COMBINE_ALPHA)
4858            _needed = 1;
4859            break;
4860#if defined(GL_TEXTURE_ENV_COLOR)
4861        case GL_TEXTURE_ENV_COLOR:
4862#endif // defined(GL_TEXTURE_ENV_COLOR)
4863            _needed = 4;
4864            break;
4865        default:
4866            _needed = 0;
4867            break;
4868    }
4869    if (_remaining < _needed) {
4870        _exception = 1;
4871        _env->ThrowNew(IAEClass, "remaining() < needed");
4872        goto exit;
4873    }
4874    glGetTexEnviv(
4875        (GLenum)env,
4876        (GLenum)pname,
4877        (GLint *)params
4878    );
4879
4880exit:
4881    if (_array) {
4882        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4883    }
4884}
4885
4886/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
4887static void
4888android_glGetTexEnvxv__II_3II
4889  (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
4890    jint _exception = 0;
4891    GLfixed *params_base = (GLfixed *) 0;
4892    jint _remaining;
4893    GLfixed *params = (GLfixed *) 0;
4894
4895    if (!params_ref) {
4896        _exception = 1;
4897        _env->ThrowNew(IAEClass, "params == null");
4898        goto exit;
4899    }
4900    if (offset < 0) {
4901        _exception = 1;
4902        _env->ThrowNew(IAEClass, "offset < 0");
4903        goto exit;
4904    }
4905    _remaining = _env->GetArrayLength(params_ref) - offset;
4906    int _needed;
4907    switch (pname) {
4908#if defined(GL_TEXTURE_ENV_MODE)
4909        case GL_TEXTURE_ENV_MODE:
4910#endif // defined(GL_TEXTURE_ENV_MODE)
4911#if defined(GL_COMBINE_RGB)
4912        case GL_COMBINE_RGB:
4913#endif // defined(GL_COMBINE_RGB)
4914#if defined(GL_COMBINE_ALPHA)
4915        case GL_COMBINE_ALPHA:
4916#endif // defined(GL_COMBINE_ALPHA)
4917            _needed = 1;
4918            break;
4919#if defined(GL_TEXTURE_ENV_COLOR)
4920        case GL_TEXTURE_ENV_COLOR:
4921#endif // defined(GL_TEXTURE_ENV_COLOR)
4922            _needed = 4;
4923            break;
4924        default:
4925            _needed = 0;
4926            break;
4927    }
4928    if (_remaining < _needed) {
4929        _exception = 1;
4930        _env->ThrowNew(IAEClass, "length - offset < needed");
4931        goto exit;
4932    }
4933    params_base = (GLfixed *)
4934        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
4935    params = params_base + offset;
4936
4937    glGetTexEnvxv(
4938        (GLenum)env,
4939        (GLenum)pname,
4940        (GLfixed *)params
4941    );
4942
4943exit:
4944    if (params_base) {
4945        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
4946            _exception ? JNI_ABORT: 0);
4947    }
4948}
4949
4950/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
4951static void
4952android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
4953  (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
4954    jint _exception = 0;
4955    jarray _array = (jarray) 0;
4956    jint _remaining;
4957    GLfixed *params = (GLfixed *) 0;
4958
4959    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
4960    int _needed;
4961    switch (pname) {
4962#if defined(GL_TEXTURE_ENV_MODE)
4963        case GL_TEXTURE_ENV_MODE:
4964#endif // defined(GL_TEXTURE_ENV_MODE)
4965#if defined(GL_COMBINE_RGB)
4966        case GL_COMBINE_RGB:
4967#endif // defined(GL_COMBINE_RGB)
4968#if defined(GL_COMBINE_ALPHA)
4969        case GL_COMBINE_ALPHA:
4970#endif // defined(GL_COMBINE_ALPHA)
4971            _needed = 1;
4972            break;
4973#if defined(GL_TEXTURE_ENV_COLOR)
4974        case GL_TEXTURE_ENV_COLOR:
4975#endif // defined(GL_TEXTURE_ENV_COLOR)
4976            _needed = 4;
4977            break;
4978        default:
4979            _needed = 0;
4980            break;
4981    }
4982    if (_remaining < _needed) {
4983        _exception = 1;
4984        _env->ThrowNew(IAEClass, "remaining() < needed");
4985        goto exit;
4986    }
4987    glGetTexEnvxv(
4988        (GLenum)env,
4989        (GLenum)pname,
4990        (GLfixed *)params
4991    );
4992
4993exit:
4994    if (_array) {
4995        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
4996    }
4997}
4998
4999/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
5000static void
5001android_glGetTexParameterfv__II_3FI
5002  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
5003    jint _exception = 0;
5004    GLfloat *params_base = (GLfloat *) 0;
5005    jint _remaining;
5006    GLfloat *params = (GLfloat *) 0;
5007
5008    if (!params_ref) {
5009        _exception = 1;
5010        _env->ThrowNew(IAEClass, "params == null");
5011        goto exit;
5012    }
5013    if (offset < 0) {
5014        _exception = 1;
5015        _env->ThrowNew(IAEClass, "offset < 0");
5016        goto exit;
5017    }
5018    _remaining = _env->GetArrayLength(params_ref) - offset;
5019    if (_remaining < 1) {
5020        _exception = 1;
5021        _env->ThrowNew(IAEClass, "length - offset < 1");
5022        goto exit;
5023    }
5024    params_base = (GLfloat *)
5025        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5026    params = params_base + offset;
5027
5028    glGetTexParameterfv(
5029        (GLenum)target,
5030        (GLenum)pname,
5031        (GLfloat *)params
5032    );
5033
5034exit:
5035    if (params_base) {
5036        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5037            _exception ? JNI_ABORT: 0);
5038    }
5039}
5040
5041/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
5042static void
5043android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
5044  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5045    jint _exception = 0;
5046    jarray _array = (jarray) 0;
5047    jint _remaining;
5048    GLfloat *params = (GLfloat *) 0;
5049
5050    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5051    if (_remaining < 1) {
5052        _exception = 1;
5053        _env->ThrowNew(IAEClass, "remaining() < 1");
5054        goto exit;
5055    }
5056    glGetTexParameterfv(
5057        (GLenum)target,
5058        (GLenum)pname,
5059        (GLfloat *)params
5060    );
5061
5062exit:
5063    if (_array) {
5064        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5065    }
5066}
5067
5068/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
5069static void
5070android_glGetTexParameteriv__II_3II
5071  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5072    jint _exception = 0;
5073    GLint *params_base = (GLint *) 0;
5074    jint _remaining;
5075    GLint *params = (GLint *) 0;
5076
5077    if (!params_ref) {
5078        _exception = 1;
5079        _env->ThrowNew(IAEClass, "params == null");
5080        goto exit;
5081    }
5082    if (offset < 0) {
5083        _exception = 1;
5084        _env->ThrowNew(IAEClass, "offset < 0");
5085        goto exit;
5086    }
5087    _remaining = _env->GetArrayLength(params_ref) - offset;
5088    if (_remaining < 1) {
5089        _exception = 1;
5090        _env->ThrowNew(IAEClass, "length - offset < 1");
5091        goto exit;
5092    }
5093    params_base = (GLint *)
5094        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5095    params = params_base + offset;
5096
5097    glGetTexParameteriv(
5098        (GLenum)target,
5099        (GLenum)pname,
5100        (GLint *)params
5101    );
5102
5103exit:
5104    if (params_base) {
5105        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5106            _exception ? JNI_ABORT: 0);
5107    }
5108}
5109
5110/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
5111static void
5112android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
5113  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5114    jint _exception = 0;
5115    jarray _array = (jarray) 0;
5116    jint _remaining;
5117    GLint *params = (GLint *) 0;
5118
5119    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5120    if (_remaining < 1) {
5121        _exception = 1;
5122        _env->ThrowNew(IAEClass, "remaining() < 1");
5123        goto exit;
5124    }
5125    glGetTexParameteriv(
5126        (GLenum)target,
5127        (GLenum)pname,
5128        (GLint *)params
5129    );
5130
5131exit:
5132    if (_array) {
5133        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5134    }
5135}
5136
5137/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
5138static void
5139android_glGetTexParameterxv__II_3II
5140  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5141    jint _exception = 0;
5142    GLfixed *params_base = (GLfixed *) 0;
5143    jint _remaining;
5144    GLfixed *params = (GLfixed *) 0;
5145
5146    if (!params_ref) {
5147        _exception = 1;
5148        _env->ThrowNew(IAEClass, "params == null");
5149        goto exit;
5150    }
5151    if (offset < 0) {
5152        _exception = 1;
5153        _env->ThrowNew(IAEClass, "offset < 0");
5154        goto exit;
5155    }
5156    _remaining = _env->GetArrayLength(params_ref) - offset;
5157    if (_remaining < 1) {
5158        _exception = 1;
5159        _env->ThrowNew(IAEClass, "length - offset < 1");
5160        goto exit;
5161    }
5162    params_base = (GLfixed *)
5163        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5164    params = params_base + offset;
5165
5166    glGetTexParameterxv(
5167        (GLenum)target,
5168        (GLenum)pname,
5169        (GLfixed *)params
5170    );
5171
5172exit:
5173    if (params_base) {
5174        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5175            _exception ? JNI_ABORT: 0);
5176    }
5177}
5178
5179/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
5180static void
5181android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
5182  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5183    jint _exception = 0;
5184    jarray _array = (jarray) 0;
5185    jint _remaining;
5186    GLfixed *params = (GLfixed *) 0;
5187
5188    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5189    if (_remaining < 1) {
5190        _exception = 1;
5191        _env->ThrowNew(IAEClass, "remaining() < 1");
5192        goto exit;
5193    }
5194    glGetTexParameterxv(
5195        (GLenum)target,
5196        (GLenum)pname,
5197        (GLfixed *)params
5198    );
5199
5200exit:
5201    if (_array) {
5202        releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
5203    }
5204}
5205
5206/* GLboolean glIsBuffer ( GLuint buffer ) */
5207static jboolean
5208android_glIsBuffer__I
5209  (JNIEnv *_env, jobject _this, jint buffer) {
5210    GLboolean _returnValue;
5211    _returnValue = glIsBuffer(
5212        (GLuint)buffer
5213    );
5214    return _returnValue;
5215}
5216
5217/* GLboolean glIsEnabled ( GLenum cap ) */
5218static jboolean
5219android_glIsEnabled__I
5220  (JNIEnv *_env, jobject _this, jint cap) {
5221    GLboolean _returnValue;
5222    _returnValue = glIsEnabled(
5223        (GLenum)cap
5224    );
5225    return _returnValue;
5226}
5227
5228/* GLboolean glIsTexture ( GLuint texture ) */
5229static jboolean
5230android_glIsTexture__I
5231  (JNIEnv *_env, jobject _this, jint texture) {
5232    GLboolean _returnValue;
5233    _returnValue = glIsTexture(
5234        (GLuint)texture
5235    );
5236    return _returnValue;
5237}
5238
5239/* void glNormalPointer ( GLenum type, GLsizei stride, GLint offset ) */
5240static void
5241android_glNormalPointer__III
5242  (JNIEnv *_env, jobject _this, jint type, jint stride, jint offset) {
5243    glNormalPointer(
5244        (GLenum)type,
5245        (GLsizei)stride,
5246        (const GLvoid *)offset
5247    );
5248}
5249
5250/* void glPointParameterf ( GLenum pname, GLfloat param ) */
5251static void
5252android_glPointParameterf__IF
5253  (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
5254    glPointParameterf(
5255        (GLenum)pname,
5256        (GLfloat)param
5257    );
5258}
5259
5260/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
5261static void
5262android_glPointParameterfv__I_3FI
5263  (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
5264    GLfloat *params_base = (GLfloat *) 0;
5265    jint _remaining;
5266    GLfloat *params = (GLfloat *) 0;
5267
5268    if (!params_ref) {
5269        _env->ThrowNew(IAEClass, "params == null");
5270        goto exit;
5271    }
5272    if (offset < 0) {
5273        _env->ThrowNew(IAEClass, "offset < 0");
5274        goto exit;
5275    }
5276    _remaining = _env->GetArrayLength(params_ref) - offset;
5277    if (_remaining < 1) {
5278        _env->ThrowNew(IAEClass, "length - offset < 1");
5279        goto exit;
5280    }
5281    params_base = (GLfloat *)
5282        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5283    params = params_base + offset;
5284
5285    glPointParameterfv(
5286        (GLenum)pname,
5287        (GLfloat *)params
5288    );
5289
5290exit:
5291    if (params_base) {
5292        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5293            JNI_ABORT);
5294    }
5295}
5296
5297/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
5298static void
5299android_glPointParameterfv__ILjava_nio_FloatBuffer_2
5300  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5301    jarray _array = (jarray) 0;
5302    jint _remaining;
5303    GLfloat *params = (GLfloat *) 0;
5304
5305    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5306    if (_remaining < 1) {
5307        _env->ThrowNew(IAEClass, "remaining() < 1");
5308        goto exit;
5309    }
5310    glPointParameterfv(
5311        (GLenum)pname,
5312        (GLfloat *)params
5313    );
5314
5315exit:
5316    if (_array) {
5317        releasePointer(_env, _array, params, JNI_FALSE);
5318    }
5319}
5320
5321/* void glPointParameterx ( GLenum pname, GLfixed param ) */
5322static void
5323android_glPointParameterx__II
5324  (JNIEnv *_env, jobject _this, jint pname, jint param) {
5325    glPointParameterx(
5326        (GLenum)pname,
5327        (GLfixed)param
5328    );
5329}
5330
5331/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
5332static void
5333android_glPointParameterxv__I_3II
5334  (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
5335    GLfixed *params_base = (GLfixed *) 0;
5336    jint _remaining;
5337    GLfixed *params = (GLfixed *) 0;
5338
5339    if (!params_ref) {
5340        _env->ThrowNew(IAEClass, "params == null");
5341        goto exit;
5342    }
5343    if (offset < 0) {
5344        _env->ThrowNew(IAEClass, "offset < 0");
5345        goto exit;
5346    }
5347    _remaining = _env->GetArrayLength(params_ref) - offset;
5348    if (_remaining < 1) {
5349        _env->ThrowNew(IAEClass, "length - offset < 1");
5350        goto exit;
5351    }
5352    params_base = (GLfixed *)
5353        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5354    params = params_base + offset;
5355
5356    glPointParameterxv(
5357        (GLenum)pname,
5358        (GLfixed *)params
5359    );
5360
5361exit:
5362    if (params_base) {
5363        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5364            JNI_ABORT);
5365    }
5366}
5367
5368/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
5369static void
5370android_glPointParameterxv__ILjava_nio_IntBuffer_2
5371  (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5372    jarray _array = (jarray) 0;
5373    jint _remaining;
5374    GLfixed *params = (GLfixed *) 0;
5375
5376    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5377    if (_remaining < 1) {
5378        _env->ThrowNew(IAEClass, "remaining() < 1");
5379        goto exit;
5380    }
5381    glPointParameterxv(
5382        (GLenum)pname,
5383        (GLfixed *)params
5384    );
5385
5386exit:
5387    if (_array) {
5388        releasePointer(_env, _array, params, JNI_FALSE);
5389    }
5390}
5391
5392/* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
5393static void
5394android_glPointSizePointerOES__IILjava_nio_Buffer_2
5395  (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf) {
5396    jarray _array = (jarray) 0;
5397    jint _remaining;
5398    GLvoid *pointer = (GLvoid *) 0;
5399
5400    pointer = (GLvoid *)getPointer(_env, pointer_buf, &_array, &_remaining);
5401    glPointSizePointerOES(
5402        (GLenum)type,
5403        (GLsizei)stride,
5404        (GLvoid *)pointer
5405    );
5406    if (_array) {
5407        releasePointer(_env, _array, pointer, JNI_FALSE);
5408    }
5409}
5410
5411/* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5412static void
5413android_glTexCoordPointer__IIII
5414  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5415    glTexCoordPointer(
5416        (GLint)size,
5417        (GLenum)type,
5418        (GLsizei)stride,
5419        (const GLvoid *)offset
5420    );
5421}
5422
5423/* void glTexEnvi ( GLenum target, GLenum pname, GLint param ) */
5424static void
5425android_glTexEnvi__III
5426  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
5427    glTexEnvi(
5428        (GLenum)target,
5429        (GLenum)pname,
5430        (GLint)param
5431    );
5432}
5433
5434/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
5435static void
5436android_glTexEnviv__II_3II
5437  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5438    GLint *params_base = (GLint *) 0;
5439    jint _remaining;
5440    GLint *params = (GLint *) 0;
5441
5442    if (!params_ref) {
5443        _env->ThrowNew(IAEClass, "params == null");
5444        goto exit;
5445    }
5446    if (offset < 0) {
5447        _env->ThrowNew(IAEClass, "offset < 0");
5448        goto exit;
5449    }
5450    _remaining = _env->GetArrayLength(params_ref) - offset;
5451    int _needed;
5452    switch (pname) {
5453#if defined(GL_TEXTURE_ENV_MODE)
5454        case GL_TEXTURE_ENV_MODE:
5455#endif // defined(GL_TEXTURE_ENV_MODE)
5456#if defined(GL_COMBINE_RGB)
5457        case GL_COMBINE_RGB:
5458#endif // defined(GL_COMBINE_RGB)
5459#if defined(GL_COMBINE_ALPHA)
5460        case GL_COMBINE_ALPHA:
5461#endif // defined(GL_COMBINE_ALPHA)
5462            _needed = 1;
5463            break;
5464#if defined(GL_TEXTURE_ENV_COLOR)
5465        case GL_TEXTURE_ENV_COLOR:
5466#endif // defined(GL_TEXTURE_ENV_COLOR)
5467            _needed = 4;
5468            break;
5469        default:
5470            _needed = 0;
5471            break;
5472    }
5473    if (_remaining < _needed) {
5474        _env->ThrowNew(IAEClass, "length - offset < needed");
5475        goto exit;
5476    }
5477    params_base = (GLint *)
5478        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5479    params = params_base + offset;
5480
5481    glTexEnviv(
5482        (GLenum)target,
5483        (GLenum)pname,
5484        (GLint *)params
5485    );
5486
5487exit:
5488    if (params_base) {
5489        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5490            JNI_ABORT);
5491    }
5492}
5493
5494/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
5495static void
5496android_glTexEnviv__IILjava_nio_IntBuffer_2
5497  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5498    jarray _array = (jarray) 0;
5499    jint _remaining;
5500    GLint *params = (GLint *) 0;
5501
5502    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5503    int _needed;
5504    switch (pname) {
5505#if defined(GL_TEXTURE_ENV_MODE)
5506        case GL_TEXTURE_ENV_MODE:
5507#endif // defined(GL_TEXTURE_ENV_MODE)
5508#if defined(GL_COMBINE_RGB)
5509        case GL_COMBINE_RGB:
5510#endif // defined(GL_COMBINE_RGB)
5511#if defined(GL_COMBINE_ALPHA)
5512        case GL_COMBINE_ALPHA:
5513#endif // defined(GL_COMBINE_ALPHA)
5514            _needed = 1;
5515            break;
5516#if defined(GL_TEXTURE_ENV_COLOR)
5517        case GL_TEXTURE_ENV_COLOR:
5518#endif // defined(GL_TEXTURE_ENV_COLOR)
5519            _needed = 4;
5520            break;
5521        default:
5522            _needed = 0;
5523            break;
5524    }
5525    if (_remaining < _needed) {
5526        _env->ThrowNew(IAEClass, "remaining() < needed");
5527        goto exit;
5528    }
5529    glTexEnviv(
5530        (GLenum)target,
5531        (GLenum)pname,
5532        (GLint *)params
5533    );
5534
5535exit:
5536    if (_array) {
5537        releasePointer(_env, _array, params, JNI_FALSE);
5538    }
5539}
5540
5541/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
5542static void
5543android_glTexParameterfv__II_3FI
5544  (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
5545    GLfloat *params_base = (GLfloat *) 0;
5546    jint _remaining;
5547    GLfloat *params = (GLfloat *) 0;
5548
5549    if (!params_ref) {
5550        _env->ThrowNew(IAEClass, "params == null");
5551        goto exit;
5552    }
5553    if (offset < 0) {
5554        _env->ThrowNew(IAEClass, "offset < 0");
5555        goto exit;
5556    }
5557    _remaining = _env->GetArrayLength(params_ref) - offset;
5558    if (_remaining < 1) {
5559        _env->ThrowNew(IAEClass, "length - offset < 1");
5560        goto exit;
5561    }
5562    params_base = (GLfloat *)
5563        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5564    params = params_base + offset;
5565
5566    glTexParameterfv(
5567        (GLenum)target,
5568        (GLenum)pname,
5569        (GLfloat *)params
5570    );
5571
5572exit:
5573    if (params_base) {
5574        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5575            JNI_ABORT);
5576    }
5577}
5578
5579/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
5580static void
5581android_glTexParameterfv__IILjava_nio_FloatBuffer_2
5582  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5583    jarray _array = (jarray) 0;
5584    jint _remaining;
5585    GLfloat *params = (GLfloat *) 0;
5586
5587    params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
5588    if (_remaining < 1) {
5589        _env->ThrowNew(IAEClass, "remaining() < 1");
5590        goto exit;
5591    }
5592    glTexParameterfv(
5593        (GLenum)target,
5594        (GLenum)pname,
5595        (GLfloat *)params
5596    );
5597
5598exit:
5599    if (_array) {
5600        releasePointer(_env, _array, params, JNI_FALSE);
5601    }
5602}
5603
5604/* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
5605static void
5606android_glTexParameteri__III
5607  (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
5608    glTexParameteri(
5609        (GLenum)target,
5610        (GLenum)pname,
5611        (GLint)param
5612    );
5613}
5614
5615/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
5616static void
5617android_glTexParameteriv__II_3II
5618  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5619    GLint *params_base = (GLint *) 0;
5620    jint _remaining;
5621    GLint *params = (GLint *) 0;
5622
5623    if (!params_ref) {
5624        _env->ThrowNew(IAEClass, "params == null");
5625        goto exit;
5626    }
5627    if (offset < 0) {
5628        _env->ThrowNew(IAEClass, "offset < 0");
5629        goto exit;
5630    }
5631    _remaining = _env->GetArrayLength(params_ref) - offset;
5632    if (_remaining < 1) {
5633        _env->ThrowNew(IAEClass, "length - offset < 1");
5634        goto exit;
5635    }
5636    params_base = (GLint *)
5637        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5638    params = params_base + offset;
5639
5640    glTexParameteriv(
5641        (GLenum)target,
5642        (GLenum)pname,
5643        (GLint *)params
5644    );
5645
5646exit:
5647    if (params_base) {
5648        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5649            JNI_ABORT);
5650    }
5651}
5652
5653/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
5654static void
5655android_glTexParameteriv__IILjava_nio_IntBuffer_2
5656  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5657    jarray _array = (jarray) 0;
5658    jint _remaining;
5659    GLint *params = (GLint *) 0;
5660
5661    params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
5662    if (_remaining < 1) {
5663        _env->ThrowNew(IAEClass, "remaining() < 1");
5664        goto exit;
5665    }
5666    glTexParameteriv(
5667        (GLenum)target,
5668        (GLenum)pname,
5669        (GLint *)params
5670    );
5671
5672exit:
5673    if (_array) {
5674        releasePointer(_env, _array, params, JNI_FALSE);
5675    }
5676}
5677
5678/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
5679static void
5680android_glTexParameterxv__II_3II
5681  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
5682    GLfixed *params_base = (GLfixed *) 0;
5683    jint _remaining;
5684    GLfixed *params = (GLfixed *) 0;
5685
5686    if (!params_ref) {
5687        _env->ThrowNew(IAEClass, "params == null");
5688        goto exit;
5689    }
5690    if (offset < 0) {
5691        _env->ThrowNew(IAEClass, "offset < 0");
5692        goto exit;
5693    }
5694    _remaining = _env->GetArrayLength(params_ref) - offset;
5695    if (_remaining < 1) {
5696        _env->ThrowNew(IAEClass, "length - offset < 1");
5697        goto exit;
5698    }
5699    params_base = (GLfixed *)
5700        _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
5701    params = params_base + offset;
5702
5703    glTexParameterxv(
5704        (GLenum)target,
5705        (GLenum)pname,
5706        (GLfixed *)params
5707    );
5708
5709exit:
5710    if (params_base) {
5711        _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
5712            JNI_ABORT);
5713    }
5714}
5715
5716/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
5717static void
5718android_glTexParameterxv__IILjava_nio_IntBuffer_2
5719  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
5720    jarray _array = (jarray) 0;
5721    jint _remaining;
5722    GLfixed *params = (GLfixed *) 0;
5723
5724    params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
5725    if (_remaining < 1) {
5726        _env->ThrowNew(IAEClass, "remaining() < 1");
5727        goto exit;
5728    }
5729    glTexParameterxv(
5730        (GLenum)target,
5731        (GLenum)pname,
5732        (GLfixed *)params
5733    );
5734
5735exit:
5736    if (_array) {
5737        releasePointer(_env, _array, params, JNI_FALSE);
5738    }
5739}
5740
5741/* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
5742static void
5743android_glVertexPointer__IIII
5744  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
5745    glVertexPointer(
5746        (GLint)size,
5747        (GLenum)type,
5748        (GLsizei)stride,
5749        (const GLvoid *)offset
5750    );
5751}
5752
5753/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
5754static void
5755android_glCurrentPaletteMatrixOES__I
5756  (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
5757    _env->ThrowNew(UOEClass,
5758        "glCurrentPaletteMatrixOES");
5759}
5760
5761/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
5762static void
5763android_glDrawTexfOES__FFFFF
5764  (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
5765    glDrawTexfOES(
5766        (GLfloat)x,
5767        (GLfloat)y,
5768        (GLfloat)z,
5769        (GLfloat)width,
5770        (GLfloat)height
5771    );
5772}
5773
5774/* void glDrawTexfvOES ( const GLfloat *coords ) */
5775static void
5776android_glDrawTexfvOES___3FI
5777  (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
5778    GLfloat *coords_base = (GLfloat *) 0;
5779    jint _remaining;
5780    GLfloat *coords = (GLfloat *) 0;
5781
5782    if (!coords_ref) {
5783        _env->ThrowNew(IAEClass, "coords == null");
5784        goto exit;
5785    }
5786    if (offset < 0) {
5787        _env->ThrowNew(IAEClass, "offset < 0");
5788        goto exit;
5789    }
5790    _remaining = _env->GetArrayLength(coords_ref) - offset;
5791    if (_remaining < 5) {
5792        _env->ThrowNew(IAEClass, "length - offset < 5");
5793        goto exit;
5794    }
5795    coords_base = (GLfloat *)
5796        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5797    coords = coords_base + offset;
5798
5799    glDrawTexfvOES(
5800        (GLfloat *)coords
5801    );
5802
5803exit:
5804    if (coords_base) {
5805        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5806            JNI_ABORT);
5807    }
5808}
5809
5810/* void glDrawTexfvOES ( const GLfloat *coords ) */
5811static void
5812android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
5813  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5814    jarray _array = (jarray) 0;
5815    jint _remaining;
5816    GLfloat *coords = (GLfloat *) 0;
5817
5818    coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
5819    if (_remaining < 5) {
5820        _env->ThrowNew(IAEClass, "remaining() < 5");
5821        goto exit;
5822    }
5823    glDrawTexfvOES(
5824        (GLfloat *)coords
5825    );
5826
5827exit:
5828    if (_array) {
5829        releasePointer(_env, _array, coords, JNI_FALSE);
5830    }
5831}
5832
5833/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
5834static void
5835android_glDrawTexiOES__IIIII
5836  (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
5837    glDrawTexiOES(
5838        (GLint)x,
5839        (GLint)y,
5840        (GLint)z,
5841        (GLint)width,
5842        (GLint)height
5843    );
5844}
5845
5846/* void glDrawTexivOES ( const GLint *coords ) */
5847static void
5848android_glDrawTexivOES___3II
5849  (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
5850    GLint *coords_base = (GLint *) 0;
5851    jint _remaining;
5852    GLint *coords = (GLint *) 0;
5853
5854    if (!coords_ref) {
5855        _env->ThrowNew(IAEClass, "coords == null");
5856        goto exit;
5857    }
5858    if (offset < 0) {
5859        _env->ThrowNew(IAEClass, "offset < 0");
5860        goto exit;
5861    }
5862    _remaining = _env->GetArrayLength(coords_ref) - offset;
5863    if (_remaining < 5) {
5864        _env->ThrowNew(IAEClass, "length - offset < 5");
5865        goto exit;
5866    }
5867    coords_base = (GLint *)
5868        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5869    coords = coords_base + offset;
5870
5871    glDrawTexivOES(
5872        (GLint *)coords
5873    );
5874
5875exit:
5876    if (coords_base) {
5877        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5878            JNI_ABORT);
5879    }
5880}
5881
5882/* void glDrawTexivOES ( const GLint *coords ) */
5883static void
5884android_glDrawTexivOES__Ljava_nio_IntBuffer_2
5885  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5886    jarray _array = (jarray) 0;
5887    jint _remaining;
5888    GLint *coords = (GLint *) 0;
5889
5890    coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
5891    if (_remaining < 5) {
5892        _env->ThrowNew(IAEClass, "remaining() < 5");
5893        goto exit;
5894    }
5895    glDrawTexivOES(
5896        (GLint *)coords
5897    );
5898
5899exit:
5900    if (_array) {
5901        releasePointer(_env, _array, coords, JNI_FALSE);
5902    }
5903}
5904
5905/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
5906static void
5907android_glDrawTexsOES__SSSSS
5908  (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
5909    glDrawTexsOES(
5910        (GLshort)x,
5911        (GLshort)y,
5912        (GLshort)z,
5913        (GLshort)width,
5914        (GLshort)height
5915    );
5916}
5917
5918/* void glDrawTexsvOES ( const GLshort *coords ) */
5919static void
5920android_glDrawTexsvOES___3SI
5921  (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
5922    GLshort *coords_base = (GLshort *) 0;
5923    jint _remaining;
5924    GLshort *coords = (GLshort *) 0;
5925
5926    if (!coords_ref) {
5927        _env->ThrowNew(IAEClass, "coords == null");
5928        goto exit;
5929    }
5930    if (offset < 0) {
5931        _env->ThrowNew(IAEClass, "offset < 0");
5932        goto exit;
5933    }
5934    _remaining = _env->GetArrayLength(coords_ref) - offset;
5935    if (_remaining < 5) {
5936        _env->ThrowNew(IAEClass, "length - offset < 5");
5937        goto exit;
5938    }
5939    coords_base = (GLshort *)
5940        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
5941    coords = coords_base + offset;
5942
5943    glDrawTexsvOES(
5944        (GLshort *)coords
5945    );
5946
5947exit:
5948    if (coords_base) {
5949        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
5950            JNI_ABORT);
5951    }
5952}
5953
5954/* void glDrawTexsvOES ( const GLshort *coords ) */
5955static void
5956android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
5957  (JNIEnv *_env, jobject _this, jobject coords_buf) {
5958    jarray _array = (jarray) 0;
5959    jint _remaining;
5960    GLshort *coords = (GLshort *) 0;
5961
5962    coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
5963    if (_remaining < 5) {
5964        _env->ThrowNew(IAEClass, "remaining() < 5");
5965        goto exit;
5966    }
5967    glDrawTexsvOES(
5968        (GLshort *)coords
5969    );
5970
5971exit:
5972    if (_array) {
5973        releasePointer(_env, _array, coords, JNI_FALSE);
5974    }
5975}
5976
5977/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
5978static void
5979android_glDrawTexxOES__IIIII
5980  (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
5981    glDrawTexxOES(
5982        (GLfixed)x,
5983        (GLfixed)y,
5984        (GLfixed)z,
5985        (GLfixed)width,
5986        (GLfixed)height
5987    );
5988}
5989
5990/* void glDrawTexxvOES ( const GLfixed *coords ) */
5991static void
5992android_glDrawTexxvOES___3II
5993  (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
5994    GLfixed *coords_base = (GLfixed *) 0;
5995    jint _remaining;
5996    GLfixed *coords = (GLfixed *) 0;
5997
5998    if (!coords_ref) {
5999        _env->ThrowNew(IAEClass, "coords == null");
6000        goto exit;
6001    }
6002    if (offset < 0) {
6003        _env->ThrowNew(IAEClass, "offset < 0");
6004        goto exit;
6005    }
6006    _remaining = _env->GetArrayLength(coords_ref) - offset;
6007    if (_remaining < 5) {
6008        _env->ThrowNew(IAEClass, "length - offset < 5");
6009        goto exit;
6010    }
6011    coords_base = (GLfixed *)
6012        _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
6013    coords = coords_base + offset;
6014
6015    glDrawTexxvOES(
6016        (GLfixed *)coords
6017    );
6018
6019exit:
6020    if (coords_base) {
6021        _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
6022            JNI_ABORT);
6023    }
6024}
6025
6026/* void glDrawTexxvOES ( const GLfixed *coords ) */
6027static void
6028android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
6029  (JNIEnv *_env, jobject _this, jobject coords_buf) {
6030    jarray _array = (jarray) 0;
6031    jint _remaining;
6032    GLfixed *coords = (GLfixed *) 0;
6033
6034    coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
6035    if (_remaining < 5) {
6036        _env->ThrowNew(IAEClass, "remaining() < 5");
6037        goto exit;
6038    }
6039    glDrawTexxvOES(
6040        (GLfixed *)coords
6041    );
6042
6043exit:
6044    if (_array) {
6045        releasePointer(_env, _array, coords, JNI_FALSE);
6046    }
6047}
6048
6049/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
6050static void
6051android_glLoadPaletteFromModelViewMatrixOES__
6052  (JNIEnv *_env, jobject _this) {
6053    _env->ThrowNew(UOEClass,
6054        "glLoadPaletteFromModelViewMatrixOES");
6055}
6056
6057/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
6058static void
6059android_glMatrixIndexPointerOES__IIILjava_nio_Buffer_2
6060  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf) {
6061    _env->ThrowNew(UOEClass,
6062        "glMatrixIndexPointerOES");
6063}
6064
6065/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
6066static void
6067android_glMatrixIndexPointerOES__IIII
6068  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
6069    _env->ThrowNew(UOEClass,
6070        "glMatrixIndexPointerOES");
6071}
6072
6073/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
6074static void
6075android_glWeightPointerOES__IIILjava_nio_Buffer_2
6076  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf) {
6077    _env->ThrowNew(UOEClass,
6078        "glWeightPointerOES");
6079}
6080
6081/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
6082static void
6083android_glWeightPointerOES__IIII
6084  (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
6085    _env->ThrowNew(UOEClass,
6086        "glWeightPointerOES");
6087}
6088
6089/* void glBindFramebufferOES ( GLint target, GLint framebuffer ) */
6090static void
6091android_glBindFramebufferOES__II
6092  (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
6093    _env->ThrowNew(UOEClass,
6094        "glBindFramebufferOES");
6095}
6096
6097/* void glBindRenderbufferOES ( GLint target, GLint renderbuffer ) */
6098static void
6099android_glBindRenderbufferOES__II
6100  (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
6101    _env->ThrowNew(UOEClass,
6102        "glBindRenderbufferOES");
6103}
6104
6105/* void glBlendEquation ( GLint mode ) */
6106static void
6107android_glBlendEquation__I
6108  (JNIEnv *_env, jobject _this, jint mode) {
6109    _env->ThrowNew(UOEClass,
6110        "glBlendEquation");
6111}
6112
6113/* void glBlendEquationSeparate ( GLint modeRGB, GLint modeAlpha ) */
6114static void
6115android_glBlendEquationSeparate__II
6116  (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
6117    _env->ThrowNew(UOEClass,
6118        "glBlendEquationSeparate");
6119}
6120
6121/* void glBlendFuncSeparate ( GLint srcRGB, GLint dstRGB, GLint srcAlpha, GLint dstAlpha ) */
6122static void
6123android_glBlendFuncSeparate__IIII
6124  (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
6125    _env->ThrowNew(UOEClass,
6126        "glBlendFuncSeparate");
6127}
6128
6129/* GLint glCheckFramebufferStatusOES ( GLint target ) */
6130static jint
6131android_glCheckFramebufferStatusOES__I
6132  (JNIEnv *_env, jobject _this, jint target) {
6133    _env->ThrowNew(UOEClass,
6134        "glCheckFramebufferStatusOES");
6135    return 0;
6136}
6137
6138/* void glDeleteFramebuffersOES ( GLint n, GLint *framebuffers ) */
6139static void
6140android_glDeleteFramebuffersOES__I_3II
6141  (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
6142    _env->ThrowNew(UOEClass,
6143        "glDeleteFramebuffersOES");
6144}
6145
6146/* void glDeleteFramebuffersOES ( GLint n, GLint *framebuffers ) */
6147static void
6148android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
6149  (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
6150    _env->ThrowNew(UOEClass,
6151        "glDeleteFramebuffersOES");
6152}
6153
6154/* void glDeleteRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6155static void
6156android_glDeleteRenderbuffersOES__I_3II
6157  (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
6158    _env->ThrowNew(UOEClass,
6159        "glDeleteRenderbuffersOES");
6160}
6161
6162/* void glDeleteRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6163static void
6164android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
6165  (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
6166    _env->ThrowNew(UOEClass,
6167        "glDeleteRenderbuffersOES");
6168}
6169
6170/* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */
6171static void
6172android_glFramebufferRenderbufferOES__IIII
6173  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
6174    _env->ThrowNew(UOEClass,
6175        "glFramebufferRenderbufferOES");
6176}
6177
6178/* void glFramebufferTexture2DOES ( GLint target, GLint attachment, GLint textarget, GLint texture, GLint level ) */
6179static void
6180android_glFramebufferTexture2DOES__IIIII
6181  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
6182    _env->ThrowNew(UOEClass,
6183        "glFramebufferTexture2DOES");
6184}
6185
6186/* void glGenerateMipmapOES ( GLint target ) */
6187static void
6188android_glGenerateMipmapOES__I
6189  (JNIEnv *_env, jobject _this, jint target) {
6190    _env->ThrowNew(UOEClass,
6191        "glGenerateMipmapOES");
6192}
6193
6194/* void glGenFramebuffersOES ( GLint n, GLint *framebuffers ) */
6195static void
6196android_glGenFramebuffersOES__I_3II
6197  (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
6198    _env->ThrowNew(UOEClass,
6199        "glGenFramebuffersOES");
6200}
6201
6202/* void glGenFramebuffersOES ( GLint n, GLint *framebuffers ) */
6203static void
6204android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
6205  (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
6206    _env->ThrowNew(UOEClass,
6207        "glGenFramebuffersOES");
6208}
6209
6210/* void glGenRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6211static void
6212android_glGenRenderbuffersOES__I_3II
6213  (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
6214    _env->ThrowNew(UOEClass,
6215        "glGenRenderbuffersOES");
6216}
6217
6218/* void glGenRenderbuffersOES ( GLint n, GLint *renderbuffers ) */
6219static void
6220android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
6221  (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
6222    _env->ThrowNew(UOEClass,
6223        "glGenRenderbuffersOES");
6224}
6225
6226/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
6227static void
6228android_glGetFramebufferAttachmentParameterivOES__III_3II
6229  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
6230    _env->ThrowNew(UOEClass,
6231        "glGetFramebufferAttachmentParameterivOES");
6232}
6233
6234/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
6235static void
6236android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
6237  (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
6238    _env->ThrowNew(UOEClass,
6239        "glGetFramebufferAttachmentParameterivOES");
6240}
6241
6242/* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
6243static void
6244android_glGetRenderbufferParameterivOES__II_3II
6245  (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6246    _env->ThrowNew(UOEClass,
6247        "glGetRenderbufferParameterivOES");
6248}
6249
6250/* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
6251static void
6252android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
6253  (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6254    _env->ThrowNew(UOEClass,
6255        "glGetRenderbufferParameterivOES");
6256}
6257
6258/* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6259static void
6260android_glGetTexGenfv__II_3FI
6261  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
6262    _env->ThrowNew(UOEClass,
6263        "glGetTexGenfv");
6264}
6265
6266/* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6267static void
6268android_glGetTexGenfv__IILjava_nio_FloatBuffer_2
6269  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6270    _env->ThrowNew(UOEClass,
6271        "glGetTexGenfv");
6272}
6273
6274/* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6275static void
6276android_glGetTexGeniv__II_3II
6277  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6278    _env->ThrowNew(UOEClass,
6279        "glGetTexGeniv");
6280}
6281
6282/* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6283static void
6284android_glGetTexGeniv__IILjava_nio_IntBuffer_2
6285  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6286    _env->ThrowNew(UOEClass,
6287        "glGetTexGeniv");
6288}
6289
6290/* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6291static void
6292android_glGetTexGenxv__II_3II
6293  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6294    _env->ThrowNew(UOEClass,
6295        "glGetTexGenxv");
6296}
6297
6298/* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6299static void
6300android_glGetTexGenxv__IILjava_nio_IntBuffer_2
6301  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6302    _env->ThrowNew(UOEClass,
6303        "glGetTexGenxv");
6304}
6305
6306/* GLboolean glIsFramebufferOES ( GLint framebuffer ) */
6307static jboolean
6308android_glIsFramebufferOES__I
6309  (JNIEnv *_env, jobject _this, jint framebuffer) {
6310    _env->ThrowNew(UOEClass,
6311        "glIsFramebufferOES");
6312    return JNI_FALSE;
6313}
6314
6315/* GLboolean glIsRenderbufferOES ( GLint renderbuffer ) */
6316static jboolean
6317android_glIsRenderbufferOES__I
6318  (JNIEnv *_env, jobject _this, jint renderbuffer) {
6319    _env->ThrowNew(UOEClass,
6320        "glIsRenderbufferOES");
6321    return JNI_FALSE;
6322}
6323
6324/* void glRenderbufferStorageOES ( GLint target, GLint internalformat, GLint width, GLint height ) */
6325static void
6326android_glRenderbufferStorageOES__IIII
6327  (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
6328    _env->ThrowNew(UOEClass,
6329        "glRenderbufferStorageOES");
6330}
6331
6332/* void glTexGenf ( GLint coord, GLint pname, GLfloat param ) */
6333static void
6334android_glTexGenf__IIF
6335  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
6336    _env->ThrowNew(UOEClass,
6337        "glTexGenf");
6338}
6339
6340/* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6341static void
6342android_glTexGenfv__II_3FI
6343  (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
6344    _env->ThrowNew(UOEClass,
6345        "glTexGenfv");
6346}
6347
6348/* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
6349static void
6350android_glTexGenfv__IILjava_nio_FloatBuffer_2
6351  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6352    _env->ThrowNew(UOEClass,
6353        "glTexGenfv");
6354}
6355
6356/* void glTexGeni ( GLint coord, GLint pname, GLint param ) */
6357static void
6358android_glTexGeni__III
6359  (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
6360    _env->ThrowNew(UOEClass,
6361        "glTexGeni");
6362}
6363
6364/* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6365static void
6366android_glTexGeniv__II_3II
6367  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6368    _env->ThrowNew(UOEClass,
6369        "glTexGeniv");
6370}
6371
6372/* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
6373static void
6374android_glTexGeniv__IILjava_nio_IntBuffer_2
6375  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6376    _env->ThrowNew(UOEClass,
6377        "glTexGeniv");
6378}
6379
6380/* void glTexGenx ( GLint coord, GLint pname, GLint param ) */
6381static void
6382android_glTexGenx__III
6383  (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
6384    _env->ThrowNew(UOEClass,
6385        "glTexGenx");
6386}
6387
6388/* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6389static void
6390android_glTexGenxv__II_3II
6391  (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
6392    _env->ThrowNew(UOEClass,
6393        "glTexGenxv");
6394}
6395
6396/* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
6397static void
6398android_glTexGenxv__IILjava_nio_IntBuffer_2
6399  (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
6400    _env->ThrowNew(UOEClass,
6401        "glTexGenxv");
6402}
6403
6404static const char *classPathName = "com/google/android/gles_jni/GLImpl";
6405
6406static JNINativeMethod methods[] = {
6407{"_nativeClassInit", "()V", (void*)nativeClassInit },
6408{"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I },
6409{"glAlphaFunc", "(IF)V", (void *) android_glAlphaFunc__IF },
6410{"glAlphaFuncx", "(II)V", (void *) android_glAlphaFuncx__II },
6411{"glBindTexture", "(II)V", (void *) android_glBindTexture__II },
6412{"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II },
6413{"glClear", "(I)V", (void *) android_glClear__I },
6414{"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF },
6415{"glClearColorx", "(IIII)V", (void *) android_glClearColorx__IIII },
6416{"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F },
6417{"glClearDepthx", "(I)V", (void *) android_glClearDepthx__I },
6418{"glClearStencil", "(I)V", (void *) android_glClearStencil__I },
6419{"glClientActiveTexture", "(I)V", (void *) android_glClientActiveTexture__I },
6420{"glColor4f", "(FFFF)V", (void *) android_glColor4f__FFFF },
6421{"glColor4x", "(IIII)V", (void *) android_glColor4x__IIII },
6422{"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ },
6423{"glColorPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glColorPointerBounds__IIILjava_nio_Buffer_2I },
6424{"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 },
6425{"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6426{"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII },
6427{"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII },
6428{"glCullFace", "(I)V", (void *) android_glCullFace__I },
6429{"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II },
6430{"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 },
6431{"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I },
6432{"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z },
6433{"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF },
6434{"glDepthRangex", "(II)V", (void *) android_glDepthRangex__II },
6435{"glDisable", "(I)V", (void *) android_glDisable__I },
6436{"glDisableClientState", "(I)V", (void *) android_glDisableClientState__I },
6437{"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
6438{"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
6439{"glEnable", "(I)V", (void *) android_glEnable__I },
6440{"glEnableClientState", "(I)V", (void *) android_glEnableClientState__I },
6441{"glFinish", "()V", (void *) android_glFinish__ },
6442{"glFlush", "()V", (void *) android_glFlush__ },
6443{"glFogf", "(IF)V", (void *) android_glFogf__IF },
6444{"glFogfv", "(I[FI)V", (void *) android_glFogfv__I_3FI },
6445{"glFogfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glFogfv__ILjava_nio_FloatBuffer_2 },
6446{"glFogx", "(II)V", (void *) android_glFogx__II },
6447{"glFogxv", "(I[II)V", (void *) android_glFogxv__I_3II },
6448{"glFogxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxv__ILjava_nio_IntBuffer_2 },
6449{"glFrontFace", "(I)V", (void *) android_glFrontFace__I },
6450{"glFrustumf", "(FFFFFF)V", (void *) android_glFrustumf__FFFFFF },
6451{"glFrustumx", "(IIIIII)V", (void *) android_glFrustumx__IIIIII },
6452{"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II },
6453{"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 },
6454{"glGetError", "()I", (void *) android_glGetError__ },
6455{"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II },
6456{"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 },
6457{"_glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
6458{"glHint", "(II)V", (void *) android_glHint__II },
6459{"glLightModelf", "(IF)V", (void *) android_glLightModelf__IF },
6460{"glLightModelfv", "(I[FI)V", (void *) android_glLightModelfv__I_3FI },
6461{"glLightModelfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glLightModelfv__ILjava_nio_FloatBuffer_2 },
6462{"glLightModelx", "(II)V", (void *) android_glLightModelx__II },
6463{"glLightModelxv", "(I[II)V", (void *) android_glLightModelxv__I_3II },
6464{"glLightModelxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxv__ILjava_nio_IntBuffer_2 },
6465{"glLightf", "(IIF)V", (void *) android_glLightf__IIF },
6466{"glLightfv", "(II[FI)V", (void *) android_glLightfv__II_3FI },
6467{"glLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glLightfv__IILjava_nio_FloatBuffer_2 },
6468{"glLightx", "(III)V", (void *) android_glLightx__III },
6469{"glLightxv", "(II[II)V", (void *) android_glLightxv__II_3II },
6470{"glLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxv__IILjava_nio_IntBuffer_2 },
6471{"glLineWidth", "(F)V", (void *) android_glLineWidth__F },
6472{"glLineWidthx", "(I)V", (void *) android_glLineWidthx__I },
6473{"glLoadIdentity", "()V", (void *) android_glLoadIdentity__ },
6474{"glLoadMatrixf", "([FI)V", (void *) android_glLoadMatrixf___3FI },
6475{"glLoadMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 },
6476{"glLoadMatrixx", "([II)V", (void *) android_glLoadMatrixx___3II },
6477{"glLoadMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixx__Ljava_nio_IntBuffer_2 },
6478{"glLogicOp", "(I)V", (void *) android_glLogicOp__I },
6479{"glMaterialf", "(IIF)V", (void *) android_glMaterialf__IIF },
6480{"glMaterialfv", "(II[FI)V", (void *) android_glMaterialfv__II_3FI },
6481{"glMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glMaterialfv__IILjava_nio_FloatBuffer_2 },
6482{"glMaterialx", "(III)V", (void *) android_glMaterialx__III },
6483{"glMaterialxv", "(II[II)V", (void *) android_glMaterialxv__II_3II },
6484{"glMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxv__IILjava_nio_IntBuffer_2 },
6485{"glMatrixMode", "(I)V", (void *) android_glMatrixMode__I },
6486{"glMultMatrixf", "([FI)V", (void *) android_glMultMatrixf___3FI },
6487{"glMultMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glMultMatrixf__Ljava_nio_FloatBuffer_2 },
6488{"glMultMatrixx", "([II)V", (void *) android_glMultMatrixx___3II },
6489{"glMultMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixx__Ljava_nio_IntBuffer_2 },
6490{"glMultiTexCoord4f", "(IFFFF)V", (void *) android_glMultiTexCoord4f__IFFFF },
6491{"glMultiTexCoord4x", "(IIIII)V", (void *) android_glMultiTexCoord4x__IIIII },
6492{"glNormal3f", "(FFF)V", (void *) android_glNormal3f__FFF },
6493{"glNormal3x", "(III)V", (void *) android_glNormal3x__III },
6494{"glNormalPointerBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glNormalPointerBounds__IILjava_nio_Buffer_2I },
6495{"glOrthof", "(FFFFFF)V", (void *) android_glOrthof__FFFFFF },
6496{"glOrthox", "(IIIIII)V", (void *) android_glOrthox__IIIIII },
6497{"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II },
6498{"glPointSize", "(F)V", (void *) android_glPointSize__F },
6499{"glPointSizex", "(I)V", (void *) android_glPointSizex__I },
6500{"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF },
6501{"glPolygonOffsetx", "(II)V", (void *) android_glPolygonOffsetx__II },
6502{"glPopMatrix", "()V", (void *) android_glPopMatrix__ },
6503{"glPushMatrix", "()V", (void *) android_glPushMatrix__ },
6504{"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 },
6505{"glRotatef", "(FFFF)V", (void *) android_glRotatef__FFFF },
6506{"glRotatex", "(IIII)V", (void *) android_glRotatex__IIII },
6507{"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ },
6508{"glSampleCoveragex", "(IZ)V", (void *) android_glSampleCoveragex__IZ },
6509{"glScalef", "(FFF)V", (void *) android_glScalef__FFF },
6510{"glScalex", "(III)V", (void *) android_glScalex__III },
6511{"glScissor", "(IIII)V", (void *) android_glScissor__IIII },
6512{"glShadeModel", "(I)V", (void *) android_glShadeModel__I },
6513{"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III },
6514{"glStencilMask", "(I)V", (void *) android_glStencilMask__I },
6515{"glStencilOp", "(III)V", (void *) android_glStencilOp__III },
6516{"glTexCoordPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I },
6517{"glTexEnvf", "(IIF)V", (void *) android_glTexEnvf__IIF },
6518{"glTexEnvfv", "(II[FI)V", (void *) android_glTexEnvfv__II_3FI },
6519{"glTexEnvfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexEnvfv__IILjava_nio_FloatBuffer_2 },
6520{"glTexEnvx", "(III)V", (void *) android_glTexEnvx__III },
6521{"glTexEnvxv", "(II[II)V", (void *) android_glTexEnvxv__II_3II },
6522{"glTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxv__IILjava_nio_IntBuffer_2 },
6523{"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 },
6524{"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF },
6525{"glTexParameterx", "(III)V", (void *) android_glTexParameterx__III },
6526{"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6527{"glTranslatef", "(FFF)V", (void *) android_glTranslatef__FFF },
6528{"glTranslatex", "(III)V", (void *) android_glTranslatex__III },
6529{"glVertexPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glVertexPointerBounds__IIILjava_nio_Buffer_2I },
6530{"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
6531{"glQueryMatrixxOES", "([II[II)I", (void *) android_glQueryMatrixxOES___3II_3II },
6532{"glQueryMatrixxOES", "(Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)I", (void *) android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
6533{"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II },
6534{"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I },
6535{"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 },
6536{"glClipPlanef", "(I[FI)V", (void *) android_glClipPlanef__I_3FI },
6537{"glClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanef__ILjava_nio_FloatBuffer_2 },
6538{"glClipPlanex", "(I[II)V", (void *) android_glClipPlanex__I_3II },
6539{"glClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanex__ILjava_nio_IntBuffer_2 },
6540{"glColor4ub", "(BBBB)V", (void *) android_glColor4ub__BBBB },
6541{"glColorPointer", "(IIII)V", (void *) android_glColorPointer__IIII },
6542{"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II },
6543{"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 },
6544{"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
6545{"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II },
6546{"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 },
6547{"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI },
6548{"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 },
6549{"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II },
6550{"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 },
6551{"glGetClipPlanef", "(I[FI)V", (void *) android_glGetClipPlanef__I_3FI },
6552{"glGetClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 },
6553{"glGetClipPlanex", "(I[II)V", (void *) android_glGetClipPlanex__I_3II },
6554{"glGetClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanex__ILjava_nio_IntBuffer_2 },
6555{"glGetFixedv", "(I[II)V", (void *) android_glGetFixedv__I_3II },
6556{"glGetFixedv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedv__ILjava_nio_IntBuffer_2 },
6557{"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI },
6558{"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 },
6559{"glGetLightfv", "(II[FI)V", (void *) android_glGetLightfv__II_3FI },
6560{"glGetLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetLightfv__IILjava_nio_FloatBuffer_2 },
6561{"glGetLightxv", "(II[II)V", (void *) android_glGetLightxv__II_3II },
6562{"glGetLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxv__IILjava_nio_IntBuffer_2 },
6563{"glGetMaterialfv", "(II[FI)V", (void *) android_glGetMaterialfv__II_3FI },
6564{"glGetMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 },
6565{"glGetMaterialxv", "(II[II)V", (void *) android_glGetMaterialxv__II_3II },
6566{"glGetMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxv__IILjava_nio_IntBuffer_2 },
6567{"glGetTexEnviv", "(II[II)V", (void *) android_glGetTexEnviv__II_3II },
6568{"glGetTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnviv__IILjava_nio_IntBuffer_2 },
6569{"glGetTexEnvxv", "(II[II)V", (void *) android_glGetTexEnvxv__II_3II },
6570{"glGetTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 },
6571{"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI },
6572{"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 },
6573{"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II },
6574{"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 },
6575{"glGetTexParameterxv", "(II[II)V", (void *) android_glGetTexParameterxv__II_3II },
6576{"glGetTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 },
6577{"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I },
6578{"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I },
6579{"glIsTexture", "(I)Z", (void *) android_glIsTexture__I },
6580{"glNormalPointer", "(III)V", (void *) android_glNormalPointer__III },
6581{"glPointParameterf", "(IF)V", (void *) android_glPointParameterf__IF },
6582{"glPointParameterfv", "(I[FI)V", (void *) android_glPointParameterfv__I_3FI },
6583{"glPointParameterfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glPointParameterfv__ILjava_nio_FloatBuffer_2 },
6584{"glPointParameterx", "(II)V", (void *) android_glPointParameterx__II },
6585{"glPointParameterxv", "(I[II)V", (void *) android_glPointParameterxv__I_3II },
6586{"glPointParameterxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxv__ILjava_nio_IntBuffer_2 },
6587{"glPointSizePointerOES", "(IILjava/nio/Buffer;)V", (void *) android_glPointSizePointerOES__IILjava_nio_Buffer_2 },
6588{"glTexCoordPointer", "(IIII)V", (void *) android_glTexCoordPointer__IIII },
6589{"glTexEnvi", "(III)V", (void *) android_glTexEnvi__III },
6590{"glTexEnviv", "(II[II)V", (void *) android_glTexEnviv__II_3II },
6591{"glTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnviv__IILjava_nio_IntBuffer_2 },
6592{"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI },
6593{"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 },
6594{"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III },
6595{"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II },
6596{"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 },
6597{"glTexParameterxv", "(II[II)V", (void *) android_glTexParameterxv__II_3II },
6598{"glTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxv__IILjava_nio_IntBuffer_2 },
6599{"glVertexPointer", "(IIII)V", (void *) android_glVertexPointer__IIII },
6600{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
6601{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
6602{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
6603{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
6604{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
6605{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
6606{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
6607{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
6608{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
6609{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
6610{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
6611{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
6612{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
6613{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
6614{"glMatrixIndexPointerOES", "(IIILjava/nio/Buffer;)V", (void *) android_glMatrixIndexPointerOES__IIILjava_nio_Buffer_2 },
6615{"glMatrixIndexPointerOES", "(IIII)V", (void *) android_glMatrixIndexPointerOES__IIII },
6616{"glWeightPointerOES", "(IIILjava/nio/Buffer;)V", (void *) android_glWeightPointerOES__IIILjava_nio_Buffer_2 },
6617{"glWeightPointerOES", "(IIII)V", (void *) android_glWeightPointerOES__IIII },
6618{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
6619{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
6620{"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I },
6621{"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II },
6622{"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII },
6623{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
6624{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
6625{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
6626{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
6627{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
6628{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
6629{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
6630{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
6631{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
6632{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
6633{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
6634{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
6635{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
6636{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
6637{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
6638{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
6639{"glGetTexGenfv", "(II[FI)V", (void *) android_glGetTexGenfv__II_3FI },
6640{"glGetTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 },
6641{"glGetTexGeniv", "(II[II)V", (void *) android_glGetTexGeniv__II_3II },
6642{"glGetTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGeniv__IILjava_nio_IntBuffer_2 },
6643{"glGetTexGenxv", "(II[II)V", (void *) android_glGetTexGenxv__II_3II },
6644{"glGetTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxv__IILjava_nio_IntBuffer_2 },
6645{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
6646{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
6647{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
6648{"glTexGenf", "(IIF)V", (void *) android_glTexGenf__IIF },
6649{"glTexGenfv", "(II[FI)V", (void *) android_glTexGenfv__II_3FI },
6650{"glTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfv__IILjava_nio_FloatBuffer_2 },
6651{"glTexGeni", "(III)V", (void *) android_glTexGeni__III },
6652{"glTexGeniv", "(II[II)V", (void *) android_glTexGeniv__II_3II },
6653{"glTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGeniv__IILjava_nio_IntBuffer_2 },
6654{"glTexGenx", "(III)V", (void *) android_glTexGenx__III },
6655{"glTexGenxv", "(II[II)V", (void *) android_glTexGenxv__II_3II },
6656{"glTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxv__IILjava_nio_IntBuffer_2 },
6657};
6658
6659int register_com_google_android_gles_jni_GLImpl(JNIEnv *_env)
6660{
6661    int err;
6662    err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
6663    return err;
6664}
6665