blob: 1144d5bfb4e69fcff92972c252189b4dfb56f85a [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
Mathias Agopian2ad04772013-02-23 03:12:30 -080032
33/* special calls implemented in Android's GLES wrapper used to more
34 * efficiently bound-check passed arrays */
35extern "C" {
36#ifdef GL_VERSION_ES_CM_1_1
37GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
38 const GLvoid *ptr, GLsizei count);
39GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
40 const GLvoid *pointer, GLsizei count);
41GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
42 GLsizei stride, const GLvoid *pointer, GLsizei count);
43GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
44 GLsizei stride, const GLvoid *pointer, GLsizei count);
45GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
46 GLsizei stride, const GLvoid *pointer, GLsizei count);
47GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
48 GLsizei stride, const GLvoid *pointer, GLsizei count);
49GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
50 GLsizei stride, const GLvoid *pointer, GLsizei count);
51#endif
52#ifdef GL_ES_VERSION_2_0
53static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
54 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
55 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
56}
57#endif
Andy McFaddencee51982013-04-25 16:08:31 -070058#ifdef GL_ES_VERSION_3_0
59static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count) {
61 glVertexAttribIPointer(indx, size, type, stride, pointer);
62}
63#endif
Mathias Agopian2ad04772013-02-23 03:12:30 -080064}
65
Jack Palevich27f80022009-04-15 19:13:17 -070066static void
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070067nativeClassInit(JNIEnv *_env, jclass glImplClass)
Jack Palevich27f80022009-04-15 19:13:17 -070068{
Jack Palevich27f80022009-04-15 19:13:17 -070069}
70
Jack Palevich27f80022009-04-15 19:13:17 -070071static void *
Thomas Tafertshofer17045a12012-07-12 13:55:55 -070072getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
Jack Palevich27f80022009-04-15 19:13:17 -070073{
74 jint position;
75 jint limit;
76 jint elementSizeShift;
77 jlong pointer;
Jack Palevich27f80022009-04-15 19:13:17 -070078
Orion Hodson617835922019-02-28 15:15:34 +000079 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
Jack Palevich27f80022009-04-15 19:13:17 -070080 *remaining = (limit - position) << elementSizeShift;
Jack Palevich27f80022009-04-15 19:13:17 -070081 if (pointer != 0L) {
Orion Hodson617835922019-02-28 15:15:34 +000082 *array = nullptr;
83 pointer += position << elementSizeShift;
Ashok Bhat01c26ea2014-02-24 09:49:07 +000084 return reinterpret_cast<void*>(pointer);
Jack Palevich27f80022009-04-15 19:13:17 -070085 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070086
Orion Hodson617835922019-02-28 15:15:34 +000087 *array = jniGetNioBufferBaseArray(_env, buffer);
88 *offset = jniGetNioBufferBaseArrayOffset(_env, buffer);
89 return nullptr;
Jack Palevich27f80022009-04-15 19:13:17 -070090}
91
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -070092class ByteArrayGetter {
93public:
94 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
95 return _env->GetByteArrayElements(array, is_copy);
96 }
97};
98class BooleanArrayGetter {
99public:
100 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
101 return _env->GetBooleanArrayElements(array, is_copy);
102 }
103};
104class CharArrayGetter {
105public:
106 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
107 return _env->GetCharArrayElements(array, is_copy);
108 }
109};
110class ShortArrayGetter {
111public:
112 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
113 return _env->GetShortArrayElements(array, is_copy);
114 }
115};
116class IntArrayGetter {
117public:
118 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
119 return _env->GetIntArrayElements(array, is_copy);
120 }
121};
122class LongArrayGetter {
123public:
124 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
125 return _env->GetLongArrayElements(array, is_copy);
126 }
127};
128class FloatArrayGetter {
129public:
130 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
131 return _env->GetFloatArrayElements(array, is_copy);
132 }
133};
134class DoubleArrayGetter {
135public:
136 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
137 return _env->GetDoubleArrayElements(array, is_copy);
138 }
139};
140
141template<typename JTYPEARRAY, typename ARRAYGETTER>
142static void*
143getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
144 return ARRAYGETTER::Get(_env, array, is_copy);
145}
146
147class ByteArrayReleaser {
148public:
149 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
150 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
151 }
152};
153class BooleanArrayReleaser {
154public:
155 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
156 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
157 }
158};
159class CharArrayReleaser {
160public:
161 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
162 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
163 }
164};
165class ShortArrayReleaser {
166public:
167 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
168 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
169 }
170};
171class IntArrayReleaser {
172public:
173 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
174 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
175 }
176};
177class LongArrayReleaser {
178public:
179 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
180 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
181 }
182};
183class FloatArrayReleaser {
184public:
185 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
186 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
187 }
188};
189class DoubleArrayReleaser {
190public:
191 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
192 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
193 }
194};
195
196template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
197static void
198releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
199 ARRAYRELEASER::Release(_env, array, data, commit);
200}
201
Jack Palevich27f80022009-04-15 19:13:17 -0700202static void
203releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
204{
205 _env->ReleasePrimitiveArrayCritical(array, data,
Mathias Agopian2ad04772013-02-23 03:12:30 -0800206 commit ? 0 : JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700207}
208
Jack Palevichbe6eac82009-12-08 15:43:51 +0800209static void *
210getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
Orion Hodson617835922019-02-28 15:15:34 +0000211 jint position;
212 jint limit;
213 jint elementSizeShift;
214 jlong pointer;
215 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
216 if (pointer == 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700217 jniThrowException(_env, "java/lang/IllegalArgumentException",
218 "Must use a native order direct Buffer");
Orion Hodson617835922019-02-28 15:15:34 +0000219 return nullptr;
Jack Palevichbe6eac82009-12-08 15:43:51 +0800220 }
Orion Hodson617835922019-02-28 15:15:34 +0000221 pointer += position << elementSizeShift;
222 return reinterpret_cast<void*>(pointer);
Jack Palevichbe6eac82009-12-08 15:43:51 +0800223}
Mathias Agopian2ad04772013-02-23 03:12:30 -0800224
225// --------------------------------------------------------------------------
226
227/*
228 * returns the number of values glGet returns for a given pname.
229 *
230 * The code below is written such that pnames requiring only one values
231 * are the default (and are not explicitely tested for). This makes the
232 * checking code much shorter/readable/efficient.
233 *
234 * This means that unknown pnames (e.g.: extensions) will default to 1. If
235 * that unknown pname needs more than 1 value, then the validation check
236 * is incomplete and the app may crash if it passed the wrong number params.
237 */
238static int getNeededCount(GLint pname) {
239 int needed = 1;
Romain Guydc43a6c2017-02-17 19:54:25 -0800240#ifdef GL_ES_VERSION_3_0
241 // GLES 3.x pnames
242 switch (pname) {
243 case GL_MAX_VIEWPORT_DIMS:
244 needed = 2;
245 break;
246
247 case GL_PROGRAM_BINARY_FORMATS:
248 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
249 break;
250 }
251#endif
252
Mathias Agopian2ad04772013-02-23 03:12:30 -0800253#ifdef GL_ES_VERSION_2_0
254 // GLES 2.x pnames
255 switch (pname) {
256 case GL_ALIASED_LINE_WIDTH_RANGE:
257 case GL_ALIASED_POINT_SIZE_RANGE:
258 needed = 2;
259 break;
260
261 case GL_BLEND_COLOR:
262 case GL_COLOR_CLEAR_VALUE:
263 case GL_COLOR_WRITEMASK:
264 case GL_SCISSOR_BOX:
265 case GL_VIEWPORT:
266 needed = 4;
267 break;
268
269 case GL_COMPRESSED_TEXTURE_FORMATS:
270 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
271 break;
272
273 case GL_SHADER_BINARY_FORMATS:
274 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
275 break;
276 }
277#endif
278
279#ifdef GL_VERSION_ES_CM_1_1
280 // GLES 1.x pnames
281 switch (pname) {
282 case GL_ALIASED_LINE_WIDTH_RANGE:
283 case GL_ALIASED_POINT_SIZE_RANGE:
284 case GL_DEPTH_RANGE:
285 case GL_SMOOTH_LINE_WIDTH_RANGE:
286 case GL_SMOOTH_POINT_SIZE_RANGE:
287 needed = 2;
288 break;
289
290 case GL_CURRENT_NORMAL:
291 case GL_POINT_DISTANCE_ATTENUATION:
292 needed = 3;
293 break;
294
295 case GL_COLOR_CLEAR_VALUE:
296 case GL_COLOR_WRITEMASK:
297 case GL_CURRENT_COLOR:
298 case GL_CURRENT_TEXTURE_COORDS:
299 case GL_FOG_COLOR:
300 case GL_LIGHT_MODEL_AMBIENT:
301 case GL_SCISSOR_BOX:
302 case GL_VIEWPORT:
303 needed = 4;
304 break;
305
306 case GL_MODELVIEW_MATRIX:
307 case GL_PROJECTION_MATRIX:
308 case GL_TEXTURE_MATRIX:
309 needed = 16;
310 break;
311
312 case GL_COMPRESSED_TEXTURE_FORMATS:
313 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
314 break;
315 }
316#endif
317 return needed;
318}
319
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700320template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
321 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800322static void
323get
324 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
325 jint _exception = 0;
326 const char * _exceptionType;
327 const char * _exceptionMessage;
328 CTYPE *params_base = (CTYPE *) 0;
329 jint _remaining;
330 CTYPE *params = (CTYPE *) 0;
331 int _needed = 0;
332
333 if (!params_ref) {
334 _exception = 1;
335 _exceptionType = "java/lang/IllegalArgumentException";
336 _exceptionMessage = "params == null";
337 goto exit;
338 }
339 if (offset < 0) {
340 _exception = 1;
341 _exceptionType = "java/lang/IllegalArgumentException";
342 _exceptionMessage = "offset < 0";
343 goto exit;
344 }
345 _remaining = _env->GetArrayLength(params_ref) - offset;
346 _needed = getNeededCount(pname);
347 // if we didn't find this pname, we just assume the user passed
348 // an array of the right size -- this might happen with extensions
349 // or if we forget an enum here.
350 if (_remaining < _needed) {
351 _exception = 1;
352 _exceptionType = "java/lang/IllegalArgumentException";
353 _exceptionMessage = "length - offset < needed";
354 goto exit;
355 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700356 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
357 _env, params_ref, (jboolean *)0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800358 params = params_base + offset;
359
360 GET(
361 (GLenum)pname,
362 (CTYPE *)params
363 );
364
365exit:
366 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700367 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
368 _env, params_ref, params_base, !_exception);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800369 }
370 if (_exception) {
371 jniThrowException(_env, _exceptionType, _exceptionMessage);
372 }
373}
374
375
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700376template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
377 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800378static void
379getarray
380 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
381 jint _exception = 0;
382 const char * _exceptionType;
383 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700384 JTYPEARRAY _array = (JTYPEARRAY) 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800385 jint _bufferOffset = (jint) 0;
386 jint _remaining;
387 CTYPE *params = (CTYPE *) 0;
388 int _needed = 0;
389
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700390 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Andy McFaddencee51982013-04-25 16:08:31 -0700391 _remaining /= sizeof(CTYPE); // convert from bytes to item count
Mathias Agopian2ad04772013-02-23 03:12:30 -0800392 _needed = getNeededCount(pname);
393 // if we didn't find this pname, we just assume the user passed
394 // an array of the right size -- this might happen with extensions
395 // or if we forget an enum here.
396 if (_needed>0 && _remaining < _needed) {
397 _exception = 1;
398 _exceptionType = "java/lang/IllegalArgumentException";
399 _exceptionMessage = "remaining() < needed";
400 goto exit;
401 }
402 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700403 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
404 _env, _array, (jboolean *) 0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800405 params = (CTYPE *) (_paramsBase + _bufferOffset);
406 }
407 GET(
408 (GLenum)pname,
409 (CTYPE *)params
410 );
411
412exit:
413 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700414 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
415 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800416 }
417 if (_exception) {
418 jniThrowException(_env, _exceptionType, _exceptionMessage);
419 }
420}
421
Jack Palevich27f80022009-04-15 19:13:17 -0700422// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700423/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
424static void
425android_glBlendEquationSeparateOES__II
426 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700427 glBlendEquationSeparateOES(
428 (GLenum)modeRGB,
429 (GLenum)modeAlpha
430 );
Jack Palevich27f80022009-04-15 19:13:17 -0700431}
432
433/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
434static void
435android_glBlendFuncSeparateOES__IIII
436 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700437 glBlendFuncSeparateOES(
438 (GLenum)srcRGB,
439 (GLenum)dstRGB,
440 (GLenum)srcAlpha,
441 (GLenum)dstAlpha
442 );
Jack Palevich27f80022009-04-15 19:13:17 -0700443}
444
445/* void glBlendEquationOES ( GLenum mode ) */
446static void
447android_glBlendEquationOES__I
448 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700449 glBlendEquationOES(
450 (GLenum)mode
451 );
Jack Palevich27f80022009-04-15 19:13:17 -0700452}
453
454/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
455static void
456android_glDrawTexsOES__SSSSS
457 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
458 glDrawTexsOES(
459 (GLshort)x,
460 (GLshort)y,
461 (GLshort)z,
462 (GLshort)width,
463 (GLshort)height
464 );
465}
466
467/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
468static void
469android_glDrawTexiOES__IIIII
470 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
471 glDrawTexiOES(
472 (GLint)x,
473 (GLint)y,
474 (GLint)z,
475 (GLint)width,
476 (GLint)height
477 );
478}
479
480/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
481static void
482android_glDrawTexxOES__IIIII
483 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
484 glDrawTexxOES(
485 (GLfixed)x,
486 (GLfixed)y,
487 (GLfixed)z,
488 (GLfixed)width,
489 (GLfixed)height
490 );
491}
492
493/* void glDrawTexsvOES ( const GLshort *coords ) */
494static void
495android_glDrawTexsvOES___3SI
496 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700497 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800498 const char * _exceptionType = NULL;
499 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700500 GLshort *coords_base = (GLshort *) 0;
501 jint _remaining;
502 GLshort *coords = (GLshort *) 0;
503
504 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700505 _exception = 1;
506 _exceptionType = "java/lang/IllegalArgumentException";
507 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700508 goto exit;
509 }
510 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700511 _exception = 1;
512 _exceptionType = "java/lang/IllegalArgumentException";
513 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700514 goto exit;
515 }
516 _remaining = _env->GetArrayLength(coords_ref) - offset;
517 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700518 _exception = 1;
519 _exceptionType = "java/lang/IllegalArgumentException";
520 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700521 goto exit;
522 }
523 coords_base = (GLshort *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700524 _env->GetShortArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700525 coords = coords_base + offset;
526
527 glDrawTexsvOES(
528 (GLshort *)coords
529 );
530
531exit:
532 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700533 _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700534 JNI_ABORT);
535 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700536 if (_exception) {
537 jniThrowException(_env, _exceptionType, _exceptionMessage);
538 }
Jack Palevich27f80022009-04-15 19:13:17 -0700539}
540
541/* void glDrawTexsvOES ( const GLshort *coords ) */
542static void
543android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
544 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700545 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800546 const char * _exceptionType = NULL;
547 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700548 jshortArray _array = (jshortArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700549 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700550 jint _remaining;
551 GLshort *coords = (GLshort *) 0;
552
Romain Guy84cac202016-12-05 12:26:02 -0800553 if (!coords_buf) {
554 _exception = 1;
555 _exceptionType = "java/lang/IllegalArgumentException";
556 _exceptionMessage = "coords == null";
557 goto exit;
558 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700559 coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700560 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700561 _exception = 1;
562 _exceptionType = "java/lang/IllegalArgumentException";
563 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700564 goto exit;
565 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700566 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700567 char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700568 coords = (GLshort *) (_coordsBase + _bufferOffset);
569 }
Jack Palevich27f80022009-04-15 19:13:17 -0700570 glDrawTexsvOES(
571 (GLshort *)coords
572 );
573
574exit:
575 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700576 _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700577 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700578 if (_exception) {
579 jniThrowException(_env, _exceptionType, _exceptionMessage);
580 }
Jack Palevich27f80022009-04-15 19:13:17 -0700581}
582
583/* void glDrawTexivOES ( const GLint *coords ) */
584static void
585android_glDrawTexivOES___3II
586 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700587 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800588 const char * _exceptionType = NULL;
589 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700590 GLint *coords_base = (GLint *) 0;
591 jint _remaining;
592 GLint *coords = (GLint *) 0;
593
594 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700595 _exception = 1;
596 _exceptionType = "java/lang/IllegalArgumentException";
597 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700598 goto exit;
599 }
600 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700601 _exception = 1;
602 _exceptionType = "java/lang/IllegalArgumentException";
603 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700604 goto exit;
605 }
606 _remaining = _env->GetArrayLength(coords_ref) - offset;
607 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700608 _exception = 1;
609 _exceptionType = "java/lang/IllegalArgumentException";
610 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700611 goto exit;
612 }
613 coords_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700614 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700615 coords = coords_base + offset;
616
617 glDrawTexivOES(
618 (GLint *)coords
619 );
620
621exit:
622 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700623 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700624 JNI_ABORT);
625 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700626 if (_exception) {
627 jniThrowException(_env, _exceptionType, _exceptionMessage);
628 }
Jack Palevich27f80022009-04-15 19:13:17 -0700629}
630
631/* void glDrawTexivOES ( const GLint *coords ) */
632static void
633android_glDrawTexivOES__Ljava_nio_IntBuffer_2
634 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700635 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800636 const char * _exceptionType = NULL;
637 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700638 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700639 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700640 jint _remaining;
641 GLint *coords = (GLint *) 0;
642
Romain Guy84cac202016-12-05 12:26:02 -0800643 if (!coords_buf) {
644 _exception = 1;
645 _exceptionType = "java/lang/IllegalArgumentException";
646 _exceptionMessage = "coords == null";
647 goto exit;
648 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700649 coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700650 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700651 _exception = 1;
652 _exceptionType = "java/lang/IllegalArgumentException";
653 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700654 goto exit;
655 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700656 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700657 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700658 coords = (GLint *) (_coordsBase + _bufferOffset);
659 }
Jack Palevich27f80022009-04-15 19:13:17 -0700660 glDrawTexivOES(
661 (GLint *)coords
662 );
663
664exit:
665 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700666 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700667 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700668 if (_exception) {
669 jniThrowException(_env, _exceptionType, _exceptionMessage);
670 }
Jack Palevich27f80022009-04-15 19:13:17 -0700671}
672
673/* void glDrawTexxvOES ( const GLfixed *coords ) */
674static void
675android_glDrawTexxvOES___3II
676 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700677 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800678 const char * _exceptionType = NULL;
679 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700680 GLfixed *coords_base = (GLfixed *) 0;
681 jint _remaining;
682 GLfixed *coords = (GLfixed *) 0;
683
684 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700685 _exception = 1;
686 _exceptionType = "java/lang/IllegalArgumentException";
687 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700688 goto exit;
689 }
690 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700691 _exception = 1;
692 _exceptionType = "java/lang/IllegalArgumentException";
693 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700694 goto exit;
695 }
696 _remaining = _env->GetArrayLength(coords_ref) - offset;
697 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700698 _exception = 1;
699 _exceptionType = "java/lang/IllegalArgumentException";
700 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700701 goto exit;
702 }
703 coords_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700704 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700705 coords = coords_base + offset;
706
707 glDrawTexxvOES(
708 (GLfixed *)coords
709 );
710
711exit:
712 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700713 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700714 JNI_ABORT);
715 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700716 if (_exception) {
717 jniThrowException(_env, _exceptionType, _exceptionMessage);
718 }
Jack Palevich27f80022009-04-15 19:13:17 -0700719}
720
721/* void glDrawTexxvOES ( const GLfixed *coords ) */
722static void
723android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
724 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700725 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800726 const char * _exceptionType = NULL;
727 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700728 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700729 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700730 jint _remaining;
731 GLfixed *coords = (GLfixed *) 0;
732
Romain Guy84cac202016-12-05 12:26:02 -0800733 if (!coords_buf) {
734 _exception = 1;
735 _exceptionType = "java/lang/IllegalArgumentException";
736 _exceptionMessage = "coords == null";
737 goto exit;
738 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700739 coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700740 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700741 _exception = 1;
742 _exceptionType = "java/lang/IllegalArgumentException";
743 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700744 goto exit;
745 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700746 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700747 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700748 coords = (GLfixed *) (_coordsBase + _bufferOffset);
749 }
Jack Palevich27f80022009-04-15 19:13:17 -0700750 glDrawTexxvOES(
751 (GLfixed *)coords
752 );
753
754exit:
755 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700756 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700757 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700758 if (_exception) {
759 jniThrowException(_env, _exceptionType, _exceptionMessage);
760 }
Jack Palevich27f80022009-04-15 19:13:17 -0700761}
762
763/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
764static void
765android_glDrawTexfOES__FFFFF
766 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
767 glDrawTexfOES(
768 (GLfloat)x,
769 (GLfloat)y,
770 (GLfloat)z,
771 (GLfloat)width,
772 (GLfloat)height
773 );
774}
775
776/* void glDrawTexfvOES ( const GLfloat *coords ) */
777static void
778android_glDrawTexfvOES___3FI
779 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700780 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800781 const char * _exceptionType = NULL;
782 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700783 GLfloat *coords_base = (GLfloat *) 0;
784 jint _remaining;
785 GLfloat *coords = (GLfloat *) 0;
786
787 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700788 _exception = 1;
789 _exceptionType = "java/lang/IllegalArgumentException";
790 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700791 goto exit;
792 }
793 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700794 _exception = 1;
795 _exceptionType = "java/lang/IllegalArgumentException";
796 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700797 goto exit;
798 }
799 _remaining = _env->GetArrayLength(coords_ref) - offset;
800 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700801 _exception = 1;
802 _exceptionType = "java/lang/IllegalArgumentException";
803 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700804 goto exit;
805 }
806 coords_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700807 _env->GetFloatArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700808 coords = coords_base + offset;
809
810 glDrawTexfvOES(
811 (GLfloat *)coords
812 );
813
814exit:
815 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700816 _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700817 JNI_ABORT);
818 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700819 if (_exception) {
820 jniThrowException(_env, _exceptionType, _exceptionMessage);
821 }
Jack Palevich27f80022009-04-15 19:13:17 -0700822}
823
824/* void glDrawTexfvOES ( const GLfloat *coords ) */
825static void
826android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
827 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700828 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800829 const char * _exceptionType = NULL;
830 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700831 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700832 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700833 jint _remaining;
834 GLfloat *coords = (GLfloat *) 0;
835
Romain Guy84cac202016-12-05 12:26:02 -0800836 if (!coords_buf) {
837 _exception = 1;
838 _exceptionType = "java/lang/IllegalArgumentException";
839 _exceptionMessage = "coords == null";
840 goto exit;
841 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700842 coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700843 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700844 _exception = 1;
845 _exceptionType = "java/lang/IllegalArgumentException";
846 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700847 goto exit;
848 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700849 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700850 char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700851 coords = (GLfloat *) (_coordsBase + _bufferOffset);
852 }
Jack Palevich27f80022009-04-15 19:13:17 -0700853 glDrawTexfvOES(
854 (GLfloat *)coords
855 );
856
857exit:
858 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700859 _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700860 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700861 if (_exception) {
862 jniThrowException(_env, _exceptionType, _exceptionMessage);
863 }
Jack Palevich27f80022009-04-15 19:13:17 -0700864}
865
866/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
867static void
868android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
869 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800870 jint _exception = 0;
871 const char * _exceptionType = NULL;
872 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700873 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700874 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700875 jint _remaining;
876 GLeglImageOES image = (GLeglImageOES) 0;
877
Romain Guy84cac202016-12-05 12:26:02 -0800878 if (!image_buf) {
879 _exception = 1;
880 _exceptionType = "java/lang/IllegalArgumentException";
881 _exceptionMessage = "image == null";
882 goto exit;
883 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700884 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700885 if (image == NULL) {
886 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
887 image = (GLeglImageOES) (_imageBase + _bufferOffset);
888 }
Jack Palevicha3795852009-04-24 10:35:11 -0700889 glEGLImageTargetTexture2DOES(
890 (GLenum)target,
891 (GLeglImageOES)image
892 );
Romain Guy84cac202016-12-05 12:26:02 -0800893
894exit:
Jack Palevicha3795852009-04-24 10:35:11 -0700895 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800896 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
897 }
898 if (_exception) {
899 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -0700900 }
Jack Palevich27f80022009-04-15 19:13:17 -0700901}
902
903/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
904static void
905android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
906 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800907 jint _exception = 0;
908 const char * _exceptionType = NULL;
909 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700910 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700911 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700912 jint _remaining;
913 GLeglImageOES image = (GLeglImageOES) 0;
914
Romain Guy84cac202016-12-05 12:26:02 -0800915 if (!image_buf) {
916 _exception = 1;
917 _exceptionType = "java/lang/IllegalArgumentException";
918 _exceptionMessage = "image == null";
919 goto exit;
920 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700921 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700922 if (image == NULL) {
923 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
924 image = (GLeglImageOES) (_imageBase + _bufferOffset);
925 }
Jack Palevicha3795852009-04-24 10:35:11 -0700926 glEGLImageTargetRenderbufferStorageOES(
927 (GLenum)target,
928 (GLeglImageOES)image
929 );
Romain Guy84cac202016-12-05 12:26:02 -0800930
931exit:
Jack Palevicha3795852009-04-24 10:35:11 -0700932 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800933 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
934 }
935 if (_exception) {
936 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -0700937 }
Jack Palevich27f80022009-04-15 19:13:17 -0700938}
939
940/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
941static void
942android_glAlphaFuncxOES__II
943 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700944 glAlphaFuncxOES(
945 (GLenum)func,
946 (GLclampx)ref
947 );
Jack Palevich27f80022009-04-15 19:13:17 -0700948}
949
950/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
951static void
952android_glClearColorxOES__IIII
953 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700954 glClearColorxOES(
955 (GLclampx)red,
956 (GLclampx)green,
957 (GLclampx)blue,
958 (GLclampx)alpha
959 );
Jack Palevich27f80022009-04-15 19:13:17 -0700960}
961
962/* void glClearDepthxOES ( GLclampx depth ) */
963static void
964android_glClearDepthxOES__I
965 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700966 glClearDepthxOES(
967 (GLclampx)depth
968 );
Jack Palevich27f80022009-04-15 19:13:17 -0700969}
970
971/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
972static void
973android_glClipPlanexOES__I_3II
974 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700975 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800976 const char * _exceptionType = NULL;
977 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700978 GLfixed *equation_base = (GLfixed *) 0;
979 jint _remaining;
980 GLfixed *equation = (GLfixed *) 0;
981
982 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700983 _exception = 1;
984 _exceptionType = "java/lang/IllegalArgumentException";
985 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700986 goto exit;
987 }
988 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700989 _exception = 1;
990 _exceptionType = "java/lang/IllegalArgumentException";
991 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700992 goto exit;
993 }
994 _remaining = _env->GetArrayLength(equation_ref) - offset;
995 equation_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700996 _env->GetIntArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -0700997 equation = equation_base + offset;
998
999 glClipPlanexOES(
1000 (GLenum)plane,
1001 (GLfixed *)equation
1002 );
1003
1004exit:
1005 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001006 _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001007 JNI_ABORT);
1008 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001009 if (_exception) {
1010 jniThrowException(_env, _exceptionType, _exceptionMessage);
1011 }
Jack Palevich27f80022009-04-15 19:13:17 -07001012}
1013
1014/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
1015static void
1016android_glClipPlanexOES__ILjava_nio_IntBuffer_2
1017 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001018 jint _exception = 0;
1019 const char * _exceptionType = NULL;
1020 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001021 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001022 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001023 jint _remaining;
1024 GLfixed *equation = (GLfixed *) 0;
1025
Romain Guy84cac202016-12-05 12:26:02 -08001026 if (!equation_buf) {
1027 _exception = 1;
1028 _exceptionType = "java/lang/IllegalArgumentException";
1029 _exceptionMessage = "equation == null";
1030 goto exit;
1031 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001032 equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001033 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001034 char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001035 equation = (GLfixed *) (_equationBase + _bufferOffset);
1036 }
Jack Palevicha3795852009-04-24 10:35:11 -07001037 glClipPlanexOES(
1038 (GLenum)plane,
1039 (GLfixed *)equation
1040 );
Romain Guy84cac202016-12-05 12:26:02 -08001041
1042exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001043 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001044 _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001045 }
Romain Guy84cac202016-12-05 12:26:02 -08001046 if (_exception) {
1047 jniThrowException(_env, _exceptionType, _exceptionMessage);
1048 }
Jack Palevich27f80022009-04-15 19:13:17 -07001049}
1050
1051/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
1052static void
1053android_glColor4xOES__IIII
1054 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -07001055 glColor4xOES(
1056 (GLfixed)red,
1057 (GLfixed)green,
1058 (GLfixed)blue,
1059 (GLfixed)alpha
1060 );
Jack Palevich27f80022009-04-15 19:13:17 -07001061}
1062
1063/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
1064static void
1065android_glDepthRangexOES__II
1066 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001067 glDepthRangexOES(
1068 (GLclampx)zNear,
1069 (GLclampx)zFar
1070 );
Jack Palevich27f80022009-04-15 19:13:17 -07001071}
1072
1073/* void glFogxOES ( GLenum pname, GLfixed param ) */
1074static void
1075android_glFogxOES__II
1076 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001077 glFogxOES(
1078 (GLenum)pname,
1079 (GLfixed)param
1080 );
Jack Palevich27f80022009-04-15 19:13:17 -07001081}
1082
1083/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1084static void
1085android_glFogxvOES__I_3II
1086 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001087 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001088 const char * _exceptionType = NULL;
1089 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001090 GLfixed *params_base = (GLfixed *) 0;
1091 jint _remaining;
1092 GLfixed *params = (GLfixed *) 0;
1093
1094 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001095 _exception = 1;
1096 _exceptionType = "java/lang/IllegalArgumentException";
1097 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001098 goto exit;
1099 }
1100 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001101 _exception = 1;
1102 _exceptionType = "java/lang/IllegalArgumentException";
1103 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001104 goto exit;
1105 }
1106 _remaining = _env->GetArrayLength(params_ref) - offset;
1107 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001108 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001109 params = params_base + offset;
1110
1111 glFogxvOES(
1112 (GLenum)pname,
1113 (GLfixed *)params
1114 );
1115
1116exit:
1117 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001118 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001119 JNI_ABORT);
1120 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001121 if (_exception) {
1122 jniThrowException(_env, _exceptionType, _exceptionMessage);
1123 }
Jack Palevich27f80022009-04-15 19:13:17 -07001124}
1125
1126/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1127static void
1128android_glFogxvOES__ILjava_nio_IntBuffer_2
1129 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001130 jint _exception = 0;
1131 const char * _exceptionType = NULL;
1132 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001133 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001134 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001135 jint _remaining;
1136 GLfixed *params = (GLfixed *) 0;
1137
Romain Guy84cac202016-12-05 12:26:02 -08001138 if (!params_buf) {
1139 _exception = 1;
1140 _exceptionType = "java/lang/IllegalArgumentException";
1141 _exceptionMessage = "params == null";
1142 goto exit;
1143 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001144 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001145 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001146 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001147 params = (GLfixed *) (_paramsBase + _bufferOffset);
1148 }
Jack Palevicha3795852009-04-24 10:35:11 -07001149 glFogxvOES(
1150 (GLenum)pname,
1151 (GLfixed *)params
1152 );
Romain Guy84cac202016-12-05 12:26:02 -08001153
1154exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001155 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001156 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001157 }
Romain Guy84cac202016-12-05 12:26:02 -08001158 if (_exception) {
1159 jniThrowException(_env, _exceptionType, _exceptionMessage);
1160 }
Jack Palevich27f80022009-04-15 19:13:17 -07001161}
1162
1163/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1164static void
1165android_glFrustumxOES__IIIIII
1166 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001167 glFrustumxOES(
1168 (GLfixed)left,
1169 (GLfixed)right,
1170 (GLfixed)bottom,
1171 (GLfixed)top,
1172 (GLfixed)zNear,
1173 (GLfixed)zFar
1174 );
Jack Palevich27f80022009-04-15 19:13:17 -07001175}
1176
1177/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1178static void
1179android_glGetClipPlanexOES__I_3II
1180 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001181 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001182 const char * _exceptionType = NULL;
1183 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001184 GLfixed *eqn_base = (GLfixed *) 0;
1185 jint _remaining;
1186 GLfixed *eqn = (GLfixed *) 0;
1187
1188 if (!eqn_ref) {
1189 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001190 _exceptionType = "java/lang/IllegalArgumentException";
1191 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001192 goto exit;
1193 }
1194 if (offset < 0) {
1195 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001196 _exceptionType = "java/lang/IllegalArgumentException";
1197 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001198 goto exit;
1199 }
1200 _remaining = _env->GetArrayLength(eqn_ref) - offset;
1201 if (_remaining < 4) {
1202 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001203 _exceptionType = "java/lang/IllegalArgumentException";
1204 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001205 goto exit;
1206 }
1207 eqn_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001208 _env->GetIntArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001209 eqn = eqn_base + offset;
1210
1211 glGetClipPlanexOES(
1212 (GLenum)pname,
1213 (GLfixed *)eqn
1214 );
1215
1216exit:
1217 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001218 _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001219 _exception ? JNI_ABORT: 0);
1220 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001221 if (_exception) {
1222 jniThrowException(_env, _exceptionType, _exceptionMessage);
1223 }
Jack Palevich27f80022009-04-15 19:13:17 -07001224}
1225
1226/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1227static void
1228android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1229 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001230 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001231 const char * _exceptionType = NULL;
1232 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001233 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001234 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001235 jint _remaining;
1236 GLfixed *eqn = (GLfixed *) 0;
1237
Romain Guy84cac202016-12-05 12:26:02 -08001238 if (!eqn_buf) {
1239 _exception = 1;
1240 _exceptionType = "java/lang/IllegalArgumentException";
1241 _exceptionMessage = "eqn == null";
1242 goto exit;
1243 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001244 eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07001245 if (_remaining < 4) {
1246 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001247 _exceptionType = "java/lang/IllegalArgumentException";
1248 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001249 goto exit;
1250 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001251 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001252 char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001253 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1254 }
Jack Palevicha3795852009-04-24 10:35:11 -07001255 glGetClipPlanexOES(
1256 (GLenum)pname,
1257 (GLfixed *)eqn
1258 );
1259
1260exit:
1261 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001262 _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001263 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001264 if (_exception) {
1265 jniThrowException(_env, _exceptionType, _exceptionMessage);
1266 }
Jack Palevich27f80022009-04-15 19:13:17 -07001267}
1268
1269/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1270static void
1271android_glGetFixedvOES__I_3II
1272 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001273 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001274 const char * _exceptionType = NULL;
1275 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001276 GLfixed *params_base = (GLfixed *) 0;
1277 jint _remaining;
1278 GLfixed *params = (GLfixed *) 0;
1279
1280 if (!params_ref) {
1281 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001282 _exceptionType = "java/lang/IllegalArgumentException";
1283 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001284 goto exit;
1285 }
1286 if (offset < 0) {
1287 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001288 _exceptionType = "java/lang/IllegalArgumentException";
1289 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001290 goto exit;
1291 }
1292 _remaining = _env->GetArrayLength(params_ref) - offset;
1293 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001294 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001295 params = params_base + offset;
1296
1297 glGetFixedvOES(
1298 (GLenum)pname,
1299 (GLfixed *)params
1300 );
1301
1302exit:
1303 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001304 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001305 _exception ? JNI_ABORT: 0);
1306 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001307 if (_exception) {
1308 jniThrowException(_env, _exceptionType, _exceptionMessage);
1309 }
Jack Palevich27f80022009-04-15 19:13:17 -07001310}
1311
1312/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1313static void
1314android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1315 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001316 jint _exception = 0;
1317 const char * _exceptionType = NULL;
1318 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001319 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001320 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001321 jint _remaining;
1322 GLfixed *params = (GLfixed *) 0;
1323
Romain Guy84cac202016-12-05 12:26:02 -08001324 if (!params_buf) {
1325 _exception = 1;
1326 _exceptionType = "java/lang/IllegalArgumentException";
1327 _exceptionMessage = "params == null";
1328 goto exit;
1329 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001330 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001331 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001332 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001333 params = (GLfixed *) (_paramsBase + _bufferOffset);
1334 }
Jack Palevicha3795852009-04-24 10:35:11 -07001335 glGetFixedvOES(
1336 (GLenum)pname,
1337 (GLfixed *)params
1338 );
Romain Guy84cac202016-12-05 12:26:02 -08001339
1340exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001341 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001342 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1343 }
1344 if (_exception) {
1345 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001346 }
Jack Palevich27f80022009-04-15 19:13:17 -07001347}
1348
1349/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1350static void
1351android_glGetLightxvOES__II_3II
1352 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001353 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001354 const char * _exceptionType = NULL;
1355 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001356 GLfixed *params_base = (GLfixed *) 0;
1357 jint _remaining;
1358 GLfixed *params = (GLfixed *) 0;
1359
1360 if (!params_ref) {
1361 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001362 _exceptionType = "java/lang/IllegalArgumentException";
1363 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001364 goto exit;
1365 }
1366 if (offset < 0) {
1367 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001368 _exceptionType = "java/lang/IllegalArgumentException";
1369 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001370 goto exit;
1371 }
1372 _remaining = _env->GetArrayLength(params_ref) - offset;
1373 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001374 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001375 params = params_base + offset;
1376
1377 glGetLightxvOES(
1378 (GLenum)light,
1379 (GLenum)pname,
1380 (GLfixed *)params
1381 );
1382
1383exit:
1384 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001385 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001386 _exception ? JNI_ABORT: 0);
1387 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001388 if (_exception) {
1389 jniThrowException(_env, _exceptionType, _exceptionMessage);
1390 }
Jack Palevich27f80022009-04-15 19:13:17 -07001391}
1392
1393/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1394static void
1395android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1396 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001397 jint _exception = 0;
1398 const char * _exceptionType = NULL;
1399 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001400 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001401 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001402 jint _remaining;
1403 GLfixed *params = (GLfixed *) 0;
1404
Romain Guy84cac202016-12-05 12:26:02 -08001405 if (!params_buf) {
1406 _exception = 1;
1407 _exceptionType = "java/lang/IllegalArgumentException";
1408 _exceptionMessage = "params == null";
1409 goto exit;
1410 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001411 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001412 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001413 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001414 params = (GLfixed *) (_paramsBase + _bufferOffset);
1415 }
Jack Palevicha3795852009-04-24 10:35:11 -07001416 glGetLightxvOES(
1417 (GLenum)light,
1418 (GLenum)pname,
1419 (GLfixed *)params
1420 );
Romain Guy84cac202016-12-05 12:26:02 -08001421
1422exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001423 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001424 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1425 }
1426 if (_exception) {
1427 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001428 }
Jack Palevich27f80022009-04-15 19:13:17 -07001429}
1430
1431/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1432static void
1433android_glGetMaterialxvOES__II_3II
1434 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001435 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001436 const char * _exceptionType = NULL;
1437 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001438 GLfixed *params_base = (GLfixed *) 0;
1439 jint _remaining;
1440 GLfixed *params = (GLfixed *) 0;
1441
1442 if (!params_ref) {
1443 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001444 _exceptionType = "java/lang/IllegalArgumentException";
1445 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001446 goto exit;
1447 }
1448 if (offset < 0) {
1449 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001450 _exceptionType = "java/lang/IllegalArgumentException";
1451 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001452 goto exit;
1453 }
1454 _remaining = _env->GetArrayLength(params_ref) - offset;
1455 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001456 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001457 params = params_base + offset;
1458
1459 glGetMaterialxvOES(
1460 (GLenum)face,
1461 (GLenum)pname,
1462 (GLfixed *)params
1463 );
1464
1465exit:
1466 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001467 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001468 _exception ? JNI_ABORT: 0);
1469 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001470 if (_exception) {
1471 jniThrowException(_env, _exceptionType, _exceptionMessage);
1472 }
Jack Palevich27f80022009-04-15 19:13:17 -07001473}
1474
1475/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1476static void
1477android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1478 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001479 jint _exception = 0;
1480 const char * _exceptionType = NULL;
1481 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001482 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001483 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001484 jint _remaining;
1485 GLfixed *params = (GLfixed *) 0;
1486
Romain Guy84cac202016-12-05 12:26:02 -08001487 if (!params_buf) {
1488 _exception = 1;
1489 _exceptionType = "java/lang/IllegalArgumentException";
1490 _exceptionMessage = "params == null";
1491 goto exit;
1492 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001493 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001494 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001495 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001496 params = (GLfixed *) (_paramsBase + _bufferOffset);
1497 }
Jack Palevicha3795852009-04-24 10:35:11 -07001498 glGetMaterialxvOES(
1499 (GLenum)face,
1500 (GLenum)pname,
1501 (GLfixed *)params
1502 );
Romain Guy84cac202016-12-05 12:26:02 -08001503
1504exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001505 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001506 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1507 }
1508 if (_exception) {
1509 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001510 }
Jack Palevich27f80022009-04-15 19:13:17 -07001511}
1512
1513/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1514static void
1515android_glGetTexEnvxvOES__II_3II
1516 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001517 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001518 const char * _exceptionType = NULL;
1519 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001520 GLfixed *params_base = (GLfixed *) 0;
1521 jint _remaining;
1522 GLfixed *params = (GLfixed *) 0;
1523
1524 if (!params_ref) {
1525 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001526 _exceptionType = "java/lang/IllegalArgumentException";
1527 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001528 goto exit;
1529 }
1530 if (offset < 0) {
1531 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001532 _exceptionType = "java/lang/IllegalArgumentException";
1533 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001534 goto exit;
1535 }
1536 _remaining = _env->GetArrayLength(params_ref) - offset;
1537 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001538 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001539 params = params_base + offset;
1540
1541 glGetTexEnvxvOES(
1542 (GLenum)env,
1543 (GLenum)pname,
1544 (GLfixed *)params
1545 );
1546
1547exit:
1548 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001549 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001550 _exception ? JNI_ABORT: 0);
1551 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001552 if (_exception) {
1553 jniThrowException(_env, _exceptionType, _exceptionMessage);
1554 }
Jack Palevich27f80022009-04-15 19:13:17 -07001555}
1556
1557/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1558static void
1559android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1560 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001561 jint _exception = 0;
1562 const char * _exceptionType = NULL;
1563 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001564 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001565 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001566 jint _remaining;
1567 GLfixed *params = (GLfixed *) 0;
1568
Romain Guy84cac202016-12-05 12:26:02 -08001569 if (!params_buf) {
1570 _exception = 1;
1571 _exceptionType = "java/lang/IllegalArgumentException";
1572 _exceptionMessage = "params == null";
1573 goto exit;
1574 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001575 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001576 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001577 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001578 params = (GLfixed *) (_paramsBase + _bufferOffset);
1579 }
Jack Palevicha3795852009-04-24 10:35:11 -07001580 glGetTexEnvxvOES(
1581 (GLenum)env,
1582 (GLenum)pname,
1583 (GLfixed *)params
1584 );
Romain Guy84cac202016-12-05 12:26:02 -08001585
1586exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001587 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001588 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1589 }
1590 if (_exception) {
1591 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001592 }
Jack Palevich27f80022009-04-15 19:13:17 -07001593}
1594
1595/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1596static void
1597android_glGetTexParameterxvOES__II_3II
1598 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001599 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001600 const char * _exceptionType = NULL;
1601 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001602 GLfixed *params_base = (GLfixed *) 0;
1603 jint _remaining;
1604 GLfixed *params = (GLfixed *) 0;
1605
1606 if (!params_ref) {
1607 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001608 _exceptionType = "java/lang/IllegalArgumentException";
1609 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001610 goto exit;
1611 }
1612 if (offset < 0) {
1613 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001614 _exceptionType = "java/lang/IllegalArgumentException";
1615 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001616 goto exit;
1617 }
1618 _remaining = _env->GetArrayLength(params_ref) - offset;
1619 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001620 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001621 params = params_base + offset;
1622
1623 glGetTexParameterxvOES(
1624 (GLenum)target,
1625 (GLenum)pname,
1626 (GLfixed *)params
1627 );
1628
1629exit:
1630 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001631 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001632 _exception ? JNI_ABORT: 0);
1633 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001634 if (_exception) {
1635 jniThrowException(_env, _exceptionType, _exceptionMessage);
1636 }
Jack Palevich27f80022009-04-15 19:13:17 -07001637}
1638
1639/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1640static void
1641android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1642 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001643 jint _exception = 0;
1644 const char * _exceptionType = NULL;
1645 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001646 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001647 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001648 jint _remaining;
1649 GLfixed *params = (GLfixed *) 0;
1650
Romain Guy84cac202016-12-05 12:26:02 -08001651 if (!params_buf) {
1652 _exception = 1;
1653 _exceptionType = "java/lang/IllegalArgumentException";
1654 _exceptionMessage = "params == null";
1655 goto exit;
1656 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001657 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001658 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001659 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001660 params = (GLfixed *) (_paramsBase + _bufferOffset);
1661 }
Jack Palevicha3795852009-04-24 10:35:11 -07001662 glGetTexParameterxvOES(
1663 (GLenum)target,
1664 (GLenum)pname,
1665 (GLfixed *)params
1666 );
Romain Guy84cac202016-12-05 12:26:02 -08001667
1668exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001669 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001670 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1671 }
1672 if (_exception) {
1673 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001674 }
Jack Palevich27f80022009-04-15 19:13:17 -07001675}
1676
1677/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1678static void
1679android_glLightModelxOES__II
1680 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001681 glLightModelxOES(
1682 (GLenum)pname,
1683 (GLfixed)param
1684 );
Jack Palevich27f80022009-04-15 19:13:17 -07001685}
1686
1687/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1688static void
1689android_glLightModelxvOES__I_3II
1690 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001691 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001692 const char * _exceptionType = NULL;
1693 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001694 GLfixed *params_base = (GLfixed *) 0;
1695 jint _remaining;
1696 GLfixed *params = (GLfixed *) 0;
1697
1698 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001699 _exception = 1;
1700 _exceptionType = "java/lang/IllegalArgumentException";
1701 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001702 goto exit;
1703 }
1704 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001705 _exception = 1;
1706 _exceptionType = "java/lang/IllegalArgumentException";
1707 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001708 goto exit;
1709 }
1710 _remaining = _env->GetArrayLength(params_ref) - offset;
1711 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001712 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001713 params = params_base + offset;
1714
1715 glLightModelxvOES(
1716 (GLenum)pname,
1717 (GLfixed *)params
1718 );
1719
1720exit:
1721 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001722 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001723 JNI_ABORT);
1724 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001725 if (_exception) {
1726 jniThrowException(_env, _exceptionType, _exceptionMessage);
1727 }
Jack Palevich27f80022009-04-15 19:13:17 -07001728}
1729
1730/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1731static void
1732android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1733 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001734 jint _exception = 0;
1735 const char * _exceptionType = NULL;
1736 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001737 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001738 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001739 jint _remaining;
1740 GLfixed *params = (GLfixed *) 0;
1741
Romain Guy84cac202016-12-05 12:26:02 -08001742 if (!params_buf) {
1743 _exception = 1;
1744 _exceptionType = "java/lang/IllegalArgumentException";
1745 _exceptionMessage = "params == null";
1746 goto exit;
1747 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001748 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001749 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001750 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001751 params = (GLfixed *) (_paramsBase + _bufferOffset);
1752 }
Jack Palevicha3795852009-04-24 10:35:11 -07001753 glLightModelxvOES(
1754 (GLenum)pname,
1755 (GLfixed *)params
1756 );
Romain Guy84cac202016-12-05 12:26:02 -08001757
1758exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001759 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001760 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001761 }
Romain Guy84cac202016-12-05 12:26:02 -08001762 if (_exception) {
1763 jniThrowException(_env, _exceptionType, _exceptionMessage);
1764 }
Jack Palevich27f80022009-04-15 19:13:17 -07001765}
1766
1767/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1768static void
1769android_glLightxOES__III
1770 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001771 glLightxOES(
1772 (GLenum)light,
1773 (GLenum)pname,
1774 (GLfixed)param
1775 );
Jack Palevich27f80022009-04-15 19:13:17 -07001776}
1777
1778/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1779static void
1780android_glLightxvOES__II_3II
1781 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001782 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001783 const char * _exceptionType = NULL;
1784 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001785 GLfixed *params_base = (GLfixed *) 0;
1786 jint _remaining;
1787 GLfixed *params = (GLfixed *) 0;
1788
1789 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001790 _exception = 1;
1791 _exceptionType = "java/lang/IllegalArgumentException";
1792 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001793 goto exit;
1794 }
1795 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001796 _exception = 1;
1797 _exceptionType = "java/lang/IllegalArgumentException";
1798 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001799 goto exit;
1800 }
1801 _remaining = _env->GetArrayLength(params_ref) - offset;
1802 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001803 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001804 params = params_base + offset;
1805
1806 glLightxvOES(
1807 (GLenum)light,
1808 (GLenum)pname,
1809 (GLfixed *)params
1810 );
1811
1812exit:
1813 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001814 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001815 JNI_ABORT);
1816 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001817 if (_exception) {
1818 jniThrowException(_env, _exceptionType, _exceptionMessage);
1819 }
Jack Palevich27f80022009-04-15 19:13:17 -07001820}
1821
1822/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1823static void
1824android_glLightxvOES__IILjava_nio_IntBuffer_2
1825 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001826 jint _exception = 0;
1827 const char * _exceptionType = NULL;
1828 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001829 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001830 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001831 jint _remaining;
1832 GLfixed *params = (GLfixed *) 0;
1833
Romain Guy84cac202016-12-05 12:26:02 -08001834 if (!params_buf) {
1835 _exception = 1;
1836 _exceptionType = "java/lang/IllegalArgumentException";
1837 _exceptionMessage = "params == null";
1838 goto exit;
1839 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001840 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001841 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001842 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001843 params = (GLfixed *) (_paramsBase + _bufferOffset);
1844 }
Jack Palevicha3795852009-04-24 10:35:11 -07001845 glLightxvOES(
1846 (GLenum)light,
1847 (GLenum)pname,
1848 (GLfixed *)params
1849 );
Romain Guy84cac202016-12-05 12:26:02 -08001850
1851exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001852 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001853 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001854 }
Romain Guy84cac202016-12-05 12:26:02 -08001855 if (_exception) {
1856 jniThrowException(_env, _exceptionType, _exceptionMessage);
1857 }
Jack Palevich27f80022009-04-15 19:13:17 -07001858}
1859
1860/* void glLineWidthxOES ( GLfixed width ) */
1861static void
1862android_glLineWidthxOES__I
1863 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001864 glLineWidthxOES(
1865 (GLfixed)width
1866 );
Jack Palevich27f80022009-04-15 19:13:17 -07001867}
1868
1869/* void glLoadMatrixxOES ( const GLfixed *m ) */
1870static void
1871android_glLoadMatrixxOES___3II
1872 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001873 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001874 const char * _exceptionType = NULL;
1875 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001876 GLfixed *m_base = (GLfixed *) 0;
1877 jint _remaining;
1878 GLfixed *m = (GLfixed *) 0;
1879
1880 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001881 _exception = 1;
1882 _exceptionType = "java/lang/IllegalArgumentException";
1883 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001884 goto exit;
1885 }
1886 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001887 _exception = 1;
1888 _exceptionType = "java/lang/IllegalArgumentException";
1889 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001890 goto exit;
1891 }
1892 _remaining = _env->GetArrayLength(m_ref) - offset;
1893 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001894 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001895 m = m_base + offset;
1896
1897 glLoadMatrixxOES(
1898 (GLfixed *)m
1899 );
1900
1901exit:
1902 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001903 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001904 JNI_ABORT);
1905 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001906 if (_exception) {
1907 jniThrowException(_env, _exceptionType, _exceptionMessage);
1908 }
Jack Palevich27f80022009-04-15 19:13:17 -07001909}
1910
1911/* void glLoadMatrixxOES ( const GLfixed *m ) */
1912static void
1913android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1914 (JNIEnv *_env, jobject _this, jobject m_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001915 jint _exception = 0;
1916 const char * _exceptionType = NULL;
1917 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001918 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001919 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001920 jint _remaining;
1921 GLfixed *m = (GLfixed *) 0;
1922
Romain Guy84cac202016-12-05 12:26:02 -08001923 if (!m_buf) {
1924 _exception = 1;
1925 _exceptionType = "java/lang/IllegalArgumentException";
1926 _exceptionMessage = "m == null";
1927 goto exit;
1928 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001929 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001930 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001931 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001932 m = (GLfixed *) (_mBase + _bufferOffset);
1933 }
Jack Palevicha3795852009-04-24 10:35:11 -07001934 glLoadMatrixxOES(
1935 (GLfixed *)m
1936 );
Romain Guy84cac202016-12-05 12:26:02 -08001937
1938exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001939 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001940 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001941 }
Romain Guy84cac202016-12-05 12:26:02 -08001942 if (_exception) {
1943 jniThrowException(_env, _exceptionType, _exceptionMessage);
1944 }
Jack Palevich27f80022009-04-15 19:13:17 -07001945}
1946
1947/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1948static void
1949android_glMaterialxOES__III
1950 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001951 glMaterialxOES(
1952 (GLenum)face,
1953 (GLenum)pname,
1954 (GLfixed)param
1955 );
Jack Palevich27f80022009-04-15 19:13:17 -07001956}
1957
1958/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1959static void
1960android_glMaterialxvOES__II_3II
1961 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001962 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001963 const char * _exceptionType = NULL;
1964 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001965 GLfixed *params_base = (GLfixed *) 0;
1966 jint _remaining;
1967 GLfixed *params = (GLfixed *) 0;
1968
1969 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001970 _exception = 1;
1971 _exceptionType = "java/lang/IllegalArgumentException";
1972 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001973 goto exit;
1974 }
1975 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001976 _exception = 1;
1977 _exceptionType = "java/lang/IllegalArgumentException";
1978 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001979 goto exit;
1980 }
1981 _remaining = _env->GetArrayLength(params_ref) - offset;
1982 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001983 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001984 params = params_base + offset;
1985
1986 glMaterialxvOES(
1987 (GLenum)face,
1988 (GLenum)pname,
1989 (GLfixed *)params
1990 );
1991
1992exit:
1993 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001994 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001995 JNI_ABORT);
1996 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001997 if (_exception) {
1998 jniThrowException(_env, _exceptionType, _exceptionMessage);
1999 }
Jack Palevich27f80022009-04-15 19:13:17 -07002000}
2001
2002/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
2003static void
2004android_glMaterialxvOES__IILjava_nio_IntBuffer_2
2005 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002006 jint _exception = 0;
2007 const char * _exceptionType = NULL;
2008 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002009 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002010 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002011 jint _remaining;
2012 GLfixed *params = (GLfixed *) 0;
2013
Romain Guy84cac202016-12-05 12:26:02 -08002014 if (!params_buf) {
2015 _exception = 1;
2016 _exceptionType = "java/lang/IllegalArgumentException";
2017 _exceptionMessage = "params == null";
2018 goto exit;
2019 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002020 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002021 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002022 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002023 params = (GLfixed *) (_paramsBase + _bufferOffset);
2024 }
Jack Palevicha3795852009-04-24 10:35:11 -07002025 glMaterialxvOES(
2026 (GLenum)face,
2027 (GLenum)pname,
2028 (GLfixed *)params
2029 );
Romain Guy84cac202016-12-05 12:26:02 -08002030
2031exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002032 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002033 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002034 }
Romain Guy84cac202016-12-05 12:26:02 -08002035 if (_exception) {
2036 jniThrowException(_env, _exceptionType, _exceptionMessage);
2037 }
Jack Palevich27f80022009-04-15 19:13:17 -07002038}
2039
2040/* void glMultMatrixxOES ( const GLfixed *m ) */
2041static void
2042android_glMultMatrixxOES___3II
2043 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002044 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002045 const char * _exceptionType = NULL;
2046 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002047 GLfixed *m_base = (GLfixed *) 0;
2048 jint _remaining;
2049 GLfixed *m = (GLfixed *) 0;
2050
2051 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002052 _exception = 1;
2053 _exceptionType = "java/lang/IllegalArgumentException";
2054 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002055 goto exit;
2056 }
2057 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002058 _exception = 1;
2059 _exceptionType = "java/lang/IllegalArgumentException";
2060 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002061 goto exit;
2062 }
2063 _remaining = _env->GetArrayLength(m_ref) - offset;
2064 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002065 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002066 m = m_base + offset;
2067
2068 glMultMatrixxOES(
2069 (GLfixed *)m
2070 );
2071
2072exit:
2073 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002074 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002075 JNI_ABORT);
2076 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002077 if (_exception) {
2078 jniThrowException(_env, _exceptionType, _exceptionMessage);
2079 }
Jack Palevich27f80022009-04-15 19:13:17 -07002080}
2081
2082/* void glMultMatrixxOES ( const GLfixed *m ) */
2083static void
2084android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
2085 (JNIEnv *_env, jobject _this, jobject m_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002086 jint _exception = 0;
2087 const char * _exceptionType = NULL;
2088 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002089 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002090 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002091 jint _remaining;
2092 GLfixed *m = (GLfixed *) 0;
2093
Romain Guy84cac202016-12-05 12:26:02 -08002094 if (!m_buf) {
2095 _exception = 1;
2096 _exceptionType = "java/lang/IllegalArgumentException";
2097 _exceptionMessage = "m == null";
2098 goto exit;
2099 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002100 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002101 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002102 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002103 m = (GLfixed *) (_mBase + _bufferOffset);
2104 }
Jack Palevicha3795852009-04-24 10:35:11 -07002105 glMultMatrixxOES(
2106 (GLfixed *)m
2107 );
Romain Guy84cac202016-12-05 12:26:02 -08002108
2109exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002110 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002111 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002112 }
Romain Guy84cac202016-12-05 12:26:02 -08002113 if (_exception) {
2114 jniThrowException(_env, _exceptionType, _exceptionMessage);
2115 }
Jack Palevich27f80022009-04-15 19:13:17 -07002116}
2117
2118/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
2119static void
2120android_glMultiTexCoord4xOES__IIIII
2121 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07002122 glMultiTexCoord4xOES(
2123 (GLenum)target,
2124 (GLfixed)s,
2125 (GLfixed)t,
2126 (GLfixed)r,
2127 (GLfixed)q
2128 );
Jack Palevich27f80022009-04-15 19:13:17 -07002129}
2130
2131/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
2132static void
2133android_glNormal3xOES__III
2134 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07002135 glNormal3xOES(
2136 (GLfixed)nx,
2137 (GLfixed)ny,
2138 (GLfixed)nz
2139 );
Jack Palevich27f80022009-04-15 19:13:17 -07002140}
2141
2142/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
2143static void
2144android_glOrthoxOES__IIIIII
2145 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002146 glOrthoxOES(
2147 (GLfixed)left,
2148 (GLfixed)right,
2149 (GLfixed)bottom,
2150 (GLfixed)top,
2151 (GLfixed)zNear,
2152 (GLfixed)zFar
2153 );
Jack Palevich27f80022009-04-15 19:13:17 -07002154}
2155
2156/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
2157static void
2158android_glPointParameterxOES__II
2159 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002160 glPointParameterxOES(
2161 (GLenum)pname,
2162 (GLfixed)param
2163 );
Jack Palevich27f80022009-04-15 19:13:17 -07002164}
2165
2166/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2167static void
2168android_glPointParameterxvOES__I_3II
2169 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002170 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002171 const char * _exceptionType = NULL;
2172 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002173 GLfixed *params_base = (GLfixed *) 0;
2174 jint _remaining;
2175 GLfixed *params = (GLfixed *) 0;
2176
2177 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002178 _exception = 1;
2179 _exceptionType = "java/lang/IllegalArgumentException";
2180 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002181 goto exit;
2182 }
2183 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002184 _exception = 1;
2185 _exceptionType = "java/lang/IllegalArgumentException";
2186 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002187 goto exit;
2188 }
2189 _remaining = _env->GetArrayLength(params_ref) - offset;
2190 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002191 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002192 params = params_base + offset;
2193
2194 glPointParameterxvOES(
2195 (GLenum)pname,
2196 (GLfixed *)params
2197 );
2198
2199exit:
2200 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002201 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002202 JNI_ABORT);
2203 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002204 if (_exception) {
2205 jniThrowException(_env, _exceptionType, _exceptionMessage);
2206 }
Jack Palevich27f80022009-04-15 19:13:17 -07002207}
2208
2209/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2210static void
2211android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
2212 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002213 jint _exception = 0;
2214 const char * _exceptionType = NULL;
2215 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002216 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002217 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002218 jint _remaining;
2219 GLfixed *params = (GLfixed *) 0;
2220
Romain Guy84cac202016-12-05 12:26:02 -08002221 if (!params_buf) {
2222 _exception = 1;
2223 _exceptionType = "java/lang/IllegalArgumentException";
2224 _exceptionMessage = "params == null";
2225 goto exit;
2226 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002227 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002228 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002229 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002230 params = (GLfixed *) (_paramsBase + _bufferOffset);
2231 }
Jack Palevicha3795852009-04-24 10:35:11 -07002232 glPointParameterxvOES(
2233 (GLenum)pname,
2234 (GLfixed *)params
2235 );
Romain Guy84cac202016-12-05 12:26:02 -08002236
2237exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002238 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002239 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002240 }
Romain Guy84cac202016-12-05 12:26:02 -08002241 if (_exception) {
2242 jniThrowException(_env, _exceptionType, _exceptionMessage);
2243 }
Jack Palevich27f80022009-04-15 19:13:17 -07002244}
2245
2246/* void glPointSizexOES ( GLfixed size ) */
2247static void
2248android_glPointSizexOES__I
2249 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07002250 glPointSizexOES(
2251 (GLfixed)size
2252 );
Jack Palevich27f80022009-04-15 19:13:17 -07002253}
2254
2255/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
2256static void
2257android_glPolygonOffsetxOES__II
2258 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07002259 glPolygonOffsetxOES(
2260 (GLfixed)factor,
2261 (GLfixed)units
2262 );
Jack Palevich27f80022009-04-15 19:13:17 -07002263}
2264
2265/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
2266static void
2267android_glRotatexOES__IIII
2268 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002269 glRotatexOES(
2270 (GLfixed)angle,
2271 (GLfixed)x,
2272 (GLfixed)y,
2273 (GLfixed)z
2274 );
Jack Palevich27f80022009-04-15 19:13:17 -07002275}
2276
2277/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
2278static void
2279android_glSampleCoveragexOES__IZ
2280 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07002281 glSampleCoveragexOES(
2282 (GLclampx)value,
2283 (GLboolean)invert
2284 );
Jack Palevich27f80022009-04-15 19:13:17 -07002285}
2286
2287/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2288static void
2289android_glScalexOES__III
2290 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002291 glScalexOES(
2292 (GLfixed)x,
2293 (GLfixed)y,
2294 (GLfixed)z
2295 );
Jack Palevich27f80022009-04-15 19:13:17 -07002296}
2297
2298/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
2299static void
2300android_glTexEnvxOES__III
2301 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002302 glTexEnvxOES(
2303 (GLenum)target,
2304 (GLenum)pname,
2305 (GLfixed)param
2306 );
Jack Palevich27f80022009-04-15 19:13:17 -07002307}
2308
2309/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2310static void
2311android_glTexEnvxvOES__II_3II
2312 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002313 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002314 const char * _exceptionType = NULL;
2315 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002316 GLfixed *params_base = (GLfixed *) 0;
2317 jint _remaining;
2318 GLfixed *params = (GLfixed *) 0;
2319
2320 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002321 _exception = 1;
2322 _exceptionType = "java/lang/IllegalArgumentException";
2323 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002324 goto exit;
2325 }
2326 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002327 _exception = 1;
2328 _exceptionType = "java/lang/IllegalArgumentException";
2329 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002330 goto exit;
2331 }
2332 _remaining = _env->GetArrayLength(params_ref) - offset;
2333 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002334 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002335 params = params_base + offset;
2336
2337 glTexEnvxvOES(
2338 (GLenum)target,
2339 (GLenum)pname,
2340 (GLfixed *)params
2341 );
2342
2343exit:
2344 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002345 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002346 JNI_ABORT);
2347 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002348 if (_exception) {
2349 jniThrowException(_env, _exceptionType, _exceptionMessage);
2350 }
Jack Palevich27f80022009-04-15 19:13:17 -07002351}
2352
2353/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2354static void
2355android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2356 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002357 jint _exception = 0;
2358 const char * _exceptionType = NULL;
2359 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002360 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002361 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002362 jint _remaining;
2363 GLfixed *params = (GLfixed *) 0;
2364
Romain Guy84cac202016-12-05 12:26:02 -08002365 if (!params_buf) {
2366 _exception = 1;
2367 _exceptionType = "java/lang/IllegalArgumentException";
2368 _exceptionMessage = "params == null";
2369 goto exit;
2370 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002371 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002372 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002373 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002374 params = (GLfixed *) (_paramsBase + _bufferOffset);
2375 }
Jack Palevicha3795852009-04-24 10:35:11 -07002376 glTexEnvxvOES(
2377 (GLenum)target,
2378 (GLenum)pname,
2379 (GLfixed *)params
2380 );
Romain Guy84cac202016-12-05 12:26:02 -08002381
2382exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002383 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002384 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002385 }
Romain Guy84cac202016-12-05 12:26:02 -08002386 if (_exception) {
2387 jniThrowException(_env, _exceptionType, _exceptionMessage);
2388 }
Jack Palevich27f80022009-04-15 19:13:17 -07002389}
2390
2391/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2392static void
2393android_glTexParameterxOES__III
2394 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002395 glTexParameterxOES(
2396 (GLenum)target,
2397 (GLenum)pname,
2398 (GLfixed)param
2399 );
Jack Palevich27f80022009-04-15 19:13:17 -07002400}
2401
2402/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2403static void
2404android_glTexParameterxvOES__II_3II
2405 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002406 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002407 const char * _exceptionType = NULL;
2408 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002409 GLfixed *params_base = (GLfixed *) 0;
2410 jint _remaining;
2411 GLfixed *params = (GLfixed *) 0;
2412
2413 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002414 _exception = 1;
2415 _exceptionType = "java/lang/IllegalArgumentException";
2416 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002417 goto exit;
2418 }
2419 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002420 _exception = 1;
2421 _exceptionType = "java/lang/IllegalArgumentException";
2422 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002423 goto exit;
2424 }
2425 _remaining = _env->GetArrayLength(params_ref) - offset;
2426 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002427 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002428 params = params_base + offset;
2429
2430 glTexParameterxvOES(
2431 (GLenum)target,
2432 (GLenum)pname,
2433 (GLfixed *)params
2434 );
2435
2436exit:
2437 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002438 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002439 JNI_ABORT);
2440 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002441 if (_exception) {
2442 jniThrowException(_env, _exceptionType, _exceptionMessage);
2443 }
Jack Palevich27f80022009-04-15 19:13:17 -07002444}
2445
2446/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2447static void
2448android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2449 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002450 jint _exception = 0;
2451 const char * _exceptionType = NULL;
2452 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002453 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002454 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002455 jint _remaining;
2456 GLfixed *params = (GLfixed *) 0;
2457
Romain Guy84cac202016-12-05 12:26:02 -08002458 if (!params_buf) {
2459 _exception = 1;
2460 _exceptionType = "java/lang/IllegalArgumentException";
2461 _exceptionMessage = "params == null";
2462 goto exit;
2463 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002464 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002465 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002466 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002467 params = (GLfixed *) (_paramsBase + _bufferOffset);
2468 }
Jack Palevicha3795852009-04-24 10:35:11 -07002469 glTexParameterxvOES(
2470 (GLenum)target,
2471 (GLenum)pname,
2472 (GLfixed *)params
2473 );
Romain Guy84cac202016-12-05 12:26:02 -08002474
2475exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002476 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002477 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002478 }
Romain Guy84cac202016-12-05 12:26:02 -08002479 if (_exception) {
2480 jniThrowException(_env, _exceptionType, _exceptionMessage);
2481 }
Jack Palevich27f80022009-04-15 19:13:17 -07002482}
2483
2484/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2485static void
2486android_glTranslatexOES__III
2487 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002488 glTranslatexOES(
2489 (GLfixed)x,
2490 (GLfixed)y,
2491 (GLfixed)z
2492 );
Jack Palevich27f80022009-04-15 19:13:17 -07002493}
2494
2495/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2496static jboolean
2497android_glIsRenderbufferOES__I
2498 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002499 GLboolean _returnValue;
2500 _returnValue = glIsRenderbufferOES(
2501 (GLuint)renderbuffer
2502 );
Andy McFaddencee51982013-04-25 16:08:31 -07002503 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002504}
2505
2506/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2507static void
2508android_glBindRenderbufferOES__II
2509 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002510 glBindRenderbufferOES(
2511 (GLenum)target,
2512 (GLuint)renderbuffer
2513 );
Jack Palevich27f80022009-04-15 19:13:17 -07002514}
2515
2516/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2517static void
2518android_glDeleteRenderbuffersOES__I_3II
2519 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002520 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002521 const char * _exceptionType = NULL;
2522 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002523 GLuint *renderbuffers_base = (GLuint *) 0;
2524 jint _remaining;
2525 GLuint *renderbuffers = (GLuint *) 0;
2526
2527 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002528 _exception = 1;
2529 _exceptionType = "java/lang/IllegalArgumentException";
2530 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002531 goto exit;
2532 }
2533 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002534 _exception = 1;
2535 _exceptionType = "java/lang/IllegalArgumentException";
2536 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002537 goto exit;
2538 }
2539 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2540 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002541 _exception = 1;
2542 _exceptionType = "java/lang/IllegalArgumentException";
2543 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002544 goto exit;
2545 }
2546 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002547 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002548 renderbuffers = renderbuffers_base + offset;
2549
2550 glDeleteRenderbuffersOES(
2551 (GLsizei)n,
2552 (GLuint *)renderbuffers
2553 );
2554
2555exit:
2556 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002557 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002558 JNI_ABORT);
2559 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002560 if (_exception) {
2561 jniThrowException(_env, _exceptionType, _exceptionMessage);
2562 }
Jack Palevich27f80022009-04-15 19:13:17 -07002563}
2564
2565/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2566static void
2567android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2568 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002569 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002570 const char * _exceptionType = NULL;
2571 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002572 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002573 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002574 jint _remaining;
2575 GLuint *renderbuffers = (GLuint *) 0;
2576
Romain Guy84cac202016-12-05 12:26:02 -08002577 if (!renderbuffers_buf) {
2578 _exception = 1;
2579 _exceptionType = "java/lang/IllegalArgumentException";
2580 _exceptionMessage = "renderbuffers == null";
2581 goto exit;
2582 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002583 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002584 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002585 _exception = 1;
2586 _exceptionType = "java/lang/IllegalArgumentException";
2587 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002588 goto exit;
2589 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002590 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002591 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002592 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2593 }
Jack Palevich73108672011-03-28 14:49:12 -07002594 glDeleteRenderbuffersOES(
2595 (GLsizei)n,
2596 (GLuint *)renderbuffers
2597 );
2598
2599exit:
2600 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002601 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002602 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002603 if (_exception) {
2604 jniThrowException(_env, _exceptionType, _exceptionMessage);
2605 }
Jack Palevich27f80022009-04-15 19:13:17 -07002606}
2607
2608/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2609static void
2610android_glGenRenderbuffersOES__I_3II
2611 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002612 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002613 const char * _exceptionType = NULL;
2614 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002615 GLuint *renderbuffers_base = (GLuint *) 0;
2616 jint _remaining;
2617 GLuint *renderbuffers = (GLuint *) 0;
2618
2619 if (!renderbuffers_ref) {
2620 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002621 _exceptionType = "java/lang/IllegalArgumentException";
2622 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002623 goto exit;
2624 }
2625 if (offset < 0) {
2626 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002627 _exceptionType = "java/lang/IllegalArgumentException";
2628 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002629 goto exit;
2630 }
2631 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2632 if (_remaining < n) {
2633 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002634 _exceptionType = "java/lang/IllegalArgumentException";
2635 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002636 goto exit;
2637 }
2638 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002639 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002640 renderbuffers = renderbuffers_base + offset;
2641
2642 glGenRenderbuffersOES(
2643 (GLsizei)n,
2644 (GLuint *)renderbuffers
2645 );
2646
2647exit:
2648 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002649 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002650 _exception ? JNI_ABORT: 0);
2651 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002652 if (_exception) {
2653 jniThrowException(_env, _exceptionType, _exceptionMessage);
2654 }
Jack Palevich27f80022009-04-15 19:13:17 -07002655}
2656
2657/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2658static void
2659android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2660 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002661 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002662 const char * _exceptionType = NULL;
2663 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002664 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002665 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002666 jint _remaining;
2667 GLuint *renderbuffers = (GLuint *) 0;
2668
Romain Guy84cac202016-12-05 12:26:02 -08002669 if (!renderbuffers_buf) {
2670 _exception = 1;
2671 _exceptionType = "java/lang/IllegalArgumentException";
2672 _exceptionMessage = "renderbuffers == null";
2673 goto exit;
2674 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002675 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002676 if (_remaining < n) {
2677 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002678 _exceptionType = "java/lang/IllegalArgumentException";
2679 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002680 goto exit;
2681 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002682 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002683 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002684 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2685 }
Jack Palevich73108672011-03-28 14:49:12 -07002686 glGenRenderbuffersOES(
2687 (GLsizei)n,
2688 (GLuint *)renderbuffers
2689 );
2690
2691exit:
2692 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002693 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002694 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002695 if (_exception) {
2696 jniThrowException(_env, _exceptionType, _exceptionMessage);
2697 }
Jack Palevich27f80022009-04-15 19:13:17 -07002698}
2699
2700/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2701static void
2702android_glRenderbufferStorageOES__IIII
2703 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002704 glRenderbufferStorageOES(
2705 (GLenum)target,
2706 (GLenum)internalformat,
2707 (GLsizei)width,
2708 (GLsizei)height
2709 );
Jack Palevich27f80022009-04-15 19:13:17 -07002710}
2711
2712/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2713static void
2714android_glGetRenderbufferParameterivOES__II_3II
2715 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002716 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002717 const char * _exceptionType = NULL;
2718 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002719 GLint *params_base = (GLint *) 0;
2720 jint _remaining;
2721 GLint *params = (GLint *) 0;
2722
2723 if (!params_ref) {
2724 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002725 _exceptionType = "java/lang/IllegalArgumentException";
2726 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002727 goto exit;
2728 }
2729 if (offset < 0) {
2730 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002731 _exceptionType = "java/lang/IllegalArgumentException";
2732 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002733 goto exit;
2734 }
2735 _remaining = _env->GetArrayLength(params_ref) - offset;
2736 if (_remaining < 1) {
2737 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002738 _exceptionType = "java/lang/IllegalArgumentException";
2739 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002740 goto exit;
2741 }
2742 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002743 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002744 params = params_base + offset;
2745
2746 glGetRenderbufferParameterivOES(
2747 (GLenum)target,
2748 (GLenum)pname,
2749 (GLint *)params
2750 );
2751
2752exit:
2753 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002754 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07002755 _exception ? JNI_ABORT: 0);
2756 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002757 if (_exception) {
2758 jniThrowException(_env, _exceptionType, _exceptionMessage);
2759 }
Jack Palevich27f80022009-04-15 19:13:17 -07002760}
2761
2762/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2763static void
2764android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2765 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002766 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002767 const char * _exceptionType = NULL;
2768 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002769 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002770 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002771 jint _remaining;
2772 GLint *params = (GLint *) 0;
2773
Romain Guy84cac202016-12-05 12:26:02 -08002774 if (!params_buf) {
2775 _exception = 1;
2776 _exceptionType = "java/lang/IllegalArgumentException";
2777 _exceptionMessage = "params == null";
2778 goto exit;
2779 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002780 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002781 if (_remaining < 1) {
2782 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002783 _exceptionType = "java/lang/IllegalArgumentException";
2784 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002785 goto exit;
2786 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002787 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002788 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002789 params = (GLint *) (_paramsBase + _bufferOffset);
2790 }
Jack Palevich73108672011-03-28 14:49:12 -07002791 glGetRenderbufferParameterivOES(
2792 (GLenum)target,
2793 (GLenum)pname,
2794 (GLint *)params
2795 );
2796
2797exit:
2798 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002799 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002800 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002801 if (_exception) {
2802 jniThrowException(_env, _exceptionType, _exceptionMessage);
2803 }
Jack Palevich27f80022009-04-15 19:13:17 -07002804}
2805
2806/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2807static jboolean
2808android_glIsFramebufferOES__I
2809 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002810 GLboolean _returnValue;
2811 _returnValue = glIsFramebufferOES(
2812 (GLuint)framebuffer
2813 );
Andy McFaddencee51982013-04-25 16:08:31 -07002814 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002815}
2816
2817/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2818static void
2819android_glBindFramebufferOES__II
2820 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002821 glBindFramebufferOES(
2822 (GLenum)target,
2823 (GLuint)framebuffer
2824 );
Jack Palevich27f80022009-04-15 19:13:17 -07002825}
2826
2827/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2828static void
2829android_glDeleteFramebuffersOES__I_3II
2830 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002831 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002832 const char * _exceptionType = NULL;
2833 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002834 GLuint *framebuffers_base = (GLuint *) 0;
2835 jint _remaining;
2836 GLuint *framebuffers = (GLuint *) 0;
2837
2838 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002839 _exception = 1;
2840 _exceptionType = "java/lang/IllegalArgumentException";
2841 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002842 goto exit;
2843 }
2844 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002845 _exception = 1;
2846 _exceptionType = "java/lang/IllegalArgumentException";
2847 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002848 goto exit;
2849 }
2850 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2851 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002852 _exception = 1;
2853 _exceptionType = "java/lang/IllegalArgumentException";
2854 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002855 goto exit;
2856 }
2857 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002858 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002859 framebuffers = framebuffers_base + offset;
2860
2861 glDeleteFramebuffersOES(
2862 (GLsizei)n,
2863 (GLuint *)framebuffers
2864 );
2865
2866exit:
2867 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002868 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002869 JNI_ABORT);
2870 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002871 if (_exception) {
2872 jniThrowException(_env, _exceptionType, _exceptionMessage);
2873 }
Jack Palevich27f80022009-04-15 19:13:17 -07002874}
2875
2876/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2877static void
2878android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2879 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002880 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002881 const char * _exceptionType = NULL;
2882 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002883 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002884 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002885 jint _remaining;
2886 GLuint *framebuffers = (GLuint *) 0;
2887
Romain Guy84cac202016-12-05 12:26:02 -08002888 if (!framebuffers_buf) {
2889 _exception = 1;
2890 _exceptionType = "java/lang/IllegalArgumentException";
2891 _exceptionMessage = "framebuffers == null";
2892 goto exit;
2893 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002894 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002895 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002896 _exception = 1;
2897 _exceptionType = "java/lang/IllegalArgumentException";
2898 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002899 goto exit;
2900 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002901 if (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002902 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002903 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2904 }
Jack Palevich73108672011-03-28 14:49:12 -07002905 glDeleteFramebuffersOES(
2906 (GLsizei)n,
2907 (GLuint *)framebuffers
2908 );
2909
2910exit:
2911 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002912 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002913 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002914 if (_exception) {
2915 jniThrowException(_env, _exceptionType, _exceptionMessage);
2916 }
Jack Palevich27f80022009-04-15 19:13:17 -07002917}
2918
2919/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2920static void
2921android_glGenFramebuffersOES__I_3II
2922 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002923 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002924 const char * _exceptionType = NULL;
2925 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002926 GLuint *framebuffers_base = (GLuint *) 0;
2927 jint _remaining;
2928 GLuint *framebuffers = (GLuint *) 0;
2929
2930 if (!framebuffers_ref) {
2931 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002932 _exceptionType = "java/lang/IllegalArgumentException";
2933 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002934 goto exit;
2935 }
2936 if (offset < 0) {
2937 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002938 _exceptionType = "java/lang/IllegalArgumentException";
2939 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002940 goto exit;
2941 }
2942 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2943 if (_remaining < n) {
2944 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002945 _exceptionType = "java/lang/IllegalArgumentException";
2946 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002947 goto exit;
2948 }
2949 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002950 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002951 framebuffers = framebuffers_base + offset;
2952
2953 glGenFramebuffersOES(
2954 (GLsizei)n,
2955 (GLuint *)framebuffers
2956 );
2957
2958exit:
2959 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002960 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002961 _exception ? JNI_ABORT: 0);
2962 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002963 if (_exception) {
2964 jniThrowException(_env, _exceptionType, _exceptionMessage);
2965 }
Jack Palevich27f80022009-04-15 19:13:17 -07002966}
2967
2968/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2969static void
2970android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
2971 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002972 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002973 const char * _exceptionType = NULL;
2974 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002975 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002976 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002977 jint _remaining;
2978 GLuint *framebuffers = (GLuint *) 0;
2979
Romain Guy84cac202016-12-05 12:26:02 -08002980 if (!framebuffers_buf) {
2981 _exception = 1;
2982 _exceptionType = "java/lang/IllegalArgumentException";
2983 _exceptionMessage = "framebuffers == null";
2984 goto exit;
2985 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002986 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002987 if (_remaining < n) {
2988 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002989 _exceptionType = "java/lang/IllegalArgumentException";
2990 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002991 goto exit;
2992 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002993 if (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002994 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002995 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2996 }
Jack Palevich73108672011-03-28 14:49:12 -07002997 glGenFramebuffersOES(
2998 (GLsizei)n,
2999 (GLuint *)framebuffers
3000 );
3001
3002exit:
3003 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003004 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07003005 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003006 if (_exception) {
3007 jniThrowException(_env, _exceptionType, _exceptionMessage);
3008 }
Jack Palevich27f80022009-04-15 19:13:17 -07003009}
3010
3011/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
3012static jint
3013android_glCheckFramebufferStatusOES__I
3014 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07003015 GLenum _returnValue;
3016 _returnValue = glCheckFramebufferStatusOES(
3017 (GLenum)target
3018 );
Andy McFaddencee51982013-04-25 16:08:31 -07003019 return (jint)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07003020}
3021
3022/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
3023static void
3024android_glFramebufferRenderbufferOES__IIII
3025 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07003026 glFramebufferRenderbufferOES(
3027 (GLenum)target,
3028 (GLenum)attachment,
3029 (GLenum)renderbuffertarget,
3030 (GLuint)renderbuffer
3031 );
Jack Palevich27f80022009-04-15 19:13:17 -07003032}
3033
3034/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
3035static void
3036android_glFramebufferTexture2DOES__IIIII
3037 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07003038 glFramebufferTexture2DOES(
3039 (GLenum)target,
3040 (GLenum)attachment,
3041 (GLenum)textarget,
3042 (GLuint)texture,
3043 (GLint)level
3044 );
Jack Palevich27f80022009-04-15 19:13:17 -07003045}
3046
3047/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3048static void
3049android_glGetFramebufferAttachmentParameterivOES__III_3II
3050 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07003051 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003052 const char * _exceptionType = NULL;
3053 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07003054 GLint *params_base = (GLint *) 0;
3055 jint _remaining;
3056 GLint *params = (GLint *) 0;
3057
3058 if (!params_ref) {
3059 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003060 _exceptionType = "java/lang/IllegalArgumentException";
3061 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07003062 goto exit;
3063 }
3064 if (offset < 0) {
3065 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003066 _exceptionType = "java/lang/IllegalArgumentException";
3067 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07003068 goto exit;
3069 }
3070 _remaining = _env->GetArrayLength(params_ref) - offset;
3071 if (_remaining < 1) {
3072 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003073 _exceptionType = "java/lang/IllegalArgumentException";
3074 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003075 goto exit;
3076 }
3077 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003078 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07003079 params = params_base + offset;
3080
3081 glGetFramebufferAttachmentParameterivOES(
3082 (GLenum)target,
3083 (GLenum)attachment,
3084 (GLenum)pname,
3085 (GLint *)params
3086 );
3087
3088exit:
3089 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003090 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07003091 _exception ? JNI_ABORT: 0);
3092 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003093 if (_exception) {
3094 jniThrowException(_env, _exceptionType, _exceptionMessage);
3095 }
Jack Palevich27f80022009-04-15 19:13:17 -07003096}
3097
3098/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3099static void
3100android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
3101 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07003102 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003103 const char * _exceptionType = NULL;
3104 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003105 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003106 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07003107 jint _remaining;
3108 GLint *params = (GLint *) 0;
3109
Romain Guy84cac202016-12-05 12:26:02 -08003110 if (!params_buf) {
3111 _exception = 1;
3112 _exceptionType = "java/lang/IllegalArgumentException";
3113 _exceptionMessage = "params == null";
3114 goto exit;
3115 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003116 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07003117 if (_remaining < 1) {
3118 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003119 _exceptionType = "java/lang/IllegalArgumentException";
3120 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003121 goto exit;
3122 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003123 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003124 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003125 params = (GLint *) (_paramsBase + _bufferOffset);
3126 }
Jack Palevich73108672011-03-28 14:49:12 -07003127 glGetFramebufferAttachmentParameterivOES(
3128 (GLenum)target,
3129 (GLenum)attachment,
3130 (GLenum)pname,
3131 (GLint *)params
3132 );
3133
3134exit:
3135 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003136 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07003137 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003138 if (_exception) {
3139 jniThrowException(_env, _exceptionType, _exceptionMessage);
3140 }
Jack Palevich27f80022009-04-15 19:13:17 -07003141}
3142
3143/* void glGenerateMipmapOES ( GLenum target ) */
3144static void
3145android_glGenerateMipmapOES__I
3146 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07003147 glGenerateMipmapOES(
3148 (GLenum)target
3149 );
Jack Palevich27f80022009-04-15 19:13:17 -07003150}
3151
3152/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
3153static void
3154android_glCurrentPaletteMatrixOES__I
3155 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08003156 glCurrentPaletteMatrixOES(
3157 (GLuint)matrixpaletteindex
3158 );
Jack Palevich27f80022009-04-15 19:13:17 -07003159}
3160
3161/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
3162static void
3163android_glLoadPaletteFromModelViewMatrixOES__
3164 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08003165 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07003166}
3167
3168/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3169static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08003170android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
3171 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
Romain Guy84cac202016-12-05 12:26:02 -08003172 jint _exception = 0;
3173 const char * _exceptionType = NULL;
3174 const char * _exceptionMessage = NULL;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003175 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003176 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003177 jint _remaining;
3178 GLvoid *pointer = (GLvoid *) 0;
3179
3180 if (pointer_buf) {
3181 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3182 if ( ! pointer ) {
3183 return;
3184 }
3185 }
3186 glMatrixIndexPointerOESBounds(
3187 (GLint)size,
3188 (GLenum)type,
3189 (GLsizei)stride,
3190 (GLvoid *)pointer,
3191 (GLsizei)remaining
3192 );
Romain Guy84cac202016-12-05 12:26:02 -08003193 if (_exception) {
3194 jniThrowException(_env, _exceptionType, _exceptionMessage);
3195 }
Jack Palevich27f80022009-04-15 19:13:17 -07003196}
3197
3198/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3199static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08003200android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
3201 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
Romain Guy84cac202016-12-05 12:26:02 -08003202 jint _exception = 0;
3203 const char * _exceptionType = NULL;
3204 const char * _exceptionMessage = NULL;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003205 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003206 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003207 jint _remaining;
3208 GLvoid *pointer = (GLvoid *) 0;
3209
3210 if (pointer_buf) {
3211 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3212 if ( ! pointer ) {
3213 return;
3214 }
3215 }
3216 glWeightPointerOESBounds(
3217 (GLint)size,
3218 (GLenum)type,
3219 (GLsizei)stride,
3220 (GLvoid *)pointer,
3221 (GLsizei)remaining
3222 );
Romain Guy84cac202016-12-05 12:26:02 -08003223 if (_exception) {
3224 jniThrowException(_env, _exceptionType, _exceptionMessage);
3225 }
Jack Palevich27f80022009-04-15 19:13:17 -07003226}
3227
3228/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
3229static void
3230android_glDepthRangefOES__FF
3231 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003232 glDepthRangefOES(
3233 (GLclampf)zNear,
3234 (GLclampf)zFar
3235 );
Jack Palevich27f80022009-04-15 19:13:17 -07003236}
3237
3238/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3239static void
3240android_glFrustumfOES__FFFFFF
3241 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003242 glFrustumfOES(
3243 (GLfloat)left,
3244 (GLfloat)right,
3245 (GLfloat)bottom,
3246 (GLfloat)top,
3247 (GLfloat)zNear,
3248 (GLfloat)zFar
3249 );
Jack Palevich27f80022009-04-15 19:13:17 -07003250}
3251
3252/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3253static void
3254android_glOrthofOES__FFFFFF
3255 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003256 glOrthofOES(
3257 (GLfloat)left,
3258 (GLfloat)right,
3259 (GLfloat)bottom,
3260 (GLfloat)top,
3261 (GLfloat)zNear,
3262 (GLfloat)zFar
3263 );
Jack Palevich27f80022009-04-15 19:13:17 -07003264}
3265
3266/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3267static void
3268android_glClipPlanefOES__I_3FI
3269 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003270 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003271 const char * _exceptionType = NULL;
3272 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003273 GLfloat *equation_base = (GLfloat *) 0;
3274 jint _remaining;
3275 GLfloat *equation = (GLfloat *) 0;
3276
3277 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003278 _exception = 1;
3279 _exceptionType = "java/lang/IllegalArgumentException";
3280 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003281 goto exit;
3282 }
3283 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003284 _exception = 1;
3285 _exceptionType = "java/lang/IllegalArgumentException";
3286 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003287 goto exit;
3288 }
3289 _remaining = _env->GetArrayLength(equation_ref) - offset;
3290 equation_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003291 _env->GetFloatArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003292 equation = equation_base + offset;
3293
3294 glClipPlanefOES(
3295 (GLenum)plane,
3296 (GLfloat *)equation
3297 );
3298
3299exit:
3300 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003301 _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003302 JNI_ABORT);
3303 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003304 if (_exception) {
3305 jniThrowException(_env, _exceptionType, _exceptionMessage);
3306 }
Jack Palevich27f80022009-04-15 19:13:17 -07003307}
3308
3309/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3310static void
3311android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
3312 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003313 jint _exception = 0;
3314 const char * _exceptionType = NULL;
3315 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003316 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003317 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003318 jint _remaining;
3319 GLfloat *equation = (GLfloat *) 0;
3320
Romain Guy84cac202016-12-05 12:26:02 -08003321 if (!equation_buf) {
3322 _exception = 1;
3323 _exceptionType = "java/lang/IllegalArgumentException";
3324 _exceptionMessage = "equation == null";
3325 goto exit;
3326 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003327 equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003328 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003329 char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003330 equation = (GLfloat *) (_equationBase + _bufferOffset);
3331 }
Jack Palevicha3795852009-04-24 10:35:11 -07003332 glClipPlanefOES(
3333 (GLenum)plane,
3334 (GLfloat *)equation
3335 );
Romain Guy84cac202016-12-05 12:26:02 -08003336
3337exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003338 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003339 _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003340 }
Romain Guy84cac202016-12-05 12:26:02 -08003341 if (_exception) {
3342 jniThrowException(_env, _exceptionType, _exceptionMessage);
3343 }
Jack Palevich27f80022009-04-15 19:13:17 -07003344}
3345
3346/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3347static void
3348android_glGetClipPlanefOES__I_3FI
3349 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003350 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003351 const char * _exceptionType = NULL;
3352 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003353 GLfloat *eqn_base = (GLfloat *) 0;
3354 jint _remaining;
3355 GLfloat *eqn = (GLfloat *) 0;
3356
3357 if (!eqn_ref) {
3358 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003359 _exceptionType = "java/lang/IllegalArgumentException";
3360 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003361 goto exit;
3362 }
3363 if (offset < 0) {
3364 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003365 _exceptionType = "java/lang/IllegalArgumentException";
3366 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003367 goto exit;
3368 }
3369 _remaining = _env->GetArrayLength(eqn_ref) - offset;
3370 if (_remaining < 4) {
3371 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003372 _exceptionType = "java/lang/IllegalArgumentException";
3373 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003374 goto exit;
3375 }
3376 eqn_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003377 _env->GetFloatArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003378 eqn = eqn_base + offset;
3379
3380 glGetClipPlanefOES(
3381 (GLenum)pname,
3382 (GLfloat *)eqn
3383 );
3384
3385exit:
3386 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003387 _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003388 _exception ? JNI_ABORT: 0);
3389 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003390 if (_exception) {
3391 jniThrowException(_env, _exceptionType, _exceptionMessage);
3392 }
Jack Palevich27f80022009-04-15 19:13:17 -07003393}
3394
3395/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3396static void
3397android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
3398 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003399 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003400 const char * _exceptionType = NULL;
3401 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003402 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003403 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003404 jint _remaining;
3405 GLfloat *eqn = (GLfloat *) 0;
3406
Romain Guy84cac202016-12-05 12:26:02 -08003407 if (!eqn_buf) {
3408 _exception = 1;
3409 _exceptionType = "java/lang/IllegalArgumentException";
3410 _exceptionMessage = "eqn == null";
3411 goto exit;
3412 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003413 eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07003414 if (_remaining < 4) {
3415 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003416 _exceptionType = "java/lang/IllegalArgumentException";
3417 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003418 goto exit;
3419 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003420 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003421 char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003422 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
3423 }
Jack Palevicha3795852009-04-24 10:35:11 -07003424 glGetClipPlanefOES(
3425 (GLenum)pname,
3426 (GLfloat *)eqn
3427 );
3428
3429exit:
3430 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003431 _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07003432 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003433 if (_exception) {
3434 jniThrowException(_env, _exceptionType, _exceptionMessage);
3435 }
Jack Palevich27f80022009-04-15 19:13:17 -07003436}
3437
3438/* void glClearDepthfOES ( GLclampf depth ) */
3439static void
3440android_glClearDepthfOES__F
3441 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07003442 glClearDepthfOES(
3443 (GLclampf)depth
3444 );
Jack Palevich27f80022009-04-15 19:13:17 -07003445}
3446
3447/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3448static void
3449android_glTexGenfOES__IIF
3450 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003451 glTexGenfOES(
3452 (GLenum)coord,
3453 (GLenum)pname,
3454 (GLfloat)param
3455 );
Jack Palevich27f80022009-04-15 19:13:17 -07003456}
3457
3458/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3459static void
3460android_glTexGenfvOES__II_3FI
3461 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003462 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003463 const char * _exceptionType = NULL;
3464 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003465 GLfloat *params_base = (GLfloat *) 0;
3466 jint _remaining;
3467 GLfloat *params = (GLfloat *) 0;
3468
3469 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003470 _exception = 1;
3471 _exceptionType = "java/lang/IllegalArgumentException";
3472 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003473 goto exit;
3474 }
3475 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003476 _exception = 1;
3477 _exceptionType = "java/lang/IllegalArgumentException";
3478 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003479 goto exit;
3480 }
3481 _remaining = _env->GetArrayLength(params_ref) - offset;
3482 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003483 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003484 params = params_base + offset;
3485
3486 glTexGenfvOES(
3487 (GLenum)coord,
3488 (GLenum)pname,
3489 (GLfloat *)params
3490 );
3491
3492exit:
3493 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003494 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003495 JNI_ABORT);
3496 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003497 if (_exception) {
3498 jniThrowException(_env, _exceptionType, _exceptionMessage);
3499 }
Jack Palevich27f80022009-04-15 19:13:17 -07003500}
3501
3502/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3503static void
3504android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3505 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003506 jint _exception = 0;
3507 const char * _exceptionType = NULL;
3508 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003509 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003510 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003511 jint _remaining;
3512 GLfloat *params = (GLfloat *) 0;
3513
Romain Guy84cac202016-12-05 12:26:02 -08003514 if (!params_buf) {
3515 _exception = 1;
3516 _exceptionType = "java/lang/IllegalArgumentException";
3517 _exceptionMessage = "params == null";
3518 goto exit;
3519 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003520 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003521 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003522 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003523 params = (GLfloat *) (_paramsBase + _bufferOffset);
3524 }
Jack Palevicha3795852009-04-24 10:35:11 -07003525 glTexGenfvOES(
3526 (GLenum)coord,
3527 (GLenum)pname,
3528 (GLfloat *)params
3529 );
Romain Guy84cac202016-12-05 12:26:02 -08003530
3531exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003532 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003533 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003534 }
Romain Guy84cac202016-12-05 12:26:02 -08003535 if (_exception) {
3536 jniThrowException(_env, _exceptionType, _exceptionMessage);
3537 }
Jack Palevich27f80022009-04-15 19:13:17 -07003538}
3539
3540/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3541static void
3542android_glTexGeniOES__III
3543 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003544 glTexGeniOES(
3545 (GLenum)coord,
3546 (GLenum)pname,
3547 (GLint)param
3548 );
Jack Palevich27f80022009-04-15 19:13:17 -07003549}
3550
3551/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3552static void
3553android_glTexGenivOES__II_3II
3554 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003555 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003556 const char * _exceptionType = NULL;
3557 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003558 GLint *params_base = (GLint *) 0;
3559 jint _remaining;
3560 GLint *params = (GLint *) 0;
3561
3562 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003563 _exception = 1;
3564 _exceptionType = "java/lang/IllegalArgumentException";
3565 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003566 goto exit;
3567 }
3568 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003569 _exception = 1;
3570 _exceptionType = "java/lang/IllegalArgumentException";
3571 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003572 goto exit;
3573 }
3574 _remaining = _env->GetArrayLength(params_ref) - offset;
3575 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003576 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003577 params = params_base + offset;
3578
3579 glTexGenivOES(
3580 (GLenum)coord,
3581 (GLenum)pname,
3582 (GLint *)params
3583 );
3584
3585exit:
3586 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003587 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003588 JNI_ABORT);
3589 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003590 if (_exception) {
3591 jniThrowException(_env, _exceptionType, _exceptionMessage);
3592 }
Jack Palevich27f80022009-04-15 19:13:17 -07003593}
3594
3595/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3596static void
3597android_glTexGenivOES__IILjava_nio_IntBuffer_2
3598 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003599 jint _exception = 0;
3600 const char * _exceptionType = NULL;
3601 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003602 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003603 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003604 jint _remaining;
3605 GLint *params = (GLint *) 0;
3606
Romain Guy84cac202016-12-05 12:26:02 -08003607 if (!params_buf) {
3608 _exception = 1;
3609 _exceptionType = "java/lang/IllegalArgumentException";
3610 _exceptionMessage = "params == null";
3611 goto exit;
3612 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003613 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003614 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003615 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003616 params = (GLint *) (_paramsBase + _bufferOffset);
3617 }
Jack Palevicha3795852009-04-24 10:35:11 -07003618 glTexGenivOES(
3619 (GLenum)coord,
3620 (GLenum)pname,
3621 (GLint *)params
3622 );
Romain Guy84cac202016-12-05 12:26:02 -08003623
3624exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003625 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003626 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003627 }
Romain Guy84cac202016-12-05 12:26:02 -08003628 if (_exception) {
3629 jniThrowException(_env, _exceptionType, _exceptionMessage);
3630 }
Jack Palevich27f80022009-04-15 19:13:17 -07003631}
3632
3633/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3634static void
3635android_glTexGenxOES__III
3636 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003637 glTexGenxOES(
3638 (GLenum)coord,
3639 (GLenum)pname,
3640 (GLfixed)param
3641 );
Jack Palevich27f80022009-04-15 19:13:17 -07003642}
3643
3644/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3645static void
3646android_glTexGenxvOES__II_3II
3647 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003648 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003649 const char * _exceptionType = NULL;
3650 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003651 GLfixed *params_base = (GLfixed *) 0;
3652 jint _remaining;
3653 GLfixed *params = (GLfixed *) 0;
3654
3655 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003656 _exception = 1;
3657 _exceptionType = "java/lang/IllegalArgumentException";
3658 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003659 goto exit;
3660 }
3661 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003662 _exception = 1;
3663 _exceptionType = "java/lang/IllegalArgumentException";
3664 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003665 goto exit;
3666 }
3667 _remaining = _env->GetArrayLength(params_ref) - offset;
3668 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003669 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003670 params = params_base + offset;
3671
3672 glTexGenxvOES(
3673 (GLenum)coord,
3674 (GLenum)pname,
3675 (GLfixed *)params
3676 );
3677
3678exit:
3679 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003680 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003681 JNI_ABORT);
3682 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003683 if (_exception) {
3684 jniThrowException(_env, _exceptionType, _exceptionMessage);
3685 }
Jack Palevich27f80022009-04-15 19:13:17 -07003686}
3687
3688/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3689static void
3690android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3691 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003692 jint _exception = 0;
3693 const char * _exceptionType = NULL;
3694 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003695 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003696 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003697 jint _remaining;
3698 GLfixed *params = (GLfixed *) 0;
3699
Romain Guy84cac202016-12-05 12:26:02 -08003700 if (!params_buf) {
3701 _exception = 1;
3702 _exceptionType = "java/lang/IllegalArgumentException";
3703 _exceptionMessage = "params == null";
3704 goto exit;
3705 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003706 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003707 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003708 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003709 params = (GLfixed *) (_paramsBase + _bufferOffset);
3710 }
Jack Palevicha3795852009-04-24 10:35:11 -07003711 glTexGenxvOES(
3712 (GLenum)coord,
3713 (GLenum)pname,
3714 (GLfixed *)params
3715 );
Romain Guy84cac202016-12-05 12:26:02 -08003716
3717exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003718 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003719 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003720 }
Romain Guy84cac202016-12-05 12:26:02 -08003721 if (_exception) {
3722 jniThrowException(_env, _exceptionType, _exceptionMessage);
3723 }
Jack Palevich27f80022009-04-15 19:13:17 -07003724}
3725
3726/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3727static void
3728android_glGetTexGenfvOES__II_3FI
3729 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003730 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003731 const char * _exceptionType = NULL;
3732 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003733 GLfloat *params_base = (GLfloat *) 0;
3734 jint _remaining;
3735 GLfloat *params = (GLfloat *) 0;
3736
3737 if (!params_ref) {
3738 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003739 _exceptionType = "java/lang/IllegalArgumentException";
3740 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003741 goto exit;
3742 }
3743 if (offset < 0) {
3744 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003745 _exceptionType = "java/lang/IllegalArgumentException";
3746 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003747 goto exit;
3748 }
3749 _remaining = _env->GetArrayLength(params_ref) - offset;
3750 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003751 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003752 params = params_base + offset;
3753
3754 glGetTexGenfvOES(
3755 (GLenum)coord,
3756 (GLenum)pname,
3757 (GLfloat *)params
3758 );
3759
3760exit:
3761 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003762 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003763 _exception ? JNI_ABORT: 0);
3764 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003765 if (_exception) {
3766 jniThrowException(_env, _exceptionType, _exceptionMessage);
3767 }
Jack Palevich27f80022009-04-15 19:13:17 -07003768}
3769
3770/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3771static void
3772android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3773 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003774 jint _exception = 0;
3775 const char * _exceptionType = NULL;
3776 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003777 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003778 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003779 jint _remaining;
3780 GLfloat *params = (GLfloat *) 0;
3781
Romain Guy84cac202016-12-05 12:26:02 -08003782 if (!params_buf) {
3783 _exception = 1;
3784 _exceptionType = "java/lang/IllegalArgumentException";
3785 _exceptionMessage = "params == null";
3786 goto exit;
3787 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003788 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003789 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003790 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003791 params = (GLfloat *) (_paramsBase + _bufferOffset);
3792 }
Jack Palevicha3795852009-04-24 10:35:11 -07003793 glGetTexGenfvOES(
3794 (GLenum)coord,
3795 (GLenum)pname,
3796 (GLfloat *)params
3797 );
Romain Guy84cac202016-12-05 12:26:02 -08003798
3799exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003800 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003801 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3802 }
3803 if (_exception) {
3804 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07003805 }
Jack Palevich27f80022009-04-15 19:13:17 -07003806}
3807
3808/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3809static void
3810android_glGetTexGenivOES__II_3II
3811 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003812 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003813 const char * _exceptionType = NULL;
3814 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003815 GLint *params_base = (GLint *) 0;
3816 jint _remaining;
3817 GLint *params = (GLint *) 0;
3818
3819 if (!params_ref) {
3820 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003821 _exceptionType = "java/lang/IllegalArgumentException";
3822 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003823 goto exit;
3824 }
3825 if (offset < 0) {
3826 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003827 _exceptionType = "java/lang/IllegalArgumentException";
3828 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003829 goto exit;
3830 }
3831 _remaining = _env->GetArrayLength(params_ref) - offset;
3832 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003833 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003834 params = params_base + offset;
3835
3836 glGetTexGenivOES(
3837 (GLenum)coord,
3838 (GLenum)pname,
3839 (GLint *)params
3840 );
3841
3842exit:
3843 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003844 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003845 _exception ? JNI_ABORT: 0);
3846 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003847 if (_exception) {
3848 jniThrowException(_env, _exceptionType, _exceptionMessage);
3849 }
Jack Palevich27f80022009-04-15 19:13:17 -07003850}
3851
3852/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3853static void
3854android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3855 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003856 jint _exception = 0;
3857 const char * _exceptionType = NULL;
3858 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003859 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003860 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003861 jint _remaining;
3862 GLint *params = (GLint *) 0;
3863
Romain Guy84cac202016-12-05 12:26:02 -08003864 if (!params_buf) {
3865 _exception = 1;
3866 _exceptionType = "java/lang/IllegalArgumentException";
3867 _exceptionMessage = "params == null";
3868 goto exit;
3869 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003870 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003871 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003872 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003873 params = (GLint *) (_paramsBase + _bufferOffset);
3874 }
Jack Palevicha3795852009-04-24 10:35:11 -07003875 glGetTexGenivOES(
3876 (GLenum)coord,
3877 (GLenum)pname,
3878 (GLint *)params
3879 );
Romain Guy84cac202016-12-05 12:26:02 -08003880
3881exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003882 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003883 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3884 }
3885 if (_exception) {
3886 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07003887 }
Jack Palevich27f80022009-04-15 19:13:17 -07003888}
3889
3890/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3891static void
3892android_glGetTexGenxvOES__II_3II
3893 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003894 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003895 const char * _exceptionType = NULL;
3896 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003897 GLfixed *params_base = (GLfixed *) 0;
3898 jint _remaining;
3899 GLfixed *params = (GLfixed *) 0;
3900
3901 if (!params_ref) {
3902 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003903 _exceptionType = "java/lang/IllegalArgumentException";
3904 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003905 goto exit;
3906 }
3907 if (offset < 0) {
3908 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003909 _exceptionType = "java/lang/IllegalArgumentException";
3910 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003911 goto exit;
3912 }
3913 _remaining = _env->GetArrayLength(params_ref) - offset;
3914 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003915 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003916 params = params_base + offset;
3917
3918 glGetTexGenxvOES(
3919 (GLenum)coord,
3920 (GLenum)pname,
3921 (GLfixed *)params
3922 );
3923
3924exit:
3925 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003926 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003927 _exception ? JNI_ABORT: 0);
3928 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003929 if (_exception) {
3930 jniThrowException(_env, _exceptionType, _exceptionMessage);
3931 }
Jack Palevich27f80022009-04-15 19:13:17 -07003932}
3933
3934/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3935static void
3936android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3937 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003938 jint _exception = 0;
3939 const char * _exceptionType = NULL;
3940 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003941 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003942 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003943 jint _remaining;
3944 GLfixed *params = (GLfixed *) 0;
3945
Romain Guy84cac202016-12-05 12:26:02 -08003946 if (!params_buf) {
3947 _exception = 1;
3948 _exceptionType = "java/lang/IllegalArgumentException";
3949 _exceptionMessage = "params == null";
3950 goto exit;
3951 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003952 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003953 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003954 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003955 params = (GLfixed *) (_paramsBase + _bufferOffset);
3956 }
Jack Palevicha3795852009-04-24 10:35:11 -07003957 glGetTexGenxvOES(
3958 (GLenum)coord,
3959 (GLenum)pname,
3960 (GLfixed *)params
3961 );
Romain Guy84cac202016-12-05 12:26:02 -08003962
3963exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003964 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003965 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3966 }
3967 if (_exception) {
3968 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07003969 }
Jack Palevich27f80022009-04-15 19:13:17 -07003970}
3971
3972static const char *classPathName = "android/opengl/GLES11Ext";
3973
Daniel Micay76f6a862015-09-19 17:31:01 -04003974static const JNINativeMethod methods[] = {
Jack Palevich27f80022009-04-15 19:13:17 -07003975{"_nativeClassInit", "()V", (void*)nativeClassInit },
3976{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
3977{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
3978{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
3979{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
3980{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
3981{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
3982{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
3983{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
3984{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
3985{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
3986{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
3987{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
3988{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
3989{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
3990{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
3991{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
3992{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
3993{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
3994{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
3995{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
3996{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
3997{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
3998{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
3999{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
4000{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
4001{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
4002{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
4003{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
4004{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
4005{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
4006{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
4007{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
4008{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
4009{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
4010{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
4011{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
4012{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
4013{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4014{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
4015{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4016{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
4017{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
4018{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
4019{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
4020{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
4021{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
4022{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
4023{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
4024{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
4025{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
4026{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
4027{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
4028{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
4029{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
4030{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
4031{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
4032{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
4033{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
4034{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
4035{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
4036{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
4037{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
4038{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
4039{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
4040{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
4041{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
4042{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
4043{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4044{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
4045{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
4046{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4047{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
4048{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
4049{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
4050{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
4051{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4052{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
4053{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4054{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
4055{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
4056{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
4057{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
4058{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
4059{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
4060{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
4061{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
4062{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
4063{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
4064{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
4065{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
4066{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
4067{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
4068{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
4069{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
4070{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08004071{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
4072{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07004073{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
4074{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
4075{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
4076{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
4077{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4078{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
4079{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4080{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
4081{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
4082{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
4083{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4084{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
4085{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
4086{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
4087{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
4088{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
4089{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
4090{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
4091{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4092{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
4093{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
4094{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
4095{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
4096};
4097
4098int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
4099{
4100 int err;
4101 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
4102 return err;
4103}