blob: fb85cb0f8d95e91fad1df7cd003e9b1f303d4a8f [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>
28#include <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;
275#ifdef GL_ES_VERSION_2_0
276 // GLES 2.x pnames
277 switch (pname) {
278 case GL_ALIASED_LINE_WIDTH_RANGE:
279 case GL_ALIASED_POINT_SIZE_RANGE:
280 needed = 2;
281 break;
282
283 case GL_BLEND_COLOR:
284 case GL_COLOR_CLEAR_VALUE:
285 case GL_COLOR_WRITEMASK:
286 case GL_SCISSOR_BOX:
287 case GL_VIEWPORT:
288 needed = 4;
289 break;
290
291 case GL_COMPRESSED_TEXTURE_FORMATS:
292 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
293 break;
294
295 case GL_SHADER_BINARY_FORMATS:
296 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
297 break;
298 }
299#endif
300
301#ifdef GL_VERSION_ES_CM_1_1
302 // GLES 1.x pnames
303 switch (pname) {
304 case GL_ALIASED_LINE_WIDTH_RANGE:
305 case GL_ALIASED_POINT_SIZE_RANGE:
306 case GL_DEPTH_RANGE:
307 case GL_SMOOTH_LINE_WIDTH_RANGE:
308 case GL_SMOOTH_POINT_SIZE_RANGE:
309 needed = 2;
310 break;
311
312 case GL_CURRENT_NORMAL:
313 case GL_POINT_DISTANCE_ATTENUATION:
314 needed = 3;
315 break;
316
317 case GL_COLOR_CLEAR_VALUE:
318 case GL_COLOR_WRITEMASK:
319 case GL_CURRENT_COLOR:
320 case GL_CURRENT_TEXTURE_COORDS:
321 case GL_FOG_COLOR:
322 case GL_LIGHT_MODEL_AMBIENT:
323 case GL_SCISSOR_BOX:
324 case GL_VIEWPORT:
325 needed = 4;
326 break;
327
328 case GL_MODELVIEW_MATRIX:
329 case GL_PROJECTION_MATRIX:
330 case GL_TEXTURE_MATRIX:
331 needed = 16;
332 break;
333
334 case GL_COMPRESSED_TEXTURE_FORMATS:
335 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
336 break;
337 }
338#endif
339 return needed;
340}
341
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700342template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
343 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800344static void
345get
346 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
347 jint _exception = 0;
348 const char * _exceptionType;
349 const char * _exceptionMessage;
350 CTYPE *params_base = (CTYPE *) 0;
351 jint _remaining;
352 CTYPE *params = (CTYPE *) 0;
353 int _needed = 0;
354
355 if (!params_ref) {
356 _exception = 1;
357 _exceptionType = "java/lang/IllegalArgumentException";
358 _exceptionMessage = "params == null";
359 goto exit;
360 }
361 if (offset < 0) {
362 _exception = 1;
363 _exceptionType = "java/lang/IllegalArgumentException";
364 _exceptionMessage = "offset < 0";
365 goto exit;
366 }
367 _remaining = _env->GetArrayLength(params_ref) - offset;
368 _needed = getNeededCount(pname);
369 // if we didn't find this pname, we just assume the user passed
370 // an array of the right size -- this might happen with extensions
371 // or if we forget an enum here.
372 if (_remaining < _needed) {
373 _exception = 1;
374 _exceptionType = "java/lang/IllegalArgumentException";
375 _exceptionMessage = "length - offset < needed";
376 goto exit;
377 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700378 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
379 _env, params_ref, (jboolean *)0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800380 params = params_base + offset;
381
382 GET(
383 (GLenum)pname,
384 (CTYPE *)params
385 );
386
387exit:
388 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700389 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
390 _env, params_ref, params_base, !_exception);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800391 }
392 if (_exception) {
393 jniThrowException(_env, _exceptionType, _exceptionMessage);
394 }
395}
396
397
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700398template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
399 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Mathias Agopian2ad04772013-02-23 03:12:30 -0800400static void
401getarray
402 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
403 jint _exception = 0;
404 const char * _exceptionType;
405 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700406 JTYPEARRAY _array = (JTYPEARRAY) 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800407 jint _bufferOffset = (jint) 0;
408 jint _remaining;
409 CTYPE *params = (CTYPE *) 0;
410 int _needed = 0;
411
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700412 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Andy McFaddencee51982013-04-25 16:08:31 -0700413 _remaining /= sizeof(CTYPE); // convert from bytes to item count
Mathias Agopian2ad04772013-02-23 03:12:30 -0800414 _needed = getNeededCount(pname);
415 // if we didn't find this pname, we just assume the user passed
416 // an array of the right size -- this might happen with extensions
417 // or if we forget an enum here.
418 if (_needed>0 && _remaining < _needed) {
419 _exception = 1;
420 _exceptionType = "java/lang/IllegalArgumentException";
421 _exceptionMessage = "remaining() < needed";
422 goto exit;
423 }
424 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700425 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
426 _env, _array, (jboolean *) 0);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800427 params = (CTYPE *) (_paramsBase + _bufferOffset);
428 }
429 GET(
430 (GLenum)pname,
431 (CTYPE *)params
432 );
433
434exit:
435 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700436 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
437 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800438 }
439 if (_exception) {
440 jniThrowException(_env, _exceptionType, _exceptionMessage);
441 }
442}
443
Jack Palevich27f80022009-04-15 19:13:17 -0700444// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700445/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
446static void
447android_glBlendEquationSeparateOES__II
448 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700449 glBlendEquationSeparateOES(
450 (GLenum)modeRGB,
451 (GLenum)modeAlpha
452 );
Jack Palevich27f80022009-04-15 19:13:17 -0700453}
454
455/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
456static void
457android_glBlendFuncSeparateOES__IIII
458 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700459 glBlendFuncSeparateOES(
460 (GLenum)srcRGB,
461 (GLenum)dstRGB,
462 (GLenum)srcAlpha,
463 (GLenum)dstAlpha
464 );
Jack Palevich27f80022009-04-15 19:13:17 -0700465}
466
467/* void glBlendEquationOES ( GLenum mode ) */
468static void
469android_glBlendEquationOES__I
470 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700471 glBlendEquationOES(
472 (GLenum)mode
473 );
Jack Palevich27f80022009-04-15 19:13:17 -0700474}
475
476/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
477static void
478android_glDrawTexsOES__SSSSS
479 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
480 glDrawTexsOES(
481 (GLshort)x,
482 (GLshort)y,
483 (GLshort)z,
484 (GLshort)width,
485 (GLshort)height
486 );
487}
488
489/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
490static void
491android_glDrawTexiOES__IIIII
492 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
493 glDrawTexiOES(
494 (GLint)x,
495 (GLint)y,
496 (GLint)z,
497 (GLint)width,
498 (GLint)height
499 );
500}
501
502/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
503static void
504android_glDrawTexxOES__IIIII
505 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
506 glDrawTexxOES(
507 (GLfixed)x,
508 (GLfixed)y,
509 (GLfixed)z,
510 (GLfixed)width,
511 (GLfixed)height
512 );
513}
514
515/* void glDrawTexsvOES ( const GLshort *coords ) */
516static void
517android_glDrawTexsvOES___3SI
518 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700519 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800520 const char * _exceptionType = NULL;
521 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700522 GLshort *coords_base = (GLshort *) 0;
523 jint _remaining;
524 GLshort *coords = (GLshort *) 0;
525
526 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700527 _exception = 1;
528 _exceptionType = "java/lang/IllegalArgumentException";
529 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700530 goto exit;
531 }
532 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700533 _exception = 1;
534 _exceptionType = "java/lang/IllegalArgumentException";
535 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700536 goto exit;
537 }
538 _remaining = _env->GetArrayLength(coords_ref) - offset;
539 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700540 _exception = 1;
541 _exceptionType = "java/lang/IllegalArgumentException";
542 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700543 goto exit;
544 }
545 coords_base = (GLshort *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700546 _env->GetShortArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700547 coords = coords_base + offset;
548
549 glDrawTexsvOES(
550 (GLshort *)coords
551 );
552
553exit:
554 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700555 _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700556 JNI_ABORT);
557 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700558 if (_exception) {
559 jniThrowException(_env, _exceptionType, _exceptionMessage);
560 }
Jack Palevich27f80022009-04-15 19:13:17 -0700561}
562
563/* void glDrawTexsvOES ( const GLshort *coords ) */
564static void
565android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
566 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700567 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800568 const char * _exceptionType = NULL;
569 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700570 jshortArray _array = (jshortArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700571 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700572 jint _remaining;
573 GLshort *coords = (GLshort *) 0;
574
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700575 coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700576 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700577 _exception = 1;
578 _exceptionType = "java/lang/IllegalArgumentException";
579 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700580 goto exit;
581 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700582 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700583 char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700584 coords = (GLshort *) (_coordsBase + _bufferOffset);
585 }
Jack Palevich27f80022009-04-15 19:13:17 -0700586 glDrawTexsvOES(
587 (GLshort *)coords
588 );
589
590exit:
591 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700592 _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700593 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700594 if (_exception) {
595 jniThrowException(_env, _exceptionType, _exceptionMessage);
596 }
Jack Palevich27f80022009-04-15 19:13:17 -0700597}
598
599/* void glDrawTexivOES ( const GLint *coords ) */
600static void
601android_glDrawTexivOES___3II
602 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700603 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800604 const char * _exceptionType = NULL;
605 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700606 GLint *coords_base = (GLint *) 0;
607 jint _remaining;
608 GLint *coords = (GLint *) 0;
609
610 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700611 _exception = 1;
612 _exceptionType = "java/lang/IllegalArgumentException";
613 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700614 goto exit;
615 }
616 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700617 _exception = 1;
618 _exceptionType = "java/lang/IllegalArgumentException";
619 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700620 goto exit;
621 }
622 _remaining = _env->GetArrayLength(coords_ref) - offset;
623 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700624 _exception = 1;
625 _exceptionType = "java/lang/IllegalArgumentException";
626 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700627 goto exit;
628 }
629 coords_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700630 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700631 coords = coords_base + offset;
632
633 glDrawTexivOES(
634 (GLint *)coords
635 );
636
637exit:
638 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700639 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700640 JNI_ABORT);
641 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700642 if (_exception) {
643 jniThrowException(_env, _exceptionType, _exceptionMessage);
644 }
Jack Palevich27f80022009-04-15 19:13:17 -0700645}
646
647/* void glDrawTexivOES ( const GLint *coords ) */
648static void
649android_glDrawTexivOES__Ljava_nio_IntBuffer_2
650 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700651 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800652 const char * _exceptionType = NULL;
653 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700654 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700655 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700656 jint _remaining;
657 GLint *coords = (GLint *) 0;
658
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700659 coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700660 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700661 _exception = 1;
662 _exceptionType = "java/lang/IllegalArgumentException";
663 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700664 goto exit;
665 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700666 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700667 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700668 coords = (GLint *) (_coordsBase + _bufferOffset);
669 }
Jack Palevich27f80022009-04-15 19:13:17 -0700670 glDrawTexivOES(
671 (GLint *)coords
672 );
673
674exit:
675 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700676 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700677 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700678 if (_exception) {
679 jniThrowException(_env, _exceptionType, _exceptionMessage);
680 }
Jack Palevich27f80022009-04-15 19:13:17 -0700681}
682
683/* void glDrawTexxvOES ( const GLfixed *coords ) */
684static void
685android_glDrawTexxvOES___3II
686 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700687 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800688 const char * _exceptionType = NULL;
689 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700690 GLfixed *coords_base = (GLfixed *) 0;
691 jint _remaining;
692 GLfixed *coords = (GLfixed *) 0;
693
694 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700695 _exception = 1;
696 _exceptionType = "java/lang/IllegalArgumentException";
697 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700698 goto exit;
699 }
700 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700701 _exception = 1;
702 _exceptionType = "java/lang/IllegalArgumentException";
703 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700704 goto exit;
705 }
706 _remaining = _env->GetArrayLength(coords_ref) - offset;
707 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700708 _exception = 1;
709 _exceptionType = "java/lang/IllegalArgumentException";
710 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700711 goto exit;
712 }
713 coords_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700714 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700715 coords = coords_base + offset;
716
717 glDrawTexxvOES(
718 (GLfixed *)coords
719 );
720
721exit:
722 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700723 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700724 JNI_ABORT);
725 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700726 if (_exception) {
727 jniThrowException(_env, _exceptionType, _exceptionMessage);
728 }
Jack Palevich27f80022009-04-15 19:13:17 -0700729}
730
731/* void glDrawTexxvOES ( const GLfixed *coords ) */
732static void
733android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
734 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700735 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800736 const char * _exceptionType = NULL;
737 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700738 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700739 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700740 jint _remaining;
741 GLfixed *coords = (GLfixed *) 0;
742
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700743 coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700744 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700745 _exception = 1;
746 _exceptionType = "java/lang/IllegalArgumentException";
747 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700748 goto exit;
749 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700750 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700751 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700752 coords = (GLfixed *) (_coordsBase + _bufferOffset);
753 }
Jack Palevich27f80022009-04-15 19:13:17 -0700754 glDrawTexxvOES(
755 (GLfixed *)coords
756 );
757
758exit:
759 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700760 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700761 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700762 if (_exception) {
763 jniThrowException(_env, _exceptionType, _exceptionMessage);
764 }
Jack Palevich27f80022009-04-15 19:13:17 -0700765}
766
767/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
768static void
769android_glDrawTexfOES__FFFFF
770 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
771 glDrawTexfOES(
772 (GLfloat)x,
773 (GLfloat)y,
774 (GLfloat)z,
775 (GLfloat)width,
776 (GLfloat)height
777 );
778}
779
780/* void glDrawTexfvOES ( const GLfloat *coords ) */
781static void
782android_glDrawTexfvOES___3FI
783 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700784 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800785 const char * _exceptionType = NULL;
786 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700787 GLfloat *coords_base = (GLfloat *) 0;
788 jint _remaining;
789 GLfloat *coords = (GLfloat *) 0;
790
791 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700792 _exception = 1;
793 _exceptionType = "java/lang/IllegalArgumentException";
794 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700795 goto exit;
796 }
797 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700798 _exception = 1;
799 _exceptionType = "java/lang/IllegalArgumentException";
800 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700801 goto exit;
802 }
803 _remaining = _env->GetArrayLength(coords_ref) - offset;
804 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700805 _exception = 1;
806 _exceptionType = "java/lang/IllegalArgumentException";
807 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700808 goto exit;
809 }
810 coords_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700811 _env->GetFloatArrayElements(coords_ref, (jboolean *)0);
Jack Palevich27f80022009-04-15 19:13:17 -0700812 coords = coords_base + offset;
813
814 glDrawTexfvOES(
815 (GLfloat *)coords
816 );
817
818exit:
819 if (coords_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700820 _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base,
Jack Palevich27f80022009-04-15 19:13:17 -0700821 JNI_ABORT);
822 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700823 if (_exception) {
824 jniThrowException(_env, _exceptionType, _exceptionMessage);
825 }
Jack Palevich27f80022009-04-15 19:13:17 -0700826}
827
828/* void glDrawTexfvOES ( const GLfloat *coords ) */
829static void
830android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
831 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700832 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800833 const char * _exceptionType = NULL;
834 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700835 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700836 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700837 jint _remaining;
838 GLfloat *coords = (GLfloat *) 0;
839
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700840 coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700841 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700842 _exception = 1;
843 _exceptionType = "java/lang/IllegalArgumentException";
844 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700845 goto exit;
846 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700847 if (coords == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700848 char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700849 coords = (GLfloat *) (_coordsBase + _bufferOffset);
850 }
Jack Palevich27f80022009-04-15 19:13:17 -0700851 glDrawTexfvOES(
852 (GLfloat *)coords
853 );
854
855exit:
856 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700857 _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700858 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700859 if (_exception) {
860 jniThrowException(_env, _exceptionType, _exceptionMessage);
861 }
Jack Palevich27f80022009-04-15 19:13:17 -0700862}
863
864/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
865static void
866android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
867 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700868 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700869 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700870 jint _remaining;
871 GLeglImageOES image = (GLeglImageOES) 0;
872
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700873 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700874 if (image == NULL) {
875 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
876 image = (GLeglImageOES) (_imageBase + _bufferOffset);
877 }
Jack Palevicha3795852009-04-24 10:35:11 -0700878 glEGLImageTargetTexture2DOES(
879 (GLenum)target,
880 (GLeglImageOES)image
881 );
882 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700883 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700884 }
Jack Palevich27f80022009-04-15 19:13:17 -0700885}
886
887/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
888static void
889android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
890 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700891 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700892 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700893 jint _remaining;
894 GLeglImageOES image = (GLeglImageOES) 0;
895
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700896 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700897 if (image == NULL) {
898 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
899 image = (GLeglImageOES) (_imageBase + _bufferOffset);
900 }
Jack Palevicha3795852009-04-24 10:35:11 -0700901 glEGLImageTargetRenderbufferStorageOES(
902 (GLenum)target,
903 (GLeglImageOES)image
904 );
905 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700906 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700907 }
Jack Palevich27f80022009-04-15 19:13:17 -0700908}
909
910/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
911static void
912android_glAlphaFuncxOES__II
913 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700914 glAlphaFuncxOES(
915 (GLenum)func,
916 (GLclampx)ref
917 );
Jack Palevich27f80022009-04-15 19:13:17 -0700918}
919
920/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
921static void
922android_glClearColorxOES__IIII
923 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700924 glClearColorxOES(
925 (GLclampx)red,
926 (GLclampx)green,
927 (GLclampx)blue,
928 (GLclampx)alpha
929 );
Jack Palevich27f80022009-04-15 19:13:17 -0700930}
931
932/* void glClearDepthxOES ( GLclampx depth ) */
933static void
934android_glClearDepthxOES__I
935 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700936 glClearDepthxOES(
937 (GLclampx)depth
938 );
Jack Palevich27f80022009-04-15 19:13:17 -0700939}
940
941/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
942static void
943android_glClipPlanexOES__I_3II
944 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700945 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800946 const char * _exceptionType = NULL;
947 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700948 GLfixed *equation_base = (GLfixed *) 0;
949 jint _remaining;
950 GLfixed *equation = (GLfixed *) 0;
951
952 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700953 _exception = 1;
954 _exceptionType = "java/lang/IllegalArgumentException";
955 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700956 goto exit;
957 }
958 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700959 _exception = 1;
960 _exceptionType = "java/lang/IllegalArgumentException";
961 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700962 goto exit;
963 }
964 _remaining = _env->GetArrayLength(equation_ref) - offset;
965 equation_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700966 _env->GetIntArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -0700967 equation = equation_base + offset;
968
969 glClipPlanexOES(
970 (GLenum)plane,
971 (GLfixed *)equation
972 );
973
974exit:
975 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700976 _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -0700977 JNI_ABORT);
978 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700979 if (_exception) {
980 jniThrowException(_env, _exceptionType, _exceptionMessage);
981 }
Jack Palevich27f80022009-04-15 19:13:17 -0700982}
983
984/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
985static void
986android_glClipPlanexOES__ILjava_nio_IntBuffer_2
987 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700988 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700989 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700990 jint _remaining;
991 GLfixed *equation = (GLfixed *) 0;
992
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700993 equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700994 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700995 char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700996 equation = (GLfixed *) (_equationBase + _bufferOffset);
997 }
Jack Palevicha3795852009-04-24 10:35:11 -0700998 glClipPlanexOES(
999 (GLenum)plane,
1000 (GLfixed *)equation
1001 );
1002 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001003 _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001004 }
Jack Palevich27f80022009-04-15 19:13:17 -07001005}
1006
1007/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
1008static void
1009android_glColor4xOES__IIII
1010 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -07001011 glColor4xOES(
1012 (GLfixed)red,
1013 (GLfixed)green,
1014 (GLfixed)blue,
1015 (GLfixed)alpha
1016 );
Jack Palevich27f80022009-04-15 19:13:17 -07001017}
1018
1019/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
1020static void
1021android_glDepthRangexOES__II
1022 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001023 glDepthRangexOES(
1024 (GLclampx)zNear,
1025 (GLclampx)zFar
1026 );
Jack Palevich27f80022009-04-15 19:13:17 -07001027}
1028
1029/* void glFogxOES ( GLenum pname, GLfixed param ) */
1030static void
1031android_glFogxOES__II
1032 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001033 glFogxOES(
1034 (GLenum)pname,
1035 (GLfixed)param
1036 );
Jack Palevich27f80022009-04-15 19:13:17 -07001037}
1038
1039/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1040static void
1041android_glFogxvOES__I_3II
1042 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001043 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001044 const char * _exceptionType = NULL;
1045 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001046 GLfixed *params_base = (GLfixed *) 0;
1047 jint _remaining;
1048 GLfixed *params = (GLfixed *) 0;
1049
1050 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001051 _exception = 1;
1052 _exceptionType = "java/lang/IllegalArgumentException";
1053 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001054 goto exit;
1055 }
1056 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001057 _exception = 1;
1058 _exceptionType = "java/lang/IllegalArgumentException";
1059 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001060 goto exit;
1061 }
1062 _remaining = _env->GetArrayLength(params_ref) - offset;
1063 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001064 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001065 params = params_base + offset;
1066
1067 glFogxvOES(
1068 (GLenum)pname,
1069 (GLfixed *)params
1070 );
1071
1072exit:
1073 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001074 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001075 JNI_ABORT);
1076 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001077 if (_exception) {
1078 jniThrowException(_env, _exceptionType, _exceptionMessage);
1079 }
Jack Palevich27f80022009-04-15 19:13:17 -07001080}
1081
1082/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
1083static void
1084android_glFogxvOES__ILjava_nio_IntBuffer_2
1085 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001086 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001087 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001088 jint _remaining;
1089 GLfixed *params = (GLfixed *) 0;
1090
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001091 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001092 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001093 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001094 params = (GLfixed *) (_paramsBase + _bufferOffset);
1095 }
Jack Palevicha3795852009-04-24 10:35:11 -07001096 glFogxvOES(
1097 (GLenum)pname,
1098 (GLfixed *)params
1099 );
1100 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001101 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001102 }
Jack Palevich27f80022009-04-15 19:13:17 -07001103}
1104
1105/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1106static void
1107android_glFrustumxOES__IIIIII
1108 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001109 glFrustumxOES(
1110 (GLfixed)left,
1111 (GLfixed)right,
1112 (GLfixed)bottom,
1113 (GLfixed)top,
1114 (GLfixed)zNear,
1115 (GLfixed)zFar
1116 );
Jack Palevich27f80022009-04-15 19:13:17 -07001117}
1118
1119/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1120static void
1121android_glGetClipPlanexOES__I_3II
1122 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001123 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001124 const char * _exceptionType = NULL;
1125 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001126 GLfixed *eqn_base = (GLfixed *) 0;
1127 jint _remaining;
1128 GLfixed *eqn = (GLfixed *) 0;
1129
1130 if (!eqn_ref) {
1131 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001132 _exceptionType = "java/lang/IllegalArgumentException";
1133 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001134 goto exit;
1135 }
1136 if (offset < 0) {
1137 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001138 _exceptionType = "java/lang/IllegalArgumentException";
1139 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001140 goto exit;
1141 }
1142 _remaining = _env->GetArrayLength(eqn_ref) - offset;
1143 if (_remaining < 4) {
1144 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001145 _exceptionType = "java/lang/IllegalArgumentException";
1146 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001147 goto exit;
1148 }
1149 eqn_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001150 _env->GetIntArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001151 eqn = eqn_base + offset;
1152
1153 glGetClipPlanexOES(
1154 (GLenum)pname,
1155 (GLfixed *)eqn
1156 );
1157
1158exit:
1159 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001160 _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001161 _exception ? JNI_ABORT: 0);
1162 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001163 if (_exception) {
1164 jniThrowException(_env, _exceptionType, _exceptionMessage);
1165 }
Jack Palevich27f80022009-04-15 19:13:17 -07001166}
1167
1168/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1169static void
1170android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1171 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001172 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001173 const char * _exceptionType = NULL;
1174 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001175 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001176 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001177 jint _remaining;
1178 GLfixed *eqn = (GLfixed *) 0;
1179
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001180 eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07001181 if (_remaining < 4) {
1182 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001183 _exceptionType = "java/lang/IllegalArgumentException";
1184 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001185 goto exit;
1186 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001187 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001188 char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001189 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1190 }
Jack Palevicha3795852009-04-24 10:35:11 -07001191 glGetClipPlanexOES(
1192 (GLenum)pname,
1193 (GLfixed *)eqn
1194 );
1195
1196exit:
1197 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001198 _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001199 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001200 if (_exception) {
1201 jniThrowException(_env, _exceptionType, _exceptionMessage);
1202 }
Jack Palevich27f80022009-04-15 19:13:17 -07001203}
1204
1205/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1206static void
1207android_glGetFixedvOES__I_3II
1208 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001209 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001210 const char * _exceptionType = NULL;
1211 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001212 GLfixed *params_base = (GLfixed *) 0;
1213 jint _remaining;
1214 GLfixed *params = (GLfixed *) 0;
1215
1216 if (!params_ref) {
1217 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001218 _exceptionType = "java/lang/IllegalArgumentException";
1219 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001220 goto exit;
1221 }
1222 if (offset < 0) {
1223 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001224 _exceptionType = "java/lang/IllegalArgumentException";
1225 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001226 goto exit;
1227 }
1228 _remaining = _env->GetArrayLength(params_ref) - offset;
1229 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001230 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001231 params = params_base + offset;
1232
1233 glGetFixedvOES(
1234 (GLenum)pname,
1235 (GLfixed *)params
1236 );
1237
1238exit:
1239 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001240 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001241 _exception ? JNI_ABORT: 0);
1242 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001243 if (_exception) {
1244 jniThrowException(_env, _exceptionType, _exceptionMessage);
1245 }
Jack Palevich27f80022009-04-15 19:13:17 -07001246}
1247
1248/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1249static void
1250android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1251 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001252 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001253 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001254 jint _remaining;
1255 GLfixed *params = (GLfixed *) 0;
1256
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001257 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001258 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001259 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001260 params = (GLfixed *) (_paramsBase + _bufferOffset);
1261 }
Jack Palevicha3795852009-04-24 10:35:11 -07001262 glGetFixedvOES(
1263 (GLenum)pname,
1264 (GLfixed *)params
1265 );
1266 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001267 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001268 }
Jack Palevich27f80022009-04-15 19:13:17 -07001269}
1270
1271/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1272static void
1273android_glGetLightxvOES__II_3II
1274 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001275 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001276 const char * _exceptionType = NULL;
1277 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001278 GLfixed *params_base = (GLfixed *) 0;
1279 jint _remaining;
1280 GLfixed *params = (GLfixed *) 0;
1281
1282 if (!params_ref) {
1283 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001284 _exceptionType = "java/lang/IllegalArgumentException";
1285 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001286 goto exit;
1287 }
1288 if (offset < 0) {
1289 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001290 _exceptionType = "java/lang/IllegalArgumentException";
1291 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001292 goto exit;
1293 }
1294 _remaining = _env->GetArrayLength(params_ref) - offset;
1295 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001296 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001297 params = params_base + offset;
1298
1299 glGetLightxvOES(
1300 (GLenum)light,
1301 (GLenum)pname,
1302 (GLfixed *)params
1303 );
1304
1305exit:
1306 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001307 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001308 _exception ? JNI_ABORT: 0);
1309 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001310 if (_exception) {
1311 jniThrowException(_env, _exceptionType, _exceptionMessage);
1312 }
Jack Palevich27f80022009-04-15 19:13:17 -07001313}
1314
1315/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1316static void
1317android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1318 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001319 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001320 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001321 jint _remaining;
1322 GLfixed *params = (GLfixed *) 0;
1323
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001324 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001325 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001326 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001327 params = (GLfixed *) (_paramsBase + _bufferOffset);
1328 }
Jack Palevicha3795852009-04-24 10:35:11 -07001329 glGetLightxvOES(
1330 (GLenum)light,
1331 (GLenum)pname,
1332 (GLfixed *)params
1333 );
1334 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001335 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001336 }
Jack Palevich27f80022009-04-15 19:13:17 -07001337}
1338
1339/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1340static void
1341android_glGetMaterialxvOES__II_3II
1342 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001343 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001344 const char * _exceptionType = NULL;
1345 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001346 GLfixed *params_base = (GLfixed *) 0;
1347 jint _remaining;
1348 GLfixed *params = (GLfixed *) 0;
1349
1350 if (!params_ref) {
1351 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001352 _exceptionType = "java/lang/IllegalArgumentException";
1353 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001354 goto exit;
1355 }
1356 if (offset < 0) {
1357 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001358 _exceptionType = "java/lang/IllegalArgumentException";
1359 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001360 goto exit;
1361 }
1362 _remaining = _env->GetArrayLength(params_ref) - offset;
1363 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001364 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001365 params = params_base + offset;
1366
1367 glGetMaterialxvOES(
1368 (GLenum)face,
1369 (GLenum)pname,
1370 (GLfixed *)params
1371 );
1372
1373exit:
1374 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001375 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001376 _exception ? JNI_ABORT: 0);
1377 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001378 if (_exception) {
1379 jniThrowException(_env, _exceptionType, _exceptionMessage);
1380 }
Jack Palevich27f80022009-04-15 19:13:17 -07001381}
1382
1383/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1384static void
1385android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1386 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001387 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001388 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001389 jint _remaining;
1390 GLfixed *params = (GLfixed *) 0;
1391
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001392 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001393 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001394 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001395 params = (GLfixed *) (_paramsBase + _bufferOffset);
1396 }
Jack Palevicha3795852009-04-24 10:35:11 -07001397 glGetMaterialxvOES(
1398 (GLenum)face,
1399 (GLenum)pname,
1400 (GLfixed *)params
1401 );
1402 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001403 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001404 }
Jack Palevich27f80022009-04-15 19:13:17 -07001405}
1406
1407/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1408static void
1409android_glGetTexEnvxvOES__II_3II
1410 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001411 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001412 const char * _exceptionType = NULL;
1413 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001414 GLfixed *params_base = (GLfixed *) 0;
1415 jint _remaining;
1416 GLfixed *params = (GLfixed *) 0;
1417
1418 if (!params_ref) {
1419 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001420 _exceptionType = "java/lang/IllegalArgumentException";
1421 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001422 goto exit;
1423 }
1424 if (offset < 0) {
1425 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001426 _exceptionType = "java/lang/IllegalArgumentException";
1427 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001428 goto exit;
1429 }
1430 _remaining = _env->GetArrayLength(params_ref) - offset;
1431 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001432 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001433 params = params_base + offset;
1434
1435 glGetTexEnvxvOES(
1436 (GLenum)env,
1437 (GLenum)pname,
1438 (GLfixed *)params
1439 );
1440
1441exit:
1442 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001443 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001444 _exception ? JNI_ABORT: 0);
1445 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001446 if (_exception) {
1447 jniThrowException(_env, _exceptionType, _exceptionMessage);
1448 }
Jack Palevich27f80022009-04-15 19:13:17 -07001449}
1450
1451/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1452static void
1453android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1454 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001455 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001456 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001457 jint _remaining;
1458 GLfixed *params = (GLfixed *) 0;
1459
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001460 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001461 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001462 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001463 params = (GLfixed *) (_paramsBase + _bufferOffset);
1464 }
Jack Palevicha3795852009-04-24 10:35:11 -07001465 glGetTexEnvxvOES(
1466 (GLenum)env,
1467 (GLenum)pname,
1468 (GLfixed *)params
1469 );
1470 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001471 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001472 }
Jack Palevich27f80022009-04-15 19:13:17 -07001473}
1474
1475/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1476static void
1477android_glGetTexParameterxvOES__II_3II
1478 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001479 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001480 const char * _exceptionType = NULL;
1481 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001482 GLfixed *params_base = (GLfixed *) 0;
1483 jint _remaining;
1484 GLfixed *params = (GLfixed *) 0;
1485
1486 if (!params_ref) {
1487 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001488 _exceptionType = "java/lang/IllegalArgumentException";
1489 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001490 goto exit;
1491 }
1492 if (offset < 0) {
1493 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001494 _exceptionType = "java/lang/IllegalArgumentException";
1495 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001496 goto exit;
1497 }
1498 _remaining = _env->GetArrayLength(params_ref) - offset;
1499 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001500 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001501 params = params_base + offset;
1502
1503 glGetTexParameterxvOES(
1504 (GLenum)target,
1505 (GLenum)pname,
1506 (GLfixed *)params
1507 );
1508
1509exit:
1510 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001511 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001512 _exception ? JNI_ABORT: 0);
1513 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001514 if (_exception) {
1515 jniThrowException(_env, _exceptionType, _exceptionMessage);
1516 }
Jack Palevich27f80022009-04-15 19:13:17 -07001517}
1518
1519/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1520static void
1521android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1522 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001523 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001524 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001525 jint _remaining;
1526 GLfixed *params = (GLfixed *) 0;
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 glGetTexParameterxvOES(
1534 (GLenum)target,
1535 (GLenum)pname,
1536 (GLfixed *)params
1537 );
1538 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001539 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07001540 }
Jack Palevich27f80022009-04-15 19:13:17 -07001541}
1542
1543/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1544static void
1545android_glLightModelxOES__II
1546 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001547 glLightModelxOES(
1548 (GLenum)pname,
1549 (GLfixed)param
1550 );
Jack Palevich27f80022009-04-15 19:13:17 -07001551}
1552
1553/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1554static void
1555android_glLightModelxvOES__I_3II
1556 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001557 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001558 const char * _exceptionType = NULL;
1559 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001560 GLfixed *params_base = (GLfixed *) 0;
1561 jint _remaining;
1562 GLfixed *params = (GLfixed *) 0;
1563
1564 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001565 _exception = 1;
1566 _exceptionType = "java/lang/IllegalArgumentException";
1567 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001568 goto exit;
1569 }
1570 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001571 _exception = 1;
1572 _exceptionType = "java/lang/IllegalArgumentException";
1573 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001574 goto exit;
1575 }
1576 _remaining = _env->GetArrayLength(params_ref) - offset;
1577 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001578 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001579 params = params_base + offset;
1580
1581 glLightModelxvOES(
1582 (GLenum)pname,
1583 (GLfixed *)params
1584 );
1585
1586exit:
1587 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001588 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001589 JNI_ABORT);
1590 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001591 if (_exception) {
1592 jniThrowException(_env, _exceptionType, _exceptionMessage);
1593 }
Jack Palevich27f80022009-04-15 19:13:17 -07001594}
1595
1596/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1597static void
1598android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1599 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001600 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001601 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001602 jint _remaining;
1603 GLfixed *params = (GLfixed *) 0;
1604
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001605 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001606 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001607 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001608 params = (GLfixed *) (_paramsBase + _bufferOffset);
1609 }
Jack Palevicha3795852009-04-24 10:35:11 -07001610 glLightModelxvOES(
1611 (GLenum)pname,
1612 (GLfixed *)params
1613 );
1614 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001615 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001616 }
Jack Palevich27f80022009-04-15 19:13:17 -07001617}
1618
1619/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1620static void
1621android_glLightxOES__III
1622 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001623 glLightxOES(
1624 (GLenum)light,
1625 (GLenum)pname,
1626 (GLfixed)param
1627 );
Jack Palevich27f80022009-04-15 19:13:17 -07001628}
1629
1630/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1631static void
1632android_glLightxvOES__II_3II
1633 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -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) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001642 _exception = 1;
1643 _exceptionType = "java/lang/IllegalArgumentException";
1644 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001645 goto exit;
1646 }
1647 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001648 _exception = 1;
1649 _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 glLightxvOES(
1659 (GLenum)light,
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 JNI_ABORT);
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 glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1675static void
1676android_glLightxvOES__IILjava_nio_IntBuffer_2
1677 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001678 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001679 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001680 jint _remaining;
1681 GLfixed *params = (GLfixed *) 0;
1682
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001683 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001684 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001685 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001686 params = (GLfixed *) (_paramsBase + _bufferOffset);
1687 }
Jack Palevicha3795852009-04-24 10:35:11 -07001688 glLightxvOES(
1689 (GLenum)light,
1690 (GLenum)pname,
1691 (GLfixed *)params
1692 );
1693 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001694 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001695 }
Jack Palevich27f80022009-04-15 19:13:17 -07001696}
1697
1698/* void glLineWidthxOES ( GLfixed width ) */
1699static void
1700android_glLineWidthxOES__I
1701 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001702 glLineWidthxOES(
1703 (GLfixed)width
1704 );
Jack Palevich27f80022009-04-15 19:13:17 -07001705}
1706
1707/* void glLoadMatrixxOES ( const GLfixed *m ) */
1708static void
1709android_glLoadMatrixxOES___3II
1710 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001711 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001712 const char * _exceptionType = NULL;
1713 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001714 GLfixed *m_base = (GLfixed *) 0;
1715 jint _remaining;
1716 GLfixed *m = (GLfixed *) 0;
1717
1718 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001719 _exception = 1;
1720 _exceptionType = "java/lang/IllegalArgumentException";
1721 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001722 goto exit;
1723 }
1724 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001725 _exception = 1;
1726 _exceptionType = "java/lang/IllegalArgumentException";
1727 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001728 goto exit;
1729 }
1730 _remaining = _env->GetArrayLength(m_ref) - offset;
1731 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001732 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001733 m = m_base + offset;
1734
1735 glLoadMatrixxOES(
1736 (GLfixed *)m
1737 );
1738
1739exit:
1740 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001741 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001742 JNI_ABORT);
1743 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001744 if (_exception) {
1745 jniThrowException(_env, _exceptionType, _exceptionMessage);
1746 }
Jack Palevich27f80022009-04-15 19:13:17 -07001747}
1748
1749/* void glLoadMatrixxOES ( const GLfixed *m ) */
1750static void
1751android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1752 (JNIEnv *_env, jobject _this, jobject m_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001753 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001754 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001755 jint _remaining;
1756 GLfixed *m = (GLfixed *) 0;
1757
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001758 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001759 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001760 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001761 m = (GLfixed *) (_mBase + _bufferOffset);
1762 }
Jack Palevicha3795852009-04-24 10:35:11 -07001763 glLoadMatrixxOES(
1764 (GLfixed *)m
1765 );
1766 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001767 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001768 }
Jack Palevich27f80022009-04-15 19:13:17 -07001769}
1770
1771/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1772static void
1773android_glMaterialxOES__III
1774 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001775 glMaterialxOES(
1776 (GLenum)face,
1777 (GLenum)pname,
1778 (GLfixed)param
1779 );
Jack Palevich27f80022009-04-15 19:13:17 -07001780}
1781
1782/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1783static void
1784android_glMaterialxvOES__II_3II
1785 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001786 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001787 const char * _exceptionType = NULL;
1788 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001789 GLfixed *params_base = (GLfixed *) 0;
1790 jint _remaining;
1791 GLfixed *params = (GLfixed *) 0;
1792
1793 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001794 _exception = 1;
1795 _exceptionType = "java/lang/IllegalArgumentException";
1796 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001797 goto exit;
1798 }
1799 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001800 _exception = 1;
1801 _exceptionType = "java/lang/IllegalArgumentException";
1802 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001803 goto exit;
1804 }
1805 _remaining = _env->GetArrayLength(params_ref) - offset;
1806 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001807 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001808 params = params_base + offset;
1809
1810 glMaterialxvOES(
1811 (GLenum)face,
1812 (GLenum)pname,
1813 (GLfixed *)params
1814 );
1815
1816exit:
1817 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001818 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001819 JNI_ABORT);
1820 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001821 if (_exception) {
1822 jniThrowException(_env, _exceptionType, _exceptionMessage);
1823 }
Jack Palevich27f80022009-04-15 19:13:17 -07001824}
1825
1826/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1827static void
1828android_glMaterialxvOES__IILjava_nio_IntBuffer_2
1829 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001830 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001831 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001832 jint _remaining;
1833 GLfixed *params = (GLfixed *) 0;
1834
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001835 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001836 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001837 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001838 params = (GLfixed *) (_paramsBase + _bufferOffset);
1839 }
Jack Palevicha3795852009-04-24 10:35:11 -07001840 glMaterialxvOES(
1841 (GLenum)face,
1842 (GLenum)pname,
1843 (GLfixed *)params
1844 );
1845 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001846 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001847 }
Jack Palevich27f80022009-04-15 19:13:17 -07001848}
1849
1850/* void glMultMatrixxOES ( const GLfixed *m ) */
1851static void
1852android_glMultMatrixxOES___3II
1853 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001854 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001855 const char * _exceptionType = NULL;
1856 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001857 GLfixed *m_base = (GLfixed *) 0;
1858 jint _remaining;
1859 GLfixed *m = (GLfixed *) 0;
1860
1861 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001862 _exception = 1;
1863 _exceptionType = "java/lang/IllegalArgumentException";
1864 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001865 goto exit;
1866 }
1867 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001868 _exception = 1;
1869 _exceptionType = "java/lang/IllegalArgumentException";
1870 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001871 goto exit;
1872 }
1873 _remaining = _env->GetArrayLength(m_ref) - offset;
1874 m_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001875 _env->GetIntArrayElements(m_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001876 m = m_base + offset;
1877
1878 glMultMatrixxOES(
1879 (GLfixed *)m
1880 );
1881
1882exit:
1883 if (m_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001884 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001885 JNI_ABORT);
1886 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001887 if (_exception) {
1888 jniThrowException(_env, _exceptionType, _exceptionMessage);
1889 }
Jack Palevich27f80022009-04-15 19:13:17 -07001890}
1891
1892/* void glMultMatrixxOES ( const GLfixed *m ) */
1893static void
1894android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
1895 (JNIEnv *_env, jobject _this, jobject m_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001896 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001897 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001898 jint _remaining;
1899 GLfixed *m = (GLfixed *) 0;
1900
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001901 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001902 if (m == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001903 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001904 m = (GLfixed *) (_mBase + _bufferOffset);
1905 }
Jack Palevicha3795852009-04-24 10:35:11 -07001906 glMultMatrixxOES(
1907 (GLfixed *)m
1908 );
1909 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001910 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07001911 }
Jack Palevich27f80022009-04-15 19:13:17 -07001912}
1913
1914/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
1915static void
1916android_glMultiTexCoord4xOES__IIIII
1917 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07001918 glMultiTexCoord4xOES(
1919 (GLenum)target,
1920 (GLfixed)s,
1921 (GLfixed)t,
1922 (GLfixed)r,
1923 (GLfixed)q
1924 );
Jack Palevich27f80022009-04-15 19:13:17 -07001925}
1926
1927/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
1928static void
1929android_glNormal3xOES__III
1930 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07001931 glNormal3xOES(
1932 (GLfixed)nx,
1933 (GLfixed)ny,
1934 (GLfixed)nz
1935 );
Jack Palevich27f80022009-04-15 19:13:17 -07001936}
1937
1938/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1939static void
1940android_glOrthoxOES__IIIIII
1941 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001942 glOrthoxOES(
1943 (GLfixed)left,
1944 (GLfixed)right,
1945 (GLfixed)bottom,
1946 (GLfixed)top,
1947 (GLfixed)zNear,
1948 (GLfixed)zFar
1949 );
Jack Palevich27f80022009-04-15 19:13:17 -07001950}
1951
1952/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
1953static void
1954android_glPointParameterxOES__II
1955 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001956 glPointParameterxOES(
1957 (GLenum)pname,
1958 (GLfixed)param
1959 );
Jack Palevich27f80022009-04-15 19:13:17 -07001960}
1961
1962/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1963static void
1964android_glPointParameterxvOES__I_3II
1965 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001966 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001967 const char * _exceptionType = NULL;
1968 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001969 GLfixed *params_base = (GLfixed *) 0;
1970 jint _remaining;
1971 GLfixed *params = (GLfixed *) 0;
1972
1973 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001974 _exception = 1;
1975 _exceptionType = "java/lang/IllegalArgumentException";
1976 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001977 goto exit;
1978 }
1979 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001980 _exception = 1;
1981 _exceptionType = "java/lang/IllegalArgumentException";
1982 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001983 goto exit;
1984 }
1985 _remaining = _env->GetArrayLength(params_ref) - offset;
1986 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001987 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07001988 params = params_base + offset;
1989
1990 glPointParameterxvOES(
1991 (GLenum)pname,
1992 (GLfixed *)params
1993 );
1994
1995exit:
1996 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001997 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07001998 JNI_ABORT);
1999 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002000 if (_exception) {
2001 jniThrowException(_env, _exceptionType, _exceptionMessage);
2002 }
Jack Palevich27f80022009-04-15 19:13:17 -07002003}
2004
2005/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
2006static void
2007android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
2008 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002009 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002010 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002011 jint _remaining;
2012 GLfixed *params = (GLfixed *) 0;
2013
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002014 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002015 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002016 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002017 params = (GLfixed *) (_paramsBase + _bufferOffset);
2018 }
Jack Palevicha3795852009-04-24 10:35:11 -07002019 glPointParameterxvOES(
2020 (GLenum)pname,
2021 (GLfixed *)params
2022 );
2023 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002024 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002025 }
Jack Palevich27f80022009-04-15 19:13:17 -07002026}
2027
2028/* void glPointSizexOES ( GLfixed size ) */
2029static void
2030android_glPointSizexOES__I
2031 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07002032 glPointSizexOES(
2033 (GLfixed)size
2034 );
Jack Palevich27f80022009-04-15 19:13:17 -07002035}
2036
2037/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
2038static void
2039android_glPolygonOffsetxOES__II
2040 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07002041 glPolygonOffsetxOES(
2042 (GLfixed)factor,
2043 (GLfixed)units
2044 );
Jack Palevich27f80022009-04-15 19:13:17 -07002045}
2046
2047/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
2048static void
2049android_glRotatexOES__IIII
2050 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002051 glRotatexOES(
2052 (GLfixed)angle,
2053 (GLfixed)x,
2054 (GLfixed)y,
2055 (GLfixed)z
2056 );
Jack Palevich27f80022009-04-15 19:13:17 -07002057}
2058
2059/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
2060static void
2061android_glSampleCoveragexOES__IZ
2062 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07002063 glSampleCoveragexOES(
2064 (GLclampx)value,
2065 (GLboolean)invert
2066 );
Jack Palevich27f80022009-04-15 19:13:17 -07002067}
2068
2069/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2070static void
2071android_glScalexOES__III
2072 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002073 glScalexOES(
2074 (GLfixed)x,
2075 (GLfixed)y,
2076 (GLfixed)z
2077 );
Jack Palevich27f80022009-04-15 19:13:17 -07002078}
2079
2080/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
2081static void
2082android_glTexEnvxOES__III
2083 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002084 glTexEnvxOES(
2085 (GLenum)target,
2086 (GLenum)pname,
2087 (GLfixed)param
2088 );
Jack Palevich27f80022009-04-15 19:13:17 -07002089}
2090
2091/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2092static void
2093android_glTexEnvxvOES__II_3II
2094 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002095 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002096 const char * _exceptionType = NULL;
2097 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002098 GLfixed *params_base = (GLfixed *) 0;
2099 jint _remaining;
2100 GLfixed *params = (GLfixed *) 0;
2101
2102 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002103 _exception = 1;
2104 _exceptionType = "java/lang/IllegalArgumentException";
2105 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002106 goto exit;
2107 }
2108 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002109 _exception = 1;
2110 _exceptionType = "java/lang/IllegalArgumentException";
2111 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002112 goto exit;
2113 }
2114 _remaining = _env->GetArrayLength(params_ref) - offset;
2115 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002116 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002117 params = params_base + offset;
2118
2119 glTexEnvxvOES(
2120 (GLenum)target,
2121 (GLenum)pname,
2122 (GLfixed *)params
2123 );
2124
2125exit:
2126 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002127 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002128 JNI_ABORT);
2129 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002130 if (_exception) {
2131 jniThrowException(_env, _exceptionType, _exceptionMessage);
2132 }
Jack Palevich27f80022009-04-15 19:13:17 -07002133}
2134
2135/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2136static void
2137android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2138 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002139 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002140 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002141 jint _remaining;
2142 GLfixed *params = (GLfixed *) 0;
2143
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002144 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002145 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002146 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002147 params = (GLfixed *) (_paramsBase + _bufferOffset);
2148 }
Jack Palevicha3795852009-04-24 10:35:11 -07002149 glTexEnvxvOES(
2150 (GLenum)target,
2151 (GLenum)pname,
2152 (GLfixed *)params
2153 );
2154 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002155 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002156 }
Jack Palevich27f80022009-04-15 19:13:17 -07002157}
2158
2159/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2160static void
2161android_glTexParameterxOES__III
2162 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002163 glTexParameterxOES(
2164 (GLenum)target,
2165 (GLenum)pname,
2166 (GLfixed)param
2167 );
Jack Palevich27f80022009-04-15 19:13:17 -07002168}
2169
2170/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2171static void
2172android_glTexParameterxvOES__II_3II
2173 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002174 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002175 const char * _exceptionType = NULL;
2176 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002177 GLfixed *params_base = (GLfixed *) 0;
2178 jint _remaining;
2179 GLfixed *params = (GLfixed *) 0;
2180
2181 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002182 _exception = 1;
2183 _exceptionType = "java/lang/IllegalArgumentException";
2184 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002185 goto exit;
2186 }
2187 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002188 _exception = 1;
2189 _exceptionType = "java/lang/IllegalArgumentException";
2190 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002191 goto exit;
2192 }
2193 _remaining = _env->GetArrayLength(params_ref) - offset;
2194 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002195 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002196 params = params_base + offset;
2197
2198 glTexParameterxvOES(
2199 (GLenum)target,
2200 (GLenum)pname,
2201 (GLfixed *)params
2202 );
2203
2204exit:
2205 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002206 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07002207 JNI_ABORT);
2208 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002209 if (_exception) {
2210 jniThrowException(_env, _exceptionType, _exceptionMessage);
2211 }
Jack Palevich27f80022009-04-15 19:13:17 -07002212}
2213
2214/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2215static void
2216android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2217 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002218 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002219 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002220 jint _remaining;
2221 GLfixed *params = (GLfixed *) 0;
2222
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002223 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002224 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002225 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002226 params = (GLfixed *) (_paramsBase + _bufferOffset);
2227 }
Jack Palevicha3795852009-04-24 10:35:11 -07002228 glTexParameterxvOES(
2229 (GLenum)target,
2230 (GLenum)pname,
2231 (GLfixed *)params
2232 );
2233 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002234 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07002235 }
Jack Palevich27f80022009-04-15 19:13:17 -07002236}
2237
2238/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2239static void
2240android_glTranslatexOES__III
2241 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002242 glTranslatexOES(
2243 (GLfixed)x,
2244 (GLfixed)y,
2245 (GLfixed)z
2246 );
Jack Palevich27f80022009-04-15 19:13:17 -07002247}
2248
2249/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2250static jboolean
2251android_glIsRenderbufferOES__I
2252 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002253 GLboolean _returnValue;
2254 _returnValue = glIsRenderbufferOES(
2255 (GLuint)renderbuffer
2256 );
Andy McFaddencee51982013-04-25 16:08:31 -07002257 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002258}
2259
2260/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2261static void
2262android_glBindRenderbufferOES__II
2263 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002264 glBindRenderbufferOES(
2265 (GLenum)target,
2266 (GLuint)renderbuffer
2267 );
Jack Palevich27f80022009-04-15 19:13:17 -07002268}
2269
2270/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2271static void
2272android_glDeleteRenderbuffersOES__I_3II
2273 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002274 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002275 const char * _exceptionType = NULL;
2276 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002277 GLuint *renderbuffers_base = (GLuint *) 0;
2278 jint _remaining;
2279 GLuint *renderbuffers = (GLuint *) 0;
2280
2281 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002282 _exception = 1;
2283 _exceptionType = "java/lang/IllegalArgumentException";
2284 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002285 goto exit;
2286 }
2287 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002288 _exception = 1;
2289 _exceptionType = "java/lang/IllegalArgumentException";
2290 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002291 goto exit;
2292 }
2293 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2294 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002295 _exception = 1;
2296 _exceptionType = "java/lang/IllegalArgumentException";
2297 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002298 goto exit;
2299 }
2300 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002301 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002302 renderbuffers = renderbuffers_base + offset;
2303
2304 glDeleteRenderbuffersOES(
2305 (GLsizei)n,
2306 (GLuint *)renderbuffers
2307 );
2308
2309exit:
2310 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002311 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002312 JNI_ABORT);
2313 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002314 if (_exception) {
2315 jniThrowException(_env, _exceptionType, _exceptionMessage);
2316 }
Jack Palevich27f80022009-04-15 19:13:17 -07002317}
2318
2319/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2320static void
2321android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2322 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002323 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002324 const char * _exceptionType = NULL;
2325 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002326 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002327 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002328 jint _remaining;
2329 GLuint *renderbuffers = (GLuint *) 0;
2330
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002331 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002332 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002333 _exception = 1;
2334 _exceptionType = "java/lang/IllegalArgumentException";
2335 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002336 goto exit;
2337 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002338 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002339 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002340 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2341 }
Jack Palevich73108672011-03-28 14:49:12 -07002342 glDeleteRenderbuffersOES(
2343 (GLsizei)n,
2344 (GLuint *)renderbuffers
2345 );
2346
2347exit:
2348 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002349 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002350 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002351 if (_exception) {
2352 jniThrowException(_env, _exceptionType, _exceptionMessage);
2353 }
Jack Palevich27f80022009-04-15 19:13:17 -07002354}
2355
2356/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2357static void
2358android_glGenRenderbuffersOES__I_3II
2359 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002360 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002361 const char * _exceptionType = NULL;
2362 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002363 GLuint *renderbuffers_base = (GLuint *) 0;
2364 jint _remaining;
2365 GLuint *renderbuffers = (GLuint *) 0;
2366
2367 if (!renderbuffers_ref) {
2368 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002369 _exceptionType = "java/lang/IllegalArgumentException";
2370 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002371 goto exit;
2372 }
2373 if (offset < 0) {
2374 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002375 _exceptionType = "java/lang/IllegalArgumentException";
2376 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002377 goto exit;
2378 }
2379 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2380 if (_remaining < n) {
2381 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002382 _exceptionType = "java/lang/IllegalArgumentException";
2383 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002384 goto exit;
2385 }
2386 renderbuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002387 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002388 renderbuffers = renderbuffers_base + offset;
2389
2390 glGenRenderbuffersOES(
2391 (GLsizei)n,
2392 (GLuint *)renderbuffers
2393 );
2394
2395exit:
2396 if (renderbuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002397 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002398 _exception ? JNI_ABORT: 0);
2399 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002400 if (_exception) {
2401 jniThrowException(_env, _exceptionType, _exceptionMessage);
2402 }
Jack Palevich27f80022009-04-15 19:13:17 -07002403}
2404
2405/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2406static void
2407android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2408 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002409 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002410 const char * _exceptionType = NULL;
2411 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002412 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002413 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002414 jint _remaining;
2415 GLuint *renderbuffers = (GLuint *) 0;
2416
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002417 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002418 if (_remaining < n) {
2419 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002420 _exceptionType = "java/lang/IllegalArgumentException";
2421 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002422 goto exit;
2423 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002424 if (renderbuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002425 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002426 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2427 }
Jack Palevich73108672011-03-28 14:49:12 -07002428 glGenRenderbuffersOES(
2429 (GLsizei)n,
2430 (GLuint *)renderbuffers
2431 );
2432
2433exit:
2434 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002435 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002436 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002437 if (_exception) {
2438 jniThrowException(_env, _exceptionType, _exceptionMessage);
2439 }
Jack Palevich27f80022009-04-15 19:13:17 -07002440}
2441
2442/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2443static void
2444android_glRenderbufferStorageOES__IIII
2445 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002446 glRenderbufferStorageOES(
2447 (GLenum)target,
2448 (GLenum)internalformat,
2449 (GLsizei)width,
2450 (GLsizei)height
2451 );
Jack Palevich27f80022009-04-15 19:13:17 -07002452}
2453
2454/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2455static void
2456android_glGetRenderbufferParameterivOES__II_3II
2457 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002458 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002459 const char * _exceptionType = NULL;
2460 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002461 GLint *params_base = (GLint *) 0;
2462 jint _remaining;
2463 GLint *params = (GLint *) 0;
2464
2465 if (!params_ref) {
2466 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002467 _exceptionType = "java/lang/IllegalArgumentException";
2468 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002469 goto exit;
2470 }
2471 if (offset < 0) {
2472 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002473 _exceptionType = "java/lang/IllegalArgumentException";
2474 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002475 goto exit;
2476 }
2477 _remaining = _env->GetArrayLength(params_ref) - offset;
2478 if (_remaining < 1) {
2479 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002480 _exceptionType = "java/lang/IllegalArgumentException";
2481 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002482 goto exit;
2483 }
2484 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002485 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002486 params = params_base + offset;
2487
2488 glGetRenderbufferParameterivOES(
2489 (GLenum)target,
2490 (GLenum)pname,
2491 (GLint *)params
2492 );
2493
2494exit:
2495 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002496 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07002497 _exception ? JNI_ABORT: 0);
2498 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002499 if (_exception) {
2500 jniThrowException(_env, _exceptionType, _exceptionMessage);
2501 }
Jack Palevich27f80022009-04-15 19:13:17 -07002502}
2503
2504/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2505static void
2506android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2507 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002508 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002509 const char * _exceptionType = NULL;
2510 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002511 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002512 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002513 jint _remaining;
2514 GLint *params = (GLint *) 0;
2515
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002516 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002517 if (_remaining < 1) {
2518 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002519 _exceptionType = "java/lang/IllegalArgumentException";
2520 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002521 goto exit;
2522 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002523 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002524 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002525 params = (GLint *) (_paramsBase + _bufferOffset);
2526 }
Jack Palevich73108672011-03-28 14:49:12 -07002527 glGetRenderbufferParameterivOES(
2528 (GLenum)target,
2529 (GLenum)pname,
2530 (GLint *)params
2531 );
2532
2533exit:
2534 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002535 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002536 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002537 if (_exception) {
2538 jniThrowException(_env, _exceptionType, _exceptionMessage);
2539 }
Jack Palevich27f80022009-04-15 19:13:17 -07002540}
2541
2542/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2543static jboolean
2544android_glIsFramebufferOES__I
2545 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002546 GLboolean _returnValue;
2547 _returnValue = glIsFramebufferOES(
2548 (GLuint)framebuffer
2549 );
Andy McFaddencee51982013-04-25 16:08:31 -07002550 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002551}
2552
2553/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2554static void
2555android_glBindFramebufferOES__II
2556 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002557 glBindFramebufferOES(
2558 (GLenum)target,
2559 (GLuint)framebuffer
2560 );
Jack Palevich27f80022009-04-15 19:13:17 -07002561}
2562
2563/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2564static void
2565android_glDeleteFramebuffersOES__I_3II
2566 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002567 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002568 const char * _exceptionType = NULL;
2569 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002570 GLuint *framebuffers_base = (GLuint *) 0;
2571 jint _remaining;
2572 GLuint *framebuffers = (GLuint *) 0;
2573
2574 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002575 _exception = 1;
2576 _exceptionType = "java/lang/IllegalArgumentException";
2577 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002578 goto exit;
2579 }
2580 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002581 _exception = 1;
2582 _exceptionType = "java/lang/IllegalArgumentException";
2583 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002584 goto exit;
2585 }
2586 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2587 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002588 _exception = 1;
2589 _exceptionType = "java/lang/IllegalArgumentException";
2590 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002591 goto exit;
2592 }
2593 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002594 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002595 framebuffers = framebuffers_base + offset;
2596
2597 glDeleteFramebuffersOES(
2598 (GLsizei)n,
2599 (GLuint *)framebuffers
2600 );
2601
2602exit:
2603 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002604 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002605 JNI_ABORT);
2606 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002607 if (_exception) {
2608 jniThrowException(_env, _exceptionType, _exceptionMessage);
2609 }
Jack Palevich27f80022009-04-15 19:13:17 -07002610}
2611
2612/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2613static void
2614android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2615 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002616 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002617 const char * _exceptionType = NULL;
2618 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002619 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002620 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002621 jint _remaining;
2622 GLuint *framebuffers = (GLuint *) 0;
2623
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002624 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002625 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002626 _exception = 1;
2627 _exceptionType = "java/lang/IllegalArgumentException";
2628 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002629 goto exit;
2630 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002631 if (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002632 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002633 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2634 }
Jack Palevich73108672011-03-28 14:49:12 -07002635 glDeleteFramebuffersOES(
2636 (GLsizei)n,
2637 (GLuint *)framebuffers
2638 );
2639
2640exit:
2641 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002642 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, JNI_ABORT);
Jack Palevich73108672011-03-28 14:49:12 -07002643 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002644 if (_exception) {
2645 jniThrowException(_env, _exceptionType, _exceptionMessage);
2646 }
Jack Palevich27f80022009-04-15 19:13:17 -07002647}
2648
2649/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2650static void
2651android_glGenFramebuffersOES__I_3II
2652 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002653 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002654 const char * _exceptionType = NULL;
2655 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002656 GLuint *framebuffers_base = (GLuint *) 0;
2657 jint _remaining;
2658 GLuint *framebuffers = (GLuint *) 0;
2659
2660 if (!framebuffers_ref) {
2661 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002662 _exceptionType = "java/lang/IllegalArgumentException";
2663 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002664 goto exit;
2665 }
2666 if (offset < 0) {
2667 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002668 _exceptionType = "java/lang/IllegalArgumentException";
2669 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002670 goto exit;
2671 }
2672 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2673 if (_remaining < n) {
2674 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002675 _exceptionType = "java/lang/IllegalArgumentException";
2676 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002677 goto exit;
2678 }
2679 framebuffers_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002680 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002681 framebuffers = framebuffers_base + offset;
2682
2683 glGenFramebuffersOES(
2684 (GLsizei)n,
2685 (GLuint *)framebuffers
2686 );
2687
2688exit:
2689 if (framebuffers_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002690 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
Jack Palevich73108672011-03-28 14:49:12 -07002691 _exception ? JNI_ABORT: 0);
2692 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002693 if (_exception) {
2694 jniThrowException(_env, _exceptionType, _exceptionMessage);
2695 }
Jack Palevich27f80022009-04-15 19:13:17 -07002696}
2697
2698/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2699static void
2700android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
2701 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002702 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002703 const char * _exceptionType = NULL;
2704 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002705 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002706 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002707 jint _remaining;
2708 GLuint *framebuffers = (GLuint *) 0;
2709
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002710 framebuffers = (GLuint *)getPointer(_env, framebuffers_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 (framebuffers == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002718 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002719 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2720 }
Jack Palevich73108672011-03-28 14:49:12 -07002721 glGenFramebuffersOES(
2722 (GLsizei)n,
2723 (GLuint *)framebuffers
2724 );
2725
2726exit:
2727 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002728 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _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/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
2736static jint
2737android_glCheckFramebufferStatusOES__I
2738 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002739 GLenum _returnValue;
2740 _returnValue = glCheckFramebufferStatusOES(
2741 (GLenum)target
2742 );
Andy McFaddencee51982013-04-25 16:08:31 -07002743 return (jint)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002744}
2745
2746/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
2747static void
2748android_glFramebufferRenderbufferOES__IIII
2749 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002750 glFramebufferRenderbufferOES(
2751 (GLenum)target,
2752 (GLenum)attachment,
2753 (GLenum)renderbuffertarget,
2754 (GLuint)renderbuffer
2755 );
Jack Palevich27f80022009-04-15 19:13:17 -07002756}
2757
2758/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
2759static void
2760android_glFramebufferTexture2DOES__IIIII
2761 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07002762 glFramebufferTexture2DOES(
2763 (GLenum)target,
2764 (GLenum)attachment,
2765 (GLenum)textarget,
2766 (GLuint)texture,
2767 (GLint)level
2768 );
Jack Palevich27f80022009-04-15 19:13:17 -07002769}
2770
2771/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2772static void
2773android_glGetFramebufferAttachmentParameterivOES__III_3II
2774 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002775 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002776 const char * _exceptionType = NULL;
2777 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002778 GLint *params_base = (GLint *) 0;
2779 jint _remaining;
2780 GLint *params = (GLint *) 0;
2781
2782 if (!params_ref) {
2783 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002784 _exceptionType = "java/lang/IllegalArgumentException";
2785 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002786 goto exit;
2787 }
2788 if (offset < 0) {
2789 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002790 _exceptionType = "java/lang/IllegalArgumentException";
2791 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002792 goto exit;
2793 }
2794 _remaining = _env->GetArrayLength(params_ref) - offset;
2795 if (_remaining < 1) {
2796 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002797 _exceptionType = "java/lang/IllegalArgumentException";
2798 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002799 goto exit;
2800 }
2801 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002802 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevich73108672011-03-28 14:49:12 -07002803 params = params_base + offset;
2804
2805 glGetFramebufferAttachmentParameterivOES(
2806 (GLenum)target,
2807 (GLenum)attachment,
2808 (GLenum)pname,
2809 (GLint *)params
2810 );
2811
2812exit:
2813 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002814 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevich73108672011-03-28 14:49:12 -07002815 _exception ? JNI_ABORT: 0);
2816 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002817 if (_exception) {
2818 jniThrowException(_env, _exceptionType, _exceptionMessage);
2819 }
Jack Palevich27f80022009-04-15 19:13:17 -07002820}
2821
2822/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2823static void
2824android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
2825 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002826 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002827 const char * _exceptionType = NULL;
2828 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002829 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002830 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002831 jint _remaining;
2832 GLint *params = (GLint *) 0;
2833
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002834 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002835 if (_remaining < 1) {
2836 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002837 _exceptionType = "java/lang/IllegalArgumentException";
2838 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002839 goto exit;
2840 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002841 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002842 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002843 params = (GLint *) (_paramsBase + _bufferOffset);
2844 }
Jack Palevich73108672011-03-28 14:49:12 -07002845 glGetFramebufferAttachmentParameterivOES(
2846 (GLenum)target,
2847 (GLenum)attachment,
2848 (GLenum)pname,
2849 (GLint *)params
2850 );
2851
2852exit:
2853 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002854 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
Jack Palevich73108672011-03-28 14:49:12 -07002855 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002856 if (_exception) {
2857 jniThrowException(_env, _exceptionType, _exceptionMessage);
2858 }
Jack Palevich27f80022009-04-15 19:13:17 -07002859}
2860
2861/* void glGenerateMipmapOES ( GLenum target ) */
2862static void
2863android_glGenerateMipmapOES__I
2864 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002865 glGenerateMipmapOES(
2866 (GLenum)target
2867 );
Jack Palevich27f80022009-04-15 19:13:17 -07002868}
2869
2870/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
2871static void
2872android_glCurrentPaletteMatrixOES__I
2873 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002874 glCurrentPaletteMatrixOES(
2875 (GLuint)matrixpaletteindex
2876 );
Jack Palevich27f80022009-04-15 19:13:17 -07002877}
2878
2879/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
2880static void
2881android_glLoadPaletteFromModelViewMatrixOES__
2882 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002883 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07002884}
2885
2886/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2887static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002888android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
2889 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2890 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002891 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002892 jint _remaining;
2893 GLvoid *pointer = (GLvoid *) 0;
2894
2895 if (pointer_buf) {
2896 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2897 if ( ! pointer ) {
2898 return;
2899 }
2900 }
2901 glMatrixIndexPointerOESBounds(
2902 (GLint)size,
2903 (GLenum)type,
2904 (GLsizei)stride,
2905 (GLvoid *)pointer,
2906 (GLsizei)remaining
2907 );
Jack Palevich27f80022009-04-15 19:13:17 -07002908}
2909
2910/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2911static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002912android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
2913 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2914 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002915 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002916 jint _remaining;
2917 GLvoid *pointer = (GLvoid *) 0;
2918
2919 if (pointer_buf) {
2920 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2921 if ( ! pointer ) {
2922 return;
2923 }
2924 }
2925 glWeightPointerOESBounds(
2926 (GLint)size,
2927 (GLenum)type,
2928 (GLsizei)stride,
2929 (GLvoid *)pointer,
2930 (GLsizei)remaining
2931 );
Jack Palevich27f80022009-04-15 19:13:17 -07002932}
2933
2934/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
2935static void
2936android_glDepthRangefOES__FF
2937 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002938 glDepthRangefOES(
2939 (GLclampf)zNear,
2940 (GLclampf)zFar
2941 );
Jack Palevich27f80022009-04-15 19:13:17 -07002942}
2943
2944/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2945static void
2946android_glFrustumfOES__FFFFFF
2947 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002948 glFrustumfOES(
2949 (GLfloat)left,
2950 (GLfloat)right,
2951 (GLfloat)bottom,
2952 (GLfloat)top,
2953 (GLfloat)zNear,
2954 (GLfloat)zFar
2955 );
Jack Palevich27f80022009-04-15 19:13:17 -07002956}
2957
2958/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2959static void
2960android_glOrthofOES__FFFFFF
2961 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002962 glOrthofOES(
2963 (GLfloat)left,
2964 (GLfloat)right,
2965 (GLfloat)bottom,
2966 (GLfloat)top,
2967 (GLfloat)zNear,
2968 (GLfloat)zFar
2969 );
Jack Palevich27f80022009-04-15 19:13:17 -07002970}
2971
2972/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2973static void
2974android_glClipPlanefOES__I_3FI
2975 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002976 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002977 const char * _exceptionType = NULL;
2978 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002979 GLfloat *equation_base = (GLfloat *) 0;
2980 jint _remaining;
2981 GLfloat *equation = (GLfloat *) 0;
2982
2983 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002984 _exception = 1;
2985 _exceptionType = "java/lang/IllegalArgumentException";
2986 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002987 goto exit;
2988 }
2989 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002990 _exception = 1;
2991 _exceptionType = "java/lang/IllegalArgumentException";
2992 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002993 goto exit;
2994 }
2995 _remaining = _env->GetArrayLength(equation_ref) - offset;
2996 equation_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002997 _env->GetFloatArrayElements(equation_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07002998 equation = equation_base + offset;
2999
3000 glClipPlanefOES(
3001 (GLenum)plane,
3002 (GLfloat *)equation
3003 );
3004
3005exit:
3006 if (equation_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003007 _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003008 JNI_ABORT);
3009 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003010 if (_exception) {
3011 jniThrowException(_env, _exceptionType, _exceptionMessage);
3012 }
Jack Palevich27f80022009-04-15 19:13:17 -07003013}
3014
3015/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
3016static void
3017android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
3018 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003019 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003020 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003021 jint _remaining;
3022 GLfloat *equation = (GLfloat *) 0;
3023
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003024 equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003025 if (equation == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003026 char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003027 equation = (GLfloat *) (_equationBase + _bufferOffset);
3028 }
Jack Palevicha3795852009-04-24 10:35:11 -07003029 glClipPlanefOES(
3030 (GLenum)plane,
3031 (GLfloat *)equation
3032 );
3033 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003034 _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003035 }
Jack Palevich27f80022009-04-15 19:13:17 -07003036}
3037
3038/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3039static void
3040android_glGetClipPlanefOES__I_3FI
3041 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003042 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003043 const char * _exceptionType = NULL;
3044 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003045 GLfloat *eqn_base = (GLfloat *) 0;
3046 jint _remaining;
3047 GLfloat *eqn = (GLfloat *) 0;
3048
3049 if (!eqn_ref) {
3050 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003051 _exceptionType = "java/lang/IllegalArgumentException";
3052 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003053 goto exit;
3054 }
3055 if (offset < 0) {
3056 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003057 _exceptionType = "java/lang/IllegalArgumentException";
3058 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003059 goto exit;
3060 }
3061 _remaining = _env->GetArrayLength(eqn_ref) - offset;
3062 if (_remaining < 4) {
3063 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003064 _exceptionType = "java/lang/IllegalArgumentException";
3065 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003066 goto exit;
3067 }
3068 eqn_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003069 _env->GetFloatArrayElements(eqn_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003070 eqn = eqn_base + offset;
3071
3072 glGetClipPlanefOES(
3073 (GLenum)pname,
3074 (GLfloat *)eqn
3075 );
3076
3077exit:
3078 if (eqn_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003079 _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003080 _exception ? JNI_ABORT: 0);
3081 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003082 if (_exception) {
3083 jniThrowException(_env, _exceptionType, _exceptionMessage);
3084 }
Jack Palevich27f80022009-04-15 19:13:17 -07003085}
3086
3087/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
3088static void
3089android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
3090 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003091 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003092 const char * _exceptionType = NULL;
3093 const char * _exceptionMessage = NULL;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003094 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003095 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003096 jint _remaining;
3097 GLfloat *eqn = (GLfloat *) 0;
3098
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003099 eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07003100 if (_remaining < 4) {
3101 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003102 _exceptionType = "java/lang/IllegalArgumentException";
3103 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07003104 goto exit;
3105 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003106 if (eqn == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003107 char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003108 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
3109 }
Jack Palevicha3795852009-04-24 10:35:11 -07003110 glGetClipPlanefOES(
3111 (GLenum)pname,
3112 (GLfloat *)eqn
3113 );
3114
3115exit:
3116 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003117 _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0);
Jack Palevicha3795852009-04-24 10:35:11 -07003118 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003119 if (_exception) {
3120 jniThrowException(_env, _exceptionType, _exceptionMessage);
3121 }
Jack Palevich27f80022009-04-15 19:13:17 -07003122}
3123
3124/* void glClearDepthfOES ( GLclampf depth ) */
3125static void
3126android_glClearDepthfOES__F
3127 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07003128 glClearDepthfOES(
3129 (GLclampf)depth
3130 );
Jack Palevich27f80022009-04-15 19:13:17 -07003131}
3132
3133/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3134static void
3135android_glTexGenfOES__IIF
3136 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003137 glTexGenfOES(
3138 (GLenum)coord,
3139 (GLenum)pname,
3140 (GLfloat)param
3141 );
Jack Palevich27f80022009-04-15 19:13:17 -07003142}
3143
3144/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3145static void
3146android_glTexGenfvOES__II_3FI
3147 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003148 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003149 const char * _exceptionType = NULL;
3150 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003151 GLfloat *params_base = (GLfloat *) 0;
3152 jint _remaining;
3153 GLfloat *params = (GLfloat *) 0;
3154
3155 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003156 _exception = 1;
3157 _exceptionType = "java/lang/IllegalArgumentException";
3158 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003159 goto exit;
3160 }
3161 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003162 _exception = 1;
3163 _exceptionType = "java/lang/IllegalArgumentException";
3164 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003165 goto exit;
3166 }
3167 _remaining = _env->GetArrayLength(params_ref) - offset;
3168 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003169 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003170 params = params_base + offset;
3171
3172 glTexGenfvOES(
3173 (GLenum)coord,
3174 (GLenum)pname,
3175 (GLfloat *)params
3176 );
3177
3178exit:
3179 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003180 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003181 JNI_ABORT);
3182 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003183 if (_exception) {
3184 jniThrowException(_env, _exceptionType, _exceptionMessage);
3185 }
Jack Palevich27f80022009-04-15 19:13:17 -07003186}
3187
3188/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3189static void
3190android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3191 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003192 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003193 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003194 jint _remaining;
3195 GLfloat *params = (GLfloat *) 0;
3196
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003197 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003198 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003199 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003200 params = (GLfloat *) (_paramsBase + _bufferOffset);
3201 }
Jack Palevicha3795852009-04-24 10:35:11 -07003202 glTexGenfvOES(
3203 (GLenum)coord,
3204 (GLenum)pname,
3205 (GLfloat *)params
3206 );
3207 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003208 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003209 }
Jack Palevich27f80022009-04-15 19:13:17 -07003210}
3211
3212/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3213static void
3214android_glTexGeniOES__III
3215 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003216 glTexGeniOES(
3217 (GLenum)coord,
3218 (GLenum)pname,
3219 (GLint)param
3220 );
Jack Palevich27f80022009-04-15 19:13:17 -07003221}
3222
3223/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3224static void
3225android_glTexGenivOES__II_3II
3226 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003227 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003228 const char * _exceptionType = NULL;
3229 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003230 GLint *params_base = (GLint *) 0;
3231 jint _remaining;
3232 GLint *params = (GLint *) 0;
3233
3234 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003235 _exception = 1;
3236 _exceptionType = "java/lang/IllegalArgumentException";
3237 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003238 goto exit;
3239 }
3240 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003241 _exception = 1;
3242 _exceptionType = "java/lang/IllegalArgumentException";
3243 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003244 goto exit;
3245 }
3246 _remaining = _env->GetArrayLength(params_ref) - offset;
3247 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003248 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003249 params = params_base + offset;
3250
3251 glTexGenivOES(
3252 (GLenum)coord,
3253 (GLenum)pname,
3254 (GLint *)params
3255 );
3256
3257exit:
3258 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003259 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003260 JNI_ABORT);
3261 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003262 if (_exception) {
3263 jniThrowException(_env, _exceptionType, _exceptionMessage);
3264 }
Jack Palevich27f80022009-04-15 19:13:17 -07003265}
3266
3267/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3268static void
3269android_glTexGenivOES__IILjava_nio_IntBuffer_2
3270 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003271 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003272 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003273 jint _remaining;
3274 GLint *params = (GLint *) 0;
3275
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003276 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003277 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003278 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003279 params = (GLint *) (_paramsBase + _bufferOffset);
3280 }
Jack Palevicha3795852009-04-24 10:35:11 -07003281 glTexGenivOES(
3282 (GLenum)coord,
3283 (GLenum)pname,
3284 (GLint *)params
3285 );
3286 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003287 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003288 }
Jack Palevich27f80022009-04-15 19:13:17 -07003289}
3290
3291/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3292static void
3293android_glTexGenxOES__III
3294 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003295 glTexGenxOES(
3296 (GLenum)coord,
3297 (GLenum)pname,
3298 (GLfixed)param
3299 );
Jack Palevich27f80022009-04-15 19:13:17 -07003300}
3301
3302/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3303static void
3304android_glTexGenxvOES__II_3II
3305 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003306 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003307 const char * _exceptionType = NULL;
3308 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003309 GLfixed *params_base = (GLfixed *) 0;
3310 jint _remaining;
3311 GLfixed *params = (GLfixed *) 0;
3312
3313 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003314 _exception = 1;
3315 _exceptionType = "java/lang/IllegalArgumentException";
3316 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003317 goto exit;
3318 }
3319 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003320 _exception = 1;
3321 _exceptionType = "java/lang/IllegalArgumentException";
3322 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003323 goto exit;
3324 }
3325 _remaining = _env->GetArrayLength(params_ref) - offset;
3326 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003327 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003328 params = params_base + offset;
3329
3330 glTexGenxvOES(
3331 (GLenum)coord,
3332 (GLenum)pname,
3333 (GLfixed *)params
3334 );
3335
3336exit:
3337 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003338 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003339 JNI_ABORT);
3340 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003341 if (_exception) {
3342 jniThrowException(_env, _exceptionType, _exceptionMessage);
3343 }
Jack Palevich27f80022009-04-15 19:13:17 -07003344}
3345
3346/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3347static void
3348android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3349 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003350 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003351 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003352 jint _remaining;
3353 GLfixed *params = (GLfixed *) 0;
3354
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003355 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003356 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003357 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003358 params = (GLfixed *) (_paramsBase + _bufferOffset);
3359 }
Jack Palevicha3795852009-04-24 10:35:11 -07003360 glTexGenxvOES(
3361 (GLenum)coord,
3362 (GLenum)pname,
3363 (GLfixed *)params
3364 );
3365 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003366 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
Jack Palevicha3795852009-04-24 10:35:11 -07003367 }
Jack Palevich27f80022009-04-15 19:13:17 -07003368}
3369
3370/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3371static void
3372android_glGetTexGenfvOES__II_3FI
3373 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003374 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003375 const char * _exceptionType = NULL;
3376 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003377 GLfloat *params_base = (GLfloat *) 0;
3378 jint _remaining;
3379 GLfloat *params = (GLfloat *) 0;
3380
3381 if (!params_ref) {
3382 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003383 _exceptionType = "java/lang/IllegalArgumentException";
3384 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003385 goto exit;
3386 }
3387 if (offset < 0) {
3388 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003389 _exceptionType = "java/lang/IllegalArgumentException";
3390 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003391 goto exit;
3392 }
3393 _remaining = _env->GetArrayLength(params_ref) - offset;
3394 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003395 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003396 params = params_base + offset;
3397
3398 glGetTexGenfvOES(
3399 (GLenum)coord,
3400 (GLenum)pname,
3401 (GLfloat *)params
3402 );
3403
3404exit:
3405 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003406 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003407 _exception ? JNI_ABORT: 0);
3408 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003409 if (_exception) {
3410 jniThrowException(_env, _exceptionType, _exceptionMessage);
3411 }
Jack Palevich27f80022009-04-15 19:13:17 -07003412}
3413
3414/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3415static void
3416android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3417 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003418 jfloatArray _array = (jfloatArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003419 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003420 jint _remaining;
3421 GLfloat *params = (GLfloat *) 0;
3422
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003423 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003424 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003425 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003426 params = (GLfloat *) (_paramsBase + _bufferOffset);
3427 }
Jack Palevicha3795852009-04-24 10:35:11 -07003428 glGetTexGenfvOES(
3429 (GLenum)coord,
3430 (GLenum)pname,
3431 (GLfloat *)params
3432 );
3433 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003434 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07003435 }
Jack Palevich27f80022009-04-15 19:13:17 -07003436}
3437
3438/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3439static void
3440android_glGetTexGenivOES__II_3II
3441 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003442 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003443 const char * _exceptionType = NULL;
3444 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003445 GLint *params_base = (GLint *) 0;
3446 jint _remaining;
3447 GLint *params = (GLint *) 0;
3448
3449 if (!params_ref) {
3450 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003451 _exceptionType = "java/lang/IllegalArgumentException";
3452 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003453 goto exit;
3454 }
3455 if (offset < 0) {
3456 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003457 _exceptionType = "java/lang/IllegalArgumentException";
3458 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003459 goto exit;
3460 }
3461 _remaining = _env->GetArrayLength(params_ref) - offset;
3462 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003463 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003464 params = params_base + offset;
3465
3466 glGetTexGenivOES(
3467 (GLenum)coord,
3468 (GLenum)pname,
3469 (GLint *)params
3470 );
3471
3472exit:
3473 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003474 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003475 _exception ? JNI_ABORT: 0);
3476 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003477 if (_exception) {
3478 jniThrowException(_env, _exceptionType, _exceptionMessage);
3479 }
Jack Palevich27f80022009-04-15 19:13:17 -07003480}
3481
3482/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3483static void
3484android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3485 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003486 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003487 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003488 jint _remaining;
3489 GLint *params = (GLint *) 0;
3490
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003491 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003492 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003493 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003494 params = (GLint *) (_paramsBase + _bufferOffset);
3495 }
Jack Palevicha3795852009-04-24 10:35:11 -07003496 glGetTexGenivOES(
3497 (GLenum)coord,
3498 (GLenum)pname,
3499 (GLint *)params
3500 );
3501 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003502 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07003503 }
Jack Palevich27f80022009-04-15 19:13:17 -07003504}
3505
3506/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3507static void
3508android_glGetTexGenxvOES__II_3II
3509 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003510 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003511 const char * _exceptionType = NULL;
3512 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003513 GLfixed *params_base = (GLfixed *) 0;
3514 jint _remaining;
3515 GLfixed *params = (GLfixed *) 0;
3516
3517 if (!params_ref) {
3518 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003519 _exceptionType = "java/lang/IllegalArgumentException";
3520 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003521 goto exit;
3522 }
3523 if (offset < 0) {
3524 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003525 _exceptionType = "java/lang/IllegalArgumentException";
3526 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003527 goto exit;
3528 }
3529 _remaining = _env->GetArrayLength(params_ref) - offset;
3530 params_base = (GLfixed *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003531 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jack Palevicha3795852009-04-24 10:35:11 -07003532 params = params_base + offset;
3533
3534 glGetTexGenxvOES(
3535 (GLenum)coord,
3536 (GLenum)pname,
3537 (GLfixed *)params
3538 );
3539
3540exit:
3541 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003542 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jack Palevicha3795852009-04-24 10:35:11 -07003543 _exception ? JNI_ABORT: 0);
3544 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003545 if (_exception) {
3546 jniThrowException(_env, _exceptionType, _exceptionMessage);
3547 }
Jack Palevich27f80022009-04-15 19:13:17 -07003548}
3549
3550/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3551static void
3552android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3553 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003554 jintArray _array = (jintArray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003555 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003556 jint _remaining;
3557 GLfixed *params = (GLfixed *) 0;
3558
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003559 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003560 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003561 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003562 params = (GLfixed *) (_paramsBase + _bufferOffset);
3563 }
Jack Palevicha3795852009-04-24 10:35:11 -07003564 glGetTexGenxvOES(
3565 (GLenum)coord,
3566 (GLenum)pname,
3567 (GLfixed *)params
3568 );
3569 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003570 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jack Palevicha3795852009-04-24 10:35:11 -07003571 }
Jack Palevich27f80022009-04-15 19:13:17 -07003572}
3573
3574static const char *classPathName = "android/opengl/GLES11Ext";
3575
Daniel Micay76f6a862015-09-19 17:31:01 -04003576static const JNINativeMethod methods[] = {
Jack Palevich27f80022009-04-15 19:13:17 -07003577{"_nativeClassInit", "()V", (void*)nativeClassInit },
3578{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
3579{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
3580{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
3581{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
3582{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
3583{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
3584{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
3585{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
3586{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
3587{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
3588{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
3589{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
3590{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
3591{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
3592{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
3593{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
3594{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
3595{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
3596{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
3597{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
3598{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
3599{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
3600{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
3601{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
3602{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
3603{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
3604{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
3605{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
3606{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
3607{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
3608{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
3609{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
3610{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
3611{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
3612{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
3613{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
3614{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
3615{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3616{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
3617{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3618{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
3619{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
3620{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
3621{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
3622{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
3623{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
3624{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
3625{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
3626{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
3627{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
3628{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
3629{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
3630{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
3631{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
3632{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
3633{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
3634{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
3635{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
3636{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
3637{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
3638{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
3639{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
3640{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
3641{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
3642{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
3643{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
3644{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
3645{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3646{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
3647{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
3648{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3649{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
3650{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
3651{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
3652{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
3653{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3654{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
3655{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3656{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
3657{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
3658{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
3659{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
3660{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
3661{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
3662{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
3663{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
3664{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
3665{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
3666{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
3667{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
3668{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
3669{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
3670{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
3671{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
3672{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08003673{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
3674{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07003675{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
3676{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
3677{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
3678{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
3679{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3680{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
3681{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3682{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
3683{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
3684{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
3685{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3686{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
3687{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
3688{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
3689{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
3690{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
3691{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
3692{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
3693{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3694{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
3695{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
3696{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
3697{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
3698};
3699
3700int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
3701{
3702 int err;
3703 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3704 return err;
3705}