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