blob: 09dce32b9e56bd572751404d8730847d5b1dec09 [file] [log] [blame]
Jack Palevich27f80022009-04-15 19:13:17 -07001/*
2**
3** Copyright 2009, The Android Open Source Project
4**
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07005** 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
Jack Palevich27f80022009-04-15 19:13:17 -07008**
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07009** http://www.apache.org/licenses/LICENSE-2.0
Jack Palevich27f80022009-04-15 19:13:17 -070010**
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070011** 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
Jack Palevich27f80022009-04-15 19:13:17 -070015** limitations under the License.
16*/
17
18// This source file is automatically generated
19
Andreas Gampebfe63332014-11-12 14:12:45 -080020#pragma GCC diagnostic ignored "-Wunused-variable"
Andreas Gampebfe63332014-11-12 14:12:45 -080021#pragma GCC diagnostic ignored "-Wunused-function"
22
Mathias Agopian2ad04772013-02-23 03:12:30 -080023#include <GLES/gl.h>
24#include <GLES/glext.h>
25
Jesse Hall9626f822014-05-19 20:57:49 -070026#include <jni.h>
Steven Moreland2279b252017-07-19 09:50:45 -070027#include <nativehelper/JNIHelp.h>
Jack Palevich27f80022009-04-15 19:13:17 -070028#include <android_runtime/AndroidRuntime.h>
29#include <utils/misc.h>
Jack Palevich27f80022009-04-15 19:13:17 -070030#include <assert.h>
Jack Palevichbe6eac82009-12-08 15:43:51 +080031
Jack Palevich27f80022009-04-15 19:13:17 -070032static int initialized = 0;
33
34static jclass nioAccessClass;
35static jclass bufferClass;
Jack Palevich27f80022009-04-15 19:13:17 -070036static jmethodID getBasePointerID;
37static jmethodID getBaseArrayID;
38static jmethodID getBaseArrayOffsetID;
39static jfieldID positionID;
40static jfieldID limitID;
41static jfieldID elementSizeShiftID;
42
Mathias Agopian2ad04772013-02-23 03:12:30 -080043
44/* special calls implemented in Android's GLES wrapper used to more
45 * efficiently bound-check passed arrays */
46extern "C" {
47#ifdef GL_VERSION_ES_CM_1_1
48GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
49 const GLvoid *ptr, GLsizei count);
50GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
51 const GLvoid *pointer, GLsizei count);
52GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
53 GLsizei stride, const GLvoid *pointer, GLsizei count);
54GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
55 GLsizei stride, const GLvoid *pointer, GLsizei count);
56GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
57 GLsizei stride, const GLvoid *pointer, GLsizei count);
58GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
59 GLsizei stride, const GLvoid *pointer, GLsizei count);
60GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
61 GLsizei stride, const GLvoid *pointer, GLsizei count);
62#endif
63#ifdef GL_ES_VERSION_2_0
64static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
65 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
66 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
67}
68#endif
Andy McFaddencee51982013-04-25 16:08:31 -070069#ifdef GL_ES_VERSION_3_0
70static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
71 GLsizei stride, const GLvoid *pointer, GLsizei count) {
72 glVertexAttribIPointer(indx, size, type, stride, pointer);
73}
74#endif
Mathias Agopian2ad04772013-02-23 03:12:30 -080075}
76
Jack Palevich27f80022009-04-15 19:13:17 -070077/* Cache method IDs each time the class is loaded. */
78
79static void
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070080nativeClassInit(JNIEnv *_env, jclass glImplClass)
Jack Palevich27f80022009-04-15 19:13:17 -070081{
82 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
83 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
84
85 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
86 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
87
88 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
89 "getBasePointer", "(Ljava/nio/Buffer;)J");
90 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
91 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
92 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
93 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
94
95 positionID = _env->GetFieldID(bufferClass, "position", "I");
96 limitID = _env->GetFieldID(bufferClass, "limit", "I");
97 elementSizeShiftID =
98 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
99}
100
Jack Palevich27f80022009-04-15 19:13:17 -0700101static void *
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700102getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
Jack Palevich27f80022009-04-15 19:13:17 -0700103{
104 jint position;
105 jint limit;
106 jint elementSizeShift;
107 jlong pointer;
Jack Palevich27f80022009-04-15 19:13:17 -0700108
109 position = _env->GetIntField(buffer, positionID);
110 limit = _env->GetIntField(buffer, limitID);
111 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
112 *remaining = (limit - position) << elementSizeShift;
113 pointer = _env->CallStaticLongMethod(nioAccessClass,
114 getBasePointerID, buffer);
115 if (pointer != 0L) {
116 *array = NULL;
Ashok Bhat01c26ea2014-02-24 09:49:07 +0000117 return reinterpret_cast<void*>(pointer);
Jack Palevich27f80022009-04-15 19:13:17 -0700118 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700119
Jack Palevich27f80022009-04-15 19:13:17 -0700120 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
121 getBaseArrayID, buffer);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700122 *offset = _env->CallStaticIntMethod(nioAccessClass,
Jack Palevich27f80022009-04-15 19:13:17 -0700123 getBaseArrayOffsetID, buffer);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800124
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700125 return NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700126}
127
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700128class ByteArrayGetter {
129public:
130 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
131 return _env->GetByteArrayElements(array, is_copy);
132 }
133};
134class BooleanArrayGetter {
135public:
136 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
137 return _env->GetBooleanArrayElements(array, is_copy);
138 }
139};
140class CharArrayGetter {
141public:
142 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
143 return _env->GetCharArrayElements(array, is_copy);
144 }
145};
146class ShortArrayGetter {
147public:
148 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
149 return _env->GetShortArrayElements(array, is_copy);
150 }
151};
152class IntArrayGetter {
153public:
154 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
155 return _env->GetIntArrayElements(array, is_copy);
156 }
157};
158class LongArrayGetter {
159public:
160 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
161 return _env->GetLongArrayElements(array, is_copy);
162 }
163};
164class FloatArrayGetter {
165public:
166 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
167 return _env->GetFloatArrayElements(array, is_copy);
168 }
169};
170class DoubleArrayGetter {
171public:
172 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
173 return _env->GetDoubleArrayElements(array, is_copy);
174 }
175};
176
177template<typename JTYPEARRAY, typename ARRAYGETTER>
178static void*
179getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
180 return ARRAYGETTER::Get(_env, array, is_copy);
181}
182
183class ByteArrayReleaser {
184public:
185 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
186 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
187 }
188};
189class BooleanArrayReleaser {
190public:
191 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
192 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
193 }
194};
195class CharArrayReleaser {
196public:
197 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
198 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
199 }
200};
201class ShortArrayReleaser {
202public:
203 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
204 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
205 }
206};
207class IntArrayReleaser {
208public:
209 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
210 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
211 }
212};
213class LongArrayReleaser {
214public:
215 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
216 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
217 }
218};
219class FloatArrayReleaser {
220public:
221 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
222 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
223 }
224};
225class DoubleArrayReleaser {
226public:
227 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
228 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
229 }
230};
231
232template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
233static void
234releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
235 ARRAYRELEASER::Release(_env, array, data, commit);
236}
237
Jack Palevich27f80022009-04-15 19:13:17 -0700238static void
239releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
240{
241 _env->ReleasePrimitiveArrayCritical(array, data,
Mathias Agopian2ad04772013-02-23 03:12:30 -0800242 commit ? 0 : JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700243}
244
Jack Palevichbe6eac82009-12-08 15:43:51 +0800245static void *
246getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
247 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
248 if (buf) {
249 jint position = _env->GetIntField(buffer, positionID);
250 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
251 buf += position << elementSizeShift;
252 } else {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700253 jniThrowException(_env, "java/lang/IllegalArgumentException",
254 "Must use a native order direct Buffer");
Jack Palevichbe6eac82009-12-08 15:43:51 +0800255 }
256 return (void*) buf;
257}
Mathias Agopian2ad04772013-02-23 03:12:30 -0800258
259// --------------------------------------------------------------------------
260
261/*
262 * returns the number of values glGet returns for a given pname.
263 *
264 * The code below is written such that pnames requiring only one values
265 * are the default (and are not explicitely tested for). This makes the
266 * checking code much shorter/readable/efficient.
267 *
268 * This means that unknown pnames (e.g.: extensions) will default to 1. If
269 * that unknown pname needs more than 1 value, then the validation check
270 * is incomplete and the app may crash if it passed the wrong number params.
271 */
272static int getNeededCount(GLint pname) {
273 int needed = 1;
Romain Guydc43a6c2017-02-17 19:54:25 -0800274#ifdef GL_ES_VERSION_3_0
275 // GLES 3.x pnames
276 switch (pname) {
277 case GL_MAX_VIEWPORT_DIMS:
278 needed = 2;
279 break;
280
281 case GL_PROGRAM_BINARY_FORMATS:
282 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
283 break;
284 }
285#endif
286
Mathias Agopian2ad04772013-02-23 03:12:30 -0800287#ifdef GL_ES_VERSION_2_0
288 // GLES 2.x pnames
289 switch (pname) {
290 case GL_ALIASED_LINE_WIDTH_RANGE:
291 case GL_ALIASED_POINT_SIZE_RANGE:
292 needed = 2;
293 break;
294
295 case GL_BLEND_COLOR:
296 case GL_COLOR_CLEAR_VALUE:
297 case GL_COLOR_WRITEMASK:
298 case GL_SCISSOR_BOX:
299 case GL_VIEWPORT:
300 needed = 4;
301 break;
302
303 case GL_COMPRESSED_TEXTURE_FORMATS:
304 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
305 break;
306
307 case GL_SHADER_BINARY_FORMATS:
308 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
309 break;
310 }
311#endif
312
313#ifdef GL_VERSION_ES_CM_1_1
314 // GLES 1.x pnames
315 switch (pname) {
316 case GL_ALIASED_LINE_WIDTH_RANGE:
317 case GL_ALIASED_POINT_SIZE_RANGE:
318 case GL_DEPTH_RANGE:
319 case GL_SMOOTH_LINE_WIDTH_RANGE:
320 case GL_SMOOTH_POINT_SIZE_RANGE:
321 needed = 2;
322 break;
323
324 case GL_CURRENT_NORMAL:
325 case GL_POINT_DISTANCE_ATTENUATION:
326 needed = 3;
327 break;
328
329 case GL_COLOR_CLEAR_VALUE:
330 case GL_COLOR_WRITEMASK:
331 case GL_CURRENT_COLOR:
332 case GL_CURRENT_TEXTURE_COORDS:
333 case GL_FOG_COLOR:
334 case GL_LIGHT_MODEL_AMBIENT:
335 case GL_SCISSOR_BOX:
336 case GL_VIEWPORT:
337 needed = 4;
338 break;
339
340 case GL_MODELVIEW_MATRIX:
341 case GL_PROJECTION_MATRIX:
342 case GL_TEXTURE_MATRIX:
343 needed = 16;
344 break;
345
346 case GL_COMPRESSED_TEXTURE_FORMATS:
347 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
348 break;
349 }
350#endif
351 return needed;
352}
353
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700354template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
355 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800356static void
357get
358 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
359 jint _exception = 0;
360 const char * _exceptionType;
361 const char * _exceptionMessage;
362 CTYPE *params_base = (CTYPE *) 0;
363 jint _remaining;
364 CTYPE *params = (CTYPE *) 0;
365 int _needed = 0;
366
367 if (!params_ref) {
368 _exception = 1;
369 _exceptionType = "java/lang/IllegalArgumentException";
370 _exceptionMessage = "params == null";
371 goto exit;
372 }
373 if (offset < 0) {
374 _exception = 1;
375 _exceptionType = "java/lang/IllegalArgumentException";
376 _exceptionMessage = "offset < 0";
377 goto exit;
378 }
379 _remaining = _env->GetArrayLength(params_ref) - offset;
380 _needed = getNeededCount(pname);
381 // if we didn't find this pname, we just assume the user passed
382 // an array of the right size -- this might happen with extensions
383 // or if we forget an enum here.
384 if (_remaining < _needed) {
385 _exception = 1;
386 _exceptionType = "java/lang/IllegalArgumentException";
387 _exceptionMessage = "length - offset < needed";
388 goto exit;
389 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700390 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
391 _env, params_ref, (jboolean *)0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800392 params = params_base + offset;
393
394 GET(
395 (GLenum)pname,
396 (CTYPE *)params
397 );
398
399exit:
400 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700401 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
402 _env, params_ref, params_base, !_exception);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800403 }
404 if (_exception) {
405 jniThrowException(_env, _exceptionType, _exceptionMessage);
406 }
407}
408
409
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700410template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
411 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800412static void
413getarray
414 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
415 jint _exception = 0;
416 const char * _exceptionType;
417 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700418 JTYPEARRAY _array = (JTYPEARRAY) 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800419 jint _bufferOffset = (jint) 0;
420 jint _remaining;
421 CTYPE *params = (CTYPE *) 0;
422 int _needed = 0;
423
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700424 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Andy McFaddencee51982013-04-25 16:08:31 -0700425 _remaining /= sizeof(CTYPE); // convert from bytes to item count
Mathias Agopian2ad04772013-02-23 03:12:30 -0800426 _needed = getNeededCount(pname);
427 // if we didn't find this pname, we just assume the user passed
428 // an array of the right size -- this might happen with extensions
429 // or if we forget an enum here.
430 if (_needed>0 && _remaining < _needed) {
431 _exception = 1;
432 _exceptionType = "java/lang/IllegalArgumentException";
433 _exceptionMessage = "remaining() < needed";
434 goto exit;
435 }
436 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700437 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
438 _env, _array, (jboolean *) 0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800439 params = (CTYPE *) (_paramsBase + _bufferOffset);
440 }
441 GET(
442 (GLenum)pname,
443 (CTYPE *)params
444 );
445
446exit:
447 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700448 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
449 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800450 }
451 if (_exception) {
452 jniThrowException(_env, _exceptionType, _exceptionMessage);
453 }
454}
455
Jack Palevich27f80022009-04-15 19:13:17 -0700456// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700457/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
458static void
459android_glBlendEquationSeparateOES__II
460 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700461 glBlendEquationSeparateOES(
462 (GLenum)modeRGB,
463 (GLenum)modeAlpha
464 );
Jack Palevich27f80022009-04-15 19:13:17 -0700465}
466
467/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
468static void
469android_glBlendFuncSeparateOES__IIII
470 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700471 glBlendFuncSeparateOES(
472 (GLenum)srcRGB,
473 (GLenum)dstRGB,
474 (GLenum)srcAlpha,
475 (GLenum)dstAlpha
476 );
Jack Palevich27f80022009-04-15 19:13:17 -0700477}
478
479/* void glBlendEquationOES ( GLenum mode ) */
480static void
481android_glBlendEquationOES__I
482 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700483 glBlendEquationOES(
484 (GLenum)mode
485 );
Jack Palevich27f80022009-04-15 19:13:17 -0700486}
487
488/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
489static void
490android_glDrawTexsOES__SSSSS
491 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
492 glDrawTexsOES(
493 (GLshort)x,
494 (GLshort)y,
495 (GLshort)z,
496 (GLshort)width,
497 (GLshort)height
498 );
499}
500
501/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
502static void
503android_glDrawTexiOES__IIIII
504 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
505 glDrawTexiOES(
506 (GLint)x,
507 (GLint)y,
508 (GLint)z,
509 (GLint)width,
510 (GLint)height
511 );
512}
513
514/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
515static void
516android_glDrawTexxOES__IIIII
517 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
518 glDrawTexxOES(
519 (GLfixed)x,
520 (GLfixed)y,
521 (GLfixed)z,
522 (GLfixed)width,
523 (GLfixed)height
524 );
525}
526
527/* void glDrawTexsvOES ( const GLshort *coords ) */
528static void
529android_glDrawTexsvOES___3SI
530 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700531 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800532 const char * _exceptionType = NULL;
533 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700534 GLshort *coords_base = (GLshort *) 0;
535 jint _remaining;
536 GLshort *coords = (GLshort *) 0;
537
538 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700539 _exception = 1;
540 _exceptionType = "java/lang/IllegalArgumentException";
541 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700542 goto exit;
543 }
544 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700545 _exception = 1;
546 _exceptionType = "java/lang/IllegalArgumentException";
547 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700548 goto exit;
549 }
550 _remaining = _env->GetArrayLength(coords_ref) - offset;
551 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700552 _exception = 1;
553 _exceptionType = "java/lang/IllegalArgumentException";
554 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700555 goto exit;
556 }
557 coords_base = (GLshort *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700558 _env->GetShortArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700559 coords = coords_base + offset;
560
561 glDrawTexsvOES(
562 (GLshort *)coords
563 );
564
565exit:
566 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700567 _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700568 JNI_ABORT);
569 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700570 if (_exception) {
571 jniThrowException(_env, _exceptionType, _exceptionMessage);
572 }
Jack Palevich27f80022009-04-15 19:13:17 -0700573}
574
575/* void glDrawTexsvOES ( const GLshort *coords ) */
576static void
577android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
578 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700579 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800580 const char * _exceptionType = NULL;
581 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700582 jshortArray _array = (jshortArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700583 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700584 jint _remaining;
585 GLshort *coords = (GLshort *) 0;
586
Romain Guy84cac202016-12-05 12:26:02 -0800587 if (!coords_buf) {
588 _exception = 1;
589 _exceptionType = "java/lang/IllegalArgumentException";
590 _exceptionMessage = "coords == null";
591 goto exit;
592 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700593 coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700594 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700595 _exception = 1;
596 _exceptionType = "java/lang/IllegalArgumentException";
597 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700598 goto exit;
599 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700600 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700601 char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700602 coords = (GLshort *) (_coordsBase + _bufferOffset);
603 }
Jack Palevich27f80022009-04-15 19:13:17 -0700604 glDrawTexsvOES(
605 (GLshort *)coords
606 );
607
608exit:
609 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700610 _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700611 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700612 if (_exception) {
613 jniThrowException(_env, _exceptionType, _exceptionMessage);
614 }
Jack Palevich27f80022009-04-15 19:13:17 -0700615}
616
617/* void glDrawTexivOES ( const GLint *coords ) */
618static void
619android_glDrawTexivOES___3II
620 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700621 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800622 const char * _exceptionType = NULL;
623 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700624 GLint *coords_base = (GLint *) 0;
625 jint _remaining;
626 GLint *coords = (GLint *) 0;
627
628 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700629 _exception = 1;
630 _exceptionType = "java/lang/IllegalArgumentException";
631 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700632 goto exit;
633 }
634 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700635 _exception = 1;
636 _exceptionType = "java/lang/IllegalArgumentException";
637 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700638 goto exit;
639 }
640 _remaining = _env->GetArrayLength(coords_ref) - offset;
641 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700642 _exception = 1;
643 _exceptionType = "java/lang/IllegalArgumentException";
644 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700645 goto exit;
646 }
647 coords_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700648 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700649 coords = coords_base + offset;
650
651 glDrawTexivOES(
652 (GLint *)coords
653 );
654
655exit:
656 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700657 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700658 JNI_ABORT);
659 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700660 if (_exception) {
661 jniThrowException(_env, _exceptionType, _exceptionMessage);
662 }
Jack Palevich27f80022009-04-15 19:13:17 -0700663}
664
665/* void glDrawTexivOES ( const GLint *coords ) */
666static void
667android_glDrawTexivOES__Ljava_nio_IntBuffer_2
668 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700669 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800670 const char * _exceptionType = NULL;
671 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700672 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700673 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700674 jint _remaining;
675 GLint *coords = (GLint *) 0;
676
Romain Guy84cac202016-12-05 12:26:02 -0800677 if (!coords_buf) {
678 _exception = 1;
679 _exceptionType = "java/lang/IllegalArgumentException";
680 _exceptionMessage = "coords == null";
681 goto exit;
682 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700683 coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700684 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700685 _exception = 1;
686 _exceptionType = "java/lang/IllegalArgumentException";
687 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700688 goto exit;
689 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700690 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700691 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700692 coords = (GLint *) (_coordsBase + _bufferOffset);
693 }
Jack Palevich27f80022009-04-15 19:13:17 -0700694 glDrawTexivOES(
695 (GLint *)coords
696 );
697
698exit:
699 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700700 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700701 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700702 if (_exception) {
703 jniThrowException(_env, _exceptionType, _exceptionMessage);
704 }
Jack Palevich27f80022009-04-15 19:13:17 -0700705}
706
707/* void glDrawTexxvOES ( const GLfixed *coords ) */
708static void
709android_glDrawTexxvOES___3II
710 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700711 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800712 const char * _exceptionType = NULL;
713 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700714 GLfixed *coords_base = (GLfixed *) 0;
715 jint _remaining;
716 GLfixed *coords = (GLfixed *) 0;
717
718 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700719 _exception = 1;
720 _exceptionType = "java/lang/IllegalArgumentException";
721 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700722 goto exit;
723 }
724 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700725 _exception = 1;
726 _exceptionType = "java/lang/IllegalArgumentException";
727 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700728 goto exit;
729 }
730 _remaining = _env->GetArrayLength(coords_ref) - offset;
731 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700732 _exception = 1;
733 _exceptionType = "java/lang/IllegalArgumentException";
734 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700735 goto exit;
736 }
737 coords_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700738 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700739 coords = coords_base + offset;
740
741 glDrawTexxvOES(
742 (GLfixed *)coords
743 );
744
745exit:
746 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700747 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700748 JNI_ABORT);
749 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700750 if (_exception) {
751 jniThrowException(_env, _exceptionType, _exceptionMessage);
752 }
Jack Palevich27f80022009-04-15 19:13:17 -0700753}
754
755/* void glDrawTexxvOES ( const GLfixed *coords ) */
756static void
757android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
758 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700759 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800760 const char * _exceptionType = NULL;
761 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700762 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700763 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700764 jint _remaining;
765 GLfixed *coords = (GLfixed *) 0;
766
Romain Guy84cac202016-12-05 12:26:02 -0800767 if (!coords_buf) {
768 _exception = 1;
769 _exceptionType = "java/lang/IllegalArgumentException";
770 _exceptionMessage = "coords == null";
771 goto exit;
772 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700773 coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700774 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700775 _exception = 1;
776 _exceptionType = "java/lang/IllegalArgumentException";
777 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700778 goto exit;
779 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700780 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700781 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700782 coords = (GLfixed *) (_coordsBase + _bufferOffset);
783 }
Jack Palevich27f80022009-04-15 19:13:17 -0700784 glDrawTexxvOES(
785 (GLfixed *)coords
786 );
787
788exit:
789 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700790 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700791 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700792 if (_exception) {
793 jniThrowException(_env, _exceptionType, _exceptionMessage);
794 }
Jack Palevich27f80022009-04-15 19:13:17 -0700795}
796
797/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
798static void
799android_glDrawTexfOES__FFFFF
800 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
801 glDrawTexfOES(
802 (GLfloat)x,
803 (GLfloat)y,
804 (GLfloat)z,
805 (GLfloat)width,
806 (GLfloat)height
807 );
808}
809
810/* void glDrawTexfvOES ( const GLfloat *coords ) */
811static void
812android_glDrawTexfvOES___3FI
813 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700814 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800815 const char * _exceptionType = NULL;
816 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700817 GLfloat *coords_base = (GLfloat *) 0;
818 jint _remaining;
819 GLfloat *coords = (GLfloat *) 0;
820
821 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700822 _exception = 1;
823 _exceptionType = "java/lang/IllegalArgumentException";
824 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700825 goto exit;
826 }
827 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700828 _exception = 1;
829 _exceptionType = "java/lang/IllegalArgumentException";
830 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700831 goto exit;
832 }
833 _remaining = _env->GetArrayLength(coords_ref) - offset;
834 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700835 _exception = 1;
836 _exceptionType = "java/lang/IllegalArgumentException";
837 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700838 goto exit;
839 }
840 coords_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700841 _env->GetFloatArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700842 coords = coords_base + offset;
843
844 glDrawTexfvOES(
845 (GLfloat *)coords
846 );
847
848exit:
849 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700850 _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700851 JNI_ABORT);
852 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700853 if (_exception) {
854 jniThrowException(_env, _exceptionType, _exceptionMessage);
855 }
Jack Palevich27f80022009-04-15 19:13:17 -0700856}
857
858/* void glDrawTexfvOES ( const GLfloat *coords ) */
859static void
860android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
861 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700862 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800863 const char * _exceptionType = NULL;
864 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700865 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700866 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700867 jint _remaining;
868 GLfloat *coords = (GLfloat *) 0;
869
Romain Guy84cac202016-12-05 12:26:02 -0800870 if (!coords_buf) {
871 _exception = 1;
872 _exceptionType = "java/lang/IllegalArgumentException";
873 _exceptionMessage = "coords == null";
874 goto exit;
875 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700876 coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700877 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700878 _exception = 1;
879 _exceptionType = "java/lang/IllegalArgumentException";
880 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700881 goto exit;
882 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700883 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700884 char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700885 coords = (GLfloat *) (_coordsBase + _bufferOffset);
886 }
Jack Palevich27f80022009-04-15 19:13:17 -0700887 glDrawTexfvOES(
888 (GLfloat *)coords
889 );
890
891exit:
892 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700893 _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700894 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700895 if (_exception) {
896 jniThrowException(_env, _exceptionType, _exceptionMessage);
897 }
Jack Palevich27f80022009-04-15 19:13:17 -0700898}
899
900/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
901static void
902android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
903 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800904 jint _exception = 0;
905 const char * _exceptionType = NULL;
906 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700907 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700908 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700909 jint _remaining;
910 GLeglImageOES image = (GLeglImageOES) 0;
911
Romain Guy84cac202016-12-05 12:26:02 -0800912 if (!image_buf) {
913 _exception = 1;
914 _exceptionType = "java/lang/IllegalArgumentException";
915 _exceptionMessage = "image == null";
916 goto exit;
917 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700918 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700919 if (image == NULL) {
920 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
921 image = (GLeglImageOES) (_imageBase + _bufferOffset);
922 }
Jack Palevicha3795852009-04-24 10:35:11 -0700923 glEGLImageTargetTexture2DOES(
924 (GLenum)target,
925 (GLeglImageOES)image
926 );
Romain Guy84cac202016-12-05 12:26:02 -0800927
928exit:
Jack Palevicha3795852009-04-24 10:35:11 -0700929 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800930 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
931 }
932 if (_exception) {
933 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -0700934 }
Jack Palevich27f80022009-04-15 19:13:17 -0700935}
936
937/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
938static void
939android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
940 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800941 jint _exception = 0;
942 const char * _exceptionType = NULL;
943 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700944 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700945 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700946 jint _remaining;
947 GLeglImageOES image = (GLeglImageOES) 0;
948
Romain Guy84cac202016-12-05 12:26:02 -0800949 if (!image_buf) {
950 _exception = 1;
951 _exceptionType = "java/lang/IllegalArgumentException";
952 _exceptionMessage = "image == null";
953 goto exit;
954 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700955 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700956 if (image == NULL) {
957 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
958 image = (GLeglImageOES) (_imageBase + _bufferOffset);
959 }
Jack Palevicha3795852009-04-24 10:35:11 -0700960 glEGLImageTargetRenderbufferStorageOES(
961 (GLenum)target,
962 (GLeglImageOES)image
963 );
Romain Guy84cac202016-12-05 12:26:02 -0800964
965exit:
Jack Palevicha3795852009-04-24 10:35:11 -0700966 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800967 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
968 }
969 if (_exception) {
970 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -0700971 }
Jack Palevich27f80022009-04-15 19:13:17 -0700972}
973
974/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
975static void
976android_glAlphaFuncxOES__II
977 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700978 glAlphaFuncxOES(
979 (GLenum)func,
980 (GLclampx)ref
981 );
Jack Palevich27f80022009-04-15 19:13:17 -0700982}
983
984/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
985static void
986android_glClearColorxOES__IIII
987 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700988 glClearColorxOES(
989 (GLclampx)red,
990 (GLclampx)green,
991 (GLclampx)blue,
992 (GLclampx)alpha
993 );
Jack Palevich27f80022009-04-15 19:13:17 -0700994}
995
996/* void glClearDepthxOES ( GLclampx depth ) */
997static void
998android_glClearDepthxOES__I
999 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07001000 glClearDepthxOES(
1001 (GLclampx)depth
1002 );
Jack Palevich27f80022009-04-15 19:13:17 -07001003}
1004
1005/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
1006static void
1007android_glClipPlanexOES__I_3II
1008 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001009 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001010 const char * _exceptionType = NULL;
1011 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001012 GLfixed *equation_base = (GLfixed *) 0;
1013 jint _remaining;
1014 GLfixed *equation = (GLfixed *) 0;
1015
1016 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001017 _exception = 1;
1018 _exceptionType = "java/lang/IllegalArgumentException";
1019 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001020 goto exit;
1021 }
1022 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001023 _exception = 1;
1024 _exceptionType = "java/lang/IllegalArgumentException";
1025 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001026 goto exit;
1027 }
1028 _remaining = _env->GetArrayLength(equation_ref) - offset;
1029 equation_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001030 _env->GetIntArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001031 equation = equation_base + offset;
1032
1033 glClipPlanexOES(
1034 (GLenum)plane,
1035 (GLfixed *)equation
1036 );
1037
1038exit:
1039 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001040 _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001041 JNI_ABORT);
1042 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001043 if (_exception) {
1044 jniThrowException(_env, _exceptionType, _exceptionMessage);
1045 }
Jack Palevich27f80022009-04-15 19:13:17 -07001046}
1047
1048/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
1049static void
1050android_glClipPlanexOES__ILjava_nio_IntBuffer_2
1051 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001052 jint _exception = 0;
1053 const char * _exceptionType = NULL;
1054 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001055 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001056 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001057 jint _remaining;
1058 GLfixed *equation = (GLfixed *) 0;
1059
Romain Guy84cac202016-12-05 12:26:02 -08001060 if (!equation_buf) {
1061 _exception = 1;
1062 _exceptionType = "java/lang/IllegalArgumentException";
1063 _exceptionMessage = "equation == null";
1064 goto exit;
1065 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001066 equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001067 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001068 char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001069 equation = (GLfixed *) (_equationBase + _bufferOffset);
1070 }
Jack Palevicha3795852009-04-24 10:35:11 -07001071 glClipPlanexOES(
1072 (GLenum)plane,
1073 (GLfixed *)equation
1074 );
Romain Guy84cac202016-12-05 12:26:02 -08001075
1076exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001077 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001078 _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001079 }
Romain Guy84cac202016-12-05 12:26:02 -08001080 if (_exception) {
1081 jniThrowException(_env, _exceptionType, _exceptionMessage);
1082 }
Jack Palevich27f80022009-04-15 19:13:17 -07001083}
1084
1085/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
1086static void
1087android_glColor4xOES__IIII
1088 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -07001089 glColor4xOES(
1090 (GLfixed)red,
1091 (GLfixed)green,
1092 (GLfixed)blue,
1093 (GLfixed)alpha
1094 );
Jack Palevich27f80022009-04-15 19:13:17 -07001095}
1096
1097/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
1098static void
1099android_glDepthRangexOES__II
1100 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001101 glDepthRangexOES(
1102 (GLclampx)zNear,
1103 (GLclampx)zFar
1104 );
Jack Palevich27f80022009-04-15 19:13:17 -07001105}
1106
1107/* void glFogxOES ( GLenum pname, GLfixed param ) */
1108static void
1109android_glFogxOES__II
1110 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001111 glFogxOES(
1112 (GLenum)pname,
1113 (GLfixed)param
1114 );
Jack Palevich27f80022009-04-15 19:13:17 -07001115}
1116
1117/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1118static void
1119android_glFogxvOES__I_3II
1120 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001121 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001122 const char * _exceptionType = NULL;
1123 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001124 GLfixed *params_base = (GLfixed *) 0;
1125 jint _remaining;
1126 GLfixed *params = (GLfixed *) 0;
1127
1128 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001129 _exception = 1;
1130 _exceptionType = "java/lang/IllegalArgumentException";
1131 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001132 goto exit;
1133 }
1134 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001135 _exception = 1;
1136 _exceptionType = "java/lang/IllegalArgumentException";
1137 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001138 goto exit;
1139 }
1140 _remaining = _env->GetArrayLength(params_ref) - offset;
1141 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001142 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001143 params = params_base + offset;
1144
1145 glFogxvOES(
1146 (GLenum)pname,
1147 (GLfixed *)params
1148 );
1149
1150exit:
1151 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001152 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001153 JNI_ABORT);
1154 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001155 if (_exception) {
1156 jniThrowException(_env, _exceptionType, _exceptionMessage);
1157 }
Jack Palevich27f80022009-04-15 19:13:17 -07001158}
1159
1160/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1161static void
1162android_glFogxvOES__ILjava_nio_IntBuffer_2
1163 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001164 jint _exception = 0;
1165 const char * _exceptionType = NULL;
1166 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001167 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001168 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001169 jint _remaining;
1170 GLfixed *params = (GLfixed *) 0;
1171
Romain Guy84cac202016-12-05 12:26:02 -08001172 if (!params_buf) {
1173 _exception = 1;
1174 _exceptionType = "java/lang/IllegalArgumentException";
1175 _exceptionMessage = "params == null";
1176 goto exit;
1177 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001178 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001179 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001180 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001181 params = (GLfixed *) (_paramsBase + _bufferOffset);
1182 }
Jack Palevicha3795852009-04-24 10:35:11 -07001183 glFogxvOES(
1184 (GLenum)pname,
1185 (GLfixed *)params
1186 );
Romain Guy84cac202016-12-05 12:26:02 -08001187
1188exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001189 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001190 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001191 }
Romain Guy84cac202016-12-05 12:26:02 -08001192 if (_exception) {
1193 jniThrowException(_env, _exceptionType, _exceptionMessage);
1194 }
Jack Palevich27f80022009-04-15 19:13:17 -07001195}
1196
1197/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1198static void
1199android_glFrustumxOES__IIIIII
1200 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001201 glFrustumxOES(
1202 (GLfixed)left,
1203 (GLfixed)right,
1204 (GLfixed)bottom,
1205 (GLfixed)top,
1206 (GLfixed)zNear,
1207 (GLfixed)zFar
1208 );
Jack Palevich27f80022009-04-15 19:13:17 -07001209}
1210
1211/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1212static void
1213android_glGetClipPlanexOES__I_3II
1214 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001215 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001216 const char * _exceptionType = NULL;
1217 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001218 GLfixed *eqn_base = (GLfixed *) 0;
1219 jint _remaining;
1220 GLfixed *eqn = (GLfixed *) 0;
1221
1222 if (!eqn_ref) {
1223 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001224 _exceptionType = "java/lang/IllegalArgumentException";
1225 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001226 goto exit;
1227 }
1228 if (offset < 0) {
1229 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001230 _exceptionType = "java/lang/IllegalArgumentException";
1231 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001232 goto exit;
1233 }
1234 _remaining = _env->GetArrayLength(eqn_ref) - offset;
1235 if (_remaining < 4) {
1236 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001237 _exceptionType = "java/lang/IllegalArgumentException";
1238 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001239 goto exit;
1240 }
1241 eqn_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001242 _env->GetIntArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001243 eqn = eqn_base + offset;
1244
1245 glGetClipPlanexOES(
1246 (GLenum)pname,
1247 (GLfixed *)eqn
1248 );
1249
1250exit:
1251 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001252 _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001253 _exception ? JNI_ABORT: 0);
1254 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001255 if (_exception) {
1256 jniThrowException(_env, _exceptionType, _exceptionMessage);
1257 }
Jack Palevich27f80022009-04-15 19:13:17 -07001258}
1259
1260/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1261static void
1262android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1263 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001264 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001265 const char * _exceptionType = NULL;
1266 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001267 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001268 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001269 jint _remaining;
1270 GLfixed *eqn = (GLfixed *) 0;
1271
Romain Guy84cac202016-12-05 12:26:02 -08001272 if (!eqn_buf) {
1273 _exception = 1;
1274 _exceptionType = "java/lang/IllegalArgumentException";
1275 _exceptionMessage = "eqn == null";
1276 goto exit;
1277 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001278 eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07001279 if (_remaining < 4) {
1280 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001281 _exceptionType = "java/lang/IllegalArgumentException";
1282 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001283 goto exit;
1284 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001285 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001286 char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001287 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1288 }
Jack Palevicha3795852009-04-24 10:35:11 -07001289 glGetClipPlanexOES(
1290 (GLenum)pname,
1291 (GLfixed *)eqn
1292 );
1293
1294exit:
1295 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001296 _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001297 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001298 if (_exception) {
1299 jniThrowException(_env, _exceptionType, _exceptionMessage);
1300 }
Jack Palevich27f80022009-04-15 19:13:17 -07001301}
1302
1303/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1304static void
1305android_glGetFixedvOES__I_3II
1306 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001307 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001308 const char * _exceptionType = NULL;
1309 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001310 GLfixed *params_base = (GLfixed *) 0;
1311 jint _remaining;
1312 GLfixed *params = (GLfixed *) 0;
1313
1314 if (!params_ref) {
1315 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001316 _exceptionType = "java/lang/IllegalArgumentException";
1317 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001318 goto exit;
1319 }
1320 if (offset < 0) {
1321 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001322 _exceptionType = "java/lang/IllegalArgumentException";
1323 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001324 goto exit;
1325 }
1326 _remaining = _env->GetArrayLength(params_ref) - offset;
1327 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001328 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001329 params = params_base + offset;
1330
1331 glGetFixedvOES(
1332 (GLenum)pname,
1333 (GLfixed *)params
1334 );
1335
1336exit:
1337 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001338 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001339 _exception ? JNI_ABORT: 0);
1340 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001341 if (_exception) {
1342 jniThrowException(_env, _exceptionType, _exceptionMessage);
1343 }
Jack Palevich27f80022009-04-15 19:13:17 -07001344}
1345
1346/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1347static void
1348android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1349 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001350 jint _exception = 0;
1351 const char * _exceptionType = NULL;
1352 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001353 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001354 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001355 jint _remaining;
1356 GLfixed *params = (GLfixed *) 0;
1357
Romain Guy84cac202016-12-05 12:26:02 -08001358 if (!params_buf) {
1359 _exception = 1;
1360 _exceptionType = "java/lang/IllegalArgumentException";
1361 _exceptionMessage = "params == null";
1362 goto exit;
1363 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001364 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001365 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001366 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001367 params = (GLfixed *) (_paramsBase + _bufferOffset);
1368 }
Jack Palevicha3795852009-04-24 10:35:11 -07001369 glGetFixedvOES(
1370 (GLenum)pname,
1371 (GLfixed *)params
1372 );
Romain Guy84cac202016-12-05 12:26:02 -08001373
1374exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001375 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001376 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1377 }
1378 if (_exception) {
1379 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001380 }
Jack Palevich27f80022009-04-15 19:13:17 -07001381}
1382
1383/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1384static void
1385android_glGetLightxvOES__II_3II
1386 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001387 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001388 const char * _exceptionType = NULL;
1389 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001390 GLfixed *params_base = (GLfixed *) 0;
1391 jint _remaining;
1392 GLfixed *params = (GLfixed *) 0;
1393
1394 if (!params_ref) {
1395 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001396 _exceptionType = "java/lang/IllegalArgumentException";
1397 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001398 goto exit;
1399 }
1400 if (offset < 0) {
1401 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001402 _exceptionType = "java/lang/IllegalArgumentException";
1403 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001404 goto exit;
1405 }
1406 _remaining = _env->GetArrayLength(params_ref) - offset;
1407 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001408 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001409 params = params_base + offset;
1410
1411 glGetLightxvOES(
1412 (GLenum)light,
1413 (GLenum)pname,
1414 (GLfixed *)params
1415 );
1416
1417exit:
1418 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001419 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001420 _exception ? JNI_ABORT: 0);
1421 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001422 if (_exception) {
1423 jniThrowException(_env, _exceptionType, _exceptionMessage);
1424 }
Jack Palevich27f80022009-04-15 19:13:17 -07001425}
1426
1427/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1428static void
1429android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1430 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001431 jint _exception = 0;
1432 const char * _exceptionType = NULL;
1433 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001434 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001435 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001436 jint _remaining;
1437 GLfixed *params = (GLfixed *) 0;
1438
Romain Guy84cac202016-12-05 12:26:02 -08001439 if (!params_buf) {
1440 _exception = 1;
1441 _exceptionType = "java/lang/IllegalArgumentException";
1442 _exceptionMessage = "params == null";
1443 goto exit;
1444 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001445 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001446 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001447 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001448 params = (GLfixed *) (_paramsBase + _bufferOffset);
1449 }
Jack Palevicha3795852009-04-24 10:35:11 -07001450 glGetLightxvOES(
1451 (GLenum)light,
1452 (GLenum)pname,
1453 (GLfixed *)params
1454 );
Romain Guy84cac202016-12-05 12:26:02 -08001455
1456exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001457 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001458 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1459 }
1460 if (_exception) {
1461 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001462 }
Jack Palevich27f80022009-04-15 19:13:17 -07001463}
1464
1465/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1466static void
1467android_glGetMaterialxvOES__II_3II
1468 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001469 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001470 const char * _exceptionType = NULL;
1471 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001472 GLfixed *params_base = (GLfixed *) 0;
1473 jint _remaining;
1474 GLfixed *params = (GLfixed *) 0;
1475
1476 if (!params_ref) {
1477 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001478 _exceptionType = "java/lang/IllegalArgumentException";
1479 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001480 goto exit;
1481 }
1482 if (offset < 0) {
1483 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001484 _exceptionType = "java/lang/IllegalArgumentException";
1485 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001486 goto exit;
1487 }
1488 _remaining = _env->GetArrayLength(params_ref) - offset;
1489 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001490 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001491 params = params_base + offset;
1492
1493 glGetMaterialxvOES(
1494 (GLenum)face,
1495 (GLenum)pname,
1496 (GLfixed *)params
1497 );
1498
1499exit:
1500 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001501 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001502 _exception ? JNI_ABORT: 0);
1503 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001504 if (_exception) {
1505 jniThrowException(_env, _exceptionType, _exceptionMessage);
1506 }
Jack Palevich27f80022009-04-15 19:13:17 -07001507}
1508
1509/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1510static void
1511android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1512 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001513 jint _exception = 0;
1514 const char * _exceptionType = NULL;
1515 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001516 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001517 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001518 jint _remaining;
1519 GLfixed *params = (GLfixed *) 0;
1520
Romain Guy84cac202016-12-05 12:26:02 -08001521 if (!params_buf) {
1522 _exception = 1;
1523 _exceptionType = "java/lang/IllegalArgumentException";
1524 _exceptionMessage = "params == null";
1525 goto exit;
1526 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001527 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001528 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001529 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001530 params = (GLfixed *) (_paramsBase + _bufferOffset);
1531 }
Jack Palevicha3795852009-04-24 10:35:11 -07001532 glGetMaterialxvOES(
1533 (GLenum)face,
1534 (GLenum)pname,
1535 (GLfixed *)params
1536 );
Romain Guy84cac202016-12-05 12:26:02 -08001537
1538exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001539 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001540 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1541 }
1542 if (_exception) {
1543 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001544 }
Jack Palevich27f80022009-04-15 19:13:17 -07001545}
1546
1547/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1548static void
1549android_glGetTexEnvxvOES__II_3II
1550 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001551 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001552 const char * _exceptionType = NULL;
1553 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001554 GLfixed *params_base = (GLfixed *) 0;
1555 jint _remaining;
1556 GLfixed *params = (GLfixed *) 0;
1557
1558 if (!params_ref) {
1559 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001560 _exceptionType = "java/lang/IllegalArgumentException";
1561 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001562 goto exit;
1563 }
1564 if (offset < 0) {
1565 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001566 _exceptionType = "java/lang/IllegalArgumentException";
1567 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001568 goto exit;
1569 }
1570 _remaining = _env->GetArrayLength(params_ref) - offset;
1571 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001572 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001573 params = params_base + offset;
1574
1575 glGetTexEnvxvOES(
1576 (GLenum)env,
1577 (GLenum)pname,
1578 (GLfixed *)params
1579 );
1580
1581exit:
1582 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001583 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001584 _exception ? JNI_ABORT: 0);
1585 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001586 if (_exception) {
1587 jniThrowException(_env, _exceptionType, _exceptionMessage);
1588 }
Jack Palevich27f80022009-04-15 19:13:17 -07001589}
1590
1591/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1592static void
1593android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1594 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001595 jint _exception = 0;
1596 const char * _exceptionType = NULL;
1597 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001598 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001599 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001600 jint _remaining;
1601 GLfixed *params = (GLfixed *) 0;
1602
Romain Guy84cac202016-12-05 12:26:02 -08001603 if (!params_buf) {
1604 _exception = 1;
1605 _exceptionType = "java/lang/IllegalArgumentException";
1606 _exceptionMessage = "params == null";
1607 goto exit;
1608 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001609 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001610 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001611 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001612 params = (GLfixed *) (_paramsBase + _bufferOffset);
1613 }
Jack Palevicha3795852009-04-24 10:35:11 -07001614 glGetTexEnvxvOES(
1615 (GLenum)env,
1616 (GLenum)pname,
1617 (GLfixed *)params
1618 );
Romain Guy84cac202016-12-05 12:26:02 -08001619
1620exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001621 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001622 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1623 }
1624 if (_exception) {
1625 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001626 }
Jack Palevich27f80022009-04-15 19:13:17 -07001627}
1628
1629/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1630static void
1631android_glGetTexParameterxvOES__II_3II
1632 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001633 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001634 const char * _exceptionType = NULL;
1635 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001636 GLfixed *params_base = (GLfixed *) 0;
1637 jint _remaining;
1638 GLfixed *params = (GLfixed *) 0;
1639
1640 if (!params_ref) {
1641 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001642 _exceptionType = "java/lang/IllegalArgumentException";
1643 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001644 goto exit;
1645 }
1646 if (offset < 0) {
1647 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001648 _exceptionType = "java/lang/IllegalArgumentException";
1649 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001650 goto exit;
1651 }
1652 _remaining = _env->GetArrayLength(params_ref) - offset;
1653 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001654 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001655 params = params_base + offset;
1656
1657 glGetTexParameterxvOES(
1658 (GLenum)target,
1659 (GLenum)pname,
1660 (GLfixed *)params
1661 );
1662
1663exit:
1664 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001665 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001666 _exception ? JNI_ABORT: 0);
1667 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001668 if (_exception) {
1669 jniThrowException(_env, _exceptionType, _exceptionMessage);
1670 }
Jack Palevich27f80022009-04-15 19:13:17 -07001671}
1672
1673/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1674static void
1675android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1676 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001677 jint _exception = 0;
1678 const char * _exceptionType = NULL;
1679 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001680 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001681 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001682 jint _remaining;
1683 GLfixed *params = (GLfixed *) 0;
1684
Romain Guy84cac202016-12-05 12:26:02 -08001685 if (!params_buf) {
1686 _exception = 1;
1687 _exceptionType = "java/lang/IllegalArgumentException";
1688 _exceptionMessage = "params == null";
1689 goto exit;
1690 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001691 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001692 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001693 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001694 params = (GLfixed *) (_paramsBase + _bufferOffset);
1695 }
Jack Palevicha3795852009-04-24 10:35:11 -07001696 glGetTexParameterxvOES(
1697 (GLenum)target,
1698 (GLenum)pname,
1699 (GLfixed *)params
1700 );
Romain Guy84cac202016-12-05 12:26:02 -08001701
1702exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001703 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001704 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1705 }
1706 if (_exception) {
1707 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001708 }
Jack Palevich27f80022009-04-15 19:13:17 -07001709}
1710
1711/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1712static void
1713android_glLightModelxOES__II
1714 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001715 glLightModelxOES(
1716 (GLenum)pname,
1717 (GLfixed)param
1718 );
Jack Palevich27f80022009-04-15 19:13:17 -07001719}
1720
1721/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1722static void
1723android_glLightModelxvOES__I_3II
1724 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001725 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001726 const char * _exceptionType = NULL;
1727 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001728 GLfixed *params_base = (GLfixed *) 0;
1729 jint _remaining;
1730 GLfixed *params = (GLfixed *) 0;
1731
1732 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001733 _exception = 1;
1734 _exceptionType = "java/lang/IllegalArgumentException";
1735 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001736 goto exit;
1737 }
1738 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001739 _exception = 1;
1740 _exceptionType = "java/lang/IllegalArgumentException";
1741 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001742 goto exit;
1743 }
1744 _remaining = _env->GetArrayLength(params_ref) - offset;
1745 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001746 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001747 params = params_base + offset;
1748
1749 glLightModelxvOES(
1750 (GLenum)pname,
1751 (GLfixed *)params
1752 );
1753
1754exit:
1755 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001756 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001757 JNI_ABORT);
1758 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001759 if (_exception) {
1760 jniThrowException(_env, _exceptionType, _exceptionMessage);
1761 }
Jack Palevich27f80022009-04-15 19:13:17 -07001762}
1763
1764/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1765static void
1766android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1767 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001768 jint _exception = 0;
1769 const char * _exceptionType = NULL;
1770 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001771 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001772 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001773 jint _remaining;
1774 GLfixed *params = (GLfixed *) 0;
1775
Romain Guy84cac202016-12-05 12:26:02 -08001776 if (!params_buf) {
1777 _exception = 1;
1778 _exceptionType = "java/lang/IllegalArgumentException";
1779 _exceptionMessage = "params == null";
1780 goto exit;
1781 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001782 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001783 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001784 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001785 params = (GLfixed *) (_paramsBase + _bufferOffset);
1786 }
Jack Palevicha3795852009-04-24 10:35:11 -07001787 glLightModelxvOES(
1788 (GLenum)pname,
1789 (GLfixed *)params
1790 );
Romain Guy84cac202016-12-05 12:26:02 -08001791
1792exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001793 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001794 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001795 }
Romain Guy84cac202016-12-05 12:26:02 -08001796 if (_exception) {
1797 jniThrowException(_env, _exceptionType, _exceptionMessage);
1798 }
Jack Palevich27f80022009-04-15 19:13:17 -07001799}
1800
1801/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1802static void
1803android_glLightxOES__III
1804 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001805 glLightxOES(
1806 (GLenum)light,
1807 (GLenum)pname,
1808 (GLfixed)param
1809 );
Jack Palevich27f80022009-04-15 19:13:17 -07001810}
1811
1812/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1813static void
1814android_glLightxvOES__II_3II
1815 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001816 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001817 const char * _exceptionType = NULL;
1818 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001819 GLfixed *params_base = (GLfixed *) 0;
1820 jint _remaining;
1821 GLfixed *params = (GLfixed *) 0;
1822
1823 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001824 _exception = 1;
1825 _exceptionType = "java/lang/IllegalArgumentException";
1826 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001827 goto exit;
1828 }
1829 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001830 _exception = 1;
1831 _exceptionType = "java/lang/IllegalArgumentException";
1832 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001833 goto exit;
1834 }
1835 _remaining = _env->GetArrayLength(params_ref) - offset;
1836 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001837 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001838 params = params_base + offset;
1839
1840 glLightxvOES(
1841 (GLenum)light,
1842 (GLenum)pname,
1843 (GLfixed *)params
1844 );
1845
1846exit:
1847 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001848 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001849 JNI_ABORT);
1850 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001851 if (_exception) {
1852 jniThrowException(_env, _exceptionType, _exceptionMessage);
1853 }
Jack Palevich27f80022009-04-15 19:13:17 -07001854}
1855
1856/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1857static void
1858android_glLightxvOES__IILjava_nio_IntBuffer_2
1859 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001860 jint _exception = 0;
1861 const char * _exceptionType = NULL;
1862 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001863 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001864 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001865 jint _remaining;
1866 GLfixed *params = (GLfixed *) 0;
1867
Romain Guy84cac202016-12-05 12:26:02 -08001868 if (!params_buf) {
1869 _exception = 1;
1870 _exceptionType = "java/lang/IllegalArgumentException";
1871 _exceptionMessage = "params == null";
1872 goto exit;
1873 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001874 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001875 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001876 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001877 params = (GLfixed *) (_paramsBase + _bufferOffset);
1878 }
Jack Palevicha3795852009-04-24 10:35:11 -07001879 glLightxvOES(
1880 (GLenum)light,
1881 (GLenum)pname,
1882 (GLfixed *)params
1883 );
Romain Guy84cac202016-12-05 12:26:02 -08001884
1885exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001886 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001887 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001888 }
Romain Guy84cac202016-12-05 12:26:02 -08001889 if (_exception) {
1890 jniThrowException(_env, _exceptionType, _exceptionMessage);
1891 }
Jack Palevich27f80022009-04-15 19:13:17 -07001892}
1893
1894/* void glLineWidthxOES ( GLfixed width ) */
1895static void
1896android_glLineWidthxOES__I
1897 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001898 glLineWidthxOES(
1899 (GLfixed)width
1900 );
Jack Palevich27f80022009-04-15 19:13:17 -07001901}
1902
1903/* void glLoadMatrixxOES ( const GLfixed *m ) */
1904static void
1905android_glLoadMatrixxOES___3II
1906 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001907 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001908 const char * _exceptionType = NULL;
1909 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001910 GLfixed *m_base = (GLfixed *) 0;
1911 jint _remaining;
1912 GLfixed *m = (GLfixed *) 0;
1913
1914 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001915 _exception = 1;
1916 _exceptionType = "java/lang/IllegalArgumentException";
1917 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001918 goto exit;
1919 }
1920 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001921 _exception = 1;
1922 _exceptionType = "java/lang/IllegalArgumentException";
1923 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001924 goto exit;
1925 }
1926 _remaining = _env->GetArrayLength(m_ref) - offset;
1927 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001928 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001929 m = m_base + offset;
1930
1931 glLoadMatrixxOES(
1932 (GLfixed *)m
1933 );
1934
1935exit:
1936 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001937 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001938 JNI_ABORT);
1939 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001940 if (_exception) {
1941 jniThrowException(_env, _exceptionType, _exceptionMessage);
1942 }
Jack Palevich27f80022009-04-15 19:13:17 -07001943}
1944
1945/* void glLoadMatrixxOES ( const GLfixed *m ) */
1946static void
1947android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1948 (JNIEnv *_env, jobject _this, jobject m_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001949 jint _exception = 0;
1950 const char * _exceptionType = NULL;
1951 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001952 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001953 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001954 jint _remaining;
1955 GLfixed *m = (GLfixed *) 0;
1956
Romain Guy84cac202016-12-05 12:26:02 -08001957 if (!m_buf) {
1958 _exception = 1;
1959 _exceptionType = "java/lang/IllegalArgumentException";
1960 _exceptionMessage = "m == null";
1961 goto exit;
1962 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001963 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001964 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001965 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001966 m = (GLfixed *) (_mBase + _bufferOffset);
1967 }
Jack Palevicha3795852009-04-24 10:35:11 -07001968 glLoadMatrixxOES(
1969 (GLfixed *)m
1970 );
Romain Guy84cac202016-12-05 12:26:02 -08001971
1972exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001973 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001974 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001975 }
Romain Guy84cac202016-12-05 12:26:02 -08001976 if (_exception) {
1977 jniThrowException(_env, _exceptionType, _exceptionMessage);
1978 }
Jack Palevich27f80022009-04-15 19:13:17 -07001979}
1980
1981/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1982static void
1983android_glMaterialxOES__III
1984 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001985 glMaterialxOES(
1986 (GLenum)face,
1987 (GLenum)pname,
1988 (GLfixed)param
1989 );
Jack Palevich27f80022009-04-15 19:13:17 -07001990}
1991
1992/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1993static void
1994android_glMaterialxvOES__II_3II
1995 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001996 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001997 const char * _exceptionType = NULL;
1998 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001999 GLfixed *params_base = (GLfixed *) 0;
2000 jint _remaining;
2001 GLfixed *params = (GLfixed *) 0;
2002
2003 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002004 _exception = 1;
2005 _exceptionType = "java/lang/IllegalArgumentException";
2006 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002007 goto exit;
2008 }
2009 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002010 _exception = 1;
2011 _exceptionType = "java/lang/IllegalArgumentException";
2012 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002013 goto exit;
2014 }
2015 _remaining = _env->GetArrayLength(params_ref) - offset;
2016 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002017 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002018 params = params_base + offset;
2019
2020 glMaterialxvOES(
2021 (GLenum)face,
2022 (GLenum)pname,
2023 (GLfixed *)params
2024 );
2025
2026exit:
2027 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002028 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002029 JNI_ABORT);
2030 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002031 if (_exception) {
2032 jniThrowException(_env, _exceptionType, _exceptionMessage);
2033 }
Jack Palevich27f80022009-04-15 19:13:17 -07002034}
2035
2036/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
2037static void
2038android_glMaterialxvOES__IILjava_nio_IntBuffer_2
2039 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002040 jint _exception = 0;
2041 const char * _exceptionType = NULL;
2042 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002043 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002044 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002045 jint _remaining;
2046 GLfixed *params = (GLfixed *) 0;
2047
Romain Guy84cac202016-12-05 12:26:02 -08002048 if (!params_buf) {
2049 _exception = 1;
2050 _exceptionType = "java/lang/IllegalArgumentException";
2051 _exceptionMessage = "params == null";
2052 goto exit;
2053 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002054 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002055 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002056 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002057 params = (GLfixed *) (_paramsBase + _bufferOffset);
2058 }
Jack Palevicha3795852009-04-24 10:35:11 -07002059 glMaterialxvOES(
2060 (GLenum)face,
2061 (GLenum)pname,
2062 (GLfixed *)params
2063 );
Romain Guy84cac202016-12-05 12:26:02 -08002064
2065exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002066 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002067 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002068 }
Romain Guy84cac202016-12-05 12:26:02 -08002069 if (_exception) {
2070 jniThrowException(_env, _exceptionType, _exceptionMessage);
2071 }
Jack Palevich27f80022009-04-15 19:13:17 -07002072}
2073
2074/* void glMultMatrixxOES ( const GLfixed *m ) */
2075static void
2076android_glMultMatrixxOES___3II
2077 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002078 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002079 const char * _exceptionType = NULL;
2080 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002081 GLfixed *m_base = (GLfixed *) 0;
2082 jint _remaining;
2083 GLfixed *m = (GLfixed *) 0;
2084
2085 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002086 _exception = 1;
2087 _exceptionType = "java/lang/IllegalArgumentException";
2088 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002089 goto exit;
2090 }
2091 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002092 _exception = 1;
2093 _exceptionType = "java/lang/IllegalArgumentException";
2094 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002095 goto exit;
2096 }
2097 _remaining = _env->GetArrayLength(m_ref) - offset;
2098 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002099 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002100 m = m_base + offset;
2101
2102 glMultMatrixxOES(
2103 (GLfixed *)m
2104 );
2105
2106exit:
2107 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002108 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002109 JNI_ABORT);
2110 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002111 if (_exception) {
2112 jniThrowException(_env, _exceptionType, _exceptionMessage);
2113 }
Jack Palevich27f80022009-04-15 19:13:17 -07002114}
2115
2116/* void glMultMatrixxOES ( const GLfixed *m ) */
2117static void
2118android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
2119 (JNIEnv *_env, jobject _this, jobject m_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002120 jint _exception = 0;
2121 const char * _exceptionType = NULL;
2122 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002123 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002124 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002125 jint _remaining;
2126 GLfixed *m = (GLfixed *) 0;
2127
Romain Guy84cac202016-12-05 12:26:02 -08002128 if (!m_buf) {
2129 _exception = 1;
2130 _exceptionType = "java/lang/IllegalArgumentException";
2131 _exceptionMessage = "m == null";
2132 goto exit;
2133 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002134 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002135 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002136 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002137 m = (GLfixed *) (_mBase + _bufferOffset);
2138 }
Jack Palevicha3795852009-04-24 10:35:11 -07002139 glMultMatrixxOES(
2140 (GLfixed *)m
2141 );
Romain Guy84cac202016-12-05 12:26:02 -08002142
2143exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002144 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002145 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002146 }
Romain Guy84cac202016-12-05 12:26:02 -08002147 if (_exception) {
2148 jniThrowException(_env, _exceptionType, _exceptionMessage);
2149 }
Jack Palevich27f80022009-04-15 19:13:17 -07002150}
2151
2152/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
2153static void
2154android_glMultiTexCoord4xOES__IIIII
2155 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07002156 glMultiTexCoord4xOES(
2157 (GLenum)target,
2158 (GLfixed)s,
2159 (GLfixed)t,
2160 (GLfixed)r,
2161 (GLfixed)q
2162 );
Jack Palevich27f80022009-04-15 19:13:17 -07002163}
2164
2165/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
2166static void
2167android_glNormal3xOES__III
2168 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07002169 glNormal3xOES(
2170 (GLfixed)nx,
2171 (GLfixed)ny,
2172 (GLfixed)nz
2173 );
Jack Palevich27f80022009-04-15 19:13:17 -07002174}
2175
2176/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
2177static void
2178android_glOrthoxOES__IIIIII
2179 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002180 glOrthoxOES(
2181 (GLfixed)left,
2182 (GLfixed)right,
2183 (GLfixed)bottom,
2184 (GLfixed)top,
2185 (GLfixed)zNear,
2186 (GLfixed)zFar
2187 );
Jack Palevich27f80022009-04-15 19:13:17 -07002188}
2189
2190/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
2191static void
2192android_glPointParameterxOES__II
2193 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002194 glPointParameterxOES(
2195 (GLenum)pname,
2196 (GLfixed)param
2197 );
Jack Palevich27f80022009-04-15 19:13:17 -07002198}
2199
2200/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2201static void
2202android_glPointParameterxvOES__I_3II
2203 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002204 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002205 const char * _exceptionType = NULL;
2206 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002207 GLfixed *params_base = (GLfixed *) 0;
2208 jint _remaining;
2209 GLfixed *params = (GLfixed *) 0;
2210
2211 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002212 _exception = 1;
2213 _exceptionType = "java/lang/IllegalArgumentException";
2214 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002215 goto exit;
2216 }
2217 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002218 _exception = 1;
2219 _exceptionType = "java/lang/IllegalArgumentException";
2220 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002221 goto exit;
2222 }
2223 _remaining = _env->GetArrayLength(params_ref) - offset;
2224 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002225 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002226 params = params_base + offset;
2227
2228 glPointParameterxvOES(
2229 (GLenum)pname,
2230 (GLfixed *)params
2231 );
2232
2233exit:
2234 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002235 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002236 JNI_ABORT);
2237 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002238 if (_exception) {
2239 jniThrowException(_env, _exceptionType, _exceptionMessage);
2240 }
Jack Palevich27f80022009-04-15 19:13:17 -07002241}
2242
2243/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2244static void
2245android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
2246 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002247 jint _exception = 0;
2248 const char * _exceptionType = NULL;
2249 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002250 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002251 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002252 jint _remaining;
2253 GLfixed *params = (GLfixed *) 0;
2254
Romain Guy84cac202016-12-05 12:26:02 -08002255 if (!params_buf) {
2256 _exception = 1;
2257 _exceptionType = "java/lang/IllegalArgumentException";
2258 _exceptionMessage = "params == null";
2259 goto exit;
2260 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002261 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002262 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002263 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002264 params = (GLfixed *) (_paramsBase + _bufferOffset);
2265 }
Jack Palevicha3795852009-04-24 10:35:11 -07002266 glPointParameterxvOES(
2267 (GLenum)pname,
2268 (GLfixed *)params
2269 );
Romain Guy84cac202016-12-05 12:26:02 -08002270
2271exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002272 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002273 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002274 }
Romain Guy84cac202016-12-05 12:26:02 -08002275 if (_exception) {
2276 jniThrowException(_env, _exceptionType, _exceptionMessage);
2277 }
Jack Palevich27f80022009-04-15 19:13:17 -07002278}
2279
2280/* void glPointSizexOES ( GLfixed size ) */
2281static void
2282android_glPointSizexOES__I
2283 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07002284 glPointSizexOES(
2285 (GLfixed)size
2286 );
Jack Palevich27f80022009-04-15 19:13:17 -07002287}
2288
2289/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
2290static void
2291android_glPolygonOffsetxOES__II
2292 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07002293 glPolygonOffsetxOES(
2294 (GLfixed)factor,
2295 (GLfixed)units
2296 );
Jack Palevich27f80022009-04-15 19:13:17 -07002297}
2298
2299/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
2300static void
2301android_glRotatexOES__IIII
2302 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002303 glRotatexOES(
2304 (GLfixed)angle,
2305 (GLfixed)x,
2306 (GLfixed)y,
2307 (GLfixed)z
2308 );
Jack Palevich27f80022009-04-15 19:13:17 -07002309}
2310
2311/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
2312static void
2313android_glSampleCoveragexOES__IZ
2314 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07002315 glSampleCoveragexOES(
2316 (GLclampx)value,
2317 (GLboolean)invert
2318 );
Jack Palevich27f80022009-04-15 19:13:17 -07002319}
2320
2321/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2322static void
2323android_glScalexOES__III
2324 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002325 glScalexOES(
2326 (GLfixed)x,
2327 (GLfixed)y,
2328 (GLfixed)z
2329 );
Jack Palevich27f80022009-04-15 19:13:17 -07002330}
2331
2332/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
2333static void
2334android_glTexEnvxOES__III
2335 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002336 glTexEnvxOES(
2337 (GLenum)target,
2338 (GLenum)pname,
2339 (GLfixed)param
2340 );
Jack Palevich27f80022009-04-15 19:13:17 -07002341}
2342
2343/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2344static void
2345android_glTexEnvxvOES__II_3II
2346 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002347 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002348 const char * _exceptionType = NULL;
2349 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002350 GLfixed *params_base = (GLfixed *) 0;
2351 jint _remaining;
2352 GLfixed *params = (GLfixed *) 0;
2353
2354 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002355 _exception = 1;
2356 _exceptionType = "java/lang/IllegalArgumentException";
2357 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002358 goto exit;
2359 }
2360 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002361 _exception = 1;
2362 _exceptionType = "java/lang/IllegalArgumentException";
2363 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002364 goto exit;
2365 }
2366 _remaining = _env->GetArrayLength(params_ref) - offset;
2367 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002368 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002369 params = params_base + offset;
2370
2371 glTexEnvxvOES(
2372 (GLenum)target,
2373 (GLenum)pname,
2374 (GLfixed *)params
2375 );
2376
2377exit:
2378 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002379 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002380 JNI_ABORT);
2381 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002382 if (_exception) {
2383 jniThrowException(_env, _exceptionType, _exceptionMessage);
2384 }
Jack Palevich27f80022009-04-15 19:13:17 -07002385}
2386
2387/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2388static void
2389android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2390 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002391 jint _exception = 0;
2392 const char * _exceptionType = NULL;
2393 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002394 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002395 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002396 jint _remaining;
2397 GLfixed *params = (GLfixed *) 0;
2398
Romain Guy84cac202016-12-05 12:26:02 -08002399 if (!params_buf) {
2400 _exception = 1;
2401 _exceptionType = "java/lang/IllegalArgumentException";
2402 _exceptionMessage = "params == null";
2403 goto exit;
2404 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002405 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002406 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002407 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002408 params = (GLfixed *) (_paramsBase + _bufferOffset);
2409 }
Jack Palevicha3795852009-04-24 10:35:11 -07002410 glTexEnvxvOES(
2411 (GLenum)target,
2412 (GLenum)pname,
2413 (GLfixed *)params
2414 );
Romain Guy84cac202016-12-05 12:26:02 -08002415
2416exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002417 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002418 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002419 }
Romain Guy84cac202016-12-05 12:26:02 -08002420 if (_exception) {
2421 jniThrowException(_env, _exceptionType, _exceptionMessage);
2422 }
Jack Palevich27f80022009-04-15 19:13:17 -07002423}
2424
2425/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2426static void
2427android_glTexParameterxOES__III
2428 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002429 glTexParameterxOES(
2430 (GLenum)target,
2431 (GLenum)pname,
2432 (GLfixed)param
2433 );
Jack Palevich27f80022009-04-15 19:13:17 -07002434}
2435
2436/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2437static void
2438android_glTexParameterxvOES__II_3II
2439 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002440 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002441 const char * _exceptionType = NULL;
2442 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002443 GLfixed *params_base = (GLfixed *) 0;
2444 jint _remaining;
2445 GLfixed *params = (GLfixed *) 0;
2446
2447 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002448 _exception = 1;
2449 _exceptionType = "java/lang/IllegalArgumentException";
2450 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002451 goto exit;
2452 }
2453 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002454 _exception = 1;
2455 _exceptionType = "java/lang/IllegalArgumentException";
2456 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002457 goto exit;
2458 }
2459 _remaining = _env->GetArrayLength(params_ref) - offset;
2460 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002461 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002462 params = params_base + offset;
2463
2464 glTexParameterxvOES(
2465 (GLenum)target,
2466 (GLenum)pname,
2467 (GLfixed *)params
2468 );
2469
2470exit:
2471 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002472 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002473 JNI_ABORT);
2474 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002475 if (_exception) {
2476 jniThrowException(_env, _exceptionType, _exceptionMessage);
2477 }
Jack Palevich27f80022009-04-15 19:13:17 -07002478}
2479
2480/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2481static void
2482android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2483 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002484 jint _exception = 0;
2485 const char * _exceptionType = NULL;
2486 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002487 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002488 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002489 jint _remaining;
2490 GLfixed *params = (GLfixed *) 0;
2491
Romain Guy84cac202016-12-05 12:26:02 -08002492 if (!params_buf) {
2493 _exception = 1;
2494 _exceptionType = "java/lang/IllegalArgumentException";
2495 _exceptionMessage = "params == null";
2496 goto exit;
2497 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002498 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002499 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002500 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002501 params = (GLfixed *) (_paramsBase + _bufferOffset);
2502 }
Jack Palevicha3795852009-04-24 10:35:11 -07002503 glTexParameterxvOES(
2504 (GLenum)target,
2505 (GLenum)pname,
2506 (GLfixed *)params
2507 );
Romain Guy84cac202016-12-05 12:26:02 -08002508
2509exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002510 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002511 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002512 }
Romain Guy84cac202016-12-05 12:26:02 -08002513 if (_exception) {
2514 jniThrowException(_env, _exceptionType, _exceptionMessage);
2515 }
Jack Palevich27f80022009-04-15 19:13:17 -07002516}
2517
2518/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2519static void
2520android_glTranslatexOES__III
2521 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002522 glTranslatexOES(
2523 (GLfixed)x,
2524 (GLfixed)y,
2525 (GLfixed)z
2526 );
Jack Palevich27f80022009-04-15 19:13:17 -07002527}
2528
2529/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2530static jboolean
2531android_glIsRenderbufferOES__I
2532 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002533 GLboolean _returnValue;
2534 _returnValue = glIsRenderbufferOES(
2535 (GLuint)renderbuffer
2536 );
Andy McFaddencee51982013-04-25 16:08:31 -07002537 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002538}
2539
2540/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2541static void
2542android_glBindRenderbufferOES__II
2543 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002544 glBindRenderbufferOES(
2545 (GLenum)target,
2546 (GLuint)renderbuffer
2547 );
Jack Palevich27f80022009-04-15 19:13:17 -07002548}
2549
2550/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2551static void
2552android_glDeleteRenderbuffersOES__I_3II
2553 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002554 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002555 const char * _exceptionType = NULL;
2556 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002557 GLuint *renderbuffers_base = (GLuint *) 0;
2558 jint _remaining;
2559 GLuint *renderbuffers = (GLuint *) 0;
2560
2561 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002562 _exception = 1;
2563 _exceptionType = "java/lang/IllegalArgumentException";
2564 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002565 goto exit;
2566 }
2567 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002568 _exception = 1;
2569 _exceptionType = "java/lang/IllegalArgumentException";
2570 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002571 goto exit;
2572 }
2573 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2574 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002575 _exception = 1;
2576 _exceptionType = "java/lang/IllegalArgumentException";
2577 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002578 goto exit;
2579 }
2580 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002581 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002582 renderbuffers = renderbuffers_base + offset;
2583
2584 glDeleteRenderbuffersOES(
2585 (GLsizei)n,
2586 (GLuint *)renderbuffers
2587 );
2588
2589exit:
2590 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002591 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002592 JNI_ABORT);
2593 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002594 if (_exception) {
2595 jniThrowException(_env, _exceptionType, _exceptionMessage);
2596 }
Jack Palevich27f80022009-04-15 19:13:17 -07002597}
2598
2599/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2600static void
2601android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2602 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002603 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002604 const char * _exceptionType = NULL;
2605 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002606 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002607 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002608 jint _remaining;
2609 GLuint *renderbuffers = (GLuint *) 0;
2610
Romain Guy84cac202016-12-05 12:26:02 -08002611 if (!renderbuffers_buf) {
2612 _exception = 1;
2613 _exceptionType = "java/lang/IllegalArgumentException";
2614 _exceptionMessage = "renderbuffers == null";
2615 goto exit;
2616 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002617 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002618 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002619 _exception = 1;
2620 _exceptionType = "java/lang/IllegalArgumentException";
2621 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002622 goto exit;
2623 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002624 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002625 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002626 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2627 }
Jack Palevich73108672011-03-28 14:49:12 -07002628 glDeleteRenderbuffersOES(
2629 (GLsizei)n,
2630 (GLuint *)renderbuffers
2631 );
2632
2633exit:
2634 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002635 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002636 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002637 if (_exception) {
2638 jniThrowException(_env, _exceptionType, _exceptionMessage);
2639 }
Jack Palevich27f80022009-04-15 19:13:17 -07002640}
2641
2642/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2643static void
2644android_glGenRenderbuffersOES__I_3II
2645 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002646 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002647 const char * _exceptionType = NULL;
2648 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002649 GLuint *renderbuffers_base = (GLuint *) 0;
2650 jint _remaining;
2651 GLuint *renderbuffers = (GLuint *) 0;
2652
2653 if (!renderbuffers_ref) {
2654 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002655 _exceptionType = "java/lang/IllegalArgumentException";
2656 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002657 goto exit;
2658 }
2659 if (offset < 0) {
2660 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002661 _exceptionType = "java/lang/IllegalArgumentException";
2662 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002663 goto exit;
2664 }
2665 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2666 if (_remaining < n) {
2667 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002668 _exceptionType = "java/lang/IllegalArgumentException";
2669 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002670 goto exit;
2671 }
2672 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002673 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002674 renderbuffers = renderbuffers_base + offset;
2675
2676 glGenRenderbuffersOES(
2677 (GLsizei)n,
2678 (GLuint *)renderbuffers
2679 );
2680
2681exit:
2682 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002683 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002684 _exception ? JNI_ABORT: 0);
2685 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002686 if (_exception) {
2687 jniThrowException(_env, _exceptionType, _exceptionMessage);
2688 }
Jack Palevich27f80022009-04-15 19:13:17 -07002689}
2690
2691/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2692static void
2693android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2694 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002695 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002696 const char * _exceptionType = NULL;
2697 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002698 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002699 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002700 jint _remaining;
2701 GLuint *renderbuffers = (GLuint *) 0;
2702
Romain Guy84cac202016-12-05 12:26:02 -08002703 if (!renderbuffers_buf) {
2704 _exception = 1;
2705 _exceptionType = "java/lang/IllegalArgumentException";
2706 _exceptionMessage = "renderbuffers == null";
2707 goto exit;
2708 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002709 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002710 if (_remaining < n) {
2711 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002712 _exceptionType = "java/lang/IllegalArgumentException";
2713 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002714 goto exit;
2715 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002716 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002717 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002718 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2719 }
Jack Palevich73108672011-03-28 14:49:12 -07002720 glGenRenderbuffersOES(
2721 (GLsizei)n,
2722 (GLuint *)renderbuffers
2723 );
2724
2725exit:
2726 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002727 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002728 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002729 if (_exception) {
2730 jniThrowException(_env, _exceptionType, _exceptionMessage);
2731 }
Jack Palevich27f80022009-04-15 19:13:17 -07002732}
2733
2734/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2735static void
2736android_glRenderbufferStorageOES__IIII
2737 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002738 glRenderbufferStorageOES(
2739 (GLenum)target,
2740 (GLenum)internalformat,
2741 (GLsizei)width,
2742 (GLsizei)height
2743 );
Jack Palevich27f80022009-04-15 19:13:17 -07002744}
2745
2746/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2747static void
2748android_glGetRenderbufferParameterivOES__II_3II
2749 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002750 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002751 const char * _exceptionType = NULL;
2752 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002753 GLint *params_base = (GLint *) 0;
2754 jint _remaining;
2755 GLint *params = (GLint *) 0;
2756
2757 if (!params_ref) {
2758 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002759 _exceptionType = "java/lang/IllegalArgumentException";
2760 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002761 goto exit;
2762 }
2763 if (offset < 0) {
2764 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002765 _exceptionType = "java/lang/IllegalArgumentException";
2766 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002767 goto exit;
2768 }
2769 _remaining = _env->GetArrayLength(params_ref) - offset;
2770 if (_remaining < 1) {
2771 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002772 _exceptionType = "java/lang/IllegalArgumentException";
2773 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002774 goto exit;
2775 }
2776 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002777 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002778 params = params_base + offset;
2779
2780 glGetRenderbufferParameterivOES(
2781 (GLenum)target,
2782 (GLenum)pname,
2783 (GLint *)params
2784 );
2785
2786exit:
2787 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002788 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07002789 _exception ? JNI_ABORT: 0);
2790 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002791 if (_exception) {
2792 jniThrowException(_env, _exceptionType, _exceptionMessage);
2793 }
Jack Palevich27f80022009-04-15 19:13:17 -07002794}
2795
2796/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2797static void
2798android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2799 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002800 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002801 const char * _exceptionType = NULL;
2802 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002803 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002804 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002805 jint _remaining;
2806 GLint *params = (GLint *) 0;
2807
Romain Guy84cac202016-12-05 12:26:02 -08002808 if (!params_buf) {
2809 _exception = 1;
2810 _exceptionType = "java/lang/IllegalArgumentException";
2811 _exceptionMessage = "params == null";
2812 goto exit;
2813 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002814 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002815 if (_remaining < 1) {
2816 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002817 _exceptionType = "java/lang/IllegalArgumentException";
2818 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002819 goto exit;
2820 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002821 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002822 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002823 params = (GLint *) (_paramsBase + _bufferOffset);
2824 }
Jack Palevich73108672011-03-28 14:49:12 -07002825 glGetRenderbufferParameterivOES(
2826 (GLenum)target,
2827 (GLenum)pname,
2828 (GLint *)params
2829 );
2830
2831exit:
2832 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002833 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002834 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002835 if (_exception) {
2836 jniThrowException(_env, _exceptionType, _exceptionMessage);
2837 }
Jack Palevich27f80022009-04-15 19:13:17 -07002838}
2839
2840/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2841static jboolean
2842android_glIsFramebufferOES__I
2843 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002844 GLboolean _returnValue;
2845 _returnValue = glIsFramebufferOES(
2846 (GLuint)framebuffer
2847 );
Andy McFaddencee51982013-04-25 16:08:31 -07002848 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002849}
2850
2851/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2852static void
2853android_glBindFramebufferOES__II
2854 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002855 glBindFramebufferOES(
2856 (GLenum)target,
2857 (GLuint)framebuffer
2858 );
Jack Palevich27f80022009-04-15 19:13:17 -07002859}
2860
2861/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2862static void
2863android_glDeleteFramebuffersOES__I_3II
2864 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002865 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002866 const char * _exceptionType = NULL;
2867 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002868 GLuint *framebuffers_base = (GLuint *) 0;
2869 jint _remaining;
2870 GLuint *framebuffers = (GLuint *) 0;
2871
2872 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002873 _exception = 1;
2874 _exceptionType = "java/lang/IllegalArgumentException";
2875 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002876 goto exit;
2877 }
2878 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002879 _exception = 1;
2880 _exceptionType = "java/lang/IllegalArgumentException";
2881 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002882 goto exit;
2883 }
2884 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2885 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002886 _exception = 1;
2887 _exceptionType = "java/lang/IllegalArgumentException";
2888 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002889 goto exit;
2890 }
2891 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002892 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002893 framebuffers = framebuffers_base + offset;
2894
2895 glDeleteFramebuffersOES(
2896 (GLsizei)n,
2897 (GLuint *)framebuffers
2898 );
2899
2900exit:
2901 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002902 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002903 JNI_ABORT);
2904 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002905 if (_exception) {
2906 jniThrowException(_env, _exceptionType, _exceptionMessage);
2907 }
Jack Palevich27f80022009-04-15 19:13:17 -07002908}
2909
2910/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2911static void
2912android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2913 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002914 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002915 const char * _exceptionType = NULL;
2916 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002917 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002918 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002919 jint _remaining;
2920 GLuint *framebuffers = (GLuint *) 0;
2921
Romain Guy84cac202016-12-05 12:26:02 -08002922 if (!framebuffers_buf) {
2923 _exception = 1;
2924 _exceptionType = "java/lang/IllegalArgumentException";
2925 _exceptionMessage = "framebuffers == null";
2926 goto exit;
2927 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002928 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002929 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002930 _exception = 1;
2931 _exceptionType = "java/lang/IllegalArgumentException";
2932 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002933 goto exit;
2934 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002935 if (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002936 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002937 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2938 }
Jack Palevich73108672011-03-28 14:49:12 -07002939 glDeleteFramebuffersOES(
2940 (GLsizei)n,
2941 (GLuint *)framebuffers
2942 );
2943
2944exit:
2945 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002946 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002947 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002948 if (_exception) {
2949 jniThrowException(_env, _exceptionType, _exceptionMessage);
2950 }
Jack Palevich27f80022009-04-15 19:13:17 -07002951}
2952
2953/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2954static void
2955android_glGenFramebuffersOES__I_3II
2956 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002957 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002958 const char * _exceptionType = NULL;
2959 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002960 GLuint *framebuffers_base = (GLuint *) 0;
2961 jint _remaining;
2962 GLuint *framebuffers = (GLuint *) 0;
2963
2964 if (!framebuffers_ref) {
2965 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002966 _exceptionType = "java/lang/IllegalArgumentException";
2967 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002968 goto exit;
2969 }
2970 if (offset < 0) {
2971 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002972 _exceptionType = "java/lang/IllegalArgumentException";
2973 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002974 goto exit;
2975 }
2976 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2977 if (_remaining < n) {
2978 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002979 _exceptionType = "java/lang/IllegalArgumentException";
2980 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002981 goto exit;
2982 }
2983 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002984 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002985 framebuffers = framebuffers_base + offset;
2986
2987 glGenFramebuffersOES(
2988 (GLsizei)n,
2989 (GLuint *)framebuffers
2990 );
2991
2992exit:
2993 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002994 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002995 _exception ? JNI_ABORT: 0);
2996 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002997 if (_exception) {
2998 jniThrowException(_env, _exceptionType, _exceptionMessage);
2999 }
Jack Palevich27f80022009-04-15 19:13:17 -07003000}
3001
3002/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
3003static void
3004android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
3005 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07003006 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003007 const char * _exceptionType = NULL;
3008 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003009 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003010 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07003011 jint _remaining;
3012 GLuint *framebuffers = (GLuint *) 0;
3013
Romain Guy84cac202016-12-05 12:26:02 -08003014 if (!framebuffers_buf) {
3015 _exception = 1;
3016 _exceptionType = "java/lang/IllegalArgumentException";
3017 _exceptionMessage = "framebuffers == null";
3018 goto exit;
3019 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003020 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07003021 if (_remaining < n) {
3022 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003023 _exceptionType = "java/lang/IllegalArgumentException";
3024 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003025 goto exit;
3026 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003027 if (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003028 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003029 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
3030 }
Jack Palevich73108672011-03-28 14:49:12 -07003031 glGenFramebuffersOES(
3032 (GLsizei)n,
3033 (GLuint *)framebuffers
3034 );
3035
3036exit:
3037 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003038 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07003039 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003040 if (_exception) {
3041 jniThrowException(_env, _exceptionType, _exceptionMessage);
3042 }
Jack Palevich27f80022009-04-15 19:13:17 -07003043}
3044
3045/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
3046static jint
3047android_glCheckFramebufferStatusOES__I
3048 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07003049 GLenum _returnValue;
3050 _returnValue = glCheckFramebufferStatusOES(
3051 (GLenum)target
3052 );
Andy McFaddencee51982013-04-25 16:08:31 -07003053 return (jint)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07003054}
3055
3056/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
3057static void
3058android_glFramebufferRenderbufferOES__IIII
3059 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07003060 glFramebufferRenderbufferOES(
3061 (GLenum)target,
3062 (GLenum)attachment,
3063 (GLenum)renderbuffertarget,
3064 (GLuint)renderbuffer
3065 );
Jack Palevich27f80022009-04-15 19:13:17 -07003066}
3067
3068/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
3069static void
3070android_glFramebufferTexture2DOES__IIIII
3071 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07003072 glFramebufferTexture2DOES(
3073 (GLenum)target,
3074 (GLenum)attachment,
3075 (GLenum)textarget,
3076 (GLuint)texture,
3077 (GLint)level
3078 );
Jack Palevich27f80022009-04-15 19:13:17 -07003079}
3080
3081/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3082static void
3083android_glGetFramebufferAttachmentParameterivOES__III_3II
3084 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07003085 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003086 const char * _exceptionType = NULL;
3087 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07003088 GLint *params_base = (GLint *) 0;
3089 jint _remaining;
3090 GLint *params = (GLint *) 0;
3091
3092 if (!params_ref) {
3093 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003094 _exceptionType = "java/lang/IllegalArgumentException";
3095 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07003096 goto exit;
3097 }
3098 if (offset < 0) {
3099 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003100 _exceptionType = "java/lang/IllegalArgumentException";
3101 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07003102 goto exit;
3103 }
3104 _remaining = _env->GetArrayLength(params_ref) - offset;
3105 if (_remaining < 1) {
3106 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003107 _exceptionType = "java/lang/IllegalArgumentException";
3108 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003109 goto exit;
3110 }
3111 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003112 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07003113 params = params_base + offset;
3114
3115 glGetFramebufferAttachmentParameterivOES(
3116 (GLenum)target,
3117 (GLenum)attachment,
3118 (GLenum)pname,
3119 (GLint *)params
3120 );
3121
3122exit:
3123 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003124 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07003125 _exception ? JNI_ABORT: 0);
3126 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003127 if (_exception) {
3128 jniThrowException(_env, _exceptionType, _exceptionMessage);
3129 }
Jack Palevich27f80022009-04-15 19:13:17 -07003130}
3131
3132/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3133static void
3134android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
3135 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07003136 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003137 const char * _exceptionType = NULL;
3138 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003139 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003140 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07003141 jint _remaining;
3142 GLint *params = (GLint *) 0;
3143
Romain Guy84cac202016-12-05 12:26:02 -08003144 if (!params_buf) {
3145 _exception = 1;
3146 _exceptionType = "java/lang/IllegalArgumentException";
3147 _exceptionMessage = "params == null";
3148 goto exit;
3149 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003150 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07003151 if (_remaining < 1) {
3152 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003153 _exceptionType = "java/lang/IllegalArgumentException";
3154 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003155 goto exit;
3156 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003157 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003158 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003159 params = (GLint *) (_paramsBase + _bufferOffset);
3160 }
Jack Palevich73108672011-03-28 14:49:12 -07003161 glGetFramebufferAttachmentParameterivOES(
3162 (GLenum)target,
3163 (GLenum)attachment,
3164 (GLenum)pname,
3165 (GLint *)params
3166 );
3167
3168exit:
3169 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003170 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07003171 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003172 if (_exception) {
3173 jniThrowException(_env, _exceptionType, _exceptionMessage);
3174 }
Jack Palevich27f80022009-04-15 19:13:17 -07003175}
3176
3177/* void glGenerateMipmapOES ( GLenum target ) */
3178static void
3179android_glGenerateMipmapOES__I
3180 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07003181 glGenerateMipmapOES(
3182 (GLenum)target
3183 );
Jack Palevich27f80022009-04-15 19:13:17 -07003184}
3185
3186/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
3187static void
3188android_glCurrentPaletteMatrixOES__I
3189 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08003190 glCurrentPaletteMatrixOES(
3191 (GLuint)matrixpaletteindex
3192 );
Jack Palevich27f80022009-04-15 19:13:17 -07003193}
3194
3195/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
3196static void
3197android_glLoadPaletteFromModelViewMatrixOES__
3198 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08003199 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07003200}
3201
3202/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3203static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08003204android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
3205 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
Romain Guy84cac202016-12-05 12:26:02 -08003206 jint _exception = 0;
3207 const char * _exceptionType = NULL;
3208 const char * _exceptionMessage = NULL;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003209 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003210 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003211 jint _remaining;
3212 GLvoid *pointer = (GLvoid *) 0;
3213
3214 if (pointer_buf) {
3215 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3216 if ( ! pointer ) {
3217 return;
3218 }
3219 }
3220 glMatrixIndexPointerOESBounds(
3221 (GLint)size,
3222 (GLenum)type,
3223 (GLsizei)stride,
3224 (GLvoid *)pointer,
3225 (GLsizei)remaining
3226 );
Romain Guy84cac202016-12-05 12:26:02 -08003227 if (_exception) {
3228 jniThrowException(_env, _exceptionType, _exceptionMessage);
3229 }
Jack Palevich27f80022009-04-15 19:13:17 -07003230}
3231
3232/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3233static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08003234android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
3235 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
Romain Guy84cac202016-12-05 12:26:02 -08003236 jint _exception = 0;
3237 const char * _exceptionType = NULL;
3238 const char * _exceptionMessage = NULL;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003239 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003240 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003241 jint _remaining;
3242 GLvoid *pointer = (GLvoid *) 0;
3243
3244 if (pointer_buf) {
3245 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3246 if ( ! pointer ) {
3247 return;
3248 }
3249 }
3250 glWeightPointerOESBounds(
3251 (GLint)size,
3252 (GLenum)type,
3253 (GLsizei)stride,
3254 (GLvoid *)pointer,
3255 (GLsizei)remaining
3256 );
Romain Guy84cac202016-12-05 12:26:02 -08003257 if (_exception) {
3258 jniThrowException(_env, _exceptionType, _exceptionMessage);
3259 }
Jack Palevich27f80022009-04-15 19:13:17 -07003260}
3261
3262/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
3263static void
3264android_glDepthRangefOES__FF
3265 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003266 glDepthRangefOES(
3267 (GLclampf)zNear,
3268 (GLclampf)zFar
3269 );
Jack Palevich27f80022009-04-15 19:13:17 -07003270}
3271
3272/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3273static void
3274android_glFrustumfOES__FFFFFF
3275 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003276 glFrustumfOES(
3277 (GLfloat)left,
3278 (GLfloat)right,
3279 (GLfloat)bottom,
3280 (GLfloat)top,
3281 (GLfloat)zNear,
3282 (GLfloat)zFar
3283 );
Jack Palevich27f80022009-04-15 19:13:17 -07003284}
3285
3286/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3287static void
3288android_glOrthofOES__FFFFFF
3289 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003290 glOrthofOES(
3291 (GLfloat)left,
3292 (GLfloat)right,
3293 (GLfloat)bottom,
3294 (GLfloat)top,
3295 (GLfloat)zNear,
3296 (GLfloat)zFar
3297 );
Jack Palevich27f80022009-04-15 19:13:17 -07003298}
3299
3300/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3301static void
3302android_glClipPlanefOES__I_3FI
3303 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003304 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003305 const char * _exceptionType = NULL;
3306 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003307 GLfloat *equation_base = (GLfloat *) 0;
3308 jint _remaining;
3309 GLfloat *equation = (GLfloat *) 0;
3310
3311 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003312 _exception = 1;
3313 _exceptionType = "java/lang/IllegalArgumentException";
3314 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003315 goto exit;
3316 }
3317 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003318 _exception = 1;
3319 _exceptionType = "java/lang/IllegalArgumentException";
3320 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003321 goto exit;
3322 }
3323 _remaining = _env->GetArrayLength(equation_ref) - offset;
3324 equation_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003325 _env->GetFloatArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003326 equation = equation_base + offset;
3327
3328 glClipPlanefOES(
3329 (GLenum)plane,
3330 (GLfloat *)equation
3331 );
3332
3333exit:
3334 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003335 _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003336 JNI_ABORT);
3337 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003338 if (_exception) {
3339 jniThrowException(_env, _exceptionType, _exceptionMessage);
3340 }
Jack Palevich27f80022009-04-15 19:13:17 -07003341}
3342
3343/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3344static void
3345android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
3346 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003347 jint _exception = 0;
3348 const char * _exceptionType = NULL;
3349 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003350 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003351 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003352 jint _remaining;
3353 GLfloat *equation = (GLfloat *) 0;
3354
Romain Guy84cac202016-12-05 12:26:02 -08003355 if (!equation_buf) {
3356 _exception = 1;
3357 _exceptionType = "java/lang/IllegalArgumentException";
3358 _exceptionMessage = "equation == null";
3359 goto exit;
3360 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003361 equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003362 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003363 char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003364 equation = (GLfloat *) (_equationBase + _bufferOffset);
3365 }
Jack Palevicha3795852009-04-24 10:35:11 -07003366 glClipPlanefOES(
3367 (GLenum)plane,
3368 (GLfloat *)equation
3369 );
Romain Guy84cac202016-12-05 12:26:02 -08003370
3371exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003372 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003373 _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003374 }
Romain Guy84cac202016-12-05 12:26:02 -08003375 if (_exception) {
3376 jniThrowException(_env, _exceptionType, _exceptionMessage);
3377 }
Jack Palevich27f80022009-04-15 19:13:17 -07003378}
3379
3380/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3381static void
3382android_glGetClipPlanefOES__I_3FI
3383 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003384 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003385 const char * _exceptionType = NULL;
3386 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003387 GLfloat *eqn_base = (GLfloat *) 0;
3388 jint _remaining;
3389 GLfloat *eqn = (GLfloat *) 0;
3390
3391 if (!eqn_ref) {
3392 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003393 _exceptionType = "java/lang/IllegalArgumentException";
3394 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003395 goto exit;
3396 }
3397 if (offset < 0) {
3398 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003399 _exceptionType = "java/lang/IllegalArgumentException";
3400 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003401 goto exit;
3402 }
3403 _remaining = _env->GetArrayLength(eqn_ref) - offset;
3404 if (_remaining < 4) {
3405 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003406 _exceptionType = "java/lang/IllegalArgumentException";
3407 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003408 goto exit;
3409 }
3410 eqn_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003411 _env->GetFloatArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003412 eqn = eqn_base + offset;
3413
3414 glGetClipPlanefOES(
3415 (GLenum)pname,
3416 (GLfloat *)eqn
3417 );
3418
3419exit:
3420 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003421 _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003422 _exception ? JNI_ABORT: 0);
3423 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003424 if (_exception) {
3425 jniThrowException(_env, _exceptionType, _exceptionMessage);
3426 }
Jack Palevich27f80022009-04-15 19:13:17 -07003427}
3428
3429/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3430static void
3431android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
3432 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003433 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003434 const char * _exceptionType = NULL;
3435 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003436 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003437 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003438 jint _remaining;
3439 GLfloat *eqn = (GLfloat *) 0;
3440
Romain Guy84cac202016-12-05 12:26:02 -08003441 if (!eqn_buf) {
3442 _exception = 1;
3443 _exceptionType = "java/lang/IllegalArgumentException";
3444 _exceptionMessage = "eqn == null";
3445 goto exit;
3446 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003447 eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07003448 if (_remaining < 4) {
3449 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003450 _exceptionType = "java/lang/IllegalArgumentException";
3451 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003452 goto exit;
3453 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003454 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003455 char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003456 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
3457 }
Jack Palevicha3795852009-04-24 10:35:11 -07003458 glGetClipPlanefOES(
3459 (GLenum)pname,
3460 (GLfloat *)eqn
3461 );
3462
3463exit:
3464 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003465 _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07003466 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003467 if (_exception) {
3468 jniThrowException(_env, _exceptionType, _exceptionMessage);
3469 }
Jack Palevich27f80022009-04-15 19:13:17 -07003470}
3471
3472/* void glClearDepthfOES ( GLclampf depth ) */
3473static void
3474android_glClearDepthfOES__F
3475 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07003476 glClearDepthfOES(
3477 (GLclampf)depth
3478 );
Jack Palevich27f80022009-04-15 19:13:17 -07003479}
3480
3481/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3482static void
3483android_glTexGenfOES__IIF
3484 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003485 glTexGenfOES(
3486 (GLenum)coord,
3487 (GLenum)pname,
3488 (GLfloat)param
3489 );
Jack Palevich27f80022009-04-15 19:13:17 -07003490}
3491
3492/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3493static void
3494android_glTexGenfvOES__II_3FI
3495 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003496 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003497 const char * _exceptionType = NULL;
3498 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003499 GLfloat *params_base = (GLfloat *) 0;
3500 jint _remaining;
3501 GLfloat *params = (GLfloat *) 0;
3502
3503 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003504 _exception = 1;
3505 _exceptionType = "java/lang/IllegalArgumentException";
3506 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003507 goto exit;
3508 }
3509 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003510 _exception = 1;
3511 _exceptionType = "java/lang/IllegalArgumentException";
3512 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003513 goto exit;
3514 }
3515 _remaining = _env->GetArrayLength(params_ref) - offset;
3516 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003517 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003518 params = params_base + offset;
3519
3520 glTexGenfvOES(
3521 (GLenum)coord,
3522 (GLenum)pname,
3523 (GLfloat *)params
3524 );
3525
3526exit:
3527 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003528 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003529 JNI_ABORT);
3530 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003531 if (_exception) {
3532 jniThrowException(_env, _exceptionType, _exceptionMessage);
3533 }
Jack Palevich27f80022009-04-15 19:13:17 -07003534}
3535
3536/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3537static void
3538android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3539 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003540 jint _exception = 0;
3541 const char * _exceptionType = NULL;
3542 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003543 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003544 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003545 jint _remaining;
3546 GLfloat *params = (GLfloat *) 0;
3547
Romain Guy84cac202016-12-05 12:26:02 -08003548 if (!params_buf) {
3549 _exception = 1;
3550 _exceptionType = "java/lang/IllegalArgumentException";
3551 _exceptionMessage = "params == null";
3552 goto exit;
3553 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003554 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003555 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003556 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003557 params = (GLfloat *) (_paramsBase + _bufferOffset);
3558 }
Jack Palevicha3795852009-04-24 10:35:11 -07003559 glTexGenfvOES(
3560 (GLenum)coord,
3561 (GLenum)pname,
3562 (GLfloat *)params
3563 );
Romain Guy84cac202016-12-05 12:26:02 -08003564
3565exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003566 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003567 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003568 }
Romain Guy84cac202016-12-05 12:26:02 -08003569 if (_exception) {
3570 jniThrowException(_env, _exceptionType, _exceptionMessage);
3571 }
Jack Palevich27f80022009-04-15 19:13:17 -07003572}
3573
3574/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3575static void
3576android_glTexGeniOES__III
3577 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003578 glTexGeniOES(
3579 (GLenum)coord,
3580 (GLenum)pname,
3581 (GLint)param
3582 );
Jack Palevich27f80022009-04-15 19:13:17 -07003583}
3584
3585/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3586static void
3587android_glTexGenivOES__II_3II
3588 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003589 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003590 const char * _exceptionType = NULL;
3591 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003592 GLint *params_base = (GLint *) 0;
3593 jint _remaining;
3594 GLint *params = (GLint *) 0;
3595
3596 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003597 _exception = 1;
3598 _exceptionType = "java/lang/IllegalArgumentException";
3599 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003600 goto exit;
3601 }
3602 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003603 _exception = 1;
3604 _exceptionType = "java/lang/IllegalArgumentException";
3605 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003606 goto exit;
3607 }
3608 _remaining = _env->GetArrayLength(params_ref) - offset;
3609 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003610 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003611 params = params_base + offset;
3612
3613 glTexGenivOES(
3614 (GLenum)coord,
3615 (GLenum)pname,
3616 (GLint *)params
3617 );
3618
3619exit:
3620 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003621 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003622 JNI_ABORT);
3623 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003624 if (_exception) {
3625 jniThrowException(_env, _exceptionType, _exceptionMessage);
3626 }
Jack Palevich27f80022009-04-15 19:13:17 -07003627}
3628
3629/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3630static void
3631android_glTexGenivOES__IILjava_nio_IntBuffer_2
3632 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003633 jint _exception = 0;
3634 const char * _exceptionType = NULL;
3635 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003636 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003637 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003638 jint _remaining;
3639 GLint *params = (GLint *) 0;
3640
Romain Guy84cac202016-12-05 12:26:02 -08003641 if (!params_buf) {
3642 _exception = 1;
3643 _exceptionType = "java/lang/IllegalArgumentException";
3644 _exceptionMessage = "params == null";
3645 goto exit;
3646 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003647 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003648 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003649 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003650 params = (GLint *) (_paramsBase + _bufferOffset);
3651 }
Jack Palevicha3795852009-04-24 10:35:11 -07003652 glTexGenivOES(
3653 (GLenum)coord,
3654 (GLenum)pname,
3655 (GLint *)params
3656 );
Romain Guy84cac202016-12-05 12:26:02 -08003657
3658exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003659 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003660 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003661 }
Romain Guy84cac202016-12-05 12:26:02 -08003662 if (_exception) {
3663 jniThrowException(_env, _exceptionType, _exceptionMessage);
3664 }
Jack Palevich27f80022009-04-15 19:13:17 -07003665}
3666
3667/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3668static void
3669android_glTexGenxOES__III
3670 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003671 glTexGenxOES(
3672 (GLenum)coord,
3673 (GLenum)pname,
3674 (GLfixed)param
3675 );
Jack Palevich27f80022009-04-15 19:13:17 -07003676}
3677
3678/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3679static void
3680android_glTexGenxvOES__II_3II
3681 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003682 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003683 const char * _exceptionType = NULL;
3684 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003685 GLfixed *params_base = (GLfixed *) 0;
3686 jint _remaining;
3687 GLfixed *params = (GLfixed *) 0;
3688
3689 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003690 _exception = 1;
3691 _exceptionType = "java/lang/IllegalArgumentException";
3692 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003693 goto exit;
3694 }
3695 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003696 _exception = 1;
3697 _exceptionType = "java/lang/IllegalArgumentException";
3698 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003699 goto exit;
3700 }
3701 _remaining = _env->GetArrayLength(params_ref) - offset;
3702 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003703 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003704 params = params_base + offset;
3705
3706 glTexGenxvOES(
3707 (GLenum)coord,
3708 (GLenum)pname,
3709 (GLfixed *)params
3710 );
3711
3712exit:
3713 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003714 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003715 JNI_ABORT);
3716 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003717 if (_exception) {
3718 jniThrowException(_env, _exceptionType, _exceptionMessage);
3719 }
Jack Palevich27f80022009-04-15 19:13:17 -07003720}
3721
3722/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3723static void
3724android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3725 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003726 jint _exception = 0;
3727 const char * _exceptionType = NULL;
3728 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003729 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003730 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003731 jint _remaining;
3732 GLfixed *params = (GLfixed *) 0;
3733
Romain Guy84cac202016-12-05 12:26:02 -08003734 if (!params_buf) {
3735 _exception = 1;
3736 _exceptionType = "java/lang/IllegalArgumentException";
3737 _exceptionMessage = "params == null";
3738 goto exit;
3739 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003740 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003741 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003742 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003743 params = (GLfixed *) (_paramsBase + _bufferOffset);
3744 }
Jack Palevicha3795852009-04-24 10:35:11 -07003745 glTexGenxvOES(
3746 (GLenum)coord,
3747 (GLenum)pname,
3748 (GLfixed *)params
3749 );
Romain Guy84cac202016-12-05 12:26:02 -08003750
3751exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003752 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003753 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003754 }
Romain Guy84cac202016-12-05 12:26:02 -08003755 if (_exception) {
3756 jniThrowException(_env, _exceptionType, _exceptionMessage);
3757 }
Jack Palevich27f80022009-04-15 19:13:17 -07003758}
3759
3760/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3761static void
3762android_glGetTexGenfvOES__II_3FI
3763 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003764 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003765 const char * _exceptionType = NULL;
3766 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003767 GLfloat *params_base = (GLfloat *) 0;
3768 jint _remaining;
3769 GLfloat *params = (GLfloat *) 0;
3770
3771 if (!params_ref) {
3772 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003773 _exceptionType = "java/lang/IllegalArgumentException";
3774 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003775 goto exit;
3776 }
3777 if (offset < 0) {
3778 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003779 _exceptionType = "java/lang/IllegalArgumentException";
3780 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003781 goto exit;
3782 }
3783 _remaining = _env->GetArrayLength(params_ref) - offset;
3784 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003785 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003786 params = params_base + offset;
3787
3788 glGetTexGenfvOES(
3789 (GLenum)coord,
3790 (GLenum)pname,
3791 (GLfloat *)params
3792 );
3793
3794exit:
3795 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003796 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003797 _exception ? JNI_ABORT: 0);
3798 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003799 if (_exception) {
3800 jniThrowException(_env, _exceptionType, _exceptionMessage);
3801 }
Jack Palevich27f80022009-04-15 19:13:17 -07003802}
3803
3804/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3805static void
3806android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3807 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003808 jint _exception = 0;
3809 const char * _exceptionType = NULL;
3810 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003811 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003812 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003813 jint _remaining;
3814 GLfloat *params = (GLfloat *) 0;
3815
Romain Guy84cac202016-12-05 12:26:02 -08003816 if (!params_buf) {
3817 _exception = 1;
3818 _exceptionType = "java/lang/IllegalArgumentException";
3819 _exceptionMessage = "params == null";
3820 goto exit;
3821 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003822 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003823 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003824 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003825 params = (GLfloat *) (_paramsBase + _bufferOffset);
3826 }
Jack Palevicha3795852009-04-24 10:35:11 -07003827 glGetTexGenfvOES(
3828 (GLenum)coord,
3829 (GLenum)pname,
3830 (GLfloat *)params
3831 );
Romain Guy84cac202016-12-05 12:26:02 -08003832
3833exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003834 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003835 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3836 }
3837 if (_exception) {
3838 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07003839 }
Jack Palevich27f80022009-04-15 19:13:17 -07003840}
3841
3842/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3843static void
3844android_glGetTexGenivOES__II_3II
3845 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003846 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003847 const char * _exceptionType = NULL;
3848 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003849 GLint *params_base = (GLint *) 0;
3850 jint _remaining;
3851 GLint *params = (GLint *) 0;
3852
3853 if (!params_ref) {
3854 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003855 _exceptionType = "java/lang/IllegalArgumentException";
3856 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003857 goto exit;
3858 }
3859 if (offset < 0) {
3860 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003861 _exceptionType = "java/lang/IllegalArgumentException";
3862 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003863 goto exit;
3864 }
3865 _remaining = _env->GetArrayLength(params_ref) - offset;
3866 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003867 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003868 params = params_base + offset;
3869
3870 glGetTexGenivOES(
3871 (GLenum)coord,
3872 (GLenum)pname,
3873 (GLint *)params
3874 );
3875
3876exit:
3877 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003878 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003879 _exception ? JNI_ABORT: 0);
3880 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003881 if (_exception) {
3882 jniThrowException(_env, _exceptionType, _exceptionMessage);
3883 }
Jack Palevich27f80022009-04-15 19:13:17 -07003884}
3885
3886/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3887static void
3888android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3889 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003890 jint _exception = 0;
3891 const char * _exceptionType = NULL;
3892 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003893 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003894 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003895 jint _remaining;
3896 GLint *params = (GLint *) 0;
3897
Romain Guy84cac202016-12-05 12:26:02 -08003898 if (!params_buf) {
3899 _exception = 1;
3900 _exceptionType = "java/lang/IllegalArgumentException";
3901 _exceptionMessage = "params == null";
3902 goto exit;
3903 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003904 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003905 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003906 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003907 params = (GLint *) (_paramsBase + _bufferOffset);
3908 }
Jack Palevicha3795852009-04-24 10:35:11 -07003909 glGetTexGenivOES(
3910 (GLenum)coord,
3911 (GLenum)pname,
3912 (GLint *)params
3913 );
Romain Guy84cac202016-12-05 12:26:02 -08003914
3915exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003916 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003917 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3918 }
3919 if (_exception) {
3920 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07003921 }
Jack Palevich27f80022009-04-15 19:13:17 -07003922}
3923
3924/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3925static void
3926android_glGetTexGenxvOES__II_3II
3927 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003928 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003929 const char * _exceptionType = NULL;
3930 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003931 GLfixed *params_base = (GLfixed *) 0;
3932 jint _remaining;
3933 GLfixed *params = (GLfixed *) 0;
3934
3935 if (!params_ref) {
3936 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003937 _exceptionType = "java/lang/IllegalArgumentException";
3938 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003939 goto exit;
3940 }
3941 if (offset < 0) {
3942 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003943 _exceptionType = "java/lang/IllegalArgumentException";
3944 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003945 goto exit;
3946 }
3947 _remaining = _env->GetArrayLength(params_ref) - offset;
3948 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003949 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003950 params = params_base + offset;
3951
3952 glGetTexGenxvOES(
3953 (GLenum)coord,
3954 (GLenum)pname,
3955 (GLfixed *)params
3956 );
3957
3958exit:
3959 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003960 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003961 _exception ? JNI_ABORT: 0);
3962 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003963 if (_exception) {
3964 jniThrowException(_env, _exceptionType, _exceptionMessage);
3965 }
Jack Palevich27f80022009-04-15 19:13:17 -07003966}
3967
3968/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3969static void
3970android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3971 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003972 jint _exception = 0;
3973 const char * _exceptionType = NULL;
3974 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003975 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003976 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003977 jint _remaining;
3978 GLfixed *params = (GLfixed *) 0;
3979
Romain Guy84cac202016-12-05 12:26:02 -08003980 if (!params_buf) {
3981 _exception = 1;
3982 _exceptionType = "java/lang/IllegalArgumentException";
3983 _exceptionMessage = "params == null";
3984 goto exit;
3985 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003986 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003987 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003988 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003989 params = (GLfixed *) (_paramsBase + _bufferOffset);
3990 }
Jack Palevicha3795852009-04-24 10:35:11 -07003991 glGetTexGenxvOES(
3992 (GLenum)coord,
3993 (GLenum)pname,
3994 (GLfixed *)params
3995 );
Romain Guy84cac202016-12-05 12:26:02 -08003996
3997exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003998 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003999 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
4000 }
4001 if (_exception) {
4002 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07004003 }
Jack Palevich27f80022009-04-15 19:13:17 -07004004}
4005
4006static const char *classPathName = "android/opengl/GLES11Ext";
4007
Daniel Micay76f6a862015-09-19 17:31:01 -04004008static const JNINativeMethod methods[] = {
Jack Palevich27f80022009-04-15 19:13:17 -07004009{"_nativeClassInit", "()V", (void*)nativeClassInit },
4010{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
4011{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
4012{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
4013{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
4014{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
4015{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
4016{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
4017{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
4018{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
4019{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
4020{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
4021{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
4022{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
4023{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
4024{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
4025{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
4026{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
4027{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
4028{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
4029{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
4030{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
4031{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
4032{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
4033{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
4034{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
4035{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
4036{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
4037{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
4038{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
4039{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
4040{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
4041{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
4042{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
4043{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
4044{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
4045{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
4046{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
4047{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4048{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
4049{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4050{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
4051{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
4052{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
4053{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
4054{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
4055{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
4056{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
4057{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
4058{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
4059{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
4060{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
4061{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
4062{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
4063{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
4064{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
4065{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
4066{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
4067{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
4068{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
4069{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
4070{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
4071{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
4072{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
4073{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
4074{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
4075{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
4076{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
4077{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4078{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
4079{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
4080{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4081{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
4082{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
4083{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
4084{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
4085{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4086{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
4087{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4088{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
4089{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
4090{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
4091{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
4092{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
4093{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
4094{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
4095{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
4096{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
4097{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
4098{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
4099{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
4100{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
4101{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
4102{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
4103{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
4104{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08004105{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
4106{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07004107{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
4108{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
4109{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
4110{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
4111{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4112{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
4113{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4114{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
4115{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
4116{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
4117{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4118{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
4119{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
4120{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
4121{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
4122{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
4123{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
4124{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
4125{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4126{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
4127{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
4128{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
4129{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
4130};
4131
4132int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
4133{
4134 int err;
4135 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
4136 return err;
4137}