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