blob: 3e038ad1ff39d22e32e8b4552c093ea0b6fcf3b1 [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
Mathias Agopian2ad04772013-02-23 03:12:30 -080020#include <GLES/gl.h>
21#include <GLES/glext.h>
22
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070023#include "jni.h"
24#include "JNIHelp.h"
Jack Palevich27f80022009-04-15 19:13:17 -070025#include <android_runtime/AndroidRuntime.h>
26#include <utils/misc.h>
Jack Palevich27f80022009-04-15 19:13:17 -070027#include <assert.h>
Jack Palevichbe6eac82009-12-08 15:43:51 +080028
Jack Palevich27f80022009-04-15 19:13:17 -070029static int initialized = 0;
30
31static jclass nioAccessClass;
32static jclass bufferClass;
Jack Palevich27f80022009-04-15 19:13:17 -070033static jmethodID getBasePointerID;
34static jmethodID getBaseArrayID;
35static jmethodID getBaseArrayOffsetID;
36static jfieldID positionID;
37static jfieldID limitID;
38static jfieldID elementSizeShiftID;
39
Mathias Agopian2ad04772013-02-23 03:12:30 -080040
41/* special calls implemented in Android's GLES wrapper used to more
42 * efficiently bound-check passed arrays */
43extern "C" {
44#ifdef GL_VERSION_ES_CM_1_1
45GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
46 const GLvoid *ptr, GLsizei count);
47GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
48 const GLvoid *pointer, GLsizei count);
49GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
50 GLsizei stride, const GLvoid *pointer, GLsizei count);
51GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59#endif
60#ifdef GL_ES_VERSION_2_0
61static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
62 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
63 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
64}
65#endif
Andy McFaddencee51982013-04-25 16:08:31 -070066#ifdef GL_ES_VERSION_3_0
67static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
68 GLsizei stride, const GLvoid *pointer, GLsizei count) {
69 glVertexAttribIPointer(indx, size, type, stride, pointer);
70}
71#endif
Mathias Agopian2ad04772013-02-23 03:12:30 -080072}
73
Jack Palevich27f80022009-04-15 19:13:17 -070074/* Cache method IDs each time the class is loaded. */
75
76static void
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070077nativeClassInit(JNIEnv *_env, jclass glImplClass)
Jack Palevich27f80022009-04-15 19:13:17 -070078{
79 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
80 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
81
82 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
83 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
84
85 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
86 "getBasePointer", "(Ljava/nio/Buffer;)J");
87 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
88 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
89 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
90 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
91
92 positionID = _env->GetFieldID(bufferClass, "position", "I");
93 limitID = _env->GetFieldID(bufferClass, "limit", "I");
94 elementSizeShiftID =
95 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
96}
97
Jack Palevich27f80022009-04-15 19:13:17 -070098static void *
Thomas Tafertshofer17045a12012-07-12 13:55:55 -070099getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
Jack Palevich27f80022009-04-15 19:13:17 -0700100{
101 jint position;
102 jint limit;
103 jint elementSizeShift;
104 jlong pointer;
Jack Palevich27f80022009-04-15 19:13:17 -0700105
106 position = _env->GetIntField(buffer, positionID);
107 limit = _env->GetIntField(buffer, limitID);
108 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
109 *remaining = (limit - position) << elementSizeShift;
110 pointer = _env->CallStaticLongMethod(nioAccessClass,
111 getBasePointerID, buffer);
112 if (pointer != 0L) {
113 *array = NULL;
114 return (void *) (jint) pointer;
115 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700116
Jack Palevich27f80022009-04-15 19:13:17 -0700117 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
118 getBaseArrayID, buffer);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700119 *offset = _env->CallStaticIntMethod(nioAccessClass,
Jack Palevich27f80022009-04-15 19:13:17 -0700120 getBaseArrayOffsetID, buffer);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800121
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700122 return NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700123}
124
Jack Palevich27f80022009-04-15 19:13:17 -0700125static void
126releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
127{
128 _env->ReleasePrimitiveArrayCritical(array, data,
Mathias Agopian2ad04772013-02-23 03:12:30 -0800129 commit ? 0 : JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700130}
131
Jack Palevichbe6eac82009-12-08 15:43:51 +0800132static void *
133getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
134 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
135 if (buf) {
136 jint position = _env->GetIntField(buffer, positionID);
137 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
138 buf += position << elementSizeShift;
139 } else {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700140 jniThrowException(_env, "java/lang/IllegalArgumentException",
141 "Must use a native order direct Buffer");
Jack Palevichbe6eac82009-12-08 15:43:51 +0800142 }
143 return (void*) buf;
144}
Mathias Agopian2ad04772013-02-23 03:12:30 -0800145
146// --------------------------------------------------------------------------
147
148/*
149 * returns the number of values glGet returns for a given pname.
150 *
151 * The code below is written such that pnames requiring only one values
152 * are the default (and are not explicitely tested for). This makes the
153 * checking code much shorter/readable/efficient.
154 *
155 * This means that unknown pnames (e.g.: extensions) will default to 1. If
156 * that unknown pname needs more than 1 value, then the validation check
157 * is incomplete and the app may crash if it passed the wrong number params.
158 */
159static int getNeededCount(GLint pname) {
160 int needed = 1;
161#ifdef GL_ES_VERSION_2_0
162 // GLES 2.x pnames
163 switch (pname) {
164 case GL_ALIASED_LINE_WIDTH_RANGE:
165 case GL_ALIASED_POINT_SIZE_RANGE:
166 needed = 2;
167 break;
168
169 case GL_BLEND_COLOR:
170 case GL_COLOR_CLEAR_VALUE:
171 case GL_COLOR_WRITEMASK:
172 case GL_SCISSOR_BOX:
173 case GL_VIEWPORT:
174 needed = 4;
175 break;
176
177 case GL_COMPRESSED_TEXTURE_FORMATS:
178 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
179 break;
180
181 case GL_SHADER_BINARY_FORMATS:
182 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
183 break;
184 }
185#endif
186
187#ifdef GL_VERSION_ES_CM_1_1
188 // GLES 1.x pnames
189 switch (pname) {
190 case GL_ALIASED_LINE_WIDTH_RANGE:
191 case GL_ALIASED_POINT_SIZE_RANGE:
192 case GL_DEPTH_RANGE:
193 case GL_SMOOTH_LINE_WIDTH_RANGE:
194 case GL_SMOOTH_POINT_SIZE_RANGE:
195 needed = 2;
196 break;
197
198 case GL_CURRENT_NORMAL:
199 case GL_POINT_DISTANCE_ATTENUATION:
200 needed = 3;
201 break;
202
203 case GL_COLOR_CLEAR_VALUE:
204 case GL_COLOR_WRITEMASK:
205 case GL_CURRENT_COLOR:
206 case GL_CURRENT_TEXTURE_COORDS:
207 case GL_FOG_COLOR:
208 case GL_LIGHT_MODEL_AMBIENT:
209 case GL_SCISSOR_BOX:
210 case GL_VIEWPORT:
211 needed = 4;
212 break;
213
214 case GL_MODELVIEW_MATRIX:
215 case GL_PROJECTION_MATRIX:
216 case GL_TEXTURE_MATRIX:
217 needed = 16;
218 break;
219
220 case GL_COMPRESSED_TEXTURE_FORMATS:
221 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
222 break;
223 }
224#endif
225 return needed;
226}
227
228template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
229static void
230get
231 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
232 jint _exception = 0;
233 const char * _exceptionType;
234 const char * _exceptionMessage;
235 CTYPE *params_base = (CTYPE *) 0;
236 jint _remaining;
237 CTYPE *params = (CTYPE *) 0;
238 int _needed = 0;
239
240 if (!params_ref) {
241 _exception = 1;
242 _exceptionType = "java/lang/IllegalArgumentException";
243 _exceptionMessage = "params == null";
244 goto exit;
245 }
246 if (offset < 0) {
247 _exception = 1;
248 _exceptionType = "java/lang/IllegalArgumentException";
249 _exceptionMessage = "offset < 0";
250 goto exit;
251 }
252 _remaining = _env->GetArrayLength(params_ref) - offset;
253 _needed = getNeededCount(pname);
254 // if we didn't find this pname, we just assume the user passed
255 // an array of the right size -- this might happen with extensions
256 // or if we forget an enum here.
257 if (_remaining < _needed) {
258 _exception = 1;
259 _exceptionType = "java/lang/IllegalArgumentException";
260 _exceptionMessage = "length - offset < needed";
261 goto exit;
262 }
263 params_base = (CTYPE *)
264 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
265 params = params_base + offset;
266
267 GET(
268 (GLenum)pname,
269 (CTYPE *)params
270 );
271
272exit:
273 if (params_base) {
274 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
275 _exception ? JNI_ABORT: 0);
276 }
277 if (_exception) {
278 jniThrowException(_env, _exceptionType, _exceptionMessage);
279 }
280}
281
282
283template <typename CTYPE, void GET(GLenum, CTYPE*)>
284static void
285getarray
286 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
287 jint _exception = 0;
288 const char * _exceptionType;
289 const char * _exceptionMessage;
290 jarray _array = (jarray) 0;
291 jint _bufferOffset = (jint) 0;
292 jint _remaining;
293 CTYPE *params = (CTYPE *) 0;
294 int _needed = 0;
295
296 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Andy McFaddencee51982013-04-25 16:08:31 -0700297 _remaining /= sizeof(CTYPE); // convert from bytes to item count
Mathias Agopian2ad04772013-02-23 03:12:30 -0800298 _needed = getNeededCount(pname);
299 // if we didn't find this pname, we just assume the user passed
300 // an array of the right size -- this might happen with extensions
301 // or if we forget an enum here.
302 if (_needed>0 && _remaining < _needed) {
303 _exception = 1;
304 _exceptionType = "java/lang/IllegalArgumentException";
305 _exceptionMessage = "remaining() < needed";
306 goto exit;
307 }
308 if (params == NULL) {
309 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
310 params = (CTYPE *) (_paramsBase + _bufferOffset);
311 }
312 GET(
313 (GLenum)pname,
314 (CTYPE *)params
315 );
316
317exit:
318 if (_array) {
319 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
320 }
321 if (_exception) {
322 jniThrowException(_env, _exceptionType, _exceptionMessage);
323 }
324}
325
Jack Palevich27f80022009-04-15 19:13:17 -0700326// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700327/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
328static void
329android_glBlendEquationSeparateOES__II
330 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700331 glBlendEquationSeparateOES(
332 (GLenum)modeRGB,
333 (GLenum)modeAlpha
334 );
Jack Palevich27f80022009-04-15 19:13:17 -0700335}
336
337/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
338static void
339android_glBlendFuncSeparateOES__IIII
340 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700341 glBlendFuncSeparateOES(
342 (GLenum)srcRGB,
343 (GLenum)dstRGB,
344 (GLenum)srcAlpha,
345 (GLenum)dstAlpha
346 );
Jack Palevich27f80022009-04-15 19:13:17 -0700347}
348
349/* void glBlendEquationOES ( GLenum mode ) */
350static void
351android_glBlendEquationOES__I
352 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700353 glBlendEquationOES(
354 (GLenum)mode
355 );
Jack Palevich27f80022009-04-15 19:13:17 -0700356}
357
358/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
359static void
360android_glDrawTexsOES__SSSSS
361 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
362 glDrawTexsOES(
363 (GLshort)x,
364 (GLshort)y,
365 (GLshort)z,
366 (GLshort)width,
367 (GLshort)height
368 );
369}
370
371/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
372static void
373android_glDrawTexiOES__IIIII
374 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
375 glDrawTexiOES(
376 (GLint)x,
377 (GLint)y,
378 (GLint)z,
379 (GLint)width,
380 (GLint)height
381 );
382}
383
384/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
385static void
386android_glDrawTexxOES__IIIII
387 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
388 glDrawTexxOES(
389 (GLfixed)x,
390 (GLfixed)y,
391 (GLfixed)z,
392 (GLfixed)width,
393 (GLfixed)height
394 );
395}
396
397/* void glDrawTexsvOES ( const GLshort *coords ) */
398static void
399android_glDrawTexsvOES___3SI
400 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700401 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800402 const char * _exceptionType = NULL;
403 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700404 GLshort *coords_base = (GLshort *) 0;
405 jint _remaining;
406 GLshort *coords = (GLshort *) 0;
407
408 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700409 _exception = 1;
410 _exceptionType = "java/lang/IllegalArgumentException";
411 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700412 goto exit;
413 }
414 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700415 _exception = 1;
416 _exceptionType = "java/lang/IllegalArgumentException";
417 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700418 goto exit;
419 }
420 _remaining = _env->GetArrayLength(coords_ref) - offset;
421 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700422 _exception = 1;
423 _exceptionType = "java/lang/IllegalArgumentException";
424 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700425 goto exit;
426 }
427 coords_base = (GLshort *)
428 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
429 coords = coords_base + offset;
430
431 glDrawTexsvOES(
432 (GLshort *)coords
433 );
434
435exit:
436 if (coords_base) {
437 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
438 JNI_ABORT);
439 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700440 if (_exception) {
441 jniThrowException(_env, _exceptionType, _exceptionMessage);
442 }
Jack Palevich27f80022009-04-15 19:13:17 -0700443}
444
445/* void glDrawTexsvOES ( const GLshort *coords ) */
446static void
447android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
448 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700449 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800450 const char * _exceptionType = NULL;
451 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700452 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700453 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700454 jint _remaining;
455 GLshort *coords = (GLshort *) 0;
456
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700457 coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700458 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700459 _exception = 1;
460 _exceptionType = "java/lang/IllegalArgumentException";
461 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700462 goto exit;
463 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700464 if (coords == NULL) {
465 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
466 coords = (GLshort *) (_coordsBase + _bufferOffset);
467 }
Jack Palevich27f80022009-04-15 19:13:17 -0700468 glDrawTexsvOES(
469 (GLshort *)coords
470 );
471
472exit:
473 if (_array) {
474 releasePointer(_env, _array, coords, JNI_FALSE);
475 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700476 if (_exception) {
477 jniThrowException(_env, _exceptionType, _exceptionMessage);
478 }
Jack Palevich27f80022009-04-15 19:13:17 -0700479}
480
481/* void glDrawTexivOES ( const GLint *coords ) */
482static void
483android_glDrawTexivOES___3II
484 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700485 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800486 const char * _exceptionType = NULL;
487 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700488 GLint *coords_base = (GLint *) 0;
489 jint _remaining;
490 GLint *coords = (GLint *) 0;
491
492 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700493 _exception = 1;
494 _exceptionType = "java/lang/IllegalArgumentException";
495 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700496 goto exit;
497 }
498 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700499 _exception = 1;
500 _exceptionType = "java/lang/IllegalArgumentException";
501 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700502 goto exit;
503 }
504 _remaining = _env->GetArrayLength(coords_ref) - offset;
505 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700506 _exception = 1;
507 _exceptionType = "java/lang/IllegalArgumentException";
508 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700509 goto exit;
510 }
511 coords_base = (GLint *)
512 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
513 coords = coords_base + offset;
514
515 glDrawTexivOES(
516 (GLint *)coords
517 );
518
519exit:
520 if (coords_base) {
521 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
522 JNI_ABORT);
523 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700524 if (_exception) {
525 jniThrowException(_env, _exceptionType, _exceptionMessage);
526 }
Jack Palevich27f80022009-04-15 19:13:17 -0700527}
528
529/* void glDrawTexivOES ( const GLint *coords ) */
530static void
531android_glDrawTexivOES__Ljava_nio_IntBuffer_2
532 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700533 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800534 const char * _exceptionType = NULL;
535 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700536 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700537 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700538 jint _remaining;
539 GLint *coords = (GLint *) 0;
540
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700541 coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700542 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700543 _exception = 1;
544 _exceptionType = "java/lang/IllegalArgumentException";
545 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700546 goto exit;
547 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700548 if (coords == NULL) {
549 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
550 coords = (GLint *) (_coordsBase + _bufferOffset);
551 }
Jack Palevich27f80022009-04-15 19:13:17 -0700552 glDrawTexivOES(
553 (GLint *)coords
554 );
555
556exit:
557 if (_array) {
558 releasePointer(_env, _array, coords, JNI_FALSE);
559 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700560 if (_exception) {
561 jniThrowException(_env, _exceptionType, _exceptionMessage);
562 }
Jack Palevich27f80022009-04-15 19:13:17 -0700563}
564
565/* void glDrawTexxvOES ( const GLfixed *coords ) */
566static void
567android_glDrawTexxvOES___3II
568 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700569 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800570 const char * _exceptionType = NULL;
571 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700572 GLfixed *coords_base = (GLfixed *) 0;
573 jint _remaining;
574 GLfixed *coords = (GLfixed *) 0;
575
576 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700577 _exception = 1;
578 _exceptionType = "java/lang/IllegalArgumentException";
579 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700580 goto exit;
581 }
582 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700583 _exception = 1;
584 _exceptionType = "java/lang/IllegalArgumentException";
585 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700586 goto exit;
587 }
588 _remaining = _env->GetArrayLength(coords_ref) - offset;
589 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700590 _exception = 1;
591 _exceptionType = "java/lang/IllegalArgumentException";
592 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700593 goto exit;
594 }
595 coords_base = (GLfixed *)
596 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
597 coords = coords_base + offset;
598
599 glDrawTexxvOES(
600 (GLfixed *)coords
601 );
602
603exit:
604 if (coords_base) {
605 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
606 JNI_ABORT);
607 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700608 if (_exception) {
609 jniThrowException(_env, _exceptionType, _exceptionMessage);
610 }
Jack Palevich27f80022009-04-15 19:13:17 -0700611}
612
613/* void glDrawTexxvOES ( const GLfixed *coords ) */
614static void
615android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
616 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700617 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800618 const char * _exceptionType = NULL;
619 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700620 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700621 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700622 jint _remaining;
623 GLfixed *coords = (GLfixed *) 0;
624
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700625 coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700626 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700627 _exception = 1;
628 _exceptionType = "java/lang/IllegalArgumentException";
629 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700630 goto exit;
631 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700632 if (coords == NULL) {
633 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
634 coords = (GLfixed *) (_coordsBase + _bufferOffset);
635 }
Jack Palevich27f80022009-04-15 19:13:17 -0700636 glDrawTexxvOES(
637 (GLfixed *)coords
638 );
639
640exit:
641 if (_array) {
642 releasePointer(_env, _array, coords, JNI_FALSE);
643 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700644 if (_exception) {
645 jniThrowException(_env, _exceptionType, _exceptionMessage);
646 }
Jack Palevich27f80022009-04-15 19:13:17 -0700647}
648
649/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
650static void
651android_glDrawTexfOES__FFFFF
652 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
653 glDrawTexfOES(
654 (GLfloat)x,
655 (GLfloat)y,
656 (GLfloat)z,
657 (GLfloat)width,
658 (GLfloat)height
659 );
660}
661
662/* void glDrawTexfvOES ( const GLfloat *coords ) */
663static void
664android_glDrawTexfvOES___3FI
665 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700666 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800667 const char * _exceptionType = NULL;
668 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700669 GLfloat *coords_base = (GLfloat *) 0;
670 jint _remaining;
671 GLfloat *coords = (GLfloat *) 0;
672
673 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700674 _exception = 1;
675 _exceptionType = "java/lang/IllegalArgumentException";
676 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700677 goto exit;
678 }
679 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700680 _exception = 1;
681 _exceptionType = "java/lang/IllegalArgumentException";
682 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700683 goto exit;
684 }
685 _remaining = _env->GetArrayLength(coords_ref) - offset;
686 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700687 _exception = 1;
688 _exceptionType = "java/lang/IllegalArgumentException";
689 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700690 goto exit;
691 }
692 coords_base = (GLfloat *)
693 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
694 coords = coords_base + offset;
695
696 glDrawTexfvOES(
697 (GLfloat *)coords
698 );
699
700exit:
701 if (coords_base) {
702 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
703 JNI_ABORT);
704 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700705 if (_exception) {
706 jniThrowException(_env, _exceptionType, _exceptionMessage);
707 }
Jack Palevich27f80022009-04-15 19:13:17 -0700708}
709
710/* void glDrawTexfvOES ( const GLfloat *coords ) */
711static void
712android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
713 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700714 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800715 const char * _exceptionType = NULL;
716 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700717 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700718 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700719 jint _remaining;
720 GLfloat *coords = (GLfloat *) 0;
721
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700722 coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700723 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700724 _exception = 1;
725 _exceptionType = "java/lang/IllegalArgumentException";
726 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700727 goto exit;
728 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700729 if (coords == NULL) {
730 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
731 coords = (GLfloat *) (_coordsBase + _bufferOffset);
732 }
Jack Palevich27f80022009-04-15 19:13:17 -0700733 glDrawTexfvOES(
734 (GLfloat *)coords
735 );
736
737exit:
738 if (_array) {
739 releasePointer(_env, _array, coords, JNI_FALSE);
740 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700741 if (_exception) {
742 jniThrowException(_env, _exceptionType, _exceptionMessage);
743 }
Jack Palevich27f80022009-04-15 19:13:17 -0700744}
745
746/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
747static void
748android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
749 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700750 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700751 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700752 jint _remaining;
753 GLeglImageOES image = (GLeglImageOES) 0;
754
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700755 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
756 if (image == NULL) {
757 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
758 image = (GLeglImageOES) (_imageBase + _bufferOffset);
759 }
Jack Palevicha3795852009-04-24 10:35:11 -0700760 glEGLImageTargetTexture2DOES(
761 (GLenum)target,
762 (GLeglImageOES)image
763 );
764 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700765 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700766 }
Jack Palevich27f80022009-04-15 19:13:17 -0700767}
768
769/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
770static void
771android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
772 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700773 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700774 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700775 jint _remaining;
776 GLeglImageOES image = (GLeglImageOES) 0;
777
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700778 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
779 if (image == NULL) {
780 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
781 image = (GLeglImageOES) (_imageBase + _bufferOffset);
782 }
Jack Palevicha3795852009-04-24 10:35:11 -0700783 glEGLImageTargetRenderbufferStorageOES(
784 (GLenum)target,
785 (GLeglImageOES)image
786 );
787 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700788 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700789 }
Jack Palevich27f80022009-04-15 19:13:17 -0700790}
791
792/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
793static void
794android_glAlphaFuncxOES__II
795 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700796 glAlphaFuncxOES(
797 (GLenum)func,
798 (GLclampx)ref
799 );
Jack Palevich27f80022009-04-15 19:13:17 -0700800}
801
802/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
803static void
804android_glClearColorxOES__IIII
805 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700806 glClearColorxOES(
807 (GLclampx)red,
808 (GLclampx)green,
809 (GLclampx)blue,
810 (GLclampx)alpha
811 );
Jack Palevich27f80022009-04-15 19:13:17 -0700812}
813
814/* void glClearDepthxOES ( GLclampx depth ) */
815static void
816android_glClearDepthxOES__I
817 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700818 glClearDepthxOES(
819 (GLclampx)depth
820 );
Jack Palevich27f80022009-04-15 19:13:17 -0700821}
822
823/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
824static void
825android_glClipPlanexOES__I_3II
826 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700827 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800828 const char * _exceptionType = NULL;
829 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700830 GLfixed *equation_base = (GLfixed *) 0;
831 jint _remaining;
832 GLfixed *equation = (GLfixed *) 0;
833
834 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700835 _exception = 1;
836 _exceptionType = "java/lang/IllegalArgumentException";
837 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700838 goto exit;
839 }
840 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700841 _exception = 1;
842 _exceptionType = "java/lang/IllegalArgumentException";
843 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700844 goto exit;
845 }
846 _remaining = _env->GetArrayLength(equation_ref) - offset;
847 equation_base = (GLfixed *)
848 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
849 equation = equation_base + offset;
850
851 glClipPlanexOES(
852 (GLenum)plane,
853 (GLfixed *)equation
854 );
855
856exit:
857 if (equation_base) {
858 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
859 JNI_ABORT);
860 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700861 if (_exception) {
862 jniThrowException(_env, _exceptionType, _exceptionMessage);
863 }
Jack Palevich27f80022009-04-15 19:13:17 -0700864}
865
866/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
867static void
868android_glClipPlanexOES__ILjava_nio_IntBuffer_2
869 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700870 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700871 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700872 jint _remaining;
873 GLfixed *equation = (GLfixed *) 0;
874
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700875 equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
876 if (equation == NULL) {
877 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
878 equation = (GLfixed *) (_equationBase + _bufferOffset);
879 }
Jack Palevicha3795852009-04-24 10:35:11 -0700880 glClipPlanexOES(
881 (GLenum)plane,
882 (GLfixed *)equation
883 );
884 if (_array) {
885 releasePointer(_env, _array, equation, JNI_FALSE);
886 }
Jack Palevich27f80022009-04-15 19:13:17 -0700887}
888
889/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
890static void
891android_glColor4xOES__IIII
892 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700893 glColor4xOES(
894 (GLfixed)red,
895 (GLfixed)green,
896 (GLfixed)blue,
897 (GLfixed)alpha
898 );
Jack Palevich27f80022009-04-15 19:13:17 -0700899}
900
901/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
902static void
903android_glDepthRangexOES__II
904 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700905 glDepthRangexOES(
906 (GLclampx)zNear,
907 (GLclampx)zFar
908 );
Jack Palevich27f80022009-04-15 19:13:17 -0700909}
910
911/* void glFogxOES ( GLenum pname, GLfixed param ) */
912static void
913android_glFogxOES__II
914 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -0700915 glFogxOES(
916 (GLenum)pname,
917 (GLfixed)param
918 );
Jack Palevich27f80022009-04-15 19:13:17 -0700919}
920
921/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
922static void
923android_glFogxvOES__I_3II
924 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700925 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800926 const char * _exceptionType = NULL;
927 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700928 GLfixed *params_base = (GLfixed *) 0;
929 jint _remaining;
930 GLfixed *params = (GLfixed *) 0;
931
932 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700933 _exception = 1;
934 _exceptionType = "java/lang/IllegalArgumentException";
935 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700936 goto exit;
937 }
938 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700939 _exception = 1;
940 _exceptionType = "java/lang/IllegalArgumentException";
941 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700942 goto exit;
943 }
944 _remaining = _env->GetArrayLength(params_ref) - offset;
945 params_base = (GLfixed *)
946 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
947 params = params_base + offset;
948
949 glFogxvOES(
950 (GLenum)pname,
951 (GLfixed *)params
952 );
953
954exit:
955 if (params_base) {
956 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
957 JNI_ABORT);
958 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700959 if (_exception) {
960 jniThrowException(_env, _exceptionType, _exceptionMessage);
961 }
Jack Palevich27f80022009-04-15 19:13:17 -0700962}
963
964/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
965static void
966android_glFogxvOES__ILjava_nio_IntBuffer_2
967 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700968 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700969 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700970 jint _remaining;
971 GLfixed *params = (GLfixed *) 0;
972
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700973 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
974 if (params == NULL) {
975 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
976 params = (GLfixed *) (_paramsBase + _bufferOffset);
977 }
Jack Palevicha3795852009-04-24 10:35:11 -0700978 glFogxvOES(
979 (GLenum)pname,
980 (GLfixed *)params
981 );
982 if (_array) {
983 releasePointer(_env, _array, params, JNI_FALSE);
984 }
Jack Palevich27f80022009-04-15 19:13:17 -0700985}
986
987/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
988static void
989android_glFrustumxOES__IIIIII
990 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700991 glFrustumxOES(
992 (GLfixed)left,
993 (GLfixed)right,
994 (GLfixed)bottom,
995 (GLfixed)top,
996 (GLfixed)zNear,
997 (GLfixed)zFar
998 );
Jack Palevich27f80022009-04-15 19:13:17 -0700999}
1000
1001/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1002static void
1003android_glGetClipPlanexOES__I_3II
1004 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001005 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001006 const char * _exceptionType = NULL;
1007 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001008 GLfixed *eqn_base = (GLfixed *) 0;
1009 jint _remaining;
1010 GLfixed *eqn = (GLfixed *) 0;
1011
1012 if (!eqn_ref) {
1013 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001014 _exceptionType = "java/lang/IllegalArgumentException";
1015 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001016 goto exit;
1017 }
1018 if (offset < 0) {
1019 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001020 _exceptionType = "java/lang/IllegalArgumentException";
1021 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001022 goto exit;
1023 }
1024 _remaining = _env->GetArrayLength(eqn_ref) - offset;
1025 if (_remaining < 4) {
1026 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001027 _exceptionType = "java/lang/IllegalArgumentException";
1028 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001029 goto exit;
1030 }
1031 eqn_base = (GLfixed *)
1032 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
1033 eqn = eqn_base + offset;
1034
1035 glGetClipPlanexOES(
1036 (GLenum)pname,
1037 (GLfixed *)eqn
1038 );
1039
1040exit:
1041 if (eqn_base) {
1042 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
1043 _exception ? JNI_ABORT: 0);
1044 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001045 if (_exception) {
1046 jniThrowException(_env, _exceptionType, _exceptionMessage);
1047 }
Jack Palevich27f80022009-04-15 19:13:17 -07001048}
1049
1050/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1051static void
1052android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1053 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001054 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001055 const char * _exceptionType = NULL;
1056 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001057 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001058 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001059 jint _remaining;
1060 GLfixed *eqn = (GLfixed *) 0;
1061
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001062 eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07001063 if (_remaining < 4) {
1064 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001065 _exceptionType = "java/lang/IllegalArgumentException";
1066 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001067 goto exit;
1068 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001069 if (eqn == NULL) {
1070 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1071 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1072 }
Jack Palevicha3795852009-04-24 10:35:11 -07001073 glGetClipPlanexOES(
1074 (GLenum)pname,
1075 (GLfixed *)eqn
1076 );
1077
1078exit:
1079 if (_array) {
1080 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
1081 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001082 if (_exception) {
1083 jniThrowException(_env, _exceptionType, _exceptionMessage);
1084 }
Jack Palevich27f80022009-04-15 19:13:17 -07001085}
1086
1087/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1088static void
1089android_glGetFixedvOES__I_3II
1090 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001091 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001092 const char * _exceptionType = NULL;
1093 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001094 GLfixed *params_base = (GLfixed *) 0;
1095 jint _remaining;
1096 GLfixed *params = (GLfixed *) 0;
1097
1098 if (!params_ref) {
1099 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001100 _exceptionType = "java/lang/IllegalArgumentException";
1101 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001102 goto exit;
1103 }
1104 if (offset < 0) {
1105 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001106 _exceptionType = "java/lang/IllegalArgumentException";
1107 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001108 goto exit;
1109 }
1110 _remaining = _env->GetArrayLength(params_ref) - offset;
1111 params_base = (GLfixed *)
1112 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1113 params = params_base + offset;
1114
1115 glGetFixedvOES(
1116 (GLenum)pname,
1117 (GLfixed *)params
1118 );
1119
1120exit:
1121 if (params_base) {
1122 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1123 _exception ? JNI_ABORT: 0);
1124 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001125 if (_exception) {
1126 jniThrowException(_env, _exceptionType, _exceptionMessage);
1127 }
Jack Palevich27f80022009-04-15 19:13:17 -07001128}
1129
1130/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1131static void
1132android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1133 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001134 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001135 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001136 jint _remaining;
1137 GLfixed *params = (GLfixed *) 0;
1138
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001139 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1140 if (params == NULL) {
1141 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1142 params = (GLfixed *) (_paramsBase + _bufferOffset);
1143 }
Jack Palevicha3795852009-04-24 10:35:11 -07001144 glGetFixedvOES(
1145 (GLenum)pname,
1146 (GLfixed *)params
1147 );
1148 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001149 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001150 }
Jack Palevich27f80022009-04-15 19:13:17 -07001151}
1152
1153/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1154static void
1155android_glGetLightxvOES__II_3II
1156 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001157 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001158 const char * _exceptionType = NULL;
1159 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001160 GLfixed *params_base = (GLfixed *) 0;
1161 jint _remaining;
1162 GLfixed *params = (GLfixed *) 0;
1163
1164 if (!params_ref) {
1165 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001166 _exceptionType = "java/lang/IllegalArgumentException";
1167 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001168 goto exit;
1169 }
1170 if (offset < 0) {
1171 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001172 _exceptionType = "java/lang/IllegalArgumentException";
1173 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001174 goto exit;
1175 }
1176 _remaining = _env->GetArrayLength(params_ref) - offset;
1177 params_base = (GLfixed *)
1178 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1179 params = params_base + offset;
1180
1181 glGetLightxvOES(
1182 (GLenum)light,
1183 (GLenum)pname,
1184 (GLfixed *)params
1185 );
1186
1187exit:
1188 if (params_base) {
1189 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1190 _exception ? JNI_ABORT: 0);
1191 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001192 if (_exception) {
1193 jniThrowException(_env, _exceptionType, _exceptionMessage);
1194 }
Jack Palevich27f80022009-04-15 19:13:17 -07001195}
1196
1197/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1198static void
1199android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1200 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001201 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001202 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001203 jint _remaining;
1204 GLfixed *params = (GLfixed *) 0;
1205
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001206 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1207 if (params == NULL) {
1208 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1209 params = (GLfixed *) (_paramsBase + _bufferOffset);
1210 }
Jack Palevicha3795852009-04-24 10:35:11 -07001211 glGetLightxvOES(
1212 (GLenum)light,
1213 (GLenum)pname,
1214 (GLfixed *)params
1215 );
1216 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001217 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001218 }
Jack Palevich27f80022009-04-15 19:13:17 -07001219}
1220
1221/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1222static void
1223android_glGetMaterialxvOES__II_3II
1224 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001225 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001226 const char * _exceptionType = NULL;
1227 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001228 GLfixed *params_base = (GLfixed *) 0;
1229 jint _remaining;
1230 GLfixed *params = (GLfixed *) 0;
1231
1232 if (!params_ref) {
1233 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001234 _exceptionType = "java/lang/IllegalArgumentException";
1235 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001236 goto exit;
1237 }
1238 if (offset < 0) {
1239 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001240 _exceptionType = "java/lang/IllegalArgumentException";
1241 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001242 goto exit;
1243 }
1244 _remaining = _env->GetArrayLength(params_ref) - offset;
1245 params_base = (GLfixed *)
1246 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1247 params = params_base + offset;
1248
1249 glGetMaterialxvOES(
1250 (GLenum)face,
1251 (GLenum)pname,
1252 (GLfixed *)params
1253 );
1254
1255exit:
1256 if (params_base) {
1257 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1258 _exception ? JNI_ABORT: 0);
1259 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001260 if (_exception) {
1261 jniThrowException(_env, _exceptionType, _exceptionMessage);
1262 }
Jack Palevich27f80022009-04-15 19:13:17 -07001263}
1264
1265/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1266static void
1267android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1268 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001269 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001270 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001271 jint _remaining;
1272 GLfixed *params = (GLfixed *) 0;
1273
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001274 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1275 if (params == NULL) {
1276 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1277 params = (GLfixed *) (_paramsBase + _bufferOffset);
1278 }
Jack Palevicha3795852009-04-24 10:35:11 -07001279 glGetMaterialxvOES(
1280 (GLenum)face,
1281 (GLenum)pname,
1282 (GLfixed *)params
1283 );
1284 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001285 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001286 }
Jack Palevich27f80022009-04-15 19:13:17 -07001287}
1288
1289/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1290static void
1291android_glGetTexEnvxvOES__II_3II
1292 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001293 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001294 const char * _exceptionType = NULL;
1295 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001296 GLfixed *params_base = (GLfixed *) 0;
1297 jint _remaining;
1298 GLfixed *params = (GLfixed *) 0;
1299
1300 if (!params_ref) {
1301 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001302 _exceptionType = "java/lang/IllegalArgumentException";
1303 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001304 goto exit;
1305 }
1306 if (offset < 0) {
1307 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001308 _exceptionType = "java/lang/IllegalArgumentException";
1309 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001310 goto exit;
1311 }
1312 _remaining = _env->GetArrayLength(params_ref) - offset;
1313 params_base = (GLfixed *)
1314 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1315 params = params_base + offset;
1316
1317 glGetTexEnvxvOES(
1318 (GLenum)env,
1319 (GLenum)pname,
1320 (GLfixed *)params
1321 );
1322
1323exit:
1324 if (params_base) {
1325 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1326 _exception ? JNI_ABORT: 0);
1327 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001328 if (_exception) {
1329 jniThrowException(_env, _exceptionType, _exceptionMessage);
1330 }
Jack Palevich27f80022009-04-15 19:13:17 -07001331}
1332
1333/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1334static void
1335android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1336 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001337 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001338 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001339 jint _remaining;
1340 GLfixed *params = (GLfixed *) 0;
1341
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001342 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1343 if (params == NULL) {
1344 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1345 params = (GLfixed *) (_paramsBase + _bufferOffset);
1346 }
Jack Palevicha3795852009-04-24 10:35:11 -07001347 glGetTexEnvxvOES(
1348 (GLenum)env,
1349 (GLenum)pname,
1350 (GLfixed *)params
1351 );
1352 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001353 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001354 }
Jack Palevich27f80022009-04-15 19:13:17 -07001355}
1356
1357/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1358static void
1359android_glGetTexParameterxvOES__II_3II
1360 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001361 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001362 const char * _exceptionType = NULL;
1363 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001364 GLfixed *params_base = (GLfixed *) 0;
1365 jint _remaining;
1366 GLfixed *params = (GLfixed *) 0;
1367
1368 if (!params_ref) {
1369 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001370 _exceptionType = "java/lang/IllegalArgumentException";
1371 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001372 goto exit;
1373 }
1374 if (offset < 0) {
1375 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001376 _exceptionType = "java/lang/IllegalArgumentException";
1377 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001378 goto exit;
1379 }
1380 _remaining = _env->GetArrayLength(params_ref) - offset;
1381 params_base = (GLfixed *)
1382 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1383 params = params_base + offset;
1384
1385 glGetTexParameterxvOES(
1386 (GLenum)target,
1387 (GLenum)pname,
1388 (GLfixed *)params
1389 );
1390
1391exit:
1392 if (params_base) {
1393 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1394 _exception ? JNI_ABORT: 0);
1395 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001396 if (_exception) {
1397 jniThrowException(_env, _exceptionType, _exceptionMessage);
1398 }
Jack Palevich27f80022009-04-15 19:13:17 -07001399}
1400
1401/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1402static void
1403android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1404 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001405 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001406 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001407 jint _remaining;
1408 GLfixed *params = (GLfixed *) 0;
1409
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001410 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1411 if (params == NULL) {
1412 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1413 params = (GLfixed *) (_paramsBase + _bufferOffset);
1414 }
Jack Palevicha3795852009-04-24 10:35:11 -07001415 glGetTexParameterxvOES(
1416 (GLenum)target,
1417 (GLenum)pname,
1418 (GLfixed *)params
1419 );
1420 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001421 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001422 }
Jack Palevich27f80022009-04-15 19:13:17 -07001423}
1424
1425/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1426static void
1427android_glLightModelxOES__II
1428 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001429 glLightModelxOES(
1430 (GLenum)pname,
1431 (GLfixed)param
1432 );
Jack Palevich27f80022009-04-15 19:13:17 -07001433}
1434
1435/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1436static void
1437android_glLightModelxvOES__I_3II
1438 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001439 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001440 const char * _exceptionType = NULL;
1441 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001442 GLfixed *params_base = (GLfixed *) 0;
1443 jint _remaining;
1444 GLfixed *params = (GLfixed *) 0;
1445
1446 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001447 _exception = 1;
1448 _exceptionType = "java/lang/IllegalArgumentException";
1449 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001450 goto exit;
1451 }
1452 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001453 _exception = 1;
1454 _exceptionType = "java/lang/IllegalArgumentException";
1455 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001456 goto exit;
1457 }
1458 _remaining = _env->GetArrayLength(params_ref) - offset;
1459 params_base = (GLfixed *)
1460 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1461 params = params_base + offset;
1462
1463 glLightModelxvOES(
1464 (GLenum)pname,
1465 (GLfixed *)params
1466 );
1467
1468exit:
1469 if (params_base) {
1470 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1471 JNI_ABORT);
1472 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001473 if (_exception) {
1474 jniThrowException(_env, _exceptionType, _exceptionMessage);
1475 }
Jack Palevich27f80022009-04-15 19:13:17 -07001476}
1477
1478/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1479static void
1480android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1481 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001482 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001483 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001484 jint _remaining;
1485 GLfixed *params = (GLfixed *) 0;
1486
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001487 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1488 if (params == NULL) {
1489 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1490 params = (GLfixed *) (_paramsBase + _bufferOffset);
1491 }
Jack Palevicha3795852009-04-24 10:35:11 -07001492 glLightModelxvOES(
1493 (GLenum)pname,
1494 (GLfixed *)params
1495 );
1496 if (_array) {
1497 releasePointer(_env, _array, params, JNI_FALSE);
1498 }
Jack Palevich27f80022009-04-15 19:13:17 -07001499}
1500
1501/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1502static void
1503android_glLightxOES__III
1504 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001505 glLightxOES(
1506 (GLenum)light,
1507 (GLenum)pname,
1508 (GLfixed)param
1509 );
Jack Palevich27f80022009-04-15 19:13:17 -07001510}
1511
1512/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1513static void
1514android_glLightxvOES__II_3II
1515 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001516 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001517 const char * _exceptionType = NULL;
1518 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001519 GLfixed *params_base = (GLfixed *) 0;
1520 jint _remaining;
1521 GLfixed *params = (GLfixed *) 0;
1522
1523 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001524 _exception = 1;
1525 _exceptionType = "java/lang/IllegalArgumentException";
1526 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001527 goto exit;
1528 }
1529 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001530 _exception = 1;
1531 _exceptionType = "java/lang/IllegalArgumentException";
1532 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001533 goto exit;
1534 }
1535 _remaining = _env->GetArrayLength(params_ref) - offset;
1536 params_base = (GLfixed *)
1537 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1538 params = params_base + offset;
1539
1540 glLightxvOES(
1541 (GLenum)light,
1542 (GLenum)pname,
1543 (GLfixed *)params
1544 );
1545
1546exit:
1547 if (params_base) {
1548 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1549 JNI_ABORT);
1550 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001551 if (_exception) {
1552 jniThrowException(_env, _exceptionType, _exceptionMessage);
1553 }
Jack Palevich27f80022009-04-15 19:13:17 -07001554}
1555
1556/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1557static void
1558android_glLightxvOES__IILjava_nio_IntBuffer_2
1559 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001560 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001561 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001562 jint _remaining;
1563 GLfixed *params = (GLfixed *) 0;
1564
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001565 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1566 if (params == NULL) {
1567 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1568 params = (GLfixed *) (_paramsBase + _bufferOffset);
1569 }
Jack Palevicha3795852009-04-24 10:35:11 -07001570 glLightxvOES(
1571 (GLenum)light,
1572 (GLenum)pname,
1573 (GLfixed *)params
1574 );
1575 if (_array) {
1576 releasePointer(_env, _array, params, JNI_FALSE);
1577 }
Jack Palevich27f80022009-04-15 19:13:17 -07001578}
1579
1580/* void glLineWidthxOES ( GLfixed width ) */
1581static void
1582android_glLineWidthxOES__I
1583 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001584 glLineWidthxOES(
1585 (GLfixed)width
1586 );
Jack Palevich27f80022009-04-15 19:13:17 -07001587}
1588
1589/* void glLoadMatrixxOES ( const GLfixed *m ) */
1590static void
1591android_glLoadMatrixxOES___3II
1592 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001593 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001594 const char * _exceptionType = NULL;
1595 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001596 GLfixed *m_base = (GLfixed *) 0;
1597 jint _remaining;
1598 GLfixed *m = (GLfixed *) 0;
1599
1600 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001601 _exception = 1;
1602 _exceptionType = "java/lang/IllegalArgumentException";
1603 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001604 goto exit;
1605 }
1606 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001607 _exception = 1;
1608 _exceptionType = "java/lang/IllegalArgumentException";
1609 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001610 goto exit;
1611 }
1612 _remaining = _env->GetArrayLength(m_ref) - offset;
1613 m_base = (GLfixed *)
1614 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1615 m = m_base + offset;
1616
1617 glLoadMatrixxOES(
1618 (GLfixed *)m
1619 );
1620
1621exit:
1622 if (m_base) {
1623 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1624 JNI_ABORT);
1625 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001626 if (_exception) {
1627 jniThrowException(_env, _exceptionType, _exceptionMessage);
1628 }
Jack Palevich27f80022009-04-15 19:13:17 -07001629}
1630
1631/* void glLoadMatrixxOES ( const GLfixed *m ) */
1632static void
1633android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1634 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001635 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001636 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001637 jint _remaining;
1638 GLfixed *m = (GLfixed *) 0;
1639
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001640 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1641 if (m == NULL) {
1642 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1643 m = (GLfixed *) (_mBase + _bufferOffset);
1644 }
Jack Palevicha3795852009-04-24 10:35:11 -07001645 glLoadMatrixxOES(
1646 (GLfixed *)m
1647 );
1648 if (_array) {
1649 releasePointer(_env, _array, m, JNI_FALSE);
1650 }
Jack Palevich27f80022009-04-15 19:13:17 -07001651}
1652
1653/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1654static void
1655android_glMaterialxOES__III
1656 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001657 glMaterialxOES(
1658 (GLenum)face,
1659 (GLenum)pname,
1660 (GLfixed)param
1661 );
Jack Palevich27f80022009-04-15 19:13:17 -07001662}
1663
1664/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1665static void
1666android_glMaterialxvOES__II_3II
1667 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001668 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001669 const char * _exceptionType = NULL;
1670 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001671 GLfixed *params_base = (GLfixed *) 0;
1672 jint _remaining;
1673 GLfixed *params = (GLfixed *) 0;
1674
1675 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001676 _exception = 1;
1677 _exceptionType = "java/lang/IllegalArgumentException";
1678 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001679 goto exit;
1680 }
1681 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001682 _exception = 1;
1683 _exceptionType = "java/lang/IllegalArgumentException";
1684 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001685 goto exit;
1686 }
1687 _remaining = _env->GetArrayLength(params_ref) - offset;
1688 params_base = (GLfixed *)
1689 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1690 params = params_base + offset;
1691
1692 glMaterialxvOES(
1693 (GLenum)face,
1694 (GLenum)pname,
1695 (GLfixed *)params
1696 );
1697
1698exit:
1699 if (params_base) {
1700 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1701 JNI_ABORT);
1702 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001703 if (_exception) {
1704 jniThrowException(_env, _exceptionType, _exceptionMessage);
1705 }
Jack Palevich27f80022009-04-15 19:13:17 -07001706}
1707
1708/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1709static void
1710android_glMaterialxvOES__IILjava_nio_IntBuffer_2
1711 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001712 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001713 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001714 jint _remaining;
1715 GLfixed *params = (GLfixed *) 0;
1716
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001717 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1718 if (params == NULL) {
1719 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1720 params = (GLfixed *) (_paramsBase + _bufferOffset);
1721 }
Jack Palevicha3795852009-04-24 10:35:11 -07001722 glMaterialxvOES(
1723 (GLenum)face,
1724 (GLenum)pname,
1725 (GLfixed *)params
1726 );
1727 if (_array) {
1728 releasePointer(_env, _array, params, JNI_FALSE);
1729 }
Jack Palevich27f80022009-04-15 19:13:17 -07001730}
1731
1732/* void glMultMatrixxOES ( const GLfixed *m ) */
1733static void
1734android_glMultMatrixxOES___3II
1735 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001736 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001737 const char * _exceptionType = NULL;
1738 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001739 GLfixed *m_base = (GLfixed *) 0;
1740 jint _remaining;
1741 GLfixed *m = (GLfixed *) 0;
1742
1743 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001744 _exception = 1;
1745 _exceptionType = "java/lang/IllegalArgumentException";
1746 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001747 goto exit;
1748 }
1749 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001750 _exception = 1;
1751 _exceptionType = "java/lang/IllegalArgumentException";
1752 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001753 goto exit;
1754 }
1755 _remaining = _env->GetArrayLength(m_ref) - offset;
1756 m_base = (GLfixed *)
1757 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1758 m = m_base + offset;
1759
1760 glMultMatrixxOES(
1761 (GLfixed *)m
1762 );
1763
1764exit:
1765 if (m_base) {
1766 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1767 JNI_ABORT);
1768 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001769 if (_exception) {
1770 jniThrowException(_env, _exceptionType, _exceptionMessage);
1771 }
Jack Palevich27f80022009-04-15 19:13:17 -07001772}
1773
1774/* void glMultMatrixxOES ( const GLfixed *m ) */
1775static void
1776android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
1777 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001778 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001779 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001780 jint _remaining;
1781 GLfixed *m = (GLfixed *) 0;
1782
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001783 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1784 if (m == NULL) {
1785 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1786 m = (GLfixed *) (_mBase + _bufferOffset);
1787 }
Jack Palevicha3795852009-04-24 10:35:11 -07001788 glMultMatrixxOES(
1789 (GLfixed *)m
1790 );
1791 if (_array) {
1792 releasePointer(_env, _array, m, JNI_FALSE);
1793 }
Jack Palevich27f80022009-04-15 19:13:17 -07001794}
1795
1796/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
1797static void
1798android_glMultiTexCoord4xOES__IIIII
1799 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07001800 glMultiTexCoord4xOES(
1801 (GLenum)target,
1802 (GLfixed)s,
1803 (GLfixed)t,
1804 (GLfixed)r,
1805 (GLfixed)q
1806 );
Jack Palevich27f80022009-04-15 19:13:17 -07001807}
1808
1809/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
1810static void
1811android_glNormal3xOES__III
1812 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07001813 glNormal3xOES(
1814 (GLfixed)nx,
1815 (GLfixed)ny,
1816 (GLfixed)nz
1817 );
Jack Palevich27f80022009-04-15 19:13:17 -07001818}
1819
1820/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1821static void
1822android_glOrthoxOES__IIIIII
1823 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001824 glOrthoxOES(
1825 (GLfixed)left,
1826 (GLfixed)right,
1827 (GLfixed)bottom,
1828 (GLfixed)top,
1829 (GLfixed)zNear,
1830 (GLfixed)zFar
1831 );
Jack Palevich27f80022009-04-15 19:13:17 -07001832}
1833
1834/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
1835static void
1836android_glPointParameterxOES__II
1837 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001838 glPointParameterxOES(
1839 (GLenum)pname,
1840 (GLfixed)param
1841 );
Jack Palevich27f80022009-04-15 19:13:17 -07001842}
1843
1844/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1845static void
1846android_glPointParameterxvOES__I_3II
1847 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001848 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001849 const char * _exceptionType = NULL;
1850 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001851 GLfixed *params_base = (GLfixed *) 0;
1852 jint _remaining;
1853 GLfixed *params = (GLfixed *) 0;
1854
1855 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001856 _exception = 1;
1857 _exceptionType = "java/lang/IllegalArgumentException";
1858 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001859 goto exit;
1860 }
1861 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001862 _exception = 1;
1863 _exceptionType = "java/lang/IllegalArgumentException";
1864 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001865 goto exit;
1866 }
1867 _remaining = _env->GetArrayLength(params_ref) - offset;
1868 params_base = (GLfixed *)
1869 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1870 params = params_base + offset;
1871
1872 glPointParameterxvOES(
1873 (GLenum)pname,
1874 (GLfixed *)params
1875 );
1876
1877exit:
1878 if (params_base) {
1879 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1880 JNI_ABORT);
1881 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001882 if (_exception) {
1883 jniThrowException(_env, _exceptionType, _exceptionMessage);
1884 }
Jack Palevich27f80022009-04-15 19:13:17 -07001885}
1886
1887/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1888static void
1889android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
1890 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001891 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001892 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001893 jint _remaining;
1894 GLfixed *params = (GLfixed *) 0;
1895
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001896 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1897 if (params == NULL) {
1898 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1899 params = (GLfixed *) (_paramsBase + _bufferOffset);
1900 }
Jack Palevicha3795852009-04-24 10:35:11 -07001901 glPointParameterxvOES(
1902 (GLenum)pname,
1903 (GLfixed *)params
1904 );
1905 if (_array) {
1906 releasePointer(_env, _array, params, JNI_FALSE);
1907 }
Jack Palevich27f80022009-04-15 19:13:17 -07001908}
1909
1910/* void glPointSizexOES ( GLfixed size ) */
1911static void
1912android_glPointSizexOES__I
1913 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07001914 glPointSizexOES(
1915 (GLfixed)size
1916 );
Jack Palevich27f80022009-04-15 19:13:17 -07001917}
1918
1919/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
1920static void
1921android_glPolygonOffsetxOES__II
1922 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07001923 glPolygonOffsetxOES(
1924 (GLfixed)factor,
1925 (GLfixed)units
1926 );
Jack Palevich27f80022009-04-15 19:13:17 -07001927}
1928
1929/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
1930static void
1931android_glRotatexOES__IIII
1932 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001933 glRotatexOES(
1934 (GLfixed)angle,
1935 (GLfixed)x,
1936 (GLfixed)y,
1937 (GLfixed)z
1938 );
Jack Palevich27f80022009-04-15 19:13:17 -07001939}
1940
1941/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
1942static void
1943android_glSampleCoveragexOES__IZ
1944 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07001945 glSampleCoveragexOES(
1946 (GLclampx)value,
1947 (GLboolean)invert
1948 );
Jack Palevich27f80022009-04-15 19:13:17 -07001949}
1950
1951/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1952static void
1953android_glScalexOES__III
1954 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001955 glScalexOES(
1956 (GLfixed)x,
1957 (GLfixed)y,
1958 (GLfixed)z
1959 );
Jack Palevich27f80022009-04-15 19:13:17 -07001960}
1961
1962/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
1963static void
1964android_glTexEnvxOES__III
1965 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001966 glTexEnvxOES(
1967 (GLenum)target,
1968 (GLenum)pname,
1969 (GLfixed)param
1970 );
Jack Palevich27f80022009-04-15 19:13:17 -07001971}
1972
1973/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1974static void
1975android_glTexEnvxvOES__II_3II
1976 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001977 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001978 const char * _exceptionType = NULL;
1979 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001980 GLfixed *params_base = (GLfixed *) 0;
1981 jint _remaining;
1982 GLfixed *params = (GLfixed *) 0;
1983
1984 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001985 _exception = 1;
1986 _exceptionType = "java/lang/IllegalArgumentException";
1987 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001988 goto exit;
1989 }
1990 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001991 _exception = 1;
1992 _exceptionType = "java/lang/IllegalArgumentException";
1993 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001994 goto exit;
1995 }
1996 _remaining = _env->GetArrayLength(params_ref) - offset;
1997 params_base = (GLfixed *)
1998 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1999 params = params_base + offset;
2000
2001 glTexEnvxvOES(
2002 (GLenum)target,
2003 (GLenum)pname,
2004 (GLfixed *)params
2005 );
2006
2007exit:
2008 if (params_base) {
2009 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2010 JNI_ABORT);
2011 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002012 if (_exception) {
2013 jniThrowException(_env, _exceptionType, _exceptionMessage);
2014 }
Jack Palevich27f80022009-04-15 19:13:17 -07002015}
2016
2017/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2018static void
2019android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2020 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002021 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002022 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002023 jint _remaining;
2024 GLfixed *params = (GLfixed *) 0;
2025
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002026 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2027 if (params == NULL) {
2028 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2029 params = (GLfixed *) (_paramsBase + _bufferOffset);
2030 }
Jack Palevicha3795852009-04-24 10:35:11 -07002031 glTexEnvxvOES(
2032 (GLenum)target,
2033 (GLenum)pname,
2034 (GLfixed *)params
2035 );
2036 if (_array) {
2037 releasePointer(_env, _array, params, JNI_FALSE);
2038 }
Jack Palevich27f80022009-04-15 19:13:17 -07002039}
2040
2041/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2042static void
2043android_glTexParameterxOES__III
2044 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002045 glTexParameterxOES(
2046 (GLenum)target,
2047 (GLenum)pname,
2048 (GLfixed)param
2049 );
Jack Palevich27f80022009-04-15 19:13:17 -07002050}
2051
2052/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2053static void
2054android_glTexParameterxvOES__II_3II
2055 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002056 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002057 const char * _exceptionType = NULL;
2058 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002059 GLfixed *params_base = (GLfixed *) 0;
2060 jint _remaining;
2061 GLfixed *params = (GLfixed *) 0;
2062
2063 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002064 _exception = 1;
2065 _exceptionType = "java/lang/IllegalArgumentException";
2066 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002067 goto exit;
2068 }
2069 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002070 _exception = 1;
2071 _exceptionType = "java/lang/IllegalArgumentException";
2072 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002073 goto exit;
2074 }
2075 _remaining = _env->GetArrayLength(params_ref) - offset;
2076 params_base = (GLfixed *)
2077 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2078 params = params_base + offset;
2079
2080 glTexParameterxvOES(
2081 (GLenum)target,
2082 (GLenum)pname,
2083 (GLfixed *)params
2084 );
2085
2086exit:
2087 if (params_base) {
2088 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2089 JNI_ABORT);
2090 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002091 if (_exception) {
2092 jniThrowException(_env, _exceptionType, _exceptionMessage);
2093 }
Jack Palevich27f80022009-04-15 19:13:17 -07002094}
2095
2096/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2097static void
2098android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2099 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002100 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002101 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002102 jint _remaining;
2103 GLfixed *params = (GLfixed *) 0;
2104
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002105 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2106 if (params == NULL) {
2107 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2108 params = (GLfixed *) (_paramsBase + _bufferOffset);
2109 }
Jack Palevicha3795852009-04-24 10:35:11 -07002110 glTexParameterxvOES(
2111 (GLenum)target,
2112 (GLenum)pname,
2113 (GLfixed *)params
2114 );
2115 if (_array) {
2116 releasePointer(_env, _array, params, JNI_FALSE);
2117 }
Jack Palevich27f80022009-04-15 19:13:17 -07002118}
2119
2120/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2121static void
2122android_glTranslatexOES__III
2123 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002124 glTranslatexOES(
2125 (GLfixed)x,
2126 (GLfixed)y,
2127 (GLfixed)z
2128 );
Jack Palevich27f80022009-04-15 19:13:17 -07002129}
2130
2131/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2132static jboolean
2133android_glIsRenderbufferOES__I
2134 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002135 GLboolean _returnValue;
2136 _returnValue = glIsRenderbufferOES(
2137 (GLuint)renderbuffer
2138 );
Andy McFaddencee51982013-04-25 16:08:31 -07002139 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002140}
2141
2142/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2143static void
2144android_glBindRenderbufferOES__II
2145 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002146 glBindRenderbufferOES(
2147 (GLenum)target,
2148 (GLuint)renderbuffer
2149 );
Jack Palevich27f80022009-04-15 19:13:17 -07002150}
2151
2152/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2153static void
2154android_glDeleteRenderbuffersOES__I_3II
2155 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002156 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002157 const char * _exceptionType = NULL;
2158 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002159 GLuint *renderbuffers_base = (GLuint *) 0;
2160 jint _remaining;
2161 GLuint *renderbuffers = (GLuint *) 0;
2162
2163 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002164 _exception = 1;
2165 _exceptionType = "java/lang/IllegalArgumentException";
2166 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002167 goto exit;
2168 }
2169 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002170 _exception = 1;
2171 _exceptionType = "java/lang/IllegalArgumentException";
2172 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002173 goto exit;
2174 }
2175 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2176 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002177 _exception = 1;
2178 _exceptionType = "java/lang/IllegalArgumentException";
2179 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002180 goto exit;
2181 }
2182 renderbuffers_base = (GLuint *)
2183 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
2184 renderbuffers = renderbuffers_base + offset;
2185
2186 glDeleteRenderbuffersOES(
2187 (GLsizei)n,
2188 (GLuint *)renderbuffers
2189 );
2190
2191exit:
2192 if (renderbuffers_base) {
2193 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
2194 JNI_ABORT);
2195 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002196 if (_exception) {
2197 jniThrowException(_env, _exceptionType, _exceptionMessage);
2198 }
Jack Palevich27f80022009-04-15 19:13:17 -07002199}
2200
2201/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2202static void
2203android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2204 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002205 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002206 const char * _exceptionType = NULL;
2207 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002208 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002209 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002210 jint _remaining;
2211 GLuint *renderbuffers = (GLuint *) 0;
2212
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002213 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002214 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002215 _exception = 1;
2216 _exceptionType = "java/lang/IllegalArgumentException";
2217 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002218 goto exit;
2219 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002220 if (renderbuffers == NULL) {
2221 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2222 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2223 }
Jack Palevich73108672011-03-28 14:49:12 -07002224 glDeleteRenderbuffersOES(
2225 (GLsizei)n,
2226 (GLuint *)renderbuffers
2227 );
2228
2229exit:
2230 if (_array) {
2231 releasePointer(_env, _array, renderbuffers, JNI_FALSE);
2232 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002233 if (_exception) {
2234 jniThrowException(_env, _exceptionType, _exceptionMessage);
2235 }
Jack Palevich27f80022009-04-15 19:13:17 -07002236}
2237
2238/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2239static void
2240android_glGenRenderbuffersOES__I_3II
2241 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002242 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002243 const char * _exceptionType = NULL;
2244 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002245 GLuint *renderbuffers_base = (GLuint *) 0;
2246 jint _remaining;
2247 GLuint *renderbuffers = (GLuint *) 0;
2248
2249 if (!renderbuffers_ref) {
2250 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002251 _exceptionType = "java/lang/IllegalArgumentException";
2252 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002253 goto exit;
2254 }
2255 if (offset < 0) {
2256 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002257 _exceptionType = "java/lang/IllegalArgumentException";
2258 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002259 goto exit;
2260 }
2261 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2262 if (_remaining < n) {
2263 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002264 _exceptionType = "java/lang/IllegalArgumentException";
2265 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002266 goto exit;
2267 }
2268 renderbuffers_base = (GLuint *)
2269 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
2270 renderbuffers = renderbuffers_base + offset;
2271
2272 glGenRenderbuffersOES(
2273 (GLsizei)n,
2274 (GLuint *)renderbuffers
2275 );
2276
2277exit:
2278 if (renderbuffers_base) {
2279 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
2280 _exception ? JNI_ABORT: 0);
2281 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002282 if (_exception) {
2283 jniThrowException(_env, _exceptionType, _exceptionMessage);
2284 }
Jack Palevich27f80022009-04-15 19:13:17 -07002285}
2286
2287/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2288static void
2289android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2290 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002291 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002292 const char * _exceptionType = NULL;
2293 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002294 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002295 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002296 jint _remaining;
2297 GLuint *renderbuffers = (GLuint *) 0;
2298
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002299 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002300 if (_remaining < n) {
2301 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002302 _exceptionType = "java/lang/IllegalArgumentException";
2303 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002304 goto exit;
2305 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002306 if (renderbuffers == NULL) {
2307 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2308 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2309 }
Jack Palevich73108672011-03-28 14:49:12 -07002310 glGenRenderbuffersOES(
2311 (GLsizei)n,
2312 (GLuint *)renderbuffers
2313 );
2314
2315exit:
2316 if (_array) {
2317 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
2318 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002319 if (_exception) {
2320 jniThrowException(_env, _exceptionType, _exceptionMessage);
2321 }
Jack Palevich27f80022009-04-15 19:13:17 -07002322}
2323
2324/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2325static void
2326android_glRenderbufferStorageOES__IIII
2327 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002328 glRenderbufferStorageOES(
2329 (GLenum)target,
2330 (GLenum)internalformat,
2331 (GLsizei)width,
2332 (GLsizei)height
2333 );
Jack Palevich27f80022009-04-15 19:13:17 -07002334}
2335
2336/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2337static void
2338android_glGetRenderbufferParameterivOES__II_3II
2339 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002340 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002341 const char * _exceptionType = NULL;
2342 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002343 GLint *params_base = (GLint *) 0;
2344 jint _remaining;
2345 GLint *params = (GLint *) 0;
2346
2347 if (!params_ref) {
2348 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002349 _exceptionType = "java/lang/IllegalArgumentException";
2350 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002351 goto exit;
2352 }
2353 if (offset < 0) {
2354 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002355 _exceptionType = "java/lang/IllegalArgumentException";
2356 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002357 goto exit;
2358 }
2359 _remaining = _env->GetArrayLength(params_ref) - offset;
2360 if (_remaining < 1) {
2361 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002362 _exceptionType = "java/lang/IllegalArgumentException";
2363 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002364 goto exit;
2365 }
2366 params_base = (GLint *)
2367 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2368 params = params_base + offset;
2369
2370 glGetRenderbufferParameterivOES(
2371 (GLenum)target,
2372 (GLenum)pname,
2373 (GLint *)params
2374 );
2375
2376exit:
2377 if (params_base) {
2378 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2379 _exception ? JNI_ABORT: 0);
2380 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002381 if (_exception) {
2382 jniThrowException(_env, _exceptionType, _exceptionMessage);
2383 }
Jack Palevich27f80022009-04-15 19:13:17 -07002384}
2385
2386/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2387static void
2388android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2389 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002390 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002391 const char * _exceptionType = NULL;
2392 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002393 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002394 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002395 jint _remaining;
2396 GLint *params = (GLint *) 0;
2397
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002398 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002399 if (_remaining < 1) {
2400 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002401 _exceptionType = "java/lang/IllegalArgumentException";
2402 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002403 goto exit;
2404 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002405 if (params == NULL) {
2406 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2407 params = (GLint *) (_paramsBase + _bufferOffset);
2408 }
Jack Palevich73108672011-03-28 14:49:12 -07002409 glGetRenderbufferParameterivOES(
2410 (GLenum)target,
2411 (GLenum)pname,
2412 (GLint *)params
2413 );
2414
2415exit:
2416 if (_array) {
2417 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2418 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002419 if (_exception) {
2420 jniThrowException(_env, _exceptionType, _exceptionMessage);
2421 }
Jack Palevich27f80022009-04-15 19:13:17 -07002422}
2423
2424/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2425static jboolean
2426android_glIsFramebufferOES__I
2427 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002428 GLboolean _returnValue;
2429 _returnValue = glIsFramebufferOES(
2430 (GLuint)framebuffer
2431 );
Andy McFaddencee51982013-04-25 16:08:31 -07002432 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002433}
2434
2435/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2436static void
2437android_glBindFramebufferOES__II
2438 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002439 glBindFramebufferOES(
2440 (GLenum)target,
2441 (GLuint)framebuffer
2442 );
Jack Palevich27f80022009-04-15 19:13:17 -07002443}
2444
2445/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2446static void
2447android_glDeleteFramebuffersOES__I_3II
2448 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002449 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002450 const char * _exceptionType = NULL;
2451 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002452 GLuint *framebuffers_base = (GLuint *) 0;
2453 jint _remaining;
2454 GLuint *framebuffers = (GLuint *) 0;
2455
2456 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002457 _exception = 1;
2458 _exceptionType = "java/lang/IllegalArgumentException";
2459 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002460 goto exit;
2461 }
2462 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002463 _exception = 1;
2464 _exceptionType = "java/lang/IllegalArgumentException";
2465 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002466 goto exit;
2467 }
2468 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2469 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002470 _exception = 1;
2471 _exceptionType = "java/lang/IllegalArgumentException";
2472 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002473 goto exit;
2474 }
2475 framebuffers_base = (GLuint *)
2476 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2477 framebuffers = framebuffers_base + offset;
2478
2479 glDeleteFramebuffersOES(
2480 (GLsizei)n,
2481 (GLuint *)framebuffers
2482 );
2483
2484exit:
2485 if (framebuffers_base) {
2486 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2487 JNI_ABORT);
2488 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002489 if (_exception) {
2490 jniThrowException(_env, _exceptionType, _exceptionMessage);
2491 }
Jack Palevich27f80022009-04-15 19:13:17 -07002492}
2493
2494/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2495static void
2496android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2497 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002498 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002499 const char * _exceptionType = NULL;
2500 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002501 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002502 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002503 jint _remaining;
2504 GLuint *framebuffers = (GLuint *) 0;
2505
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002506 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002507 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002508 _exception = 1;
2509 _exceptionType = "java/lang/IllegalArgumentException";
2510 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002511 goto exit;
2512 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002513 if (framebuffers == NULL) {
2514 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2515 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2516 }
Jack Palevich73108672011-03-28 14:49:12 -07002517 glDeleteFramebuffersOES(
2518 (GLsizei)n,
2519 (GLuint *)framebuffers
2520 );
2521
2522exit:
2523 if (_array) {
2524 releasePointer(_env, _array, framebuffers, JNI_FALSE);
2525 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002526 if (_exception) {
2527 jniThrowException(_env, _exceptionType, _exceptionMessage);
2528 }
Jack Palevich27f80022009-04-15 19:13:17 -07002529}
2530
2531/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2532static void
2533android_glGenFramebuffersOES__I_3II
2534 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002535 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002536 const char * _exceptionType = NULL;
2537 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002538 GLuint *framebuffers_base = (GLuint *) 0;
2539 jint _remaining;
2540 GLuint *framebuffers = (GLuint *) 0;
2541
2542 if (!framebuffers_ref) {
2543 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002544 _exceptionType = "java/lang/IllegalArgumentException";
2545 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002546 goto exit;
2547 }
2548 if (offset < 0) {
2549 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002550 _exceptionType = "java/lang/IllegalArgumentException";
2551 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002552 goto exit;
2553 }
2554 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2555 if (_remaining < n) {
2556 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002557 _exceptionType = "java/lang/IllegalArgumentException";
2558 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002559 goto exit;
2560 }
2561 framebuffers_base = (GLuint *)
2562 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2563 framebuffers = framebuffers_base + offset;
2564
2565 glGenFramebuffersOES(
2566 (GLsizei)n,
2567 (GLuint *)framebuffers
2568 );
2569
2570exit:
2571 if (framebuffers_base) {
2572 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2573 _exception ? JNI_ABORT: 0);
2574 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002575 if (_exception) {
2576 jniThrowException(_env, _exceptionType, _exceptionMessage);
2577 }
Jack Palevich27f80022009-04-15 19:13:17 -07002578}
2579
2580/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2581static void
2582android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
2583 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002584 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002585 const char * _exceptionType = NULL;
2586 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002587 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002588 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002589 jint _remaining;
2590 GLuint *framebuffers = (GLuint *) 0;
2591
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002592 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002593 if (_remaining < n) {
2594 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002595 _exceptionType = "java/lang/IllegalArgumentException";
2596 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002597 goto exit;
2598 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002599 if (framebuffers == NULL) {
2600 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2601 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2602 }
Jack Palevich73108672011-03-28 14:49:12 -07002603 glGenFramebuffersOES(
2604 (GLsizei)n,
2605 (GLuint *)framebuffers
2606 );
2607
2608exit:
2609 if (_array) {
2610 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
2611 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002612 if (_exception) {
2613 jniThrowException(_env, _exceptionType, _exceptionMessage);
2614 }
Jack Palevich27f80022009-04-15 19:13:17 -07002615}
2616
2617/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
2618static jint
2619android_glCheckFramebufferStatusOES__I
2620 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002621 GLenum _returnValue;
2622 _returnValue = glCheckFramebufferStatusOES(
2623 (GLenum)target
2624 );
Andy McFaddencee51982013-04-25 16:08:31 -07002625 return (jint)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002626}
2627
2628/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
2629static void
2630android_glFramebufferRenderbufferOES__IIII
2631 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002632 glFramebufferRenderbufferOES(
2633 (GLenum)target,
2634 (GLenum)attachment,
2635 (GLenum)renderbuffertarget,
2636 (GLuint)renderbuffer
2637 );
Jack Palevich27f80022009-04-15 19:13:17 -07002638}
2639
2640/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
2641static void
2642android_glFramebufferTexture2DOES__IIIII
2643 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07002644 glFramebufferTexture2DOES(
2645 (GLenum)target,
2646 (GLenum)attachment,
2647 (GLenum)textarget,
2648 (GLuint)texture,
2649 (GLint)level
2650 );
Jack Palevich27f80022009-04-15 19:13:17 -07002651}
2652
2653/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2654static void
2655android_glGetFramebufferAttachmentParameterivOES__III_3II
2656 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002657 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002658 const char * _exceptionType = NULL;
2659 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002660 GLint *params_base = (GLint *) 0;
2661 jint _remaining;
2662 GLint *params = (GLint *) 0;
2663
2664 if (!params_ref) {
2665 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002666 _exceptionType = "java/lang/IllegalArgumentException";
2667 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002668 goto exit;
2669 }
2670 if (offset < 0) {
2671 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002672 _exceptionType = "java/lang/IllegalArgumentException";
2673 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002674 goto exit;
2675 }
2676 _remaining = _env->GetArrayLength(params_ref) - offset;
2677 if (_remaining < 1) {
2678 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002679 _exceptionType = "java/lang/IllegalArgumentException";
2680 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002681 goto exit;
2682 }
2683 params_base = (GLint *)
2684 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2685 params = params_base + offset;
2686
2687 glGetFramebufferAttachmentParameterivOES(
2688 (GLenum)target,
2689 (GLenum)attachment,
2690 (GLenum)pname,
2691 (GLint *)params
2692 );
2693
2694exit:
2695 if (params_base) {
2696 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2697 _exception ? JNI_ABORT: 0);
2698 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002699 if (_exception) {
2700 jniThrowException(_env, _exceptionType, _exceptionMessage);
2701 }
Jack Palevich27f80022009-04-15 19:13:17 -07002702}
2703
2704/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2705static void
2706android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
2707 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002708 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002709 const char * _exceptionType = NULL;
2710 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002711 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002712 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002713 jint _remaining;
2714 GLint *params = (GLint *) 0;
2715
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002716 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002717 if (_remaining < 1) {
2718 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002719 _exceptionType = "java/lang/IllegalArgumentException";
2720 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002721 goto exit;
2722 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002723 if (params == NULL) {
2724 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2725 params = (GLint *) (_paramsBase + _bufferOffset);
2726 }
Jack Palevich73108672011-03-28 14:49:12 -07002727 glGetFramebufferAttachmentParameterivOES(
2728 (GLenum)target,
2729 (GLenum)attachment,
2730 (GLenum)pname,
2731 (GLint *)params
2732 );
2733
2734exit:
2735 if (_array) {
2736 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2737 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002738 if (_exception) {
2739 jniThrowException(_env, _exceptionType, _exceptionMessage);
2740 }
Jack Palevich27f80022009-04-15 19:13:17 -07002741}
2742
2743/* void glGenerateMipmapOES ( GLenum target ) */
2744static void
2745android_glGenerateMipmapOES__I
2746 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002747 glGenerateMipmapOES(
2748 (GLenum)target
2749 );
Jack Palevich27f80022009-04-15 19:13:17 -07002750}
2751
2752/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
2753static void
2754android_glCurrentPaletteMatrixOES__I
2755 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002756 glCurrentPaletteMatrixOES(
2757 (GLuint)matrixpaletteindex
2758 );
Jack Palevich27f80022009-04-15 19:13:17 -07002759}
2760
2761/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
2762static void
2763android_glLoadPaletteFromModelViewMatrixOES__
2764 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002765 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07002766}
2767
2768/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2769static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002770android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
2771 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2772 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002773 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002774 jint _remaining;
2775 GLvoid *pointer = (GLvoid *) 0;
2776
2777 if (pointer_buf) {
2778 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2779 if ( ! pointer ) {
2780 return;
2781 }
2782 }
2783 glMatrixIndexPointerOESBounds(
2784 (GLint)size,
2785 (GLenum)type,
2786 (GLsizei)stride,
2787 (GLvoid *)pointer,
2788 (GLsizei)remaining
2789 );
Jack Palevich27f80022009-04-15 19:13:17 -07002790}
2791
2792/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2793static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002794android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
2795 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2796 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002797 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002798 jint _remaining;
2799 GLvoid *pointer = (GLvoid *) 0;
2800
2801 if (pointer_buf) {
2802 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2803 if ( ! pointer ) {
2804 return;
2805 }
2806 }
2807 glWeightPointerOESBounds(
2808 (GLint)size,
2809 (GLenum)type,
2810 (GLsizei)stride,
2811 (GLvoid *)pointer,
2812 (GLsizei)remaining
2813 );
Jack Palevich27f80022009-04-15 19:13:17 -07002814}
2815
2816/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
2817static void
2818android_glDepthRangefOES__FF
2819 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002820 glDepthRangefOES(
2821 (GLclampf)zNear,
2822 (GLclampf)zFar
2823 );
Jack Palevich27f80022009-04-15 19:13:17 -07002824}
2825
2826/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2827static void
2828android_glFrustumfOES__FFFFFF
2829 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002830 glFrustumfOES(
2831 (GLfloat)left,
2832 (GLfloat)right,
2833 (GLfloat)bottom,
2834 (GLfloat)top,
2835 (GLfloat)zNear,
2836 (GLfloat)zFar
2837 );
Jack Palevich27f80022009-04-15 19:13:17 -07002838}
2839
2840/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2841static void
2842android_glOrthofOES__FFFFFF
2843 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002844 glOrthofOES(
2845 (GLfloat)left,
2846 (GLfloat)right,
2847 (GLfloat)bottom,
2848 (GLfloat)top,
2849 (GLfloat)zNear,
2850 (GLfloat)zFar
2851 );
Jack Palevich27f80022009-04-15 19:13:17 -07002852}
2853
2854/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2855static void
2856android_glClipPlanefOES__I_3FI
2857 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002858 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002859 const char * _exceptionType = NULL;
2860 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002861 GLfloat *equation_base = (GLfloat *) 0;
2862 jint _remaining;
2863 GLfloat *equation = (GLfloat *) 0;
2864
2865 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002866 _exception = 1;
2867 _exceptionType = "java/lang/IllegalArgumentException";
2868 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002869 goto exit;
2870 }
2871 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002872 _exception = 1;
2873 _exceptionType = "java/lang/IllegalArgumentException";
2874 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002875 goto exit;
2876 }
2877 _remaining = _env->GetArrayLength(equation_ref) - offset;
2878 equation_base = (GLfloat *)
2879 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
2880 equation = equation_base + offset;
2881
2882 glClipPlanefOES(
2883 (GLenum)plane,
2884 (GLfloat *)equation
2885 );
2886
2887exit:
2888 if (equation_base) {
2889 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
2890 JNI_ABORT);
2891 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002892 if (_exception) {
2893 jniThrowException(_env, _exceptionType, _exceptionMessage);
2894 }
Jack Palevich27f80022009-04-15 19:13:17 -07002895}
2896
2897/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2898static void
2899android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
2900 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002901 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002902 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002903 jint _remaining;
2904 GLfloat *equation = (GLfloat *) 0;
2905
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002906 equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
2907 if (equation == NULL) {
2908 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2909 equation = (GLfloat *) (_equationBase + _bufferOffset);
2910 }
Jack Palevicha3795852009-04-24 10:35:11 -07002911 glClipPlanefOES(
2912 (GLenum)plane,
2913 (GLfloat *)equation
2914 );
2915 if (_array) {
2916 releasePointer(_env, _array, equation, JNI_FALSE);
2917 }
Jack Palevich27f80022009-04-15 19:13:17 -07002918}
2919
2920/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2921static void
2922android_glGetClipPlanefOES__I_3FI
2923 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002924 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002925 const char * _exceptionType = NULL;
2926 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002927 GLfloat *eqn_base = (GLfloat *) 0;
2928 jint _remaining;
2929 GLfloat *eqn = (GLfloat *) 0;
2930
2931 if (!eqn_ref) {
2932 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002933 _exceptionType = "java/lang/IllegalArgumentException";
2934 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002935 goto exit;
2936 }
2937 if (offset < 0) {
2938 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002939 _exceptionType = "java/lang/IllegalArgumentException";
2940 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002941 goto exit;
2942 }
2943 _remaining = _env->GetArrayLength(eqn_ref) - offset;
2944 if (_remaining < 4) {
2945 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002946 _exceptionType = "java/lang/IllegalArgumentException";
2947 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002948 goto exit;
2949 }
2950 eqn_base = (GLfloat *)
2951 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
2952 eqn = eqn_base + offset;
2953
2954 glGetClipPlanefOES(
2955 (GLenum)pname,
2956 (GLfloat *)eqn
2957 );
2958
2959exit:
2960 if (eqn_base) {
2961 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
2962 _exception ? JNI_ABORT: 0);
2963 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002964 if (_exception) {
2965 jniThrowException(_env, _exceptionType, _exceptionMessage);
2966 }
Jack Palevich27f80022009-04-15 19:13:17 -07002967}
2968
2969/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2970static void
2971android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
2972 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002973 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002974 const char * _exceptionType = NULL;
2975 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002976 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002977 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002978 jint _remaining;
2979 GLfloat *eqn = (GLfloat *) 0;
2980
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002981 eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07002982 if (_remaining < 4) {
2983 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002984 _exceptionType = "java/lang/IllegalArgumentException";
2985 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002986 goto exit;
2987 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002988 if (eqn == NULL) {
2989 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2990 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
2991 }
Jack Palevicha3795852009-04-24 10:35:11 -07002992 glGetClipPlanefOES(
2993 (GLenum)pname,
2994 (GLfloat *)eqn
2995 );
2996
2997exit:
2998 if (_array) {
2999 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
3000 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003001 if (_exception) {
3002 jniThrowException(_env, _exceptionType, _exceptionMessage);
3003 }
Jack Palevich27f80022009-04-15 19:13:17 -07003004}
3005
3006/* void glClearDepthfOES ( GLclampf depth ) */
3007static void
3008android_glClearDepthfOES__F
3009 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07003010 glClearDepthfOES(
3011 (GLclampf)depth
3012 );
Jack Palevich27f80022009-04-15 19:13:17 -07003013}
3014
3015/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3016static void
3017android_glTexGenfOES__IIF
3018 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003019 glTexGenfOES(
3020 (GLenum)coord,
3021 (GLenum)pname,
3022 (GLfloat)param
3023 );
Jack Palevich27f80022009-04-15 19:13:17 -07003024}
3025
3026/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3027static void
3028android_glTexGenfvOES__II_3FI
3029 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003030 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003031 const char * _exceptionType = NULL;
3032 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003033 GLfloat *params_base = (GLfloat *) 0;
3034 jint _remaining;
3035 GLfloat *params = (GLfloat *) 0;
3036
3037 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003038 _exception = 1;
3039 _exceptionType = "java/lang/IllegalArgumentException";
3040 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003041 goto exit;
3042 }
3043 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003044 _exception = 1;
3045 _exceptionType = "java/lang/IllegalArgumentException";
3046 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003047 goto exit;
3048 }
3049 _remaining = _env->GetArrayLength(params_ref) - offset;
3050 params_base = (GLfloat *)
3051 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3052 params = params_base + offset;
3053
3054 glTexGenfvOES(
3055 (GLenum)coord,
3056 (GLenum)pname,
3057 (GLfloat *)params
3058 );
3059
3060exit:
3061 if (params_base) {
3062 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3063 JNI_ABORT);
3064 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003065 if (_exception) {
3066 jniThrowException(_env, _exceptionType, _exceptionMessage);
3067 }
Jack Palevich27f80022009-04-15 19:13:17 -07003068}
3069
3070/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3071static void
3072android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3073 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003074 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003075 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003076 jint _remaining;
3077 GLfloat *params = (GLfloat *) 0;
3078
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003079 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3080 if (params == NULL) {
3081 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3082 params = (GLfloat *) (_paramsBase + _bufferOffset);
3083 }
Jack Palevicha3795852009-04-24 10:35:11 -07003084 glTexGenfvOES(
3085 (GLenum)coord,
3086 (GLenum)pname,
3087 (GLfloat *)params
3088 );
3089 if (_array) {
3090 releasePointer(_env, _array, params, JNI_FALSE);
3091 }
Jack Palevich27f80022009-04-15 19:13:17 -07003092}
3093
3094/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3095static void
3096android_glTexGeniOES__III
3097 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003098 glTexGeniOES(
3099 (GLenum)coord,
3100 (GLenum)pname,
3101 (GLint)param
3102 );
Jack Palevich27f80022009-04-15 19:13:17 -07003103}
3104
3105/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3106static void
3107android_glTexGenivOES__II_3II
3108 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003109 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003110 const char * _exceptionType = NULL;
3111 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003112 GLint *params_base = (GLint *) 0;
3113 jint _remaining;
3114 GLint *params = (GLint *) 0;
3115
3116 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003117 _exception = 1;
3118 _exceptionType = "java/lang/IllegalArgumentException";
3119 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003120 goto exit;
3121 }
3122 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003123 _exception = 1;
3124 _exceptionType = "java/lang/IllegalArgumentException";
3125 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003126 goto exit;
3127 }
3128 _remaining = _env->GetArrayLength(params_ref) - offset;
3129 params_base = (GLint *)
3130 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3131 params = params_base + offset;
3132
3133 glTexGenivOES(
3134 (GLenum)coord,
3135 (GLenum)pname,
3136 (GLint *)params
3137 );
3138
3139exit:
3140 if (params_base) {
3141 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3142 JNI_ABORT);
3143 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003144 if (_exception) {
3145 jniThrowException(_env, _exceptionType, _exceptionMessage);
3146 }
Jack Palevich27f80022009-04-15 19:13:17 -07003147}
3148
3149/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3150static void
3151android_glTexGenivOES__IILjava_nio_IntBuffer_2
3152 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003153 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003154 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003155 jint _remaining;
3156 GLint *params = (GLint *) 0;
3157
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003158 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3159 if (params == NULL) {
3160 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3161 params = (GLint *) (_paramsBase + _bufferOffset);
3162 }
Jack Palevicha3795852009-04-24 10:35:11 -07003163 glTexGenivOES(
3164 (GLenum)coord,
3165 (GLenum)pname,
3166 (GLint *)params
3167 );
3168 if (_array) {
3169 releasePointer(_env, _array, params, JNI_FALSE);
3170 }
Jack Palevich27f80022009-04-15 19:13:17 -07003171}
3172
3173/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3174static void
3175android_glTexGenxOES__III
3176 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003177 glTexGenxOES(
3178 (GLenum)coord,
3179 (GLenum)pname,
3180 (GLfixed)param
3181 );
Jack Palevich27f80022009-04-15 19:13:17 -07003182}
3183
3184/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3185static void
3186android_glTexGenxvOES__II_3II
3187 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003188 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003189 const char * _exceptionType = NULL;
3190 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003191 GLfixed *params_base = (GLfixed *) 0;
3192 jint _remaining;
3193 GLfixed *params = (GLfixed *) 0;
3194
3195 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003196 _exception = 1;
3197 _exceptionType = "java/lang/IllegalArgumentException";
3198 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003199 goto exit;
3200 }
3201 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003202 _exception = 1;
3203 _exceptionType = "java/lang/IllegalArgumentException";
3204 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003205 goto exit;
3206 }
3207 _remaining = _env->GetArrayLength(params_ref) - offset;
3208 params_base = (GLfixed *)
3209 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3210 params = params_base + offset;
3211
3212 glTexGenxvOES(
3213 (GLenum)coord,
3214 (GLenum)pname,
3215 (GLfixed *)params
3216 );
3217
3218exit:
3219 if (params_base) {
3220 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3221 JNI_ABORT);
3222 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003223 if (_exception) {
3224 jniThrowException(_env, _exceptionType, _exceptionMessage);
3225 }
Jack Palevich27f80022009-04-15 19:13:17 -07003226}
3227
3228/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3229static void
3230android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3231 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003232 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003233 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003234 jint _remaining;
3235 GLfixed *params = (GLfixed *) 0;
3236
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003237 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3238 if (params == NULL) {
3239 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3240 params = (GLfixed *) (_paramsBase + _bufferOffset);
3241 }
Jack Palevicha3795852009-04-24 10:35:11 -07003242 glTexGenxvOES(
3243 (GLenum)coord,
3244 (GLenum)pname,
3245 (GLfixed *)params
3246 );
3247 if (_array) {
3248 releasePointer(_env, _array, params, JNI_FALSE);
3249 }
Jack Palevich27f80022009-04-15 19:13:17 -07003250}
3251
3252/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3253static void
3254android_glGetTexGenfvOES__II_3FI
3255 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003256 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003257 const char * _exceptionType = NULL;
3258 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003259 GLfloat *params_base = (GLfloat *) 0;
3260 jint _remaining;
3261 GLfloat *params = (GLfloat *) 0;
3262
3263 if (!params_ref) {
3264 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003265 _exceptionType = "java/lang/IllegalArgumentException";
3266 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003267 goto exit;
3268 }
3269 if (offset < 0) {
3270 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003271 _exceptionType = "java/lang/IllegalArgumentException";
3272 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003273 goto exit;
3274 }
3275 _remaining = _env->GetArrayLength(params_ref) - offset;
3276 params_base = (GLfloat *)
3277 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3278 params = params_base + offset;
3279
3280 glGetTexGenfvOES(
3281 (GLenum)coord,
3282 (GLenum)pname,
3283 (GLfloat *)params
3284 );
3285
3286exit:
3287 if (params_base) {
3288 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3289 _exception ? JNI_ABORT: 0);
3290 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003291 if (_exception) {
3292 jniThrowException(_env, _exceptionType, _exceptionMessage);
3293 }
Jack Palevich27f80022009-04-15 19:13:17 -07003294}
3295
3296/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3297static void
3298android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3299 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003300 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003301 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003302 jint _remaining;
3303 GLfloat *params = (GLfloat *) 0;
3304
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003305 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3306 if (params == NULL) {
3307 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3308 params = (GLfloat *) (_paramsBase + _bufferOffset);
3309 }
Jack Palevicha3795852009-04-24 10:35:11 -07003310 glGetTexGenfvOES(
3311 (GLenum)coord,
3312 (GLenum)pname,
3313 (GLfloat *)params
3314 );
3315 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003316 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003317 }
Jack Palevich27f80022009-04-15 19:13:17 -07003318}
3319
3320/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3321static void
3322android_glGetTexGenivOES__II_3II
3323 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003324 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003325 const char * _exceptionType = NULL;
3326 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003327 GLint *params_base = (GLint *) 0;
3328 jint _remaining;
3329 GLint *params = (GLint *) 0;
3330
3331 if (!params_ref) {
3332 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003333 _exceptionType = "java/lang/IllegalArgumentException";
3334 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003335 goto exit;
3336 }
3337 if (offset < 0) {
3338 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003339 _exceptionType = "java/lang/IllegalArgumentException";
3340 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003341 goto exit;
3342 }
3343 _remaining = _env->GetArrayLength(params_ref) - offset;
3344 params_base = (GLint *)
3345 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3346 params = params_base + offset;
3347
3348 glGetTexGenivOES(
3349 (GLenum)coord,
3350 (GLenum)pname,
3351 (GLint *)params
3352 );
3353
3354exit:
3355 if (params_base) {
3356 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3357 _exception ? JNI_ABORT: 0);
3358 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003359 if (_exception) {
3360 jniThrowException(_env, _exceptionType, _exceptionMessage);
3361 }
Jack Palevich27f80022009-04-15 19:13:17 -07003362}
3363
3364/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3365static void
3366android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3367 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003368 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003369 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003370 jint _remaining;
3371 GLint *params = (GLint *) 0;
3372
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003373 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3374 if (params == NULL) {
3375 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3376 params = (GLint *) (_paramsBase + _bufferOffset);
3377 }
Jack Palevicha3795852009-04-24 10:35:11 -07003378 glGetTexGenivOES(
3379 (GLenum)coord,
3380 (GLenum)pname,
3381 (GLint *)params
3382 );
3383 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003384 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003385 }
Jack Palevich27f80022009-04-15 19:13:17 -07003386}
3387
3388/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3389static void
3390android_glGetTexGenxvOES__II_3II
3391 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003392 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003393 const char * _exceptionType = NULL;
3394 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003395 GLfixed *params_base = (GLfixed *) 0;
3396 jint _remaining;
3397 GLfixed *params = (GLfixed *) 0;
3398
3399 if (!params_ref) {
3400 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003401 _exceptionType = "java/lang/IllegalArgumentException";
3402 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003403 goto exit;
3404 }
3405 if (offset < 0) {
3406 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003407 _exceptionType = "java/lang/IllegalArgumentException";
3408 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003409 goto exit;
3410 }
3411 _remaining = _env->GetArrayLength(params_ref) - offset;
3412 params_base = (GLfixed *)
3413 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3414 params = params_base + offset;
3415
3416 glGetTexGenxvOES(
3417 (GLenum)coord,
3418 (GLenum)pname,
3419 (GLfixed *)params
3420 );
3421
3422exit:
3423 if (params_base) {
3424 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3425 _exception ? JNI_ABORT: 0);
3426 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003427 if (_exception) {
3428 jniThrowException(_env, _exceptionType, _exceptionMessage);
3429 }
Jack Palevich27f80022009-04-15 19:13:17 -07003430}
3431
3432/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3433static void
3434android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3435 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003436 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003437 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003438 jint _remaining;
3439 GLfixed *params = (GLfixed *) 0;
3440
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003441 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3442 if (params == NULL) {
3443 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3444 params = (GLfixed *) (_paramsBase + _bufferOffset);
3445 }
Jack Palevicha3795852009-04-24 10:35:11 -07003446 glGetTexGenxvOES(
3447 (GLenum)coord,
3448 (GLenum)pname,
3449 (GLfixed *)params
3450 );
3451 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003452 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003453 }
Jack Palevich27f80022009-04-15 19:13:17 -07003454}
3455
3456static const char *classPathName = "android/opengl/GLES11Ext";
3457
3458static JNINativeMethod methods[] = {
3459{"_nativeClassInit", "()V", (void*)nativeClassInit },
3460{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
3461{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
3462{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
3463{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
3464{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
3465{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
3466{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
3467{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
3468{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
3469{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
3470{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
3471{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
3472{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
3473{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
3474{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
3475{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
3476{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
3477{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
3478{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
3479{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
3480{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
3481{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
3482{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
3483{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
3484{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
3485{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
3486{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
3487{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
3488{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
3489{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
3490{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
3491{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
3492{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
3493{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
3494{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
3495{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
3496{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
3497{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3498{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
3499{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3500{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
3501{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
3502{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
3503{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
3504{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
3505{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
3506{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
3507{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
3508{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
3509{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
3510{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
3511{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
3512{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
3513{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
3514{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
3515{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
3516{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
3517{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
3518{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
3519{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
3520{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
3521{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
3522{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
3523{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
3524{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
3525{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
3526{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
3527{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3528{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
3529{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
3530{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3531{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
3532{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
3533{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
3534{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
3535{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3536{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
3537{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3538{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
3539{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
3540{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
3541{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
3542{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
3543{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
3544{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
3545{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
3546{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
3547{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
3548{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
3549{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
3550{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
3551{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
3552{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
3553{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
3554{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08003555{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
3556{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07003557{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
3558{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
3559{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
3560{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
3561{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3562{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
3563{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3564{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
3565{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
3566{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
3567{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3568{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
3569{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
3570{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
3571{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
3572{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
3573{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
3574{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
3575{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3576{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
3577{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
3578{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
3579{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
3580};
3581
3582int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
3583{
3584 int err;
3585 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3586 return err;
3587}