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