1 /*
2 **
3 ** Copyright 2009, 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 #pragma GCC diagnostic ignored "-Wunused-variable"
21 #pragma GCC diagnostic ignored "-Wunused-function"
22 
23 #include <GLES/gl.h>
24 #include <GLES/glext.h>
25 
26 #include <jni.h>
27 #include <nativehelper/JNIHelp.h>
28 #include <android_runtime/AndroidRuntime.h>
29 #include <utils/misc.h>
30 #include <assert.h>
31 
32 static int initialized = 0;
33 
34 static jclass nioAccessClass;
35 static jclass bufferClass;
36 static jmethodID getBasePointerID;
37 static jmethodID getBaseArrayID;
38 static jmethodID getBaseArrayOffsetID;
39 static jfieldID positionID;
40 static jfieldID limitID;
41 static jfieldID elementSizeShiftID;
42 
43 
44 /* special calls implemented in Android's GLES wrapper used to more
45  * efficiently bound-check passed arrays */
46 extern "C" {
47 #ifdef GL_VERSION_ES_CM_1_1
48 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
49         const GLvoid *ptr, GLsizei count);
50 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
51         const GLvoid *pointer, GLsizei count);
52 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
53         GLsizei stride, const GLvoid *pointer, GLsizei count);
54 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
55         GLsizei stride, const GLvoid *pointer, GLsizei count);
56 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
57         GLsizei stride, const GLvoid *pointer, GLsizei count);
58 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
59         GLsizei stride, const GLvoid *pointer, GLsizei count);
60 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
61         GLsizei stride, const GLvoid *pointer, GLsizei count);
62 #endif
63 #ifdef GL_ES_VERSION_2_0
glVertexAttribPointerBounds(GLuint indx,GLint size,GLenum type,GLboolean normalized,GLsizei stride,const GLvoid * pointer,GLsizei count)64 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
65         GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
66     glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
67 }
68 #endif
69 #ifdef GL_ES_VERSION_3_0
glVertexAttribIPointerBounds(GLuint indx,GLint size,GLenum type,GLsizei stride,const GLvoid * pointer,GLsizei count)70 static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
71         GLsizei stride, const GLvoid *pointer, GLsizei count) {
72     glVertexAttribIPointer(indx, size, type, stride, pointer);
73 }
74 #endif
75 }
76 
77 /* Cache method IDs each time the class is loaded. */
78 
79 static void
nativeClassInit(JNIEnv * _env,jclass glImplClass)80 nativeClassInit(JNIEnv *_env, jclass glImplClass)
81 {
82     jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
83     nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
84 
85     jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
86     bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
87 
88     getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
89             "getBasePointer", "(Ljava/nio/Buffer;)J");
90     getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
91             "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
92     getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
93             "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
94 
95     positionID = _env->GetFieldID(bufferClass, "position", "I");
96     limitID = _env->GetFieldID(bufferClass, "limit", "I");
97     elementSizeShiftID =
98         _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
99 }
100 
101 static void *
getPointer(JNIEnv * _env,jobject buffer,jarray * array,jint * remaining,jint * offset)102 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
103 {
104     jint position;
105     jint limit;
106     jint elementSizeShift;
107     jlong pointer;
108 
109     position = _env->GetIntField(buffer, positionID);
110     limit = _env->GetIntField(buffer, limitID);
111     elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
112     *remaining = (limit - position) << elementSizeShift;
113     pointer = _env->CallStaticLongMethod(nioAccessClass,
114             getBasePointerID, buffer);
115     if (pointer != 0L) {
116         *array = NULL;
117         return reinterpret_cast<void*>(pointer);
118     }
119 
120     *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
121             getBaseArrayID, buffer);
122     *offset = _env->CallStaticIntMethod(nioAccessClass,
123             getBaseArrayOffsetID, buffer);
124 
125     return NULL;
126 }
127 
128 class ByteArrayGetter {
129 public:
Get(JNIEnv * _env,jbyteArray array,jboolean * is_copy)130     static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
131         return _env->GetByteArrayElements(array, is_copy);
132     }
133 };
134 class BooleanArrayGetter {
135 public:
Get(JNIEnv * _env,jbooleanArray array,jboolean * is_copy)136     static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
137         return _env->GetBooleanArrayElements(array, is_copy);
138     }
139 };
140 class CharArrayGetter {
141 public:
Get(JNIEnv * _env,jcharArray array,jboolean * is_copy)142     static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
143         return _env->GetCharArrayElements(array, is_copy);
144     }
145 };
146 class ShortArrayGetter {
147 public:
Get(JNIEnv * _env,jshortArray array,jboolean * is_copy)148     static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
149         return _env->GetShortArrayElements(array, is_copy);
150     }
151 };
152 class IntArrayGetter {
153 public:
Get(JNIEnv * _env,jintArray array,jboolean * is_copy)154     static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
155         return _env->GetIntArrayElements(array, is_copy);
156     }
157 };
158 class LongArrayGetter {
159 public:
Get(JNIEnv * _env,jlongArray array,jboolean * is_copy)160     static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
161         return _env->GetLongArrayElements(array, is_copy);
162     }
163 };
164 class FloatArrayGetter {
165 public:
Get(JNIEnv * _env,jfloatArray array,jboolean * is_copy)166     static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
167         return _env->GetFloatArrayElements(array, is_copy);
168     }
169 };
170 class DoubleArrayGetter {
171 public:
Get(JNIEnv * _env,jdoubleArray array,jboolean * is_copy)172     static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
173         return _env->GetDoubleArrayElements(array, is_copy);
174     }
175 };
176 
177 template<typename JTYPEARRAY, typename ARRAYGETTER>
178 static void*
getArrayPointer(JNIEnv * _env,JTYPEARRAY array,jboolean * is_copy)179 getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
180     return ARRAYGETTER::Get(_env, array, is_copy);
181 }
182 
183 class ByteArrayReleaser {
184 public:
Release(JNIEnv * _env,jbyteArray array,jbyte * data,jboolean commit)185     static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
186         _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
187     }
188 };
189 class BooleanArrayReleaser {
190 public:
Release(JNIEnv * _env,jbooleanArray array,jboolean * data,jboolean commit)191     static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
192         _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
193     }
194 };
195 class CharArrayReleaser {
196 public:
Release(JNIEnv * _env,jcharArray array,jchar * data,jboolean commit)197     static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
198         _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
199     }
200 };
201 class ShortArrayReleaser {
202 public:
Release(JNIEnv * _env,jshortArray array,jshort * data,jboolean commit)203     static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
204         _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
205     }
206 };
207 class IntArrayReleaser {
208 public:
Release(JNIEnv * _env,jintArray array,jint * data,jboolean commit)209     static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
210         _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
211     }
212 };
213 class LongArrayReleaser {
214 public:
Release(JNIEnv * _env,jlongArray array,jlong * data,jboolean commit)215     static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
216         _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
217     }
218 };
219 class FloatArrayReleaser {
220 public:
Release(JNIEnv * _env,jfloatArray array,jfloat * data,jboolean commit)221     static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
222         _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
223     }
224 };
225 class DoubleArrayReleaser {
226 public:
Release(JNIEnv * _env,jdoubleArray array,jdouble * data,jboolean commit)227     static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
228         _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
229     }
230 };
231 
232 template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
233 static void
releaseArrayPointer(JNIEnv * _env,JTYPEARRAY array,NTYPEARRAY data,jboolean commit)234 releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
235     ARRAYRELEASER::Release(_env, array, data, commit);
236 }
237 
238 static void
releasePointer(JNIEnv * _env,jarray array,void * data,jboolean commit)239 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
240 {
241     _env->ReleasePrimitiveArrayCritical(array, data,
242                        commit ? 0 : JNI_ABORT);
243 }
244 
245 static void *
getDirectBufferPointer(JNIEnv * _env,jobject buffer)246 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
247     char* buf = (char*) _env->GetDirectBufferAddress(buffer);
248     if (buf) {
249         jint position = _env->GetIntField(buffer, positionID);
250         jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
251         buf += position << elementSizeShift;
252     } else {
253         jniThrowException(_env, "java/lang/IllegalArgumentException",
254                           "Must use a native order direct Buffer");
255     }
256     return (void*) buf;
257 }
258 
259 // --------------------------------------------------------------------------
260 
261 /*
262  * returns the number of values glGet returns for a given pname.
263  *
264  * The code below is written such that pnames requiring only one values
265  * are the default (and are not explicitely tested for). This makes the
266  * checking code much shorter/readable/efficient.
267  *
268  * This means that unknown pnames (e.g.: extensions) will default to 1. If
269  * that unknown pname needs more than 1 value, then the validation check
270  * is incomplete and the app may crash if it passed the wrong number params.
271  */
getNeededCount(GLint pname)272 static int getNeededCount(GLint pname) {
273     int needed = 1;
274 #ifdef GL_ES_VERSION_3_0
275     // GLES 3.x pnames
276     switch (pname) {
277         case GL_MAX_VIEWPORT_DIMS:
278             needed = 2;
279             break;
280 
281         case GL_PROGRAM_BINARY_FORMATS:
282             glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
283             break;
284     }
285 #endif
286 
287 #ifdef GL_ES_VERSION_2_0
288     // GLES 2.x pnames
289     switch (pname) {
290         case GL_ALIASED_LINE_WIDTH_RANGE:
291         case GL_ALIASED_POINT_SIZE_RANGE:
292             needed = 2;
293             break;
294 
295         case GL_BLEND_COLOR:
296         case GL_COLOR_CLEAR_VALUE:
297         case GL_COLOR_WRITEMASK:
298         case GL_SCISSOR_BOX:
299         case GL_VIEWPORT:
300             needed = 4;
301             break;
302 
303         case GL_COMPRESSED_TEXTURE_FORMATS:
304             glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
305             break;
306 
307         case GL_SHADER_BINARY_FORMATS:
308             glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
309             break;
310     }
311 #endif
312 
313 #ifdef GL_VERSION_ES_CM_1_1
314     // GLES 1.x pnames
315     switch (pname) {
316         case GL_ALIASED_LINE_WIDTH_RANGE:
317         case GL_ALIASED_POINT_SIZE_RANGE:
318         case GL_DEPTH_RANGE:
319         case GL_SMOOTH_LINE_WIDTH_RANGE:
320         case GL_SMOOTH_POINT_SIZE_RANGE:
321             needed = 2;
322             break;
323 
324         case GL_CURRENT_NORMAL:
325         case GL_POINT_DISTANCE_ATTENUATION:
326             needed = 3;
327             break;
328 
329         case GL_COLOR_CLEAR_VALUE:
330         case GL_COLOR_WRITEMASK:
331         case GL_CURRENT_COLOR:
332         case GL_CURRENT_TEXTURE_COORDS:
333         case GL_FOG_COLOR:
334         case GL_LIGHT_MODEL_AMBIENT:
335         case GL_SCISSOR_BOX:
336         case GL_VIEWPORT:
337             needed = 4;
338             break;
339 
340         case GL_MODELVIEW_MATRIX:
341         case GL_PROJECTION_MATRIX:
342         case GL_TEXTURE_MATRIX:
343             needed = 16;
344             break;
345 
346         case GL_COMPRESSED_TEXTURE_FORMATS:
347             glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
348             break;
349     }
350 #endif
351     return needed;
352 }
353 
354 template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
355           typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
356 static void
get(JNIEnv * _env,jobject _this,jint pname,JTYPEARRAY params_ref,jint offset)357 get
358   (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
359     jint _exception = 0;
360     const char * _exceptionType;
361     const char * _exceptionMessage;
362     CTYPE *params_base = (CTYPE *) 0;
363     jint _remaining;
364     CTYPE *params = (CTYPE *) 0;
365     int _needed = 0;
366 
367     if (!params_ref) {
368         _exception = 1;
369         _exceptionType = "java/lang/IllegalArgumentException";
370         _exceptionMessage = "params == null";
371         goto exit;
372     }
373     if (offset < 0) {
374         _exception = 1;
375         _exceptionType = "java/lang/IllegalArgumentException";
376         _exceptionMessage = "offset < 0";
377         goto exit;
378     }
379     _remaining = _env->GetArrayLength(params_ref) - offset;
380     _needed = getNeededCount(pname);
381     // if we didn't find this pname, we just assume the user passed
382     // an array of the right size -- this might happen with extensions
383     // or if we forget an enum here.
384     if (_remaining < _needed) {
385         _exception = 1;
386         _exceptionType = "java/lang/IllegalArgumentException";
387         _exceptionMessage = "length - offset < needed";
388         goto exit;
389     }
390     params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
391         _env, params_ref, (jboolean *)0);
392     params = params_base + offset;
393 
394     GET(
395         (GLenum)pname,
396         (CTYPE *)params
397     );
398 
399 exit:
400     if (params_base) {
401         releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
402             _env, params_ref, params_base, !_exception);
403     }
404     if (_exception) {
405         jniThrowException(_env, _exceptionType, _exceptionMessage);
406     }
407 }
408 
409 
410 template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
411           typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
412 static void
getarray(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)413 getarray
414   (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
415     jint _exception = 0;
416     const char * _exceptionType;
417     const char * _exceptionMessage;
418     JTYPEARRAY _array = (JTYPEARRAY) 0;
419     jint _bufferOffset = (jint) 0;
420     jint _remaining;
421     CTYPE *params = (CTYPE *) 0;
422     int _needed = 0;
423 
424     params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
425     _remaining /= sizeof(CTYPE);    // convert from bytes to item count
426     _needed = getNeededCount(pname);
427     // if we didn't find this pname, we just assume the user passed
428     // an array of the right size -- this might happen with extensions
429     // or if we forget an enum here.
430     if (_needed>0 && _remaining < _needed) {
431         _exception = 1;
432         _exceptionType = "java/lang/IllegalArgumentException";
433         _exceptionMessage = "remaining() < needed";
434         goto exit;
435     }
436     if (params == NULL) {
437         char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
438             _env, _array, (jboolean *) 0);
439         params = (CTYPE *) (_paramsBase + _bufferOffset);
440     }
441     GET(
442         (GLenum)pname,
443         (CTYPE *)params
444     );
445 
446 exit:
447     if (_array) {
448         releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
449             _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
450     }
451     if (_exception) {
452         jniThrowException(_env, _exceptionType, _exceptionMessage);
453     }
454 }
455 
456 // --------------------------------------------------------------------------
457 /* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
458 static void
android_glBlendEquationSeparateOES__II(JNIEnv * _env,jobject _this,jint modeRGB,jint modeAlpha)459 android_glBlendEquationSeparateOES__II
460   (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
461     glBlendEquationSeparateOES(
462         (GLenum)modeRGB,
463         (GLenum)modeAlpha
464     );
465 }
466 
467 /* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
468 static void
android_glBlendFuncSeparateOES__IIII(JNIEnv * _env,jobject _this,jint srcRGB,jint dstRGB,jint srcAlpha,jint dstAlpha)469 android_glBlendFuncSeparateOES__IIII
470   (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
471     glBlendFuncSeparateOES(
472         (GLenum)srcRGB,
473         (GLenum)dstRGB,
474         (GLenum)srcAlpha,
475         (GLenum)dstAlpha
476     );
477 }
478 
479 /* void glBlendEquationOES ( GLenum mode ) */
480 static void
android_glBlendEquationOES__I(JNIEnv * _env,jobject _this,jint mode)481 android_glBlendEquationOES__I
482   (JNIEnv *_env, jobject _this, jint mode) {
483     glBlendEquationOES(
484         (GLenum)mode
485     );
486 }
487 
488 /* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
489 static void
android_glDrawTexsOES__SSSSS(JNIEnv * _env,jobject _this,jshort x,jshort y,jshort z,jshort width,jshort height)490 android_glDrawTexsOES__SSSSS
491   (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
492     glDrawTexsOES(
493         (GLshort)x,
494         (GLshort)y,
495         (GLshort)z,
496         (GLshort)width,
497         (GLshort)height
498     );
499 }
500 
501 /* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
502 static void
android_glDrawTexiOES__IIIII(JNIEnv * _env,jobject _this,jint x,jint y,jint z,jint width,jint height)503 android_glDrawTexiOES__IIIII
504   (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
505     glDrawTexiOES(
506         (GLint)x,
507         (GLint)y,
508         (GLint)z,
509         (GLint)width,
510         (GLint)height
511     );
512 }
513 
514 /* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
515 static void
android_glDrawTexxOES__IIIII(JNIEnv * _env,jobject _this,jint x,jint y,jint z,jint width,jint height)516 android_glDrawTexxOES__IIIII
517   (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
518     glDrawTexxOES(
519         (GLfixed)x,
520         (GLfixed)y,
521         (GLfixed)z,
522         (GLfixed)width,
523         (GLfixed)height
524     );
525 }
526 
527 /* void glDrawTexsvOES ( const GLshort *coords ) */
528 static void
android_glDrawTexsvOES___3SI(JNIEnv * _env,jobject _this,jshortArray coords_ref,jint offset)529 android_glDrawTexsvOES___3SI
530   (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
531     jint _exception = 0;
532     const char * _exceptionType = NULL;
533     const char * _exceptionMessage = NULL;
534     GLshort *coords_base = (GLshort *) 0;
535     jint _remaining;
536     GLshort *coords = (GLshort *) 0;
537 
538     if (!coords_ref) {
539         _exception = 1;
540         _exceptionType = "java/lang/IllegalArgumentException";
541         _exceptionMessage = "coords == null";
542         goto exit;
543     }
544     if (offset < 0) {
545         _exception = 1;
546         _exceptionType = "java/lang/IllegalArgumentException";
547         _exceptionMessage = "offset < 0";
548         goto exit;
549     }
550     _remaining = _env->GetArrayLength(coords_ref) - offset;
551     if (_remaining < 5) {
552         _exception = 1;
553         _exceptionType = "java/lang/IllegalArgumentException";
554         _exceptionMessage = "length - offset < 5 < needed";
555         goto exit;
556     }
557     coords_base = (GLshort *)
558         _env->GetShortArrayElements(coords_ref, (jboolean *)0);
559     coords = coords_base + offset;
560 
561     glDrawTexsvOES(
562         (GLshort *)coords
563     );
564 
565 exit:
566     if (coords_base) {
567         _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base,
568             JNI_ABORT);
569     }
570     if (_exception) {
571         jniThrowException(_env, _exceptionType, _exceptionMessage);
572     }
573 }
574 
575 /* void glDrawTexsvOES ( const GLshort *coords ) */
576 static void
android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)577 android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
578   (JNIEnv *_env, jobject _this, jobject coords_buf) {
579     jint _exception = 0;
580     const char * _exceptionType = NULL;
581     const char * _exceptionMessage = NULL;
582     jshortArray _array = (jshortArray) 0;
583     jint _bufferOffset = (jint) 0;
584     jint _remaining;
585     GLshort *coords = (GLshort *) 0;
586 
587     if (!coords_buf) {
588         _exception = 1;
589         _exceptionType = "java/lang/IllegalArgumentException";
590         _exceptionMessage = "coords == null";
591         goto exit;
592     }
593     coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
594     if (_remaining < 5) {
595         _exception = 1;
596         _exceptionType = "java/lang/IllegalArgumentException";
597         _exceptionMessage = "remaining() < 5 < needed";
598         goto exit;
599     }
600     if (coords == NULL) {
601         char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0);
602         coords = (GLshort *) (_coordsBase + _bufferOffset);
603     }
604     glDrawTexsvOES(
605         (GLshort *)coords
606     );
607 
608 exit:
609     if (_array) {
610         _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT);
611     }
612     if (_exception) {
613         jniThrowException(_env, _exceptionType, _exceptionMessage);
614     }
615 }
616 
617 /* void glDrawTexivOES ( const GLint *coords ) */
618 static void
android_glDrawTexivOES___3II(JNIEnv * _env,jobject _this,jintArray coords_ref,jint offset)619 android_glDrawTexivOES___3II
620   (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
621     jint _exception = 0;
622     const char * _exceptionType = NULL;
623     const char * _exceptionMessage = NULL;
624     GLint *coords_base = (GLint *) 0;
625     jint _remaining;
626     GLint *coords = (GLint *) 0;
627 
628     if (!coords_ref) {
629         _exception = 1;
630         _exceptionType = "java/lang/IllegalArgumentException";
631         _exceptionMessage = "coords == null";
632         goto exit;
633     }
634     if (offset < 0) {
635         _exception = 1;
636         _exceptionType = "java/lang/IllegalArgumentException";
637         _exceptionMessage = "offset < 0";
638         goto exit;
639     }
640     _remaining = _env->GetArrayLength(coords_ref) - offset;
641     if (_remaining < 5) {
642         _exception = 1;
643         _exceptionType = "java/lang/IllegalArgumentException";
644         _exceptionMessage = "length - offset < 5 < needed";
645         goto exit;
646     }
647     coords_base = (GLint *)
648         _env->GetIntArrayElements(coords_ref, (jboolean *)0);
649     coords = coords_base + offset;
650 
651     glDrawTexivOES(
652         (GLint *)coords
653     );
654 
655 exit:
656     if (coords_base) {
657         _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
658             JNI_ABORT);
659     }
660     if (_exception) {
661         jniThrowException(_env, _exceptionType, _exceptionMessage);
662     }
663 }
664 
665 /* void glDrawTexivOES ( const GLint *coords ) */
666 static void
android_glDrawTexivOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)667 android_glDrawTexivOES__Ljava_nio_IntBuffer_2
668   (JNIEnv *_env, jobject _this, jobject coords_buf) {
669     jint _exception = 0;
670     const char * _exceptionType = NULL;
671     const char * _exceptionMessage = NULL;
672     jintArray _array = (jintArray) 0;
673     jint _bufferOffset = (jint) 0;
674     jint _remaining;
675     GLint *coords = (GLint *) 0;
676 
677     if (!coords_buf) {
678         _exception = 1;
679         _exceptionType = "java/lang/IllegalArgumentException";
680         _exceptionMessage = "coords == null";
681         goto exit;
682     }
683     coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
684     if (_remaining < 5) {
685         _exception = 1;
686         _exceptionType = "java/lang/IllegalArgumentException";
687         _exceptionMessage = "remaining() < 5 < needed";
688         goto exit;
689     }
690     if (coords == NULL) {
691         char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
692         coords = (GLint *) (_coordsBase + _bufferOffset);
693     }
694     glDrawTexivOES(
695         (GLint *)coords
696     );
697 
698 exit:
699     if (_array) {
700         _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
701     }
702     if (_exception) {
703         jniThrowException(_env, _exceptionType, _exceptionMessage);
704     }
705 }
706 
707 /* void glDrawTexxvOES ( const GLfixed *coords ) */
708 static void
android_glDrawTexxvOES___3II(JNIEnv * _env,jobject _this,jintArray coords_ref,jint offset)709 android_glDrawTexxvOES___3II
710   (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
711     jint _exception = 0;
712     const char * _exceptionType = NULL;
713     const char * _exceptionMessage = NULL;
714     GLfixed *coords_base = (GLfixed *) 0;
715     jint _remaining;
716     GLfixed *coords = (GLfixed *) 0;
717 
718     if (!coords_ref) {
719         _exception = 1;
720         _exceptionType = "java/lang/IllegalArgumentException";
721         _exceptionMessage = "coords == null";
722         goto exit;
723     }
724     if (offset < 0) {
725         _exception = 1;
726         _exceptionType = "java/lang/IllegalArgumentException";
727         _exceptionMessage = "offset < 0";
728         goto exit;
729     }
730     _remaining = _env->GetArrayLength(coords_ref) - offset;
731     if (_remaining < 5) {
732         _exception = 1;
733         _exceptionType = "java/lang/IllegalArgumentException";
734         _exceptionMessage = "length - offset < 5 < needed";
735         goto exit;
736     }
737     coords_base = (GLfixed *)
738         _env->GetIntArrayElements(coords_ref, (jboolean *)0);
739     coords = coords_base + offset;
740 
741     glDrawTexxvOES(
742         (GLfixed *)coords
743     );
744 
745 exit:
746     if (coords_base) {
747         _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
748             JNI_ABORT);
749     }
750     if (_exception) {
751         jniThrowException(_env, _exceptionType, _exceptionMessage);
752     }
753 }
754 
755 /* void glDrawTexxvOES ( const GLfixed *coords ) */
756 static void
android_glDrawTexxvOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)757 android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
758   (JNIEnv *_env, jobject _this, jobject coords_buf) {
759     jint _exception = 0;
760     const char * _exceptionType = NULL;
761     const char * _exceptionMessage = NULL;
762     jintArray _array = (jintArray) 0;
763     jint _bufferOffset = (jint) 0;
764     jint _remaining;
765     GLfixed *coords = (GLfixed *) 0;
766 
767     if (!coords_buf) {
768         _exception = 1;
769         _exceptionType = "java/lang/IllegalArgumentException";
770         _exceptionMessage = "coords == null";
771         goto exit;
772     }
773     coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
774     if (_remaining < 5) {
775         _exception = 1;
776         _exceptionType = "java/lang/IllegalArgumentException";
777         _exceptionMessage = "remaining() < 5 < needed";
778         goto exit;
779     }
780     if (coords == NULL) {
781         char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
782         coords = (GLfixed *) (_coordsBase + _bufferOffset);
783     }
784     glDrawTexxvOES(
785         (GLfixed *)coords
786     );
787 
788 exit:
789     if (_array) {
790         _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
791     }
792     if (_exception) {
793         jniThrowException(_env, _exceptionType, _exceptionMessage);
794     }
795 }
796 
797 /* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
798 static void
android_glDrawTexfOES__FFFFF(JNIEnv * _env,jobject _this,jfloat x,jfloat y,jfloat z,jfloat width,jfloat height)799 android_glDrawTexfOES__FFFFF
800   (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
801     glDrawTexfOES(
802         (GLfloat)x,
803         (GLfloat)y,
804         (GLfloat)z,
805         (GLfloat)width,
806         (GLfloat)height
807     );
808 }
809 
810 /* void glDrawTexfvOES ( const GLfloat *coords ) */
811 static void
android_glDrawTexfvOES___3FI(JNIEnv * _env,jobject _this,jfloatArray coords_ref,jint offset)812 android_glDrawTexfvOES___3FI
813   (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
814     jint _exception = 0;
815     const char * _exceptionType = NULL;
816     const char * _exceptionMessage = NULL;
817     GLfloat *coords_base = (GLfloat *) 0;
818     jint _remaining;
819     GLfloat *coords = (GLfloat *) 0;
820 
821     if (!coords_ref) {
822         _exception = 1;
823         _exceptionType = "java/lang/IllegalArgumentException";
824         _exceptionMessage = "coords == null";
825         goto exit;
826     }
827     if (offset < 0) {
828         _exception = 1;
829         _exceptionType = "java/lang/IllegalArgumentException";
830         _exceptionMessage = "offset < 0";
831         goto exit;
832     }
833     _remaining = _env->GetArrayLength(coords_ref) - offset;
834     if (_remaining < 5) {
835         _exception = 1;
836         _exceptionType = "java/lang/IllegalArgumentException";
837         _exceptionMessage = "length - offset < 5 < needed";
838         goto exit;
839     }
840     coords_base = (GLfloat *)
841         _env->GetFloatArrayElements(coords_ref, (jboolean *)0);
842     coords = coords_base + offset;
843 
844     glDrawTexfvOES(
845         (GLfloat *)coords
846     );
847 
848 exit:
849     if (coords_base) {
850         _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base,
851             JNI_ABORT);
852     }
853     if (_exception) {
854         jniThrowException(_env, _exceptionType, _exceptionMessage);
855     }
856 }
857 
858 /* void glDrawTexfvOES ( const GLfloat *coords ) */
859 static void
android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)860 android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
861   (JNIEnv *_env, jobject _this, jobject coords_buf) {
862     jint _exception = 0;
863     const char * _exceptionType = NULL;
864     const char * _exceptionMessage = NULL;
865     jfloatArray _array = (jfloatArray) 0;
866     jint _bufferOffset = (jint) 0;
867     jint _remaining;
868     GLfloat *coords = (GLfloat *) 0;
869 
870     if (!coords_buf) {
871         _exception = 1;
872         _exceptionType = "java/lang/IllegalArgumentException";
873         _exceptionMessage = "coords == null";
874         goto exit;
875     }
876     coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
877     if (_remaining < 5) {
878         _exception = 1;
879         _exceptionType = "java/lang/IllegalArgumentException";
880         _exceptionMessage = "remaining() < 5 < needed";
881         goto exit;
882     }
883     if (coords == NULL) {
884         char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
885         coords = (GLfloat *) (_coordsBase + _bufferOffset);
886     }
887     glDrawTexfvOES(
888         (GLfloat *)coords
889     );
890 
891 exit:
892     if (_array) {
893         _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT);
894     }
895     if (_exception) {
896         jniThrowException(_env, _exceptionType, _exceptionMessage);
897     }
898 }
899 
900 /* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
901 static void
android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jobject image_buf)902 android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
903   (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
904     jint _exception = 0;
905     const char * _exceptionType = NULL;
906     const char * _exceptionMessage = NULL;
907     jarray _array = (jarray) 0;
908     jint _bufferOffset = (jint) 0;
909     jint _remaining;
910     GLeglImageOES image = (GLeglImageOES) 0;
911 
912     if (!image_buf) {
913         _exception = 1;
914         _exceptionType = "java/lang/IllegalArgumentException";
915         _exceptionMessage = "image == null";
916         goto exit;
917     }
918     image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
919     if (image == NULL) {
920         char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
921         image = (GLeglImageOES) (_imageBase + _bufferOffset);
922     }
923     glEGLImageTargetTexture2DOES(
924         (GLenum)target,
925         (GLeglImageOES)image
926     );
927 
928 exit:
929     if (_array) {
930         releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
931     }
932     if (_exception) {
933         jniThrowException(_env, _exceptionType, _exceptionMessage);
934     }
935 }
936 
937 /* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
938 static void
android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jobject image_buf)939 android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
940   (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
941     jint _exception = 0;
942     const char * _exceptionType = NULL;
943     const char * _exceptionMessage = NULL;
944     jarray _array = (jarray) 0;
945     jint _bufferOffset = (jint) 0;
946     jint _remaining;
947     GLeglImageOES image = (GLeglImageOES) 0;
948 
949     if (!image_buf) {
950         _exception = 1;
951         _exceptionType = "java/lang/IllegalArgumentException";
952         _exceptionMessage = "image == null";
953         goto exit;
954     }
955     image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
956     if (image == NULL) {
957         char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
958         image = (GLeglImageOES) (_imageBase + _bufferOffset);
959     }
960     glEGLImageTargetRenderbufferStorageOES(
961         (GLenum)target,
962         (GLeglImageOES)image
963     );
964 
965 exit:
966     if (_array) {
967         releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
968     }
969     if (_exception) {
970         jniThrowException(_env, _exceptionType, _exceptionMessage);
971     }
972 }
973 
974 /* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
975 static void
android_glAlphaFuncxOES__II(JNIEnv * _env,jobject _this,jint func,jint ref)976 android_glAlphaFuncxOES__II
977   (JNIEnv *_env, jobject _this, jint func, jint ref) {
978     glAlphaFuncxOES(
979         (GLenum)func,
980         (GLclampx)ref
981     );
982 }
983 
984 /* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
985 static void
android_glClearColorxOES__IIII(JNIEnv * _env,jobject _this,jint red,jint green,jint blue,jint alpha)986 android_glClearColorxOES__IIII
987   (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
988     glClearColorxOES(
989         (GLclampx)red,
990         (GLclampx)green,
991         (GLclampx)blue,
992         (GLclampx)alpha
993     );
994 }
995 
996 /* void glClearDepthxOES ( GLclampx depth ) */
997 static void
android_glClearDepthxOES__I(JNIEnv * _env,jobject _this,jint depth)998 android_glClearDepthxOES__I
999   (JNIEnv *_env, jobject _this, jint depth) {
1000     glClearDepthxOES(
1001         (GLclampx)depth
1002     );
1003 }
1004 
1005 /* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
1006 static void
android_glClipPlanexOES__I_3II(JNIEnv * _env,jobject _this,jint plane,jintArray equation_ref,jint offset)1007 android_glClipPlanexOES__I_3II
1008   (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
1009     jint _exception = 0;
1010     const char * _exceptionType = NULL;
1011     const char * _exceptionMessage = NULL;
1012     GLfixed *equation_base = (GLfixed *) 0;
1013     jint _remaining;
1014     GLfixed *equation = (GLfixed *) 0;
1015 
1016     if (!equation_ref) {
1017         _exception = 1;
1018         _exceptionType = "java/lang/IllegalArgumentException";
1019         _exceptionMessage = "equation == null";
1020         goto exit;
1021     }
1022     if (offset < 0) {
1023         _exception = 1;
1024         _exceptionType = "java/lang/IllegalArgumentException";
1025         _exceptionMessage = "offset < 0";
1026         goto exit;
1027     }
1028     _remaining = _env->GetArrayLength(equation_ref) - offset;
1029     equation_base = (GLfixed *)
1030         _env->GetIntArrayElements(equation_ref, (jboolean *)0);
1031     equation = equation_base + offset;
1032 
1033     glClipPlanexOES(
1034         (GLenum)plane,
1035         (GLfixed *)equation
1036     );
1037 
1038 exit:
1039     if (equation_base) {
1040         _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base,
1041             JNI_ABORT);
1042     }
1043     if (_exception) {
1044         jniThrowException(_env, _exceptionType, _exceptionMessage);
1045     }
1046 }
1047 
1048 /* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
1049 static void
android_glClipPlanexOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint plane,jobject equation_buf)1050 android_glClipPlanexOES__ILjava_nio_IntBuffer_2
1051   (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
1052     jint _exception = 0;
1053     const char * _exceptionType = NULL;
1054     const char * _exceptionMessage = NULL;
1055     jintArray _array = (jintArray) 0;
1056     jint _bufferOffset = (jint) 0;
1057     jint _remaining;
1058     GLfixed *equation = (GLfixed *) 0;
1059 
1060     if (!equation_buf) {
1061         _exception = 1;
1062         _exceptionType = "java/lang/IllegalArgumentException";
1063         _exceptionMessage = "equation == null";
1064         goto exit;
1065     }
1066     equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1067     if (equation == NULL) {
1068         char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1069         equation = (GLfixed *) (_equationBase + _bufferOffset);
1070     }
1071     glClipPlanexOES(
1072         (GLenum)plane,
1073         (GLfixed *)equation
1074     );
1075 
1076 exit:
1077     if (_array) {
1078         _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
1079     }
1080     if (_exception) {
1081         jniThrowException(_env, _exceptionType, _exceptionMessage);
1082     }
1083 }
1084 
1085 /* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
1086 static void
android_glColor4xOES__IIII(JNIEnv * _env,jobject _this,jint red,jint green,jint blue,jint alpha)1087 android_glColor4xOES__IIII
1088   (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
1089     glColor4xOES(
1090         (GLfixed)red,
1091         (GLfixed)green,
1092         (GLfixed)blue,
1093         (GLfixed)alpha
1094     );
1095 }
1096 
1097 /* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
1098 static void
android_glDepthRangexOES__II(JNIEnv * _env,jobject _this,jint zNear,jint zFar)1099 android_glDepthRangexOES__II
1100   (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
1101     glDepthRangexOES(
1102         (GLclampx)zNear,
1103         (GLclampx)zFar
1104     );
1105 }
1106 
1107 /* void glFogxOES ( GLenum pname, GLfixed param ) */
1108 static void
android_glFogxOES__II(JNIEnv * _env,jobject _this,jint pname,jint param)1109 android_glFogxOES__II
1110   (JNIEnv *_env, jobject _this, jint pname, jint param) {
1111     glFogxOES(
1112         (GLenum)pname,
1113         (GLfixed)param
1114     );
1115 }
1116 
1117 /* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1118 static void
android_glFogxvOES__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)1119 android_glFogxvOES__I_3II
1120   (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
1121     jint _exception = 0;
1122     const char * _exceptionType = NULL;
1123     const char * _exceptionMessage = NULL;
1124     GLfixed *params_base = (GLfixed *) 0;
1125     jint _remaining;
1126     GLfixed *params = (GLfixed *) 0;
1127 
1128     if (!params_ref) {
1129         _exception = 1;
1130         _exceptionType = "java/lang/IllegalArgumentException";
1131         _exceptionMessage = "params == null";
1132         goto exit;
1133     }
1134     if (offset < 0) {
1135         _exception = 1;
1136         _exceptionType = "java/lang/IllegalArgumentException";
1137         _exceptionMessage = "offset < 0";
1138         goto exit;
1139     }
1140     _remaining = _env->GetArrayLength(params_ref) - offset;
1141     params_base = (GLfixed *)
1142         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1143     params = params_base + offset;
1144 
1145     glFogxvOES(
1146         (GLenum)pname,
1147         (GLfixed *)params
1148     );
1149 
1150 exit:
1151     if (params_base) {
1152         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1153             JNI_ABORT);
1154     }
1155     if (_exception) {
1156         jniThrowException(_env, _exceptionType, _exceptionMessage);
1157     }
1158 }
1159 
1160 /* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1161 static void
android_glFogxvOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)1162 android_glFogxvOES__ILjava_nio_IntBuffer_2
1163   (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1164     jint _exception = 0;
1165     const char * _exceptionType = NULL;
1166     const char * _exceptionMessage = NULL;
1167     jintArray _array = (jintArray) 0;
1168     jint _bufferOffset = (jint) 0;
1169     jint _remaining;
1170     GLfixed *params = (GLfixed *) 0;
1171 
1172     if (!params_buf) {
1173         _exception = 1;
1174         _exceptionType = "java/lang/IllegalArgumentException";
1175         _exceptionMessage = "params == null";
1176         goto exit;
1177     }
1178     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1179     if (params == NULL) {
1180         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1181         params = (GLfixed *) (_paramsBase + _bufferOffset);
1182     }
1183     glFogxvOES(
1184         (GLenum)pname,
1185         (GLfixed *)params
1186     );
1187 
1188 exit:
1189     if (_array) {
1190         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1191     }
1192     if (_exception) {
1193         jniThrowException(_env, _exceptionType, _exceptionMessage);
1194     }
1195 }
1196 
1197 /* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1198 static void
android_glFrustumxOES__IIIIII(JNIEnv * _env,jobject _this,jint left,jint right,jint bottom,jint top,jint zNear,jint zFar)1199 android_glFrustumxOES__IIIIII
1200   (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
1201     glFrustumxOES(
1202         (GLfixed)left,
1203         (GLfixed)right,
1204         (GLfixed)bottom,
1205         (GLfixed)top,
1206         (GLfixed)zNear,
1207         (GLfixed)zFar
1208     );
1209 }
1210 
1211 /* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1212 static void
android_glGetClipPlanexOES__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray eqn_ref,jint offset)1213 android_glGetClipPlanexOES__I_3II
1214   (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
1215     jint _exception = 0;
1216     const char * _exceptionType = NULL;
1217     const char * _exceptionMessage = NULL;
1218     GLfixed *eqn_base = (GLfixed *) 0;
1219     jint _remaining;
1220     GLfixed *eqn = (GLfixed *) 0;
1221 
1222     if (!eqn_ref) {
1223         _exception = 1;
1224         _exceptionType = "java/lang/IllegalArgumentException";
1225         _exceptionMessage = "eqn == null";
1226         goto exit;
1227     }
1228     if (offset < 0) {
1229         _exception = 1;
1230         _exceptionType = "java/lang/IllegalArgumentException";
1231         _exceptionMessage = "offset < 0";
1232         goto exit;
1233     }
1234     _remaining = _env->GetArrayLength(eqn_ref) - offset;
1235     if (_remaining < 4) {
1236         _exception = 1;
1237         _exceptionType = "java/lang/IllegalArgumentException";
1238         _exceptionMessage = "length - offset < 4 < needed";
1239         goto exit;
1240     }
1241     eqn_base = (GLfixed *)
1242         _env->GetIntArrayElements(eqn_ref, (jboolean *)0);
1243     eqn = eqn_base + offset;
1244 
1245     glGetClipPlanexOES(
1246         (GLenum)pname,
1247         (GLfixed *)eqn
1248     );
1249 
1250 exit:
1251     if (eqn_base) {
1252         _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base,
1253             _exception ? JNI_ABORT: 0);
1254     }
1255     if (_exception) {
1256         jniThrowException(_env, _exceptionType, _exceptionMessage);
1257     }
1258 }
1259 
1260 /* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1261 static void
android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject eqn_buf)1262 android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1263   (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
1264     jint _exception = 0;
1265     const char * _exceptionType = NULL;
1266     const char * _exceptionMessage = NULL;
1267     jintArray _array = (jintArray) 0;
1268     jint _bufferOffset = (jint) 0;
1269     jint _remaining;
1270     GLfixed *eqn = (GLfixed *) 0;
1271 
1272     if (!eqn_buf) {
1273         _exception = 1;
1274         _exceptionType = "java/lang/IllegalArgumentException";
1275         _exceptionMessage = "eqn == null";
1276         goto exit;
1277     }
1278     eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1279     if (_remaining < 4) {
1280         _exception = 1;
1281         _exceptionType = "java/lang/IllegalArgumentException";
1282         _exceptionMessage = "remaining() < 4 < needed";
1283         goto exit;
1284     }
1285     if (eqn == NULL) {
1286         char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1287         eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1288     }
1289     glGetClipPlanexOES(
1290         (GLenum)pname,
1291         (GLfixed *)eqn
1292     );
1293 
1294 exit:
1295     if (_array) {
1296         _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0);
1297     }
1298     if (_exception) {
1299         jniThrowException(_env, _exceptionType, _exceptionMessage);
1300     }
1301 }
1302 
1303 /* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1304 static void
android_glGetFixedvOES__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)1305 android_glGetFixedvOES__I_3II
1306   (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
1307     jint _exception = 0;
1308     const char * _exceptionType = NULL;
1309     const char * _exceptionMessage = NULL;
1310     GLfixed *params_base = (GLfixed *) 0;
1311     jint _remaining;
1312     GLfixed *params = (GLfixed *) 0;
1313 
1314     if (!params_ref) {
1315         _exception = 1;
1316         _exceptionType = "java/lang/IllegalArgumentException";
1317         _exceptionMessage = "params == null";
1318         goto exit;
1319     }
1320     if (offset < 0) {
1321         _exception = 1;
1322         _exceptionType = "java/lang/IllegalArgumentException";
1323         _exceptionMessage = "offset < 0";
1324         goto exit;
1325     }
1326     _remaining = _env->GetArrayLength(params_ref) - offset;
1327     params_base = (GLfixed *)
1328         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1329     params = params_base + offset;
1330 
1331     glGetFixedvOES(
1332         (GLenum)pname,
1333         (GLfixed *)params
1334     );
1335 
1336 exit:
1337     if (params_base) {
1338         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1339             _exception ? JNI_ABORT: 0);
1340     }
1341     if (_exception) {
1342         jniThrowException(_env, _exceptionType, _exceptionMessage);
1343     }
1344 }
1345 
1346 /* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1347 static void
android_glGetFixedvOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)1348 android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1349   (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1350     jint _exception = 0;
1351     const char * _exceptionType = NULL;
1352     const char * _exceptionMessage = NULL;
1353     jintArray _array = (jintArray) 0;
1354     jint _bufferOffset = (jint) 0;
1355     jint _remaining;
1356     GLfixed *params = (GLfixed *) 0;
1357 
1358     if (!params_buf) {
1359         _exception = 1;
1360         _exceptionType = "java/lang/IllegalArgumentException";
1361         _exceptionMessage = "params == null";
1362         goto exit;
1363     }
1364     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1365     if (params == NULL) {
1366         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1367         params = (GLfixed *) (_paramsBase + _bufferOffset);
1368     }
1369     glGetFixedvOES(
1370         (GLenum)pname,
1371         (GLfixed *)params
1372     );
1373 
1374 exit:
1375     if (_array) {
1376         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1377     }
1378     if (_exception) {
1379         jniThrowException(_env, _exceptionType, _exceptionMessage);
1380     }
1381 }
1382 
1383 /* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1384 static void
android_glGetLightxvOES__II_3II(JNIEnv * _env,jobject _this,jint light,jint pname,jintArray params_ref,jint offset)1385 android_glGetLightxvOES__II_3II
1386   (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
1387     jint _exception = 0;
1388     const char * _exceptionType = NULL;
1389     const char * _exceptionMessage = NULL;
1390     GLfixed *params_base = (GLfixed *) 0;
1391     jint _remaining;
1392     GLfixed *params = (GLfixed *) 0;
1393 
1394     if (!params_ref) {
1395         _exception = 1;
1396         _exceptionType = "java/lang/IllegalArgumentException";
1397         _exceptionMessage = "params == null";
1398         goto exit;
1399     }
1400     if (offset < 0) {
1401         _exception = 1;
1402         _exceptionType = "java/lang/IllegalArgumentException";
1403         _exceptionMessage = "offset < 0";
1404         goto exit;
1405     }
1406     _remaining = _env->GetArrayLength(params_ref) - offset;
1407     params_base = (GLfixed *)
1408         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1409     params = params_base + offset;
1410 
1411     glGetLightxvOES(
1412         (GLenum)light,
1413         (GLenum)pname,
1414         (GLfixed *)params
1415     );
1416 
1417 exit:
1418     if (params_base) {
1419         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1420             _exception ? JNI_ABORT: 0);
1421     }
1422     if (_exception) {
1423         jniThrowException(_env, _exceptionType, _exceptionMessage);
1424     }
1425 }
1426 
1427 /* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1428 static void
android_glGetLightxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)1429 android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1430   (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
1431     jint _exception = 0;
1432     const char * _exceptionType = NULL;
1433     const char * _exceptionMessage = NULL;
1434     jintArray _array = (jintArray) 0;
1435     jint _bufferOffset = (jint) 0;
1436     jint _remaining;
1437     GLfixed *params = (GLfixed *) 0;
1438 
1439     if (!params_buf) {
1440         _exception = 1;
1441         _exceptionType = "java/lang/IllegalArgumentException";
1442         _exceptionMessage = "params == null";
1443         goto exit;
1444     }
1445     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1446     if (params == NULL) {
1447         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1448         params = (GLfixed *) (_paramsBase + _bufferOffset);
1449     }
1450     glGetLightxvOES(
1451         (GLenum)light,
1452         (GLenum)pname,
1453         (GLfixed *)params
1454     );
1455 
1456 exit:
1457     if (_array) {
1458         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1459     }
1460     if (_exception) {
1461         jniThrowException(_env, _exceptionType, _exceptionMessage);
1462     }
1463 }
1464 
1465 /* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1466 static void
android_glGetMaterialxvOES__II_3II(JNIEnv * _env,jobject _this,jint face,jint pname,jintArray params_ref,jint offset)1467 android_glGetMaterialxvOES__II_3II
1468   (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
1469     jint _exception = 0;
1470     const char * _exceptionType = NULL;
1471     const char * _exceptionMessage = NULL;
1472     GLfixed *params_base = (GLfixed *) 0;
1473     jint _remaining;
1474     GLfixed *params = (GLfixed *) 0;
1475 
1476     if (!params_ref) {
1477         _exception = 1;
1478         _exceptionType = "java/lang/IllegalArgumentException";
1479         _exceptionMessage = "params == null";
1480         goto exit;
1481     }
1482     if (offset < 0) {
1483         _exception = 1;
1484         _exceptionType = "java/lang/IllegalArgumentException";
1485         _exceptionMessage = "offset < 0";
1486         goto exit;
1487     }
1488     _remaining = _env->GetArrayLength(params_ref) - offset;
1489     params_base = (GLfixed *)
1490         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1491     params = params_base + offset;
1492 
1493     glGetMaterialxvOES(
1494         (GLenum)face,
1495         (GLenum)pname,
1496         (GLfixed *)params
1497     );
1498 
1499 exit:
1500     if (params_base) {
1501         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1502             _exception ? JNI_ABORT: 0);
1503     }
1504     if (_exception) {
1505         jniThrowException(_env, _exceptionType, _exceptionMessage);
1506     }
1507 }
1508 
1509 /* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1510 static void
android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)1511 android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1512   (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
1513     jint _exception = 0;
1514     const char * _exceptionType = NULL;
1515     const char * _exceptionMessage = NULL;
1516     jintArray _array = (jintArray) 0;
1517     jint _bufferOffset = (jint) 0;
1518     jint _remaining;
1519     GLfixed *params = (GLfixed *) 0;
1520 
1521     if (!params_buf) {
1522         _exception = 1;
1523         _exceptionType = "java/lang/IllegalArgumentException";
1524         _exceptionMessage = "params == null";
1525         goto exit;
1526     }
1527     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1528     if (params == NULL) {
1529         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1530         params = (GLfixed *) (_paramsBase + _bufferOffset);
1531     }
1532     glGetMaterialxvOES(
1533         (GLenum)face,
1534         (GLenum)pname,
1535         (GLfixed *)params
1536     );
1537 
1538 exit:
1539     if (_array) {
1540         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1541     }
1542     if (_exception) {
1543         jniThrowException(_env, _exceptionType, _exceptionMessage);
1544     }
1545 }
1546 
1547 /* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1548 static void
android_glGetTexEnvxvOES__II_3II(JNIEnv * _env,jobject _this,jint env,jint pname,jintArray params_ref,jint offset)1549 android_glGetTexEnvxvOES__II_3II
1550   (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
1551     jint _exception = 0;
1552     const char * _exceptionType = NULL;
1553     const char * _exceptionMessage = NULL;
1554     GLfixed *params_base = (GLfixed *) 0;
1555     jint _remaining;
1556     GLfixed *params = (GLfixed *) 0;
1557 
1558     if (!params_ref) {
1559         _exception = 1;
1560         _exceptionType = "java/lang/IllegalArgumentException";
1561         _exceptionMessage = "params == null";
1562         goto exit;
1563     }
1564     if (offset < 0) {
1565         _exception = 1;
1566         _exceptionType = "java/lang/IllegalArgumentException";
1567         _exceptionMessage = "offset < 0";
1568         goto exit;
1569     }
1570     _remaining = _env->GetArrayLength(params_ref) - offset;
1571     params_base = (GLfixed *)
1572         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1573     params = params_base + offset;
1574 
1575     glGetTexEnvxvOES(
1576         (GLenum)env,
1577         (GLenum)pname,
1578         (GLfixed *)params
1579     );
1580 
1581 exit:
1582     if (params_base) {
1583         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1584             _exception ? JNI_ABORT: 0);
1585     }
1586     if (_exception) {
1587         jniThrowException(_env, _exceptionType, _exceptionMessage);
1588     }
1589 }
1590 
1591 /* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1592 static void
android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint env,jint pname,jobject params_buf)1593 android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1594   (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
1595     jint _exception = 0;
1596     const char * _exceptionType = NULL;
1597     const char * _exceptionMessage = NULL;
1598     jintArray _array = (jintArray) 0;
1599     jint _bufferOffset = (jint) 0;
1600     jint _remaining;
1601     GLfixed *params = (GLfixed *) 0;
1602 
1603     if (!params_buf) {
1604         _exception = 1;
1605         _exceptionType = "java/lang/IllegalArgumentException";
1606         _exceptionMessage = "params == null";
1607         goto exit;
1608     }
1609     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1610     if (params == NULL) {
1611         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1612         params = (GLfixed *) (_paramsBase + _bufferOffset);
1613     }
1614     glGetTexEnvxvOES(
1615         (GLenum)env,
1616         (GLenum)pname,
1617         (GLfixed *)params
1618     );
1619 
1620 exit:
1621     if (_array) {
1622         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1623     }
1624     if (_exception) {
1625         jniThrowException(_env, _exceptionType, _exceptionMessage);
1626     }
1627 }
1628 
1629 /* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1630 static void
android_glGetTexParameterxvOES__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)1631 android_glGetTexParameterxvOES__II_3II
1632   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1633     jint _exception = 0;
1634     const char * _exceptionType = NULL;
1635     const char * _exceptionMessage = NULL;
1636     GLfixed *params_base = (GLfixed *) 0;
1637     jint _remaining;
1638     GLfixed *params = (GLfixed *) 0;
1639 
1640     if (!params_ref) {
1641         _exception = 1;
1642         _exceptionType = "java/lang/IllegalArgumentException";
1643         _exceptionMessage = "params == null";
1644         goto exit;
1645     }
1646     if (offset < 0) {
1647         _exception = 1;
1648         _exceptionType = "java/lang/IllegalArgumentException";
1649         _exceptionMessage = "offset < 0";
1650         goto exit;
1651     }
1652     _remaining = _env->GetArrayLength(params_ref) - offset;
1653     params_base = (GLfixed *)
1654         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1655     params = params_base + offset;
1656 
1657     glGetTexParameterxvOES(
1658         (GLenum)target,
1659         (GLenum)pname,
1660         (GLfixed *)params
1661     );
1662 
1663 exit:
1664     if (params_base) {
1665         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1666             _exception ? JNI_ABORT: 0);
1667     }
1668     if (_exception) {
1669         jniThrowException(_env, _exceptionType, _exceptionMessage);
1670     }
1671 }
1672 
1673 /* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1674 static void
android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)1675 android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1676   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1677     jint _exception = 0;
1678     const char * _exceptionType = NULL;
1679     const char * _exceptionMessage = NULL;
1680     jintArray _array = (jintArray) 0;
1681     jint _bufferOffset = (jint) 0;
1682     jint _remaining;
1683     GLfixed *params = (GLfixed *) 0;
1684 
1685     if (!params_buf) {
1686         _exception = 1;
1687         _exceptionType = "java/lang/IllegalArgumentException";
1688         _exceptionMessage = "params == null";
1689         goto exit;
1690     }
1691     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1692     if (params == NULL) {
1693         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1694         params = (GLfixed *) (_paramsBase + _bufferOffset);
1695     }
1696     glGetTexParameterxvOES(
1697         (GLenum)target,
1698         (GLenum)pname,
1699         (GLfixed *)params
1700     );
1701 
1702 exit:
1703     if (_array) {
1704         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1705     }
1706     if (_exception) {
1707         jniThrowException(_env, _exceptionType, _exceptionMessage);
1708     }
1709 }
1710 
1711 /* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1712 static void
android_glLightModelxOES__II(JNIEnv * _env,jobject _this,jint pname,jint param)1713 android_glLightModelxOES__II
1714   (JNIEnv *_env, jobject _this, jint pname, jint param) {
1715     glLightModelxOES(
1716         (GLenum)pname,
1717         (GLfixed)param
1718     );
1719 }
1720 
1721 /* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1722 static void
android_glLightModelxvOES__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)1723 android_glLightModelxvOES__I_3II
1724   (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
1725     jint _exception = 0;
1726     const char * _exceptionType = NULL;
1727     const char * _exceptionMessage = NULL;
1728     GLfixed *params_base = (GLfixed *) 0;
1729     jint _remaining;
1730     GLfixed *params = (GLfixed *) 0;
1731 
1732     if (!params_ref) {
1733         _exception = 1;
1734         _exceptionType = "java/lang/IllegalArgumentException";
1735         _exceptionMessage = "params == null";
1736         goto exit;
1737     }
1738     if (offset < 0) {
1739         _exception = 1;
1740         _exceptionType = "java/lang/IllegalArgumentException";
1741         _exceptionMessage = "offset < 0";
1742         goto exit;
1743     }
1744     _remaining = _env->GetArrayLength(params_ref) - offset;
1745     params_base = (GLfixed *)
1746         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1747     params = params_base + offset;
1748 
1749     glLightModelxvOES(
1750         (GLenum)pname,
1751         (GLfixed *)params
1752     );
1753 
1754 exit:
1755     if (params_base) {
1756         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1757             JNI_ABORT);
1758     }
1759     if (_exception) {
1760         jniThrowException(_env, _exceptionType, _exceptionMessage);
1761     }
1762 }
1763 
1764 /* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1765 static void
android_glLightModelxvOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)1766 android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1767   (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1768     jint _exception = 0;
1769     const char * _exceptionType = NULL;
1770     const char * _exceptionMessage = NULL;
1771     jintArray _array = (jintArray) 0;
1772     jint _bufferOffset = (jint) 0;
1773     jint _remaining;
1774     GLfixed *params = (GLfixed *) 0;
1775 
1776     if (!params_buf) {
1777         _exception = 1;
1778         _exceptionType = "java/lang/IllegalArgumentException";
1779         _exceptionMessage = "params == null";
1780         goto exit;
1781     }
1782     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1783     if (params == NULL) {
1784         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1785         params = (GLfixed *) (_paramsBase + _bufferOffset);
1786     }
1787     glLightModelxvOES(
1788         (GLenum)pname,
1789         (GLfixed *)params
1790     );
1791 
1792 exit:
1793     if (_array) {
1794         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1795     }
1796     if (_exception) {
1797         jniThrowException(_env, _exceptionType, _exceptionMessage);
1798     }
1799 }
1800 
1801 /* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1802 static void
android_glLightxOES__III(JNIEnv * _env,jobject _this,jint light,jint pname,jint param)1803 android_glLightxOES__III
1804   (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
1805     glLightxOES(
1806         (GLenum)light,
1807         (GLenum)pname,
1808         (GLfixed)param
1809     );
1810 }
1811 
1812 /* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1813 static void
android_glLightxvOES__II_3II(JNIEnv * _env,jobject _this,jint light,jint pname,jintArray params_ref,jint offset)1814 android_glLightxvOES__II_3II
1815   (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
1816     jint _exception = 0;
1817     const char * _exceptionType = NULL;
1818     const char * _exceptionMessage = NULL;
1819     GLfixed *params_base = (GLfixed *) 0;
1820     jint _remaining;
1821     GLfixed *params = (GLfixed *) 0;
1822 
1823     if (!params_ref) {
1824         _exception = 1;
1825         _exceptionType = "java/lang/IllegalArgumentException";
1826         _exceptionMessage = "params == null";
1827         goto exit;
1828     }
1829     if (offset < 0) {
1830         _exception = 1;
1831         _exceptionType = "java/lang/IllegalArgumentException";
1832         _exceptionMessage = "offset < 0";
1833         goto exit;
1834     }
1835     _remaining = _env->GetArrayLength(params_ref) - offset;
1836     params_base = (GLfixed *)
1837         _env->GetIntArrayElements(params_ref, (jboolean *)0);
1838     params = params_base + offset;
1839 
1840     glLightxvOES(
1841         (GLenum)light,
1842         (GLenum)pname,
1843         (GLfixed *)params
1844     );
1845 
1846 exit:
1847     if (params_base) {
1848         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1849             JNI_ABORT);
1850     }
1851     if (_exception) {
1852         jniThrowException(_env, _exceptionType, _exceptionMessage);
1853     }
1854 }
1855 
1856 /* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1857 static void
android_glLightxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)1858 android_glLightxvOES__IILjava_nio_IntBuffer_2
1859   (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
1860     jint _exception = 0;
1861     const char * _exceptionType = NULL;
1862     const char * _exceptionMessage = NULL;
1863     jintArray _array = (jintArray) 0;
1864     jint _bufferOffset = (jint) 0;
1865     jint _remaining;
1866     GLfixed *params = (GLfixed *) 0;
1867 
1868     if (!params_buf) {
1869         _exception = 1;
1870         _exceptionType = "java/lang/IllegalArgumentException";
1871         _exceptionMessage = "params == null";
1872         goto exit;
1873     }
1874     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1875     if (params == NULL) {
1876         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1877         params = (GLfixed *) (_paramsBase + _bufferOffset);
1878     }
1879     glLightxvOES(
1880         (GLenum)light,
1881         (GLenum)pname,
1882         (GLfixed *)params
1883     );
1884 
1885 exit:
1886     if (_array) {
1887         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1888     }
1889     if (_exception) {
1890         jniThrowException(_env, _exceptionType, _exceptionMessage);
1891     }
1892 }
1893 
1894 /* void glLineWidthxOES ( GLfixed width ) */
1895 static void
android_glLineWidthxOES__I(JNIEnv * _env,jobject _this,jint width)1896 android_glLineWidthxOES__I
1897   (JNIEnv *_env, jobject _this, jint width) {
1898     glLineWidthxOES(
1899         (GLfixed)width
1900     );
1901 }
1902 
1903 /* void glLoadMatrixxOES ( const GLfixed *m ) */
1904 static void
android_glLoadMatrixxOES___3II(JNIEnv * _env,jobject _this,jintArray m_ref,jint offset)1905 android_glLoadMatrixxOES___3II
1906   (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
1907     jint _exception = 0;
1908     const char * _exceptionType = NULL;
1909     const char * _exceptionMessage = NULL;
1910     GLfixed *m_base = (GLfixed *) 0;
1911     jint _remaining;
1912     GLfixed *m = (GLfixed *) 0;
1913 
1914     if (!m_ref) {
1915         _exception = 1;
1916         _exceptionType = "java/lang/IllegalArgumentException";
1917         _exceptionMessage = "m == null";
1918         goto exit;
1919     }
1920     if (offset < 0) {
1921         _exception = 1;
1922         _exceptionType = "java/lang/IllegalArgumentException";
1923         _exceptionMessage = "offset < 0";
1924         goto exit;
1925     }
1926     _remaining = _env->GetArrayLength(m_ref) - offset;
1927     m_base = (GLfixed *)
1928         _env->GetIntArrayElements(m_ref, (jboolean *)0);
1929     m = m_base + offset;
1930 
1931     glLoadMatrixxOES(
1932         (GLfixed *)m
1933     );
1934 
1935 exit:
1936     if (m_base) {
1937         _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
1938             JNI_ABORT);
1939     }
1940     if (_exception) {
1941         jniThrowException(_env, _exceptionType, _exceptionMessage);
1942     }
1943 }
1944 
1945 /* void glLoadMatrixxOES ( const GLfixed *m ) */
1946 static void
android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject m_buf)1947 android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1948   (JNIEnv *_env, jobject _this, jobject m_buf) {
1949     jint _exception = 0;
1950     const char * _exceptionType = NULL;
1951     const char * _exceptionMessage = NULL;
1952     jintArray _array = (jintArray) 0;
1953     jint _bufferOffset = (jint) 0;
1954     jint _remaining;
1955     GLfixed *m = (GLfixed *) 0;
1956 
1957     if (!m_buf) {
1958         _exception = 1;
1959         _exceptionType = "java/lang/IllegalArgumentException";
1960         _exceptionMessage = "m == null";
1961         goto exit;
1962     }
1963     m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1964     if (m == NULL) {
1965         char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1966         m = (GLfixed *) (_mBase + _bufferOffset);
1967     }
1968     glLoadMatrixxOES(
1969         (GLfixed *)m
1970     );
1971 
1972 exit:
1973     if (_array) {
1974         _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
1975     }
1976     if (_exception) {
1977         jniThrowException(_env, _exceptionType, _exceptionMessage);
1978     }
1979 }
1980 
1981 /* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1982 static void
android_glMaterialxOES__III(JNIEnv * _env,jobject _this,jint face,jint pname,jint param)1983 android_glMaterialxOES__III
1984   (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
1985     glMaterialxOES(
1986         (GLenum)face,
1987         (GLenum)pname,
1988         (GLfixed)param
1989     );
1990 }
1991 
1992 /* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1993 static void
android_glMaterialxvOES__II_3II(JNIEnv * _env,jobject _this,jint face,jint pname,jintArray params_ref,jint offset)1994 android_glMaterialxvOES__II_3II
1995   (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
1996     jint _exception = 0;
1997     const char * _exceptionType = NULL;
1998     const char * _exceptionMessage = NULL;
1999     GLfixed *params_base = (GLfixed *) 0;
2000     jint _remaining;
2001     GLfixed *params = (GLfixed *) 0;
2002 
2003     if (!params_ref) {
2004         _exception = 1;
2005         _exceptionType = "java/lang/IllegalArgumentException";
2006         _exceptionMessage = "params == null";
2007         goto exit;
2008     }
2009     if (offset < 0) {
2010         _exception = 1;
2011         _exceptionType = "java/lang/IllegalArgumentException";
2012         _exceptionMessage = "offset < 0";
2013         goto exit;
2014     }
2015     _remaining = _env->GetArrayLength(params_ref) - offset;
2016     params_base = (GLfixed *)
2017         _env->GetIntArrayElements(params_ref, (jboolean *)0);
2018     params = params_base + offset;
2019 
2020     glMaterialxvOES(
2021         (GLenum)face,
2022         (GLenum)pname,
2023         (GLfixed *)params
2024     );
2025 
2026 exit:
2027     if (params_base) {
2028         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2029             JNI_ABORT);
2030     }
2031     if (_exception) {
2032         jniThrowException(_env, _exceptionType, _exceptionMessage);
2033     }
2034 }
2035 
2036 /* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
2037 static void
android_glMaterialxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)2038 android_glMaterialxvOES__IILjava_nio_IntBuffer_2
2039   (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
2040     jint _exception = 0;
2041     const char * _exceptionType = NULL;
2042     const char * _exceptionMessage = NULL;
2043     jintArray _array = (jintArray) 0;
2044     jint _bufferOffset = (jint) 0;
2045     jint _remaining;
2046     GLfixed *params = (GLfixed *) 0;
2047 
2048     if (!params_buf) {
2049         _exception = 1;
2050         _exceptionType = "java/lang/IllegalArgumentException";
2051         _exceptionMessage = "params == null";
2052         goto exit;
2053     }
2054     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2055     if (params == NULL) {
2056         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2057         params = (GLfixed *) (_paramsBase + _bufferOffset);
2058     }
2059     glMaterialxvOES(
2060         (GLenum)face,
2061         (GLenum)pname,
2062         (GLfixed *)params
2063     );
2064 
2065 exit:
2066     if (_array) {
2067         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
2068     }
2069     if (_exception) {
2070         jniThrowException(_env, _exceptionType, _exceptionMessage);
2071     }
2072 }
2073 
2074 /* void glMultMatrixxOES ( const GLfixed *m ) */
2075 static void
android_glMultMatrixxOES___3II(JNIEnv * _env,jobject _this,jintArray m_ref,jint offset)2076 android_glMultMatrixxOES___3II
2077   (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
2078     jint _exception = 0;
2079     const char * _exceptionType = NULL;
2080     const char * _exceptionMessage = NULL;
2081     GLfixed *m_base = (GLfixed *) 0;
2082     jint _remaining;
2083     GLfixed *m = (GLfixed *) 0;
2084 
2085     if (!m_ref) {
2086         _exception = 1;
2087         _exceptionType = "java/lang/IllegalArgumentException";
2088         _exceptionMessage = "m == null";
2089         goto exit;
2090     }
2091     if (offset < 0) {
2092         _exception = 1;
2093         _exceptionType = "java/lang/IllegalArgumentException";
2094         _exceptionMessage = "offset < 0";
2095         goto exit;
2096     }
2097     _remaining = _env->GetArrayLength(m_ref) - offset;
2098     m_base = (GLfixed *)
2099         _env->GetIntArrayElements(m_ref, (jboolean *)0);
2100     m = m_base + offset;
2101 
2102     glMultMatrixxOES(
2103         (GLfixed *)m
2104     );
2105 
2106 exit:
2107     if (m_base) {
2108         _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
2109             JNI_ABORT);
2110     }
2111     if (_exception) {
2112         jniThrowException(_env, _exceptionType, _exceptionMessage);
2113     }
2114 }
2115 
2116 /* void glMultMatrixxOES ( const GLfixed *m ) */
2117 static void
android_glMultMatrixxOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject m_buf)2118 android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
2119   (JNIEnv *_env, jobject _this, jobject m_buf) {
2120     jint _exception = 0;
2121     const char * _exceptionType = NULL;
2122     const char * _exceptionMessage = NULL;
2123     jintArray _array = (jintArray) 0;
2124     jint _bufferOffset = (jint) 0;
2125     jint _remaining;
2126     GLfixed *m = (GLfixed *) 0;
2127 
2128     if (!m_buf) {
2129         _exception = 1;
2130         _exceptionType = "java/lang/IllegalArgumentException";
2131         _exceptionMessage = "m == null";
2132         goto exit;
2133     }
2134     m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2135     if (m == NULL) {
2136         char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2137         m = (GLfixed *) (_mBase + _bufferOffset);
2138     }
2139     glMultMatrixxOES(
2140         (GLfixed *)m
2141     );
2142 
2143 exit:
2144     if (_array) {
2145         _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
2146     }
2147     if (_exception) {
2148         jniThrowException(_env, _exceptionType, _exceptionMessage);
2149     }
2150 }
2151 
2152 /* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
2153 static void
android_glMultiTexCoord4xOES__IIIII(JNIEnv * _env,jobject _this,jint target,jint s,jint t,jint r,jint q)2154 android_glMultiTexCoord4xOES__IIIII
2155   (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
2156     glMultiTexCoord4xOES(
2157         (GLenum)target,
2158         (GLfixed)s,
2159         (GLfixed)t,
2160         (GLfixed)r,
2161         (GLfixed)q
2162     );
2163 }
2164 
2165 /* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
2166 static void
android_glNormal3xOES__III(JNIEnv * _env,jobject _this,jint nx,jint ny,jint nz)2167 android_glNormal3xOES__III
2168   (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
2169     glNormal3xOES(
2170         (GLfixed)nx,
2171         (GLfixed)ny,
2172         (GLfixed)nz
2173     );
2174 }
2175 
2176 /* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
2177 static void
android_glOrthoxOES__IIIIII(JNIEnv * _env,jobject _this,jint left,jint right,jint bottom,jint top,jint zNear,jint zFar)2178 android_glOrthoxOES__IIIIII
2179   (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
2180     glOrthoxOES(
2181         (GLfixed)left,
2182         (GLfixed)right,
2183         (GLfixed)bottom,
2184         (GLfixed)top,
2185         (GLfixed)zNear,
2186         (GLfixed)zFar
2187     );
2188 }
2189 
2190 /* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
2191 static void
android_glPointParameterxOES__II(JNIEnv * _env,jobject _this,jint pname,jint param)2192 android_glPointParameterxOES__II
2193   (JNIEnv *_env, jobject _this, jint pname, jint param) {
2194     glPointParameterxOES(
2195         (GLenum)pname,
2196         (GLfixed)param
2197     );
2198 }
2199 
2200 /* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2201 static void
android_glPointParameterxvOES__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)2202 android_glPointParameterxvOES__I_3II
2203   (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
2204     jint _exception = 0;
2205     const char * _exceptionType = NULL;
2206     const char * _exceptionMessage = NULL;
2207     GLfixed *params_base = (GLfixed *) 0;
2208     jint _remaining;
2209     GLfixed *params = (GLfixed *) 0;
2210 
2211     if (!params_ref) {
2212         _exception = 1;
2213         _exceptionType = "java/lang/IllegalArgumentException";
2214         _exceptionMessage = "params == null";
2215         goto exit;
2216     }
2217     if (offset < 0) {
2218         _exception = 1;
2219         _exceptionType = "java/lang/IllegalArgumentException";
2220         _exceptionMessage = "offset < 0";
2221         goto exit;
2222     }
2223     _remaining = _env->GetArrayLength(params_ref) - offset;
2224     params_base = (GLfixed *)
2225         _env->GetIntArrayElements(params_ref, (jboolean *)0);
2226     params = params_base + offset;
2227 
2228     glPointParameterxvOES(
2229         (GLenum)pname,
2230         (GLfixed *)params
2231     );
2232 
2233 exit:
2234     if (params_base) {
2235         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2236             JNI_ABORT);
2237     }
2238     if (_exception) {
2239         jniThrowException(_env, _exceptionType, _exceptionMessage);
2240     }
2241 }
2242 
2243 /* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2244 static void
android_glPointParameterxvOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)2245 android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
2246   (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
2247     jint _exception = 0;
2248     const char * _exceptionType = NULL;
2249     const char * _exceptionMessage = NULL;
2250     jintArray _array = (jintArray) 0;
2251     jint _bufferOffset = (jint) 0;
2252     jint _remaining;
2253     GLfixed *params = (GLfixed *) 0;
2254 
2255     if (!params_buf) {
2256         _exception = 1;
2257         _exceptionType = "java/lang/IllegalArgumentException";
2258         _exceptionMessage = "params == null";
2259         goto exit;
2260     }
2261     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2262     if (params == NULL) {
2263         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2264         params = (GLfixed *) (_paramsBase + _bufferOffset);
2265     }
2266     glPointParameterxvOES(
2267         (GLenum)pname,
2268         (GLfixed *)params
2269     );
2270 
2271 exit:
2272     if (_array) {
2273         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
2274     }
2275     if (_exception) {
2276         jniThrowException(_env, _exceptionType, _exceptionMessage);
2277     }
2278 }
2279 
2280 /* void glPointSizexOES ( GLfixed size ) */
2281 static void
android_glPointSizexOES__I(JNIEnv * _env,jobject _this,jint size)2282 android_glPointSizexOES__I
2283   (JNIEnv *_env, jobject _this, jint size) {
2284     glPointSizexOES(
2285         (GLfixed)size
2286     );
2287 }
2288 
2289 /* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
2290 static void
android_glPolygonOffsetxOES__II(JNIEnv * _env,jobject _this,jint factor,jint units)2291 android_glPolygonOffsetxOES__II
2292   (JNIEnv *_env, jobject _this, jint factor, jint units) {
2293     glPolygonOffsetxOES(
2294         (GLfixed)factor,
2295         (GLfixed)units
2296     );
2297 }
2298 
2299 /* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
2300 static void
android_glRotatexOES__IIII(JNIEnv * _env,jobject _this,jint angle,jint x,jint y,jint z)2301 android_glRotatexOES__IIII
2302   (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
2303     glRotatexOES(
2304         (GLfixed)angle,
2305         (GLfixed)x,
2306         (GLfixed)y,
2307         (GLfixed)z
2308     );
2309 }
2310 
2311 /* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
2312 static void
android_glSampleCoveragexOES__IZ(JNIEnv * _env,jobject _this,jint value,jboolean invert)2313 android_glSampleCoveragexOES__IZ
2314   (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
2315     glSampleCoveragexOES(
2316         (GLclampx)value,
2317         (GLboolean)invert
2318     );
2319 }
2320 
2321 /* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2322 static void
android_glScalexOES__III(JNIEnv * _env,jobject _this,jint x,jint y,jint z)2323 android_glScalexOES__III
2324   (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
2325     glScalexOES(
2326         (GLfixed)x,
2327         (GLfixed)y,
2328         (GLfixed)z
2329     );
2330 }
2331 
2332 /* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
2333 static void
android_glTexEnvxOES__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)2334 android_glTexEnvxOES__III
2335   (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
2336     glTexEnvxOES(
2337         (GLenum)target,
2338         (GLenum)pname,
2339         (GLfixed)param
2340     );
2341 }
2342 
2343 /* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2344 static void
android_glTexEnvxvOES__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)2345 android_glTexEnvxvOES__II_3II
2346   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
2347     jint _exception = 0;
2348     const char * _exceptionType = NULL;
2349     const char * _exceptionMessage = NULL;
2350     GLfixed *params_base = (GLfixed *) 0;
2351     jint _remaining;
2352     GLfixed *params = (GLfixed *) 0;
2353 
2354     if (!params_ref) {
2355         _exception = 1;
2356         _exceptionType = "java/lang/IllegalArgumentException";
2357         _exceptionMessage = "params == null";
2358         goto exit;
2359     }
2360     if (offset < 0) {
2361         _exception = 1;
2362         _exceptionType = "java/lang/IllegalArgumentException";
2363         _exceptionMessage = "offset < 0";
2364         goto exit;
2365     }
2366     _remaining = _env->GetArrayLength(params_ref) - offset;
2367     params_base = (GLfixed *)
2368         _env->GetIntArrayElements(params_ref, (jboolean *)0);
2369     params = params_base + offset;
2370 
2371     glTexEnvxvOES(
2372         (GLenum)target,
2373         (GLenum)pname,
2374         (GLfixed *)params
2375     );
2376 
2377 exit:
2378     if (params_base) {
2379         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2380             JNI_ABORT);
2381     }
2382     if (_exception) {
2383         jniThrowException(_env, _exceptionType, _exceptionMessage);
2384     }
2385 }
2386 
2387 /* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2388 static void
android_glTexEnvxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)2389 android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2390   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
2391     jint _exception = 0;
2392     const char * _exceptionType = NULL;
2393     const char * _exceptionMessage = NULL;
2394     jintArray _array = (jintArray) 0;
2395     jint _bufferOffset = (jint) 0;
2396     jint _remaining;
2397     GLfixed *params = (GLfixed *) 0;
2398 
2399     if (!params_buf) {
2400         _exception = 1;
2401         _exceptionType = "java/lang/IllegalArgumentException";
2402         _exceptionMessage = "params == null";
2403         goto exit;
2404     }
2405     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2406     if (params == NULL) {
2407         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2408         params = (GLfixed *) (_paramsBase + _bufferOffset);
2409     }
2410     glTexEnvxvOES(
2411         (GLenum)target,
2412         (GLenum)pname,
2413         (GLfixed *)params
2414     );
2415 
2416 exit:
2417     if (_array) {
2418         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
2419     }
2420     if (_exception) {
2421         jniThrowException(_env, _exceptionType, _exceptionMessage);
2422     }
2423 }
2424 
2425 /* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2426 static void
android_glTexParameterxOES__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)2427 android_glTexParameterxOES__III
2428   (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
2429     glTexParameterxOES(
2430         (GLenum)target,
2431         (GLenum)pname,
2432         (GLfixed)param
2433     );
2434 }
2435 
2436 /* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2437 static void
android_glTexParameterxvOES__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)2438 android_glTexParameterxvOES__II_3II
2439   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
2440     jint _exception = 0;
2441     const char * _exceptionType = NULL;
2442     const char * _exceptionMessage = NULL;
2443     GLfixed *params_base = (GLfixed *) 0;
2444     jint _remaining;
2445     GLfixed *params = (GLfixed *) 0;
2446 
2447     if (!params_ref) {
2448         _exception = 1;
2449         _exceptionType = "java/lang/IllegalArgumentException";
2450         _exceptionMessage = "params == null";
2451         goto exit;
2452     }
2453     if (offset < 0) {
2454         _exception = 1;
2455         _exceptionType = "java/lang/IllegalArgumentException";
2456         _exceptionMessage = "offset < 0";
2457         goto exit;
2458     }
2459     _remaining = _env->GetArrayLength(params_ref) - offset;
2460     params_base = (GLfixed *)
2461         _env->GetIntArrayElements(params_ref, (jboolean *)0);
2462     params = params_base + offset;
2463 
2464     glTexParameterxvOES(
2465         (GLenum)target,
2466         (GLenum)pname,
2467         (GLfixed *)params
2468     );
2469 
2470 exit:
2471     if (params_base) {
2472         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2473             JNI_ABORT);
2474     }
2475     if (_exception) {
2476         jniThrowException(_env, _exceptionType, _exceptionMessage);
2477     }
2478 }
2479 
2480 /* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2481 static void
android_glTexParameterxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)2482 android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2483   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
2484     jint _exception = 0;
2485     const char * _exceptionType = NULL;
2486     const char * _exceptionMessage = NULL;
2487     jintArray _array = (jintArray) 0;
2488     jint _bufferOffset = (jint) 0;
2489     jint _remaining;
2490     GLfixed *params = (GLfixed *) 0;
2491 
2492     if (!params_buf) {
2493         _exception = 1;
2494         _exceptionType = "java/lang/IllegalArgumentException";
2495         _exceptionMessage = "params == null";
2496         goto exit;
2497     }
2498     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2499     if (params == NULL) {
2500         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2501         params = (GLfixed *) (_paramsBase + _bufferOffset);
2502     }
2503     glTexParameterxvOES(
2504         (GLenum)target,
2505         (GLenum)pname,
2506         (GLfixed *)params
2507     );
2508 
2509 exit:
2510     if (_array) {
2511         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
2512     }
2513     if (_exception) {
2514         jniThrowException(_env, _exceptionType, _exceptionMessage);
2515     }
2516 }
2517 
2518 /* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2519 static void
android_glTranslatexOES__III(JNIEnv * _env,jobject _this,jint x,jint y,jint z)2520 android_glTranslatexOES__III
2521   (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
2522     glTranslatexOES(
2523         (GLfixed)x,
2524         (GLfixed)y,
2525         (GLfixed)z
2526     );
2527 }
2528 
2529 /* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2530 static jboolean
android_glIsRenderbufferOES__I(JNIEnv * _env,jobject _this,jint renderbuffer)2531 android_glIsRenderbufferOES__I
2532   (JNIEnv *_env, jobject _this, jint renderbuffer) {
2533     GLboolean _returnValue;
2534     _returnValue = glIsRenderbufferOES(
2535         (GLuint)renderbuffer
2536     );
2537     return (jboolean)_returnValue;
2538 }
2539 
2540 /* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2541 static void
android_glBindRenderbufferOES__II(JNIEnv * _env,jobject _this,jint target,jint renderbuffer)2542 android_glBindRenderbufferOES__II
2543   (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
2544     glBindRenderbufferOES(
2545         (GLenum)target,
2546         (GLuint)renderbuffer
2547     );
2548 }
2549 
2550 /* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2551 static void
android_glDeleteRenderbuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray renderbuffers_ref,jint offset)2552 android_glDeleteRenderbuffersOES__I_3II
2553   (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
2554     jint _exception = 0;
2555     const char * _exceptionType = NULL;
2556     const char * _exceptionMessage = NULL;
2557     GLuint *renderbuffers_base = (GLuint *) 0;
2558     jint _remaining;
2559     GLuint *renderbuffers = (GLuint *) 0;
2560 
2561     if (!renderbuffers_ref) {
2562         _exception = 1;
2563         _exceptionType = "java/lang/IllegalArgumentException";
2564         _exceptionMessage = "renderbuffers == null";
2565         goto exit;
2566     }
2567     if (offset < 0) {
2568         _exception = 1;
2569         _exceptionType = "java/lang/IllegalArgumentException";
2570         _exceptionMessage = "offset < 0";
2571         goto exit;
2572     }
2573     _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2574     if (_remaining < n) {
2575         _exception = 1;
2576         _exceptionType = "java/lang/IllegalArgumentException";
2577         _exceptionMessage = "length - offset < n < needed";
2578         goto exit;
2579     }
2580     renderbuffers_base = (GLuint *)
2581         _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
2582     renderbuffers = renderbuffers_base + offset;
2583 
2584     glDeleteRenderbuffersOES(
2585         (GLsizei)n,
2586         (GLuint *)renderbuffers
2587     );
2588 
2589 exit:
2590     if (renderbuffers_base) {
2591         _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
2592             JNI_ABORT);
2593     }
2594     if (_exception) {
2595         jniThrowException(_env, _exceptionType, _exceptionMessage);
2596     }
2597 }
2598 
2599 /* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2600 static void
android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject renderbuffers_buf)2601 android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2602   (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
2603     jint _exception = 0;
2604     const char * _exceptionType = NULL;
2605     const char * _exceptionMessage = NULL;
2606     jintArray _array = (jintArray) 0;
2607     jint _bufferOffset = (jint) 0;
2608     jint _remaining;
2609     GLuint *renderbuffers = (GLuint *) 0;
2610 
2611     if (!renderbuffers_buf) {
2612         _exception = 1;
2613         _exceptionType = "java/lang/IllegalArgumentException";
2614         _exceptionMessage = "renderbuffers == null";
2615         goto exit;
2616     }
2617     renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2618     if (_remaining < n) {
2619         _exception = 1;
2620         _exceptionType = "java/lang/IllegalArgumentException";
2621         _exceptionMessage = "remaining() < n < needed";
2622         goto exit;
2623     }
2624     if (renderbuffers == NULL) {
2625         char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2626         renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2627     }
2628     glDeleteRenderbuffersOES(
2629         (GLsizei)n,
2630         (GLuint *)renderbuffers
2631     );
2632 
2633 exit:
2634     if (_array) {
2635         _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, JNI_ABORT);
2636     }
2637     if (_exception) {
2638         jniThrowException(_env, _exceptionType, _exceptionMessage);
2639     }
2640 }
2641 
2642 /* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2643 static void
android_glGenRenderbuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray renderbuffers_ref,jint offset)2644 android_glGenRenderbuffersOES__I_3II
2645   (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
2646     jint _exception = 0;
2647     const char * _exceptionType = NULL;
2648     const char * _exceptionMessage = NULL;
2649     GLuint *renderbuffers_base = (GLuint *) 0;
2650     jint _remaining;
2651     GLuint *renderbuffers = (GLuint *) 0;
2652 
2653     if (!renderbuffers_ref) {
2654         _exception = 1;
2655         _exceptionType = "java/lang/IllegalArgumentException";
2656         _exceptionMessage = "renderbuffers == null";
2657         goto exit;
2658     }
2659     if (offset < 0) {
2660         _exception = 1;
2661         _exceptionType = "java/lang/IllegalArgumentException";
2662         _exceptionMessage = "offset < 0";
2663         goto exit;
2664     }
2665     _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2666     if (_remaining < n) {
2667         _exception = 1;
2668         _exceptionType = "java/lang/IllegalArgumentException";
2669         _exceptionMessage = "length - offset < n < needed";
2670         goto exit;
2671     }
2672     renderbuffers_base = (GLuint *)
2673         _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
2674     renderbuffers = renderbuffers_base + offset;
2675 
2676     glGenRenderbuffersOES(
2677         (GLsizei)n,
2678         (GLuint *)renderbuffers
2679     );
2680 
2681 exit:
2682     if (renderbuffers_base) {
2683         _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
2684             _exception ? JNI_ABORT: 0);
2685     }
2686     if (_exception) {
2687         jniThrowException(_env, _exceptionType, _exceptionMessage);
2688     }
2689 }
2690 
2691 /* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2692 static void
android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject renderbuffers_buf)2693 android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2694   (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
2695     jint _exception = 0;
2696     const char * _exceptionType = NULL;
2697     const char * _exceptionMessage = NULL;
2698     jintArray _array = (jintArray) 0;
2699     jint _bufferOffset = (jint) 0;
2700     jint _remaining;
2701     GLuint *renderbuffers = (GLuint *) 0;
2702 
2703     if (!renderbuffers_buf) {
2704         _exception = 1;
2705         _exceptionType = "java/lang/IllegalArgumentException";
2706         _exceptionMessage = "renderbuffers == null";
2707         goto exit;
2708     }
2709     renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2710     if (_remaining < n) {
2711         _exception = 1;
2712         _exceptionType = "java/lang/IllegalArgumentException";
2713         _exceptionMessage = "remaining() < n < needed";
2714         goto exit;
2715     }
2716     if (renderbuffers == NULL) {
2717         char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2718         renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2719     }
2720     glGenRenderbuffersOES(
2721         (GLsizei)n,
2722         (GLuint *)renderbuffers
2723     );
2724 
2725 exit:
2726     if (_array) {
2727         _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
2728     }
2729     if (_exception) {
2730         jniThrowException(_env, _exceptionType, _exceptionMessage);
2731     }
2732 }
2733 
2734 /* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2735 static void
android_glRenderbufferStorageOES__IIII(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint width,jint height)2736 android_glRenderbufferStorageOES__IIII
2737   (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
2738     glRenderbufferStorageOES(
2739         (GLenum)target,
2740         (GLenum)internalformat,
2741         (GLsizei)width,
2742         (GLsizei)height
2743     );
2744 }
2745 
2746 /* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2747 static void
android_glGetRenderbufferParameterivOES__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)2748 android_glGetRenderbufferParameterivOES__II_3II
2749   (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
2750     jint _exception = 0;
2751     const char * _exceptionType = NULL;
2752     const char * _exceptionMessage = NULL;
2753     GLint *params_base = (GLint *) 0;
2754     jint _remaining;
2755     GLint *params = (GLint *) 0;
2756 
2757     if (!params_ref) {
2758         _exception = 1;
2759         _exceptionType = "java/lang/IllegalArgumentException";
2760         _exceptionMessage = "params == null";
2761         goto exit;
2762     }
2763     if (offset < 0) {
2764         _exception = 1;
2765         _exceptionType = "java/lang/IllegalArgumentException";
2766         _exceptionMessage = "offset < 0";
2767         goto exit;
2768     }
2769     _remaining = _env->GetArrayLength(params_ref) - offset;
2770     if (_remaining < 1) {
2771         _exception = 1;
2772         _exceptionType = "java/lang/IllegalArgumentException";
2773         _exceptionMessage = "length - offset < 1 < needed";
2774         goto exit;
2775     }
2776     params_base = (GLint *)
2777         _env->GetIntArrayElements(params_ref, (jboolean *)0);
2778     params = params_base + offset;
2779 
2780     glGetRenderbufferParameterivOES(
2781         (GLenum)target,
2782         (GLenum)pname,
2783         (GLint *)params
2784     );
2785 
2786 exit:
2787     if (params_base) {
2788         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2789             _exception ? JNI_ABORT: 0);
2790     }
2791     if (_exception) {
2792         jniThrowException(_env, _exceptionType, _exceptionMessage);
2793     }
2794 }
2795 
2796 /* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2797 static void
android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)2798 android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2799   (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
2800     jint _exception = 0;
2801     const char * _exceptionType = NULL;
2802     const char * _exceptionMessage = NULL;
2803     jintArray _array = (jintArray) 0;
2804     jint _bufferOffset = (jint) 0;
2805     jint _remaining;
2806     GLint *params = (GLint *) 0;
2807 
2808     if (!params_buf) {
2809         _exception = 1;
2810         _exceptionType = "java/lang/IllegalArgumentException";
2811         _exceptionMessage = "params == null";
2812         goto exit;
2813     }
2814     params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2815     if (_remaining < 1) {
2816         _exception = 1;
2817         _exceptionType = "java/lang/IllegalArgumentException";
2818         _exceptionMessage = "remaining() < 1 < needed";
2819         goto exit;
2820     }
2821     if (params == NULL) {
2822         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2823         params = (GLint *) (_paramsBase + _bufferOffset);
2824     }
2825     glGetRenderbufferParameterivOES(
2826         (GLenum)target,
2827         (GLenum)pname,
2828         (GLint *)params
2829     );
2830 
2831 exit:
2832     if (_array) {
2833         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
2834     }
2835     if (_exception) {
2836         jniThrowException(_env, _exceptionType, _exceptionMessage);
2837     }
2838 }
2839 
2840 /* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2841 static jboolean
android_glIsFramebufferOES__I(JNIEnv * _env,jobject _this,jint framebuffer)2842 android_glIsFramebufferOES__I
2843   (JNIEnv *_env, jobject _this, jint framebuffer) {
2844     GLboolean _returnValue;
2845     _returnValue = glIsFramebufferOES(
2846         (GLuint)framebuffer
2847     );
2848     return (jboolean)_returnValue;
2849 }
2850 
2851 /* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2852 static void
android_glBindFramebufferOES__II(JNIEnv * _env,jobject _this,jint target,jint framebuffer)2853 android_glBindFramebufferOES__II
2854   (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
2855     glBindFramebufferOES(
2856         (GLenum)target,
2857         (GLuint)framebuffer
2858     );
2859 }
2860 
2861 /* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2862 static void
android_glDeleteFramebuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray framebuffers_ref,jint offset)2863 android_glDeleteFramebuffersOES__I_3II
2864   (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
2865     jint _exception = 0;
2866     const char * _exceptionType = NULL;
2867     const char * _exceptionMessage = NULL;
2868     GLuint *framebuffers_base = (GLuint *) 0;
2869     jint _remaining;
2870     GLuint *framebuffers = (GLuint *) 0;
2871 
2872     if (!framebuffers_ref) {
2873         _exception = 1;
2874         _exceptionType = "java/lang/IllegalArgumentException";
2875         _exceptionMessage = "framebuffers == null";
2876         goto exit;
2877     }
2878     if (offset < 0) {
2879         _exception = 1;
2880         _exceptionType = "java/lang/IllegalArgumentException";
2881         _exceptionMessage = "offset < 0";
2882         goto exit;
2883     }
2884     _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2885     if (_remaining < n) {
2886         _exception = 1;
2887         _exceptionType = "java/lang/IllegalArgumentException";
2888         _exceptionMessage = "length - offset < n < needed";
2889         goto exit;
2890     }
2891     framebuffers_base = (GLuint *)
2892         _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
2893     framebuffers = framebuffers_base + offset;
2894 
2895     glDeleteFramebuffersOES(
2896         (GLsizei)n,
2897         (GLuint *)framebuffers
2898     );
2899 
2900 exit:
2901     if (framebuffers_base) {
2902         _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
2903             JNI_ABORT);
2904     }
2905     if (_exception) {
2906         jniThrowException(_env, _exceptionType, _exceptionMessage);
2907     }
2908 }
2909 
2910 /* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2911 static void
android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject framebuffers_buf)2912 android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2913   (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
2914     jint _exception = 0;
2915     const char * _exceptionType = NULL;
2916     const char * _exceptionMessage = NULL;
2917     jintArray _array = (jintArray) 0;
2918     jint _bufferOffset = (jint) 0;
2919     jint _remaining;
2920     GLuint *framebuffers = (GLuint *) 0;
2921 
2922     if (!framebuffers_buf) {
2923         _exception = 1;
2924         _exceptionType = "java/lang/IllegalArgumentException";
2925         _exceptionMessage = "framebuffers == null";
2926         goto exit;
2927     }
2928     framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2929     if (_remaining < n) {
2930         _exception = 1;
2931         _exceptionType = "java/lang/IllegalArgumentException";
2932         _exceptionMessage = "remaining() < n < needed";
2933         goto exit;
2934     }
2935     if (framebuffers == NULL) {
2936         char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2937         framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2938     }
2939     glDeleteFramebuffersOES(
2940         (GLsizei)n,
2941         (GLuint *)framebuffers
2942     );
2943 
2944 exit:
2945     if (_array) {
2946         _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, JNI_ABORT);
2947     }
2948     if (_exception) {
2949         jniThrowException(_env, _exceptionType, _exceptionMessage);
2950     }
2951 }
2952 
2953 /* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2954 static void
android_glGenFramebuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray framebuffers_ref,jint offset)2955 android_glGenFramebuffersOES__I_3II
2956   (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
2957     jint _exception = 0;
2958     const char * _exceptionType = NULL;
2959     const char * _exceptionMessage = NULL;
2960     GLuint *framebuffers_base = (GLuint *) 0;
2961     jint _remaining;
2962     GLuint *framebuffers = (GLuint *) 0;
2963 
2964     if (!framebuffers_ref) {
2965         _exception = 1;
2966         _exceptionType = "java/lang/IllegalArgumentException";
2967         _exceptionMessage = "framebuffers == null";
2968         goto exit;
2969     }
2970     if (offset < 0) {
2971         _exception = 1;
2972         _exceptionType = "java/lang/IllegalArgumentException";
2973         _exceptionMessage = "offset < 0";
2974         goto exit;
2975     }
2976     _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2977     if (_remaining < n) {
2978         _exception = 1;
2979         _exceptionType = "java/lang/IllegalArgumentException";
2980         _exceptionMessage = "length - offset < n < needed";
2981         goto exit;
2982     }
2983     framebuffers_base = (GLuint *)
2984         _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
2985     framebuffers = framebuffers_base + offset;
2986 
2987     glGenFramebuffersOES(
2988         (GLsizei)n,
2989         (GLuint *)framebuffers
2990     );
2991 
2992 exit:
2993     if (framebuffers_base) {
2994         _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
2995             _exception ? JNI_ABORT: 0);
2996     }
2997     if (_exception) {
2998         jniThrowException(_env, _exceptionType, _exceptionMessage);
2999     }
3000 }
3001 
3002 /* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
3003 static void
android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject framebuffers_buf)3004 android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
3005   (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
3006     jint _exception = 0;
3007     const char * _exceptionType = NULL;
3008     const char * _exceptionMessage = NULL;
3009     jintArray _array = (jintArray) 0;
3010     jint _bufferOffset = (jint) 0;
3011     jint _remaining;
3012     GLuint *framebuffers = (GLuint *) 0;
3013 
3014     if (!framebuffers_buf) {
3015         _exception = 1;
3016         _exceptionType = "java/lang/IllegalArgumentException";
3017         _exceptionMessage = "framebuffers == null";
3018         goto exit;
3019     }
3020     framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3021     if (_remaining < n) {
3022         _exception = 1;
3023         _exceptionType = "java/lang/IllegalArgumentException";
3024         _exceptionMessage = "remaining() < n < needed";
3025         goto exit;
3026     }
3027     if (framebuffers == NULL) {
3028         char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3029         framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
3030     }
3031     glGenFramebuffersOES(
3032         (GLsizei)n,
3033         (GLuint *)framebuffers
3034     );
3035 
3036 exit:
3037     if (_array) {
3038         _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
3039     }
3040     if (_exception) {
3041         jniThrowException(_env, _exceptionType, _exceptionMessage);
3042     }
3043 }
3044 
3045 /* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
3046 static jint
android_glCheckFramebufferStatusOES__I(JNIEnv * _env,jobject _this,jint target)3047 android_glCheckFramebufferStatusOES__I
3048   (JNIEnv *_env, jobject _this, jint target) {
3049     GLenum _returnValue;
3050     _returnValue = glCheckFramebufferStatusOES(
3051         (GLenum)target
3052     );
3053     return (jint)_returnValue;
3054 }
3055 
3056 /* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
3057 static void
android_glFramebufferRenderbufferOES__IIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint renderbuffertarget,jint renderbuffer)3058 android_glFramebufferRenderbufferOES__IIII
3059   (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
3060     glFramebufferRenderbufferOES(
3061         (GLenum)target,
3062         (GLenum)attachment,
3063         (GLenum)renderbuffertarget,
3064         (GLuint)renderbuffer
3065     );
3066 }
3067 
3068 /* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
3069 static void
android_glFramebufferTexture2DOES__IIIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint textarget,jint texture,jint level)3070 android_glFramebufferTexture2DOES__IIIII
3071   (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
3072     glFramebufferTexture2DOES(
3073         (GLenum)target,
3074         (GLenum)attachment,
3075         (GLenum)textarget,
3076         (GLuint)texture,
3077         (GLint)level
3078     );
3079 }
3080 
3081 /* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3082 static void
android_glGetFramebufferAttachmentParameterivOES__III_3II(JNIEnv * _env,jobject _this,jint target,jint attachment,jint pname,jintArray params_ref,jint offset)3083 android_glGetFramebufferAttachmentParameterivOES__III_3II
3084   (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
3085     jint _exception = 0;
3086     const char * _exceptionType = NULL;
3087     const char * _exceptionMessage = NULL;
3088     GLint *params_base = (GLint *) 0;
3089     jint _remaining;
3090     GLint *params = (GLint *) 0;
3091 
3092     if (!params_ref) {
3093         _exception = 1;
3094         _exceptionType = "java/lang/IllegalArgumentException";
3095         _exceptionMessage = "params == null";
3096         goto exit;
3097     }
3098     if (offset < 0) {
3099         _exception = 1;
3100         _exceptionType = "java/lang/IllegalArgumentException";
3101         _exceptionMessage = "offset < 0";
3102         goto exit;
3103     }
3104     _remaining = _env->GetArrayLength(params_ref) - offset;
3105     if (_remaining < 1) {
3106         _exception = 1;
3107         _exceptionType = "java/lang/IllegalArgumentException";
3108         _exceptionMessage = "length - offset < 1 < needed";
3109         goto exit;
3110     }
3111     params_base = (GLint *)
3112         _env->GetIntArrayElements(params_ref, (jboolean *)0);
3113     params = params_base + offset;
3114 
3115     glGetFramebufferAttachmentParameterivOES(
3116         (GLenum)target,
3117         (GLenum)attachment,
3118         (GLenum)pname,
3119         (GLint *)params
3120     );
3121 
3122 exit:
3123     if (params_base) {
3124         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3125             _exception ? JNI_ABORT: 0);
3126     }
3127     if (_exception) {
3128         jniThrowException(_env, _exceptionType, _exceptionMessage);
3129     }
3130 }
3131 
3132 /* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3133 static void
android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint attachment,jint pname,jobject params_buf)3134 android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
3135   (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
3136     jint _exception = 0;
3137     const char * _exceptionType = NULL;
3138     const char * _exceptionMessage = NULL;
3139     jintArray _array = (jintArray) 0;
3140     jint _bufferOffset = (jint) 0;
3141     jint _remaining;
3142     GLint *params = (GLint *) 0;
3143 
3144     if (!params_buf) {
3145         _exception = 1;
3146         _exceptionType = "java/lang/IllegalArgumentException";
3147         _exceptionMessage = "params == null";
3148         goto exit;
3149     }
3150     params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3151     if (_remaining < 1) {
3152         _exception = 1;
3153         _exceptionType = "java/lang/IllegalArgumentException";
3154         _exceptionMessage = "remaining() < 1 < needed";
3155         goto exit;
3156     }
3157     if (params == NULL) {
3158         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3159         params = (GLint *) (_paramsBase + _bufferOffset);
3160     }
3161     glGetFramebufferAttachmentParameterivOES(
3162         (GLenum)target,
3163         (GLenum)attachment,
3164         (GLenum)pname,
3165         (GLint *)params
3166     );
3167 
3168 exit:
3169     if (_array) {
3170         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3171     }
3172     if (_exception) {
3173         jniThrowException(_env, _exceptionType, _exceptionMessage);
3174     }
3175 }
3176 
3177 /* void glGenerateMipmapOES ( GLenum target ) */
3178 static void
android_glGenerateMipmapOES__I(JNIEnv * _env,jobject _this,jint target)3179 android_glGenerateMipmapOES__I
3180   (JNIEnv *_env, jobject _this, jint target) {
3181     glGenerateMipmapOES(
3182         (GLenum)target
3183     );
3184 }
3185 
3186 /* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
3187 static void
android_glCurrentPaletteMatrixOES__I(JNIEnv * _env,jobject _this,jint matrixpaletteindex)3188 android_glCurrentPaletteMatrixOES__I
3189   (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
3190     glCurrentPaletteMatrixOES(
3191         (GLuint)matrixpaletteindex
3192     );
3193 }
3194 
3195 /* void glLoadPaletteFromModelViewMatrixOES ( void ) */
3196 static void
android_glLoadPaletteFromModelViewMatrixOES__(JNIEnv * _env,jobject _this)3197 android_glLoadPaletteFromModelViewMatrixOES__
3198   (JNIEnv *_env, jobject _this) {
3199     glLoadPaletteFromModelViewMatrixOES();
3200 }
3201 
3202 /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3203 static void
android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)3204 android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
3205   (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
3206     jint _exception = 0;
3207     const char * _exceptionType = NULL;
3208     const char * _exceptionMessage = NULL;
3209     jarray _array = (jarray) 0;
3210     jint _bufferOffset = (jint) 0;
3211     jint _remaining;
3212     GLvoid *pointer = (GLvoid *) 0;
3213 
3214     if (pointer_buf) {
3215         pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3216         if ( ! pointer ) {
3217             return;
3218         }
3219     }
3220     glMatrixIndexPointerOESBounds(
3221         (GLint)size,
3222         (GLenum)type,
3223         (GLsizei)stride,
3224         (GLvoid *)pointer,
3225         (GLsizei)remaining
3226     );
3227     if (_exception) {
3228         jniThrowException(_env, _exceptionType, _exceptionMessage);
3229     }
3230 }
3231 
3232 /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3233 static void
android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)3234 android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
3235   (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
3236     jint _exception = 0;
3237     const char * _exceptionType = NULL;
3238     const char * _exceptionMessage = NULL;
3239     jarray _array = (jarray) 0;
3240     jint _bufferOffset = (jint) 0;
3241     jint _remaining;
3242     GLvoid *pointer = (GLvoid *) 0;
3243 
3244     if (pointer_buf) {
3245         pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3246         if ( ! pointer ) {
3247             return;
3248         }
3249     }
3250     glWeightPointerOESBounds(
3251         (GLint)size,
3252         (GLenum)type,
3253         (GLsizei)stride,
3254         (GLvoid *)pointer,
3255         (GLsizei)remaining
3256     );
3257     if (_exception) {
3258         jniThrowException(_env, _exceptionType, _exceptionMessage);
3259     }
3260 }
3261 
3262 /* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
3263 static void
android_glDepthRangefOES__FF(JNIEnv * _env,jobject _this,jfloat zNear,jfloat zFar)3264 android_glDepthRangefOES__FF
3265   (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
3266     glDepthRangefOES(
3267         (GLclampf)zNear,
3268         (GLclampf)zFar
3269     );
3270 }
3271 
3272 /* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3273 static void
android_glFrustumfOES__FFFFFF(JNIEnv * _env,jobject _this,jfloat left,jfloat right,jfloat bottom,jfloat top,jfloat zNear,jfloat zFar)3274 android_glFrustumfOES__FFFFFF
3275   (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
3276     glFrustumfOES(
3277         (GLfloat)left,
3278         (GLfloat)right,
3279         (GLfloat)bottom,
3280         (GLfloat)top,
3281         (GLfloat)zNear,
3282         (GLfloat)zFar
3283     );
3284 }
3285 
3286 /* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3287 static void
android_glOrthofOES__FFFFFF(JNIEnv * _env,jobject _this,jfloat left,jfloat right,jfloat bottom,jfloat top,jfloat zNear,jfloat zFar)3288 android_glOrthofOES__FFFFFF
3289   (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
3290     glOrthofOES(
3291         (GLfloat)left,
3292         (GLfloat)right,
3293         (GLfloat)bottom,
3294         (GLfloat)top,
3295         (GLfloat)zNear,
3296         (GLfloat)zFar
3297     );
3298 }
3299 
3300 /* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3301 static void
android_glClipPlanefOES__I_3FI(JNIEnv * _env,jobject _this,jint plane,jfloatArray equation_ref,jint offset)3302 android_glClipPlanefOES__I_3FI
3303   (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
3304     jint _exception = 0;
3305     const char * _exceptionType = NULL;
3306     const char * _exceptionMessage = NULL;
3307     GLfloat *equation_base = (GLfloat *) 0;
3308     jint _remaining;
3309     GLfloat *equation = (GLfloat *) 0;
3310 
3311     if (!equation_ref) {
3312         _exception = 1;
3313         _exceptionType = "java/lang/IllegalArgumentException";
3314         _exceptionMessage = "equation == null";
3315         goto exit;
3316     }
3317     if (offset < 0) {
3318         _exception = 1;
3319         _exceptionType = "java/lang/IllegalArgumentException";
3320         _exceptionMessage = "offset < 0";
3321         goto exit;
3322     }
3323     _remaining = _env->GetArrayLength(equation_ref) - offset;
3324     equation_base = (GLfloat *)
3325         _env->GetFloatArrayElements(equation_ref, (jboolean *)0);
3326     equation = equation_base + offset;
3327 
3328     glClipPlanefOES(
3329         (GLenum)plane,
3330         (GLfloat *)equation
3331     );
3332 
3333 exit:
3334     if (equation_base) {
3335         _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base,
3336             JNI_ABORT);
3337     }
3338     if (_exception) {
3339         jniThrowException(_env, _exceptionType, _exceptionMessage);
3340     }
3341 }
3342 
3343 /* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3344 static void
android_glClipPlanefOES__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint plane,jobject equation_buf)3345 android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
3346   (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
3347     jint _exception = 0;
3348     const char * _exceptionType = NULL;
3349     const char * _exceptionMessage = NULL;
3350     jfloatArray _array = (jfloatArray) 0;
3351     jint _bufferOffset = (jint) 0;
3352     jint _remaining;
3353     GLfloat *equation = (GLfloat *) 0;
3354 
3355     if (!equation_buf) {
3356         _exception = 1;
3357         _exceptionType = "java/lang/IllegalArgumentException";
3358         _exceptionMessage = "equation == null";
3359         goto exit;
3360     }
3361     equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3362     if (equation == NULL) {
3363         char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3364         equation = (GLfloat *) (_equationBase + _bufferOffset);
3365     }
3366     glClipPlanefOES(
3367         (GLenum)plane,
3368         (GLfloat *)equation
3369     );
3370 
3371 exit:
3372     if (_array) {
3373         _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
3374     }
3375     if (_exception) {
3376         jniThrowException(_env, _exceptionType, _exceptionMessage);
3377     }
3378 }
3379 
3380 /* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3381 static void
android_glGetClipPlanefOES__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray eqn_ref,jint offset)3382 android_glGetClipPlanefOES__I_3FI
3383   (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
3384     jint _exception = 0;
3385     const char * _exceptionType = NULL;
3386     const char * _exceptionMessage = NULL;
3387     GLfloat *eqn_base = (GLfloat *) 0;
3388     jint _remaining;
3389     GLfloat *eqn = (GLfloat *) 0;
3390 
3391     if (!eqn_ref) {
3392         _exception = 1;
3393         _exceptionType = "java/lang/IllegalArgumentException";
3394         _exceptionMessage = "eqn == null";
3395         goto exit;
3396     }
3397     if (offset < 0) {
3398         _exception = 1;
3399         _exceptionType = "java/lang/IllegalArgumentException";
3400         _exceptionMessage = "offset < 0";
3401         goto exit;
3402     }
3403     _remaining = _env->GetArrayLength(eqn_ref) - offset;
3404     if (_remaining < 4) {
3405         _exception = 1;
3406         _exceptionType = "java/lang/IllegalArgumentException";
3407         _exceptionMessage = "length - offset < 4 < needed";
3408         goto exit;
3409     }
3410     eqn_base = (GLfloat *)
3411         _env->GetFloatArrayElements(eqn_ref, (jboolean *)0);
3412     eqn = eqn_base + offset;
3413 
3414     glGetClipPlanefOES(
3415         (GLenum)pname,
3416         (GLfloat *)eqn
3417     );
3418 
3419 exit:
3420     if (eqn_base) {
3421         _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base,
3422             _exception ? JNI_ABORT: 0);
3423     }
3424     if (_exception) {
3425         jniThrowException(_env, _exceptionType, _exceptionMessage);
3426     }
3427 }
3428 
3429 /* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3430 static void
android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject eqn_buf)3431 android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
3432   (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
3433     jint _exception = 0;
3434     const char * _exceptionType = NULL;
3435     const char * _exceptionMessage = NULL;
3436     jfloatArray _array = (jfloatArray) 0;
3437     jint _bufferOffset = (jint) 0;
3438     jint _remaining;
3439     GLfloat *eqn = (GLfloat *) 0;
3440 
3441     if (!eqn_buf) {
3442         _exception = 1;
3443         _exceptionType = "java/lang/IllegalArgumentException";
3444         _exceptionMessage = "eqn == null";
3445         goto exit;
3446     }
3447     eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3448     if (_remaining < 4) {
3449         _exception = 1;
3450         _exceptionType = "java/lang/IllegalArgumentException";
3451         _exceptionMessage = "remaining() < 4 < needed";
3452         goto exit;
3453     }
3454     if (eqn == NULL) {
3455         char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3456         eqn = (GLfloat *) (_eqnBase + _bufferOffset);
3457     }
3458     glGetClipPlanefOES(
3459         (GLenum)pname,
3460         (GLfloat *)eqn
3461     );
3462 
3463 exit:
3464     if (_array) {
3465         _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0);
3466     }
3467     if (_exception) {
3468         jniThrowException(_env, _exceptionType, _exceptionMessage);
3469     }
3470 }
3471 
3472 /* void glClearDepthfOES ( GLclampf depth ) */
3473 static void
android_glClearDepthfOES__F(JNIEnv * _env,jobject _this,jfloat depth)3474 android_glClearDepthfOES__F
3475   (JNIEnv *_env, jobject _this, jfloat depth) {
3476     glClearDepthfOES(
3477         (GLclampf)depth
3478     );
3479 }
3480 
3481 /* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3482 static void
android_glTexGenfOES__IIF(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloat param)3483 android_glTexGenfOES__IIF
3484   (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
3485     glTexGenfOES(
3486         (GLenum)coord,
3487         (GLenum)pname,
3488         (GLfloat)param
3489     );
3490 }
3491 
3492 /* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3493 static void
android_glTexGenfvOES__II_3FI(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloatArray params_ref,jint offset)3494 android_glTexGenfvOES__II_3FI
3495   (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
3496     jint _exception = 0;
3497     const char * _exceptionType = NULL;
3498     const char * _exceptionMessage = NULL;
3499     GLfloat *params_base = (GLfloat *) 0;
3500     jint _remaining;
3501     GLfloat *params = (GLfloat *) 0;
3502 
3503     if (!params_ref) {
3504         _exception = 1;
3505         _exceptionType = "java/lang/IllegalArgumentException";
3506         _exceptionMessage = "params == null";
3507         goto exit;
3508     }
3509     if (offset < 0) {
3510         _exception = 1;
3511         _exceptionType = "java/lang/IllegalArgumentException";
3512         _exceptionMessage = "offset < 0";
3513         goto exit;
3514     }
3515     _remaining = _env->GetArrayLength(params_ref) - offset;
3516     params_base = (GLfloat *)
3517         _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3518     params = params_base + offset;
3519 
3520     glTexGenfvOES(
3521         (GLenum)coord,
3522         (GLenum)pname,
3523         (GLfloat *)params
3524     );
3525 
3526 exit:
3527     if (params_base) {
3528         _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3529             JNI_ABORT);
3530     }
3531     if (_exception) {
3532         jniThrowException(_env, _exceptionType, _exceptionMessage);
3533     }
3534 }
3535 
3536 /* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3537 static void
android_glTexGenfvOES__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)3538 android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3539   (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
3540     jint _exception = 0;
3541     const char * _exceptionType = NULL;
3542     const char * _exceptionMessage = NULL;
3543     jfloatArray _array = (jfloatArray) 0;
3544     jint _bufferOffset = (jint) 0;
3545     jint _remaining;
3546     GLfloat *params = (GLfloat *) 0;
3547 
3548     if (!params_buf) {
3549         _exception = 1;
3550         _exceptionType = "java/lang/IllegalArgumentException";
3551         _exceptionMessage = "params == null";
3552         goto exit;
3553     }
3554     params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3555     if (params == NULL) {
3556         char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3557         params = (GLfloat *) (_paramsBase + _bufferOffset);
3558     }
3559     glTexGenfvOES(
3560         (GLenum)coord,
3561         (GLenum)pname,
3562         (GLfloat *)params
3563     );
3564 
3565 exit:
3566     if (_array) {
3567         _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
3568     }
3569     if (_exception) {
3570         jniThrowException(_env, _exceptionType, _exceptionMessage);
3571     }
3572 }
3573 
3574 /* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3575 static void
android_glTexGeniOES__III(JNIEnv * _env,jobject _this,jint coord,jint pname,jint param)3576 android_glTexGeniOES__III
3577   (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
3578     glTexGeniOES(
3579         (GLenum)coord,
3580         (GLenum)pname,
3581         (GLint)param
3582     );
3583 }
3584 
3585 /* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3586 static void
android_glTexGenivOES__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)3587 android_glTexGenivOES__II_3II
3588   (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
3589     jint _exception = 0;
3590     const char * _exceptionType = NULL;
3591     const char * _exceptionMessage = NULL;
3592     GLint *params_base = (GLint *) 0;
3593     jint _remaining;
3594     GLint *params = (GLint *) 0;
3595 
3596     if (!params_ref) {
3597         _exception = 1;
3598         _exceptionType = "java/lang/IllegalArgumentException";
3599         _exceptionMessage = "params == null";
3600         goto exit;
3601     }
3602     if (offset < 0) {
3603         _exception = 1;
3604         _exceptionType = "java/lang/IllegalArgumentException";
3605         _exceptionMessage = "offset < 0";
3606         goto exit;
3607     }
3608     _remaining = _env->GetArrayLength(params_ref) - offset;
3609     params_base = (GLint *)
3610         _env->GetIntArrayElements(params_ref, (jboolean *)0);
3611     params = params_base + offset;
3612 
3613     glTexGenivOES(
3614         (GLenum)coord,
3615         (GLenum)pname,
3616         (GLint *)params
3617     );
3618 
3619 exit:
3620     if (params_base) {
3621         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3622             JNI_ABORT);
3623     }
3624     if (_exception) {
3625         jniThrowException(_env, _exceptionType, _exceptionMessage);
3626     }
3627 }
3628 
3629 /* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3630 static void
android_glTexGenivOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)3631 android_glTexGenivOES__IILjava_nio_IntBuffer_2
3632   (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
3633     jint _exception = 0;
3634     const char * _exceptionType = NULL;
3635     const char * _exceptionMessage = NULL;
3636     jintArray _array = (jintArray) 0;
3637     jint _bufferOffset = (jint) 0;
3638     jint _remaining;
3639     GLint *params = (GLint *) 0;
3640 
3641     if (!params_buf) {
3642         _exception = 1;
3643         _exceptionType = "java/lang/IllegalArgumentException";
3644         _exceptionMessage = "params == null";
3645         goto exit;
3646     }
3647     params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3648     if (params == NULL) {
3649         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3650         params = (GLint *) (_paramsBase + _bufferOffset);
3651     }
3652     glTexGenivOES(
3653         (GLenum)coord,
3654         (GLenum)pname,
3655         (GLint *)params
3656     );
3657 
3658 exit:
3659     if (_array) {
3660         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
3661     }
3662     if (_exception) {
3663         jniThrowException(_env, _exceptionType, _exceptionMessage);
3664     }
3665 }
3666 
3667 /* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3668 static void
android_glTexGenxOES__III(JNIEnv * _env,jobject _this,jint coord,jint pname,jint param)3669 android_glTexGenxOES__III
3670   (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
3671     glTexGenxOES(
3672         (GLenum)coord,
3673         (GLenum)pname,
3674         (GLfixed)param
3675     );
3676 }
3677 
3678 /* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3679 static void
android_glTexGenxvOES__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)3680 android_glTexGenxvOES__II_3II
3681   (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
3682     jint _exception = 0;
3683     const char * _exceptionType = NULL;
3684     const char * _exceptionMessage = NULL;
3685     GLfixed *params_base = (GLfixed *) 0;
3686     jint _remaining;
3687     GLfixed *params = (GLfixed *) 0;
3688 
3689     if (!params_ref) {
3690         _exception = 1;
3691         _exceptionType = "java/lang/IllegalArgumentException";
3692         _exceptionMessage = "params == null";
3693         goto exit;
3694     }
3695     if (offset < 0) {
3696         _exception = 1;
3697         _exceptionType = "java/lang/IllegalArgumentException";
3698         _exceptionMessage = "offset < 0";
3699         goto exit;
3700     }
3701     _remaining = _env->GetArrayLength(params_ref) - offset;
3702     params_base = (GLfixed *)
3703         _env->GetIntArrayElements(params_ref, (jboolean *)0);
3704     params = params_base + offset;
3705 
3706     glTexGenxvOES(
3707         (GLenum)coord,
3708         (GLenum)pname,
3709         (GLfixed *)params
3710     );
3711 
3712 exit:
3713     if (params_base) {
3714         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3715             JNI_ABORT);
3716     }
3717     if (_exception) {
3718         jniThrowException(_env, _exceptionType, _exceptionMessage);
3719     }
3720 }
3721 
3722 /* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3723 static void
android_glTexGenxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)3724 android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3725   (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
3726     jint _exception = 0;
3727     const char * _exceptionType = NULL;
3728     const char * _exceptionMessage = NULL;
3729     jintArray _array = (jintArray) 0;
3730     jint _bufferOffset = (jint) 0;
3731     jint _remaining;
3732     GLfixed *params = (GLfixed *) 0;
3733 
3734     if (!params_buf) {
3735         _exception = 1;
3736         _exceptionType = "java/lang/IllegalArgumentException";
3737         _exceptionMessage = "params == null";
3738         goto exit;
3739     }
3740     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3741     if (params == NULL) {
3742         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3743         params = (GLfixed *) (_paramsBase + _bufferOffset);
3744     }
3745     glTexGenxvOES(
3746         (GLenum)coord,
3747         (GLenum)pname,
3748         (GLfixed *)params
3749     );
3750 
3751 exit:
3752     if (_array) {
3753         _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
3754     }
3755     if (_exception) {
3756         jniThrowException(_env, _exceptionType, _exceptionMessage);
3757     }
3758 }
3759 
3760 /* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3761 static void
android_glGetTexGenfvOES__II_3FI(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloatArray params_ref,jint offset)3762 android_glGetTexGenfvOES__II_3FI
3763   (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
3764     jint _exception = 0;
3765     const char * _exceptionType = NULL;
3766     const char * _exceptionMessage = NULL;
3767     GLfloat *params_base = (GLfloat *) 0;
3768     jint _remaining;
3769     GLfloat *params = (GLfloat *) 0;
3770 
3771     if (!params_ref) {
3772         _exception = 1;
3773         _exceptionType = "java/lang/IllegalArgumentException";
3774         _exceptionMessage = "params == null";
3775         goto exit;
3776     }
3777     if (offset < 0) {
3778         _exception = 1;
3779         _exceptionType = "java/lang/IllegalArgumentException";
3780         _exceptionMessage = "offset < 0";
3781         goto exit;
3782     }
3783     _remaining = _env->GetArrayLength(params_ref) - offset;
3784     params_base = (GLfloat *)
3785         _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3786     params = params_base + offset;
3787 
3788     glGetTexGenfvOES(
3789         (GLenum)coord,
3790         (GLenum)pname,
3791         (GLfloat *)params
3792     );
3793 
3794 exit:
3795     if (params_base) {
3796         _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3797             _exception ? JNI_ABORT: 0);
3798     }
3799     if (_exception) {
3800         jniThrowException(_env, _exceptionType, _exceptionMessage);
3801     }
3802 }
3803 
3804 /* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3805 static void
android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)3806 android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3807   (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
3808     jint _exception = 0;
3809     const char * _exceptionType = NULL;
3810     const char * _exceptionMessage = NULL;
3811     jfloatArray _array = (jfloatArray) 0;
3812     jint _bufferOffset = (jint) 0;
3813     jint _remaining;
3814     GLfloat *params = (GLfloat *) 0;
3815 
3816     if (!params_buf) {
3817         _exception = 1;
3818         _exceptionType = "java/lang/IllegalArgumentException";
3819         _exceptionMessage = "params == null";
3820         goto exit;
3821     }
3822     params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3823     if (params == NULL) {
3824         char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3825         params = (GLfloat *) (_paramsBase + _bufferOffset);
3826     }
3827     glGetTexGenfvOES(
3828         (GLenum)coord,
3829         (GLenum)pname,
3830         (GLfloat *)params
3831     );
3832 
3833 exit:
3834     if (_array) {
3835         _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3836     }
3837     if (_exception) {
3838         jniThrowException(_env, _exceptionType, _exceptionMessage);
3839     }
3840 }
3841 
3842 /* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3843 static void
android_glGetTexGenivOES__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)3844 android_glGetTexGenivOES__II_3II
3845   (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
3846     jint _exception = 0;
3847     const char * _exceptionType = NULL;
3848     const char * _exceptionMessage = NULL;
3849     GLint *params_base = (GLint *) 0;
3850     jint _remaining;
3851     GLint *params = (GLint *) 0;
3852 
3853     if (!params_ref) {
3854         _exception = 1;
3855         _exceptionType = "java/lang/IllegalArgumentException";
3856         _exceptionMessage = "params == null";
3857         goto exit;
3858     }
3859     if (offset < 0) {
3860         _exception = 1;
3861         _exceptionType = "java/lang/IllegalArgumentException";
3862         _exceptionMessage = "offset < 0";
3863         goto exit;
3864     }
3865     _remaining = _env->GetArrayLength(params_ref) - offset;
3866     params_base = (GLint *)
3867         _env->GetIntArrayElements(params_ref, (jboolean *)0);
3868     params = params_base + offset;
3869 
3870     glGetTexGenivOES(
3871         (GLenum)coord,
3872         (GLenum)pname,
3873         (GLint *)params
3874     );
3875 
3876 exit:
3877     if (params_base) {
3878         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3879             _exception ? JNI_ABORT: 0);
3880     }
3881     if (_exception) {
3882         jniThrowException(_env, _exceptionType, _exceptionMessage);
3883     }
3884 }
3885 
3886 /* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3887 static void
android_glGetTexGenivOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)3888 android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3889   (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
3890     jint _exception = 0;
3891     const char * _exceptionType = NULL;
3892     const char * _exceptionMessage = NULL;
3893     jintArray _array = (jintArray) 0;
3894     jint _bufferOffset = (jint) 0;
3895     jint _remaining;
3896     GLint *params = (GLint *) 0;
3897 
3898     if (!params_buf) {
3899         _exception = 1;
3900         _exceptionType = "java/lang/IllegalArgumentException";
3901         _exceptionMessage = "params == null";
3902         goto exit;
3903     }
3904     params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3905     if (params == NULL) {
3906         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3907         params = (GLint *) (_paramsBase + _bufferOffset);
3908     }
3909     glGetTexGenivOES(
3910         (GLenum)coord,
3911         (GLenum)pname,
3912         (GLint *)params
3913     );
3914 
3915 exit:
3916     if (_array) {
3917         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3918     }
3919     if (_exception) {
3920         jniThrowException(_env, _exceptionType, _exceptionMessage);
3921     }
3922 }
3923 
3924 /* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3925 static void
android_glGetTexGenxvOES__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)3926 android_glGetTexGenxvOES__II_3II
3927   (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
3928     jint _exception = 0;
3929     const char * _exceptionType = NULL;
3930     const char * _exceptionMessage = NULL;
3931     GLfixed *params_base = (GLfixed *) 0;
3932     jint _remaining;
3933     GLfixed *params = (GLfixed *) 0;
3934 
3935     if (!params_ref) {
3936         _exception = 1;
3937         _exceptionType = "java/lang/IllegalArgumentException";
3938         _exceptionMessage = "params == null";
3939         goto exit;
3940     }
3941     if (offset < 0) {
3942         _exception = 1;
3943         _exceptionType = "java/lang/IllegalArgumentException";
3944         _exceptionMessage = "offset < 0";
3945         goto exit;
3946     }
3947     _remaining = _env->GetArrayLength(params_ref) - offset;
3948     params_base = (GLfixed *)
3949         _env->GetIntArrayElements(params_ref, (jboolean *)0);
3950     params = params_base + offset;
3951 
3952     glGetTexGenxvOES(
3953         (GLenum)coord,
3954         (GLenum)pname,
3955         (GLfixed *)params
3956     );
3957 
3958 exit:
3959     if (params_base) {
3960         _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3961             _exception ? JNI_ABORT: 0);
3962     }
3963     if (_exception) {
3964         jniThrowException(_env, _exceptionType, _exceptionMessage);
3965     }
3966 }
3967 
3968 /* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3969 static void
android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)3970 android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3971   (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
3972     jint _exception = 0;
3973     const char * _exceptionType = NULL;
3974     const char * _exceptionMessage = NULL;
3975     jintArray _array = (jintArray) 0;
3976     jint _bufferOffset = (jint) 0;
3977     jint _remaining;
3978     GLfixed *params = (GLfixed *) 0;
3979 
3980     if (!params_buf) {
3981         _exception = 1;
3982         _exceptionType = "java/lang/IllegalArgumentException";
3983         _exceptionMessage = "params == null";
3984         goto exit;
3985     }
3986     params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3987     if (params == NULL) {
3988         char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3989         params = (GLfixed *) (_paramsBase + _bufferOffset);
3990     }
3991     glGetTexGenxvOES(
3992         (GLenum)coord,
3993         (GLenum)pname,
3994         (GLfixed *)params
3995     );
3996 
3997 exit:
3998     if (_array) {
3999         _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
4000     }
4001     if (_exception) {
4002         jniThrowException(_env, _exceptionType, _exceptionMessage);
4003     }
4004 }
4005 
4006 static const char *classPathName = "android/opengl/GLES11Ext";
4007 
4008 static const JNINativeMethod methods[] = {
4009 {"_nativeClassInit", "()V", (void*)nativeClassInit },
4010 {"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
4011 {"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
4012 {"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
4013 {"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
4014 {"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
4015 {"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
4016 {"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
4017 {"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
4018 {"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
4019 {"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
4020 {"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
4021 {"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
4022 {"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
4023 {"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
4024 {"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
4025 {"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
4026 {"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
4027 {"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
4028 {"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
4029 {"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
4030 {"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
4031 {"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
4032 {"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
4033 {"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
4034 {"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
4035 {"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
4036 {"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
4037 {"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
4038 {"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
4039 {"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
4040 {"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
4041 {"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
4042 {"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
4043 {"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
4044 {"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
4045 {"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
4046 {"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
4047 {"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4048 {"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
4049 {"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4050 {"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
4051 {"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
4052 {"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
4053 {"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
4054 {"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
4055 {"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
4056 {"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
4057 {"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
4058 {"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
4059 {"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
4060 {"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
4061 {"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
4062 {"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
4063 {"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
4064 {"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
4065 {"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
4066 {"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
4067 {"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
4068 {"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
4069 {"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
4070 {"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
4071 {"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
4072 {"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
4073 {"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
4074 {"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
4075 {"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
4076 {"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
4077 {"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4078 {"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
4079 {"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
4080 {"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4081 {"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
4082 {"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
4083 {"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
4084 {"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
4085 {"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4086 {"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
4087 {"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4088 {"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
4089 {"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
4090 {"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
4091 {"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
4092 {"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
4093 {"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
4094 {"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
4095 {"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
4096 {"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
4097 {"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
4098 {"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
4099 {"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
4100 {"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
4101 {"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
4102 {"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
4103 {"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
4104 {"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
4105 {"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
4106 {"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
4107 {"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
4108 {"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
4109 {"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
4110 {"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
4111 {"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4112 {"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
4113 {"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4114 {"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
4115 {"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
4116 {"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
4117 {"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4118 {"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
4119 {"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
4120 {"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
4121 {"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
4122 {"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
4123 {"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
4124 {"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
4125 {"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4126 {"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
4127 {"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
4128 {"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
4129 {"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
4130 };
4131 
register_android_opengl_jni_GLES11Ext(JNIEnv * _env)4132 int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
4133 {
4134     int err;
4135     err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
4136     return err;
4137 }
4138