blob: 8f71a6d7dc4912fde019abd21b3c94753f6e3cba [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"
21#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
22#pragma GCC diagnostic ignored "-Wunused-function"
23
Mathias Agopian2ad04772013-02-23 03:12:30 -080024#include <GLES/gl.h>
25#include <GLES/glext.h>
26
Jesse Hall9626f822014-05-19 20:57:49 -070027#include <jni.h>
Steven Moreland2279b252017-07-19 09:50:45 -070028#include <nativehelper/JNIHelp.h>
Jack Palevich27f80022009-04-15 19:13:17 -070029#include <android_runtime/AndroidRuntime.h>
30#include <utils/misc.h>
Jack Palevich27f80022009-04-15 19:13:17 -070031#include <assert.h>
Jack Palevichbe6eac82009-12-08 15:43:51 +080032
Jack Palevich27f80022009-04-15 19:13:17 -070033static int initialized = 0;
34
35static jclass nioAccessClass;
36static jclass bufferClass;
Jack Palevich27f80022009-04-15 19:13:17 -070037static jmethodID getBasePointerID;
38static jmethodID getBaseArrayID;
39static jmethodID getBaseArrayOffsetID;
40static jfieldID positionID;
41static jfieldID limitID;
42static jfieldID elementSizeShiftID;
43
Mathias Agopian2ad04772013-02-23 03:12:30 -080044
45/* special calls implemented in Android's GLES wrapper used to more
46 * efficiently bound-check passed arrays */
47extern "C" {
48#ifdef GL_VERSION_ES_CM_1_1
49GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
50 const GLvoid *ptr, GLsizei count);
51GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
52 const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
61GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
62 GLsizei stride, const GLvoid *pointer, GLsizei count);
63#endif
64#ifdef GL_ES_VERSION_2_0
65static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
66 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
67 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
68}
69#endif
Andy McFaddencee51982013-04-25 16:08:31 -070070#ifdef GL_ES_VERSION_3_0
71static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
72 GLsizei stride, const GLvoid *pointer, GLsizei count) {
73 glVertexAttribIPointer(indx, size, type, stride, pointer);
74}
75#endif
Mathias Agopian2ad04772013-02-23 03:12:30 -080076}
77
Jack Palevich27f80022009-04-15 19:13:17 -070078/* Cache method IDs each time the class is loaded. */
79
80static void
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070081nativeClassInit(JNIEnv *_env, jclass glImplClass)
Jack Palevich27f80022009-04-15 19:13:17 -070082{
83 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
84 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
85
86 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
87 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
88
89 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
90 "getBasePointer", "(Ljava/nio/Buffer;)J");
91 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
93 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
94 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
95
96 positionID = _env->GetFieldID(bufferClass, "position", "I");
97 limitID = _env->GetFieldID(bufferClass, "limit", "I");
98 elementSizeShiftID =
99 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
100}
101
Jack Palevich27f80022009-04-15 19:13:17 -0700102static void *
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700103getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
Jack Palevich27f80022009-04-15 19:13:17 -0700104{
105 jint position;
106 jint limit;
107 jint elementSizeShift;
108 jlong pointer;
Jack Palevich27f80022009-04-15 19:13:17 -0700109
110 position = _env->GetIntField(buffer, positionID);
111 limit = _env->GetIntField(buffer, limitID);
112 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
113 *remaining = (limit - position) << elementSizeShift;
114 pointer = _env->CallStaticLongMethod(nioAccessClass,
115 getBasePointerID, buffer);
116 if (pointer != 0L) {
117 *array = NULL;
Ashok Bhat01c26ea2014-02-24 09:49:07 +0000118 return reinterpret_cast<void*>(pointer);
Jack Palevich27f80022009-04-15 19:13:17 -0700119 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700120
Jack Palevich27f80022009-04-15 19:13:17 -0700121 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
122 getBaseArrayID, buffer);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700123 *offset = _env->CallStaticIntMethod(nioAccessClass,
Jack Palevich27f80022009-04-15 19:13:17 -0700124 getBaseArrayOffsetID, buffer);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800125
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700126 return NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700127}
128
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700129class ByteArrayGetter {
130public:
131 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
132 return _env->GetByteArrayElements(array, is_copy);
133 }
134};
135class BooleanArrayGetter {
136public:
137 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
138 return _env->GetBooleanArrayElements(array, is_copy);
139 }
140};
141class CharArrayGetter {
142public:
143 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
144 return _env->GetCharArrayElements(array, is_copy);
145 }
146};
147class ShortArrayGetter {
148public:
149 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
150 return _env->GetShortArrayElements(array, is_copy);
151 }
152};
153class IntArrayGetter {
154public:
155 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
156 return _env->GetIntArrayElements(array, is_copy);
157 }
158};
159class LongArrayGetter {
160public:
161 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
162 return _env->GetLongArrayElements(array, is_copy);
163 }
164};
165class FloatArrayGetter {
166public:
167 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
168 return _env->GetFloatArrayElements(array, is_copy);
169 }
170};
171class DoubleArrayGetter {
172public:
173 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
174 return _env->GetDoubleArrayElements(array, is_copy);
175 }
176};
177
178template<typename JTYPEARRAY, typename ARRAYGETTER>
179static void*
180getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
181 return ARRAYGETTER::Get(_env, array, is_copy);
182}
183
184class ByteArrayReleaser {
185public:
186 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
187 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
188 }
189};
190class BooleanArrayReleaser {
191public:
192 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
193 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
194 }
195};
196class CharArrayReleaser {
197public:
198 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
199 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
200 }
201};
202class ShortArrayReleaser {
203public:
204 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
205 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
206 }
207};
208class IntArrayReleaser {
209public:
210 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
211 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
212 }
213};
214class LongArrayReleaser {
215public:
216 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
217 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
218 }
219};
220class FloatArrayReleaser {
221public:
222 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
223 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
224 }
225};
226class DoubleArrayReleaser {
227public:
228 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
229 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
230 }
231};
232
233template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
234static void
235releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
236 ARRAYRELEASER::Release(_env, array, data, commit);
237}
238
Jack Palevich27f80022009-04-15 19:13:17 -0700239static void
240releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
241{
242 _env->ReleasePrimitiveArrayCritical(array, data,
Mathias Agopian2ad04772013-02-23 03:12:30 -0800243 commit ? 0 : JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700244}
245
Jack Palevichbe6eac82009-12-08 15:43:51 +0800246static void *
247getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
248 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
249 if (buf) {
250 jint position = _env->GetIntField(buffer, positionID);
251 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
252 buf += position << elementSizeShift;
253 } else {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700254 jniThrowException(_env, "java/lang/IllegalArgumentException",
255 "Must use a native order direct Buffer");
Jack Palevichbe6eac82009-12-08 15:43:51 +0800256 }
257 return (void*) buf;
258}
Mathias Agopian2ad04772013-02-23 03:12:30 -0800259
260// --------------------------------------------------------------------------
261
262/*
263 * returns the number of values glGet returns for a given pname.
264 *
265 * The code below is written such that pnames requiring only one values
266 * are the default (and are not explicitely tested for). This makes the
267 * checking code much shorter/readable/efficient.
268 *
269 * This means that unknown pnames (e.g.: extensions) will default to 1. If
270 * that unknown pname needs more than 1 value, then the validation check
271 * is incomplete and the app may crash if it passed the wrong number params.
272 */
273static int getNeededCount(GLint pname) {
274 int needed = 1;
Romain Guydc43a6c2017-02-17 19:54:25 -0800275#ifdef GL_ES_VERSION_3_0
276 // GLES 3.x pnames
277 switch (pname) {
278 case GL_MAX_VIEWPORT_DIMS:
279 needed = 2;
280 break;
281
282 case GL_PROGRAM_BINARY_FORMATS:
283 glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed);
284 break;
285 }
286#endif
287
Mathias Agopian2ad04772013-02-23 03:12:30 -0800288#ifdef GL_ES_VERSION_2_0
289 // GLES 2.x pnames
290 switch (pname) {
291 case GL_ALIASED_LINE_WIDTH_RANGE:
292 case GL_ALIASED_POINT_SIZE_RANGE:
293 needed = 2;
294 break;
295
296 case GL_BLEND_COLOR:
297 case GL_COLOR_CLEAR_VALUE:
298 case GL_COLOR_WRITEMASK:
299 case GL_SCISSOR_BOX:
300 case GL_VIEWPORT:
301 needed = 4;
302 break;
303
304 case GL_COMPRESSED_TEXTURE_FORMATS:
305 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
306 break;
307
308 case GL_SHADER_BINARY_FORMATS:
309 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
310 break;
311 }
312#endif
313
314#ifdef GL_VERSION_ES_CM_1_1
315 // GLES 1.x pnames
316 switch (pname) {
317 case GL_ALIASED_LINE_WIDTH_RANGE:
318 case GL_ALIASED_POINT_SIZE_RANGE:
319 case GL_DEPTH_RANGE:
320 case GL_SMOOTH_LINE_WIDTH_RANGE:
321 case GL_SMOOTH_POINT_SIZE_RANGE:
322 needed = 2;
323 break;
324
325 case GL_CURRENT_NORMAL:
326 case GL_POINT_DISTANCE_ATTENUATION:
327 needed = 3;
328 break;
329
330 case GL_COLOR_CLEAR_VALUE:
331 case GL_COLOR_WRITEMASK:
332 case GL_CURRENT_COLOR:
333 case GL_CURRENT_TEXTURE_COORDS:
334 case GL_FOG_COLOR:
335 case GL_LIGHT_MODEL_AMBIENT:
336 case GL_SCISSOR_BOX:
337 case GL_VIEWPORT:
338 needed = 4;
339 break;
340
341 case GL_MODELVIEW_MATRIX:
342 case GL_PROJECTION_MATRIX:
343 case GL_TEXTURE_MATRIX:
344 needed = 16;
345 break;
346
347 case GL_COMPRESSED_TEXTURE_FORMATS:
348 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
349 break;
350 }
351#endif
352 return needed;
353}
354
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700355template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
356 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800357static void
358get
359 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
360 jint _exception = 0;
361 const char * _exceptionType;
362 const char * _exceptionMessage;
363 CTYPE *params_base = (CTYPE *) 0;
364 jint _remaining;
365 CTYPE *params = (CTYPE *) 0;
366 int _needed = 0;
367
368 if (!params_ref) {
369 _exception = 1;
370 _exceptionType = "java/lang/IllegalArgumentException";
371 _exceptionMessage = "params == null";
372 goto exit;
373 }
374 if (offset < 0) {
375 _exception = 1;
376 _exceptionType = "java/lang/IllegalArgumentException";
377 _exceptionMessage = "offset < 0";
378 goto exit;
379 }
380 _remaining = _env->GetArrayLength(params_ref) - offset;
381 _needed = getNeededCount(pname);
382 // if we didn't find this pname, we just assume the user passed
383 // an array of the right size -- this might happen with extensions
384 // or if we forget an enum here.
385 if (_remaining < _needed) {
386 _exception = 1;
387 _exceptionType = "java/lang/IllegalArgumentException";
388 _exceptionMessage = "length - offset < needed";
389 goto exit;
390 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700391 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
392 _env, params_ref, (jboolean *)0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800393 params = params_base + offset;
394
395 GET(
396 (GLenum)pname,
397 (CTYPE *)params
398 );
399
400exit:
401 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700402 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
403 _env, params_ref, params_base, !_exception);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800404 }
405 if (_exception) {
406 jniThrowException(_env, _exceptionType, _exceptionMessage);
407 }
408}
409
410
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700411template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
412 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800413static void
414getarray
415 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
416 jint _exception = 0;
417 const char * _exceptionType;
418 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700419 JTYPEARRAY _array = (JTYPEARRAY) 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800420 jint _bufferOffset = (jint) 0;
421 jint _remaining;
422 CTYPE *params = (CTYPE *) 0;
423 int _needed = 0;
424
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700425 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Andy McFaddencee51982013-04-25 16:08:31 -0700426 _remaining /= sizeof(CTYPE); // convert from bytes to item count
Mathias Agopian2ad04772013-02-23 03:12:30 -0800427 _needed = getNeededCount(pname);
428 // if we didn't find this pname, we just assume the user passed
429 // an array of the right size -- this might happen with extensions
430 // or if we forget an enum here.
431 if (_needed>0 && _remaining < _needed) {
432 _exception = 1;
433 _exceptionType = "java/lang/IllegalArgumentException";
434 _exceptionMessage = "remaining() < needed";
435 goto exit;
436 }
437 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700438 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
439 _env, _array, (jboolean *) 0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800440 params = (CTYPE *) (_paramsBase + _bufferOffset);
441 }
442 GET(
443 (GLenum)pname,
444 (CTYPE *)params
445 );
446
447exit:
448 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700449 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
450 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800451 }
452 if (_exception) {
453 jniThrowException(_env, _exceptionType, _exceptionMessage);
454 }
455}
456
Jack Palevich27f80022009-04-15 19:13:17 -0700457// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700458/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
459static void
460android_glBlendEquationSeparateOES__II
461 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700462 glBlendEquationSeparateOES(
463 (GLenum)modeRGB,
464 (GLenum)modeAlpha
465 );
Jack Palevich27f80022009-04-15 19:13:17 -0700466}
467
468/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
469static void
470android_glBlendFuncSeparateOES__IIII
471 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700472 glBlendFuncSeparateOES(
473 (GLenum)srcRGB,
474 (GLenum)dstRGB,
475 (GLenum)srcAlpha,
476 (GLenum)dstAlpha
477 );
Jack Palevich27f80022009-04-15 19:13:17 -0700478}
479
480/* void glBlendEquationOES ( GLenum mode ) */
481static void
482android_glBlendEquationOES__I
483 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700484 glBlendEquationOES(
485 (GLenum)mode
486 );
Jack Palevich27f80022009-04-15 19:13:17 -0700487}
488
489/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
490static void
491android_glDrawTexsOES__SSSSS
492 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
493 glDrawTexsOES(
494 (GLshort)x,
495 (GLshort)y,
496 (GLshort)z,
497 (GLshort)width,
498 (GLshort)height
499 );
500}
501
502/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
503static void
504android_glDrawTexiOES__IIIII
505 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
506 glDrawTexiOES(
507 (GLint)x,
508 (GLint)y,
509 (GLint)z,
510 (GLint)width,
511 (GLint)height
512 );
513}
514
515/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
516static void
517android_glDrawTexxOES__IIIII
518 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
519 glDrawTexxOES(
520 (GLfixed)x,
521 (GLfixed)y,
522 (GLfixed)z,
523 (GLfixed)width,
524 (GLfixed)height
525 );
526}
527
528/* void glDrawTexsvOES ( const GLshort *coords ) */
529static void
530android_glDrawTexsvOES___3SI
531 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700532 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800533 const char * _exceptionType = NULL;
534 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700535 GLshort *coords_base = (GLshort *) 0;
536 jint _remaining;
537 GLshort *coords = (GLshort *) 0;
538
539 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700540 _exception = 1;
541 _exceptionType = "java/lang/IllegalArgumentException";
542 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700543 goto exit;
544 }
545 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700546 _exception = 1;
547 _exceptionType = "java/lang/IllegalArgumentException";
548 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700549 goto exit;
550 }
551 _remaining = _env->GetArrayLength(coords_ref) - offset;
552 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700553 _exception = 1;
554 _exceptionType = "java/lang/IllegalArgumentException";
555 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700556 goto exit;
557 }
558 coords_base = (GLshort *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700559 _env->GetShortArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700560 coords = coords_base + offset;
561
562 glDrawTexsvOES(
563 (GLshort *)coords
564 );
565
566exit:
567 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700568 _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700569 JNI_ABORT);
570 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700571 if (_exception) {
572 jniThrowException(_env, _exceptionType, _exceptionMessage);
573 }
Jack Palevich27f80022009-04-15 19:13:17 -0700574}
575
576/* void glDrawTexsvOES ( const GLshort *coords ) */
577static void
578android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
579 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700580 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800581 const char * _exceptionType = NULL;
582 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700583 jshortArray _array = (jshortArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700584 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700585 jint _remaining;
586 GLshort *coords = (GLshort *) 0;
587
Romain Guy84cac202016-12-05 12:26:02 -0800588 if (!coords_buf) {
589 _exception = 1;
590 _exceptionType = "java/lang/IllegalArgumentException";
591 _exceptionMessage = "coords == null";
592 goto exit;
593 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700594 coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700595 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700596 _exception = 1;
597 _exceptionType = "java/lang/IllegalArgumentException";
598 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700599 goto exit;
600 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700601 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700602 char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700603 coords = (GLshort *) (_coordsBase + _bufferOffset);
604 }
Jack Palevich27f80022009-04-15 19:13:17 -0700605 glDrawTexsvOES(
606 (GLshort *)coords
607 );
608
609exit:
610 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700611 _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700612 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700613 if (_exception) {
614 jniThrowException(_env, _exceptionType, _exceptionMessage);
615 }
Jack Palevich27f80022009-04-15 19:13:17 -0700616}
617
618/* void glDrawTexivOES ( const GLint *coords ) */
619static void
620android_glDrawTexivOES___3II
621 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700622 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800623 const char * _exceptionType = NULL;
624 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700625 GLint *coords_base = (GLint *) 0;
626 jint _remaining;
627 GLint *coords = (GLint *) 0;
628
629 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700630 _exception = 1;
631 _exceptionType = "java/lang/IllegalArgumentException";
632 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700633 goto exit;
634 }
635 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700636 _exception = 1;
637 _exceptionType = "java/lang/IllegalArgumentException";
638 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700639 goto exit;
640 }
641 _remaining = _env->GetArrayLength(coords_ref) - offset;
642 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700643 _exception = 1;
644 _exceptionType = "java/lang/IllegalArgumentException";
645 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700646 goto exit;
647 }
648 coords_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700649 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700650 coords = coords_base + offset;
651
652 glDrawTexivOES(
653 (GLint *)coords
654 );
655
656exit:
657 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700658 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700659 JNI_ABORT);
660 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700661 if (_exception) {
662 jniThrowException(_env, _exceptionType, _exceptionMessage);
663 }
Jack Palevich27f80022009-04-15 19:13:17 -0700664}
665
666/* void glDrawTexivOES ( const GLint *coords ) */
667static void
668android_glDrawTexivOES__Ljava_nio_IntBuffer_2
669 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700670 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800671 const char * _exceptionType = NULL;
672 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700673 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700674 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700675 jint _remaining;
676 GLint *coords = (GLint *) 0;
677
Romain Guy84cac202016-12-05 12:26:02 -0800678 if (!coords_buf) {
679 _exception = 1;
680 _exceptionType = "java/lang/IllegalArgumentException";
681 _exceptionMessage = "coords == null";
682 goto exit;
683 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700684 coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700685 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700686 _exception = 1;
687 _exceptionType = "java/lang/IllegalArgumentException";
688 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700689 goto exit;
690 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700691 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700692 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700693 coords = (GLint *) (_coordsBase + _bufferOffset);
694 }
Jack Palevich27f80022009-04-15 19:13:17 -0700695 glDrawTexivOES(
696 (GLint *)coords
697 );
698
699exit:
700 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700701 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700702 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700703 if (_exception) {
704 jniThrowException(_env, _exceptionType, _exceptionMessage);
705 }
Jack Palevich27f80022009-04-15 19:13:17 -0700706}
707
708/* void glDrawTexxvOES ( const GLfixed *coords ) */
709static void
710android_glDrawTexxvOES___3II
711 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700712 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800713 const char * _exceptionType = NULL;
714 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700715 GLfixed *coords_base = (GLfixed *) 0;
716 jint _remaining;
717 GLfixed *coords = (GLfixed *) 0;
718
719 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700720 _exception = 1;
721 _exceptionType = "java/lang/IllegalArgumentException";
722 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700723 goto exit;
724 }
725 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700726 _exception = 1;
727 _exceptionType = "java/lang/IllegalArgumentException";
728 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700729 goto exit;
730 }
731 _remaining = _env->GetArrayLength(coords_ref) - offset;
732 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700733 _exception = 1;
734 _exceptionType = "java/lang/IllegalArgumentException";
735 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700736 goto exit;
737 }
738 coords_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700739 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700740 coords = coords_base + offset;
741
742 glDrawTexxvOES(
743 (GLfixed *)coords
744 );
745
746exit:
747 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700748 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700749 JNI_ABORT);
750 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700751 if (_exception) {
752 jniThrowException(_env, _exceptionType, _exceptionMessage);
753 }
Jack Palevich27f80022009-04-15 19:13:17 -0700754}
755
756/* void glDrawTexxvOES ( const GLfixed *coords ) */
757static void
758android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
759 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700760 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800761 const char * _exceptionType = NULL;
762 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700763 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700764 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700765 jint _remaining;
766 GLfixed *coords = (GLfixed *) 0;
767
Romain Guy84cac202016-12-05 12:26:02 -0800768 if (!coords_buf) {
769 _exception = 1;
770 _exceptionType = "java/lang/IllegalArgumentException";
771 _exceptionMessage = "coords == null";
772 goto exit;
773 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700774 coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700775 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700776 _exception = 1;
777 _exceptionType = "java/lang/IllegalArgumentException";
778 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700779 goto exit;
780 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700781 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700782 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700783 coords = (GLfixed *) (_coordsBase + _bufferOffset);
784 }
Jack Palevich27f80022009-04-15 19:13:17 -0700785 glDrawTexxvOES(
786 (GLfixed *)coords
787 );
788
789exit:
790 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700791 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700792 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700793 if (_exception) {
794 jniThrowException(_env, _exceptionType, _exceptionMessage);
795 }
Jack Palevich27f80022009-04-15 19:13:17 -0700796}
797
798/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
799static void
800android_glDrawTexfOES__FFFFF
801 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
802 glDrawTexfOES(
803 (GLfloat)x,
804 (GLfloat)y,
805 (GLfloat)z,
806 (GLfloat)width,
807 (GLfloat)height
808 );
809}
810
811/* void glDrawTexfvOES ( const GLfloat *coords ) */
812static void
813android_glDrawTexfvOES___3FI
814 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700815 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800816 const char * _exceptionType = NULL;
817 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700818 GLfloat *coords_base = (GLfloat *) 0;
819 jint _remaining;
820 GLfloat *coords = (GLfloat *) 0;
821
822 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700823 _exception = 1;
824 _exceptionType = "java/lang/IllegalArgumentException";
825 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700826 goto exit;
827 }
828 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700829 _exception = 1;
830 _exceptionType = "java/lang/IllegalArgumentException";
831 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700832 goto exit;
833 }
834 _remaining = _env->GetArrayLength(coords_ref) - offset;
835 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700836 _exception = 1;
837 _exceptionType = "java/lang/IllegalArgumentException";
838 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700839 goto exit;
840 }
841 coords_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700842 _env->GetFloatArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700843 coords = coords_base + offset;
844
845 glDrawTexfvOES(
846 (GLfloat *)coords
847 );
848
849exit:
850 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700851 _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700852 JNI_ABORT);
853 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700854 if (_exception) {
855 jniThrowException(_env, _exceptionType, _exceptionMessage);
856 }
Jack Palevich27f80022009-04-15 19:13:17 -0700857}
858
859/* void glDrawTexfvOES ( const GLfloat *coords ) */
860static void
861android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
862 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700863 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800864 const char * _exceptionType = NULL;
865 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700866 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700867 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700868 jint _remaining;
869 GLfloat *coords = (GLfloat *) 0;
870
Romain Guy84cac202016-12-05 12:26:02 -0800871 if (!coords_buf) {
872 _exception = 1;
873 _exceptionType = "java/lang/IllegalArgumentException";
874 _exceptionMessage = "coords == null";
875 goto exit;
876 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700877 coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700878 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700879 _exception = 1;
880 _exceptionType = "java/lang/IllegalArgumentException";
881 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700882 goto exit;
883 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700884 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700885 char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700886 coords = (GLfloat *) (_coordsBase + _bufferOffset);
887 }
Jack Palevich27f80022009-04-15 19:13:17 -0700888 glDrawTexfvOES(
889 (GLfloat *)coords
890 );
891
892exit:
893 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700894 _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700895 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700896 if (_exception) {
897 jniThrowException(_env, _exceptionType, _exceptionMessage);
898 }
Jack Palevich27f80022009-04-15 19:13:17 -0700899}
900
901/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
902static void
903android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
904 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800905 jint _exception = 0;
906 const char * _exceptionType = NULL;
907 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700908 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700909 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700910 jint _remaining;
911 GLeglImageOES image = (GLeglImageOES) 0;
912
Romain Guy84cac202016-12-05 12:26:02 -0800913 if (!image_buf) {
914 _exception = 1;
915 _exceptionType = "java/lang/IllegalArgumentException";
916 _exceptionMessage = "image == null";
917 goto exit;
918 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700919 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700920 if (image == NULL) {
921 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
922 image = (GLeglImageOES) (_imageBase + _bufferOffset);
923 }
Jack Palevicha3795852009-04-24 10:35:11 -0700924 glEGLImageTargetTexture2DOES(
925 (GLenum)target,
926 (GLeglImageOES)image
927 );
Romain Guy84cac202016-12-05 12:26:02 -0800928
929exit:
Jack Palevicha3795852009-04-24 10:35:11 -0700930 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800931 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
932 }
933 if (_exception) {
934 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -0700935 }
Jack Palevich27f80022009-04-15 19:13:17 -0700936}
937
938/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
939static void
940android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
941 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Romain Guy84cac202016-12-05 12:26:02 -0800942 jint _exception = 0;
943 const char * _exceptionType = NULL;
944 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700945 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700946 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700947 jint _remaining;
948 GLeglImageOES image = (GLeglImageOES) 0;
949
Romain Guy84cac202016-12-05 12:26:02 -0800950 if (!image_buf) {
951 _exception = 1;
952 _exceptionType = "java/lang/IllegalArgumentException";
953 _exceptionMessage = "image == null";
954 goto exit;
955 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700956 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700957 if (image == NULL) {
958 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
959 image = (GLeglImageOES) (_imageBase + _bufferOffset);
960 }
Jack Palevicha3795852009-04-24 10:35:11 -0700961 glEGLImageTargetRenderbufferStorageOES(
962 (GLenum)target,
963 (GLeglImageOES)image
964 );
Romain Guy84cac202016-12-05 12:26:02 -0800965
966exit:
Jack Palevicha3795852009-04-24 10:35:11 -0700967 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -0800968 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
969 }
970 if (_exception) {
971 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -0700972 }
Jack Palevich27f80022009-04-15 19:13:17 -0700973}
974
975/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
976static void
977android_glAlphaFuncxOES__II
978 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700979 glAlphaFuncxOES(
980 (GLenum)func,
981 (GLclampx)ref
982 );
Jack Palevich27f80022009-04-15 19:13:17 -0700983}
984
985/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
986static void
987android_glClearColorxOES__IIII
988 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700989 glClearColorxOES(
990 (GLclampx)red,
991 (GLclampx)green,
992 (GLclampx)blue,
993 (GLclampx)alpha
994 );
Jack Palevich27f80022009-04-15 19:13:17 -0700995}
996
997/* void glClearDepthxOES ( GLclampx depth ) */
998static void
999android_glClearDepthxOES__I
1000 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07001001 glClearDepthxOES(
1002 (GLclampx)depth
1003 );
Jack Palevich27f80022009-04-15 19:13:17 -07001004}
1005
1006/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
1007static void
1008android_glClipPlanexOES__I_3II
1009 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001010 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001011 const char * _exceptionType = NULL;
1012 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001013 GLfixed *equation_base = (GLfixed *) 0;
1014 jint _remaining;
1015 GLfixed *equation = (GLfixed *) 0;
1016
1017 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001018 _exception = 1;
1019 _exceptionType = "java/lang/IllegalArgumentException";
1020 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001021 goto exit;
1022 }
1023 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001024 _exception = 1;
1025 _exceptionType = "java/lang/IllegalArgumentException";
1026 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001027 goto exit;
1028 }
1029 _remaining = _env->GetArrayLength(equation_ref) - offset;
1030 equation_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001031 _env->GetIntArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001032 equation = equation_base + offset;
1033
1034 glClipPlanexOES(
1035 (GLenum)plane,
1036 (GLfixed *)equation
1037 );
1038
1039exit:
1040 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001041 _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001042 JNI_ABORT);
1043 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001044 if (_exception) {
1045 jniThrowException(_env, _exceptionType, _exceptionMessage);
1046 }
Jack Palevich27f80022009-04-15 19:13:17 -07001047}
1048
1049/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
1050static void
1051android_glClipPlanexOES__ILjava_nio_IntBuffer_2
1052 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001053 jint _exception = 0;
1054 const char * _exceptionType = NULL;
1055 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001056 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001057 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001058 jint _remaining;
1059 GLfixed *equation = (GLfixed *) 0;
1060
Romain Guy84cac202016-12-05 12:26:02 -08001061 if (!equation_buf) {
1062 _exception = 1;
1063 _exceptionType = "java/lang/IllegalArgumentException";
1064 _exceptionMessage = "equation == null";
1065 goto exit;
1066 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001067 equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001068 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001069 char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001070 equation = (GLfixed *) (_equationBase + _bufferOffset);
1071 }
Jack Palevicha3795852009-04-24 10:35:11 -07001072 glClipPlanexOES(
1073 (GLenum)plane,
1074 (GLfixed *)equation
1075 );
Romain Guy84cac202016-12-05 12:26:02 -08001076
1077exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001078 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001079 _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001080 }
Romain Guy84cac202016-12-05 12:26:02 -08001081 if (_exception) {
1082 jniThrowException(_env, _exceptionType, _exceptionMessage);
1083 }
Jack Palevich27f80022009-04-15 19:13:17 -07001084}
1085
1086/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
1087static void
1088android_glColor4xOES__IIII
1089 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -07001090 glColor4xOES(
1091 (GLfixed)red,
1092 (GLfixed)green,
1093 (GLfixed)blue,
1094 (GLfixed)alpha
1095 );
Jack Palevich27f80022009-04-15 19:13:17 -07001096}
1097
1098/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
1099static void
1100android_glDepthRangexOES__II
1101 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001102 glDepthRangexOES(
1103 (GLclampx)zNear,
1104 (GLclampx)zFar
1105 );
Jack Palevich27f80022009-04-15 19:13:17 -07001106}
1107
1108/* void glFogxOES ( GLenum pname, GLfixed param ) */
1109static void
1110android_glFogxOES__II
1111 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001112 glFogxOES(
1113 (GLenum)pname,
1114 (GLfixed)param
1115 );
Jack Palevich27f80022009-04-15 19:13:17 -07001116}
1117
1118/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1119static void
1120android_glFogxvOES__I_3II
1121 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001122 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001123 const char * _exceptionType = NULL;
1124 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001125 GLfixed *params_base = (GLfixed *) 0;
1126 jint _remaining;
1127 GLfixed *params = (GLfixed *) 0;
1128
1129 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001130 _exception = 1;
1131 _exceptionType = "java/lang/IllegalArgumentException";
1132 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001133 goto exit;
1134 }
1135 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001136 _exception = 1;
1137 _exceptionType = "java/lang/IllegalArgumentException";
1138 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001139 goto exit;
1140 }
1141 _remaining = _env->GetArrayLength(params_ref) - offset;
1142 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001143 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001144 params = params_base + offset;
1145
1146 glFogxvOES(
1147 (GLenum)pname,
1148 (GLfixed *)params
1149 );
1150
1151exit:
1152 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001153 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001154 JNI_ABORT);
1155 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001156 if (_exception) {
1157 jniThrowException(_env, _exceptionType, _exceptionMessage);
1158 }
Jack Palevich27f80022009-04-15 19:13:17 -07001159}
1160
1161/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1162static void
1163android_glFogxvOES__ILjava_nio_IntBuffer_2
1164 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001165 jint _exception = 0;
1166 const char * _exceptionType = NULL;
1167 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001168 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001169 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001170 jint _remaining;
1171 GLfixed *params = (GLfixed *) 0;
1172
Romain Guy84cac202016-12-05 12:26:02 -08001173 if (!params_buf) {
1174 _exception = 1;
1175 _exceptionType = "java/lang/IllegalArgumentException";
1176 _exceptionMessage = "params == null";
1177 goto exit;
1178 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001179 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001180 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001181 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001182 params = (GLfixed *) (_paramsBase + _bufferOffset);
1183 }
Jack Palevicha3795852009-04-24 10:35:11 -07001184 glFogxvOES(
1185 (GLenum)pname,
1186 (GLfixed *)params
1187 );
Romain Guy84cac202016-12-05 12:26:02 -08001188
1189exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001190 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001191 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001192 }
Romain Guy84cac202016-12-05 12:26:02 -08001193 if (_exception) {
1194 jniThrowException(_env, _exceptionType, _exceptionMessage);
1195 }
Jack Palevich27f80022009-04-15 19:13:17 -07001196}
1197
1198/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1199static void
1200android_glFrustumxOES__IIIIII
1201 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001202 glFrustumxOES(
1203 (GLfixed)left,
1204 (GLfixed)right,
1205 (GLfixed)bottom,
1206 (GLfixed)top,
1207 (GLfixed)zNear,
1208 (GLfixed)zFar
1209 );
Jack Palevich27f80022009-04-15 19:13:17 -07001210}
1211
1212/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1213static void
1214android_glGetClipPlanexOES__I_3II
1215 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001216 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001217 const char * _exceptionType = NULL;
1218 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001219 GLfixed *eqn_base = (GLfixed *) 0;
1220 jint _remaining;
1221 GLfixed *eqn = (GLfixed *) 0;
1222
1223 if (!eqn_ref) {
1224 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001225 _exceptionType = "java/lang/IllegalArgumentException";
1226 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001227 goto exit;
1228 }
1229 if (offset < 0) {
1230 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001231 _exceptionType = "java/lang/IllegalArgumentException";
1232 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001233 goto exit;
1234 }
1235 _remaining = _env->GetArrayLength(eqn_ref) - offset;
1236 if (_remaining < 4) {
1237 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001238 _exceptionType = "java/lang/IllegalArgumentException";
1239 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001240 goto exit;
1241 }
1242 eqn_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001243 _env->GetIntArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001244 eqn = eqn_base + offset;
1245
1246 glGetClipPlanexOES(
1247 (GLenum)pname,
1248 (GLfixed *)eqn
1249 );
1250
1251exit:
1252 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001253 _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001254 _exception ? JNI_ABORT: 0);
1255 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001256 if (_exception) {
1257 jniThrowException(_env, _exceptionType, _exceptionMessage);
1258 }
Jack Palevich27f80022009-04-15 19:13:17 -07001259}
1260
1261/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1262static void
1263android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1264 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001265 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001266 const char * _exceptionType = NULL;
1267 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001268 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001269 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001270 jint _remaining;
1271 GLfixed *eqn = (GLfixed *) 0;
1272
Romain Guy84cac202016-12-05 12:26:02 -08001273 if (!eqn_buf) {
1274 _exception = 1;
1275 _exceptionType = "java/lang/IllegalArgumentException";
1276 _exceptionMessage = "eqn == null";
1277 goto exit;
1278 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001279 eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07001280 if (_remaining < 4) {
1281 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001282 _exceptionType = "java/lang/IllegalArgumentException";
1283 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001284 goto exit;
1285 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001286 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001287 char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001288 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1289 }
Jack Palevicha3795852009-04-24 10:35:11 -07001290 glGetClipPlanexOES(
1291 (GLenum)pname,
1292 (GLfixed *)eqn
1293 );
1294
1295exit:
1296 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001297 _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001298 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001299 if (_exception) {
1300 jniThrowException(_env, _exceptionType, _exceptionMessage);
1301 }
Jack Palevich27f80022009-04-15 19:13:17 -07001302}
1303
1304/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1305static void
1306android_glGetFixedvOES__I_3II
1307 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001308 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001309 const char * _exceptionType = NULL;
1310 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001311 GLfixed *params_base = (GLfixed *) 0;
1312 jint _remaining;
1313 GLfixed *params = (GLfixed *) 0;
1314
1315 if (!params_ref) {
1316 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001317 _exceptionType = "java/lang/IllegalArgumentException";
1318 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001319 goto exit;
1320 }
1321 if (offset < 0) {
1322 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001323 _exceptionType = "java/lang/IllegalArgumentException";
1324 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001325 goto exit;
1326 }
1327 _remaining = _env->GetArrayLength(params_ref) - offset;
1328 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001329 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001330 params = params_base + offset;
1331
1332 glGetFixedvOES(
1333 (GLenum)pname,
1334 (GLfixed *)params
1335 );
1336
1337exit:
1338 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001339 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001340 _exception ? JNI_ABORT: 0);
1341 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001342 if (_exception) {
1343 jniThrowException(_env, _exceptionType, _exceptionMessage);
1344 }
Jack Palevich27f80022009-04-15 19:13:17 -07001345}
1346
1347/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1348static void
1349android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1350 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001351 jint _exception = 0;
1352 const char * _exceptionType = NULL;
1353 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001354 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001355 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001356 jint _remaining;
1357 GLfixed *params = (GLfixed *) 0;
1358
Romain Guy84cac202016-12-05 12:26:02 -08001359 if (!params_buf) {
1360 _exception = 1;
1361 _exceptionType = "java/lang/IllegalArgumentException";
1362 _exceptionMessage = "params == null";
1363 goto exit;
1364 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001365 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001366 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001367 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001368 params = (GLfixed *) (_paramsBase + _bufferOffset);
1369 }
Jack Palevicha3795852009-04-24 10:35:11 -07001370 glGetFixedvOES(
1371 (GLenum)pname,
1372 (GLfixed *)params
1373 );
Romain Guy84cac202016-12-05 12:26:02 -08001374
1375exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001376 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001377 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1378 }
1379 if (_exception) {
1380 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001381 }
Jack Palevich27f80022009-04-15 19:13:17 -07001382}
1383
1384/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1385static void
1386android_glGetLightxvOES__II_3II
1387 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001388 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001389 const char * _exceptionType = NULL;
1390 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001391 GLfixed *params_base = (GLfixed *) 0;
1392 jint _remaining;
1393 GLfixed *params = (GLfixed *) 0;
1394
1395 if (!params_ref) {
1396 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001397 _exceptionType = "java/lang/IllegalArgumentException";
1398 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001399 goto exit;
1400 }
1401 if (offset < 0) {
1402 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001403 _exceptionType = "java/lang/IllegalArgumentException";
1404 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001405 goto exit;
1406 }
1407 _remaining = _env->GetArrayLength(params_ref) - offset;
1408 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001409 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001410 params = params_base + offset;
1411
1412 glGetLightxvOES(
1413 (GLenum)light,
1414 (GLenum)pname,
1415 (GLfixed *)params
1416 );
1417
1418exit:
1419 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001420 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001421 _exception ? JNI_ABORT: 0);
1422 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001423 if (_exception) {
1424 jniThrowException(_env, _exceptionType, _exceptionMessage);
1425 }
Jack Palevich27f80022009-04-15 19:13:17 -07001426}
1427
1428/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1429static void
1430android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1431 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001432 jint _exception = 0;
1433 const char * _exceptionType = NULL;
1434 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001435 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001436 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001437 jint _remaining;
1438 GLfixed *params = (GLfixed *) 0;
1439
Romain Guy84cac202016-12-05 12:26:02 -08001440 if (!params_buf) {
1441 _exception = 1;
1442 _exceptionType = "java/lang/IllegalArgumentException";
1443 _exceptionMessage = "params == null";
1444 goto exit;
1445 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001446 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001447 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001448 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001449 params = (GLfixed *) (_paramsBase + _bufferOffset);
1450 }
Jack Palevicha3795852009-04-24 10:35:11 -07001451 glGetLightxvOES(
1452 (GLenum)light,
1453 (GLenum)pname,
1454 (GLfixed *)params
1455 );
Romain Guy84cac202016-12-05 12:26:02 -08001456
1457exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001458 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001459 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1460 }
1461 if (_exception) {
1462 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001463 }
Jack Palevich27f80022009-04-15 19:13:17 -07001464}
1465
1466/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1467static void
1468android_glGetMaterialxvOES__II_3II
1469 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001470 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001471 const char * _exceptionType = NULL;
1472 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001473 GLfixed *params_base = (GLfixed *) 0;
1474 jint _remaining;
1475 GLfixed *params = (GLfixed *) 0;
1476
1477 if (!params_ref) {
1478 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001479 _exceptionType = "java/lang/IllegalArgumentException";
1480 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001481 goto exit;
1482 }
1483 if (offset < 0) {
1484 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001485 _exceptionType = "java/lang/IllegalArgumentException";
1486 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001487 goto exit;
1488 }
1489 _remaining = _env->GetArrayLength(params_ref) - offset;
1490 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001491 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001492 params = params_base + offset;
1493
1494 glGetMaterialxvOES(
1495 (GLenum)face,
1496 (GLenum)pname,
1497 (GLfixed *)params
1498 );
1499
1500exit:
1501 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001502 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001503 _exception ? JNI_ABORT: 0);
1504 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001505 if (_exception) {
1506 jniThrowException(_env, _exceptionType, _exceptionMessage);
1507 }
Jack Palevich27f80022009-04-15 19:13:17 -07001508}
1509
1510/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1511static void
1512android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1513 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001514 jint _exception = 0;
1515 const char * _exceptionType = NULL;
1516 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001517 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001518 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001519 jint _remaining;
1520 GLfixed *params = (GLfixed *) 0;
1521
Romain Guy84cac202016-12-05 12:26:02 -08001522 if (!params_buf) {
1523 _exception = 1;
1524 _exceptionType = "java/lang/IllegalArgumentException";
1525 _exceptionMessage = "params == null";
1526 goto exit;
1527 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001528 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001529 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001530 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001531 params = (GLfixed *) (_paramsBase + _bufferOffset);
1532 }
Jack Palevicha3795852009-04-24 10:35:11 -07001533 glGetMaterialxvOES(
1534 (GLenum)face,
1535 (GLenum)pname,
1536 (GLfixed *)params
1537 );
Romain Guy84cac202016-12-05 12:26:02 -08001538
1539exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001540 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001541 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1542 }
1543 if (_exception) {
1544 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001545 }
Jack Palevich27f80022009-04-15 19:13:17 -07001546}
1547
1548/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1549static void
1550android_glGetTexEnvxvOES__II_3II
1551 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001552 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001553 const char * _exceptionType = NULL;
1554 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001555 GLfixed *params_base = (GLfixed *) 0;
1556 jint _remaining;
1557 GLfixed *params = (GLfixed *) 0;
1558
1559 if (!params_ref) {
1560 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001561 _exceptionType = "java/lang/IllegalArgumentException";
1562 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001563 goto exit;
1564 }
1565 if (offset < 0) {
1566 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001567 _exceptionType = "java/lang/IllegalArgumentException";
1568 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001569 goto exit;
1570 }
1571 _remaining = _env->GetArrayLength(params_ref) - offset;
1572 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001573 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001574 params = params_base + offset;
1575
1576 glGetTexEnvxvOES(
1577 (GLenum)env,
1578 (GLenum)pname,
1579 (GLfixed *)params
1580 );
1581
1582exit:
1583 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001584 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001585 _exception ? JNI_ABORT: 0);
1586 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001587 if (_exception) {
1588 jniThrowException(_env, _exceptionType, _exceptionMessage);
1589 }
Jack Palevich27f80022009-04-15 19:13:17 -07001590}
1591
1592/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1593static void
1594android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1595 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001596 jint _exception = 0;
1597 const char * _exceptionType = NULL;
1598 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001599 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001600 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001601 jint _remaining;
1602 GLfixed *params = (GLfixed *) 0;
1603
Romain Guy84cac202016-12-05 12:26:02 -08001604 if (!params_buf) {
1605 _exception = 1;
1606 _exceptionType = "java/lang/IllegalArgumentException";
1607 _exceptionMessage = "params == null";
1608 goto exit;
1609 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001610 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001611 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001612 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001613 params = (GLfixed *) (_paramsBase + _bufferOffset);
1614 }
Jack Palevicha3795852009-04-24 10:35:11 -07001615 glGetTexEnvxvOES(
1616 (GLenum)env,
1617 (GLenum)pname,
1618 (GLfixed *)params
1619 );
Romain Guy84cac202016-12-05 12:26:02 -08001620
1621exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001622 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001623 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1624 }
1625 if (_exception) {
1626 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001627 }
Jack Palevich27f80022009-04-15 19:13:17 -07001628}
1629
1630/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1631static void
1632android_glGetTexParameterxvOES__II_3II
1633 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001634 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001635 const char * _exceptionType = NULL;
1636 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001637 GLfixed *params_base = (GLfixed *) 0;
1638 jint _remaining;
1639 GLfixed *params = (GLfixed *) 0;
1640
1641 if (!params_ref) {
1642 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001643 _exceptionType = "java/lang/IllegalArgumentException";
1644 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001645 goto exit;
1646 }
1647 if (offset < 0) {
1648 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001649 _exceptionType = "java/lang/IllegalArgumentException";
1650 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001651 goto exit;
1652 }
1653 _remaining = _env->GetArrayLength(params_ref) - offset;
1654 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001655 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001656 params = params_base + offset;
1657
1658 glGetTexParameterxvOES(
1659 (GLenum)target,
1660 (GLenum)pname,
1661 (GLfixed *)params
1662 );
1663
1664exit:
1665 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001666 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001667 _exception ? JNI_ABORT: 0);
1668 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001669 if (_exception) {
1670 jniThrowException(_env, _exceptionType, _exceptionMessage);
1671 }
Jack Palevich27f80022009-04-15 19:13:17 -07001672}
1673
1674/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1675static void
1676android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1677 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001678 jint _exception = 0;
1679 const char * _exceptionType = NULL;
1680 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001681 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001682 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001683 jint _remaining;
1684 GLfixed *params = (GLfixed *) 0;
1685
Romain Guy84cac202016-12-05 12:26:02 -08001686 if (!params_buf) {
1687 _exception = 1;
1688 _exceptionType = "java/lang/IllegalArgumentException";
1689 _exceptionMessage = "params == null";
1690 goto exit;
1691 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001692 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001693 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001694 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001695 params = (GLfixed *) (_paramsBase + _bufferOffset);
1696 }
Jack Palevicha3795852009-04-24 10:35:11 -07001697 glGetTexParameterxvOES(
1698 (GLenum)target,
1699 (GLenum)pname,
1700 (GLfixed *)params
1701 );
Romain Guy84cac202016-12-05 12:26:02 -08001702
1703exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001704 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08001705 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1706 }
1707 if (_exception) {
1708 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07001709 }
Jack Palevich27f80022009-04-15 19:13:17 -07001710}
1711
1712/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1713static void
1714android_glLightModelxOES__II
1715 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001716 glLightModelxOES(
1717 (GLenum)pname,
1718 (GLfixed)param
1719 );
Jack Palevich27f80022009-04-15 19:13:17 -07001720}
1721
1722/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1723static void
1724android_glLightModelxvOES__I_3II
1725 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001726 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001727 const char * _exceptionType = NULL;
1728 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001729 GLfixed *params_base = (GLfixed *) 0;
1730 jint _remaining;
1731 GLfixed *params = (GLfixed *) 0;
1732
1733 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001734 _exception = 1;
1735 _exceptionType = "java/lang/IllegalArgumentException";
1736 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001737 goto exit;
1738 }
1739 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001740 _exception = 1;
1741 _exceptionType = "java/lang/IllegalArgumentException";
1742 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001743 goto exit;
1744 }
1745 _remaining = _env->GetArrayLength(params_ref) - offset;
1746 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001747 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001748 params = params_base + offset;
1749
1750 glLightModelxvOES(
1751 (GLenum)pname,
1752 (GLfixed *)params
1753 );
1754
1755exit:
1756 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001757 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001758 JNI_ABORT);
1759 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001760 if (_exception) {
1761 jniThrowException(_env, _exceptionType, _exceptionMessage);
1762 }
Jack Palevich27f80022009-04-15 19:13:17 -07001763}
1764
1765/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1766static void
1767android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1768 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001769 jint _exception = 0;
1770 const char * _exceptionType = NULL;
1771 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001772 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001773 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001774 jint _remaining;
1775 GLfixed *params = (GLfixed *) 0;
1776
Romain Guy84cac202016-12-05 12:26:02 -08001777 if (!params_buf) {
1778 _exception = 1;
1779 _exceptionType = "java/lang/IllegalArgumentException";
1780 _exceptionMessage = "params == null";
1781 goto exit;
1782 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001783 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001784 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001785 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001786 params = (GLfixed *) (_paramsBase + _bufferOffset);
1787 }
Jack Palevicha3795852009-04-24 10:35:11 -07001788 glLightModelxvOES(
1789 (GLenum)pname,
1790 (GLfixed *)params
1791 );
Romain Guy84cac202016-12-05 12:26:02 -08001792
1793exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001794 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001795 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001796 }
Romain Guy84cac202016-12-05 12:26:02 -08001797 if (_exception) {
1798 jniThrowException(_env, _exceptionType, _exceptionMessage);
1799 }
Jack Palevich27f80022009-04-15 19:13:17 -07001800}
1801
1802/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1803static void
1804android_glLightxOES__III
1805 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001806 glLightxOES(
1807 (GLenum)light,
1808 (GLenum)pname,
1809 (GLfixed)param
1810 );
Jack Palevich27f80022009-04-15 19:13:17 -07001811}
1812
1813/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1814static void
1815android_glLightxvOES__II_3II
1816 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001817 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001818 const char * _exceptionType = NULL;
1819 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001820 GLfixed *params_base = (GLfixed *) 0;
1821 jint _remaining;
1822 GLfixed *params = (GLfixed *) 0;
1823
1824 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001825 _exception = 1;
1826 _exceptionType = "java/lang/IllegalArgumentException";
1827 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001828 goto exit;
1829 }
1830 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001831 _exception = 1;
1832 _exceptionType = "java/lang/IllegalArgumentException";
1833 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001834 goto exit;
1835 }
1836 _remaining = _env->GetArrayLength(params_ref) - offset;
1837 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001838 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001839 params = params_base + offset;
1840
1841 glLightxvOES(
1842 (GLenum)light,
1843 (GLenum)pname,
1844 (GLfixed *)params
1845 );
1846
1847exit:
1848 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001849 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001850 JNI_ABORT);
1851 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001852 if (_exception) {
1853 jniThrowException(_env, _exceptionType, _exceptionMessage);
1854 }
Jack Palevich27f80022009-04-15 19:13:17 -07001855}
1856
1857/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1858static void
1859android_glLightxvOES__IILjava_nio_IntBuffer_2
1860 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001861 jint _exception = 0;
1862 const char * _exceptionType = NULL;
1863 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001864 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001865 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001866 jint _remaining;
1867 GLfixed *params = (GLfixed *) 0;
1868
Romain Guy84cac202016-12-05 12:26:02 -08001869 if (!params_buf) {
1870 _exception = 1;
1871 _exceptionType = "java/lang/IllegalArgumentException";
1872 _exceptionMessage = "params == null";
1873 goto exit;
1874 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001875 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001876 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001877 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001878 params = (GLfixed *) (_paramsBase + _bufferOffset);
1879 }
Jack Palevicha3795852009-04-24 10:35:11 -07001880 glLightxvOES(
1881 (GLenum)light,
1882 (GLenum)pname,
1883 (GLfixed *)params
1884 );
Romain Guy84cac202016-12-05 12:26:02 -08001885
1886exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001887 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001888 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001889 }
Romain Guy84cac202016-12-05 12:26:02 -08001890 if (_exception) {
1891 jniThrowException(_env, _exceptionType, _exceptionMessage);
1892 }
Jack Palevich27f80022009-04-15 19:13:17 -07001893}
1894
1895/* void glLineWidthxOES ( GLfixed width ) */
1896static void
1897android_glLineWidthxOES__I
1898 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001899 glLineWidthxOES(
1900 (GLfixed)width
1901 );
Jack Palevich27f80022009-04-15 19:13:17 -07001902}
1903
1904/* void glLoadMatrixxOES ( const GLfixed *m ) */
1905static void
1906android_glLoadMatrixxOES___3II
1907 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001908 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001909 const char * _exceptionType = NULL;
1910 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001911 GLfixed *m_base = (GLfixed *) 0;
1912 jint _remaining;
1913 GLfixed *m = (GLfixed *) 0;
1914
1915 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001916 _exception = 1;
1917 _exceptionType = "java/lang/IllegalArgumentException";
1918 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001919 goto exit;
1920 }
1921 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001922 _exception = 1;
1923 _exceptionType = "java/lang/IllegalArgumentException";
1924 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001925 goto exit;
1926 }
1927 _remaining = _env->GetArrayLength(m_ref) - offset;
1928 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001929 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001930 m = m_base + offset;
1931
1932 glLoadMatrixxOES(
1933 (GLfixed *)m
1934 );
1935
1936exit:
1937 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001938 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001939 JNI_ABORT);
1940 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001941 if (_exception) {
1942 jniThrowException(_env, _exceptionType, _exceptionMessage);
1943 }
Jack Palevich27f80022009-04-15 19:13:17 -07001944}
1945
1946/* void glLoadMatrixxOES ( const GLfixed *m ) */
1947static void
1948android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1949 (JNIEnv *_env, jobject _this, jobject m_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08001950 jint _exception = 0;
1951 const char * _exceptionType = NULL;
1952 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001953 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001954 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001955 jint _remaining;
1956 GLfixed *m = (GLfixed *) 0;
1957
Romain Guy84cac202016-12-05 12:26:02 -08001958 if (!m_buf) {
1959 _exception = 1;
1960 _exceptionType = "java/lang/IllegalArgumentException";
1961 _exceptionMessage = "m == null";
1962 goto exit;
1963 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001964 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001965 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001966 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001967 m = (GLfixed *) (_mBase + _bufferOffset);
1968 }
Jack Palevicha3795852009-04-24 10:35:11 -07001969 glLoadMatrixxOES(
1970 (GLfixed *)m
1971 );
Romain Guy84cac202016-12-05 12:26:02 -08001972
1973exit:
Jack Palevicha3795852009-04-24 10:35:11 -07001974 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001975 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001976 }
Romain Guy84cac202016-12-05 12:26:02 -08001977 if (_exception) {
1978 jniThrowException(_env, _exceptionType, _exceptionMessage);
1979 }
Jack Palevich27f80022009-04-15 19:13:17 -07001980}
1981
1982/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1983static void
1984android_glMaterialxOES__III
1985 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001986 glMaterialxOES(
1987 (GLenum)face,
1988 (GLenum)pname,
1989 (GLfixed)param
1990 );
Jack Palevich27f80022009-04-15 19:13:17 -07001991}
1992
1993/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1994static void
1995android_glMaterialxvOES__II_3II
1996 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001997 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001998 const char * _exceptionType = NULL;
1999 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002000 GLfixed *params_base = (GLfixed *) 0;
2001 jint _remaining;
2002 GLfixed *params = (GLfixed *) 0;
2003
2004 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002005 _exception = 1;
2006 _exceptionType = "java/lang/IllegalArgumentException";
2007 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002008 goto exit;
2009 }
2010 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002011 _exception = 1;
2012 _exceptionType = "java/lang/IllegalArgumentException";
2013 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002014 goto exit;
2015 }
2016 _remaining = _env->GetArrayLength(params_ref) - offset;
2017 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002018 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002019 params = params_base + offset;
2020
2021 glMaterialxvOES(
2022 (GLenum)face,
2023 (GLenum)pname,
2024 (GLfixed *)params
2025 );
2026
2027exit:
2028 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002029 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002030 JNI_ABORT);
2031 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002032 if (_exception) {
2033 jniThrowException(_env, _exceptionType, _exceptionMessage);
2034 }
Jack Palevich27f80022009-04-15 19:13:17 -07002035}
2036
2037/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
2038static void
2039android_glMaterialxvOES__IILjava_nio_IntBuffer_2
2040 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002041 jint _exception = 0;
2042 const char * _exceptionType = NULL;
2043 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002044 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002045 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002046 jint _remaining;
2047 GLfixed *params = (GLfixed *) 0;
2048
Romain Guy84cac202016-12-05 12:26:02 -08002049 if (!params_buf) {
2050 _exception = 1;
2051 _exceptionType = "java/lang/IllegalArgumentException";
2052 _exceptionMessage = "params == null";
2053 goto exit;
2054 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002055 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002056 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002057 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002058 params = (GLfixed *) (_paramsBase + _bufferOffset);
2059 }
Jack Palevicha3795852009-04-24 10:35:11 -07002060 glMaterialxvOES(
2061 (GLenum)face,
2062 (GLenum)pname,
2063 (GLfixed *)params
2064 );
Romain Guy84cac202016-12-05 12:26:02 -08002065
2066exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002067 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002068 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002069 }
Romain Guy84cac202016-12-05 12:26:02 -08002070 if (_exception) {
2071 jniThrowException(_env, _exceptionType, _exceptionMessage);
2072 }
Jack Palevich27f80022009-04-15 19:13:17 -07002073}
2074
2075/* void glMultMatrixxOES ( const GLfixed *m ) */
2076static void
2077android_glMultMatrixxOES___3II
2078 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002079 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002080 const char * _exceptionType = NULL;
2081 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002082 GLfixed *m_base = (GLfixed *) 0;
2083 jint _remaining;
2084 GLfixed *m = (GLfixed *) 0;
2085
2086 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002087 _exception = 1;
2088 _exceptionType = "java/lang/IllegalArgumentException";
2089 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002090 goto exit;
2091 }
2092 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002093 _exception = 1;
2094 _exceptionType = "java/lang/IllegalArgumentException";
2095 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002096 goto exit;
2097 }
2098 _remaining = _env->GetArrayLength(m_ref) - offset;
2099 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002100 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002101 m = m_base + offset;
2102
2103 glMultMatrixxOES(
2104 (GLfixed *)m
2105 );
2106
2107exit:
2108 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002109 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002110 JNI_ABORT);
2111 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002112 if (_exception) {
2113 jniThrowException(_env, _exceptionType, _exceptionMessage);
2114 }
Jack Palevich27f80022009-04-15 19:13:17 -07002115}
2116
2117/* void glMultMatrixxOES ( const GLfixed *m ) */
2118static void
2119android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
2120 (JNIEnv *_env, jobject _this, jobject m_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002121 jint _exception = 0;
2122 const char * _exceptionType = NULL;
2123 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002124 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002125 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002126 jint _remaining;
2127 GLfixed *m = (GLfixed *) 0;
2128
Romain Guy84cac202016-12-05 12:26:02 -08002129 if (!m_buf) {
2130 _exception = 1;
2131 _exceptionType = "java/lang/IllegalArgumentException";
2132 _exceptionMessage = "m == null";
2133 goto exit;
2134 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002135 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002136 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002137 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002138 m = (GLfixed *) (_mBase + _bufferOffset);
2139 }
Jack Palevicha3795852009-04-24 10:35:11 -07002140 glMultMatrixxOES(
2141 (GLfixed *)m
2142 );
Romain Guy84cac202016-12-05 12:26:02 -08002143
2144exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002145 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002146 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002147 }
Romain Guy84cac202016-12-05 12:26:02 -08002148 if (_exception) {
2149 jniThrowException(_env, _exceptionType, _exceptionMessage);
2150 }
Jack Palevich27f80022009-04-15 19:13:17 -07002151}
2152
2153/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
2154static void
2155android_glMultiTexCoord4xOES__IIIII
2156 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07002157 glMultiTexCoord4xOES(
2158 (GLenum)target,
2159 (GLfixed)s,
2160 (GLfixed)t,
2161 (GLfixed)r,
2162 (GLfixed)q
2163 );
Jack Palevich27f80022009-04-15 19:13:17 -07002164}
2165
2166/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
2167static void
2168android_glNormal3xOES__III
2169 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07002170 glNormal3xOES(
2171 (GLfixed)nx,
2172 (GLfixed)ny,
2173 (GLfixed)nz
2174 );
Jack Palevich27f80022009-04-15 19:13:17 -07002175}
2176
2177/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
2178static void
2179android_glOrthoxOES__IIIIII
2180 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002181 glOrthoxOES(
2182 (GLfixed)left,
2183 (GLfixed)right,
2184 (GLfixed)bottom,
2185 (GLfixed)top,
2186 (GLfixed)zNear,
2187 (GLfixed)zFar
2188 );
Jack Palevich27f80022009-04-15 19:13:17 -07002189}
2190
2191/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
2192static void
2193android_glPointParameterxOES__II
2194 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002195 glPointParameterxOES(
2196 (GLenum)pname,
2197 (GLfixed)param
2198 );
Jack Palevich27f80022009-04-15 19:13:17 -07002199}
2200
2201/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2202static void
2203android_glPointParameterxvOES__I_3II
2204 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002205 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002206 const char * _exceptionType = NULL;
2207 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002208 GLfixed *params_base = (GLfixed *) 0;
2209 jint _remaining;
2210 GLfixed *params = (GLfixed *) 0;
2211
2212 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002213 _exception = 1;
2214 _exceptionType = "java/lang/IllegalArgumentException";
2215 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002216 goto exit;
2217 }
2218 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002219 _exception = 1;
2220 _exceptionType = "java/lang/IllegalArgumentException";
2221 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002222 goto exit;
2223 }
2224 _remaining = _env->GetArrayLength(params_ref) - offset;
2225 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002226 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002227 params = params_base + offset;
2228
2229 glPointParameterxvOES(
2230 (GLenum)pname,
2231 (GLfixed *)params
2232 );
2233
2234exit:
2235 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002236 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002237 JNI_ABORT);
2238 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002239 if (_exception) {
2240 jniThrowException(_env, _exceptionType, _exceptionMessage);
2241 }
Jack Palevich27f80022009-04-15 19:13:17 -07002242}
2243
2244/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2245static void
2246android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
2247 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002248 jint _exception = 0;
2249 const char * _exceptionType = NULL;
2250 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002251 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002252 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002253 jint _remaining;
2254 GLfixed *params = (GLfixed *) 0;
2255
Romain Guy84cac202016-12-05 12:26:02 -08002256 if (!params_buf) {
2257 _exception = 1;
2258 _exceptionType = "java/lang/IllegalArgumentException";
2259 _exceptionMessage = "params == null";
2260 goto exit;
2261 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002262 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002263 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002264 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002265 params = (GLfixed *) (_paramsBase + _bufferOffset);
2266 }
Jack Palevicha3795852009-04-24 10:35:11 -07002267 glPointParameterxvOES(
2268 (GLenum)pname,
2269 (GLfixed *)params
2270 );
Romain Guy84cac202016-12-05 12:26:02 -08002271
2272exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002273 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002274 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002275 }
Romain Guy84cac202016-12-05 12:26:02 -08002276 if (_exception) {
2277 jniThrowException(_env, _exceptionType, _exceptionMessage);
2278 }
Jack Palevich27f80022009-04-15 19:13:17 -07002279}
2280
2281/* void glPointSizexOES ( GLfixed size ) */
2282static void
2283android_glPointSizexOES__I
2284 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07002285 glPointSizexOES(
2286 (GLfixed)size
2287 );
Jack Palevich27f80022009-04-15 19:13:17 -07002288}
2289
2290/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
2291static void
2292android_glPolygonOffsetxOES__II
2293 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07002294 glPolygonOffsetxOES(
2295 (GLfixed)factor,
2296 (GLfixed)units
2297 );
Jack Palevich27f80022009-04-15 19:13:17 -07002298}
2299
2300/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
2301static void
2302android_glRotatexOES__IIII
2303 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002304 glRotatexOES(
2305 (GLfixed)angle,
2306 (GLfixed)x,
2307 (GLfixed)y,
2308 (GLfixed)z
2309 );
Jack Palevich27f80022009-04-15 19:13:17 -07002310}
2311
2312/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
2313static void
2314android_glSampleCoveragexOES__IZ
2315 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07002316 glSampleCoveragexOES(
2317 (GLclampx)value,
2318 (GLboolean)invert
2319 );
Jack Palevich27f80022009-04-15 19:13:17 -07002320}
2321
2322/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2323static void
2324android_glScalexOES__III
2325 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002326 glScalexOES(
2327 (GLfixed)x,
2328 (GLfixed)y,
2329 (GLfixed)z
2330 );
Jack Palevich27f80022009-04-15 19:13:17 -07002331}
2332
2333/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
2334static void
2335android_glTexEnvxOES__III
2336 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002337 glTexEnvxOES(
2338 (GLenum)target,
2339 (GLenum)pname,
2340 (GLfixed)param
2341 );
Jack Palevich27f80022009-04-15 19:13:17 -07002342}
2343
2344/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2345static void
2346android_glTexEnvxvOES__II_3II
2347 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002348 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002349 const char * _exceptionType = NULL;
2350 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002351 GLfixed *params_base = (GLfixed *) 0;
2352 jint _remaining;
2353 GLfixed *params = (GLfixed *) 0;
2354
2355 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002356 _exception = 1;
2357 _exceptionType = "java/lang/IllegalArgumentException";
2358 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002359 goto exit;
2360 }
2361 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002362 _exception = 1;
2363 _exceptionType = "java/lang/IllegalArgumentException";
2364 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002365 goto exit;
2366 }
2367 _remaining = _env->GetArrayLength(params_ref) - offset;
2368 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002369 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002370 params = params_base + offset;
2371
2372 glTexEnvxvOES(
2373 (GLenum)target,
2374 (GLenum)pname,
2375 (GLfixed *)params
2376 );
2377
2378exit:
2379 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002380 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002381 JNI_ABORT);
2382 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002383 if (_exception) {
2384 jniThrowException(_env, _exceptionType, _exceptionMessage);
2385 }
Jack Palevich27f80022009-04-15 19:13:17 -07002386}
2387
2388/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2389static void
2390android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2391 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002392 jint _exception = 0;
2393 const char * _exceptionType = NULL;
2394 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002395 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002396 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002397 jint _remaining;
2398 GLfixed *params = (GLfixed *) 0;
2399
Romain Guy84cac202016-12-05 12:26:02 -08002400 if (!params_buf) {
2401 _exception = 1;
2402 _exceptionType = "java/lang/IllegalArgumentException";
2403 _exceptionMessage = "params == null";
2404 goto exit;
2405 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002406 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002407 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002408 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002409 params = (GLfixed *) (_paramsBase + _bufferOffset);
2410 }
Jack Palevicha3795852009-04-24 10:35:11 -07002411 glTexEnvxvOES(
2412 (GLenum)target,
2413 (GLenum)pname,
2414 (GLfixed *)params
2415 );
Romain Guy84cac202016-12-05 12:26:02 -08002416
2417exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002418 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002419 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002420 }
Romain Guy84cac202016-12-05 12:26:02 -08002421 if (_exception) {
2422 jniThrowException(_env, _exceptionType, _exceptionMessage);
2423 }
Jack Palevich27f80022009-04-15 19:13:17 -07002424}
2425
2426/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2427static void
2428android_glTexParameterxOES__III
2429 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002430 glTexParameterxOES(
2431 (GLenum)target,
2432 (GLenum)pname,
2433 (GLfixed)param
2434 );
Jack Palevich27f80022009-04-15 19:13:17 -07002435}
2436
2437/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2438static void
2439android_glTexParameterxvOES__II_3II
2440 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002441 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002442 const char * _exceptionType = NULL;
2443 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002444 GLfixed *params_base = (GLfixed *) 0;
2445 jint _remaining;
2446 GLfixed *params = (GLfixed *) 0;
2447
2448 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002449 _exception = 1;
2450 _exceptionType = "java/lang/IllegalArgumentException";
2451 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002452 goto exit;
2453 }
2454 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002455 _exception = 1;
2456 _exceptionType = "java/lang/IllegalArgumentException";
2457 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002458 goto exit;
2459 }
2460 _remaining = _env->GetArrayLength(params_ref) - offset;
2461 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002462 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002463 params = params_base + offset;
2464
2465 glTexParameterxvOES(
2466 (GLenum)target,
2467 (GLenum)pname,
2468 (GLfixed *)params
2469 );
2470
2471exit:
2472 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002473 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002474 JNI_ABORT);
2475 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002476 if (_exception) {
2477 jniThrowException(_env, _exceptionType, _exceptionMessage);
2478 }
Jack Palevich27f80022009-04-15 19:13:17 -07002479}
2480
2481/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2482static void
2483android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2484 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08002485 jint _exception = 0;
2486 const char * _exceptionType = NULL;
2487 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002488 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002489 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002490 jint _remaining;
2491 GLfixed *params = (GLfixed *) 0;
2492
Romain Guy84cac202016-12-05 12:26:02 -08002493 if (!params_buf) {
2494 _exception = 1;
2495 _exceptionType = "java/lang/IllegalArgumentException";
2496 _exceptionMessage = "params == null";
2497 goto exit;
2498 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002499 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002500 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002501 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002502 params = (GLfixed *) (_paramsBase + _bufferOffset);
2503 }
Jack Palevicha3795852009-04-24 10:35:11 -07002504 glTexParameterxvOES(
2505 (GLenum)target,
2506 (GLenum)pname,
2507 (GLfixed *)params
2508 );
Romain Guy84cac202016-12-05 12:26:02 -08002509
2510exit:
Jack Palevicha3795852009-04-24 10:35:11 -07002511 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002512 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002513 }
Romain Guy84cac202016-12-05 12:26:02 -08002514 if (_exception) {
2515 jniThrowException(_env, _exceptionType, _exceptionMessage);
2516 }
Jack Palevich27f80022009-04-15 19:13:17 -07002517}
2518
2519/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2520static void
2521android_glTranslatexOES__III
2522 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002523 glTranslatexOES(
2524 (GLfixed)x,
2525 (GLfixed)y,
2526 (GLfixed)z
2527 );
Jack Palevich27f80022009-04-15 19:13:17 -07002528}
2529
2530/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2531static jboolean
2532android_glIsRenderbufferOES__I
2533 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002534 GLboolean _returnValue;
2535 _returnValue = glIsRenderbufferOES(
2536 (GLuint)renderbuffer
2537 );
Andy McFaddencee51982013-04-25 16:08:31 -07002538 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002539}
2540
2541/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2542static void
2543android_glBindRenderbufferOES__II
2544 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002545 glBindRenderbufferOES(
2546 (GLenum)target,
2547 (GLuint)renderbuffer
2548 );
Jack Palevich27f80022009-04-15 19:13:17 -07002549}
2550
2551/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2552static void
2553android_glDeleteRenderbuffersOES__I_3II
2554 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002555 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002556 const char * _exceptionType = NULL;
2557 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002558 GLuint *renderbuffers_base = (GLuint *) 0;
2559 jint _remaining;
2560 GLuint *renderbuffers = (GLuint *) 0;
2561
2562 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002563 _exception = 1;
2564 _exceptionType = "java/lang/IllegalArgumentException";
2565 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002566 goto exit;
2567 }
2568 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002569 _exception = 1;
2570 _exceptionType = "java/lang/IllegalArgumentException";
2571 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002572 goto exit;
2573 }
2574 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2575 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002576 _exception = 1;
2577 _exceptionType = "java/lang/IllegalArgumentException";
2578 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002579 goto exit;
2580 }
2581 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002582 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002583 renderbuffers = renderbuffers_base + offset;
2584
2585 glDeleteRenderbuffersOES(
2586 (GLsizei)n,
2587 (GLuint *)renderbuffers
2588 );
2589
2590exit:
2591 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002592 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002593 JNI_ABORT);
2594 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002595 if (_exception) {
2596 jniThrowException(_env, _exceptionType, _exceptionMessage);
2597 }
Jack Palevich27f80022009-04-15 19:13:17 -07002598}
2599
2600/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2601static void
2602android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2603 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002604 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002605 const char * _exceptionType = NULL;
2606 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002607 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002608 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002609 jint _remaining;
2610 GLuint *renderbuffers = (GLuint *) 0;
2611
Romain Guy84cac202016-12-05 12:26:02 -08002612 if (!renderbuffers_buf) {
2613 _exception = 1;
2614 _exceptionType = "java/lang/IllegalArgumentException";
2615 _exceptionMessage = "renderbuffers == null";
2616 goto exit;
2617 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002618 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002619 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002620 _exception = 1;
2621 _exceptionType = "java/lang/IllegalArgumentException";
2622 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002623 goto exit;
2624 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002625 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002626 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002627 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2628 }
Jack Palevich73108672011-03-28 14:49:12 -07002629 glDeleteRenderbuffersOES(
2630 (GLsizei)n,
2631 (GLuint *)renderbuffers
2632 );
2633
2634exit:
2635 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002636 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002637 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002638 if (_exception) {
2639 jniThrowException(_env, _exceptionType, _exceptionMessage);
2640 }
Jack Palevich27f80022009-04-15 19:13:17 -07002641}
2642
2643/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2644static void
2645android_glGenRenderbuffersOES__I_3II
2646 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002647 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002648 const char * _exceptionType = NULL;
2649 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002650 GLuint *renderbuffers_base = (GLuint *) 0;
2651 jint _remaining;
2652 GLuint *renderbuffers = (GLuint *) 0;
2653
2654 if (!renderbuffers_ref) {
2655 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002656 _exceptionType = "java/lang/IllegalArgumentException";
2657 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002658 goto exit;
2659 }
2660 if (offset < 0) {
2661 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002662 _exceptionType = "java/lang/IllegalArgumentException";
2663 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002664 goto exit;
2665 }
2666 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2667 if (_remaining < n) {
2668 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002669 _exceptionType = "java/lang/IllegalArgumentException";
2670 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002671 goto exit;
2672 }
2673 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002674 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002675 renderbuffers = renderbuffers_base + offset;
2676
2677 glGenRenderbuffersOES(
2678 (GLsizei)n,
2679 (GLuint *)renderbuffers
2680 );
2681
2682exit:
2683 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002684 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002685 _exception ? JNI_ABORT: 0);
2686 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002687 if (_exception) {
2688 jniThrowException(_env, _exceptionType, _exceptionMessage);
2689 }
Jack Palevich27f80022009-04-15 19:13:17 -07002690}
2691
2692/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2693static void
2694android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2695 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002696 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002697 const char * _exceptionType = NULL;
2698 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002699 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002700 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002701 jint _remaining;
2702 GLuint *renderbuffers = (GLuint *) 0;
2703
Romain Guy84cac202016-12-05 12:26:02 -08002704 if (!renderbuffers_buf) {
2705 _exception = 1;
2706 _exceptionType = "java/lang/IllegalArgumentException";
2707 _exceptionMessage = "renderbuffers == null";
2708 goto exit;
2709 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002710 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002711 if (_remaining < n) {
2712 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002713 _exceptionType = "java/lang/IllegalArgumentException";
2714 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002715 goto exit;
2716 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002717 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002718 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002719 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2720 }
Jack Palevich73108672011-03-28 14:49:12 -07002721 glGenRenderbuffersOES(
2722 (GLsizei)n,
2723 (GLuint *)renderbuffers
2724 );
2725
2726exit:
2727 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002728 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002729 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002730 if (_exception) {
2731 jniThrowException(_env, _exceptionType, _exceptionMessage);
2732 }
Jack Palevich27f80022009-04-15 19:13:17 -07002733}
2734
2735/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2736static void
2737android_glRenderbufferStorageOES__IIII
2738 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002739 glRenderbufferStorageOES(
2740 (GLenum)target,
2741 (GLenum)internalformat,
2742 (GLsizei)width,
2743 (GLsizei)height
2744 );
Jack Palevich27f80022009-04-15 19:13:17 -07002745}
2746
2747/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2748static void
2749android_glGetRenderbufferParameterivOES__II_3II
2750 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002751 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002752 const char * _exceptionType = NULL;
2753 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002754 GLint *params_base = (GLint *) 0;
2755 jint _remaining;
2756 GLint *params = (GLint *) 0;
2757
2758 if (!params_ref) {
2759 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002760 _exceptionType = "java/lang/IllegalArgumentException";
2761 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002762 goto exit;
2763 }
2764 if (offset < 0) {
2765 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002766 _exceptionType = "java/lang/IllegalArgumentException";
2767 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002768 goto exit;
2769 }
2770 _remaining = _env->GetArrayLength(params_ref) - offset;
2771 if (_remaining < 1) {
2772 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002773 _exceptionType = "java/lang/IllegalArgumentException";
2774 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002775 goto exit;
2776 }
2777 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002778 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002779 params = params_base + offset;
2780
2781 glGetRenderbufferParameterivOES(
2782 (GLenum)target,
2783 (GLenum)pname,
2784 (GLint *)params
2785 );
2786
2787exit:
2788 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002789 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07002790 _exception ? JNI_ABORT: 0);
2791 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002792 if (_exception) {
2793 jniThrowException(_env, _exceptionType, _exceptionMessage);
2794 }
Jack Palevich27f80022009-04-15 19:13:17 -07002795}
2796
2797/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2798static void
2799android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2800 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002801 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002802 const char * _exceptionType = NULL;
2803 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002804 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002805 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002806 jint _remaining;
2807 GLint *params = (GLint *) 0;
2808
Romain Guy84cac202016-12-05 12:26:02 -08002809 if (!params_buf) {
2810 _exception = 1;
2811 _exceptionType = "java/lang/IllegalArgumentException";
2812 _exceptionMessage = "params == null";
2813 goto exit;
2814 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002815 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002816 if (_remaining < 1) {
2817 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002818 _exceptionType = "java/lang/IllegalArgumentException";
2819 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002820 goto exit;
2821 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002822 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002823 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002824 params = (GLint *) (_paramsBase + _bufferOffset);
2825 }
Jack Palevich73108672011-03-28 14:49:12 -07002826 glGetRenderbufferParameterivOES(
2827 (GLenum)target,
2828 (GLenum)pname,
2829 (GLint *)params
2830 );
2831
2832exit:
2833 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002834 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002835 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002836 if (_exception) {
2837 jniThrowException(_env, _exceptionType, _exceptionMessage);
2838 }
Jack Palevich27f80022009-04-15 19:13:17 -07002839}
2840
2841/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2842static jboolean
2843android_glIsFramebufferOES__I
2844 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002845 GLboolean _returnValue;
2846 _returnValue = glIsFramebufferOES(
2847 (GLuint)framebuffer
2848 );
Andy McFaddencee51982013-04-25 16:08:31 -07002849 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002850}
2851
2852/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2853static void
2854android_glBindFramebufferOES__II
2855 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002856 glBindFramebufferOES(
2857 (GLenum)target,
2858 (GLuint)framebuffer
2859 );
Jack Palevich27f80022009-04-15 19:13:17 -07002860}
2861
2862/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2863static void
2864android_glDeleteFramebuffersOES__I_3II
2865 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002866 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002867 const char * _exceptionType = NULL;
2868 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002869 GLuint *framebuffers_base = (GLuint *) 0;
2870 jint _remaining;
2871 GLuint *framebuffers = (GLuint *) 0;
2872
2873 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002874 _exception = 1;
2875 _exceptionType = "java/lang/IllegalArgumentException";
2876 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002877 goto exit;
2878 }
2879 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002880 _exception = 1;
2881 _exceptionType = "java/lang/IllegalArgumentException";
2882 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002883 goto exit;
2884 }
2885 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2886 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002887 _exception = 1;
2888 _exceptionType = "java/lang/IllegalArgumentException";
2889 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002890 goto exit;
2891 }
2892 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002893 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002894 framebuffers = framebuffers_base + offset;
2895
2896 glDeleteFramebuffersOES(
2897 (GLsizei)n,
2898 (GLuint *)framebuffers
2899 );
2900
2901exit:
2902 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002903 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002904 JNI_ABORT);
2905 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002906 if (_exception) {
2907 jniThrowException(_env, _exceptionType, _exceptionMessage);
2908 }
Jack Palevich27f80022009-04-15 19:13:17 -07002909}
2910
2911/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2912static void
2913android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2914 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002915 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002916 const char * _exceptionType = NULL;
2917 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002918 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002919 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002920 jint _remaining;
2921 GLuint *framebuffers = (GLuint *) 0;
2922
Romain Guy84cac202016-12-05 12:26:02 -08002923 if (!framebuffers_buf) {
2924 _exception = 1;
2925 _exceptionType = "java/lang/IllegalArgumentException";
2926 _exceptionMessage = "framebuffers == null";
2927 goto exit;
2928 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002929 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002930 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002931 _exception = 1;
2932 _exceptionType = "java/lang/IllegalArgumentException";
2933 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002934 goto exit;
2935 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002936 if (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002937 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002938 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2939 }
Jack Palevich73108672011-03-28 14:49:12 -07002940 glDeleteFramebuffersOES(
2941 (GLsizei)n,
2942 (GLuint *)framebuffers
2943 );
2944
2945exit:
2946 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002947 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002948 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002949 if (_exception) {
2950 jniThrowException(_env, _exceptionType, _exceptionMessage);
2951 }
Jack Palevich27f80022009-04-15 19:13:17 -07002952}
2953
2954/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2955static void
2956android_glGenFramebuffersOES__I_3II
2957 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002958 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002959 const char * _exceptionType = NULL;
2960 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002961 GLuint *framebuffers_base = (GLuint *) 0;
2962 jint _remaining;
2963 GLuint *framebuffers = (GLuint *) 0;
2964
2965 if (!framebuffers_ref) {
2966 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002967 _exceptionType = "java/lang/IllegalArgumentException";
2968 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002969 goto exit;
2970 }
2971 if (offset < 0) {
2972 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002973 _exceptionType = "java/lang/IllegalArgumentException";
2974 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002975 goto exit;
2976 }
2977 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2978 if (_remaining < n) {
2979 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002980 _exceptionType = "java/lang/IllegalArgumentException";
2981 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002982 goto exit;
2983 }
2984 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002985 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002986 framebuffers = framebuffers_base + offset;
2987
2988 glGenFramebuffersOES(
2989 (GLsizei)n,
2990 (GLuint *)framebuffers
2991 );
2992
2993exit:
2994 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002995 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002996 _exception ? JNI_ABORT: 0);
2997 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002998 if (_exception) {
2999 jniThrowException(_env, _exceptionType, _exceptionMessage);
3000 }
Jack Palevich27f80022009-04-15 19:13:17 -07003001}
3002
3003/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
3004static void
3005android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
3006 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07003007 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003008 const char * _exceptionType = NULL;
3009 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003010 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003011 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07003012 jint _remaining;
3013 GLuint *framebuffers = (GLuint *) 0;
3014
Romain Guy84cac202016-12-05 12:26:02 -08003015 if (!framebuffers_buf) {
3016 _exception = 1;
3017 _exceptionType = "java/lang/IllegalArgumentException";
3018 _exceptionMessage = "framebuffers == null";
3019 goto exit;
3020 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003021 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07003022 if (_remaining < n) {
3023 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003024 _exceptionType = "java/lang/IllegalArgumentException";
3025 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003026 goto exit;
3027 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003028 if (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003029 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003030 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
3031 }
Jack Palevich73108672011-03-28 14:49:12 -07003032 glGenFramebuffersOES(
3033 (GLsizei)n,
3034 (GLuint *)framebuffers
3035 );
3036
3037exit:
3038 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003039 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07003040 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003041 if (_exception) {
3042 jniThrowException(_env, _exceptionType, _exceptionMessage);
3043 }
Jack Palevich27f80022009-04-15 19:13:17 -07003044}
3045
3046/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
3047static jint
3048android_glCheckFramebufferStatusOES__I
3049 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07003050 GLenum _returnValue;
3051 _returnValue = glCheckFramebufferStatusOES(
3052 (GLenum)target
3053 );
Andy McFaddencee51982013-04-25 16:08:31 -07003054 return (jint)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07003055}
3056
3057/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
3058static void
3059android_glFramebufferRenderbufferOES__IIII
3060 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07003061 glFramebufferRenderbufferOES(
3062 (GLenum)target,
3063 (GLenum)attachment,
3064 (GLenum)renderbuffertarget,
3065 (GLuint)renderbuffer
3066 );
Jack Palevich27f80022009-04-15 19:13:17 -07003067}
3068
3069/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
3070static void
3071android_glFramebufferTexture2DOES__IIIII
3072 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07003073 glFramebufferTexture2DOES(
3074 (GLenum)target,
3075 (GLenum)attachment,
3076 (GLenum)textarget,
3077 (GLuint)texture,
3078 (GLint)level
3079 );
Jack Palevich27f80022009-04-15 19:13:17 -07003080}
3081
3082/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3083static void
3084android_glGetFramebufferAttachmentParameterivOES__III_3II
3085 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07003086 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003087 const char * _exceptionType = NULL;
3088 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07003089 GLint *params_base = (GLint *) 0;
3090 jint _remaining;
3091 GLint *params = (GLint *) 0;
3092
3093 if (!params_ref) {
3094 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003095 _exceptionType = "java/lang/IllegalArgumentException";
3096 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07003097 goto exit;
3098 }
3099 if (offset < 0) {
3100 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003101 _exceptionType = "java/lang/IllegalArgumentException";
3102 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07003103 goto exit;
3104 }
3105 _remaining = _env->GetArrayLength(params_ref) - offset;
3106 if (_remaining < 1) {
3107 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003108 _exceptionType = "java/lang/IllegalArgumentException";
3109 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003110 goto exit;
3111 }
3112 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003113 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07003114 params = params_base + offset;
3115
3116 glGetFramebufferAttachmentParameterivOES(
3117 (GLenum)target,
3118 (GLenum)attachment,
3119 (GLenum)pname,
3120 (GLint *)params
3121 );
3122
3123exit:
3124 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003125 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07003126 _exception ? JNI_ABORT: 0);
3127 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003128 if (_exception) {
3129 jniThrowException(_env, _exceptionType, _exceptionMessage);
3130 }
Jack Palevich27f80022009-04-15 19:13:17 -07003131}
3132
3133/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
3134static void
3135android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
3136 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07003137 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003138 const char * _exceptionType = NULL;
3139 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003140 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003141 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07003142 jint _remaining;
3143 GLint *params = (GLint *) 0;
3144
Romain Guy84cac202016-12-05 12:26:02 -08003145 if (!params_buf) {
3146 _exception = 1;
3147 _exceptionType = "java/lang/IllegalArgumentException";
3148 _exceptionMessage = "params == null";
3149 goto exit;
3150 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003151 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07003152 if (_remaining < 1) {
3153 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003154 _exceptionType = "java/lang/IllegalArgumentException";
3155 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07003156 goto exit;
3157 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003158 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003159 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003160 params = (GLint *) (_paramsBase + _bufferOffset);
3161 }
Jack Palevich73108672011-03-28 14:49:12 -07003162 glGetFramebufferAttachmentParameterivOES(
3163 (GLenum)target,
3164 (GLenum)attachment,
3165 (GLenum)pname,
3166 (GLint *)params
3167 );
3168
3169exit:
3170 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003171 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07003172 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003173 if (_exception) {
3174 jniThrowException(_env, _exceptionType, _exceptionMessage);
3175 }
Jack Palevich27f80022009-04-15 19:13:17 -07003176}
3177
3178/* void glGenerateMipmapOES ( GLenum target ) */
3179static void
3180android_glGenerateMipmapOES__I
3181 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07003182 glGenerateMipmapOES(
3183 (GLenum)target
3184 );
Jack Palevich27f80022009-04-15 19:13:17 -07003185}
3186
3187/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
3188static void
3189android_glCurrentPaletteMatrixOES__I
3190 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08003191 glCurrentPaletteMatrixOES(
3192 (GLuint)matrixpaletteindex
3193 );
Jack Palevich27f80022009-04-15 19:13:17 -07003194}
3195
3196/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
3197static void
3198android_glLoadPaletteFromModelViewMatrixOES__
3199 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08003200 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07003201}
3202
3203/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3204static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08003205android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
3206 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
Romain Guy84cac202016-12-05 12:26:02 -08003207 jint _exception = 0;
3208 const char * _exceptionType = NULL;
3209 const char * _exceptionMessage = NULL;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003210 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003211 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003212 jint _remaining;
3213 GLvoid *pointer = (GLvoid *) 0;
3214
3215 if (pointer_buf) {
3216 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3217 if ( ! pointer ) {
3218 return;
3219 }
3220 }
3221 glMatrixIndexPointerOESBounds(
3222 (GLint)size,
3223 (GLenum)type,
3224 (GLsizei)stride,
3225 (GLvoid *)pointer,
3226 (GLsizei)remaining
3227 );
Romain Guy84cac202016-12-05 12:26:02 -08003228 if (_exception) {
3229 jniThrowException(_env, _exceptionType, _exceptionMessage);
3230 }
Jack Palevich27f80022009-04-15 19:13:17 -07003231}
3232
3233/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3234static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08003235android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
3236 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
Romain Guy84cac202016-12-05 12:26:02 -08003237 jint _exception = 0;
3238 const char * _exceptionType = NULL;
3239 const char * _exceptionMessage = NULL;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003240 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003241 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08003242 jint _remaining;
3243 GLvoid *pointer = (GLvoid *) 0;
3244
3245 if (pointer_buf) {
3246 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3247 if ( ! pointer ) {
3248 return;
3249 }
3250 }
3251 glWeightPointerOESBounds(
3252 (GLint)size,
3253 (GLenum)type,
3254 (GLsizei)stride,
3255 (GLvoid *)pointer,
3256 (GLsizei)remaining
3257 );
Romain Guy84cac202016-12-05 12:26:02 -08003258 if (_exception) {
3259 jniThrowException(_env, _exceptionType, _exceptionMessage);
3260 }
Jack Palevich27f80022009-04-15 19:13:17 -07003261}
3262
3263/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
3264static void
3265android_glDepthRangefOES__FF
3266 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003267 glDepthRangefOES(
3268 (GLclampf)zNear,
3269 (GLclampf)zFar
3270 );
Jack Palevich27f80022009-04-15 19:13:17 -07003271}
3272
3273/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3274static void
3275android_glFrustumfOES__FFFFFF
3276 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003277 glFrustumfOES(
3278 (GLfloat)left,
3279 (GLfloat)right,
3280 (GLfloat)bottom,
3281 (GLfloat)top,
3282 (GLfloat)zNear,
3283 (GLfloat)zFar
3284 );
Jack Palevich27f80022009-04-15 19:13:17 -07003285}
3286
3287/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3288static void
3289android_glOrthofOES__FFFFFF
3290 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07003291 glOrthofOES(
3292 (GLfloat)left,
3293 (GLfloat)right,
3294 (GLfloat)bottom,
3295 (GLfloat)top,
3296 (GLfloat)zNear,
3297 (GLfloat)zFar
3298 );
Jack Palevich27f80022009-04-15 19:13:17 -07003299}
3300
3301/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3302static void
3303android_glClipPlanefOES__I_3FI
3304 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003305 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003306 const char * _exceptionType = NULL;
3307 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003308 GLfloat *equation_base = (GLfloat *) 0;
3309 jint _remaining;
3310 GLfloat *equation = (GLfloat *) 0;
3311
3312 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003313 _exception = 1;
3314 _exceptionType = "java/lang/IllegalArgumentException";
3315 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003316 goto exit;
3317 }
3318 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003319 _exception = 1;
3320 _exceptionType = "java/lang/IllegalArgumentException";
3321 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003322 goto exit;
3323 }
3324 _remaining = _env->GetArrayLength(equation_ref) - offset;
3325 equation_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003326 _env->GetFloatArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003327 equation = equation_base + offset;
3328
3329 glClipPlanefOES(
3330 (GLenum)plane,
3331 (GLfloat *)equation
3332 );
3333
3334exit:
3335 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003336 _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003337 JNI_ABORT);
3338 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003339 if (_exception) {
3340 jniThrowException(_env, _exceptionType, _exceptionMessage);
3341 }
Jack Palevich27f80022009-04-15 19:13:17 -07003342}
3343
3344/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3345static void
3346android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
3347 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003348 jint _exception = 0;
3349 const char * _exceptionType = NULL;
3350 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003351 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003352 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003353 jint _remaining;
3354 GLfloat *equation = (GLfloat *) 0;
3355
Romain Guy84cac202016-12-05 12:26:02 -08003356 if (!equation_buf) {
3357 _exception = 1;
3358 _exceptionType = "java/lang/IllegalArgumentException";
3359 _exceptionMessage = "equation == null";
3360 goto exit;
3361 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003362 equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003363 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003364 char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003365 equation = (GLfloat *) (_equationBase + _bufferOffset);
3366 }
Jack Palevicha3795852009-04-24 10:35:11 -07003367 glClipPlanefOES(
3368 (GLenum)plane,
3369 (GLfloat *)equation
3370 );
Romain Guy84cac202016-12-05 12:26:02 -08003371
3372exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003373 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003374 _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003375 }
Romain Guy84cac202016-12-05 12:26:02 -08003376 if (_exception) {
3377 jniThrowException(_env, _exceptionType, _exceptionMessage);
3378 }
Jack Palevich27f80022009-04-15 19:13:17 -07003379}
3380
3381/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3382static void
3383android_glGetClipPlanefOES__I_3FI
3384 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003385 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003386 const char * _exceptionType = NULL;
3387 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003388 GLfloat *eqn_base = (GLfloat *) 0;
3389 jint _remaining;
3390 GLfloat *eqn = (GLfloat *) 0;
3391
3392 if (!eqn_ref) {
3393 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003394 _exceptionType = "java/lang/IllegalArgumentException";
3395 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003396 goto exit;
3397 }
3398 if (offset < 0) {
3399 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003400 _exceptionType = "java/lang/IllegalArgumentException";
3401 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003402 goto exit;
3403 }
3404 _remaining = _env->GetArrayLength(eqn_ref) - offset;
3405 if (_remaining < 4) {
3406 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003407 _exceptionType = "java/lang/IllegalArgumentException";
3408 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003409 goto exit;
3410 }
3411 eqn_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003412 _env->GetFloatArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003413 eqn = eqn_base + offset;
3414
3415 glGetClipPlanefOES(
3416 (GLenum)pname,
3417 (GLfloat *)eqn
3418 );
3419
3420exit:
3421 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003422 _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003423 _exception ? JNI_ABORT: 0);
3424 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003425 if (_exception) {
3426 jniThrowException(_env, _exceptionType, _exceptionMessage);
3427 }
Jack Palevich27f80022009-04-15 19:13:17 -07003428}
3429
3430/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3431static void
3432android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
3433 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003434 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003435 const char * _exceptionType = NULL;
3436 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003437 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003438 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003439 jint _remaining;
3440 GLfloat *eqn = (GLfloat *) 0;
3441
Romain Guy84cac202016-12-05 12:26:02 -08003442 if (!eqn_buf) {
3443 _exception = 1;
3444 _exceptionType = "java/lang/IllegalArgumentException";
3445 _exceptionMessage = "eqn == null";
3446 goto exit;
3447 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003448 eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07003449 if (_remaining < 4) {
3450 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003451 _exceptionType = "java/lang/IllegalArgumentException";
3452 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003453 goto exit;
3454 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003455 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003456 char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003457 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
3458 }
Jack Palevicha3795852009-04-24 10:35:11 -07003459 glGetClipPlanefOES(
3460 (GLenum)pname,
3461 (GLfloat *)eqn
3462 );
3463
3464exit:
3465 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003466 _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07003467 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003468 if (_exception) {
3469 jniThrowException(_env, _exceptionType, _exceptionMessage);
3470 }
Jack Palevich27f80022009-04-15 19:13:17 -07003471}
3472
3473/* void glClearDepthfOES ( GLclampf depth ) */
3474static void
3475android_glClearDepthfOES__F
3476 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07003477 glClearDepthfOES(
3478 (GLclampf)depth
3479 );
Jack Palevich27f80022009-04-15 19:13:17 -07003480}
3481
3482/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3483static void
3484android_glTexGenfOES__IIF
3485 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003486 glTexGenfOES(
3487 (GLenum)coord,
3488 (GLenum)pname,
3489 (GLfloat)param
3490 );
Jack Palevich27f80022009-04-15 19:13:17 -07003491}
3492
3493/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3494static void
3495android_glTexGenfvOES__II_3FI
3496 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003497 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003498 const char * _exceptionType = NULL;
3499 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003500 GLfloat *params_base = (GLfloat *) 0;
3501 jint _remaining;
3502 GLfloat *params = (GLfloat *) 0;
3503
3504 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003505 _exception = 1;
3506 _exceptionType = "java/lang/IllegalArgumentException";
3507 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003508 goto exit;
3509 }
3510 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003511 _exception = 1;
3512 _exceptionType = "java/lang/IllegalArgumentException";
3513 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003514 goto exit;
3515 }
3516 _remaining = _env->GetArrayLength(params_ref) - offset;
3517 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003518 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003519 params = params_base + offset;
3520
3521 glTexGenfvOES(
3522 (GLenum)coord,
3523 (GLenum)pname,
3524 (GLfloat *)params
3525 );
3526
3527exit:
3528 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003529 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003530 JNI_ABORT);
3531 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003532 if (_exception) {
3533 jniThrowException(_env, _exceptionType, _exceptionMessage);
3534 }
Jack Palevich27f80022009-04-15 19:13:17 -07003535}
3536
3537/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3538static void
3539android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3540 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003541 jint _exception = 0;
3542 const char * _exceptionType = NULL;
3543 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003544 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003545 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003546 jint _remaining;
3547 GLfloat *params = (GLfloat *) 0;
3548
Romain Guy84cac202016-12-05 12:26:02 -08003549 if (!params_buf) {
3550 _exception = 1;
3551 _exceptionType = "java/lang/IllegalArgumentException";
3552 _exceptionMessage = "params == null";
3553 goto exit;
3554 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003555 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003556 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003557 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003558 params = (GLfloat *) (_paramsBase + _bufferOffset);
3559 }
Jack Palevicha3795852009-04-24 10:35:11 -07003560 glTexGenfvOES(
3561 (GLenum)coord,
3562 (GLenum)pname,
3563 (GLfloat *)params
3564 );
Romain Guy84cac202016-12-05 12:26:02 -08003565
3566exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003567 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003568 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003569 }
Romain Guy84cac202016-12-05 12:26:02 -08003570 if (_exception) {
3571 jniThrowException(_env, _exceptionType, _exceptionMessage);
3572 }
Jack Palevich27f80022009-04-15 19:13:17 -07003573}
3574
3575/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3576static void
3577android_glTexGeniOES__III
3578 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003579 glTexGeniOES(
3580 (GLenum)coord,
3581 (GLenum)pname,
3582 (GLint)param
3583 );
Jack Palevich27f80022009-04-15 19:13:17 -07003584}
3585
3586/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3587static void
3588android_glTexGenivOES__II_3II
3589 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003590 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003591 const char * _exceptionType = NULL;
3592 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003593 GLint *params_base = (GLint *) 0;
3594 jint _remaining;
3595 GLint *params = (GLint *) 0;
3596
3597 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003598 _exception = 1;
3599 _exceptionType = "java/lang/IllegalArgumentException";
3600 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003601 goto exit;
3602 }
3603 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003604 _exception = 1;
3605 _exceptionType = "java/lang/IllegalArgumentException";
3606 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003607 goto exit;
3608 }
3609 _remaining = _env->GetArrayLength(params_ref) - offset;
3610 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003611 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003612 params = params_base + offset;
3613
3614 glTexGenivOES(
3615 (GLenum)coord,
3616 (GLenum)pname,
3617 (GLint *)params
3618 );
3619
3620exit:
3621 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003622 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003623 JNI_ABORT);
3624 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003625 if (_exception) {
3626 jniThrowException(_env, _exceptionType, _exceptionMessage);
3627 }
Jack Palevich27f80022009-04-15 19:13:17 -07003628}
3629
3630/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3631static void
3632android_glTexGenivOES__IILjava_nio_IntBuffer_2
3633 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003634 jint _exception = 0;
3635 const char * _exceptionType = NULL;
3636 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003637 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003638 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003639 jint _remaining;
3640 GLint *params = (GLint *) 0;
3641
Romain Guy84cac202016-12-05 12:26:02 -08003642 if (!params_buf) {
3643 _exception = 1;
3644 _exceptionType = "java/lang/IllegalArgumentException";
3645 _exceptionMessage = "params == null";
3646 goto exit;
3647 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003648 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003649 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003650 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003651 params = (GLint *) (_paramsBase + _bufferOffset);
3652 }
Jack Palevicha3795852009-04-24 10:35:11 -07003653 glTexGenivOES(
3654 (GLenum)coord,
3655 (GLenum)pname,
3656 (GLint *)params
3657 );
Romain Guy84cac202016-12-05 12:26:02 -08003658
3659exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003660 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003661 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003662 }
Romain Guy84cac202016-12-05 12:26:02 -08003663 if (_exception) {
3664 jniThrowException(_env, _exceptionType, _exceptionMessage);
3665 }
Jack Palevich27f80022009-04-15 19:13:17 -07003666}
3667
3668/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3669static void
3670android_glTexGenxOES__III
3671 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003672 glTexGenxOES(
3673 (GLenum)coord,
3674 (GLenum)pname,
3675 (GLfixed)param
3676 );
Jack Palevich27f80022009-04-15 19:13:17 -07003677}
3678
3679/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3680static void
3681android_glTexGenxvOES__II_3II
3682 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003683 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003684 const char * _exceptionType = NULL;
3685 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003686 GLfixed *params_base = (GLfixed *) 0;
3687 jint _remaining;
3688 GLfixed *params = (GLfixed *) 0;
3689
3690 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003691 _exception = 1;
3692 _exceptionType = "java/lang/IllegalArgumentException";
3693 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003694 goto exit;
3695 }
3696 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003697 _exception = 1;
3698 _exceptionType = "java/lang/IllegalArgumentException";
3699 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003700 goto exit;
3701 }
3702 _remaining = _env->GetArrayLength(params_ref) - offset;
3703 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003704 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003705 params = params_base + offset;
3706
3707 glTexGenxvOES(
3708 (GLenum)coord,
3709 (GLenum)pname,
3710 (GLfixed *)params
3711 );
3712
3713exit:
3714 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003715 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003716 JNI_ABORT);
3717 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003718 if (_exception) {
3719 jniThrowException(_env, _exceptionType, _exceptionMessage);
3720 }
Jack Palevich27f80022009-04-15 19:13:17 -07003721}
3722
3723/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3724static void
3725android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3726 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003727 jint _exception = 0;
3728 const char * _exceptionType = NULL;
3729 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003730 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003731 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003732 jint _remaining;
3733 GLfixed *params = (GLfixed *) 0;
3734
Romain Guy84cac202016-12-05 12:26:02 -08003735 if (!params_buf) {
3736 _exception = 1;
3737 _exceptionType = "java/lang/IllegalArgumentException";
3738 _exceptionMessage = "params == null";
3739 goto exit;
3740 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003741 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003742 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003743 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003744 params = (GLfixed *) (_paramsBase + _bufferOffset);
3745 }
Jack Palevicha3795852009-04-24 10:35:11 -07003746 glTexGenxvOES(
3747 (GLenum)coord,
3748 (GLenum)pname,
3749 (GLfixed *)params
3750 );
Romain Guy84cac202016-12-05 12:26:02 -08003751
3752exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003753 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003754 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003755 }
Romain Guy84cac202016-12-05 12:26:02 -08003756 if (_exception) {
3757 jniThrowException(_env, _exceptionType, _exceptionMessage);
3758 }
Jack Palevich27f80022009-04-15 19:13:17 -07003759}
3760
3761/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3762static void
3763android_glGetTexGenfvOES__II_3FI
3764 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003765 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003766 const char * _exceptionType = NULL;
3767 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003768 GLfloat *params_base = (GLfloat *) 0;
3769 jint _remaining;
3770 GLfloat *params = (GLfloat *) 0;
3771
3772 if (!params_ref) {
3773 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003774 _exceptionType = "java/lang/IllegalArgumentException";
3775 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003776 goto exit;
3777 }
3778 if (offset < 0) {
3779 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003780 _exceptionType = "java/lang/IllegalArgumentException";
3781 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003782 goto exit;
3783 }
3784 _remaining = _env->GetArrayLength(params_ref) - offset;
3785 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003786 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003787 params = params_base + offset;
3788
3789 glGetTexGenfvOES(
3790 (GLenum)coord,
3791 (GLenum)pname,
3792 (GLfloat *)params
3793 );
3794
3795exit:
3796 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003797 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003798 _exception ? JNI_ABORT: 0);
3799 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003800 if (_exception) {
3801 jniThrowException(_env, _exceptionType, _exceptionMessage);
3802 }
Jack Palevich27f80022009-04-15 19:13:17 -07003803}
3804
3805/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3806static void
3807android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3808 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003809 jint _exception = 0;
3810 const char * _exceptionType = NULL;
3811 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003812 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003813 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003814 jint _remaining;
3815 GLfloat *params = (GLfloat *) 0;
3816
Romain Guy84cac202016-12-05 12:26:02 -08003817 if (!params_buf) {
3818 _exception = 1;
3819 _exceptionType = "java/lang/IllegalArgumentException";
3820 _exceptionMessage = "params == null";
3821 goto exit;
3822 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003823 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003824 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003825 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003826 params = (GLfloat *) (_paramsBase + _bufferOffset);
3827 }
Jack Palevicha3795852009-04-24 10:35:11 -07003828 glGetTexGenfvOES(
3829 (GLenum)coord,
3830 (GLenum)pname,
3831 (GLfloat *)params
3832 );
Romain Guy84cac202016-12-05 12:26:02 -08003833
3834exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003835 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003836 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3837 }
3838 if (_exception) {
3839 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07003840 }
Jack Palevich27f80022009-04-15 19:13:17 -07003841}
3842
3843/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3844static void
3845android_glGetTexGenivOES__II_3II
3846 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003847 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003848 const char * _exceptionType = NULL;
3849 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003850 GLint *params_base = (GLint *) 0;
3851 jint _remaining;
3852 GLint *params = (GLint *) 0;
3853
3854 if (!params_ref) {
3855 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003856 _exceptionType = "java/lang/IllegalArgumentException";
3857 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003858 goto exit;
3859 }
3860 if (offset < 0) {
3861 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003862 _exceptionType = "java/lang/IllegalArgumentException";
3863 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003864 goto exit;
3865 }
3866 _remaining = _env->GetArrayLength(params_ref) - offset;
3867 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003868 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003869 params = params_base + offset;
3870
3871 glGetTexGenivOES(
3872 (GLenum)coord,
3873 (GLenum)pname,
3874 (GLint *)params
3875 );
3876
3877exit:
3878 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003879 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003880 _exception ? JNI_ABORT: 0);
3881 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003882 if (_exception) {
3883 jniThrowException(_env, _exceptionType, _exceptionMessage);
3884 }
Jack Palevich27f80022009-04-15 19:13:17 -07003885}
3886
3887/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3888static void
3889android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3890 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003891 jint _exception = 0;
3892 const char * _exceptionType = NULL;
3893 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003894 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003895 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003896 jint _remaining;
3897 GLint *params = (GLint *) 0;
3898
Romain Guy84cac202016-12-05 12:26:02 -08003899 if (!params_buf) {
3900 _exception = 1;
3901 _exceptionType = "java/lang/IllegalArgumentException";
3902 _exceptionMessage = "params == null";
3903 goto exit;
3904 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003905 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003906 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003907 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003908 params = (GLint *) (_paramsBase + _bufferOffset);
3909 }
Jack Palevicha3795852009-04-24 10:35:11 -07003910 glGetTexGenivOES(
3911 (GLenum)coord,
3912 (GLenum)pname,
3913 (GLint *)params
3914 );
Romain Guy84cac202016-12-05 12:26:02 -08003915
3916exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003917 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08003918 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3919 }
3920 if (_exception) {
3921 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07003922 }
Jack Palevich27f80022009-04-15 19:13:17 -07003923}
3924
3925/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3926static void
3927android_glGetTexGenxvOES__II_3II
3928 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003929 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003930 const char * _exceptionType = NULL;
3931 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003932 GLfixed *params_base = (GLfixed *) 0;
3933 jint _remaining;
3934 GLfixed *params = (GLfixed *) 0;
3935
3936 if (!params_ref) {
3937 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003938 _exceptionType = "java/lang/IllegalArgumentException";
3939 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003940 goto exit;
3941 }
3942 if (offset < 0) {
3943 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003944 _exceptionType = "java/lang/IllegalArgumentException";
3945 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003946 goto exit;
3947 }
3948 _remaining = _env->GetArrayLength(params_ref) - offset;
3949 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003950 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003951 params = params_base + offset;
3952
3953 glGetTexGenxvOES(
3954 (GLenum)coord,
3955 (GLenum)pname,
3956 (GLfixed *)params
3957 );
3958
3959exit:
3960 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003961 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003962 _exception ? JNI_ABORT: 0);
3963 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003964 if (_exception) {
3965 jniThrowException(_env, _exceptionType, _exceptionMessage);
3966 }
Jack Palevich27f80022009-04-15 19:13:17 -07003967}
3968
3969/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3970static void
3971android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3972 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Romain Guy84cac202016-12-05 12:26:02 -08003973 jint _exception = 0;
3974 const char * _exceptionType = NULL;
3975 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003976 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003977 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003978 jint _remaining;
3979 GLfixed *params = (GLfixed *) 0;
3980
Romain Guy84cac202016-12-05 12:26:02 -08003981 if (!params_buf) {
3982 _exception = 1;
3983 _exceptionType = "java/lang/IllegalArgumentException";
3984 _exceptionMessage = "params == null";
3985 goto exit;
3986 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003987 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003988 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003989 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003990 params = (GLfixed *) (_paramsBase + _bufferOffset);
3991 }
Jack Palevicha3795852009-04-24 10:35:11 -07003992 glGetTexGenxvOES(
3993 (GLenum)coord,
3994 (GLenum)pname,
3995 (GLfixed *)params
3996 );
Romain Guy84cac202016-12-05 12:26:02 -08003997
3998exit:
Jack Palevicha3795852009-04-24 10:35:11 -07003999 if (_array) {
Romain Guy84cac202016-12-05 12:26:02 -08004000 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
4001 }
4002 if (_exception) {
4003 jniThrowException(_env, _exceptionType, _exceptionMessage);
Jack Palevicha3795852009-04-24 10:35:11 -07004004 }
Jack Palevich27f80022009-04-15 19:13:17 -07004005}
4006
4007static const char *classPathName = "android/opengl/GLES11Ext";
4008
Daniel Micay76f6a862015-09-19 17:31:01 -04004009static const JNINativeMethod methods[] = {
Jack Palevich27f80022009-04-15 19:13:17 -07004010{"_nativeClassInit", "()V", (void*)nativeClassInit },
4011{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
4012{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
4013{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
4014{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
4015{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
4016{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
4017{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
4018{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
4019{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
4020{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
4021{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
4022{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
4023{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
4024{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
4025{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
4026{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
4027{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
4028{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
4029{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
4030{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
4031{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
4032{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
4033{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
4034{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
4035{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
4036{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
4037{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
4038{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
4039{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
4040{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
4041{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
4042{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
4043{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
4044{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
4045{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
4046{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
4047{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
4048{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4049{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
4050{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4051{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
4052{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
4053{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
4054{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
4055{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
4056{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
4057{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
4058{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
4059{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
4060{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
4061{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
4062{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
4063{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
4064{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
4065{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
4066{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
4067{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
4068{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
4069{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
4070{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
4071{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
4072{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
4073{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
4074{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
4075{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
4076{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
4077{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
4078{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
4079{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
4080{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
4081{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
4082{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
4083{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
4084{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
4085{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
4086{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4087{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
4088{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
4089{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
4090{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
4091{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
4092{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
4093{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
4094{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
4095{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
4096{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
4097{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
4098{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
4099{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
4100{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
4101{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
4102{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
4103{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
4104{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
4105{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08004106{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
4107{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07004108{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
4109{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
4110{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
4111{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
4112{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4113{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
4114{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
4115{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
4116{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
4117{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
4118{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4119{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
4120{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
4121{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
4122{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
4123{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
4124{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
4125{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
4126{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
4127{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
4128{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
4129{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
4130{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
4131};
4132
4133int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
4134{
4135 int err;
4136 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
4137 return err;
4138}