blob: a05f809a6d55cef1c3b9e448c37634e06ec4c4c0 [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 *
75getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
76{
77 jint position;
78 jint limit;
79 jint elementSizeShift;
80 jlong pointer;
81 jint offset;
82 void *data;
83
84 position = _env->GetIntField(buffer, positionID);
85 limit = _env->GetIntField(buffer, limitID);
86 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
87 *remaining = (limit - position) << elementSizeShift;
88 pointer = _env->CallStaticLongMethod(nioAccessClass,
89 getBasePointerID, buffer);
90 if (pointer != 0L) {
91 *array = NULL;
92 return (void *) (jint) pointer;
93 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070094
Jack Palevich27f80022009-04-15 19:13:17 -070095 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
96 getBaseArrayID, buffer);
97 offset = _env->CallStaticIntMethod(nioAccessClass,
98 getBaseArrayOffsetID, buffer);
99 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700100
Jack Palevich27f80022009-04-15 19:13:17 -0700101 return (void *) ((char *) data + offset);
102}
103
104
105static void
106releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
107{
108 _env->ReleasePrimitiveArrayCritical(array, data,
109 commit ? 0 : JNI_ABORT);
110}
111
Jack Palevichbe6eac82009-12-08 15:43:51 +0800112static void *
113getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
114 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
115 if (buf) {
116 jint position = _env->GetIntField(buffer, positionID);
117 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
118 buf += position << elementSizeShift;
119 } else {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700120 jniThrowException(_env, "java/lang/IllegalArgumentException",
121 "Must use a native order direct Buffer");
Jack Palevichbe6eac82009-12-08 15:43:51 +0800122 }
123 return (void*) buf;
124}
Jack Palevich27f80022009-04-15 19:13:17 -0700125// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700126/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
127static void
128android_glBlendEquationSeparateOES__II
129 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700130 glBlendEquationSeparateOES(
131 (GLenum)modeRGB,
132 (GLenum)modeAlpha
133 );
Jack Palevich27f80022009-04-15 19:13:17 -0700134}
135
136/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
137static void
138android_glBlendFuncSeparateOES__IIII
139 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700140 glBlendFuncSeparateOES(
141 (GLenum)srcRGB,
142 (GLenum)dstRGB,
143 (GLenum)srcAlpha,
144 (GLenum)dstAlpha
145 );
Jack Palevich27f80022009-04-15 19:13:17 -0700146}
147
148/* void glBlendEquationOES ( GLenum mode ) */
149static void
150android_glBlendEquationOES__I
151 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700152 glBlendEquationOES(
153 (GLenum)mode
154 );
Jack Palevich27f80022009-04-15 19:13:17 -0700155}
156
157/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
158static void
159android_glDrawTexsOES__SSSSS
160 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
161 glDrawTexsOES(
162 (GLshort)x,
163 (GLshort)y,
164 (GLshort)z,
165 (GLshort)width,
166 (GLshort)height
167 );
168}
169
170/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
171static void
172android_glDrawTexiOES__IIIII
173 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
174 glDrawTexiOES(
175 (GLint)x,
176 (GLint)y,
177 (GLint)z,
178 (GLint)width,
179 (GLint)height
180 );
181}
182
183/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
184static void
185android_glDrawTexxOES__IIIII
186 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
187 glDrawTexxOES(
188 (GLfixed)x,
189 (GLfixed)y,
190 (GLfixed)z,
191 (GLfixed)width,
192 (GLfixed)height
193 );
194}
195
196/* void glDrawTexsvOES ( const GLshort *coords ) */
197static void
198android_glDrawTexsvOES___3SI
199 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700200 jint _exception = 0;
201 const char * _exceptionType;
202 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700203 GLshort *coords_base = (GLshort *) 0;
204 jint _remaining;
205 GLshort *coords = (GLshort *) 0;
206
207 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700208 _exception = 1;
209 _exceptionType = "java/lang/IllegalArgumentException";
210 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700211 goto exit;
212 }
213 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700214 _exception = 1;
215 _exceptionType = "java/lang/IllegalArgumentException";
216 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700217 goto exit;
218 }
219 _remaining = _env->GetArrayLength(coords_ref) - offset;
220 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700221 _exception = 1;
222 _exceptionType = "java/lang/IllegalArgumentException";
223 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700224 goto exit;
225 }
226 coords_base = (GLshort *)
227 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
228 coords = coords_base + offset;
229
230 glDrawTexsvOES(
231 (GLshort *)coords
232 );
233
234exit:
235 if (coords_base) {
236 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
237 JNI_ABORT);
238 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700239 if (_exception) {
240 jniThrowException(_env, _exceptionType, _exceptionMessage);
241 }
Jack Palevich27f80022009-04-15 19:13:17 -0700242}
243
244/* void glDrawTexsvOES ( const GLshort *coords ) */
245static void
246android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
247 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700248 jint _exception = 0;
249 const char * _exceptionType;
250 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700251 jarray _array = (jarray) 0;
252 jint _remaining;
253 GLshort *coords = (GLshort *) 0;
254
255 coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
256 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700257 _exception = 1;
258 _exceptionType = "java/lang/IllegalArgumentException";
259 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700260 goto exit;
261 }
262 glDrawTexsvOES(
263 (GLshort *)coords
264 );
265
266exit:
267 if (_array) {
268 releasePointer(_env, _array, coords, JNI_FALSE);
269 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700270 if (_exception) {
271 jniThrowException(_env, _exceptionType, _exceptionMessage);
272 }
Jack Palevich27f80022009-04-15 19:13:17 -0700273}
274
275/* void glDrawTexivOES ( const GLint *coords ) */
276static void
277android_glDrawTexivOES___3II
278 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700279 jint _exception = 0;
280 const char * _exceptionType;
281 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700282 GLint *coords_base = (GLint *) 0;
283 jint _remaining;
284 GLint *coords = (GLint *) 0;
285
286 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700287 _exception = 1;
288 _exceptionType = "java/lang/IllegalArgumentException";
289 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700290 goto exit;
291 }
292 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700293 _exception = 1;
294 _exceptionType = "java/lang/IllegalArgumentException";
295 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700296 goto exit;
297 }
298 _remaining = _env->GetArrayLength(coords_ref) - offset;
299 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700300 _exception = 1;
301 _exceptionType = "java/lang/IllegalArgumentException";
302 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700303 goto exit;
304 }
305 coords_base = (GLint *)
306 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
307 coords = coords_base + offset;
308
309 glDrawTexivOES(
310 (GLint *)coords
311 );
312
313exit:
314 if (coords_base) {
315 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
316 JNI_ABORT);
317 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700318 if (_exception) {
319 jniThrowException(_env, _exceptionType, _exceptionMessage);
320 }
Jack Palevich27f80022009-04-15 19:13:17 -0700321}
322
323/* void glDrawTexivOES ( const GLint *coords ) */
324static void
325android_glDrawTexivOES__Ljava_nio_IntBuffer_2
326 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700327 jint _exception = 0;
328 const char * _exceptionType;
329 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700330 jarray _array = (jarray) 0;
331 jint _remaining;
332 GLint *coords = (GLint *) 0;
333
334 coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
335 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700336 _exception = 1;
337 _exceptionType = "java/lang/IllegalArgumentException";
338 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700339 goto exit;
340 }
341 glDrawTexivOES(
342 (GLint *)coords
343 );
344
345exit:
346 if (_array) {
347 releasePointer(_env, _array, coords, JNI_FALSE);
348 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700349 if (_exception) {
350 jniThrowException(_env, _exceptionType, _exceptionMessage);
351 }
Jack Palevich27f80022009-04-15 19:13:17 -0700352}
353
354/* void glDrawTexxvOES ( const GLfixed *coords ) */
355static void
356android_glDrawTexxvOES___3II
357 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700358 jint _exception = 0;
359 const char * _exceptionType;
360 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700361 GLfixed *coords_base = (GLfixed *) 0;
362 jint _remaining;
363 GLfixed *coords = (GLfixed *) 0;
364
365 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700366 _exception = 1;
367 _exceptionType = "java/lang/IllegalArgumentException";
368 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700369 goto exit;
370 }
371 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700372 _exception = 1;
373 _exceptionType = "java/lang/IllegalArgumentException";
374 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700375 goto exit;
376 }
377 _remaining = _env->GetArrayLength(coords_ref) - offset;
378 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700379 _exception = 1;
380 _exceptionType = "java/lang/IllegalArgumentException";
381 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700382 goto exit;
383 }
384 coords_base = (GLfixed *)
385 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
386 coords = coords_base + offset;
387
388 glDrawTexxvOES(
389 (GLfixed *)coords
390 );
391
392exit:
393 if (coords_base) {
394 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
395 JNI_ABORT);
396 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700397 if (_exception) {
398 jniThrowException(_env, _exceptionType, _exceptionMessage);
399 }
Jack Palevich27f80022009-04-15 19:13:17 -0700400}
401
402/* void glDrawTexxvOES ( const GLfixed *coords ) */
403static void
404android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
405 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700406 jint _exception = 0;
407 const char * _exceptionType;
408 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700409 jarray _array = (jarray) 0;
410 jint _remaining;
411 GLfixed *coords = (GLfixed *) 0;
412
413 coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
414 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700415 _exception = 1;
416 _exceptionType = "java/lang/IllegalArgumentException";
417 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700418 goto exit;
419 }
420 glDrawTexxvOES(
421 (GLfixed *)coords
422 );
423
424exit:
425 if (_array) {
426 releasePointer(_env, _array, coords, JNI_FALSE);
427 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700428 if (_exception) {
429 jniThrowException(_env, _exceptionType, _exceptionMessage);
430 }
Jack Palevich27f80022009-04-15 19:13:17 -0700431}
432
433/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
434static void
435android_glDrawTexfOES__FFFFF
436 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
437 glDrawTexfOES(
438 (GLfloat)x,
439 (GLfloat)y,
440 (GLfloat)z,
441 (GLfloat)width,
442 (GLfloat)height
443 );
444}
445
446/* void glDrawTexfvOES ( const GLfloat *coords ) */
447static void
448android_glDrawTexfvOES___3FI
449 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700450 jint _exception = 0;
451 const char * _exceptionType;
452 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700453 GLfloat *coords_base = (GLfloat *) 0;
454 jint _remaining;
455 GLfloat *coords = (GLfloat *) 0;
456
457 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700458 _exception = 1;
459 _exceptionType = "java/lang/IllegalArgumentException";
460 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700461 goto exit;
462 }
463 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700464 _exception = 1;
465 _exceptionType = "java/lang/IllegalArgumentException";
466 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700467 goto exit;
468 }
469 _remaining = _env->GetArrayLength(coords_ref) - offset;
470 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700471 _exception = 1;
472 _exceptionType = "java/lang/IllegalArgumentException";
473 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700474 goto exit;
475 }
476 coords_base = (GLfloat *)
477 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
478 coords = coords_base + offset;
479
480 glDrawTexfvOES(
481 (GLfloat *)coords
482 );
483
484exit:
485 if (coords_base) {
486 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
487 JNI_ABORT);
488 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700489 if (_exception) {
490 jniThrowException(_env, _exceptionType, _exceptionMessage);
491 }
Jack Palevich27f80022009-04-15 19:13:17 -0700492}
493
494/* void glDrawTexfvOES ( const GLfloat *coords ) */
495static void
496android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
497 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700498 jint _exception = 0;
499 const char * _exceptionType;
500 const char * _exceptionMessage;
Jack Palevich27f80022009-04-15 19:13:17 -0700501 jarray _array = (jarray) 0;
502 jint _remaining;
503 GLfloat *coords = (GLfloat *) 0;
504
505 coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
506 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700507 _exception = 1;
508 _exceptionType = "java/lang/IllegalArgumentException";
509 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700510 goto exit;
511 }
512 glDrawTexfvOES(
513 (GLfloat *)coords
514 );
515
516exit:
517 if (_array) {
518 releasePointer(_env, _array, coords, JNI_FALSE);
519 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700520 if (_exception) {
521 jniThrowException(_env, _exceptionType, _exceptionMessage);
522 }
Jack Palevich27f80022009-04-15 19:13:17 -0700523}
524
525/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
526static void
527android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
528 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700529 jarray _array = (jarray) 0;
530 jint _remaining;
531 GLeglImageOES image = (GLeglImageOES) 0;
532
533 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining);
534 glEGLImageTargetTexture2DOES(
535 (GLenum)target,
536 (GLeglImageOES)image
537 );
538 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700539 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700540 }
Jack Palevich27f80022009-04-15 19:13:17 -0700541}
542
543/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
544static void
545android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
546 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700547 jarray _array = (jarray) 0;
548 jint _remaining;
549 GLeglImageOES image = (GLeglImageOES) 0;
550
551 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining);
552 glEGLImageTargetRenderbufferStorageOES(
553 (GLenum)target,
554 (GLeglImageOES)image
555 );
556 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700557 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700558 }
Jack Palevich27f80022009-04-15 19:13:17 -0700559}
560
561/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
562static void
563android_glAlphaFuncxOES__II
564 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700565 glAlphaFuncxOES(
566 (GLenum)func,
567 (GLclampx)ref
568 );
Jack Palevich27f80022009-04-15 19:13:17 -0700569}
570
571/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
572static void
573android_glClearColorxOES__IIII
574 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700575 glClearColorxOES(
576 (GLclampx)red,
577 (GLclampx)green,
578 (GLclampx)blue,
579 (GLclampx)alpha
580 );
Jack Palevich27f80022009-04-15 19:13:17 -0700581}
582
583/* void glClearDepthxOES ( GLclampx depth ) */
584static void
585android_glClearDepthxOES__I
586 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700587 glClearDepthxOES(
588 (GLclampx)depth
589 );
Jack Palevich27f80022009-04-15 19:13:17 -0700590}
591
592/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
593static void
594android_glClipPlanexOES__I_3II
595 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700596 jint _exception = 0;
597 const char * _exceptionType;
598 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700599 GLfixed *equation_base = (GLfixed *) 0;
600 jint _remaining;
601 GLfixed *equation = (GLfixed *) 0;
602
603 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700604 _exception = 1;
605 _exceptionType = "java/lang/IllegalArgumentException";
606 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700607 goto exit;
608 }
609 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700610 _exception = 1;
611 _exceptionType = "java/lang/IllegalArgumentException";
612 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700613 goto exit;
614 }
615 _remaining = _env->GetArrayLength(equation_ref) - offset;
616 equation_base = (GLfixed *)
617 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
618 equation = equation_base + offset;
619
620 glClipPlanexOES(
621 (GLenum)plane,
622 (GLfixed *)equation
623 );
624
625exit:
626 if (equation_base) {
627 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
628 JNI_ABORT);
629 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700630 if (_exception) {
631 jniThrowException(_env, _exceptionType, _exceptionMessage);
632 }
Jack Palevich27f80022009-04-15 19:13:17 -0700633}
634
635/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
636static void
637android_glClipPlanexOES__ILjava_nio_IntBuffer_2
638 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700639 jarray _array = (jarray) 0;
640 jint _remaining;
641 GLfixed *equation = (GLfixed *) 0;
642
643 equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
644 glClipPlanexOES(
645 (GLenum)plane,
646 (GLfixed *)equation
647 );
648 if (_array) {
649 releasePointer(_env, _array, equation, JNI_FALSE);
650 }
Jack Palevich27f80022009-04-15 19:13:17 -0700651}
652
653/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
654static void
655android_glColor4xOES__IIII
656 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700657 glColor4xOES(
658 (GLfixed)red,
659 (GLfixed)green,
660 (GLfixed)blue,
661 (GLfixed)alpha
662 );
Jack Palevich27f80022009-04-15 19:13:17 -0700663}
664
665/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
666static void
667android_glDepthRangexOES__II
668 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700669 glDepthRangexOES(
670 (GLclampx)zNear,
671 (GLclampx)zFar
672 );
Jack Palevich27f80022009-04-15 19:13:17 -0700673}
674
675/* void glFogxOES ( GLenum pname, GLfixed param ) */
676static void
677android_glFogxOES__II
678 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -0700679 glFogxOES(
680 (GLenum)pname,
681 (GLfixed)param
682 );
Jack Palevich27f80022009-04-15 19:13:17 -0700683}
684
685/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
686static void
687android_glFogxvOES__I_3II
688 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700689 jint _exception = 0;
690 const char * _exceptionType;
691 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700692 GLfixed *params_base = (GLfixed *) 0;
693 jint _remaining;
694 GLfixed *params = (GLfixed *) 0;
695
696 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700697 _exception = 1;
698 _exceptionType = "java/lang/IllegalArgumentException";
699 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700700 goto exit;
701 }
702 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700703 _exception = 1;
704 _exceptionType = "java/lang/IllegalArgumentException";
705 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700706 goto exit;
707 }
708 _remaining = _env->GetArrayLength(params_ref) - offset;
709 params_base = (GLfixed *)
710 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
711 params = params_base + offset;
712
713 glFogxvOES(
714 (GLenum)pname,
715 (GLfixed *)params
716 );
717
718exit:
719 if (params_base) {
720 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
721 JNI_ABORT);
722 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700723 if (_exception) {
724 jniThrowException(_env, _exceptionType, _exceptionMessage);
725 }
Jack Palevich27f80022009-04-15 19:13:17 -0700726}
727
728/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
729static void
730android_glFogxvOES__ILjava_nio_IntBuffer_2
731 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700732 jarray _array = (jarray) 0;
733 jint _remaining;
734 GLfixed *params = (GLfixed *) 0;
735
736 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
737 glFogxvOES(
738 (GLenum)pname,
739 (GLfixed *)params
740 );
741 if (_array) {
742 releasePointer(_env, _array, params, JNI_FALSE);
743 }
Jack Palevich27f80022009-04-15 19:13:17 -0700744}
745
746/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
747static void
748android_glFrustumxOES__IIIIII
749 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700750 glFrustumxOES(
751 (GLfixed)left,
752 (GLfixed)right,
753 (GLfixed)bottom,
754 (GLfixed)top,
755 (GLfixed)zNear,
756 (GLfixed)zFar
757 );
Jack Palevich27f80022009-04-15 19:13:17 -0700758}
759
760/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
761static void
762android_glGetClipPlanexOES__I_3II
763 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700764 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700765 const char * _exceptionType;
766 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700767 GLfixed *eqn_base = (GLfixed *) 0;
768 jint _remaining;
769 GLfixed *eqn = (GLfixed *) 0;
770
771 if (!eqn_ref) {
772 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700773 _exceptionType = "java/lang/IllegalArgumentException";
774 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700775 goto exit;
776 }
777 if (offset < 0) {
778 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700779 _exceptionType = "java/lang/IllegalArgumentException";
780 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700781 goto exit;
782 }
783 _remaining = _env->GetArrayLength(eqn_ref) - offset;
784 if (_remaining < 4) {
785 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700786 _exceptionType = "java/lang/IllegalArgumentException";
787 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -0700788 goto exit;
789 }
790 eqn_base = (GLfixed *)
791 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
792 eqn = eqn_base + offset;
793
794 glGetClipPlanexOES(
795 (GLenum)pname,
796 (GLfixed *)eqn
797 );
798
799exit:
800 if (eqn_base) {
801 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
802 _exception ? JNI_ABORT: 0);
803 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700804 if (_exception) {
805 jniThrowException(_env, _exceptionType, _exceptionMessage);
806 }
Jack Palevich27f80022009-04-15 19:13:17 -0700807}
808
809/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
810static void
811android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
812 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700813 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700814 const char * _exceptionType;
815 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700816 jarray _array = (jarray) 0;
817 jint _remaining;
818 GLfixed *eqn = (GLfixed *) 0;
819
820 eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
821 if (_remaining < 4) {
822 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700823 _exceptionType = "java/lang/IllegalArgumentException";
824 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -0700825 goto exit;
826 }
827 glGetClipPlanexOES(
828 (GLenum)pname,
829 (GLfixed *)eqn
830 );
831
832exit:
833 if (_array) {
834 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
835 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700836 if (_exception) {
837 jniThrowException(_env, _exceptionType, _exceptionMessage);
838 }
Jack Palevich27f80022009-04-15 19:13:17 -0700839}
840
841/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
842static void
843android_glGetFixedvOES__I_3II
844 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700845 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700846 const char * _exceptionType;
847 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700848 GLfixed *params_base = (GLfixed *) 0;
849 jint _remaining;
850 GLfixed *params = (GLfixed *) 0;
851
852 if (!params_ref) {
853 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700854 _exceptionType = "java/lang/IllegalArgumentException";
855 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700856 goto exit;
857 }
858 if (offset < 0) {
859 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700860 _exceptionType = "java/lang/IllegalArgumentException";
861 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700862 goto exit;
863 }
864 _remaining = _env->GetArrayLength(params_ref) - offset;
865 params_base = (GLfixed *)
866 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
867 params = params_base + offset;
868
869 glGetFixedvOES(
870 (GLenum)pname,
871 (GLfixed *)params
872 );
873
874exit:
875 if (params_base) {
876 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
877 _exception ? JNI_ABORT: 0);
878 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700879 if (_exception) {
880 jniThrowException(_env, _exceptionType, _exceptionMessage);
881 }
Jack Palevich27f80022009-04-15 19:13:17 -0700882}
883
884/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
885static void
886android_glGetFixedvOES__ILjava_nio_IntBuffer_2
887 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700888 jarray _array = (jarray) 0;
889 jint _remaining;
890 GLfixed *params = (GLfixed *) 0;
891
892 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
893 glGetFixedvOES(
894 (GLenum)pname,
895 (GLfixed *)params
896 );
897 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700898 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700899 }
Jack Palevich27f80022009-04-15 19:13:17 -0700900}
901
902/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
903static void
904android_glGetLightxvOES__II_3II
905 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700906 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700907 const char * _exceptionType;
908 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700909 GLfixed *params_base = (GLfixed *) 0;
910 jint _remaining;
911 GLfixed *params = (GLfixed *) 0;
912
913 if (!params_ref) {
914 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700915 _exceptionType = "java/lang/IllegalArgumentException";
916 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700917 goto exit;
918 }
919 if (offset < 0) {
920 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700921 _exceptionType = "java/lang/IllegalArgumentException";
922 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700923 goto exit;
924 }
925 _remaining = _env->GetArrayLength(params_ref) - offset;
926 params_base = (GLfixed *)
927 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
928 params = params_base + offset;
929
930 glGetLightxvOES(
931 (GLenum)light,
932 (GLenum)pname,
933 (GLfixed *)params
934 );
935
936exit:
937 if (params_base) {
938 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
939 _exception ? JNI_ABORT: 0);
940 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700941 if (_exception) {
942 jniThrowException(_env, _exceptionType, _exceptionMessage);
943 }
Jack Palevich27f80022009-04-15 19:13:17 -0700944}
945
946/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
947static void
948android_glGetLightxvOES__IILjava_nio_IntBuffer_2
949 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700950 jarray _array = (jarray) 0;
951 jint _remaining;
952 GLfixed *params = (GLfixed *) 0;
953
954 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
955 glGetLightxvOES(
956 (GLenum)light,
957 (GLenum)pname,
958 (GLfixed *)params
959 );
960 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700961 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700962 }
Jack Palevich27f80022009-04-15 19:13:17 -0700963}
964
965/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
966static void
967android_glGetMaterialxvOES__II_3II
968 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700969 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700970 const char * _exceptionType;
971 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -0700972 GLfixed *params_base = (GLfixed *) 0;
973 jint _remaining;
974 GLfixed *params = (GLfixed *) 0;
975
976 if (!params_ref) {
977 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700978 _exceptionType = "java/lang/IllegalArgumentException";
979 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700980 goto exit;
981 }
982 if (offset < 0) {
983 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700984 _exceptionType = "java/lang/IllegalArgumentException";
985 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700986 goto exit;
987 }
988 _remaining = _env->GetArrayLength(params_ref) - offset;
989 params_base = (GLfixed *)
990 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
991 params = params_base + offset;
992
993 glGetMaterialxvOES(
994 (GLenum)face,
995 (GLenum)pname,
996 (GLfixed *)params
997 );
998
999exit:
1000 if (params_base) {
1001 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1002 _exception ? JNI_ABORT: 0);
1003 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001004 if (_exception) {
1005 jniThrowException(_env, _exceptionType, _exceptionMessage);
1006 }
Jack Palevich27f80022009-04-15 19:13:17 -07001007}
1008
1009/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1010static void
1011android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1012 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001013 jarray _array = (jarray) 0;
1014 jint _remaining;
1015 GLfixed *params = (GLfixed *) 0;
1016
1017 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1018 glGetMaterialxvOES(
1019 (GLenum)face,
1020 (GLenum)pname,
1021 (GLfixed *)params
1022 );
1023 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001024 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001025 }
Jack Palevich27f80022009-04-15 19:13:17 -07001026}
1027
1028/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1029static void
1030android_glGetTexEnvxvOES__II_3II
1031 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001032 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001033 const char * _exceptionType;
1034 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001035 GLfixed *params_base = (GLfixed *) 0;
1036 jint _remaining;
1037 GLfixed *params = (GLfixed *) 0;
1038
1039 if (!params_ref) {
1040 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001041 _exceptionType = "java/lang/IllegalArgumentException";
1042 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001043 goto exit;
1044 }
1045 if (offset < 0) {
1046 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001047 _exceptionType = "java/lang/IllegalArgumentException";
1048 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001049 goto exit;
1050 }
1051 _remaining = _env->GetArrayLength(params_ref) - offset;
1052 params_base = (GLfixed *)
1053 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1054 params = params_base + offset;
1055
1056 glGetTexEnvxvOES(
1057 (GLenum)env,
1058 (GLenum)pname,
1059 (GLfixed *)params
1060 );
1061
1062exit:
1063 if (params_base) {
1064 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1065 _exception ? JNI_ABORT: 0);
1066 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001067 if (_exception) {
1068 jniThrowException(_env, _exceptionType, _exceptionMessage);
1069 }
Jack Palevich27f80022009-04-15 19:13:17 -07001070}
1071
1072/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1073static void
1074android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1075 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001076 jarray _array = (jarray) 0;
1077 jint _remaining;
1078 GLfixed *params = (GLfixed *) 0;
1079
1080 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1081 glGetTexEnvxvOES(
1082 (GLenum)env,
1083 (GLenum)pname,
1084 (GLfixed *)params
1085 );
1086 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001087 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001088 }
Jack Palevich27f80022009-04-15 19:13:17 -07001089}
1090
1091/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1092static void
1093android_glGetTexParameterxvOES__II_3II
1094 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001095 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001096 const char * _exceptionType;
1097 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001098 GLfixed *params_base = (GLfixed *) 0;
1099 jint _remaining;
1100 GLfixed *params = (GLfixed *) 0;
1101
1102 if (!params_ref) {
1103 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001104 _exceptionType = "java/lang/IllegalArgumentException";
1105 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001106 goto exit;
1107 }
1108 if (offset < 0) {
1109 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001110 _exceptionType = "java/lang/IllegalArgumentException";
1111 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001112 goto exit;
1113 }
1114 _remaining = _env->GetArrayLength(params_ref) - offset;
1115 params_base = (GLfixed *)
1116 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1117 params = params_base + offset;
1118
1119 glGetTexParameterxvOES(
1120 (GLenum)target,
1121 (GLenum)pname,
1122 (GLfixed *)params
1123 );
1124
1125exit:
1126 if (params_base) {
1127 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1128 _exception ? JNI_ABORT: 0);
1129 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001130 if (_exception) {
1131 jniThrowException(_env, _exceptionType, _exceptionMessage);
1132 }
Jack Palevich27f80022009-04-15 19:13:17 -07001133}
1134
1135/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1136static void
1137android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1138 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001139 jarray _array = (jarray) 0;
1140 jint _remaining;
1141 GLfixed *params = (GLfixed *) 0;
1142
1143 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1144 glGetTexParameterxvOES(
1145 (GLenum)target,
1146 (GLenum)pname,
1147 (GLfixed *)params
1148 );
1149 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001150 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001151 }
Jack Palevich27f80022009-04-15 19:13:17 -07001152}
1153
1154/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1155static void
1156android_glLightModelxOES__II
1157 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001158 glLightModelxOES(
1159 (GLenum)pname,
1160 (GLfixed)param
1161 );
Jack Palevich27f80022009-04-15 19:13:17 -07001162}
1163
1164/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1165static void
1166android_glLightModelxvOES__I_3II
1167 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001168 jint _exception = 0;
1169 const char * _exceptionType;
1170 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001171 GLfixed *params_base = (GLfixed *) 0;
1172 jint _remaining;
1173 GLfixed *params = (GLfixed *) 0;
1174
1175 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001176 _exception = 1;
1177 _exceptionType = "java/lang/IllegalArgumentException";
1178 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001179 goto exit;
1180 }
1181 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001182 _exception = 1;
1183 _exceptionType = "java/lang/IllegalArgumentException";
1184 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001185 goto exit;
1186 }
1187 _remaining = _env->GetArrayLength(params_ref) - offset;
1188 params_base = (GLfixed *)
1189 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1190 params = params_base + offset;
1191
1192 glLightModelxvOES(
1193 (GLenum)pname,
1194 (GLfixed *)params
1195 );
1196
1197exit:
1198 if (params_base) {
1199 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1200 JNI_ABORT);
1201 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001202 if (_exception) {
1203 jniThrowException(_env, _exceptionType, _exceptionMessage);
1204 }
Jack Palevich27f80022009-04-15 19:13:17 -07001205}
1206
1207/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1208static void
1209android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1210 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001211 jarray _array = (jarray) 0;
1212 jint _remaining;
1213 GLfixed *params = (GLfixed *) 0;
1214
1215 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1216 glLightModelxvOES(
1217 (GLenum)pname,
1218 (GLfixed *)params
1219 );
1220 if (_array) {
1221 releasePointer(_env, _array, params, JNI_FALSE);
1222 }
Jack Palevich27f80022009-04-15 19:13:17 -07001223}
1224
1225/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1226static void
1227android_glLightxOES__III
1228 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001229 glLightxOES(
1230 (GLenum)light,
1231 (GLenum)pname,
1232 (GLfixed)param
1233 );
Jack Palevich27f80022009-04-15 19:13:17 -07001234}
1235
1236/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1237static void
1238android_glLightxvOES__II_3II
1239 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001240 jint _exception = 0;
1241 const char * _exceptionType;
1242 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001243 GLfixed *params_base = (GLfixed *) 0;
1244 jint _remaining;
1245 GLfixed *params = (GLfixed *) 0;
1246
1247 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001248 _exception = 1;
1249 _exceptionType = "java/lang/IllegalArgumentException";
1250 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001251 goto exit;
1252 }
1253 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001254 _exception = 1;
1255 _exceptionType = "java/lang/IllegalArgumentException";
1256 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001257 goto exit;
1258 }
1259 _remaining = _env->GetArrayLength(params_ref) - offset;
1260 params_base = (GLfixed *)
1261 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1262 params = params_base + offset;
1263
1264 glLightxvOES(
1265 (GLenum)light,
1266 (GLenum)pname,
1267 (GLfixed *)params
1268 );
1269
1270exit:
1271 if (params_base) {
1272 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1273 JNI_ABORT);
1274 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001275 if (_exception) {
1276 jniThrowException(_env, _exceptionType, _exceptionMessage);
1277 }
Jack Palevich27f80022009-04-15 19:13:17 -07001278}
1279
1280/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1281static void
1282android_glLightxvOES__IILjava_nio_IntBuffer_2
1283 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001284 jarray _array = (jarray) 0;
1285 jint _remaining;
1286 GLfixed *params = (GLfixed *) 0;
1287
1288 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1289 glLightxvOES(
1290 (GLenum)light,
1291 (GLenum)pname,
1292 (GLfixed *)params
1293 );
1294 if (_array) {
1295 releasePointer(_env, _array, params, JNI_FALSE);
1296 }
Jack Palevich27f80022009-04-15 19:13:17 -07001297}
1298
1299/* void glLineWidthxOES ( GLfixed width ) */
1300static void
1301android_glLineWidthxOES__I
1302 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001303 glLineWidthxOES(
1304 (GLfixed)width
1305 );
Jack Palevich27f80022009-04-15 19:13:17 -07001306}
1307
1308/* void glLoadMatrixxOES ( const GLfixed *m ) */
1309static void
1310android_glLoadMatrixxOES___3II
1311 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001312 jint _exception = 0;
1313 const char * _exceptionType;
1314 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001315 GLfixed *m_base = (GLfixed *) 0;
1316 jint _remaining;
1317 GLfixed *m = (GLfixed *) 0;
1318
1319 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001320 _exception = 1;
1321 _exceptionType = "java/lang/IllegalArgumentException";
1322 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001323 goto exit;
1324 }
1325 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001326 _exception = 1;
1327 _exceptionType = "java/lang/IllegalArgumentException";
1328 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001329 goto exit;
1330 }
1331 _remaining = _env->GetArrayLength(m_ref) - offset;
1332 m_base = (GLfixed *)
1333 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1334 m = m_base + offset;
1335
1336 glLoadMatrixxOES(
1337 (GLfixed *)m
1338 );
1339
1340exit:
1341 if (m_base) {
1342 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1343 JNI_ABORT);
1344 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001345 if (_exception) {
1346 jniThrowException(_env, _exceptionType, _exceptionMessage);
1347 }
Jack Palevich27f80022009-04-15 19:13:17 -07001348}
1349
1350/* void glLoadMatrixxOES ( const GLfixed *m ) */
1351static void
1352android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1353 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001354 jarray _array = (jarray) 0;
1355 jint _remaining;
1356 GLfixed *m = (GLfixed *) 0;
1357
1358 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
1359 glLoadMatrixxOES(
1360 (GLfixed *)m
1361 );
1362 if (_array) {
1363 releasePointer(_env, _array, m, JNI_FALSE);
1364 }
Jack Palevich27f80022009-04-15 19:13:17 -07001365}
1366
1367/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1368static void
1369android_glMaterialxOES__III
1370 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001371 glMaterialxOES(
1372 (GLenum)face,
1373 (GLenum)pname,
1374 (GLfixed)param
1375 );
Jack Palevich27f80022009-04-15 19:13:17 -07001376}
1377
1378/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1379static void
1380android_glMaterialxvOES__II_3II
1381 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001382 jint _exception = 0;
1383 const char * _exceptionType;
1384 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001385 GLfixed *params_base = (GLfixed *) 0;
1386 jint _remaining;
1387 GLfixed *params = (GLfixed *) 0;
1388
1389 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001390 _exception = 1;
1391 _exceptionType = "java/lang/IllegalArgumentException";
1392 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001393 goto exit;
1394 }
1395 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001396 _exception = 1;
1397 _exceptionType = "java/lang/IllegalArgumentException";
1398 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001399 goto exit;
1400 }
1401 _remaining = _env->GetArrayLength(params_ref) - offset;
1402 params_base = (GLfixed *)
1403 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1404 params = params_base + offset;
1405
1406 glMaterialxvOES(
1407 (GLenum)face,
1408 (GLenum)pname,
1409 (GLfixed *)params
1410 );
1411
1412exit:
1413 if (params_base) {
1414 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1415 JNI_ABORT);
1416 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001417 if (_exception) {
1418 jniThrowException(_env, _exceptionType, _exceptionMessage);
1419 }
Jack Palevich27f80022009-04-15 19:13:17 -07001420}
1421
1422/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1423static void
1424android_glMaterialxvOES__IILjava_nio_IntBuffer_2
1425 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001426 jarray _array = (jarray) 0;
1427 jint _remaining;
1428 GLfixed *params = (GLfixed *) 0;
1429
1430 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1431 glMaterialxvOES(
1432 (GLenum)face,
1433 (GLenum)pname,
1434 (GLfixed *)params
1435 );
1436 if (_array) {
1437 releasePointer(_env, _array, params, JNI_FALSE);
1438 }
Jack Palevich27f80022009-04-15 19:13:17 -07001439}
1440
1441/* void glMultMatrixxOES ( const GLfixed *m ) */
1442static void
1443android_glMultMatrixxOES___3II
1444 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001445 jint _exception = 0;
1446 const char * _exceptionType;
1447 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001448 GLfixed *m_base = (GLfixed *) 0;
1449 jint _remaining;
1450 GLfixed *m = (GLfixed *) 0;
1451
1452 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001453 _exception = 1;
1454 _exceptionType = "java/lang/IllegalArgumentException";
1455 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001456 goto exit;
1457 }
1458 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001459 _exception = 1;
1460 _exceptionType = "java/lang/IllegalArgumentException";
1461 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001462 goto exit;
1463 }
1464 _remaining = _env->GetArrayLength(m_ref) - offset;
1465 m_base = (GLfixed *)
1466 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1467 m = m_base + offset;
1468
1469 glMultMatrixxOES(
1470 (GLfixed *)m
1471 );
1472
1473exit:
1474 if (m_base) {
1475 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1476 JNI_ABORT);
1477 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001478 if (_exception) {
1479 jniThrowException(_env, _exceptionType, _exceptionMessage);
1480 }
Jack Palevich27f80022009-04-15 19:13:17 -07001481}
1482
1483/* void glMultMatrixxOES ( const GLfixed *m ) */
1484static void
1485android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
1486 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001487 jarray _array = (jarray) 0;
1488 jint _remaining;
1489 GLfixed *m = (GLfixed *) 0;
1490
1491 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
1492 glMultMatrixxOES(
1493 (GLfixed *)m
1494 );
1495 if (_array) {
1496 releasePointer(_env, _array, m, JNI_FALSE);
1497 }
Jack Palevich27f80022009-04-15 19:13:17 -07001498}
1499
1500/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
1501static void
1502android_glMultiTexCoord4xOES__IIIII
1503 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07001504 glMultiTexCoord4xOES(
1505 (GLenum)target,
1506 (GLfixed)s,
1507 (GLfixed)t,
1508 (GLfixed)r,
1509 (GLfixed)q
1510 );
Jack Palevich27f80022009-04-15 19:13:17 -07001511}
1512
1513/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
1514static void
1515android_glNormal3xOES__III
1516 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07001517 glNormal3xOES(
1518 (GLfixed)nx,
1519 (GLfixed)ny,
1520 (GLfixed)nz
1521 );
Jack Palevich27f80022009-04-15 19:13:17 -07001522}
1523
1524/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1525static void
1526android_glOrthoxOES__IIIIII
1527 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001528 glOrthoxOES(
1529 (GLfixed)left,
1530 (GLfixed)right,
1531 (GLfixed)bottom,
1532 (GLfixed)top,
1533 (GLfixed)zNear,
1534 (GLfixed)zFar
1535 );
Jack Palevich27f80022009-04-15 19:13:17 -07001536}
1537
1538/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
1539static void
1540android_glPointParameterxOES__II
1541 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001542 glPointParameterxOES(
1543 (GLenum)pname,
1544 (GLfixed)param
1545 );
Jack Palevich27f80022009-04-15 19:13:17 -07001546}
1547
1548/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1549static void
1550android_glPointParameterxvOES__I_3II
1551 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001552 jint _exception = 0;
1553 const char * _exceptionType;
1554 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001555 GLfixed *params_base = (GLfixed *) 0;
1556 jint _remaining;
1557 GLfixed *params = (GLfixed *) 0;
1558
1559 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001560 _exception = 1;
1561 _exceptionType = "java/lang/IllegalArgumentException";
1562 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001563 goto exit;
1564 }
1565 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001566 _exception = 1;
1567 _exceptionType = "java/lang/IllegalArgumentException";
1568 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001569 goto exit;
1570 }
1571 _remaining = _env->GetArrayLength(params_ref) - offset;
1572 params_base = (GLfixed *)
1573 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1574 params = params_base + offset;
1575
1576 glPointParameterxvOES(
1577 (GLenum)pname,
1578 (GLfixed *)params
1579 );
1580
1581exit:
1582 if (params_base) {
1583 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1584 JNI_ABORT);
1585 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001586 if (_exception) {
1587 jniThrowException(_env, _exceptionType, _exceptionMessage);
1588 }
Jack Palevich27f80022009-04-15 19:13:17 -07001589}
1590
1591/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1592static void
1593android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
1594 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001595 jarray _array = (jarray) 0;
1596 jint _remaining;
1597 GLfixed *params = (GLfixed *) 0;
1598
1599 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1600 glPointParameterxvOES(
1601 (GLenum)pname,
1602 (GLfixed *)params
1603 );
1604 if (_array) {
1605 releasePointer(_env, _array, params, JNI_FALSE);
1606 }
Jack Palevich27f80022009-04-15 19:13:17 -07001607}
1608
1609/* void glPointSizexOES ( GLfixed size ) */
1610static void
1611android_glPointSizexOES__I
1612 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07001613 glPointSizexOES(
1614 (GLfixed)size
1615 );
Jack Palevich27f80022009-04-15 19:13:17 -07001616}
1617
1618/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
1619static void
1620android_glPolygonOffsetxOES__II
1621 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07001622 glPolygonOffsetxOES(
1623 (GLfixed)factor,
1624 (GLfixed)units
1625 );
Jack Palevich27f80022009-04-15 19:13:17 -07001626}
1627
1628/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
1629static void
1630android_glRotatexOES__IIII
1631 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001632 glRotatexOES(
1633 (GLfixed)angle,
1634 (GLfixed)x,
1635 (GLfixed)y,
1636 (GLfixed)z
1637 );
Jack Palevich27f80022009-04-15 19:13:17 -07001638}
1639
1640/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
1641static void
1642android_glSampleCoveragexOES__IZ
1643 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07001644 glSampleCoveragexOES(
1645 (GLclampx)value,
1646 (GLboolean)invert
1647 );
Jack Palevich27f80022009-04-15 19:13:17 -07001648}
1649
1650/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1651static void
1652android_glScalexOES__III
1653 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001654 glScalexOES(
1655 (GLfixed)x,
1656 (GLfixed)y,
1657 (GLfixed)z
1658 );
Jack Palevich27f80022009-04-15 19:13:17 -07001659}
1660
1661/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
1662static void
1663android_glTexEnvxOES__III
1664 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001665 glTexEnvxOES(
1666 (GLenum)target,
1667 (GLenum)pname,
1668 (GLfixed)param
1669 );
Jack Palevich27f80022009-04-15 19:13:17 -07001670}
1671
1672/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1673static void
1674android_glTexEnvxvOES__II_3II
1675 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001676 jint _exception = 0;
1677 const char * _exceptionType;
1678 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001679 GLfixed *params_base = (GLfixed *) 0;
1680 jint _remaining;
1681 GLfixed *params = (GLfixed *) 0;
1682
1683 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001684 _exception = 1;
1685 _exceptionType = "java/lang/IllegalArgumentException";
1686 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001687 goto exit;
1688 }
1689 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001690 _exception = 1;
1691 _exceptionType = "java/lang/IllegalArgumentException";
1692 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001693 goto exit;
1694 }
1695 _remaining = _env->GetArrayLength(params_ref) - offset;
1696 params_base = (GLfixed *)
1697 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1698 params = params_base + offset;
1699
1700 glTexEnvxvOES(
1701 (GLenum)target,
1702 (GLenum)pname,
1703 (GLfixed *)params
1704 );
1705
1706exit:
1707 if (params_base) {
1708 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1709 JNI_ABORT);
1710 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001711 if (_exception) {
1712 jniThrowException(_env, _exceptionType, _exceptionMessage);
1713 }
Jack Palevich27f80022009-04-15 19:13:17 -07001714}
1715
1716/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1717static void
1718android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
1719 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001720 jarray _array = (jarray) 0;
1721 jint _remaining;
1722 GLfixed *params = (GLfixed *) 0;
1723
1724 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1725 glTexEnvxvOES(
1726 (GLenum)target,
1727 (GLenum)pname,
1728 (GLfixed *)params
1729 );
1730 if (_array) {
1731 releasePointer(_env, _array, params, JNI_FALSE);
1732 }
Jack Palevich27f80022009-04-15 19:13:17 -07001733}
1734
1735/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
1736static void
1737android_glTexParameterxOES__III
1738 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001739 glTexParameterxOES(
1740 (GLenum)target,
1741 (GLenum)pname,
1742 (GLfixed)param
1743 );
Jack Palevich27f80022009-04-15 19:13:17 -07001744}
1745
1746/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1747static void
1748android_glTexParameterxvOES__II_3II
1749 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001750 jint _exception = 0;
1751 const char * _exceptionType;
1752 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07001753 GLfixed *params_base = (GLfixed *) 0;
1754 jint _remaining;
1755 GLfixed *params = (GLfixed *) 0;
1756
1757 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001758 _exception = 1;
1759 _exceptionType = "java/lang/IllegalArgumentException";
1760 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001761 goto exit;
1762 }
1763 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001764 _exception = 1;
1765 _exceptionType = "java/lang/IllegalArgumentException";
1766 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001767 goto exit;
1768 }
1769 _remaining = _env->GetArrayLength(params_ref) - offset;
1770 params_base = (GLfixed *)
1771 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1772 params = params_base + offset;
1773
1774 glTexParameterxvOES(
1775 (GLenum)target,
1776 (GLenum)pname,
1777 (GLfixed *)params
1778 );
1779
1780exit:
1781 if (params_base) {
1782 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1783 JNI_ABORT);
1784 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001785 if (_exception) {
1786 jniThrowException(_env, _exceptionType, _exceptionMessage);
1787 }
Jack Palevich27f80022009-04-15 19:13:17 -07001788}
1789
1790/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1791static void
1792android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
1793 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001794 jarray _array = (jarray) 0;
1795 jint _remaining;
1796 GLfixed *params = (GLfixed *) 0;
1797
1798 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1799 glTexParameterxvOES(
1800 (GLenum)target,
1801 (GLenum)pname,
1802 (GLfixed *)params
1803 );
1804 if (_array) {
1805 releasePointer(_env, _array, params, JNI_FALSE);
1806 }
Jack Palevich27f80022009-04-15 19:13:17 -07001807}
1808
1809/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1810static void
1811android_glTranslatexOES__III
1812 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001813 glTranslatexOES(
1814 (GLfixed)x,
1815 (GLfixed)y,
1816 (GLfixed)z
1817 );
Jack Palevich27f80022009-04-15 19:13:17 -07001818}
1819
1820/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
1821static jboolean
1822android_glIsRenderbufferOES__I
1823 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001824 GLboolean _returnValue;
1825 _returnValue = glIsRenderbufferOES(
1826 (GLuint)renderbuffer
1827 );
1828 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07001829}
1830
1831/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
1832static void
1833android_glBindRenderbufferOES__II
1834 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001835 glBindRenderbufferOES(
1836 (GLenum)target,
1837 (GLuint)renderbuffer
1838 );
Jack Palevich27f80022009-04-15 19:13:17 -07001839}
1840
1841/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
1842static void
1843android_glDeleteRenderbuffersOES__I_3II
1844 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001845 jint _exception = 0;
1846 const char * _exceptionType;
1847 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07001848 GLuint *renderbuffers_base = (GLuint *) 0;
1849 jint _remaining;
1850 GLuint *renderbuffers = (GLuint *) 0;
1851
1852 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001853 _exception = 1;
1854 _exceptionType = "java/lang/IllegalArgumentException";
1855 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07001856 goto exit;
1857 }
1858 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001859 _exception = 1;
1860 _exceptionType = "java/lang/IllegalArgumentException";
1861 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07001862 goto exit;
1863 }
1864 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1865 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001866 _exception = 1;
1867 _exceptionType = "java/lang/IllegalArgumentException";
1868 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07001869 goto exit;
1870 }
1871 renderbuffers_base = (GLuint *)
1872 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
1873 renderbuffers = renderbuffers_base + offset;
1874
1875 glDeleteRenderbuffersOES(
1876 (GLsizei)n,
1877 (GLuint *)renderbuffers
1878 );
1879
1880exit:
1881 if (renderbuffers_base) {
1882 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
1883 JNI_ABORT);
1884 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001885 if (_exception) {
1886 jniThrowException(_env, _exceptionType, _exceptionMessage);
1887 }
Jack Palevich27f80022009-04-15 19:13:17 -07001888}
1889
1890/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
1891static void
1892android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
1893 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001894 jint _exception = 0;
1895 const char * _exceptionType;
1896 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07001897 jarray _array = (jarray) 0;
1898 jint _remaining;
1899 GLuint *renderbuffers = (GLuint *) 0;
1900
1901 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
1902 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001903 _exception = 1;
1904 _exceptionType = "java/lang/IllegalArgumentException";
1905 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07001906 goto exit;
1907 }
1908 glDeleteRenderbuffersOES(
1909 (GLsizei)n,
1910 (GLuint *)renderbuffers
1911 );
1912
1913exit:
1914 if (_array) {
1915 releasePointer(_env, _array, renderbuffers, JNI_FALSE);
1916 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001917 if (_exception) {
1918 jniThrowException(_env, _exceptionType, _exceptionMessage);
1919 }
Jack Palevich27f80022009-04-15 19:13:17 -07001920}
1921
1922/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
1923static void
1924android_glGenRenderbuffersOES__I_3II
1925 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07001926 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001927 const char * _exceptionType;
1928 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07001929 GLuint *renderbuffers_base = (GLuint *) 0;
1930 jint _remaining;
1931 GLuint *renderbuffers = (GLuint *) 0;
1932
1933 if (!renderbuffers_ref) {
1934 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001935 _exceptionType = "java/lang/IllegalArgumentException";
1936 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07001937 goto exit;
1938 }
1939 if (offset < 0) {
1940 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001941 _exceptionType = "java/lang/IllegalArgumentException";
1942 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07001943 goto exit;
1944 }
1945 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1946 if (_remaining < n) {
1947 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001948 _exceptionType = "java/lang/IllegalArgumentException";
1949 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07001950 goto exit;
1951 }
1952 renderbuffers_base = (GLuint *)
1953 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
1954 renderbuffers = renderbuffers_base + offset;
1955
1956 glGenRenderbuffersOES(
1957 (GLsizei)n,
1958 (GLuint *)renderbuffers
1959 );
1960
1961exit:
1962 if (renderbuffers_base) {
1963 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
1964 _exception ? JNI_ABORT: 0);
1965 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001966 if (_exception) {
1967 jniThrowException(_env, _exceptionType, _exceptionMessage);
1968 }
Jack Palevich27f80022009-04-15 19:13:17 -07001969}
1970
1971/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
1972static void
1973android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
1974 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07001975 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001976 const char * _exceptionType;
1977 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07001978 jarray _array = (jarray) 0;
1979 jint _remaining;
1980 GLuint *renderbuffers = (GLuint *) 0;
1981
1982 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
1983 if (_remaining < n) {
1984 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001985 _exceptionType = "java/lang/IllegalArgumentException";
1986 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07001987 goto exit;
1988 }
1989 glGenRenderbuffersOES(
1990 (GLsizei)n,
1991 (GLuint *)renderbuffers
1992 );
1993
1994exit:
1995 if (_array) {
1996 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
1997 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001998 if (_exception) {
1999 jniThrowException(_env, _exceptionType, _exceptionMessage);
2000 }
Jack Palevich27f80022009-04-15 19:13:17 -07002001}
2002
2003/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2004static void
2005android_glRenderbufferStorageOES__IIII
2006 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002007 glRenderbufferStorageOES(
2008 (GLenum)target,
2009 (GLenum)internalformat,
2010 (GLsizei)width,
2011 (GLsizei)height
2012 );
Jack Palevich27f80022009-04-15 19:13:17 -07002013}
2014
2015/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2016static void
2017android_glGetRenderbufferParameterivOES__II_3II
2018 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002019 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002020 const char * _exceptionType;
2021 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002022 GLint *params_base = (GLint *) 0;
2023 jint _remaining;
2024 GLint *params = (GLint *) 0;
2025
2026 if (!params_ref) {
2027 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002028 _exceptionType = "java/lang/IllegalArgumentException";
2029 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002030 goto exit;
2031 }
2032 if (offset < 0) {
2033 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002034 _exceptionType = "java/lang/IllegalArgumentException";
2035 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002036 goto exit;
2037 }
2038 _remaining = _env->GetArrayLength(params_ref) - offset;
2039 if (_remaining < 1) {
2040 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002041 _exceptionType = "java/lang/IllegalArgumentException";
2042 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002043 goto exit;
2044 }
2045 params_base = (GLint *)
2046 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2047 params = params_base + offset;
2048
2049 glGetRenderbufferParameterivOES(
2050 (GLenum)target,
2051 (GLenum)pname,
2052 (GLint *)params
2053 );
2054
2055exit:
2056 if (params_base) {
2057 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2058 _exception ? JNI_ABORT: 0);
2059 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002060 if (_exception) {
2061 jniThrowException(_env, _exceptionType, _exceptionMessage);
2062 }
Jack Palevich27f80022009-04-15 19:13:17 -07002063}
2064
2065/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2066static void
2067android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2068 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002069 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002070 const char * _exceptionType;
2071 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002072 jarray _array = (jarray) 0;
2073 jint _remaining;
2074 GLint *params = (GLint *) 0;
2075
2076 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2077 if (_remaining < 1) {
2078 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002079 _exceptionType = "java/lang/IllegalArgumentException";
2080 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002081 goto exit;
2082 }
2083 glGetRenderbufferParameterivOES(
2084 (GLenum)target,
2085 (GLenum)pname,
2086 (GLint *)params
2087 );
2088
2089exit:
2090 if (_array) {
2091 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2092 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002093 if (_exception) {
2094 jniThrowException(_env, _exceptionType, _exceptionMessage);
2095 }
Jack Palevich27f80022009-04-15 19:13:17 -07002096}
2097
2098/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2099static jboolean
2100android_glIsFramebufferOES__I
2101 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002102 GLboolean _returnValue;
2103 _returnValue = glIsFramebufferOES(
2104 (GLuint)framebuffer
2105 );
2106 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002107}
2108
2109/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2110static void
2111android_glBindFramebufferOES__II
2112 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002113 glBindFramebufferOES(
2114 (GLenum)target,
2115 (GLuint)framebuffer
2116 );
Jack Palevich27f80022009-04-15 19:13:17 -07002117}
2118
2119/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2120static void
2121android_glDeleteFramebuffersOES__I_3II
2122 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002123 jint _exception = 0;
2124 const char * _exceptionType;
2125 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002126 GLuint *framebuffers_base = (GLuint *) 0;
2127 jint _remaining;
2128 GLuint *framebuffers = (GLuint *) 0;
2129
2130 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002131 _exception = 1;
2132 _exceptionType = "java/lang/IllegalArgumentException";
2133 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002134 goto exit;
2135 }
2136 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002137 _exception = 1;
2138 _exceptionType = "java/lang/IllegalArgumentException";
2139 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002140 goto exit;
2141 }
2142 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2143 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002144 _exception = 1;
2145 _exceptionType = "java/lang/IllegalArgumentException";
2146 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002147 goto exit;
2148 }
2149 framebuffers_base = (GLuint *)
2150 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2151 framebuffers = framebuffers_base + offset;
2152
2153 glDeleteFramebuffersOES(
2154 (GLsizei)n,
2155 (GLuint *)framebuffers
2156 );
2157
2158exit:
2159 if (framebuffers_base) {
2160 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2161 JNI_ABORT);
2162 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002163 if (_exception) {
2164 jniThrowException(_env, _exceptionType, _exceptionMessage);
2165 }
Jack Palevich27f80022009-04-15 19:13:17 -07002166}
2167
2168/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2169static void
2170android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2171 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002172 jint _exception = 0;
2173 const char * _exceptionType;
2174 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002175 jarray _array = (jarray) 0;
2176 jint _remaining;
2177 GLuint *framebuffers = (GLuint *) 0;
2178
2179 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
2180 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002181 _exception = 1;
2182 _exceptionType = "java/lang/IllegalArgumentException";
2183 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002184 goto exit;
2185 }
2186 glDeleteFramebuffersOES(
2187 (GLsizei)n,
2188 (GLuint *)framebuffers
2189 );
2190
2191exit:
2192 if (_array) {
2193 releasePointer(_env, _array, framebuffers, JNI_FALSE);
2194 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002195 if (_exception) {
2196 jniThrowException(_env, _exceptionType, _exceptionMessage);
2197 }
Jack Palevich27f80022009-04-15 19:13:17 -07002198}
2199
2200/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2201static void
2202android_glGenFramebuffersOES__I_3II
2203 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002204 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002205 const char * _exceptionType;
2206 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002207 GLuint *framebuffers_base = (GLuint *) 0;
2208 jint _remaining;
2209 GLuint *framebuffers = (GLuint *) 0;
2210
2211 if (!framebuffers_ref) {
2212 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002213 _exceptionType = "java/lang/IllegalArgumentException";
2214 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002215 goto exit;
2216 }
2217 if (offset < 0) {
2218 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002219 _exceptionType = "java/lang/IllegalArgumentException";
2220 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002221 goto exit;
2222 }
2223 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2224 if (_remaining < n) {
2225 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002226 _exceptionType = "java/lang/IllegalArgumentException";
2227 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002228 goto exit;
2229 }
2230 framebuffers_base = (GLuint *)
2231 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2232 framebuffers = framebuffers_base + offset;
2233
2234 glGenFramebuffersOES(
2235 (GLsizei)n,
2236 (GLuint *)framebuffers
2237 );
2238
2239exit:
2240 if (framebuffers_base) {
2241 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2242 _exception ? JNI_ABORT: 0);
2243 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002244 if (_exception) {
2245 jniThrowException(_env, _exceptionType, _exceptionMessage);
2246 }
Jack Palevich27f80022009-04-15 19:13:17 -07002247}
2248
2249/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2250static void
2251android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
2252 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002253 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002254 const char * _exceptionType;
2255 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002256 jarray _array = (jarray) 0;
2257 jint _remaining;
2258 GLuint *framebuffers = (GLuint *) 0;
2259
2260 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
2261 if (_remaining < n) {
2262 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002263 _exceptionType = "java/lang/IllegalArgumentException";
2264 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002265 goto exit;
2266 }
2267 glGenFramebuffersOES(
2268 (GLsizei)n,
2269 (GLuint *)framebuffers
2270 );
2271
2272exit:
2273 if (_array) {
2274 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
2275 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002276 if (_exception) {
2277 jniThrowException(_env, _exceptionType, _exceptionMessage);
2278 }
Jack Palevich27f80022009-04-15 19:13:17 -07002279}
2280
2281/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
2282static jint
2283android_glCheckFramebufferStatusOES__I
2284 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002285 GLenum _returnValue;
2286 _returnValue = glCheckFramebufferStatusOES(
2287 (GLenum)target
2288 );
2289 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002290}
2291
2292/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
2293static void
2294android_glFramebufferRenderbufferOES__IIII
2295 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002296 glFramebufferRenderbufferOES(
2297 (GLenum)target,
2298 (GLenum)attachment,
2299 (GLenum)renderbuffertarget,
2300 (GLuint)renderbuffer
2301 );
Jack Palevich27f80022009-04-15 19:13:17 -07002302}
2303
2304/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
2305static void
2306android_glFramebufferTexture2DOES__IIIII
2307 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07002308 glFramebufferTexture2DOES(
2309 (GLenum)target,
2310 (GLenum)attachment,
2311 (GLenum)textarget,
2312 (GLuint)texture,
2313 (GLint)level
2314 );
Jack Palevich27f80022009-04-15 19:13:17 -07002315}
2316
2317/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2318static void
2319android_glGetFramebufferAttachmentParameterivOES__III_3II
2320 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002321 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002322 const char * _exceptionType;
2323 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002324 GLint *params_base = (GLint *) 0;
2325 jint _remaining;
2326 GLint *params = (GLint *) 0;
2327
2328 if (!params_ref) {
2329 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002330 _exceptionType = "java/lang/IllegalArgumentException";
2331 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002332 goto exit;
2333 }
2334 if (offset < 0) {
2335 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002336 _exceptionType = "java/lang/IllegalArgumentException";
2337 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002338 goto exit;
2339 }
2340 _remaining = _env->GetArrayLength(params_ref) - offset;
2341 if (_remaining < 1) {
2342 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002343 _exceptionType = "java/lang/IllegalArgumentException";
2344 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002345 goto exit;
2346 }
2347 params_base = (GLint *)
2348 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2349 params = params_base + offset;
2350
2351 glGetFramebufferAttachmentParameterivOES(
2352 (GLenum)target,
2353 (GLenum)attachment,
2354 (GLenum)pname,
2355 (GLint *)params
2356 );
2357
2358exit:
2359 if (params_base) {
2360 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2361 _exception ? JNI_ABORT: 0);
2362 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002363 if (_exception) {
2364 jniThrowException(_env, _exceptionType, _exceptionMessage);
2365 }
Jack Palevich27f80022009-04-15 19:13:17 -07002366}
2367
2368/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2369static void
2370android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
2371 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002372 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002373 const char * _exceptionType;
2374 const char * _exceptionMessage;
Jack Palevich73108672011-03-28 14:49:12 -07002375 jarray _array = (jarray) 0;
2376 jint _remaining;
2377 GLint *params = (GLint *) 0;
2378
2379 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2380 if (_remaining < 1) {
2381 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002382 _exceptionType = "java/lang/IllegalArgumentException";
2383 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002384 goto exit;
2385 }
2386 glGetFramebufferAttachmentParameterivOES(
2387 (GLenum)target,
2388 (GLenum)attachment,
2389 (GLenum)pname,
2390 (GLint *)params
2391 );
2392
2393exit:
2394 if (_array) {
2395 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2396 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002397 if (_exception) {
2398 jniThrowException(_env, _exceptionType, _exceptionMessage);
2399 }
Jack Palevich27f80022009-04-15 19:13:17 -07002400}
2401
2402/* void glGenerateMipmapOES ( GLenum target ) */
2403static void
2404android_glGenerateMipmapOES__I
2405 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002406 glGenerateMipmapOES(
2407 (GLenum)target
2408 );
Jack Palevich27f80022009-04-15 19:13:17 -07002409}
2410
2411/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
2412static void
2413android_glCurrentPaletteMatrixOES__I
2414 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002415 glCurrentPaletteMatrixOES(
2416 (GLuint)matrixpaletteindex
2417 );
Jack Palevich27f80022009-04-15 19:13:17 -07002418}
2419
2420/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
2421static void
2422android_glLoadPaletteFromModelViewMatrixOES__
2423 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002424 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07002425}
2426
2427/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2428static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002429android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
2430 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2431 jarray _array = (jarray) 0;
2432 jint _remaining;
2433 GLvoid *pointer = (GLvoid *) 0;
2434
2435 if (pointer_buf) {
2436 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2437 if ( ! pointer ) {
2438 return;
2439 }
2440 }
2441 glMatrixIndexPointerOESBounds(
2442 (GLint)size,
2443 (GLenum)type,
2444 (GLsizei)stride,
2445 (GLvoid *)pointer,
2446 (GLsizei)remaining
2447 );
Jack Palevich27f80022009-04-15 19:13:17 -07002448}
2449
2450/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2451static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002452android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
2453 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2454 jarray _array = (jarray) 0;
2455 jint _remaining;
2456 GLvoid *pointer = (GLvoid *) 0;
2457
2458 if (pointer_buf) {
2459 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2460 if ( ! pointer ) {
2461 return;
2462 }
2463 }
2464 glWeightPointerOESBounds(
2465 (GLint)size,
2466 (GLenum)type,
2467 (GLsizei)stride,
2468 (GLvoid *)pointer,
2469 (GLsizei)remaining
2470 );
Jack Palevich27f80022009-04-15 19:13:17 -07002471}
2472
2473/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
2474static void
2475android_glDepthRangefOES__FF
2476 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002477 glDepthRangefOES(
2478 (GLclampf)zNear,
2479 (GLclampf)zFar
2480 );
Jack Palevich27f80022009-04-15 19:13:17 -07002481}
2482
2483/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2484static void
2485android_glFrustumfOES__FFFFFF
2486 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002487 glFrustumfOES(
2488 (GLfloat)left,
2489 (GLfloat)right,
2490 (GLfloat)bottom,
2491 (GLfloat)top,
2492 (GLfloat)zNear,
2493 (GLfloat)zFar
2494 );
Jack Palevich27f80022009-04-15 19:13:17 -07002495}
2496
2497/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2498static void
2499android_glOrthofOES__FFFFFF
2500 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002501 glOrthofOES(
2502 (GLfloat)left,
2503 (GLfloat)right,
2504 (GLfloat)bottom,
2505 (GLfloat)top,
2506 (GLfloat)zNear,
2507 (GLfloat)zFar
2508 );
Jack Palevich27f80022009-04-15 19:13:17 -07002509}
2510
2511/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2512static void
2513android_glClipPlanefOES__I_3FI
2514 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002515 jint _exception = 0;
2516 const char * _exceptionType;
2517 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002518 GLfloat *equation_base = (GLfloat *) 0;
2519 jint _remaining;
2520 GLfloat *equation = (GLfloat *) 0;
2521
2522 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002523 _exception = 1;
2524 _exceptionType = "java/lang/IllegalArgumentException";
2525 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002526 goto exit;
2527 }
2528 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002529 _exception = 1;
2530 _exceptionType = "java/lang/IllegalArgumentException";
2531 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002532 goto exit;
2533 }
2534 _remaining = _env->GetArrayLength(equation_ref) - offset;
2535 equation_base = (GLfloat *)
2536 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
2537 equation = equation_base + offset;
2538
2539 glClipPlanefOES(
2540 (GLenum)plane,
2541 (GLfloat *)equation
2542 );
2543
2544exit:
2545 if (equation_base) {
2546 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
2547 JNI_ABORT);
2548 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002549 if (_exception) {
2550 jniThrowException(_env, _exceptionType, _exceptionMessage);
2551 }
Jack Palevich27f80022009-04-15 19:13:17 -07002552}
2553
2554/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2555static void
2556android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
2557 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002558 jarray _array = (jarray) 0;
2559 jint _remaining;
2560 GLfloat *equation = (GLfloat *) 0;
2561
2562 equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
2563 glClipPlanefOES(
2564 (GLenum)plane,
2565 (GLfloat *)equation
2566 );
2567 if (_array) {
2568 releasePointer(_env, _array, equation, JNI_FALSE);
2569 }
Jack Palevich27f80022009-04-15 19:13:17 -07002570}
2571
2572/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2573static void
2574android_glGetClipPlanefOES__I_3FI
2575 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002576 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002577 const char * _exceptionType;
2578 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002579 GLfloat *eqn_base = (GLfloat *) 0;
2580 jint _remaining;
2581 GLfloat *eqn = (GLfloat *) 0;
2582
2583 if (!eqn_ref) {
2584 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002585 _exceptionType = "java/lang/IllegalArgumentException";
2586 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002587 goto exit;
2588 }
2589 if (offset < 0) {
2590 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002591 _exceptionType = "java/lang/IllegalArgumentException";
2592 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002593 goto exit;
2594 }
2595 _remaining = _env->GetArrayLength(eqn_ref) - offset;
2596 if (_remaining < 4) {
2597 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002598 _exceptionType = "java/lang/IllegalArgumentException";
2599 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002600 goto exit;
2601 }
2602 eqn_base = (GLfloat *)
2603 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
2604 eqn = eqn_base + offset;
2605
2606 glGetClipPlanefOES(
2607 (GLenum)pname,
2608 (GLfloat *)eqn
2609 );
2610
2611exit:
2612 if (eqn_base) {
2613 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
2614 _exception ? JNI_ABORT: 0);
2615 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002616 if (_exception) {
2617 jniThrowException(_env, _exceptionType, _exceptionMessage);
2618 }
Jack Palevich27f80022009-04-15 19:13:17 -07002619}
2620
2621/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2622static void
2623android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
2624 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002625 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002626 const char * _exceptionType;
2627 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002628 jarray _array = (jarray) 0;
2629 jint _remaining;
2630 GLfloat *eqn = (GLfloat *) 0;
2631
2632 eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
2633 if (_remaining < 4) {
2634 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002635 _exceptionType = "java/lang/IllegalArgumentException";
2636 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002637 goto exit;
2638 }
2639 glGetClipPlanefOES(
2640 (GLenum)pname,
2641 (GLfloat *)eqn
2642 );
2643
2644exit:
2645 if (_array) {
2646 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
2647 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002648 if (_exception) {
2649 jniThrowException(_env, _exceptionType, _exceptionMessage);
2650 }
Jack Palevich27f80022009-04-15 19:13:17 -07002651}
2652
2653/* void glClearDepthfOES ( GLclampf depth ) */
2654static void
2655android_glClearDepthfOES__F
2656 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07002657 glClearDepthfOES(
2658 (GLclampf)depth
2659 );
Jack Palevich27f80022009-04-15 19:13:17 -07002660}
2661
2662/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
2663static void
2664android_glTexGenfOES__IIF
2665 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002666 glTexGenfOES(
2667 (GLenum)coord,
2668 (GLenum)pname,
2669 (GLfloat)param
2670 );
Jack Palevich27f80022009-04-15 19:13:17 -07002671}
2672
2673/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
2674static void
2675android_glTexGenfvOES__II_3FI
2676 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002677 jint _exception = 0;
2678 const char * _exceptionType;
2679 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002680 GLfloat *params_base = (GLfloat *) 0;
2681 jint _remaining;
2682 GLfloat *params = (GLfloat *) 0;
2683
2684 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002685 _exception = 1;
2686 _exceptionType = "java/lang/IllegalArgumentException";
2687 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002688 goto exit;
2689 }
2690 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002691 _exception = 1;
2692 _exceptionType = "java/lang/IllegalArgumentException";
2693 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002694 goto exit;
2695 }
2696 _remaining = _env->GetArrayLength(params_ref) - offset;
2697 params_base = (GLfloat *)
2698 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2699 params = params_base + offset;
2700
2701 glTexGenfvOES(
2702 (GLenum)coord,
2703 (GLenum)pname,
2704 (GLfloat *)params
2705 );
2706
2707exit:
2708 if (params_base) {
2709 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2710 JNI_ABORT);
2711 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002712 if (_exception) {
2713 jniThrowException(_env, _exceptionType, _exceptionMessage);
2714 }
Jack Palevich27f80022009-04-15 19:13:17 -07002715}
2716
2717/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
2718static void
2719android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
2720 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002721 jarray _array = (jarray) 0;
2722 jint _remaining;
2723 GLfloat *params = (GLfloat *) 0;
2724
2725 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2726 glTexGenfvOES(
2727 (GLenum)coord,
2728 (GLenum)pname,
2729 (GLfloat *)params
2730 );
2731 if (_array) {
2732 releasePointer(_env, _array, params, JNI_FALSE);
2733 }
Jack Palevich27f80022009-04-15 19:13:17 -07002734}
2735
2736/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
2737static void
2738android_glTexGeniOES__III
2739 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002740 glTexGeniOES(
2741 (GLenum)coord,
2742 (GLenum)pname,
2743 (GLint)param
2744 );
Jack Palevich27f80022009-04-15 19:13:17 -07002745}
2746
2747/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
2748static void
2749android_glTexGenivOES__II_3II
2750 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002751 jint _exception = 0;
2752 const char * _exceptionType;
2753 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002754 GLint *params_base = (GLint *) 0;
2755 jint _remaining;
2756 GLint *params = (GLint *) 0;
2757
2758 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002759 _exception = 1;
2760 _exceptionType = "java/lang/IllegalArgumentException";
2761 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002762 goto exit;
2763 }
2764 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002765 _exception = 1;
2766 _exceptionType = "java/lang/IllegalArgumentException";
2767 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002768 goto exit;
2769 }
2770 _remaining = _env->GetArrayLength(params_ref) - offset;
2771 params_base = (GLint *)
2772 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2773 params = params_base + offset;
2774
2775 glTexGenivOES(
2776 (GLenum)coord,
2777 (GLenum)pname,
2778 (GLint *)params
2779 );
2780
2781exit:
2782 if (params_base) {
2783 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2784 JNI_ABORT);
2785 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002786 if (_exception) {
2787 jniThrowException(_env, _exceptionType, _exceptionMessage);
2788 }
Jack Palevich27f80022009-04-15 19:13:17 -07002789}
2790
2791/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
2792static void
2793android_glTexGenivOES__IILjava_nio_IntBuffer_2
2794 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002795 jarray _array = (jarray) 0;
2796 jint _remaining;
2797 GLint *params = (GLint *) 0;
2798
2799 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2800 glTexGenivOES(
2801 (GLenum)coord,
2802 (GLenum)pname,
2803 (GLint *)params
2804 );
2805 if (_array) {
2806 releasePointer(_env, _array, params, JNI_FALSE);
2807 }
Jack Palevich27f80022009-04-15 19:13:17 -07002808}
2809
2810/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
2811static void
2812android_glTexGenxOES__III
2813 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002814 glTexGenxOES(
2815 (GLenum)coord,
2816 (GLenum)pname,
2817 (GLfixed)param
2818 );
Jack Palevich27f80022009-04-15 19:13:17 -07002819}
2820
2821/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
2822static void
2823android_glTexGenxvOES__II_3II
2824 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray 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 GLfixed *params_base = (GLfixed *) 0;
2829 jint _remaining;
2830 GLfixed *params = (GLfixed *) 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 = (GLfixed *)
2846 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2847 params = params_base + offset;
2848
2849 glTexGenxvOES(
2850 (GLenum)coord,
2851 (GLenum)pname,
2852 (GLfixed *)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 glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
2866static void
2867android_glTexGenxvOES__IILjava_nio_IntBuffer_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;
2870 jint _remaining;
2871 GLfixed *params = (GLfixed *) 0;
2872
2873 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
2874 glTexGenxvOES(
2875 (GLenum)coord,
2876 (GLenum)pname,
2877 (GLfixed *)params
2878 );
2879 if (_array) {
2880 releasePointer(_env, _array, params, JNI_FALSE);
2881 }
Jack Palevich27f80022009-04-15 19:13:17 -07002882}
2883
2884/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
2885static void
2886android_glGetTexGenfvOES__II_3FI
2887 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002888 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002889 const char * _exceptionType;
2890 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002891 GLfloat *params_base = (GLfloat *) 0;
2892 jint _remaining;
2893 GLfloat *params = (GLfloat *) 0;
2894
2895 if (!params_ref) {
2896 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002897 _exceptionType = "java/lang/IllegalArgumentException";
2898 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002899 goto exit;
2900 }
2901 if (offset < 0) {
2902 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002903 _exceptionType = "java/lang/IllegalArgumentException";
2904 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002905 goto exit;
2906 }
2907 _remaining = _env->GetArrayLength(params_ref) - offset;
2908 params_base = (GLfloat *)
2909 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2910 params = params_base + offset;
2911
2912 glGetTexGenfvOES(
2913 (GLenum)coord,
2914 (GLenum)pname,
2915 (GLfloat *)params
2916 );
2917
2918exit:
2919 if (params_base) {
2920 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2921 _exception ? JNI_ABORT: 0);
2922 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002923 if (_exception) {
2924 jniThrowException(_env, _exceptionType, _exceptionMessage);
2925 }
Jack Palevich27f80022009-04-15 19:13:17 -07002926}
2927
2928/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
2929static void
2930android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
2931 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002932 jarray _array = (jarray) 0;
2933 jint _remaining;
2934 GLfloat *params = (GLfloat *) 0;
2935
2936 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2937 glGetTexGenfvOES(
2938 (GLenum)coord,
2939 (GLenum)pname,
2940 (GLfloat *)params
2941 );
2942 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002943 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07002944 }
Jack Palevich27f80022009-04-15 19:13:17 -07002945}
2946
2947/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
2948static void
2949android_glGetTexGenivOES__II_3II
2950 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002951 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002952 const char * _exceptionType;
2953 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07002954 GLint *params_base = (GLint *) 0;
2955 jint _remaining;
2956 GLint *params = (GLint *) 0;
2957
2958 if (!params_ref) {
2959 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002960 _exceptionType = "java/lang/IllegalArgumentException";
2961 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002962 goto exit;
2963 }
2964 if (offset < 0) {
2965 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002966 _exceptionType = "java/lang/IllegalArgumentException";
2967 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002968 goto exit;
2969 }
2970 _remaining = _env->GetArrayLength(params_ref) - offset;
2971 params_base = (GLint *)
2972 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2973 params = params_base + offset;
2974
2975 glGetTexGenivOES(
2976 (GLenum)coord,
2977 (GLenum)pname,
2978 (GLint *)params
2979 );
2980
2981exit:
2982 if (params_base) {
2983 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2984 _exception ? JNI_ABORT: 0);
2985 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002986 if (_exception) {
2987 jniThrowException(_env, _exceptionType, _exceptionMessage);
2988 }
Jack Palevich27f80022009-04-15 19:13:17 -07002989}
2990
2991/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
2992static void
2993android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
2994 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002995 jarray _array = (jarray) 0;
2996 jint _remaining;
2997 GLint *params = (GLint *) 0;
2998
2999 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
3000 glGetTexGenivOES(
3001 (GLenum)coord,
3002 (GLenum)pname,
3003 (GLint *)params
3004 );
3005 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003006 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003007 }
Jack Palevich27f80022009-04-15 19:13:17 -07003008}
3009
3010/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3011static void
3012android_glGetTexGenxvOES__II_3II
3013 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003014 jint _exception = 0;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003015 const char * _exceptionType;
3016 const char * _exceptionMessage;
Jack Palevicha3795852009-04-24 10:35:11 -07003017 GLfixed *params_base = (GLfixed *) 0;
3018 jint _remaining;
3019 GLfixed *params = (GLfixed *) 0;
3020
3021 if (!params_ref) {
3022 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003023 _exceptionType = "java/lang/IllegalArgumentException";
3024 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003025 goto exit;
3026 }
3027 if (offset < 0) {
3028 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003029 _exceptionType = "java/lang/IllegalArgumentException";
3030 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003031 goto exit;
3032 }
3033 _remaining = _env->GetArrayLength(params_ref) - offset;
3034 params_base = (GLfixed *)
3035 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3036 params = params_base + offset;
3037
3038 glGetTexGenxvOES(
3039 (GLenum)coord,
3040 (GLenum)pname,
3041 (GLfixed *)params
3042 );
3043
3044exit:
3045 if (params_base) {
3046 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3047 _exception ? JNI_ABORT: 0);
3048 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003049 if (_exception) {
3050 jniThrowException(_env, _exceptionType, _exceptionMessage);
3051 }
Jack Palevich27f80022009-04-15 19:13:17 -07003052}
3053
3054/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3055static void
3056android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3057 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003058 jarray _array = (jarray) 0;
3059 jint _remaining;
3060 GLfixed *params = (GLfixed *) 0;
3061
3062 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
3063 glGetTexGenxvOES(
3064 (GLenum)coord,
3065 (GLenum)pname,
3066 (GLfixed *)params
3067 );
3068 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003069 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003070 }
Jack Palevich27f80022009-04-15 19:13:17 -07003071}
3072
3073static const char *classPathName = "android/opengl/GLES11Ext";
3074
3075static JNINativeMethod methods[] = {
3076{"_nativeClassInit", "()V", (void*)nativeClassInit },
3077{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
3078{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
3079{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
3080{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
3081{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
3082{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
3083{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
3084{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
3085{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
3086{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
3087{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
3088{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
3089{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
3090{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
3091{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
3092{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
3093{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
3094{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
3095{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
3096{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
3097{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
3098{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
3099{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
3100{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
3101{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
3102{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
3103{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
3104{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
3105{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
3106{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
3107{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
3108{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
3109{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
3110{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
3111{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
3112{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
3113{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
3114{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3115{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
3116{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3117{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
3118{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
3119{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
3120{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
3121{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
3122{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
3123{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
3124{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
3125{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
3126{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
3127{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
3128{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
3129{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
3130{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
3131{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
3132{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
3133{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
3134{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
3135{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
3136{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
3137{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
3138{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
3139{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
3140{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
3141{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
3142{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
3143{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
3144{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3145{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
3146{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
3147{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3148{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
3149{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
3150{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
3151{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
3152{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3153{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
3154{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3155{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
3156{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
3157{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
3158{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
3159{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
3160{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
3161{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
3162{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
3163{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
3164{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
3165{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
3166{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
3167{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
3168{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
3169{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
3170{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
3171{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08003172{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
3173{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07003174{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
3175{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
3176{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
3177{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
3178{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3179{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
3180{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3181{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
3182{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
3183{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
3184{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3185{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
3186{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
3187{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
3188{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
3189{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
3190{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
3191{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
3192{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3193{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
3194{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
3195{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
3196{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
3197};
3198
3199int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
3200{
3201 int err;
3202 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3203 return err;
3204}