blob: 073bbb26f555a094fb8b126215ddd5a49770173d [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
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070020#include "jni.h"
21#include "JNIHelp.h"
Jack Palevich27f80022009-04-15 19:13:17 -070022#include <android_runtime/AndroidRuntime.h>
23#include <utils/misc.h>
24
25#include <assert.h>
26#include <GLES/gl.h>
Jack Palevichbe509c92009-05-07 09:52:14 -070027#include <GLES/glext.h>
Jack Palevich27f80022009-04-15 19:13:17 -070028
Jack Palevichbe6eac82009-12-08 15:43:51 +080029/* special calls implemented in Android's GLES wrapper used to more
30 * efficiently bound-check passed arrays */
31extern "C" {
32GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, GLsizei stride,
33 const GLvoid *ptr, GLsizei count);
34GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, GLsizei stride,
35 const GLvoid *ptr, GLsizei count);
36}
37
Jack Palevich27f80022009-04-15 19:13:17 -070038static int initialized = 0;
39
40static jclass nioAccessClass;
41static jclass bufferClass;
Jack Palevich27f80022009-04-15 19:13:17 -070042static jmethodID getBasePointerID;
43static jmethodID getBaseArrayID;
44static jmethodID getBaseArrayOffsetID;
45static jfieldID positionID;
46static jfieldID limitID;
47static jfieldID elementSizeShiftID;
48
49/* Cache method IDs each time the class is loaded. */
50
51static void
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070052nativeClassInit(JNIEnv *_env, jclass glImplClass)
Jack Palevich27f80022009-04-15 19:13:17 -070053{
54 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
55 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
56
57 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
58 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
59
60 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
61 "getBasePointer", "(Ljava/nio/Buffer;)J");
62 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
63 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
64 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
65 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
66
67 positionID = _env->GetFieldID(bufferClass, "position", "I");
68 limitID = _env->GetFieldID(bufferClass, "limit", "I");
69 elementSizeShiftID =
70 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
71}
72
73
Jack Palevich27f80022009-04-15 19:13:17 -070074static void *
Thomas Tafertshofer17045a12012-07-12 13:55:55 -070075getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
Jack Palevich27f80022009-04-15 19:13:17 -070076{
77 jint position;
78 jint limit;
79 jint elementSizeShift;
80 jlong pointer;
Jack Palevich27f80022009-04-15 19:13:17 -070081
82 position = _env->GetIntField(buffer, positionID);
83 limit = _env->GetIntField(buffer, limitID);
84 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
85 *remaining = (limit - position) << elementSizeShift;
86 pointer = _env->CallStaticLongMethod(nioAccessClass,
87 getBasePointerID, buffer);
88 if (pointer != 0L) {
89 *array = NULL;
90 return (void *) (jint) pointer;
91 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070092
Jack Palevich27f80022009-04-15 19:13:17 -070093 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
94 getBaseArrayID, buffer);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -070095 *offset = _env->CallStaticIntMethod(nioAccessClass,
Jack Palevich27f80022009-04-15 19:13:17 -070096 getBaseArrayOffsetID, buffer);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -070097 return NULL;
Jack Palevich27f80022009-04-15 19:13:17 -070098}
99
100
101static void
102releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
103{
104 _env->ReleasePrimitiveArrayCritical(array, data,
105 commit ? 0 : JNI_ABORT);
106}
107
Jack Palevichbe6eac82009-12-08 15:43:51 +0800108static void *
109getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
110 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
111 if (buf) {
112 jint position = _env->GetIntField(buffer, positionID);
113 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
114 buf += position << elementSizeShift;
115 } else {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700116 jniThrowException(_env, "java/lang/IllegalArgumentException",
117 "Must use a native order direct Buffer");
Jack Palevichbe6eac82009-12-08 15:43:51 +0800118 }
119 return (void*) buf;
120}
Jack Palevich27f80022009-04-15 19:13:17 -0700121// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700122/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
123static void
124android_glBlendEquationSeparateOES__II
125 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700126 glBlendEquationSeparateOES(
127 (GLenum)modeRGB,
128 (GLenum)modeAlpha
129 );
Jack Palevich27f80022009-04-15 19:13:17 -0700130}
131
132/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
133static void
134android_glBlendFuncSeparateOES__IIII
135 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700136 glBlendFuncSeparateOES(
137 (GLenum)srcRGB,
138 (GLenum)dstRGB,
139 (GLenum)srcAlpha,
140 (GLenum)dstAlpha
141 );
Jack Palevich27f80022009-04-15 19:13:17 -0700142}
143
144/* void glBlendEquationOES ( GLenum mode ) */
145static void
146android_glBlendEquationOES__I
147 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700148 glBlendEquationOES(
149 (GLenum)mode
150 );
Jack Palevich27f80022009-04-15 19:13:17 -0700151}
152
153/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
154static void
155android_glDrawTexsOES__SSSSS
156 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
157 glDrawTexsOES(
158 (GLshort)x,
159 (GLshort)y,
160 (GLshort)z,
161 (GLshort)width,
162 (GLshort)height
163 );
164}
165
166/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
167static void
168android_glDrawTexiOES__IIIII
169 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
170 glDrawTexiOES(
171 (GLint)x,
172 (GLint)y,
173 (GLint)z,
174 (GLint)width,
175 (GLint)height
176 );
177}
178
179/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
180static void
181android_glDrawTexxOES__IIIII
182 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
183 glDrawTexxOES(
184 (GLfixed)x,
185 (GLfixed)y,
186 (GLfixed)z,
187 (GLfixed)width,
188 (GLfixed)height
189 );
190}
191
192/* void glDrawTexsvOES ( const GLshort *coords ) */
193static void
194android_glDrawTexsvOES___3SI
195 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700196 jint _exception = 0;
197 const char * _exceptionType;
198 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700199 GLshort *coords_base = (GLshort *) 0;
200 jint _remaining;
201 GLshort *coords = (GLshort *) 0;
202
203 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700204 _exception = 1;
205 _exceptionType = "java/lang/IllegalArgumentException";
206 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700207 goto exit;
208 }
209 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700210 _exception = 1;
211 _exceptionType = "java/lang/IllegalArgumentException";
212 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700213 goto exit;
214 }
215 _remaining = _env->GetArrayLength(coords_ref) - offset;
216 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700217 _exception = 1;
218 _exceptionType = "java/lang/IllegalArgumentException";
219 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700220 goto exit;
221 }
222 coords_base = (GLshort *)
223 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
224 coords = coords_base + offset;
225
226 glDrawTexsvOES(
227 (GLshort *)coords
228 );
229
230exit:
231 if (coords_base) {
232 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
233 JNI_ABORT);
234 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700235 if (_exception) {
236 jniThrowException(_env, _exceptionType, _exceptionMessage);
237 }
Jack Palevich27f80022009-04-15 19:13:17 -0700238}
239
240/* void glDrawTexsvOES ( const GLshort *coords ) */
241static void
242android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
243 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700244 jint _exception = 0;
245 const char * _exceptionType;
246 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700247 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700248 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700249 jint _remaining;
250 GLshort *coords = (GLshort *) 0;
251
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700252 coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700253 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700254 _exception = 1;
255 _exceptionType = "java/lang/IllegalArgumentException";
256 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700257 goto exit;
258 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700259 if (coords == NULL) {
260 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
261 coords = (GLshort *) (_coordsBase + _bufferOffset);
262 }
Jack Palevich27f80022009-04-15 19:13:17 -0700263 glDrawTexsvOES(
264 (GLshort *)coords
265 );
266
267exit:
268 if (_array) {
269 releasePointer(_env, _array, coords, JNI_FALSE);
270 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700271 if (_exception) {
272 jniThrowException(_env, _exceptionType, _exceptionMessage);
273 }
Jack Palevich27f80022009-04-15 19:13:17 -0700274}
275
276/* void glDrawTexivOES ( const GLint *coords ) */
277static void
278android_glDrawTexivOES___3II
279 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700280 jint _exception = 0;
281 const char * _exceptionType;
282 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700283 GLint *coords_base = (GLint *) 0;
284 jint _remaining;
285 GLint *coords = (GLint *) 0;
286
287 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700288 _exception = 1;
289 _exceptionType = "java/lang/IllegalArgumentException";
290 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700291 goto exit;
292 }
293 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700294 _exception = 1;
295 _exceptionType = "java/lang/IllegalArgumentException";
296 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700297 goto exit;
298 }
299 _remaining = _env->GetArrayLength(coords_ref) - offset;
300 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700301 _exception = 1;
302 _exceptionType = "java/lang/IllegalArgumentException";
303 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700304 goto exit;
305 }
306 coords_base = (GLint *)
307 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
308 coords = coords_base + offset;
309
310 glDrawTexivOES(
311 (GLint *)coords
312 );
313
314exit:
315 if (coords_base) {
316 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
317 JNI_ABORT);
318 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700319 if (_exception) {
320 jniThrowException(_env, _exceptionType, _exceptionMessage);
321 }
Jack Palevich27f80022009-04-15 19:13:17 -0700322}
323
324/* void glDrawTexivOES ( const GLint *coords ) */
325static void
326android_glDrawTexivOES__Ljava_nio_IntBuffer_2
327 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700328 jint _exception = 0;
329 const char * _exceptionType;
330 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700331 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700332 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700333 jint _remaining;
334 GLint *coords = (GLint *) 0;
335
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700336 coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700337 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700338 _exception = 1;
339 _exceptionType = "java/lang/IllegalArgumentException";
340 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700341 goto exit;
342 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700343 if (coords == NULL) {
344 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
345 coords = (GLint *) (_coordsBase + _bufferOffset);
346 }
Jack Palevich27f80022009-04-15 19:13:17 -0700347 glDrawTexivOES(
348 (GLint *)coords
349 );
350
351exit:
352 if (_array) {
353 releasePointer(_env, _array, coords, JNI_FALSE);
354 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700355 if (_exception) {
356 jniThrowException(_env, _exceptionType, _exceptionMessage);
357 }
Jack Palevich27f80022009-04-15 19:13:17 -0700358}
359
360/* void glDrawTexxvOES ( const GLfixed *coords ) */
361static void
362android_glDrawTexxvOES___3II
363 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700364 jint _exception = 0;
365 const char * _exceptionType;
366 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700367 GLfixed *coords_base = (GLfixed *) 0;
368 jint _remaining;
369 GLfixed *coords = (GLfixed *) 0;
370
371 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700372 _exception = 1;
373 _exceptionType = "java/lang/IllegalArgumentException";
374 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700375 goto exit;
376 }
377 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700378 _exception = 1;
379 _exceptionType = "java/lang/IllegalArgumentException";
380 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700381 goto exit;
382 }
383 _remaining = _env->GetArrayLength(coords_ref) - offset;
384 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700385 _exception = 1;
386 _exceptionType = "java/lang/IllegalArgumentException";
387 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700388 goto exit;
389 }
390 coords_base = (GLfixed *)
391 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
392 coords = coords_base + offset;
393
394 glDrawTexxvOES(
395 (GLfixed *)coords
396 );
397
398exit:
399 if (coords_base) {
400 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
401 JNI_ABORT);
402 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700403 if (_exception) {
404 jniThrowException(_env, _exceptionType, _exceptionMessage);
405 }
Jack Palevich27f80022009-04-15 19:13:17 -0700406}
407
408/* void glDrawTexxvOES ( const GLfixed *coords ) */
409static void
410android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
411 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700412 jint _exception = 0;
413 const char * _exceptionType;
414 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700415 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700416 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700417 jint _remaining;
418 GLfixed *coords = (GLfixed *) 0;
419
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700420 coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700421 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700422 _exception = 1;
423 _exceptionType = "java/lang/IllegalArgumentException";
424 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700425 goto exit;
426 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700427 if (coords == NULL) {
428 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
429 coords = (GLfixed *) (_coordsBase + _bufferOffset);
430 }
Jack Palevich27f80022009-04-15 19:13:17 -0700431 glDrawTexxvOES(
432 (GLfixed *)coords
433 );
434
435exit:
436 if (_array) {
437 releasePointer(_env, _array, coords, JNI_FALSE);
438 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700439 if (_exception) {
440 jniThrowException(_env, _exceptionType, _exceptionMessage);
441 }
Jack Palevich27f80022009-04-15 19:13:17 -0700442}
443
444/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
445static void
446android_glDrawTexfOES__FFFFF
447 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
448 glDrawTexfOES(
449 (GLfloat)x,
450 (GLfloat)y,
451 (GLfloat)z,
452 (GLfloat)width,
453 (GLfloat)height
454 );
455}
456
457/* void glDrawTexfvOES ( const GLfloat *coords ) */
458static void
459android_glDrawTexfvOES___3FI
460 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700461 jint _exception = 0;
462 const char * _exceptionType;
463 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700464 GLfloat *coords_base = (GLfloat *) 0;
465 jint _remaining;
466 GLfloat *coords = (GLfloat *) 0;
467
468 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700469 _exception = 1;
470 _exceptionType = "java/lang/IllegalArgumentException";
471 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700472 goto exit;
473 }
474 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700475 _exception = 1;
476 _exceptionType = "java/lang/IllegalArgumentException";
477 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700478 goto exit;
479 }
480 _remaining = _env->GetArrayLength(coords_ref) - offset;
481 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700482 _exception = 1;
483 _exceptionType = "java/lang/IllegalArgumentException";
484 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700485 goto exit;
486 }
487 coords_base = (GLfloat *)
488 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
489 coords = coords_base + offset;
490
491 glDrawTexfvOES(
492 (GLfloat *)coords
493 );
494
495exit:
496 if (coords_base) {
497 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
498 JNI_ABORT);
499 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700500 if (_exception) {
501 jniThrowException(_env, _exceptionType, _exceptionMessage);
502 }
Jack Palevich27f80022009-04-15 19:13:17 -0700503}
504
505/* void glDrawTexfvOES ( const GLfloat *coords ) */
506static void
507android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
508 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700509 jint _exception = 0;
510 const char * _exceptionType;
511 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700512 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700513 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700514 jint _remaining;
515 GLfloat *coords = (GLfloat *) 0;
516
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700517 coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700518 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700519 _exception = 1;
520 _exceptionType = "java/lang/IllegalArgumentException";
521 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700522 goto exit;
523 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700524 if (coords == NULL) {
525 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
526 coords = (GLfloat *) (_coordsBase + _bufferOffset);
527 }
Jack Palevich27f80022009-04-15 19:13:17 -0700528 glDrawTexfvOES(
529 (GLfloat *)coords
530 );
531
532exit:
533 if (_array) {
534 releasePointer(_env, _array, coords, JNI_FALSE);
535 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700536 if (_exception) {
537 jniThrowException(_env, _exceptionType, _exceptionMessage);
538 }
Jack Palevich27f80022009-04-15 19:13:17 -0700539}
540
541/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
542static void
543android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
544 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700545 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700546 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700547 jint _remaining;
548 GLeglImageOES image = (GLeglImageOES) 0;
549
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700550 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
551 if (image == NULL) {
552 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
553 image = (GLeglImageOES) (_imageBase + _bufferOffset);
554 }
Jack Palevicha3795852009-04-24 10:35:11 -0700555 glEGLImageTargetTexture2DOES(
556 (GLenum)target,
557 (GLeglImageOES)image
558 );
559 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700560 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700561 }
Jack Palevich27f80022009-04-15 19:13:17 -0700562}
563
564/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
565static void
566android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
567 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700568 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700569 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700570 jint _remaining;
571 GLeglImageOES image = (GLeglImageOES) 0;
572
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700573 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
574 if (image == NULL) {
575 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
576 image = (GLeglImageOES) (_imageBase + _bufferOffset);
577 }
Jack Palevicha3795852009-04-24 10:35:11 -0700578 glEGLImageTargetRenderbufferStorageOES(
579 (GLenum)target,
580 (GLeglImageOES)image
581 );
582 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700583 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700584 }
Jack Palevich27f80022009-04-15 19:13:17 -0700585}
586
587/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
588static void
589android_glAlphaFuncxOES__II
590 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700591 glAlphaFuncxOES(
592 (GLenum)func,
593 (GLclampx)ref
594 );
Jack Palevich27f80022009-04-15 19:13:17 -0700595}
596
597/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
598static void
599android_glClearColorxOES__IIII
600 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700601 glClearColorxOES(
602 (GLclampx)red,
603 (GLclampx)green,
604 (GLclampx)blue,
605 (GLclampx)alpha
606 );
Jack Palevich27f80022009-04-15 19:13:17 -0700607}
608
609/* void glClearDepthxOES ( GLclampx depth ) */
610static void
611android_glClearDepthxOES__I
612 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700613 glClearDepthxOES(
614 (GLclampx)depth
615 );
Jack Palevich27f80022009-04-15 19:13:17 -0700616}
617
618/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
619static void
620android_glClipPlanexOES__I_3II
621 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700622 jint _exception = 0;
623 const char * _exceptionType;
624 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700625 GLfixed *equation_base = (GLfixed *) 0;
626 jint _remaining;
627 GLfixed *equation = (GLfixed *) 0;
628
629 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700630 _exception = 1;
631 _exceptionType = "java/lang/IllegalArgumentException";
632 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700633 goto exit;
634 }
635 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700636 _exception = 1;
637 _exceptionType = "java/lang/IllegalArgumentException";
638 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700639 goto exit;
640 }
641 _remaining = _env->GetArrayLength(equation_ref) - offset;
642 equation_base = (GLfixed *)
643 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
644 equation = equation_base + offset;
645
646 glClipPlanexOES(
647 (GLenum)plane,
648 (GLfixed *)equation
649 );
650
651exit:
652 if (equation_base) {
653 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
654 JNI_ABORT);
655 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700656 if (_exception) {
657 jniThrowException(_env, _exceptionType, _exceptionMessage);
658 }
Jack Palevich27f80022009-04-15 19:13:17 -0700659}
660
661/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
662static void
663android_glClipPlanexOES__ILjava_nio_IntBuffer_2
664 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700665 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700666 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700667 jint _remaining;
668 GLfixed *equation = (GLfixed *) 0;
669
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700670 equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
671 if (equation == NULL) {
672 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
673 equation = (GLfixed *) (_equationBase + _bufferOffset);
674 }
Jack Palevicha3795852009-04-24 10:35:11 -0700675 glClipPlanexOES(
676 (GLenum)plane,
677 (GLfixed *)equation
678 );
679 if (_array) {
680 releasePointer(_env, _array, equation, JNI_FALSE);
681 }
Jack Palevich27f80022009-04-15 19:13:17 -0700682}
683
684/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
685static void
686android_glColor4xOES__IIII
687 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700688 glColor4xOES(
689 (GLfixed)red,
690 (GLfixed)green,
691 (GLfixed)blue,
692 (GLfixed)alpha
693 );
Jack Palevich27f80022009-04-15 19:13:17 -0700694}
695
696/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
697static void
698android_glDepthRangexOES__II
699 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700700 glDepthRangexOES(
701 (GLclampx)zNear,
702 (GLclampx)zFar
703 );
Jack Palevich27f80022009-04-15 19:13:17 -0700704}
705
706/* void glFogxOES ( GLenum pname, GLfixed param ) */
707static void
708android_glFogxOES__II
709 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -0700710 glFogxOES(
711 (GLenum)pname,
712 (GLfixed)param
713 );
Jack Palevich27f80022009-04-15 19:13:17 -0700714}
715
716/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
717static void
718android_glFogxvOES__I_3II
719 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700720 jint _exception = 0;
721 const char * _exceptionType;
722 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700723 GLfixed *params_base = (GLfixed *) 0;
724 jint _remaining;
725 GLfixed *params = (GLfixed *) 0;
726
727 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700728 _exception = 1;
729 _exceptionType = "java/lang/IllegalArgumentException";
730 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700731 goto exit;
732 }
733 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700734 _exception = 1;
735 _exceptionType = "java/lang/IllegalArgumentException";
736 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700737 goto exit;
738 }
739 _remaining = _env->GetArrayLength(params_ref) - offset;
740 params_base = (GLfixed *)
741 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
742 params = params_base + offset;
743
744 glFogxvOES(
745 (GLenum)pname,
746 (GLfixed *)params
747 );
748
749exit:
750 if (params_base) {
751 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
752 JNI_ABORT);
753 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700754 if (_exception) {
755 jniThrowException(_env, _exceptionType, _exceptionMessage);
756 }
Jack Palevich27f80022009-04-15 19:13:17 -0700757}
758
759/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
760static void
761android_glFogxvOES__ILjava_nio_IntBuffer_2
762 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700763 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700764 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700765 jint _remaining;
766 GLfixed *params = (GLfixed *) 0;
767
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700768 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
769 if (params == NULL) {
770 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
771 params = (GLfixed *) (_paramsBase + _bufferOffset);
772 }
Jack Palevicha3795852009-04-24 10:35:11 -0700773 glFogxvOES(
774 (GLenum)pname,
775 (GLfixed *)params
776 );
777 if (_array) {
778 releasePointer(_env, _array, params, JNI_FALSE);
779 }
Jack Palevich27f80022009-04-15 19:13:17 -0700780}
781
782/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
783static void
784android_glFrustumxOES__IIIIII
785 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700786 glFrustumxOES(
787 (GLfixed)left,
788 (GLfixed)right,
789 (GLfixed)bottom,
790 (GLfixed)top,
791 (GLfixed)zNear,
792 (GLfixed)zFar
793 );
Jack Palevich27f80022009-04-15 19:13:17 -0700794}
795
796/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
797static void
798android_glGetClipPlanexOES__I_3II
799 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700800 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700801 const char * _exceptionType;
802 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700803 GLfixed *eqn_base = (GLfixed *) 0;
804 jint _remaining;
805 GLfixed *eqn = (GLfixed *) 0;
806
807 if (!eqn_ref) {
808 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700809 _exceptionType = "java/lang/IllegalArgumentException";
810 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700811 goto exit;
812 }
813 if (offset < 0) {
814 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700815 _exceptionType = "java/lang/IllegalArgumentException";
816 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700817 goto exit;
818 }
819 _remaining = _env->GetArrayLength(eqn_ref) - offset;
820 if (_remaining < 4) {
821 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700822 _exceptionType = "java/lang/IllegalArgumentException";
823 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -0700824 goto exit;
825 }
826 eqn_base = (GLfixed *)
827 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
828 eqn = eqn_base + offset;
829
830 glGetClipPlanexOES(
831 (GLenum)pname,
832 (GLfixed *)eqn
833 );
834
835exit:
836 if (eqn_base) {
837 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
838 _exception ? JNI_ABORT: 0);
839 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700840 if (_exception) {
841 jniThrowException(_env, _exceptionType, _exceptionMessage);
842 }
Jack Palevich27f80022009-04-15 19:13:17 -0700843}
844
845/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
846static void
847android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
848 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700849 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700850 const char * _exceptionType;
851 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700852 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700853 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700854 jint _remaining;
855 GLfixed *eqn = (GLfixed *) 0;
856
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700857 eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -0700858 if (_remaining < 4) {
859 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700860 _exceptionType = "java/lang/IllegalArgumentException";
861 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -0700862 goto exit;
863 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700864 if (eqn == NULL) {
865 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
866 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
867 }
Jack Palevicha3795852009-04-24 10:35:11 -0700868 glGetClipPlanexOES(
869 (GLenum)pname,
870 (GLfixed *)eqn
871 );
872
873exit:
874 if (_array) {
875 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
876 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700877 if (_exception) {
878 jniThrowException(_env, _exceptionType, _exceptionMessage);
879 }
Jack Palevich27f80022009-04-15 19:13:17 -0700880}
881
882/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
883static void
884android_glGetFixedvOES__I_3II
885 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700886 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700887 const char * _exceptionType;
888 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700889 GLfixed *params_base = (GLfixed *) 0;
890 jint _remaining;
891 GLfixed *params = (GLfixed *) 0;
892
893 if (!params_ref) {
894 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700895 _exceptionType = "java/lang/IllegalArgumentException";
896 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700897 goto exit;
898 }
899 if (offset < 0) {
900 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700901 _exceptionType = "java/lang/IllegalArgumentException";
902 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700903 goto exit;
904 }
905 _remaining = _env->GetArrayLength(params_ref) - offset;
906 params_base = (GLfixed *)
907 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
908 params = params_base + offset;
909
910 glGetFixedvOES(
911 (GLenum)pname,
912 (GLfixed *)params
913 );
914
915exit:
916 if (params_base) {
917 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
918 _exception ? JNI_ABORT: 0);
919 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700920 if (_exception) {
921 jniThrowException(_env, _exceptionType, _exceptionMessage);
922 }
Jack Palevich27f80022009-04-15 19:13:17 -0700923}
924
925/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
926static void
927android_glGetFixedvOES__ILjava_nio_IntBuffer_2
928 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700929 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700930 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700931 jint _remaining;
932 GLfixed *params = (GLfixed *) 0;
933
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700934 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
935 if (params == NULL) {
936 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
937 params = (GLfixed *) (_paramsBase + _bufferOffset);
938 }
Jack Palevicha3795852009-04-24 10:35:11 -0700939 glGetFixedvOES(
940 (GLenum)pname,
941 (GLfixed *)params
942 );
943 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700944 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700945 }
Jack Palevich27f80022009-04-15 19:13:17 -0700946}
947
948/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
949static void
950android_glGetLightxvOES__II_3II
951 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700952 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700953 const char * _exceptionType;
954 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700955 GLfixed *params_base = (GLfixed *) 0;
956 jint _remaining;
957 GLfixed *params = (GLfixed *) 0;
958
959 if (!params_ref) {
960 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700961 _exceptionType = "java/lang/IllegalArgumentException";
962 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700963 goto exit;
964 }
965 if (offset < 0) {
966 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700967 _exceptionType = "java/lang/IllegalArgumentException";
968 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700969 goto exit;
970 }
971 _remaining = _env->GetArrayLength(params_ref) - offset;
972 params_base = (GLfixed *)
973 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
974 params = params_base + offset;
975
976 glGetLightxvOES(
977 (GLenum)light,
978 (GLenum)pname,
979 (GLfixed *)params
980 );
981
982exit:
983 if (params_base) {
984 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
985 _exception ? JNI_ABORT: 0);
986 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700987 if (_exception) {
988 jniThrowException(_env, _exceptionType, _exceptionMessage);
989 }
Jack Palevich27f80022009-04-15 19:13:17 -0700990}
991
992/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
993static void
994android_glGetLightxvOES__IILjava_nio_IntBuffer_2
995 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700996 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700997 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700998 jint _remaining;
999 GLfixed *params = (GLfixed *) 0;
1000
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001001 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1002 if (params == NULL) {
1003 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1004 params = (GLfixed *) (_paramsBase + _bufferOffset);
1005 }
Jack Palevicha3795852009-04-24 10:35:11 -07001006 glGetLightxvOES(
1007 (GLenum)light,
1008 (GLenum)pname,
1009 (GLfixed *)params
1010 );
1011 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001012 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001013 }
Jack Palevich27f80022009-04-15 19:13:17 -07001014}
1015
1016/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1017static void
1018android_glGetMaterialxvOES__II_3II
1019 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001020 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001021 const char * _exceptionType;
1022 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001023 GLfixed *params_base = (GLfixed *) 0;
1024 jint _remaining;
1025 GLfixed *params = (GLfixed *) 0;
1026
1027 if (!params_ref) {
1028 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001029 _exceptionType = "java/lang/IllegalArgumentException";
1030 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001031 goto exit;
1032 }
1033 if (offset < 0) {
1034 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001035 _exceptionType = "java/lang/IllegalArgumentException";
1036 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001037 goto exit;
1038 }
1039 _remaining = _env->GetArrayLength(params_ref) - offset;
1040 params_base = (GLfixed *)
1041 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1042 params = params_base + offset;
1043
1044 glGetMaterialxvOES(
1045 (GLenum)face,
1046 (GLenum)pname,
1047 (GLfixed *)params
1048 );
1049
1050exit:
1051 if (params_base) {
1052 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1053 _exception ? JNI_ABORT: 0);
1054 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001055 if (_exception) {
1056 jniThrowException(_env, _exceptionType, _exceptionMessage);
1057 }
Jack Palevich27f80022009-04-15 19:13:17 -07001058}
1059
1060/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1061static void
1062android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1063 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001064 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001065 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001066 jint _remaining;
1067 GLfixed *params = (GLfixed *) 0;
1068
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001069 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1070 if (params == NULL) {
1071 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1072 params = (GLfixed *) (_paramsBase + _bufferOffset);
1073 }
Jack Palevicha3795852009-04-24 10:35:11 -07001074 glGetMaterialxvOES(
1075 (GLenum)face,
1076 (GLenum)pname,
1077 (GLfixed *)params
1078 );
1079 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001080 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001081 }
Jack Palevich27f80022009-04-15 19:13:17 -07001082}
1083
1084/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1085static void
1086android_glGetTexEnvxvOES__II_3II
1087 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001088 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001089 const char * _exceptionType;
1090 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001091 GLfixed *params_base = (GLfixed *) 0;
1092 jint _remaining;
1093 GLfixed *params = (GLfixed *) 0;
1094
1095 if (!params_ref) {
1096 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001097 _exceptionType = "java/lang/IllegalArgumentException";
1098 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001099 goto exit;
1100 }
1101 if (offset < 0) {
1102 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001103 _exceptionType = "java/lang/IllegalArgumentException";
1104 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001105 goto exit;
1106 }
1107 _remaining = _env->GetArrayLength(params_ref) - offset;
1108 params_base = (GLfixed *)
1109 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1110 params = params_base + offset;
1111
1112 glGetTexEnvxvOES(
1113 (GLenum)env,
1114 (GLenum)pname,
1115 (GLfixed *)params
1116 );
1117
1118exit:
1119 if (params_base) {
1120 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1121 _exception ? JNI_ABORT: 0);
1122 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001123 if (_exception) {
1124 jniThrowException(_env, _exceptionType, _exceptionMessage);
1125 }
Jack Palevich27f80022009-04-15 19:13:17 -07001126}
1127
1128/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1129static void
1130android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1131 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001132 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001133 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001134 jint _remaining;
1135 GLfixed *params = (GLfixed *) 0;
1136
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001137 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1138 if (params == NULL) {
1139 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1140 params = (GLfixed *) (_paramsBase + _bufferOffset);
1141 }
Jack Palevicha3795852009-04-24 10:35:11 -07001142 glGetTexEnvxvOES(
1143 (GLenum)env,
1144 (GLenum)pname,
1145 (GLfixed *)params
1146 );
1147 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001148 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001149 }
Jack Palevich27f80022009-04-15 19:13:17 -07001150}
1151
1152/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1153static void
1154android_glGetTexParameterxvOES__II_3II
1155 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001156 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001157 const char * _exceptionType;
1158 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001159 GLfixed *params_base = (GLfixed *) 0;
1160 jint _remaining;
1161 GLfixed *params = (GLfixed *) 0;
1162
1163 if (!params_ref) {
1164 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001165 _exceptionType = "java/lang/IllegalArgumentException";
1166 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001167 goto exit;
1168 }
1169 if (offset < 0) {
1170 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001171 _exceptionType = "java/lang/IllegalArgumentException";
1172 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001173 goto exit;
1174 }
1175 _remaining = _env->GetArrayLength(params_ref) - offset;
1176 params_base = (GLfixed *)
1177 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1178 params = params_base + offset;
1179
1180 glGetTexParameterxvOES(
1181 (GLenum)target,
1182 (GLenum)pname,
1183 (GLfixed *)params
1184 );
1185
1186exit:
1187 if (params_base) {
1188 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1189 _exception ? JNI_ABORT: 0);
1190 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001191 if (_exception) {
1192 jniThrowException(_env, _exceptionType, _exceptionMessage);
1193 }
Jack Palevich27f80022009-04-15 19:13:17 -07001194}
1195
1196/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1197static void
1198android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1199 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001200 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001201 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001202 jint _remaining;
1203 GLfixed *params = (GLfixed *) 0;
1204
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001205 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1206 if (params == NULL) {
1207 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1208 params = (GLfixed *) (_paramsBase + _bufferOffset);
1209 }
Jack Palevicha3795852009-04-24 10:35:11 -07001210 glGetTexParameterxvOES(
1211 (GLenum)target,
1212 (GLenum)pname,
1213 (GLfixed *)params
1214 );
1215 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001216 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001217 }
Jack Palevich27f80022009-04-15 19:13:17 -07001218}
1219
1220/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1221static void
1222android_glLightModelxOES__II
1223 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001224 glLightModelxOES(
1225 (GLenum)pname,
1226 (GLfixed)param
1227 );
Jack Palevich27f80022009-04-15 19:13:17 -07001228}
1229
1230/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1231static void
1232android_glLightModelxvOES__I_3II
1233 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001234 jint _exception = 0;
1235 const char * _exceptionType;
1236 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001237 GLfixed *params_base = (GLfixed *) 0;
1238 jint _remaining;
1239 GLfixed *params = (GLfixed *) 0;
1240
1241 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001242 _exception = 1;
1243 _exceptionType = "java/lang/IllegalArgumentException";
1244 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001245 goto exit;
1246 }
1247 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001248 _exception = 1;
1249 _exceptionType = "java/lang/IllegalArgumentException";
1250 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001251 goto exit;
1252 }
1253 _remaining = _env->GetArrayLength(params_ref) - offset;
1254 params_base = (GLfixed *)
1255 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1256 params = params_base + offset;
1257
1258 glLightModelxvOES(
1259 (GLenum)pname,
1260 (GLfixed *)params
1261 );
1262
1263exit:
1264 if (params_base) {
1265 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1266 JNI_ABORT);
1267 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001268 if (_exception) {
1269 jniThrowException(_env, _exceptionType, _exceptionMessage);
1270 }
Jack Palevich27f80022009-04-15 19:13:17 -07001271}
1272
1273/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1274static void
1275android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1276 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001277 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001278 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001279 jint _remaining;
1280 GLfixed *params = (GLfixed *) 0;
1281
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001282 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1283 if (params == NULL) {
1284 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1285 params = (GLfixed *) (_paramsBase + _bufferOffset);
1286 }
Jack Palevicha3795852009-04-24 10:35:11 -07001287 glLightModelxvOES(
1288 (GLenum)pname,
1289 (GLfixed *)params
1290 );
1291 if (_array) {
1292 releasePointer(_env, _array, params, JNI_FALSE);
1293 }
Jack Palevich27f80022009-04-15 19:13:17 -07001294}
1295
1296/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1297static void
1298android_glLightxOES__III
1299 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001300 glLightxOES(
1301 (GLenum)light,
1302 (GLenum)pname,
1303 (GLfixed)param
1304 );
Jack Palevich27f80022009-04-15 19:13:17 -07001305}
1306
1307/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1308static void
1309android_glLightxvOES__II_3II
1310 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001311 jint _exception = 0;
1312 const char * _exceptionType;
1313 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001314 GLfixed *params_base = (GLfixed *) 0;
1315 jint _remaining;
1316 GLfixed *params = (GLfixed *) 0;
1317
1318 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001319 _exception = 1;
1320 _exceptionType = "java/lang/IllegalArgumentException";
1321 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001322 goto exit;
1323 }
1324 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001325 _exception = 1;
1326 _exceptionType = "java/lang/IllegalArgumentException";
1327 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001328 goto exit;
1329 }
1330 _remaining = _env->GetArrayLength(params_ref) - offset;
1331 params_base = (GLfixed *)
1332 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1333 params = params_base + offset;
1334
1335 glLightxvOES(
1336 (GLenum)light,
1337 (GLenum)pname,
1338 (GLfixed *)params
1339 );
1340
1341exit:
1342 if (params_base) {
1343 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1344 JNI_ABORT);
1345 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001346 if (_exception) {
1347 jniThrowException(_env, _exceptionType, _exceptionMessage);
1348 }
Jack Palevich27f80022009-04-15 19:13:17 -07001349}
1350
1351/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1352static void
1353android_glLightxvOES__IILjava_nio_IntBuffer_2
1354 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001355 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001356 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001357 jint _remaining;
1358 GLfixed *params = (GLfixed *) 0;
1359
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001360 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1361 if (params == NULL) {
1362 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1363 params = (GLfixed *) (_paramsBase + _bufferOffset);
1364 }
Jack Palevicha3795852009-04-24 10:35:11 -07001365 glLightxvOES(
1366 (GLenum)light,
1367 (GLenum)pname,
1368 (GLfixed *)params
1369 );
1370 if (_array) {
1371 releasePointer(_env, _array, params, JNI_FALSE);
1372 }
Jack Palevich27f80022009-04-15 19:13:17 -07001373}
1374
1375/* void glLineWidthxOES ( GLfixed width ) */
1376static void
1377android_glLineWidthxOES__I
1378 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001379 glLineWidthxOES(
1380 (GLfixed)width
1381 );
Jack Palevich27f80022009-04-15 19:13:17 -07001382}
1383
1384/* void glLoadMatrixxOES ( const GLfixed *m ) */
1385static void
1386android_glLoadMatrixxOES___3II
1387 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001388 jint _exception = 0;
1389 const char * _exceptionType;
1390 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001391 GLfixed *m_base = (GLfixed *) 0;
1392 jint _remaining;
1393 GLfixed *m = (GLfixed *) 0;
1394
1395 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001396 _exception = 1;
1397 _exceptionType = "java/lang/IllegalArgumentException";
1398 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001399 goto exit;
1400 }
1401 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001402 _exception = 1;
1403 _exceptionType = "java/lang/IllegalArgumentException";
1404 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001405 goto exit;
1406 }
1407 _remaining = _env->GetArrayLength(m_ref) - offset;
1408 m_base = (GLfixed *)
1409 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1410 m = m_base + offset;
1411
1412 glLoadMatrixxOES(
1413 (GLfixed *)m
1414 );
1415
1416exit:
1417 if (m_base) {
1418 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1419 JNI_ABORT);
1420 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001421 if (_exception) {
1422 jniThrowException(_env, _exceptionType, _exceptionMessage);
1423 }
Jack Palevich27f80022009-04-15 19:13:17 -07001424}
1425
1426/* void glLoadMatrixxOES ( const GLfixed *m ) */
1427static void
1428android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1429 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001430 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001431 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001432 jint _remaining;
1433 GLfixed *m = (GLfixed *) 0;
1434
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001435 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1436 if (m == NULL) {
1437 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1438 m = (GLfixed *) (_mBase + _bufferOffset);
1439 }
Jack Palevicha3795852009-04-24 10:35:11 -07001440 glLoadMatrixxOES(
1441 (GLfixed *)m
1442 );
1443 if (_array) {
1444 releasePointer(_env, _array, m, JNI_FALSE);
1445 }
Jack Palevich27f80022009-04-15 19:13:17 -07001446}
1447
1448/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1449static void
1450android_glMaterialxOES__III
1451 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001452 glMaterialxOES(
1453 (GLenum)face,
1454 (GLenum)pname,
1455 (GLfixed)param
1456 );
Jack Palevich27f80022009-04-15 19:13:17 -07001457}
1458
1459/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1460static void
1461android_glMaterialxvOES__II_3II
1462 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001463 jint _exception = 0;
1464 const char * _exceptionType;
1465 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001466 GLfixed *params_base = (GLfixed *) 0;
1467 jint _remaining;
1468 GLfixed *params = (GLfixed *) 0;
1469
1470 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001471 _exception = 1;
1472 _exceptionType = "java/lang/IllegalArgumentException";
1473 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001474 goto exit;
1475 }
1476 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001477 _exception = 1;
1478 _exceptionType = "java/lang/IllegalArgumentException";
1479 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001480 goto exit;
1481 }
1482 _remaining = _env->GetArrayLength(params_ref) - offset;
1483 params_base = (GLfixed *)
1484 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1485 params = params_base + offset;
1486
1487 glMaterialxvOES(
1488 (GLenum)face,
1489 (GLenum)pname,
1490 (GLfixed *)params
1491 );
1492
1493exit:
1494 if (params_base) {
1495 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1496 JNI_ABORT);
1497 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001498 if (_exception) {
1499 jniThrowException(_env, _exceptionType, _exceptionMessage);
1500 }
Jack Palevich27f80022009-04-15 19:13:17 -07001501}
1502
1503/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1504static void
1505android_glMaterialxvOES__IILjava_nio_IntBuffer_2
1506 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001507 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001508 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001509 jint _remaining;
1510 GLfixed *params = (GLfixed *) 0;
1511
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001512 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1513 if (params == NULL) {
1514 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1515 params = (GLfixed *) (_paramsBase + _bufferOffset);
1516 }
Jack Palevicha3795852009-04-24 10:35:11 -07001517 glMaterialxvOES(
1518 (GLenum)face,
1519 (GLenum)pname,
1520 (GLfixed *)params
1521 );
1522 if (_array) {
1523 releasePointer(_env, _array, params, JNI_FALSE);
1524 }
Jack Palevich27f80022009-04-15 19:13:17 -07001525}
1526
1527/* void glMultMatrixxOES ( const GLfixed *m ) */
1528static void
1529android_glMultMatrixxOES___3II
1530 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001531 jint _exception = 0;
1532 const char * _exceptionType;
1533 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001534 GLfixed *m_base = (GLfixed *) 0;
1535 jint _remaining;
1536 GLfixed *m = (GLfixed *) 0;
1537
1538 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001539 _exception = 1;
1540 _exceptionType = "java/lang/IllegalArgumentException";
1541 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001542 goto exit;
1543 }
1544 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001545 _exception = 1;
1546 _exceptionType = "java/lang/IllegalArgumentException";
1547 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001548 goto exit;
1549 }
1550 _remaining = _env->GetArrayLength(m_ref) - offset;
1551 m_base = (GLfixed *)
1552 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1553 m = m_base + offset;
1554
1555 glMultMatrixxOES(
1556 (GLfixed *)m
1557 );
1558
1559exit:
1560 if (m_base) {
1561 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1562 JNI_ABORT);
1563 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001564 if (_exception) {
1565 jniThrowException(_env, _exceptionType, _exceptionMessage);
1566 }
Jack Palevich27f80022009-04-15 19:13:17 -07001567}
1568
1569/* void glMultMatrixxOES ( const GLfixed *m ) */
1570static void
1571android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
1572 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001573 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001574 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001575 jint _remaining;
1576 GLfixed *m = (GLfixed *) 0;
1577
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001578 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1579 if (m == NULL) {
1580 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1581 m = (GLfixed *) (_mBase + _bufferOffset);
1582 }
Jack Palevicha3795852009-04-24 10:35:11 -07001583 glMultMatrixxOES(
1584 (GLfixed *)m
1585 );
1586 if (_array) {
1587 releasePointer(_env, _array, m, JNI_FALSE);
1588 }
Jack Palevich27f80022009-04-15 19:13:17 -07001589}
1590
1591/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
1592static void
1593android_glMultiTexCoord4xOES__IIIII
1594 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07001595 glMultiTexCoord4xOES(
1596 (GLenum)target,
1597 (GLfixed)s,
1598 (GLfixed)t,
1599 (GLfixed)r,
1600 (GLfixed)q
1601 );
Jack Palevich27f80022009-04-15 19:13:17 -07001602}
1603
1604/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
1605static void
1606android_glNormal3xOES__III
1607 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07001608 glNormal3xOES(
1609 (GLfixed)nx,
1610 (GLfixed)ny,
1611 (GLfixed)nz
1612 );
Jack Palevich27f80022009-04-15 19:13:17 -07001613}
1614
1615/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1616static void
1617android_glOrthoxOES__IIIIII
1618 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001619 glOrthoxOES(
1620 (GLfixed)left,
1621 (GLfixed)right,
1622 (GLfixed)bottom,
1623 (GLfixed)top,
1624 (GLfixed)zNear,
1625 (GLfixed)zFar
1626 );
Jack Palevich27f80022009-04-15 19:13:17 -07001627}
1628
1629/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
1630static void
1631android_glPointParameterxOES__II
1632 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001633 glPointParameterxOES(
1634 (GLenum)pname,
1635 (GLfixed)param
1636 );
Jack Palevich27f80022009-04-15 19:13:17 -07001637}
1638
1639/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1640static void
1641android_glPointParameterxvOES__I_3II
1642 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001643 jint _exception = 0;
1644 const char * _exceptionType;
1645 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001646 GLfixed *params_base = (GLfixed *) 0;
1647 jint _remaining;
1648 GLfixed *params = (GLfixed *) 0;
1649
1650 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001651 _exception = 1;
1652 _exceptionType = "java/lang/IllegalArgumentException";
1653 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001654 goto exit;
1655 }
1656 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001657 _exception = 1;
1658 _exceptionType = "java/lang/IllegalArgumentException";
1659 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001660 goto exit;
1661 }
1662 _remaining = _env->GetArrayLength(params_ref) - offset;
1663 params_base = (GLfixed *)
1664 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1665 params = params_base + offset;
1666
1667 glPointParameterxvOES(
1668 (GLenum)pname,
1669 (GLfixed *)params
1670 );
1671
1672exit:
1673 if (params_base) {
1674 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1675 JNI_ABORT);
1676 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001677 if (_exception) {
1678 jniThrowException(_env, _exceptionType, _exceptionMessage);
1679 }
Jack Palevich27f80022009-04-15 19:13:17 -07001680}
1681
1682/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1683static void
1684android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
1685 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001686 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001687 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001688 jint _remaining;
1689 GLfixed *params = (GLfixed *) 0;
1690
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001691 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1692 if (params == NULL) {
1693 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1694 params = (GLfixed *) (_paramsBase + _bufferOffset);
1695 }
Jack Palevicha3795852009-04-24 10:35:11 -07001696 glPointParameterxvOES(
1697 (GLenum)pname,
1698 (GLfixed *)params
1699 );
1700 if (_array) {
1701 releasePointer(_env, _array, params, JNI_FALSE);
1702 }
Jack Palevich27f80022009-04-15 19:13:17 -07001703}
1704
1705/* void glPointSizexOES ( GLfixed size ) */
1706static void
1707android_glPointSizexOES__I
1708 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07001709 glPointSizexOES(
1710 (GLfixed)size
1711 );
Jack Palevich27f80022009-04-15 19:13:17 -07001712}
1713
1714/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
1715static void
1716android_glPolygonOffsetxOES__II
1717 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07001718 glPolygonOffsetxOES(
1719 (GLfixed)factor,
1720 (GLfixed)units
1721 );
Jack Palevich27f80022009-04-15 19:13:17 -07001722}
1723
1724/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
1725static void
1726android_glRotatexOES__IIII
1727 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001728 glRotatexOES(
1729 (GLfixed)angle,
1730 (GLfixed)x,
1731 (GLfixed)y,
1732 (GLfixed)z
1733 );
Jack Palevich27f80022009-04-15 19:13:17 -07001734}
1735
1736/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
1737static void
1738android_glSampleCoveragexOES__IZ
1739 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07001740 glSampleCoveragexOES(
1741 (GLclampx)value,
1742 (GLboolean)invert
1743 );
Jack Palevich27f80022009-04-15 19:13:17 -07001744}
1745
1746/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1747static void
1748android_glScalexOES__III
1749 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001750 glScalexOES(
1751 (GLfixed)x,
1752 (GLfixed)y,
1753 (GLfixed)z
1754 );
Jack Palevich27f80022009-04-15 19:13:17 -07001755}
1756
1757/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
1758static void
1759android_glTexEnvxOES__III
1760 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001761 glTexEnvxOES(
1762 (GLenum)target,
1763 (GLenum)pname,
1764 (GLfixed)param
1765 );
Jack Palevich27f80022009-04-15 19:13:17 -07001766}
1767
1768/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1769static void
1770android_glTexEnvxvOES__II_3II
1771 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001772 jint _exception = 0;
1773 const char * _exceptionType;
1774 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001775 GLfixed *params_base = (GLfixed *) 0;
1776 jint _remaining;
1777 GLfixed *params = (GLfixed *) 0;
1778
1779 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001780 _exception = 1;
1781 _exceptionType = "java/lang/IllegalArgumentException";
1782 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001783 goto exit;
1784 }
1785 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001786 _exception = 1;
1787 _exceptionType = "java/lang/IllegalArgumentException";
1788 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001789 goto exit;
1790 }
1791 _remaining = _env->GetArrayLength(params_ref) - offset;
1792 params_base = (GLfixed *)
1793 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1794 params = params_base + offset;
1795
1796 glTexEnvxvOES(
1797 (GLenum)target,
1798 (GLenum)pname,
1799 (GLfixed *)params
1800 );
1801
1802exit:
1803 if (params_base) {
1804 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1805 JNI_ABORT);
1806 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001807 if (_exception) {
1808 jniThrowException(_env, _exceptionType, _exceptionMessage);
1809 }
Jack Palevich27f80022009-04-15 19:13:17 -07001810}
1811
1812/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1813static void
1814android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
1815 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001816 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001817 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001818 jint _remaining;
1819 GLfixed *params = (GLfixed *) 0;
1820
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001821 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1822 if (params == NULL) {
1823 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1824 params = (GLfixed *) (_paramsBase + _bufferOffset);
1825 }
Jack Palevicha3795852009-04-24 10:35:11 -07001826 glTexEnvxvOES(
1827 (GLenum)target,
1828 (GLenum)pname,
1829 (GLfixed *)params
1830 );
1831 if (_array) {
1832 releasePointer(_env, _array, params, JNI_FALSE);
1833 }
Jack Palevich27f80022009-04-15 19:13:17 -07001834}
1835
1836/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
1837static void
1838android_glTexParameterxOES__III
1839 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001840 glTexParameterxOES(
1841 (GLenum)target,
1842 (GLenum)pname,
1843 (GLfixed)param
1844 );
Jack Palevich27f80022009-04-15 19:13:17 -07001845}
1846
1847/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1848static void
1849android_glTexParameterxvOES__II_3II
1850 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001851 jint _exception = 0;
1852 const char * _exceptionType;
1853 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001854 GLfixed *params_base = (GLfixed *) 0;
1855 jint _remaining;
1856 GLfixed *params = (GLfixed *) 0;
1857
1858 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001859 _exception = 1;
1860 _exceptionType = "java/lang/IllegalArgumentException";
1861 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001862 goto exit;
1863 }
1864 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001865 _exception = 1;
1866 _exceptionType = "java/lang/IllegalArgumentException";
1867 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001868 goto exit;
1869 }
1870 _remaining = _env->GetArrayLength(params_ref) - offset;
1871 params_base = (GLfixed *)
1872 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1873 params = params_base + offset;
1874
1875 glTexParameterxvOES(
1876 (GLenum)target,
1877 (GLenum)pname,
1878 (GLfixed *)params
1879 );
1880
1881exit:
1882 if (params_base) {
1883 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1884 JNI_ABORT);
1885 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001886 if (_exception) {
1887 jniThrowException(_env, _exceptionType, _exceptionMessage);
1888 }
Jack Palevich27f80022009-04-15 19:13:17 -07001889}
1890
1891/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1892static void
1893android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
1894 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001895 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001896 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001897 jint _remaining;
1898 GLfixed *params = (GLfixed *) 0;
1899
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001900 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1901 if (params == NULL) {
1902 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1903 params = (GLfixed *) (_paramsBase + _bufferOffset);
1904 }
Jack Palevicha3795852009-04-24 10:35:11 -07001905 glTexParameterxvOES(
1906 (GLenum)target,
1907 (GLenum)pname,
1908 (GLfixed *)params
1909 );
1910 if (_array) {
1911 releasePointer(_env, _array, params, JNI_FALSE);
1912 }
Jack Palevich27f80022009-04-15 19:13:17 -07001913}
1914
1915/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1916static void
1917android_glTranslatexOES__III
1918 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001919 glTranslatexOES(
1920 (GLfixed)x,
1921 (GLfixed)y,
1922 (GLfixed)z
1923 );
Jack Palevich27f80022009-04-15 19:13:17 -07001924}
1925
1926/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
1927static jboolean
1928android_glIsRenderbufferOES__I
1929 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001930 GLboolean _returnValue;
1931 _returnValue = glIsRenderbufferOES(
1932 (GLuint)renderbuffer
1933 );
1934 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07001935}
1936
1937/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
1938static void
1939android_glBindRenderbufferOES__II
1940 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001941 glBindRenderbufferOES(
1942 (GLenum)target,
1943 (GLuint)renderbuffer
1944 );
Jack Palevich27f80022009-04-15 19:13:17 -07001945}
1946
1947/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
1948static void
1949android_glDeleteRenderbuffersOES__I_3II
1950 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001951 jint _exception = 0;
1952 const char * _exceptionType;
1953 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07001954 GLuint *renderbuffers_base = (GLuint *) 0;
1955 jint _remaining;
1956 GLuint *renderbuffers = (GLuint *) 0;
1957
1958 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001959 _exception = 1;
1960 _exceptionType = "java/lang/IllegalArgumentException";
1961 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07001962 goto exit;
1963 }
1964 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001965 _exception = 1;
1966 _exceptionType = "java/lang/IllegalArgumentException";
1967 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07001968 goto exit;
1969 }
1970 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1971 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001972 _exception = 1;
1973 _exceptionType = "java/lang/IllegalArgumentException";
1974 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07001975 goto exit;
1976 }
1977 renderbuffers_base = (GLuint *)
1978 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
1979 renderbuffers = renderbuffers_base + offset;
1980
1981 glDeleteRenderbuffersOES(
1982 (GLsizei)n,
1983 (GLuint *)renderbuffers
1984 );
1985
1986exit:
1987 if (renderbuffers_base) {
1988 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
1989 JNI_ABORT);
1990 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001991 if (_exception) {
1992 jniThrowException(_env, _exceptionType, _exceptionMessage);
1993 }
Jack Palevich27f80022009-04-15 19:13:17 -07001994}
1995
1996/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
1997static void
1998android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
1999 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002000 jint _exception = 0;
2001 const char * _exceptionType;
2002 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002003 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002004 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002005 jint _remaining;
2006 GLuint *renderbuffers = (GLuint *) 0;
2007
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002008 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002009 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002010 _exception = 1;
2011 _exceptionType = "java/lang/IllegalArgumentException";
2012 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002013 goto exit;
2014 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002015 if (renderbuffers == NULL) {
2016 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2017 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2018 }
Jack Palevich73108672011-03-28 14:49:12 -07002019 glDeleteRenderbuffersOES(
2020 (GLsizei)n,
2021 (GLuint *)renderbuffers
2022 );
2023
2024exit:
2025 if (_array) {
2026 releasePointer(_env, _array, renderbuffers, JNI_FALSE);
2027 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002028 if (_exception) {
2029 jniThrowException(_env, _exceptionType, _exceptionMessage);
2030 }
Jack Palevich27f80022009-04-15 19:13:17 -07002031}
2032
2033/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2034static void
2035android_glGenRenderbuffersOES__I_3II
2036 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002037 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002038 const char * _exceptionType;
2039 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002040 GLuint *renderbuffers_base = (GLuint *) 0;
2041 jint _remaining;
2042 GLuint *renderbuffers = (GLuint *) 0;
2043
2044 if (!renderbuffers_ref) {
2045 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002046 _exceptionType = "java/lang/IllegalArgumentException";
2047 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002048 goto exit;
2049 }
2050 if (offset < 0) {
2051 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002052 _exceptionType = "java/lang/IllegalArgumentException";
2053 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002054 goto exit;
2055 }
2056 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2057 if (_remaining < n) {
2058 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002059 _exceptionType = "java/lang/IllegalArgumentException";
2060 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002061 goto exit;
2062 }
2063 renderbuffers_base = (GLuint *)
2064 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
2065 renderbuffers = renderbuffers_base + offset;
2066
2067 glGenRenderbuffersOES(
2068 (GLsizei)n,
2069 (GLuint *)renderbuffers
2070 );
2071
2072exit:
2073 if (renderbuffers_base) {
2074 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
2075 _exception ? JNI_ABORT: 0);
2076 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002077 if (_exception) {
2078 jniThrowException(_env, _exceptionType, _exceptionMessage);
2079 }
Jack Palevich27f80022009-04-15 19:13:17 -07002080}
2081
2082/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2083static void
2084android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2085 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002086 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002087 const char * _exceptionType;
2088 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002089 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002090 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002091 jint _remaining;
2092 GLuint *renderbuffers = (GLuint *) 0;
2093
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002094 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002095 if (_remaining < n) {
2096 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002097 _exceptionType = "java/lang/IllegalArgumentException";
2098 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002099 goto exit;
2100 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002101 if (renderbuffers == NULL) {
2102 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2103 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2104 }
Jack Palevich73108672011-03-28 14:49:12 -07002105 glGenRenderbuffersOES(
2106 (GLsizei)n,
2107 (GLuint *)renderbuffers
2108 );
2109
2110exit:
2111 if (_array) {
2112 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
2113 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002114 if (_exception) {
2115 jniThrowException(_env, _exceptionType, _exceptionMessage);
2116 }
Jack Palevich27f80022009-04-15 19:13:17 -07002117}
2118
2119/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2120static void
2121android_glRenderbufferStorageOES__IIII
2122 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002123 glRenderbufferStorageOES(
2124 (GLenum)target,
2125 (GLenum)internalformat,
2126 (GLsizei)width,
2127 (GLsizei)height
2128 );
Jack Palevich27f80022009-04-15 19:13:17 -07002129}
2130
2131/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2132static void
2133android_glGetRenderbufferParameterivOES__II_3II
2134 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002135 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002136 const char * _exceptionType;
2137 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002138 GLint *params_base = (GLint *) 0;
2139 jint _remaining;
2140 GLint *params = (GLint *) 0;
2141
2142 if (!params_ref) {
2143 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002144 _exceptionType = "java/lang/IllegalArgumentException";
2145 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002146 goto exit;
2147 }
2148 if (offset < 0) {
2149 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002150 _exceptionType = "java/lang/IllegalArgumentException";
2151 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002152 goto exit;
2153 }
2154 _remaining = _env->GetArrayLength(params_ref) - offset;
2155 if (_remaining < 1) {
2156 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002157 _exceptionType = "java/lang/IllegalArgumentException";
2158 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002159 goto exit;
2160 }
2161 params_base = (GLint *)
2162 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2163 params = params_base + offset;
2164
2165 glGetRenderbufferParameterivOES(
2166 (GLenum)target,
2167 (GLenum)pname,
2168 (GLint *)params
2169 );
2170
2171exit:
2172 if (params_base) {
2173 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2174 _exception ? JNI_ABORT: 0);
2175 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002176 if (_exception) {
2177 jniThrowException(_env, _exceptionType, _exceptionMessage);
2178 }
Jack Palevich27f80022009-04-15 19:13:17 -07002179}
2180
2181/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2182static void
2183android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2184 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002185 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002186 const char * _exceptionType;
2187 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002188 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002189 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002190 jint _remaining;
2191 GLint *params = (GLint *) 0;
2192
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002193 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002194 if (_remaining < 1) {
2195 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002196 _exceptionType = "java/lang/IllegalArgumentException";
2197 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002198 goto exit;
2199 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002200 if (params == NULL) {
2201 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2202 params = (GLint *) (_paramsBase + _bufferOffset);
2203 }
Jack Palevich73108672011-03-28 14:49:12 -07002204 glGetRenderbufferParameterivOES(
2205 (GLenum)target,
2206 (GLenum)pname,
2207 (GLint *)params
2208 );
2209
2210exit:
2211 if (_array) {
2212 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2213 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002214 if (_exception) {
2215 jniThrowException(_env, _exceptionType, _exceptionMessage);
2216 }
Jack Palevich27f80022009-04-15 19:13:17 -07002217}
2218
2219/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2220static jboolean
2221android_glIsFramebufferOES__I
2222 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002223 GLboolean _returnValue;
2224 _returnValue = glIsFramebufferOES(
2225 (GLuint)framebuffer
2226 );
2227 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002228}
2229
2230/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2231static void
2232android_glBindFramebufferOES__II
2233 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002234 glBindFramebufferOES(
2235 (GLenum)target,
2236 (GLuint)framebuffer
2237 );
Jack Palevich27f80022009-04-15 19:13:17 -07002238}
2239
2240/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2241static void
2242android_glDeleteFramebuffersOES__I_3II
2243 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002244 jint _exception = 0;
2245 const char * _exceptionType;
2246 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002247 GLuint *framebuffers_base = (GLuint *) 0;
2248 jint _remaining;
2249 GLuint *framebuffers = (GLuint *) 0;
2250
2251 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002252 _exception = 1;
2253 _exceptionType = "java/lang/IllegalArgumentException";
2254 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002255 goto exit;
2256 }
2257 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002258 _exception = 1;
2259 _exceptionType = "java/lang/IllegalArgumentException";
2260 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002261 goto exit;
2262 }
2263 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2264 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002265 _exception = 1;
2266 _exceptionType = "java/lang/IllegalArgumentException";
2267 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002268 goto exit;
2269 }
2270 framebuffers_base = (GLuint *)
2271 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2272 framebuffers = framebuffers_base + offset;
2273
2274 glDeleteFramebuffersOES(
2275 (GLsizei)n,
2276 (GLuint *)framebuffers
2277 );
2278
2279exit:
2280 if (framebuffers_base) {
2281 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2282 JNI_ABORT);
2283 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002284 if (_exception) {
2285 jniThrowException(_env, _exceptionType, _exceptionMessage);
2286 }
Jack Palevich27f80022009-04-15 19:13:17 -07002287}
2288
2289/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2290static void
2291android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2292 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002293 jint _exception = 0;
2294 const char * _exceptionType;
2295 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002296 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002297 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002298 jint _remaining;
2299 GLuint *framebuffers = (GLuint *) 0;
2300
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002301 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002302 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002303 _exception = 1;
2304 _exceptionType = "java/lang/IllegalArgumentException";
2305 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002306 goto exit;
2307 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002308 if (framebuffers == NULL) {
2309 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2310 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2311 }
Jack Palevich73108672011-03-28 14:49:12 -07002312 glDeleteFramebuffersOES(
2313 (GLsizei)n,
2314 (GLuint *)framebuffers
2315 );
2316
2317exit:
2318 if (_array) {
2319 releasePointer(_env, _array, framebuffers, JNI_FALSE);
2320 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002321 if (_exception) {
2322 jniThrowException(_env, _exceptionType, _exceptionMessage);
2323 }
Jack Palevich27f80022009-04-15 19:13:17 -07002324}
2325
2326/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2327static void
2328android_glGenFramebuffersOES__I_3II
2329 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002330 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002331 const char * _exceptionType;
2332 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002333 GLuint *framebuffers_base = (GLuint *) 0;
2334 jint _remaining;
2335 GLuint *framebuffers = (GLuint *) 0;
2336
2337 if (!framebuffers_ref) {
2338 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002339 _exceptionType = "java/lang/IllegalArgumentException";
2340 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002341 goto exit;
2342 }
2343 if (offset < 0) {
2344 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002345 _exceptionType = "java/lang/IllegalArgumentException";
2346 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002347 goto exit;
2348 }
2349 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2350 if (_remaining < n) {
2351 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002352 _exceptionType = "java/lang/IllegalArgumentException";
2353 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002354 goto exit;
2355 }
2356 framebuffers_base = (GLuint *)
2357 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2358 framebuffers = framebuffers_base + offset;
2359
2360 glGenFramebuffersOES(
2361 (GLsizei)n,
2362 (GLuint *)framebuffers
2363 );
2364
2365exit:
2366 if (framebuffers_base) {
2367 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2368 _exception ? JNI_ABORT: 0);
2369 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002370 if (_exception) {
2371 jniThrowException(_env, _exceptionType, _exceptionMessage);
2372 }
Jack Palevich27f80022009-04-15 19:13:17 -07002373}
2374
2375/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2376static void
2377android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
2378 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002379 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002380 const char * _exceptionType;
2381 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002382 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002383 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002384 jint _remaining;
2385 GLuint *framebuffers = (GLuint *) 0;
2386
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002387 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002388 if (_remaining < n) {
2389 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002390 _exceptionType = "java/lang/IllegalArgumentException";
2391 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002392 goto exit;
2393 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002394 if (framebuffers == NULL) {
2395 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2396 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2397 }
Jack Palevich73108672011-03-28 14:49:12 -07002398 glGenFramebuffersOES(
2399 (GLsizei)n,
2400 (GLuint *)framebuffers
2401 );
2402
2403exit:
2404 if (_array) {
2405 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
2406 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002407 if (_exception) {
2408 jniThrowException(_env, _exceptionType, _exceptionMessage);
2409 }
Jack Palevich27f80022009-04-15 19:13:17 -07002410}
2411
2412/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
2413static jint
2414android_glCheckFramebufferStatusOES__I
2415 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002416 GLenum _returnValue;
2417 _returnValue = glCheckFramebufferStatusOES(
2418 (GLenum)target
2419 );
2420 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002421}
2422
2423/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
2424static void
2425android_glFramebufferRenderbufferOES__IIII
2426 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002427 glFramebufferRenderbufferOES(
2428 (GLenum)target,
2429 (GLenum)attachment,
2430 (GLenum)renderbuffertarget,
2431 (GLuint)renderbuffer
2432 );
Jack Palevich27f80022009-04-15 19:13:17 -07002433}
2434
2435/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
2436static void
2437android_glFramebufferTexture2DOES__IIIII
2438 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07002439 glFramebufferTexture2DOES(
2440 (GLenum)target,
2441 (GLenum)attachment,
2442 (GLenum)textarget,
2443 (GLuint)texture,
2444 (GLint)level
2445 );
Jack Palevich27f80022009-04-15 19:13:17 -07002446}
2447
2448/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2449static void
2450android_glGetFramebufferAttachmentParameterivOES__III_3II
2451 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002452 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002453 const char * _exceptionType;
2454 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002455 GLint *params_base = (GLint *) 0;
2456 jint _remaining;
2457 GLint *params = (GLint *) 0;
2458
2459 if (!params_ref) {
2460 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002461 _exceptionType = "java/lang/IllegalArgumentException";
2462 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002463 goto exit;
2464 }
2465 if (offset < 0) {
2466 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002467 _exceptionType = "java/lang/IllegalArgumentException";
2468 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002469 goto exit;
2470 }
2471 _remaining = _env->GetArrayLength(params_ref) - offset;
2472 if (_remaining < 1) {
2473 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002474 _exceptionType = "java/lang/IllegalArgumentException";
2475 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002476 goto exit;
2477 }
2478 params_base = (GLint *)
2479 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2480 params = params_base + offset;
2481
2482 glGetFramebufferAttachmentParameterivOES(
2483 (GLenum)target,
2484 (GLenum)attachment,
2485 (GLenum)pname,
2486 (GLint *)params
2487 );
2488
2489exit:
2490 if (params_base) {
2491 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2492 _exception ? JNI_ABORT: 0);
2493 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002494 if (_exception) {
2495 jniThrowException(_env, _exceptionType, _exceptionMessage);
2496 }
Jack Palevich27f80022009-04-15 19:13:17 -07002497}
2498
2499/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2500static void
2501android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
2502 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002503 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002504 const char * _exceptionType;
2505 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002506 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002507 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002508 jint _remaining;
2509 GLint *params = (GLint *) 0;
2510
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002511 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002512 if (_remaining < 1) {
2513 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002514 _exceptionType = "java/lang/IllegalArgumentException";
2515 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002516 goto exit;
2517 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002518 if (params == NULL) {
2519 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2520 params = (GLint *) (_paramsBase + _bufferOffset);
2521 }
Jack Palevich73108672011-03-28 14:49:12 -07002522 glGetFramebufferAttachmentParameterivOES(
2523 (GLenum)target,
2524 (GLenum)attachment,
2525 (GLenum)pname,
2526 (GLint *)params
2527 );
2528
2529exit:
2530 if (_array) {
2531 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2532 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002533 if (_exception) {
2534 jniThrowException(_env, _exceptionType, _exceptionMessage);
2535 }
Jack Palevich27f80022009-04-15 19:13:17 -07002536}
2537
2538/* void glGenerateMipmapOES ( GLenum target ) */
2539static void
2540android_glGenerateMipmapOES__I
2541 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002542 glGenerateMipmapOES(
2543 (GLenum)target
2544 );
Jack Palevich27f80022009-04-15 19:13:17 -07002545}
2546
2547/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
2548static void
2549android_glCurrentPaletteMatrixOES__I
2550 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002551 glCurrentPaletteMatrixOES(
2552 (GLuint)matrixpaletteindex
2553 );
Jack Palevich27f80022009-04-15 19:13:17 -07002554}
2555
2556/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
2557static void
2558android_glLoadPaletteFromModelViewMatrixOES__
2559 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002560 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07002561}
2562
2563/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2564static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002565android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
2566 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2567 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002568 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002569 jint _remaining;
2570 GLvoid *pointer = (GLvoid *) 0;
2571
2572 if (pointer_buf) {
2573 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2574 if ( ! pointer ) {
2575 return;
2576 }
2577 }
2578 glMatrixIndexPointerOESBounds(
2579 (GLint)size,
2580 (GLenum)type,
2581 (GLsizei)stride,
2582 (GLvoid *)pointer,
2583 (GLsizei)remaining
2584 );
Jack Palevich27f80022009-04-15 19:13:17 -07002585}
2586
2587/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2588static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002589android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
2590 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2591 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002592 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002593 jint _remaining;
2594 GLvoid *pointer = (GLvoid *) 0;
2595
2596 if (pointer_buf) {
2597 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2598 if ( ! pointer ) {
2599 return;
2600 }
2601 }
2602 glWeightPointerOESBounds(
2603 (GLint)size,
2604 (GLenum)type,
2605 (GLsizei)stride,
2606 (GLvoid *)pointer,
2607 (GLsizei)remaining
2608 );
Jack Palevich27f80022009-04-15 19:13:17 -07002609}
2610
2611/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
2612static void
2613android_glDepthRangefOES__FF
2614 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002615 glDepthRangefOES(
2616 (GLclampf)zNear,
2617 (GLclampf)zFar
2618 );
Jack Palevich27f80022009-04-15 19:13:17 -07002619}
2620
2621/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2622static void
2623android_glFrustumfOES__FFFFFF
2624 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002625 glFrustumfOES(
2626 (GLfloat)left,
2627 (GLfloat)right,
2628 (GLfloat)bottom,
2629 (GLfloat)top,
2630 (GLfloat)zNear,
2631 (GLfloat)zFar
2632 );
Jack Palevich27f80022009-04-15 19:13:17 -07002633}
2634
2635/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2636static void
2637android_glOrthofOES__FFFFFF
2638 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002639 glOrthofOES(
2640 (GLfloat)left,
2641 (GLfloat)right,
2642 (GLfloat)bottom,
2643 (GLfloat)top,
2644 (GLfloat)zNear,
2645 (GLfloat)zFar
2646 );
Jack Palevich27f80022009-04-15 19:13:17 -07002647}
2648
2649/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2650static void
2651android_glClipPlanefOES__I_3FI
2652 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002653 jint _exception = 0;
2654 const char * _exceptionType;
2655 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002656 GLfloat *equation_base = (GLfloat *) 0;
2657 jint _remaining;
2658 GLfloat *equation = (GLfloat *) 0;
2659
2660 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002661 _exception = 1;
2662 _exceptionType = "java/lang/IllegalArgumentException";
2663 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002664 goto exit;
2665 }
2666 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002667 _exception = 1;
2668 _exceptionType = "java/lang/IllegalArgumentException";
2669 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002670 goto exit;
2671 }
2672 _remaining = _env->GetArrayLength(equation_ref) - offset;
2673 equation_base = (GLfloat *)
2674 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
2675 equation = equation_base + offset;
2676
2677 glClipPlanefOES(
2678 (GLenum)plane,
2679 (GLfloat *)equation
2680 );
2681
2682exit:
2683 if (equation_base) {
2684 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
2685 JNI_ABORT);
2686 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002687 if (_exception) {
2688 jniThrowException(_env, _exceptionType, _exceptionMessage);
2689 }
Jack Palevich27f80022009-04-15 19:13:17 -07002690}
2691
2692/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2693static void
2694android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
2695 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002696 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002697 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002698 jint _remaining;
2699 GLfloat *equation = (GLfloat *) 0;
2700
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002701 equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
2702 if (equation == NULL) {
2703 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2704 equation = (GLfloat *) (_equationBase + _bufferOffset);
2705 }
Jack Palevicha3795852009-04-24 10:35:11 -07002706 glClipPlanefOES(
2707 (GLenum)plane,
2708 (GLfloat *)equation
2709 );
2710 if (_array) {
2711 releasePointer(_env, _array, equation, JNI_FALSE);
2712 }
Jack Palevich27f80022009-04-15 19:13:17 -07002713}
2714
2715/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2716static void
2717android_glGetClipPlanefOES__I_3FI
2718 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002719 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002720 const char * _exceptionType;
2721 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002722 GLfloat *eqn_base = (GLfloat *) 0;
2723 jint _remaining;
2724 GLfloat *eqn = (GLfloat *) 0;
2725
2726 if (!eqn_ref) {
2727 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002728 _exceptionType = "java/lang/IllegalArgumentException";
2729 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002730 goto exit;
2731 }
2732 if (offset < 0) {
2733 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002734 _exceptionType = "java/lang/IllegalArgumentException";
2735 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002736 goto exit;
2737 }
2738 _remaining = _env->GetArrayLength(eqn_ref) - offset;
2739 if (_remaining < 4) {
2740 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002741 _exceptionType = "java/lang/IllegalArgumentException";
2742 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002743 goto exit;
2744 }
2745 eqn_base = (GLfloat *)
2746 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
2747 eqn = eqn_base + offset;
2748
2749 glGetClipPlanefOES(
2750 (GLenum)pname,
2751 (GLfloat *)eqn
2752 );
2753
2754exit:
2755 if (eqn_base) {
2756 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
2757 _exception ? JNI_ABORT: 0);
2758 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002759 if (_exception) {
2760 jniThrowException(_env, _exceptionType, _exceptionMessage);
2761 }
Jack Palevich27f80022009-04-15 19:13:17 -07002762}
2763
2764/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2765static void
2766android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
2767 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002768 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002769 const char * _exceptionType;
2770 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002771 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002772 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002773 jint _remaining;
2774 GLfloat *eqn = (GLfloat *) 0;
2775
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002776 eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07002777 if (_remaining < 4) {
2778 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002779 _exceptionType = "java/lang/IllegalArgumentException";
2780 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002781 goto exit;
2782 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002783 if (eqn == NULL) {
2784 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2785 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
2786 }
Jack Palevicha3795852009-04-24 10:35:11 -07002787 glGetClipPlanefOES(
2788 (GLenum)pname,
2789 (GLfloat *)eqn
2790 );
2791
2792exit:
2793 if (_array) {
2794 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
2795 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002796 if (_exception) {
2797 jniThrowException(_env, _exceptionType, _exceptionMessage);
2798 }
Jack Palevich27f80022009-04-15 19:13:17 -07002799}
2800
2801/* void glClearDepthfOES ( GLclampf depth ) */
2802static void
2803android_glClearDepthfOES__F
2804 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07002805 glClearDepthfOES(
2806 (GLclampf)depth
2807 );
Jack Palevich27f80022009-04-15 19:13:17 -07002808}
2809
2810/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
2811static void
2812android_glTexGenfOES__IIF
2813 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002814 glTexGenfOES(
2815 (GLenum)coord,
2816 (GLenum)pname,
2817 (GLfloat)param
2818 );
Jack Palevich27f80022009-04-15 19:13:17 -07002819}
2820
2821/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
2822static void
2823android_glTexGenfvOES__II_3FI
2824 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002825 jint _exception = 0;
2826 const char * _exceptionType;
2827 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002828 GLfloat *params_base = (GLfloat *) 0;
2829 jint _remaining;
2830 GLfloat *params = (GLfloat *) 0;
2831
2832 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002833 _exception = 1;
2834 _exceptionType = "java/lang/IllegalArgumentException";
2835 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002836 goto exit;
2837 }
2838 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002839 _exception = 1;
2840 _exceptionType = "java/lang/IllegalArgumentException";
2841 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002842 goto exit;
2843 }
2844 _remaining = _env->GetArrayLength(params_ref) - offset;
2845 params_base = (GLfloat *)
2846 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2847 params = params_base + offset;
2848
2849 glTexGenfvOES(
2850 (GLenum)coord,
2851 (GLenum)pname,
2852 (GLfloat *)params
2853 );
2854
2855exit:
2856 if (params_base) {
2857 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2858 JNI_ABORT);
2859 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002860 if (_exception) {
2861 jniThrowException(_env, _exceptionType, _exceptionMessage);
2862 }
Jack Palevich27f80022009-04-15 19:13:17 -07002863}
2864
2865/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
2866static void
2867android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
2868 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002869 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002870 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002871 jint _remaining;
2872 GLfloat *params = (GLfloat *) 0;
2873
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002874 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2875 if (params == NULL) {
2876 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2877 params = (GLfloat *) (_paramsBase + _bufferOffset);
2878 }
Jack Palevicha3795852009-04-24 10:35:11 -07002879 glTexGenfvOES(
2880 (GLenum)coord,
2881 (GLenum)pname,
2882 (GLfloat *)params
2883 );
2884 if (_array) {
2885 releasePointer(_env, _array, params, JNI_FALSE);
2886 }
Jack Palevich27f80022009-04-15 19:13:17 -07002887}
2888
2889/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
2890static void
2891android_glTexGeniOES__III
2892 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002893 glTexGeniOES(
2894 (GLenum)coord,
2895 (GLenum)pname,
2896 (GLint)param
2897 );
Jack Palevich27f80022009-04-15 19:13:17 -07002898}
2899
2900/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
2901static void
2902android_glTexGenivOES__II_3II
2903 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002904 jint _exception = 0;
2905 const char * _exceptionType;
2906 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002907 GLint *params_base = (GLint *) 0;
2908 jint _remaining;
2909 GLint *params = (GLint *) 0;
2910
2911 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002912 _exception = 1;
2913 _exceptionType = "java/lang/IllegalArgumentException";
2914 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002915 goto exit;
2916 }
2917 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002918 _exception = 1;
2919 _exceptionType = "java/lang/IllegalArgumentException";
2920 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002921 goto exit;
2922 }
2923 _remaining = _env->GetArrayLength(params_ref) - offset;
2924 params_base = (GLint *)
2925 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2926 params = params_base + offset;
2927
2928 glTexGenivOES(
2929 (GLenum)coord,
2930 (GLenum)pname,
2931 (GLint *)params
2932 );
2933
2934exit:
2935 if (params_base) {
2936 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2937 JNI_ABORT);
2938 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002939 if (_exception) {
2940 jniThrowException(_env, _exceptionType, _exceptionMessage);
2941 }
Jack Palevich27f80022009-04-15 19:13:17 -07002942}
2943
2944/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
2945static void
2946android_glTexGenivOES__IILjava_nio_IntBuffer_2
2947 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002948 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002949 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002950 jint _remaining;
2951 GLint *params = (GLint *) 0;
2952
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002953 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2954 if (params == NULL) {
2955 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2956 params = (GLint *) (_paramsBase + _bufferOffset);
2957 }
Jack Palevicha3795852009-04-24 10:35:11 -07002958 glTexGenivOES(
2959 (GLenum)coord,
2960 (GLenum)pname,
2961 (GLint *)params
2962 );
2963 if (_array) {
2964 releasePointer(_env, _array, params, JNI_FALSE);
2965 }
Jack Palevich27f80022009-04-15 19:13:17 -07002966}
2967
2968/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
2969static void
2970android_glTexGenxOES__III
2971 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002972 glTexGenxOES(
2973 (GLenum)coord,
2974 (GLenum)pname,
2975 (GLfixed)param
2976 );
Jack Palevich27f80022009-04-15 19:13:17 -07002977}
2978
2979/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
2980static void
2981android_glTexGenxvOES__II_3II
2982 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002983 jint _exception = 0;
2984 const char * _exceptionType;
2985 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002986 GLfixed *params_base = (GLfixed *) 0;
2987 jint _remaining;
2988 GLfixed *params = (GLfixed *) 0;
2989
2990 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002991 _exception = 1;
2992 _exceptionType = "java/lang/IllegalArgumentException";
2993 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002994 goto exit;
2995 }
2996 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002997 _exception = 1;
2998 _exceptionType = "java/lang/IllegalArgumentException";
2999 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003000 goto exit;
3001 }
3002 _remaining = _env->GetArrayLength(params_ref) - offset;
3003 params_base = (GLfixed *)
3004 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3005 params = params_base + offset;
3006
3007 glTexGenxvOES(
3008 (GLenum)coord,
3009 (GLenum)pname,
3010 (GLfixed *)params
3011 );
3012
3013exit:
3014 if (params_base) {
3015 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3016 JNI_ABORT);
3017 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003018 if (_exception) {
3019 jniThrowException(_env, _exceptionType, _exceptionMessage);
3020 }
Jack Palevich27f80022009-04-15 19:13:17 -07003021}
3022
3023/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3024static void
3025android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3026 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003027 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003028 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003029 jint _remaining;
3030 GLfixed *params = (GLfixed *) 0;
3031
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003032 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3033 if (params == NULL) {
3034 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3035 params = (GLfixed *) (_paramsBase + _bufferOffset);
3036 }
Jack Palevicha3795852009-04-24 10:35:11 -07003037 glTexGenxvOES(
3038 (GLenum)coord,
3039 (GLenum)pname,
3040 (GLfixed *)params
3041 );
3042 if (_array) {
3043 releasePointer(_env, _array, params, JNI_FALSE);
3044 }
Jack Palevich27f80022009-04-15 19:13:17 -07003045}
3046
3047/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3048static void
3049android_glGetTexGenfvOES__II_3FI
3050 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003051 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003052 const char * _exceptionType;
3053 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07003054 GLfloat *params_base = (GLfloat *) 0;
3055 jint _remaining;
3056 GLfloat *params = (GLfloat *) 0;
3057
3058 if (!params_ref) {
3059 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003060 _exceptionType = "java/lang/IllegalArgumentException";
3061 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003062 goto exit;
3063 }
3064 if (offset < 0) {
3065 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003066 _exceptionType = "java/lang/IllegalArgumentException";
3067 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003068 goto exit;
3069 }
3070 _remaining = _env->GetArrayLength(params_ref) - offset;
3071 params_base = (GLfloat *)
3072 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3073 params = params_base + offset;
3074
3075 glGetTexGenfvOES(
3076 (GLenum)coord,
3077 (GLenum)pname,
3078 (GLfloat *)params
3079 );
3080
3081exit:
3082 if (params_base) {
3083 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3084 _exception ? JNI_ABORT: 0);
3085 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003086 if (_exception) {
3087 jniThrowException(_env, _exceptionType, _exceptionMessage);
3088 }
Jack Palevich27f80022009-04-15 19:13:17 -07003089}
3090
3091/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3092static void
3093android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3094 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003095 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003096 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003097 jint _remaining;
3098 GLfloat *params = (GLfloat *) 0;
3099
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003100 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3101 if (params == NULL) {
3102 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3103 params = (GLfloat *) (_paramsBase + _bufferOffset);
3104 }
Jack Palevicha3795852009-04-24 10:35:11 -07003105 glGetTexGenfvOES(
3106 (GLenum)coord,
3107 (GLenum)pname,
3108 (GLfloat *)params
3109 );
3110 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003111 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003112 }
Jack Palevich27f80022009-04-15 19:13:17 -07003113}
3114
3115/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3116static void
3117android_glGetTexGenivOES__II_3II
3118 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003119 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003120 const char * _exceptionType;
3121 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07003122 GLint *params_base = (GLint *) 0;
3123 jint _remaining;
3124 GLint *params = (GLint *) 0;
3125
3126 if (!params_ref) {
3127 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003128 _exceptionType = "java/lang/IllegalArgumentException";
3129 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003130 goto exit;
3131 }
3132 if (offset < 0) {
3133 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003134 _exceptionType = "java/lang/IllegalArgumentException";
3135 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003136 goto exit;
3137 }
3138 _remaining = _env->GetArrayLength(params_ref) - offset;
3139 params_base = (GLint *)
3140 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3141 params = params_base + offset;
3142
3143 glGetTexGenivOES(
3144 (GLenum)coord,
3145 (GLenum)pname,
3146 (GLint *)params
3147 );
3148
3149exit:
3150 if (params_base) {
3151 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3152 _exception ? JNI_ABORT: 0);
3153 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003154 if (_exception) {
3155 jniThrowException(_env, _exceptionType, _exceptionMessage);
3156 }
Jack Palevich27f80022009-04-15 19:13:17 -07003157}
3158
3159/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3160static void
3161android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3162 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003163 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003164 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003165 jint _remaining;
3166 GLint *params = (GLint *) 0;
3167
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003168 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3169 if (params == NULL) {
3170 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3171 params = (GLint *) (_paramsBase + _bufferOffset);
3172 }
Jack Palevicha3795852009-04-24 10:35:11 -07003173 glGetTexGenivOES(
3174 (GLenum)coord,
3175 (GLenum)pname,
3176 (GLint *)params
3177 );
3178 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003179 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003180 }
Jack Palevich27f80022009-04-15 19:13:17 -07003181}
3182
3183/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3184static void
3185android_glGetTexGenxvOES__II_3II
3186 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003187 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003188 const char * _exceptionType;
3189 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07003190 GLfixed *params_base = (GLfixed *) 0;
3191 jint _remaining;
3192 GLfixed *params = (GLfixed *) 0;
3193
3194 if (!params_ref) {
3195 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003196 _exceptionType = "java/lang/IllegalArgumentException";
3197 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003198 goto exit;
3199 }
3200 if (offset < 0) {
3201 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003202 _exceptionType = "java/lang/IllegalArgumentException";
3203 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003204 goto exit;
3205 }
3206 _remaining = _env->GetArrayLength(params_ref) - offset;
3207 params_base = (GLfixed *)
3208 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3209 params = params_base + offset;
3210
3211 glGetTexGenxvOES(
3212 (GLenum)coord,
3213 (GLenum)pname,
3214 (GLfixed *)params
3215 );
3216
3217exit:
3218 if (params_base) {
3219 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3220 _exception ? JNI_ABORT: 0);
3221 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003222 if (_exception) {
3223 jniThrowException(_env, _exceptionType, _exceptionMessage);
3224 }
Jack Palevich27f80022009-04-15 19:13:17 -07003225}
3226
3227/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3228static void
3229android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3230 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003231 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003232 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003233 jint _remaining;
3234 GLfixed *params = (GLfixed *) 0;
3235
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003236 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3237 if (params == NULL) {
3238 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3239 params = (GLfixed *) (_paramsBase + _bufferOffset);
3240 }
Jack Palevicha3795852009-04-24 10:35:11 -07003241 glGetTexGenxvOES(
3242 (GLenum)coord,
3243 (GLenum)pname,
3244 (GLfixed *)params
3245 );
3246 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003247 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003248 }
Jack Palevich27f80022009-04-15 19:13:17 -07003249}
3250
3251static const char *classPathName = "android/opengl/GLES11Ext";
3252
3253static JNINativeMethod methods[] = {
3254{"_nativeClassInit", "()V", (void*)nativeClassInit },
3255{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
3256{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
3257{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
3258{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
3259{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
3260{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
3261{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
3262{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
3263{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
3264{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
3265{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
3266{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
3267{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
3268{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
3269{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
3270{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
3271{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
3272{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
3273{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
3274{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
3275{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
3276{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
3277{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
3278{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
3279{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
3280{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
3281{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
3282{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
3283{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
3284{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
3285{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
3286{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
3287{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
3288{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
3289{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
3290{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
3291{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
3292{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3293{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
3294{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3295{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
3296{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
3297{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
3298{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
3299{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
3300{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
3301{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
3302{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
3303{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
3304{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
3305{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
3306{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
3307{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
3308{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
3309{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
3310{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
3311{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
3312{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
3313{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
3314{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
3315{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
3316{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
3317{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
3318{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
3319{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
3320{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
3321{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
3322{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3323{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
3324{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
3325{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3326{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
3327{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
3328{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
3329{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
3330{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3331{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
3332{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3333{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
3334{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
3335{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
3336{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
3337{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
3338{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
3339{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
3340{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
3341{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
3342{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
3343{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
3344{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
3345{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
3346{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
3347{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
3348{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
3349{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08003350{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
3351{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07003352{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
3353{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
3354{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
3355{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
3356{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3357{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
3358{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3359{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
3360{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
3361{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
3362{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3363{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
3364{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
3365{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
3366{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
3367{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
3368{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
3369{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
3370{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3371{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
3372{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
3373{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
3374{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
3375};
3376
3377int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
3378{
3379 int err;
3380 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3381 return err;
3382}