blob: d6dc0fed1bdb6abb8b6ce1515d9c060df6409dea [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) {
200 GLshort *coords_base = (GLshort *) 0;
201 jint _remaining;
202 GLshort *coords = (GLshort *) 0;
203
204 if (!coords_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700205 jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
Jack Palevich27f80022009-04-15 19:13:17 -0700206 goto exit;
207 }
208 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700209 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich27f80022009-04-15 19:13:17 -0700210 goto exit;
211 }
212 _remaining = _env->GetArrayLength(coords_ref) - offset;
213 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700214 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700215 goto exit;
216 }
217 coords_base = (GLshort *)
218 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
219 coords = coords_base + offset;
220
221 glDrawTexsvOES(
222 (GLshort *)coords
223 );
224
225exit:
226 if (coords_base) {
227 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
228 JNI_ABORT);
229 }
230}
231
232/* void glDrawTexsvOES ( const GLshort *coords ) */
233static void
234android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
235 (JNIEnv *_env, jobject _this, jobject coords_buf) {
236 jarray _array = (jarray) 0;
237 jint _remaining;
238 GLshort *coords = (GLshort *) 0;
239
240 coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
241 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700242 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700243 goto exit;
244 }
245 glDrawTexsvOES(
246 (GLshort *)coords
247 );
248
249exit:
250 if (_array) {
251 releasePointer(_env, _array, coords, JNI_FALSE);
252 }
253}
254
255/* void glDrawTexivOES ( const GLint *coords ) */
256static void
257android_glDrawTexivOES___3II
258 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
259 GLint *coords_base = (GLint *) 0;
260 jint _remaining;
261 GLint *coords = (GLint *) 0;
262
263 if (!coords_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700264 jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
Jack Palevich27f80022009-04-15 19:13:17 -0700265 goto exit;
266 }
267 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700268 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich27f80022009-04-15 19:13:17 -0700269 goto exit;
270 }
271 _remaining = _env->GetArrayLength(coords_ref) - offset;
272 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700273 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700274 goto exit;
275 }
276 coords_base = (GLint *)
277 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
278 coords = coords_base + offset;
279
280 glDrawTexivOES(
281 (GLint *)coords
282 );
283
284exit:
285 if (coords_base) {
286 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
287 JNI_ABORT);
288 }
289}
290
291/* void glDrawTexivOES ( const GLint *coords ) */
292static void
293android_glDrawTexivOES__Ljava_nio_IntBuffer_2
294 (JNIEnv *_env, jobject _this, jobject coords_buf) {
295 jarray _array = (jarray) 0;
296 jint _remaining;
297 GLint *coords = (GLint *) 0;
298
299 coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
300 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700301 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700302 goto exit;
303 }
304 glDrawTexivOES(
305 (GLint *)coords
306 );
307
308exit:
309 if (_array) {
310 releasePointer(_env, _array, coords, JNI_FALSE);
311 }
312}
313
314/* void glDrawTexxvOES ( const GLfixed *coords ) */
315static void
316android_glDrawTexxvOES___3II
317 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
318 GLfixed *coords_base = (GLfixed *) 0;
319 jint _remaining;
320 GLfixed *coords = (GLfixed *) 0;
321
322 if (!coords_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700323 jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
Jack Palevich27f80022009-04-15 19:13:17 -0700324 goto exit;
325 }
326 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700327 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich27f80022009-04-15 19:13:17 -0700328 goto exit;
329 }
330 _remaining = _env->GetArrayLength(coords_ref) - offset;
331 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700332 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700333 goto exit;
334 }
335 coords_base = (GLfixed *)
336 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
337 coords = coords_base + offset;
338
339 glDrawTexxvOES(
340 (GLfixed *)coords
341 );
342
343exit:
344 if (coords_base) {
345 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
346 JNI_ABORT);
347 }
348}
349
350/* void glDrawTexxvOES ( const GLfixed *coords ) */
351static void
352android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
353 (JNIEnv *_env, jobject _this, jobject coords_buf) {
354 jarray _array = (jarray) 0;
355 jint _remaining;
356 GLfixed *coords = (GLfixed *) 0;
357
358 coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
359 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700360 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700361 goto exit;
362 }
363 glDrawTexxvOES(
364 (GLfixed *)coords
365 );
366
367exit:
368 if (_array) {
369 releasePointer(_env, _array, coords, JNI_FALSE);
370 }
371}
372
373/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
374static void
375android_glDrawTexfOES__FFFFF
376 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
377 glDrawTexfOES(
378 (GLfloat)x,
379 (GLfloat)y,
380 (GLfloat)z,
381 (GLfloat)width,
382 (GLfloat)height
383 );
384}
385
386/* void glDrawTexfvOES ( const GLfloat *coords ) */
387static void
388android_glDrawTexfvOES___3FI
389 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
390 GLfloat *coords_base = (GLfloat *) 0;
391 jint _remaining;
392 GLfloat *coords = (GLfloat *) 0;
393
394 if (!coords_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700395 jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
Jack Palevich27f80022009-04-15 19:13:17 -0700396 goto exit;
397 }
398 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700399 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich27f80022009-04-15 19:13:17 -0700400 goto exit;
401 }
402 _remaining = _env->GetArrayLength(coords_ref) - offset;
403 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700404 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700405 goto exit;
406 }
407 coords_base = (GLfloat *)
408 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
409 coords = coords_base + offset;
410
411 glDrawTexfvOES(
412 (GLfloat *)coords
413 );
414
415exit:
416 if (coords_base) {
417 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
418 JNI_ABORT);
419 }
420}
421
422/* void glDrawTexfvOES ( const GLfloat *coords ) */
423static void
424android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
425 (JNIEnv *_env, jobject _this, jobject coords_buf) {
426 jarray _array = (jarray) 0;
427 jint _remaining;
428 GLfloat *coords = (GLfloat *) 0;
429
430 coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
431 if (_remaining < 5) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700432 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
Jack Palevich27f80022009-04-15 19:13:17 -0700433 goto exit;
434 }
435 glDrawTexfvOES(
436 (GLfloat *)coords
437 );
438
439exit:
440 if (_array) {
441 releasePointer(_env, _array, coords, JNI_FALSE);
442 }
443}
444
445/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
446static void
447android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
448 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700449 jint _exception = 0;
450 jarray _array = (jarray) 0;
451 jint _remaining;
452 GLeglImageOES image = (GLeglImageOES) 0;
453
454 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining);
455 glEGLImageTargetTexture2DOES(
456 (GLenum)target,
457 (GLeglImageOES)image
458 );
459 if (_array) {
460 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
461 }
Jack Palevich27f80022009-04-15 19:13:17 -0700462}
463
464/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
465static void
466android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
467 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700468 jint _exception = 0;
469 jarray _array = (jarray) 0;
470 jint _remaining;
471 GLeglImageOES image = (GLeglImageOES) 0;
472
473 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining);
474 glEGLImageTargetRenderbufferStorageOES(
475 (GLenum)target,
476 (GLeglImageOES)image
477 );
478 if (_array) {
479 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
480 }
Jack Palevich27f80022009-04-15 19:13:17 -0700481}
482
483/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
484static void
485android_glAlphaFuncxOES__II
486 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700487 glAlphaFuncxOES(
488 (GLenum)func,
489 (GLclampx)ref
490 );
Jack Palevich27f80022009-04-15 19:13:17 -0700491}
492
493/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
494static void
495android_glClearColorxOES__IIII
496 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700497 glClearColorxOES(
498 (GLclampx)red,
499 (GLclampx)green,
500 (GLclampx)blue,
501 (GLclampx)alpha
502 );
Jack Palevich27f80022009-04-15 19:13:17 -0700503}
504
505/* void glClearDepthxOES ( GLclampx depth ) */
506static void
507android_glClearDepthxOES__I
508 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700509 glClearDepthxOES(
510 (GLclampx)depth
511 );
Jack Palevich27f80022009-04-15 19:13:17 -0700512}
513
514/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
515static void
516android_glClipPlanexOES__I_3II
517 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700518 GLfixed *equation_base = (GLfixed *) 0;
519 jint _remaining;
520 GLfixed *equation = (GLfixed *) 0;
521
522 if (!equation_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700523 jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700524 goto exit;
525 }
526 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700527 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700528 goto exit;
529 }
530 _remaining = _env->GetArrayLength(equation_ref) - offset;
531 equation_base = (GLfixed *)
532 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
533 equation = equation_base + offset;
534
535 glClipPlanexOES(
536 (GLenum)plane,
537 (GLfixed *)equation
538 );
539
540exit:
541 if (equation_base) {
542 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
543 JNI_ABORT);
544 }
Jack Palevich27f80022009-04-15 19:13:17 -0700545}
546
547/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
548static void
549android_glClipPlanexOES__ILjava_nio_IntBuffer_2
550 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700551 jarray _array = (jarray) 0;
552 jint _remaining;
553 GLfixed *equation = (GLfixed *) 0;
554
555 equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
556 glClipPlanexOES(
557 (GLenum)plane,
558 (GLfixed *)equation
559 );
560 if (_array) {
561 releasePointer(_env, _array, equation, JNI_FALSE);
562 }
Jack Palevich27f80022009-04-15 19:13:17 -0700563}
564
565/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
566static void
567android_glColor4xOES__IIII
568 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700569 glColor4xOES(
570 (GLfixed)red,
571 (GLfixed)green,
572 (GLfixed)blue,
573 (GLfixed)alpha
574 );
Jack Palevich27f80022009-04-15 19:13:17 -0700575}
576
577/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
578static void
579android_glDepthRangexOES__II
580 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700581 glDepthRangexOES(
582 (GLclampx)zNear,
583 (GLclampx)zFar
584 );
Jack Palevich27f80022009-04-15 19:13:17 -0700585}
586
587/* void glFogxOES ( GLenum pname, GLfixed param ) */
588static void
589android_glFogxOES__II
590 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -0700591 glFogxOES(
592 (GLenum)pname,
593 (GLfixed)param
594 );
Jack Palevich27f80022009-04-15 19:13:17 -0700595}
596
597/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
598static void
599android_glFogxvOES__I_3II
600 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700601 GLfixed *params_base = (GLfixed *) 0;
602 jint _remaining;
603 GLfixed *params = (GLfixed *) 0;
604
605 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700606 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700607 goto exit;
608 }
609 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700610 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700611 goto exit;
612 }
613 _remaining = _env->GetArrayLength(params_ref) - offset;
614 params_base = (GLfixed *)
615 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
616 params = params_base + offset;
617
618 glFogxvOES(
619 (GLenum)pname,
620 (GLfixed *)params
621 );
622
623exit:
624 if (params_base) {
625 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
626 JNI_ABORT);
627 }
Jack Palevich27f80022009-04-15 19:13:17 -0700628}
629
630/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
631static void
632android_glFogxvOES__ILjava_nio_IntBuffer_2
633 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700634 jarray _array = (jarray) 0;
635 jint _remaining;
636 GLfixed *params = (GLfixed *) 0;
637
638 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
639 glFogxvOES(
640 (GLenum)pname,
641 (GLfixed *)params
642 );
643 if (_array) {
644 releasePointer(_env, _array, params, JNI_FALSE);
645 }
Jack Palevich27f80022009-04-15 19:13:17 -0700646}
647
648/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
649static void
650android_glFrustumxOES__IIIIII
651 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700652 glFrustumxOES(
653 (GLfixed)left,
654 (GLfixed)right,
655 (GLfixed)bottom,
656 (GLfixed)top,
657 (GLfixed)zNear,
658 (GLfixed)zFar
659 );
Jack Palevich27f80022009-04-15 19:13:17 -0700660}
661
662/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
663static void
664android_glGetClipPlanexOES__I_3II
665 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700666 jint _exception = 0;
667 GLfixed *eqn_base = (GLfixed *) 0;
668 jint _remaining;
669 GLfixed *eqn = (GLfixed *) 0;
670
671 if (!eqn_ref) {
672 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700673 jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700674 goto exit;
675 }
676 if (offset < 0) {
677 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700678 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700679 goto exit;
680 }
681 _remaining = _env->GetArrayLength(eqn_ref) - offset;
682 if (_remaining < 4) {
683 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700684 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4");
Jack Palevicha3795852009-04-24 10:35:11 -0700685 goto exit;
686 }
687 eqn_base = (GLfixed *)
688 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
689 eqn = eqn_base + offset;
690
691 glGetClipPlanexOES(
692 (GLenum)pname,
693 (GLfixed *)eqn
694 );
695
696exit:
697 if (eqn_base) {
698 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
699 _exception ? JNI_ABORT: 0);
700 }
Jack Palevich27f80022009-04-15 19:13:17 -0700701}
702
703/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
704static void
705android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
706 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700707 jint _exception = 0;
708 jarray _array = (jarray) 0;
709 jint _remaining;
710 GLfixed *eqn = (GLfixed *) 0;
711
712 eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
713 if (_remaining < 4) {
714 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700715 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4");
Jack Palevicha3795852009-04-24 10:35:11 -0700716 goto exit;
717 }
718 glGetClipPlanexOES(
719 (GLenum)pname,
720 (GLfixed *)eqn
721 );
722
723exit:
724 if (_array) {
725 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
726 }
Jack Palevich27f80022009-04-15 19:13:17 -0700727}
728
729/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
730static void
731android_glGetFixedvOES__I_3II
732 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700733 jint _exception = 0;
734 GLfixed *params_base = (GLfixed *) 0;
735 jint _remaining;
736 GLfixed *params = (GLfixed *) 0;
737
738 if (!params_ref) {
739 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700740 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700741 goto exit;
742 }
743 if (offset < 0) {
744 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700745 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700746 goto exit;
747 }
748 _remaining = _env->GetArrayLength(params_ref) - offset;
749 params_base = (GLfixed *)
750 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
751 params = params_base + offset;
752
753 glGetFixedvOES(
754 (GLenum)pname,
755 (GLfixed *)params
756 );
757
758exit:
759 if (params_base) {
760 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
761 _exception ? JNI_ABORT: 0);
762 }
Jack Palevich27f80022009-04-15 19:13:17 -0700763}
764
765/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
766static void
767android_glGetFixedvOES__ILjava_nio_IntBuffer_2
768 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700769 jint _exception = 0;
770 jarray _array = (jarray) 0;
771 jint _remaining;
772 GLfixed *params = (GLfixed *) 0;
773
774 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
775 glGetFixedvOES(
776 (GLenum)pname,
777 (GLfixed *)params
778 );
779 if (_array) {
780 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
781 }
Jack Palevich27f80022009-04-15 19:13:17 -0700782}
783
784/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
785static void
786android_glGetLightxvOES__II_3II
787 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700788 jint _exception = 0;
789 GLfixed *params_base = (GLfixed *) 0;
790 jint _remaining;
791 GLfixed *params = (GLfixed *) 0;
792
793 if (!params_ref) {
794 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700795 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700796 goto exit;
797 }
798 if (offset < 0) {
799 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700800 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700801 goto exit;
802 }
803 _remaining = _env->GetArrayLength(params_ref) - offset;
804 params_base = (GLfixed *)
805 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
806 params = params_base + offset;
807
808 glGetLightxvOES(
809 (GLenum)light,
810 (GLenum)pname,
811 (GLfixed *)params
812 );
813
814exit:
815 if (params_base) {
816 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
817 _exception ? JNI_ABORT: 0);
818 }
Jack Palevich27f80022009-04-15 19:13:17 -0700819}
820
821/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
822static void
823android_glGetLightxvOES__IILjava_nio_IntBuffer_2
824 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700825 jint _exception = 0;
826 jarray _array = (jarray) 0;
827 jint _remaining;
828 GLfixed *params = (GLfixed *) 0;
829
830 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
831 glGetLightxvOES(
832 (GLenum)light,
833 (GLenum)pname,
834 (GLfixed *)params
835 );
836 if (_array) {
837 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
838 }
Jack Palevich27f80022009-04-15 19:13:17 -0700839}
840
841/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
842static void
843android_glGetMaterialxvOES__II_3II
844 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700845 jint _exception = 0;
846 GLfixed *params_base = (GLfixed *) 0;
847 jint _remaining;
848 GLfixed *params = (GLfixed *) 0;
849
850 if (!params_ref) {
851 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700852 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700853 goto exit;
854 }
855 if (offset < 0) {
856 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700857 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700858 goto exit;
859 }
860 _remaining = _env->GetArrayLength(params_ref) - offset;
861 params_base = (GLfixed *)
862 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
863 params = params_base + offset;
864
865 glGetMaterialxvOES(
866 (GLenum)face,
867 (GLenum)pname,
868 (GLfixed *)params
869 );
870
871exit:
872 if (params_base) {
873 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
874 _exception ? JNI_ABORT: 0);
875 }
Jack Palevich27f80022009-04-15 19:13:17 -0700876}
877
878/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
879static void
880android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
881 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700882 jint _exception = 0;
883 jarray _array = (jarray) 0;
884 jint _remaining;
885 GLfixed *params = (GLfixed *) 0;
886
887 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
888 glGetMaterialxvOES(
889 (GLenum)face,
890 (GLenum)pname,
891 (GLfixed *)params
892 );
893 if (_array) {
894 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
895 }
Jack Palevich27f80022009-04-15 19:13:17 -0700896}
897
898/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
899static void
900android_glGetTexEnvxvOES__II_3II
901 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700902 jint _exception = 0;
903 GLfixed *params_base = (GLfixed *) 0;
904 jint _remaining;
905 GLfixed *params = (GLfixed *) 0;
906
907 if (!params_ref) {
908 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700909 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700910 goto exit;
911 }
912 if (offset < 0) {
913 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700914 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700915 goto exit;
916 }
917 _remaining = _env->GetArrayLength(params_ref) - offset;
918 params_base = (GLfixed *)
919 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
920 params = params_base + offset;
921
922 glGetTexEnvxvOES(
923 (GLenum)env,
924 (GLenum)pname,
925 (GLfixed *)params
926 );
927
928exit:
929 if (params_base) {
930 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
931 _exception ? JNI_ABORT: 0);
932 }
Jack Palevich27f80022009-04-15 19:13:17 -0700933}
934
935/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
936static void
937android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
938 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700939 jint _exception = 0;
940 jarray _array = (jarray) 0;
941 jint _remaining;
942 GLfixed *params = (GLfixed *) 0;
943
944 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
945 glGetTexEnvxvOES(
946 (GLenum)env,
947 (GLenum)pname,
948 (GLfixed *)params
949 );
950 if (_array) {
951 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
952 }
Jack Palevich27f80022009-04-15 19:13:17 -0700953}
954
955/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
956static void
957android_glGetTexParameterxvOES__II_3II
958 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700959 jint _exception = 0;
960 GLfixed *params_base = (GLfixed *) 0;
961 jint _remaining;
962 GLfixed *params = (GLfixed *) 0;
963
964 if (!params_ref) {
965 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700966 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -0700967 goto exit;
968 }
969 if (offset < 0) {
970 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700971 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -0700972 goto exit;
973 }
974 _remaining = _env->GetArrayLength(params_ref) - offset;
975 params_base = (GLfixed *)
976 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
977 params = params_base + offset;
978
979 glGetTexParameterxvOES(
980 (GLenum)target,
981 (GLenum)pname,
982 (GLfixed *)params
983 );
984
985exit:
986 if (params_base) {
987 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
988 _exception ? JNI_ABORT: 0);
989 }
Jack Palevich27f80022009-04-15 19:13:17 -0700990}
991
992/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
993static void
994android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
995 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700996 jint _exception = 0;
997 jarray _array = (jarray) 0;
998 jint _remaining;
999 GLfixed *params = (GLfixed *) 0;
1000
1001 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1002 glGetTexParameterxvOES(
1003 (GLenum)target,
1004 (GLenum)pname,
1005 (GLfixed *)params
1006 );
1007 if (_array) {
1008 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
1009 }
Jack Palevich27f80022009-04-15 19:13:17 -07001010}
1011
1012/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1013static void
1014android_glLightModelxOES__II
1015 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001016 glLightModelxOES(
1017 (GLenum)pname,
1018 (GLfixed)param
1019 );
Jack Palevich27f80022009-04-15 19:13:17 -07001020}
1021
1022/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1023static void
1024android_glLightModelxvOES__I_3II
1025 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001026 GLfixed *params_base = (GLfixed *) 0;
1027 jint _remaining;
1028 GLfixed *params = (GLfixed *) 0;
1029
1030 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001031 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001032 goto exit;
1033 }
1034 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001035 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001036 goto exit;
1037 }
1038 _remaining = _env->GetArrayLength(params_ref) - offset;
1039 params_base = (GLfixed *)
1040 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1041 params = params_base + offset;
1042
1043 glLightModelxvOES(
1044 (GLenum)pname,
1045 (GLfixed *)params
1046 );
1047
1048exit:
1049 if (params_base) {
1050 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1051 JNI_ABORT);
1052 }
Jack Palevich27f80022009-04-15 19:13:17 -07001053}
1054
1055/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1056static void
1057android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1058 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001059 jarray _array = (jarray) 0;
1060 jint _remaining;
1061 GLfixed *params = (GLfixed *) 0;
1062
1063 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1064 glLightModelxvOES(
1065 (GLenum)pname,
1066 (GLfixed *)params
1067 );
1068 if (_array) {
1069 releasePointer(_env, _array, params, JNI_FALSE);
1070 }
Jack Palevich27f80022009-04-15 19:13:17 -07001071}
1072
1073/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1074static void
1075android_glLightxOES__III
1076 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001077 glLightxOES(
1078 (GLenum)light,
1079 (GLenum)pname,
1080 (GLfixed)param
1081 );
Jack Palevich27f80022009-04-15 19:13:17 -07001082}
1083
1084/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1085static void
1086android_glLightxvOES__II_3II
1087 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001088 GLfixed *params_base = (GLfixed *) 0;
1089 jint _remaining;
1090 GLfixed *params = (GLfixed *) 0;
1091
1092 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001093 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001094 goto exit;
1095 }
1096 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001097 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001098 goto exit;
1099 }
1100 _remaining = _env->GetArrayLength(params_ref) - offset;
1101 params_base = (GLfixed *)
1102 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1103 params = params_base + offset;
1104
1105 glLightxvOES(
1106 (GLenum)light,
1107 (GLenum)pname,
1108 (GLfixed *)params
1109 );
1110
1111exit:
1112 if (params_base) {
1113 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1114 JNI_ABORT);
1115 }
Jack Palevich27f80022009-04-15 19:13:17 -07001116}
1117
1118/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1119static void
1120android_glLightxvOES__IILjava_nio_IntBuffer_2
1121 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001122 jarray _array = (jarray) 0;
1123 jint _remaining;
1124 GLfixed *params = (GLfixed *) 0;
1125
1126 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1127 glLightxvOES(
1128 (GLenum)light,
1129 (GLenum)pname,
1130 (GLfixed *)params
1131 );
1132 if (_array) {
1133 releasePointer(_env, _array, params, JNI_FALSE);
1134 }
Jack Palevich27f80022009-04-15 19:13:17 -07001135}
1136
1137/* void glLineWidthxOES ( GLfixed width ) */
1138static void
1139android_glLineWidthxOES__I
1140 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001141 glLineWidthxOES(
1142 (GLfixed)width
1143 );
Jack Palevich27f80022009-04-15 19:13:17 -07001144}
1145
1146/* void glLoadMatrixxOES ( const GLfixed *m ) */
1147static void
1148android_glLoadMatrixxOES___3II
1149 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001150 GLfixed *m_base = (GLfixed *) 0;
1151 jint _remaining;
1152 GLfixed *m = (GLfixed *) 0;
1153
1154 if (!m_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001155 jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001156 goto exit;
1157 }
1158 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001159 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001160 goto exit;
1161 }
1162 _remaining = _env->GetArrayLength(m_ref) - offset;
1163 m_base = (GLfixed *)
1164 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1165 m = m_base + offset;
1166
1167 glLoadMatrixxOES(
1168 (GLfixed *)m
1169 );
1170
1171exit:
1172 if (m_base) {
1173 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1174 JNI_ABORT);
1175 }
Jack Palevich27f80022009-04-15 19:13:17 -07001176}
1177
1178/* void glLoadMatrixxOES ( const GLfixed *m ) */
1179static void
1180android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1181 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001182 jarray _array = (jarray) 0;
1183 jint _remaining;
1184 GLfixed *m = (GLfixed *) 0;
1185
1186 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
1187 glLoadMatrixxOES(
1188 (GLfixed *)m
1189 );
1190 if (_array) {
1191 releasePointer(_env, _array, m, JNI_FALSE);
1192 }
Jack Palevich27f80022009-04-15 19:13:17 -07001193}
1194
1195/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1196static void
1197android_glMaterialxOES__III
1198 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001199 glMaterialxOES(
1200 (GLenum)face,
1201 (GLenum)pname,
1202 (GLfixed)param
1203 );
Jack Palevich27f80022009-04-15 19:13:17 -07001204}
1205
1206/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1207static void
1208android_glMaterialxvOES__II_3II
1209 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001210 GLfixed *params_base = (GLfixed *) 0;
1211 jint _remaining;
1212 GLfixed *params = (GLfixed *) 0;
1213
1214 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001215 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001216 goto exit;
1217 }
1218 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001219 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001220 goto exit;
1221 }
1222 _remaining = _env->GetArrayLength(params_ref) - offset;
1223 params_base = (GLfixed *)
1224 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1225 params = params_base + offset;
1226
1227 glMaterialxvOES(
1228 (GLenum)face,
1229 (GLenum)pname,
1230 (GLfixed *)params
1231 );
1232
1233exit:
1234 if (params_base) {
1235 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1236 JNI_ABORT);
1237 }
Jack Palevich27f80022009-04-15 19:13:17 -07001238}
1239
1240/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1241static void
1242android_glMaterialxvOES__IILjava_nio_IntBuffer_2
1243 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001244 jarray _array = (jarray) 0;
1245 jint _remaining;
1246 GLfixed *params = (GLfixed *) 0;
1247
1248 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1249 glMaterialxvOES(
1250 (GLenum)face,
1251 (GLenum)pname,
1252 (GLfixed *)params
1253 );
1254 if (_array) {
1255 releasePointer(_env, _array, params, JNI_FALSE);
1256 }
Jack Palevich27f80022009-04-15 19:13:17 -07001257}
1258
1259/* void glMultMatrixxOES ( const GLfixed *m ) */
1260static void
1261android_glMultMatrixxOES___3II
1262 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001263 GLfixed *m_base = (GLfixed *) 0;
1264 jint _remaining;
1265 GLfixed *m = (GLfixed *) 0;
1266
1267 if (!m_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001268 jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001269 goto exit;
1270 }
1271 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001272 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001273 goto exit;
1274 }
1275 _remaining = _env->GetArrayLength(m_ref) - offset;
1276 m_base = (GLfixed *)
1277 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1278 m = m_base + offset;
1279
1280 glMultMatrixxOES(
1281 (GLfixed *)m
1282 );
1283
1284exit:
1285 if (m_base) {
1286 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1287 JNI_ABORT);
1288 }
Jack Palevich27f80022009-04-15 19:13:17 -07001289}
1290
1291/* void glMultMatrixxOES ( const GLfixed *m ) */
1292static void
1293android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
1294 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001295 jarray _array = (jarray) 0;
1296 jint _remaining;
1297 GLfixed *m = (GLfixed *) 0;
1298
1299 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
1300 glMultMatrixxOES(
1301 (GLfixed *)m
1302 );
1303 if (_array) {
1304 releasePointer(_env, _array, m, JNI_FALSE);
1305 }
Jack Palevich27f80022009-04-15 19:13:17 -07001306}
1307
1308/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
1309static void
1310android_glMultiTexCoord4xOES__IIIII
1311 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07001312 glMultiTexCoord4xOES(
1313 (GLenum)target,
1314 (GLfixed)s,
1315 (GLfixed)t,
1316 (GLfixed)r,
1317 (GLfixed)q
1318 );
Jack Palevich27f80022009-04-15 19:13:17 -07001319}
1320
1321/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
1322static void
1323android_glNormal3xOES__III
1324 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07001325 glNormal3xOES(
1326 (GLfixed)nx,
1327 (GLfixed)ny,
1328 (GLfixed)nz
1329 );
Jack Palevich27f80022009-04-15 19:13:17 -07001330}
1331
1332/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1333static void
1334android_glOrthoxOES__IIIIII
1335 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001336 glOrthoxOES(
1337 (GLfixed)left,
1338 (GLfixed)right,
1339 (GLfixed)bottom,
1340 (GLfixed)top,
1341 (GLfixed)zNear,
1342 (GLfixed)zFar
1343 );
Jack Palevich27f80022009-04-15 19:13:17 -07001344}
1345
1346/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
1347static void
1348android_glPointParameterxOES__II
1349 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001350 glPointParameterxOES(
1351 (GLenum)pname,
1352 (GLfixed)param
1353 );
Jack Palevich27f80022009-04-15 19:13:17 -07001354}
1355
1356/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1357static void
1358android_glPointParameterxvOES__I_3II
1359 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001360 GLfixed *params_base = (GLfixed *) 0;
1361 jint _remaining;
1362 GLfixed *params = (GLfixed *) 0;
1363
1364 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001365 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001366 goto exit;
1367 }
1368 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001369 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001370 goto exit;
1371 }
1372 _remaining = _env->GetArrayLength(params_ref) - offset;
1373 params_base = (GLfixed *)
1374 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1375 params = params_base + offset;
1376
1377 glPointParameterxvOES(
1378 (GLenum)pname,
1379 (GLfixed *)params
1380 );
1381
1382exit:
1383 if (params_base) {
1384 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1385 JNI_ABORT);
1386 }
Jack Palevich27f80022009-04-15 19:13:17 -07001387}
1388
1389/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1390static void
1391android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
1392 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001393 jarray _array = (jarray) 0;
1394 jint _remaining;
1395 GLfixed *params = (GLfixed *) 0;
1396
1397 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1398 glPointParameterxvOES(
1399 (GLenum)pname,
1400 (GLfixed *)params
1401 );
1402 if (_array) {
1403 releasePointer(_env, _array, params, JNI_FALSE);
1404 }
Jack Palevich27f80022009-04-15 19:13:17 -07001405}
1406
1407/* void glPointSizexOES ( GLfixed size ) */
1408static void
1409android_glPointSizexOES__I
1410 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07001411 glPointSizexOES(
1412 (GLfixed)size
1413 );
Jack Palevich27f80022009-04-15 19:13:17 -07001414}
1415
1416/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
1417static void
1418android_glPolygonOffsetxOES__II
1419 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07001420 glPolygonOffsetxOES(
1421 (GLfixed)factor,
1422 (GLfixed)units
1423 );
Jack Palevich27f80022009-04-15 19:13:17 -07001424}
1425
1426/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
1427static void
1428android_glRotatexOES__IIII
1429 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001430 glRotatexOES(
1431 (GLfixed)angle,
1432 (GLfixed)x,
1433 (GLfixed)y,
1434 (GLfixed)z
1435 );
Jack Palevich27f80022009-04-15 19:13:17 -07001436}
1437
1438/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
1439static void
1440android_glSampleCoveragexOES__IZ
1441 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07001442 glSampleCoveragexOES(
1443 (GLclampx)value,
1444 (GLboolean)invert
1445 );
Jack Palevich27f80022009-04-15 19:13:17 -07001446}
1447
1448/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1449static void
1450android_glScalexOES__III
1451 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001452 glScalexOES(
1453 (GLfixed)x,
1454 (GLfixed)y,
1455 (GLfixed)z
1456 );
Jack Palevich27f80022009-04-15 19:13:17 -07001457}
1458
1459/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
1460static void
1461android_glTexEnvxOES__III
1462 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001463 glTexEnvxOES(
1464 (GLenum)target,
1465 (GLenum)pname,
1466 (GLfixed)param
1467 );
Jack Palevich27f80022009-04-15 19:13:17 -07001468}
1469
1470/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1471static void
1472android_glTexEnvxvOES__II_3II
1473 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001474 GLfixed *params_base = (GLfixed *) 0;
1475 jint _remaining;
1476 GLfixed *params = (GLfixed *) 0;
1477
1478 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001479 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001480 goto exit;
1481 }
1482 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001483 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001484 goto exit;
1485 }
1486 _remaining = _env->GetArrayLength(params_ref) - offset;
1487 params_base = (GLfixed *)
1488 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1489 params = params_base + offset;
1490
1491 glTexEnvxvOES(
1492 (GLenum)target,
1493 (GLenum)pname,
1494 (GLfixed *)params
1495 );
1496
1497exit:
1498 if (params_base) {
1499 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1500 JNI_ABORT);
1501 }
Jack Palevich27f80022009-04-15 19:13:17 -07001502}
1503
1504/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1505static void
1506android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
1507 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001508 jarray _array = (jarray) 0;
1509 jint _remaining;
1510 GLfixed *params = (GLfixed *) 0;
1511
1512 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1513 glTexEnvxvOES(
1514 (GLenum)target,
1515 (GLenum)pname,
1516 (GLfixed *)params
1517 );
1518 if (_array) {
1519 releasePointer(_env, _array, params, JNI_FALSE);
1520 }
Jack Palevich27f80022009-04-15 19:13:17 -07001521}
1522
1523/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
1524static void
1525android_glTexParameterxOES__III
1526 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001527 glTexParameterxOES(
1528 (GLenum)target,
1529 (GLenum)pname,
1530 (GLfixed)param
1531 );
Jack Palevich27f80022009-04-15 19:13:17 -07001532}
1533
1534/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1535static void
1536android_glTexParameterxvOES__II_3II
1537 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001538 GLfixed *params_base = (GLfixed *) 0;
1539 jint _remaining;
1540 GLfixed *params = (GLfixed *) 0;
1541
1542 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001543 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07001544 goto exit;
1545 }
1546 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001547 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07001548 goto exit;
1549 }
1550 _remaining = _env->GetArrayLength(params_ref) - offset;
1551 params_base = (GLfixed *)
1552 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1553 params = params_base + offset;
1554
1555 glTexParameterxvOES(
1556 (GLenum)target,
1557 (GLenum)pname,
1558 (GLfixed *)params
1559 );
1560
1561exit:
1562 if (params_base) {
1563 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1564 JNI_ABORT);
1565 }
Jack Palevich27f80022009-04-15 19:13:17 -07001566}
1567
1568/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1569static void
1570android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
1571 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001572 jarray _array = (jarray) 0;
1573 jint _remaining;
1574 GLfixed *params = (GLfixed *) 0;
1575
1576 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
1577 glTexParameterxvOES(
1578 (GLenum)target,
1579 (GLenum)pname,
1580 (GLfixed *)params
1581 );
1582 if (_array) {
1583 releasePointer(_env, _array, params, JNI_FALSE);
1584 }
Jack Palevich27f80022009-04-15 19:13:17 -07001585}
1586
1587/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1588static void
1589android_glTranslatexOES__III
1590 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001591 glTranslatexOES(
1592 (GLfixed)x,
1593 (GLfixed)y,
1594 (GLfixed)z
1595 );
Jack Palevich27f80022009-04-15 19:13:17 -07001596}
1597
1598/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
1599static jboolean
1600android_glIsRenderbufferOES__I
1601 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001602 GLboolean _returnValue;
1603 _returnValue = glIsRenderbufferOES(
1604 (GLuint)renderbuffer
1605 );
1606 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07001607}
1608
1609/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
1610static void
1611android_glBindRenderbufferOES__II
1612 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001613 glBindRenderbufferOES(
1614 (GLenum)target,
1615 (GLuint)renderbuffer
1616 );
Jack Palevich27f80022009-04-15 19:13:17 -07001617}
1618
1619/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
1620static void
1621android_glDeleteRenderbuffersOES__I_3II
1622 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07001623 GLuint *renderbuffers_base = (GLuint *) 0;
1624 jint _remaining;
1625 GLuint *renderbuffers = (GLuint *) 0;
1626
1627 if (!renderbuffers_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001628 jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
Jack Palevich73108672011-03-28 14:49:12 -07001629 goto exit;
1630 }
1631 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001632 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich73108672011-03-28 14:49:12 -07001633 goto exit;
1634 }
1635 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1636 if (_remaining < n) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001637 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
Jack Palevich73108672011-03-28 14:49:12 -07001638 goto exit;
1639 }
1640 renderbuffers_base = (GLuint *)
1641 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
1642 renderbuffers = renderbuffers_base + offset;
1643
1644 glDeleteRenderbuffersOES(
1645 (GLsizei)n,
1646 (GLuint *)renderbuffers
1647 );
1648
1649exit:
1650 if (renderbuffers_base) {
1651 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
1652 JNI_ABORT);
1653 }
Jack Palevich27f80022009-04-15 19:13:17 -07001654}
1655
1656/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
1657static void
1658android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
1659 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07001660 jarray _array = (jarray) 0;
1661 jint _remaining;
1662 GLuint *renderbuffers = (GLuint *) 0;
1663
1664 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
1665 if (_remaining < n) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001666 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
Jack Palevich73108672011-03-28 14:49:12 -07001667 goto exit;
1668 }
1669 glDeleteRenderbuffersOES(
1670 (GLsizei)n,
1671 (GLuint *)renderbuffers
1672 );
1673
1674exit:
1675 if (_array) {
1676 releasePointer(_env, _array, renderbuffers, JNI_FALSE);
1677 }
Jack Palevich27f80022009-04-15 19:13:17 -07001678}
1679
1680/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
1681static void
1682android_glGenRenderbuffersOES__I_3II
1683 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07001684 jint _exception = 0;
1685 GLuint *renderbuffers_base = (GLuint *) 0;
1686 jint _remaining;
1687 GLuint *renderbuffers = (GLuint *) 0;
1688
1689 if (!renderbuffers_ref) {
1690 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001691 jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
Jack Palevich73108672011-03-28 14:49:12 -07001692 goto exit;
1693 }
1694 if (offset < 0) {
1695 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001696 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich73108672011-03-28 14:49:12 -07001697 goto exit;
1698 }
1699 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1700 if (_remaining < n) {
1701 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001702 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
Jack Palevich73108672011-03-28 14:49:12 -07001703 goto exit;
1704 }
1705 renderbuffers_base = (GLuint *)
1706 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
1707 renderbuffers = renderbuffers_base + offset;
1708
1709 glGenRenderbuffersOES(
1710 (GLsizei)n,
1711 (GLuint *)renderbuffers
1712 );
1713
1714exit:
1715 if (renderbuffers_base) {
1716 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
1717 _exception ? JNI_ABORT: 0);
1718 }
Jack Palevich27f80022009-04-15 19:13:17 -07001719}
1720
1721/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
1722static void
1723android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
1724 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07001725 jint _exception = 0;
1726 jarray _array = (jarray) 0;
1727 jint _remaining;
1728 GLuint *renderbuffers = (GLuint *) 0;
1729
1730 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
1731 if (_remaining < n) {
1732 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001733 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
Jack Palevich73108672011-03-28 14:49:12 -07001734 goto exit;
1735 }
1736 glGenRenderbuffersOES(
1737 (GLsizei)n,
1738 (GLuint *)renderbuffers
1739 );
1740
1741exit:
1742 if (_array) {
1743 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
1744 }
Jack Palevich27f80022009-04-15 19:13:17 -07001745}
1746
1747/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
1748static void
1749android_glRenderbufferStorageOES__IIII
1750 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07001751 glRenderbufferStorageOES(
1752 (GLenum)target,
1753 (GLenum)internalformat,
1754 (GLsizei)width,
1755 (GLsizei)height
1756 );
Jack Palevich27f80022009-04-15 19:13:17 -07001757}
1758
1759/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
1760static void
1761android_glGetRenderbufferParameterivOES__II_3II
1762 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07001763 jint _exception = 0;
1764 GLint *params_base = (GLint *) 0;
1765 jint _remaining;
1766 GLint *params = (GLint *) 0;
1767
1768 if (!params_ref) {
1769 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001770 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevich73108672011-03-28 14:49:12 -07001771 goto exit;
1772 }
1773 if (offset < 0) {
1774 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001775 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich73108672011-03-28 14:49:12 -07001776 goto exit;
1777 }
1778 _remaining = _env->GetArrayLength(params_ref) - offset;
1779 if (_remaining < 1) {
1780 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001781 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
Jack Palevich73108672011-03-28 14:49:12 -07001782 goto exit;
1783 }
1784 params_base = (GLint *)
1785 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1786 params = params_base + offset;
1787
1788 glGetRenderbufferParameterivOES(
1789 (GLenum)target,
1790 (GLenum)pname,
1791 (GLint *)params
1792 );
1793
1794exit:
1795 if (params_base) {
1796 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1797 _exception ? JNI_ABORT: 0);
1798 }
Jack Palevich27f80022009-04-15 19:13:17 -07001799}
1800
1801/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
1802static void
1803android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
1804 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07001805 jint _exception = 0;
1806 jarray _array = (jarray) 0;
1807 jint _remaining;
1808 GLint *params = (GLint *) 0;
1809
1810 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
1811 if (_remaining < 1) {
1812 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001813 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
Jack Palevich73108672011-03-28 14:49:12 -07001814 goto exit;
1815 }
1816 glGetRenderbufferParameterivOES(
1817 (GLenum)target,
1818 (GLenum)pname,
1819 (GLint *)params
1820 );
1821
1822exit:
1823 if (_array) {
1824 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
1825 }
Jack Palevich27f80022009-04-15 19:13:17 -07001826}
1827
1828/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
1829static jboolean
1830android_glIsFramebufferOES__I
1831 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001832 GLboolean _returnValue;
1833 _returnValue = glIsFramebufferOES(
1834 (GLuint)framebuffer
1835 );
1836 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07001837}
1838
1839/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
1840static void
1841android_glBindFramebufferOES__II
1842 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001843 glBindFramebufferOES(
1844 (GLenum)target,
1845 (GLuint)framebuffer
1846 );
Jack Palevich27f80022009-04-15 19:13:17 -07001847}
1848
1849/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
1850static void
1851android_glDeleteFramebuffersOES__I_3II
1852 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07001853 GLuint *framebuffers_base = (GLuint *) 0;
1854 jint _remaining;
1855 GLuint *framebuffers = (GLuint *) 0;
1856
1857 if (!framebuffers_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001858 jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
Jack Palevich73108672011-03-28 14:49:12 -07001859 goto exit;
1860 }
1861 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001862 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich73108672011-03-28 14:49:12 -07001863 goto exit;
1864 }
1865 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
1866 if (_remaining < n) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001867 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
Jack Palevich73108672011-03-28 14:49:12 -07001868 goto exit;
1869 }
1870 framebuffers_base = (GLuint *)
1871 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
1872 framebuffers = framebuffers_base + offset;
1873
1874 glDeleteFramebuffersOES(
1875 (GLsizei)n,
1876 (GLuint *)framebuffers
1877 );
1878
1879exit:
1880 if (framebuffers_base) {
1881 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
1882 JNI_ABORT);
1883 }
Jack Palevich27f80022009-04-15 19:13:17 -07001884}
1885
1886/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
1887static void
1888android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
1889 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07001890 jarray _array = (jarray) 0;
1891 jint _remaining;
1892 GLuint *framebuffers = (GLuint *) 0;
1893
1894 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
1895 if (_remaining < n) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001896 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
Jack Palevich73108672011-03-28 14:49:12 -07001897 goto exit;
1898 }
1899 glDeleteFramebuffersOES(
1900 (GLsizei)n,
1901 (GLuint *)framebuffers
1902 );
1903
1904exit:
1905 if (_array) {
1906 releasePointer(_env, _array, framebuffers, JNI_FALSE);
1907 }
Jack Palevich27f80022009-04-15 19:13:17 -07001908}
1909
1910/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
1911static void
1912android_glGenFramebuffersOES__I_3II
1913 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07001914 jint _exception = 0;
1915 GLuint *framebuffers_base = (GLuint *) 0;
1916 jint _remaining;
1917 GLuint *framebuffers = (GLuint *) 0;
1918
1919 if (!framebuffers_ref) {
1920 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001921 jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
Jack Palevich73108672011-03-28 14:49:12 -07001922 goto exit;
1923 }
1924 if (offset < 0) {
1925 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001926 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich73108672011-03-28 14:49:12 -07001927 goto exit;
1928 }
1929 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
1930 if (_remaining < n) {
1931 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001932 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
Jack Palevich73108672011-03-28 14:49:12 -07001933 goto exit;
1934 }
1935 framebuffers_base = (GLuint *)
1936 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
1937 framebuffers = framebuffers_base + offset;
1938
1939 glGenFramebuffersOES(
1940 (GLsizei)n,
1941 (GLuint *)framebuffers
1942 );
1943
1944exit:
1945 if (framebuffers_base) {
1946 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
1947 _exception ? JNI_ABORT: 0);
1948 }
Jack Palevich27f80022009-04-15 19:13:17 -07001949}
1950
1951/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
1952static void
1953android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
1954 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07001955 jint _exception = 0;
1956 jarray _array = (jarray) 0;
1957 jint _remaining;
1958 GLuint *framebuffers = (GLuint *) 0;
1959
1960 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
1961 if (_remaining < n) {
1962 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07001963 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
Jack Palevich73108672011-03-28 14:49:12 -07001964 goto exit;
1965 }
1966 glGenFramebuffersOES(
1967 (GLsizei)n,
1968 (GLuint *)framebuffers
1969 );
1970
1971exit:
1972 if (_array) {
1973 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
1974 }
Jack Palevich27f80022009-04-15 19:13:17 -07001975}
1976
1977/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
1978static jint
1979android_glCheckFramebufferStatusOES__I
1980 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07001981 GLenum _returnValue;
1982 _returnValue = glCheckFramebufferStatusOES(
1983 (GLenum)target
1984 );
1985 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07001986}
1987
1988/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
1989static void
1990android_glFramebufferRenderbufferOES__IIII
1991 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07001992 glFramebufferRenderbufferOES(
1993 (GLenum)target,
1994 (GLenum)attachment,
1995 (GLenum)renderbuffertarget,
1996 (GLuint)renderbuffer
1997 );
Jack Palevich27f80022009-04-15 19:13:17 -07001998}
1999
2000/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
2001static void
2002android_glFramebufferTexture2DOES__IIIII
2003 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07002004 glFramebufferTexture2DOES(
2005 (GLenum)target,
2006 (GLenum)attachment,
2007 (GLenum)textarget,
2008 (GLuint)texture,
2009 (GLint)level
2010 );
Jack Palevich27f80022009-04-15 19:13:17 -07002011}
2012
2013/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2014static void
2015android_glGetFramebufferAttachmentParameterivOES__III_3II
2016 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002017 jint _exception = 0;
2018 GLint *params_base = (GLint *) 0;
2019 jint _remaining;
2020 GLint *params = (GLint *) 0;
2021
2022 if (!params_ref) {
2023 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002024 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevich73108672011-03-28 14:49:12 -07002025 goto exit;
2026 }
2027 if (offset < 0) {
2028 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002029 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevich73108672011-03-28 14:49:12 -07002030 goto exit;
2031 }
2032 _remaining = _env->GetArrayLength(params_ref) - offset;
2033 if (_remaining < 1) {
2034 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002035 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
Jack Palevich73108672011-03-28 14:49:12 -07002036 goto exit;
2037 }
2038 params_base = (GLint *)
2039 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2040 params = params_base + offset;
2041
2042 glGetFramebufferAttachmentParameterivOES(
2043 (GLenum)target,
2044 (GLenum)attachment,
2045 (GLenum)pname,
2046 (GLint *)params
2047 );
2048
2049exit:
2050 if (params_base) {
2051 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2052 _exception ? JNI_ABORT: 0);
2053 }
Jack Palevich27f80022009-04-15 19:13:17 -07002054}
2055
2056/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2057static void
2058android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
2059 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002060 jint _exception = 0;
2061 jarray _array = (jarray) 0;
2062 jint _remaining;
2063 GLint *params = (GLint *) 0;
2064
2065 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2066 if (_remaining < 1) {
2067 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002068 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
Jack Palevich73108672011-03-28 14:49:12 -07002069 goto exit;
2070 }
2071 glGetFramebufferAttachmentParameterivOES(
2072 (GLenum)target,
2073 (GLenum)attachment,
2074 (GLenum)pname,
2075 (GLint *)params
2076 );
2077
2078exit:
2079 if (_array) {
2080 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2081 }
Jack Palevich27f80022009-04-15 19:13:17 -07002082}
2083
2084/* void glGenerateMipmapOES ( GLenum target ) */
2085static void
2086android_glGenerateMipmapOES__I
2087 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002088 glGenerateMipmapOES(
2089 (GLenum)target
2090 );
Jack Palevich27f80022009-04-15 19:13:17 -07002091}
2092
2093/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
2094static void
2095android_glCurrentPaletteMatrixOES__I
2096 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002097 glCurrentPaletteMatrixOES(
2098 (GLuint)matrixpaletteindex
2099 );
Jack Palevich27f80022009-04-15 19:13:17 -07002100}
2101
2102/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
2103static void
2104android_glLoadPaletteFromModelViewMatrixOES__
2105 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002106 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07002107}
2108
2109/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2110static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002111android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
2112 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2113 jarray _array = (jarray) 0;
2114 jint _remaining;
2115 GLvoid *pointer = (GLvoid *) 0;
2116
2117 if (pointer_buf) {
2118 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2119 if ( ! pointer ) {
2120 return;
2121 }
2122 }
2123 glMatrixIndexPointerOESBounds(
2124 (GLint)size,
2125 (GLenum)type,
2126 (GLsizei)stride,
2127 (GLvoid *)pointer,
2128 (GLsizei)remaining
2129 );
Jack Palevich27f80022009-04-15 19:13:17 -07002130}
2131
2132/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2133static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002134android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
2135 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2136 jarray _array = (jarray) 0;
2137 jint _remaining;
2138 GLvoid *pointer = (GLvoid *) 0;
2139
2140 if (pointer_buf) {
2141 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2142 if ( ! pointer ) {
2143 return;
2144 }
2145 }
2146 glWeightPointerOESBounds(
2147 (GLint)size,
2148 (GLenum)type,
2149 (GLsizei)stride,
2150 (GLvoid *)pointer,
2151 (GLsizei)remaining
2152 );
Jack Palevich27f80022009-04-15 19:13:17 -07002153}
2154
2155/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
2156static void
2157android_glDepthRangefOES__FF
2158 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002159 glDepthRangefOES(
2160 (GLclampf)zNear,
2161 (GLclampf)zFar
2162 );
Jack Palevich27f80022009-04-15 19:13:17 -07002163}
2164
2165/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2166static void
2167android_glFrustumfOES__FFFFFF
2168 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002169 glFrustumfOES(
2170 (GLfloat)left,
2171 (GLfloat)right,
2172 (GLfloat)bottom,
2173 (GLfloat)top,
2174 (GLfloat)zNear,
2175 (GLfloat)zFar
2176 );
Jack Palevich27f80022009-04-15 19:13:17 -07002177}
2178
2179/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2180static void
2181android_glOrthofOES__FFFFFF
2182 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002183 glOrthofOES(
2184 (GLfloat)left,
2185 (GLfloat)right,
2186 (GLfloat)bottom,
2187 (GLfloat)top,
2188 (GLfloat)zNear,
2189 (GLfloat)zFar
2190 );
Jack Palevich27f80022009-04-15 19:13:17 -07002191}
2192
2193/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2194static void
2195android_glClipPlanefOES__I_3FI
2196 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002197 GLfloat *equation_base = (GLfloat *) 0;
2198 jint _remaining;
2199 GLfloat *equation = (GLfloat *) 0;
2200
2201 if (!equation_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002202 jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002203 goto exit;
2204 }
2205 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002206 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002207 goto exit;
2208 }
2209 _remaining = _env->GetArrayLength(equation_ref) - offset;
2210 equation_base = (GLfloat *)
2211 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
2212 equation = equation_base + offset;
2213
2214 glClipPlanefOES(
2215 (GLenum)plane,
2216 (GLfloat *)equation
2217 );
2218
2219exit:
2220 if (equation_base) {
2221 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
2222 JNI_ABORT);
2223 }
Jack Palevich27f80022009-04-15 19:13:17 -07002224}
2225
2226/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2227static void
2228android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
2229 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002230 jarray _array = (jarray) 0;
2231 jint _remaining;
2232 GLfloat *equation = (GLfloat *) 0;
2233
2234 equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
2235 glClipPlanefOES(
2236 (GLenum)plane,
2237 (GLfloat *)equation
2238 );
2239 if (_array) {
2240 releasePointer(_env, _array, equation, JNI_FALSE);
2241 }
Jack Palevich27f80022009-04-15 19:13:17 -07002242}
2243
2244/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2245static void
2246android_glGetClipPlanefOES__I_3FI
2247 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002248 jint _exception = 0;
2249 GLfloat *eqn_base = (GLfloat *) 0;
2250 jint _remaining;
2251 GLfloat *eqn = (GLfloat *) 0;
2252
2253 if (!eqn_ref) {
2254 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002255 jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002256 goto exit;
2257 }
2258 if (offset < 0) {
2259 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002260 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002261 goto exit;
2262 }
2263 _remaining = _env->GetArrayLength(eqn_ref) - offset;
2264 if (_remaining < 4) {
2265 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002266 jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4");
Jack Palevicha3795852009-04-24 10:35:11 -07002267 goto exit;
2268 }
2269 eqn_base = (GLfloat *)
2270 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
2271 eqn = eqn_base + offset;
2272
2273 glGetClipPlanefOES(
2274 (GLenum)pname,
2275 (GLfloat *)eqn
2276 );
2277
2278exit:
2279 if (eqn_base) {
2280 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
2281 _exception ? JNI_ABORT: 0);
2282 }
Jack Palevich27f80022009-04-15 19:13:17 -07002283}
2284
2285/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2286static void
2287android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
2288 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002289 jint _exception = 0;
2290 jarray _array = (jarray) 0;
2291 jint _remaining;
2292 GLfloat *eqn = (GLfloat *) 0;
2293
2294 eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
2295 if (_remaining < 4) {
2296 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002297 jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4");
Jack Palevicha3795852009-04-24 10:35:11 -07002298 goto exit;
2299 }
2300 glGetClipPlanefOES(
2301 (GLenum)pname,
2302 (GLfloat *)eqn
2303 );
2304
2305exit:
2306 if (_array) {
2307 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
2308 }
Jack Palevich27f80022009-04-15 19:13:17 -07002309}
2310
2311/* void glClearDepthfOES ( GLclampf depth ) */
2312static void
2313android_glClearDepthfOES__F
2314 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07002315 glClearDepthfOES(
2316 (GLclampf)depth
2317 );
Jack Palevich27f80022009-04-15 19:13:17 -07002318}
2319
2320/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
2321static void
2322android_glTexGenfOES__IIF
2323 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002324 glTexGenfOES(
2325 (GLenum)coord,
2326 (GLenum)pname,
2327 (GLfloat)param
2328 );
Jack Palevich27f80022009-04-15 19:13:17 -07002329}
2330
2331/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
2332static void
2333android_glTexGenfvOES__II_3FI
2334 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002335 GLfloat *params_base = (GLfloat *) 0;
2336 jint _remaining;
2337 GLfloat *params = (GLfloat *) 0;
2338
2339 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002340 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002341 goto exit;
2342 }
2343 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002344 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002345 goto exit;
2346 }
2347 _remaining = _env->GetArrayLength(params_ref) - offset;
2348 params_base = (GLfloat *)
2349 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2350 params = params_base + offset;
2351
2352 glTexGenfvOES(
2353 (GLenum)coord,
2354 (GLenum)pname,
2355 (GLfloat *)params
2356 );
2357
2358exit:
2359 if (params_base) {
2360 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2361 JNI_ABORT);
2362 }
Jack Palevich27f80022009-04-15 19:13:17 -07002363}
2364
2365/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
2366static void
2367android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
2368 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002369 jarray _array = (jarray) 0;
2370 jint _remaining;
2371 GLfloat *params = (GLfloat *) 0;
2372
2373 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2374 glTexGenfvOES(
2375 (GLenum)coord,
2376 (GLenum)pname,
2377 (GLfloat *)params
2378 );
2379 if (_array) {
2380 releasePointer(_env, _array, params, JNI_FALSE);
2381 }
Jack Palevich27f80022009-04-15 19:13:17 -07002382}
2383
2384/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
2385static void
2386android_glTexGeniOES__III
2387 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002388 glTexGeniOES(
2389 (GLenum)coord,
2390 (GLenum)pname,
2391 (GLint)param
2392 );
Jack Palevich27f80022009-04-15 19:13:17 -07002393}
2394
2395/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
2396static void
2397android_glTexGenivOES__II_3II
2398 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002399 GLint *params_base = (GLint *) 0;
2400 jint _remaining;
2401 GLint *params = (GLint *) 0;
2402
2403 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002404 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002405 goto exit;
2406 }
2407 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002408 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002409 goto exit;
2410 }
2411 _remaining = _env->GetArrayLength(params_ref) - offset;
2412 params_base = (GLint *)
2413 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2414 params = params_base + offset;
2415
2416 glTexGenivOES(
2417 (GLenum)coord,
2418 (GLenum)pname,
2419 (GLint *)params
2420 );
2421
2422exit:
2423 if (params_base) {
2424 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2425 JNI_ABORT);
2426 }
Jack Palevich27f80022009-04-15 19:13:17 -07002427}
2428
2429/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
2430static void
2431android_glTexGenivOES__IILjava_nio_IntBuffer_2
2432 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002433 jarray _array = (jarray) 0;
2434 jint _remaining;
2435 GLint *params = (GLint *) 0;
2436
2437 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2438 glTexGenivOES(
2439 (GLenum)coord,
2440 (GLenum)pname,
2441 (GLint *)params
2442 );
2443 if (_array) {
2444 releasePointer(_env, _array, params, JNI_FALSE);
2445 }
Jack Palevich27f80022009-04-15 19:13:17 -07002446}
2447
2448/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
2449static void
2450android_glTexGenxOES__III
2451 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002452 glTexGenxOES(
2453 (GLenum)coord,
2454 (GLenum)pname,
2455 (GLfixed)param
2456 );
Jack Palevich27f80022009-04-15 19:13:17 -07002457}
2458
2459/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
2460static void
2461android_glTexGenxvOES__II_3II
2462 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002463 GLfixed *params_base = (GLfixed *) 0;
2464 jint _remaining;
2465 GLfixed *params = (GLfixed *) 0;
2466
2467 if (!params_ref) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002468 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002469 goto exit;
2470 }
2471 if (offset < 0) {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002472 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002473 goto exit;
2474 }
2475 _remaining = _env->GetArrayLength(params_ref) - offset;
2476 params_base = (GLfixed *)
2477 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2478 params = params_base + offset;
2479
2480 glTexGenxvOES(
2481 (GLenum)coord,
2482 (GLenum)pname,
2483 (GLfixed *)params
2484 );
2485
2486exit:
2487 if (params_base) {
2488 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2489 JNI_ABORT);
2490 }
Jack Palevich27f80022009-04-15 19:13:17 -07002491}
2492
2493/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
2494static void
2495android_glTexGenxvOES__IILjava_nio_IntBuffer_2
2496 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002497 jarray _array = (jarray) 0;
2498 jint _remaining;
2499 GLfixed *params = (GLfixed *) 0;
2500
2501 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
2502 glTexGenxvOES(
2503 (GLenum)coord,
2504 (GLenum)pname,
2505 (GLfixed *)params
2506 );
2507 if (_array) {
2508 releasePointer(_env, _array, params, JNI_FALSE);
2509 }
Jack Palevich27f80022009-04-15 19:13:17 -07002510}
2511
2512/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
2513static void
2514android_glGetTexGenfvOES__II_3FI
2515 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002516 jint _exception = 0;
2517 GLfloat *params_base = (GLfloat *) 0;
2518 jint _remaining;
2519 GLfloat *params = (GLfloat *) 0;
2520
2521 if (!params_ref) {
2522 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002523 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002524 goto exit;
2525 }
2526 if (offset < 0) {
2527 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002528 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002529 goto exit;
2530 }
2531 _remaining = _env->GetArrayLength(params_ref) - offset;
2532 params_base = (GLfloat *)
2533 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2534 params = params_base + offset;
2535
2536 glGetTexGenfvOES(
2537 (GLenum)coord,
2538 (GLenum)pname,
2539 (GLfloat *)params
2540 );
2541
2542exit:
2543 if (params_base) {
2544 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2545 _exception ? JNI_ABORT: 0);
2546 }
Jack Palevich27f80022009-04-15 19:13:17 -07002547}
2548
2549/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
2550static void
2551android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
2552 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002553 jint _exception = 0;
2554 jarray _array = (jarray) 0;
2555 jint _remaining;
2556 GLfloat *params = (GLfloat *) 0;
2557
2558 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2559 glGetTexGenfvOES(
2560 (GLenum)coord,
2561 (GLenum)pname,
2562 (GLfloat *)params
2563 );
2564 if (_array) {
2565 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2566 }
Jack Palevich27f80022009-04-15 19:13:17 -07002567}
2568
2569/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
2570static void
2571android_glGetTexGenivOES__II_3II
2572 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002573 jint _exception = 0;
2574 GLint *params_base = (GLint *) 0;
2575 jint _remaining;
2576 GLint *params = (GLint *) 0;
2577
2578 if (!params_ref) {
2579 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002580 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002581 goto exit;
2582 }
2583 if (offset < 0) {
2584 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002585 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002586 goto exit;
2587 }
2588 _remaining = _env->GetArrayLength(params_ref) - offset;
2589 params_base = (GLint *)
2590 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2591 params = params_base + offset;
2592
2593 glGetTexGenivOES(
2594 (GLenum)coord,
2595 (GLenum)pname,
2596 (GLint *)params
2597 );
2598
2599exit:
2600 if (params_base) {
2601 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2602 _exception ? JNI_ABORT: 0);
2603 }
Jack Palevich27f80022009-04-15 19:13:17 -07002604}
2605
2606/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
2607static void
2608android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
2609 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002610 jint _exception = 0;
2611 jarray _array = (jarray) 0;
2612 jint _remaining;
2613 GLint *params = (GLint *) 0;
2614
2615 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2616 glGetTexGenivOES(
2617 (GLenum)coord,
2618 (GLenum)pname,
2619 (GLint *)params
2620 );
2621 if (_array) {
2622 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2623 }
Jack Palevich27f80022009-04-15 19:13:17 -07002624}
2625
2626/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
2627static void
2628android_glGetTexGenxvOES__II_3II
2629 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002630 jint _exception = 0;
2631 GLfixed *params_base = (GLfixed *) 0;
2632 jint _remaining;
2633 GLfixed *params = (GLfixed *) 0;
2634
2635 if (!params_ref) {
2636 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002637 jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
Jack Palevicha3795852009-04-24 10:35:11 -07002638 goto exit;
2639 }
2640 if (offset < 0) {
2641 _exception = 1;
Elliott Hughes24ce5fb2011-04-08 20:01:01 -07002642 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
Jack Palevicha3795852009-04-24 10:35:11 -07002643 goto exit;
2644 }
2645 _remaining = _env->GetArrayLength(params_ref) - offset;
2646 params_base = (GLfixed *)
2647 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2648 params = params_base + offset;
2649
2650 glGetTexGenxvOES(
2651 (GLenum)coord,
2652 (GLenum)pname,
2653 (GLfixed *)params
2654 );
2655
2656exit:
2657 if (params_base) {
2658 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2659 _exception ? JNI_ABORT: 0);
2660 }
Jack Palevich27f80022009-04-15 19:13:17 -07002661}
2662
2663/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
2664static void
2665android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
2666 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002667 jint _exception = 0;
2668 jarray _array = (jarray) 0;
2669 jint _remaining;
2670 GLfixed *params = (GLfixed *) 0;
2671
2672 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
2673 glGetTexGenxvOES(
2674 (GLenum)coord,
2675 (GLenum)pname,
2676 (GLfixed *)params
2677 );
2678 if (_array) {
2679 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2680 }
Jack Palevich27f80022009-04-15 19:13:17 -07002681}
2682
2683static const char *classPathName = "android/opengl/GLES11Ext";
2684
2685static JNINativeMethod methods[] = {
2686{"_nativeClassInit", "()V", (void*)nativeClassInit },
2687{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
2688{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
2689{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
2690{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
2691{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
2692{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
2693{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
2694{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
2695{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
2696{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
2697{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
2698{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
2699{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
2700{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
2701{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
2702{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
2703{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
2704{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
2705{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
2706{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
2707{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
2708{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
2709{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
2710{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
2711{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
2712{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
2713{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
2714{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
2715{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
2716{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
2717{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
2718{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
2719{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
2720{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
2721{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
2722{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
2723{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
2724{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
2725{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
2726{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
2727{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
2728{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
2729{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
2730{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
2731{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
2732{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
2733{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
2734{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
2735{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
2736{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
2737{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
2738{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
2739{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
2740{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
2741{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
2742{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
2743{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
2744{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
2745{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
2746{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
2747{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
2748{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
2749{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
2750{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
2751{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
2752{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
2753{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
2754{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
2755{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
2756{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
2757{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
2758{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
2759{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
2760{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
2761{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
2762{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
2763{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
2764{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
2765{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
2766{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
2767{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
2768{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
2769{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
2770{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
2771{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
2772{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
2773{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
2774{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
2775{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
2776{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
2777{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
2778{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
2779{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
2780{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
2781{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08002782{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
2783{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07002784{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
2785{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
2786{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
2787{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
2788{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
2789{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
2790{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
2791{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
2792{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
2793{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
2794{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
2795{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
2796{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
2797{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
2798{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
2799{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
2800{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
2801{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
2802{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
2803{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
2804{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
2805{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
2806{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
2807};
2808
2809int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
2810{
2811 int err;
2812 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
2813 return err;
2814}