blob: c91baa2591c118d053e0acbb8d78c1155b832508 [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 Agopian15284de2013-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 Agopian15284de2013-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
66}
67
Jack Palevich27f80022009-04-15 19:13:17 -070068/* Cache method IDs each time the class is loaded. */
69
70static void
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070071nativeClassInit(JNIEnv *_env, jclass glImplClass)
Jack Palevich27f80022009-04-15 19:13:17 -070072{
73 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
74 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
75
76 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
77 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
78
79 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
80 "getBasePointer", "(Ljava/nio/Buffer;)J");
81 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
82 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
83 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
84 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
85
86 positionID = _env->GetFieldID(bufferClass, "position", "I");
87 limitID = _env->GetFieldID(bufferClass, "limit", "I");
88 elementSizeShiftID =
89 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
90}
91
Jack Palevich27f80022009-04-15 19:13:17 -070092static void *
Thomas Tafertshofer17045a12012-07-12 13:55:55 -070093getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
Jack Palevich27f80022009-04-15 19:13:17 -070094{
95 jint position;
96 jint limit;
97 jint elementSizeShift;
98 jlong pointer;
Jack Palevich27f80022009-04-15 19:13:17 -070099
100 position = _env->GetIntField(buffer, positionID);
101 limit = _env->GetIntField(buffer, limitID);
102 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
103 *remaining = (limit - position) << elementSizeShift;
104 pointer = _env->CallStaticLongMethod(nioAccessClass,
105 getBasePointerID, buffer);
106 if (pointer != 0L) {
107 *array = NULL;
108 return (void *) (jint) pointer;
109 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700110
Jack Palevich27f80022009-04-15 19:13:17 -0700111 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
112 getBaseArrayID, buffer);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700113 *offset = _env->CallStaticIntMethod(nioAccessClass,
Jack Palevich27f80022009-04-15 19:13:17 -0700114 getBaseArrayOffsetID, buffer);
Mathias Agopian15284de2013-02-23 03:12:30 -0800115
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700116 return NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700117}
118
Jack Palevich27f80022009-04-15 19:13:17 -0700119static void
120releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
121{
122 _env->ReleasePrimitiveArrayCritical(array, data,
Mathias Agopian15284de2013-02-23 03:12:30 -0800123 commit ? 0 : JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700124}
125
Jack Palevichbe6eac82009-12-08 15:43:51 +0800126static void *
127getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
128 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
129 if (buf) {
130 jint position = _env->GetIntField(buffer, positionID);
131 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
132 buf += position << elementSizeShift;
133 } else {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700134 jniThrowException(_env, "java/lang/IllegalArgumentException",
135 "Must use a native order direct Buffer");
Jack Palevichbe6eac82009-12-08 15:43:51 +0800136 }
137 return (void*) buf;
138}
Mathias Agopian15284de2013-02-23 03:12:30 -0800139
140// --------------------------------------------------------------------------
141
142/*
143 * returns the number of values glGet returns for a given pname.
144 *
145 * The code below is written such that pnames requiring only one values
146 * are the default (and are not explicitely tested for). This makes the
147 * checking code much shorter/readable/efficient.
148 *
149 * This means that unknown pnames (e.g.: extensions) will default to 1. If
150 * that unknown pname needs more than 1 value, then the validation check
151 * is incomplete and the app may crash if it passed the wrong number params.
152 */
153static int getNeededCount(GLint pname) {
154 int needed = 1;
155#ifdef GL_ES_VERSION_2_0
156 // GLES 2.x pnames
157 switch (pname) {
158 case GL_ALIASED_LINE_WIDTH_RANGE:
159 case GL_ALIASED_POINT_SIZE_RANGE:
160 needed = 2;
161 break;
162
163 case GL_BLEND_COLOR:
164 case GL_COLOR_CLEAR_VALUE:
165 case GL_COLOR_WRITEMASK:
166 case GL_SCISSOR_BOX:
167 case GL_VIEWPORT:
168 needed = 4;
169 break;
170
171 case GL_COMPRESSED_TEXTURE_FORMATS:
172 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
173 break;
174
175 case GL_SHADER_BINARY_FORMATS:
176 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
177 break;
178 }
179#endif
180
181#ifdef GL_VERSION_ES_CM_1_1
182 // GLES 1.x pnames
183 switch (pname) {
184 case GL_ALIASED_LINE_WIDTH_RANGE:
185 case GL_ALIASED_POINT_SIZE_RANGE:
186 case GL_DEPTH_RANGE:
187 case GL_SMOOTH_LINE_WIDTH_RANGE:
188 case GL_SMOOTH_POINT_SIZE_RANGE:
189 needed = 2;
190 break;
191
192 case GL_CURRENT_NORMAL:
193 case GL_POINT_DISTANCE_ATTENUATION:
194 needed = 3;
195 break;
196
197 case GL_COLOR_CLEAR_VALUE:
198 case GL_COLOR_WRITEMASK:
199 case GL_CURRENT_COLOR:
200 case GL_CURRENT_TEXTURE_COORDS:
201 case GL_FOG_COLOR:
202 case GL_LIGHT_MODEL_AMBIENT:
203 case GL_SCISSOR_BOX:
204 case GL_VIEWPORT:
205 needed = 4;
206 break;
207
208 case GL_MODELVIEW_MATRIX:
209 case GL_PROJECTION_MATRIX:
210 case GL_TEXTURE_MATRIX:
211 needed = 16;
212 break;
213
214 case GL_COMPRESSED_TEXTURE_FORMATS:
215 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
216 break;
217 }
218#endif
219 return needed;
220}
221
222template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
223static void
224get
225 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
226 jint _exception = 0;
227 const char * _exceptionType;
228 const char * _exceptionMessage;
229 CTYPE *params_base = (CTYPE *) 0;
230 jint _remaining;
231 CTYPE *params = (CTYPE *) 0;
232 int _needed = 0;
233
234 if (!params_ref) {
235 _exception = 1;
236 _exceptionType = "java/lang/IllegalArgumentException";
237 _exceptionMessage = "params == null";
238 goto exit;
239 }
240 if (offset < 0) {
241 _exception = 1;
242 _exceptionType = "java/lang/IllegalArgumentException";
243 _exceptionMessage = "offset < 0";
244 goto exit;
245 }
246 _remaining = _env->GetArrayLength(params_ref) - offset;
247 _needed = getNeededCount(pname);
248 // if we didn't find this pname, we just assume the user passed
249 // an array of the right size -- this might happen with extensions
250 // or if we forget an enum here.
251 if (_remaining < _needed) {
252 _exception = 1;
253 _exceptionType = "java/lang/IllegalArgumentException";
254 _exceptionMessage = "length - offset < needed";
255 goto exit;
256 }
257 params_base = (CTYPE *)
258 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
259 params = params_base + offset;
260
261 GET(
262 (GLenum)pname,
263 (CTYPE *)params
264 );
265
266exit:
267 if (params_base) {
268 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
269 _exception ? JNI_ABORT: 0);
270 }
271 if (_exception) {
272 jniThrowException(_env, _exceptionType, _exceptionMessage);
273 }
274}
275
276
277template <typename CTYPE, void GET(GLenum, CTYPE*)>
278static void
279getarray
280 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
281 jint _exception = 0;
282 const char * _exceptionType;
283 const char * _exceptionMessage;
284 jarray _array = (jarray) 0;
285 jint _bufferOffset = (jint) 0;
286 jint _remaining;
287 CTYPE *params = (CTYPE *) 0;
288 int _needed = 0;
289
290 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
291 _needed = getNeededCount(pname);
292 // if we didn't find this pname, we just assume the user passed
293 // an array of the right size -- this might happen with extensions
294 // or if we forget an enum here.
295 if (_needed>0 && _remaining < _needed) {
296 _exception = 1;
297 _exceptionType = "java/lang/IllegalArgumentException";
298 _exceptionMessage = "remaining() < needed";
299 goto exit;
300 }
301 if (params == NULL) {
302 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
303 params = (CTYPE *) (_paramsBase + _bufferOffset);
304 }
305 GET(
306 (GLenum)pname,
307 (CTYPE *)params
308 );
309
310exit:
311 if (_array) {
312 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
313 }
314 if (_exception) {
315 jniThrowException(_env, _exceptionType, _exceptionMessage);
316 }
317}
318
Jack Palevich27f80022009-04-15 19:13:17 -0700319// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700320/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
321static void
322android_glBlendEquationSeparateOES__II
323 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700324 glBlendEquationSeparateOES(
325 (GLenum)modeRGB,
326 (GLenum)modeAlpha
327 );
Jack Palevich27f80022009-04-15 19:13:17 -0700328}
329
330/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
331static void
332android_glBlendFuncSeparateOES__IIII
333 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700334 glBlendFuncSeparateOES(
335 (GLenum)srcRGB,
336 (GLenum)dstRGB,
337 (GLenum)srcAlpha,
338 (GLenum)dstAlpha
339 );
Jack Palevich27f80022009-04-15 19:13:17 -0700340}
341
342/* void glBlendEquationOES ( GLenum mode ) */
343static void
344android_glBlendEquationOES__I
345 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700346 glBlendEquationOES(
347 (GLenum)mode
348 );
Jack Palevich27f80022009-04-15 19:13:17 -0700349}
350
351/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
352static void
353android_glDrawTexsOES__SSSSS
354 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
355 glDrawTexsOES(
356 (GLshort)x,
357 (GLshort)y,
358 (GLshort)z,
359 (GLshort)width,
360 (GLshort)height
361 );
362}
363
364/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
365static void
366android_glDrawTexiOES__IIIII
367 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
368 glDrawTexiOES(
369 (GLint)x,
370 (GLint)y,
371 (GLint)z,
372 (GLint)width,
373 (GLint)height
374 );
375}
376
377/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
378static void
379android_glDrawTexxOES__IIIII
380 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
381 glDrawTexxOES(
382 (GLfixed)x,
383 (GLfixed)y,
384 (GLfixed)z,
385 (GLfixed)width,
386 (GLfixed)height
387 );
388}
389
390/* void glDrawTexsvOES ( const GLshort *coords ) */
391static void
392android_glDrawTexsvOES___3SI
393 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700394 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800395 const char * _exceptionType = NULL;
396 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700397 GLshort *coords_base = (GLshort *) 0;
398 jint _remaining;
399 GLshort *coords = (GLshort *) 0;
400
401 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700402 _exception = 1;
403 _exceptionType = "java/lang/IllegalArgumentException";
404 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700405 goto exit;
406 }
407 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700408 _exception = 1;
409 _exceptionType = "java/lang/IllegalArgumentException";
410 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700411 goto exit;
412 }
413 _remaining = _env->GetArrayLength(coords_ref) - offset;
414 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700415 _exception = 1;
416 _exceptionType = "java/lang/IllegalArgumentException";
417 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700418 goto exit;
419 }
420 coords_base = (GLshort *)
421 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
422 coords = coords_base + offset;
423
424 glDrawTexsvOES(
425 (GLshort *)coords
426 );
427
428exit:
429 if (coords_base) {
430 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
431 JNI_ABORT);
432 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700433 if (_exception) {
434 jniThrowException(_env, _exceptionType, _exceptionMessage);
435 }
Jack Palevich27f80022009-04-15 19:13:17 -0700436}
437
438/* void glDrawTexsvOES ( const GLshort *coords ) */
439static void
440android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
441 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700442 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800443 const char * _exceptionType = NULL;
444 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700445 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700446 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700447 jint _remaining;
448 GLshort *coords = (GLshort *) 0;
449
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700450 coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700451 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700452 _exception = 1;
453 _exceptionType = "java/lang/IllegalArgumentException";
454 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700455 goto exit;
456 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700457 if (coords == NULL) {
458 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
459 coords = (GLshort *) (_coordsBase + _bufferOffset);
460 }
Jack Palevich27f80022009-04-15 19:13:17 -0700461 glDrawTexsvOES(
462 (GLshort *)coords
463 );
464
465exit:
466 if (_array) {
467 releasePointer(_env, _array, coords, JNI_FALSE);
468 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700469 if (_exception) {
470 jniThrowException(_env, _exceptionType, _exceptionMessage);
471 }
Jack Palevich27f80022009-04-15 19:13:17 -0700472}
473
474/* void glDrawTexivOES ( const GLint *coords ) */
475static void
476android_glDrawTexivOES___3II
477 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700478 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800479 const char * _exceptionType = NULL;
480 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700481 GLint *coords_base = (GLint *) 0;
482 jint _remaining;
483 GLint *coords = (GLint *) 0;
484
485 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700486 _exception = 1;
487 _exceptionType = "java/lang/IllegalArgumentException";
488 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700489 goto exit;
490 }
491 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700492 _exception = 1;
493 _exceptionType = "java/lang/IllegalArgumentException";
494 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700495 goto exit;
496 }
497 _remaining = _env->GetArrayLength(coords_ref) - offset;
498 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700499 _exception = 1;
500 _exceptionType = "java/lang/IllegalArgumentException";
501 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700502 goto exit;
503 }
504 coords_base = (GLint *)
505 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
506 coords = coords_base + offset;
507
508 glDrawTexivOES(
509 (GLint *)coords
510 );
511
512exit:
513 if (coords_base) {
514 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
515 JNI_ABORT);
516 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700517 if (_exception) {
518 jniThrowException(_env, _exceptionType, _exceptionMessage);
519 }
Jack Palevich27f80022009-04-15 19:13:17 -0700520}
521
522/* void glDrawTexivOES ( const GLint *coords ) */
523static void
524android_glDrawTexivOES__Ljava_nio_IntBuffer_2
525 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700526 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800527 const char * _exceptionType = NULL;
528 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700529 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700530 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700531 jint _remaining;
532 GLint *coords = (GLint *) 0;
533
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700534 coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700535 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700536 _exception = 1;
537 _exceptionType = "java/lang/IllegalArgumentException";
538 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700539 goto exit;
540 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700541 if (coords == NULL) {
542 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
543 coords = (GLint *) (_coordsBase + _bufferOffset);
544 }
Jack Palevich27f80022009-04-15 19:13:17 -0700545 glDrawTexivOES(
546 (GLint *)coords
547 );
548
549exit:
550 if (_array) {
551 releasePointer(_env, _array, coords, JNI_FALSE);
552 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700553 if (_exception) {
554 jniThrowException(_env, _exceptionType, _exceptionMessage);
555 }
Jack Palevich27f80022009-04-15 19:13:17 -0700556}
557
558/* void glDrawTexxvOES ( const GLfixed *coords ) */
559static void
560android_glDrawTexxvOES___3II
561 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700562 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800563 const char * _exceptionType = NULL;
564 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700565 GLfixed *coords_base = (GLfixed *) 0;
566 jint _remaining;
567 GLfixed *coords = (GLfixed *) 0;
568
569 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700570 _exception = 1;
571 _exceptionType = "java/lang/IllegalArgumentException";
572 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700573 goto exit;
574 }
575 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700576 _exception = 1;
577 _exceptionType = "java/lang/IllegalArgumentException";
578 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700579 goto exit;
580 }
581 _remaining = _env->GetArrayLength(coords_ref) - offset;
582 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700583 _exception = 1;
584 _exceptionType = "java/lang/IllegalArgumentException";
585 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700586 goto exit;
587 }
588 coords_base = (GLfixed *)
589 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
590 coords = coords_base + offset;
591
592 glDrawTexxvOES(
593 (GLfixed *)coords
594 );
595
596exit:
597 if (coords_base) {
598 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
599 JNI_ABORT);
600 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700601 if (_exception) {
602 jniThrowException(_env, _exceptionType, _exceptionMessage);
603 }
Jack Palevich27f80022009-04-15 19:13:17 -0700604}
605
606/* void glDrawTexxvOES ( const GLfixed *coords ) */
607static void
608android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
609 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700610 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800611 const char * _exceptionType = NULL;
612 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700613 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700614 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700615 jint _remaining;
616 GLfixed *coords = (GLfixed *) 0;
617
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700618 coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700619 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700620 _exception = 1;
621 _exceptionType = "java/lang/IllegalArgumentException";
622 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700623 goto exit;
624 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700625 if (coords == NULL) {
626 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
627 coords = (GLfixed *) (_coordsBase + _bufferOffset);
628 }
Jack Palevich27f80022009-04-15 19:13:17 -0700629 glDrawTexxvOES(
630 (GLfixed *)coords
631 );
632
633exit:
634 if (_array) {
635 releasePointer(_env, _array, coords, JNI_FALSE);
636 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700637 if (_exception) {
638 jniThrowException(_env, _exceptionType, _exceptionMessage);
639 }
Jack Palevich27f80022009-04-15 19:13:17 -0700640}
641
642/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
643static void
644android_glDrawTexfOES__FFFFF
645 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
646 glDrawTexfOES(
647 (GLfloat)x,
648 (GLfloat)y,
649 (GLfloat)z,
650 (GLfloat)width,
651 (GLfloat)height
652 );
653}
654
655/* void glDrawTexfvOES ( const GLfloat *coords ) */
656static void
657android_glDrawTexfvOES___3FI
658 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700659 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800660 const char * _exceptionType = NULL;
661 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700662 GLfloat *coords_base = (GLfloat *) 0;
663 jint _remaining;
664 GLfloat *coords = (GLfloat *) 0;
665
666 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700667 _exception = 1;
668 _exceptionType = "java/lang/IllegalArgumentException";
669 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700670 goto exit;
671 }
672 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700673 _exception = 1;
674 _exceptionType = "java/lang/IllegalArgumentException";
675 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700676 goto exit;
677 }
678 _remaining = _env->GetArrayLength(coords_ref) - offset;
679 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700680 _exception = 1;
681 _exceptionType = "java/lang/IllegalArgumentException";
682 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700683 goto exit;
684 }
685 coords_base = (GLfloat *)
686 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
687 coords = coords_base + offset;
688
689 glDrawTexfvOES(
690 (GLfloat *)coords
691 );
692
693exit:
694 if (coords_base) {
695 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
696 JNI_ABORT);
697 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700698 if (_exception) {
699 jniThrowException(_env, _exceptionType, _exceptionMessage);
700 }
Jack Palevich27f80022009-04-15 19:13:17 -0700701}
702
703/* void glDrawTexfvOES ( const GLfloat *coords ) */
704static void
705android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
706 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700707 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800708 const char * _exceptionType = NULL;
709 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700710 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700711 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700712 jint _remaining;
713 GLfloat *coords = (GLfloat *) 0;
714
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700715 coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700716 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700717 _exception = 1;
718 _exceptionType = "java/lang/IllegalArgumentException";
719 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700720 goto exit;
721 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700722 if (coords == NULL) {
723 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
724 coords = (GLfloat *) (_coordsBase + _bufferOffset);
725 }
Jack Palevich27f80022009-04-15 19:13:17 -0700726 glDrawTexfvOES(
727 (GLfloat *)coords
728 );
729
730exit:
731 if (_array) {
732 releasePointer(_env, _array, coords, JNI_FALSE);
733 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700734 if (_exception) {
735 jniThrowException(_env, _exceptionType, _exceptionMessage);
736 }
Jack Palevich27f80022009-04-15 19:13:17 -0700737}
738
739/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
740static void
741android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
742 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700743 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700744 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700745 jint _remaining;
746 GLeglImageOES image = (GLeglImageOES) 0;
747
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700748 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
749 if (image == NULL) {
750 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
751 image = (GLeglImageOES) (_imageBase + _bufferOffset);
752 }
Jack Palevicha3795852009-04-24 10:35:11 -0700753 glEGLImageTargetTexture2DOES(
754 (GLenum)target,
755 (GLeglImageOES)image
756 );
757 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700758 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700759 }
Jack Palevich27f80022009-04-15 19:13:17 -0700760}
761
762/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
763static void
764android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
765 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700766 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700767 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700768 jint _remaining;
769 GLeglImageOES image = (GLeglImageOES) 0;
770
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700771 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
772 if (image == NULL) {
773 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
774 image = (GLeglImageOES) (_imageBase + _bufferOffset);
775 }
Jack Palevicha3795852009-04-24 10:35:11 -0700776 glEGLImageTargetRenderbufferStorageOES(
777 (GLenum)target,
778 (GLeglImageOES)image
779 );
780 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700781 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700782 }
Jack Palevich27f80022009-04-15 19:13:17 -0700783}
784
785/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
786static void
787android_glAlphaFuncxOES__II
788 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700789 glAlphaFuncxOES(
790 (GLenum)func,
791 (GLclampx)ref
792 );
Jack Palevich27f80022009-04-15 19:13:17 -0700793}
794
795/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
796static void
797android_glClearColorxOES__IIII
798 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700799 glClearColorxOES(
800 (GLclampx)red,
801 (GLclampx)green,
802 (GLclampx)blue,
803 (GLclampx)alpha
804 );
Jack Palevich27f80022009-04-15 19:13:17 -0700805}
806
807/* void glClearDepthxOES ( GLclampx depth ) */
808static void
809android_glClearDepthxOES__I
810 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700811 glClearDepthxOES(
812 (GLclampx)depth
813 );
Jack Palevich27f80022009-04-15 19:13:17 -0700814}
815
816/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
817static void
818android_glClipPlanexOES__I_3II
819 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700820 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800821 const char * _exceptionType = NULL;
822 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700823 GLfixed *equation_base = (GLfixed *) 0;
824 jint _remaining;
825 GLfixed *equation = (GLfixed *) 0;
826
827 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700828 _exception = 1;
829 _exceptionType = "java/lang/IllegalArgumentException";
830 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700831 goto exit;
832 }
833 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700834 _exception = 1;
835 _exceptionType = "java/lang/IllegalArgumentException";
836 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700837 goto exit;
838 }
839 _remaining = _env->GetArrayLength(equation_ref) - offset;
840 equation_base = (GLfixed *)
841 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
842 equation = equation_base + offset;
843
844 glClipPlanexOES(
845 (GLenum)plane,
846 (GLfixed *)equation
847 );
848
849exit:
850 if (equation_base) {
851 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
852 JNI_ABORT);
853 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700854 if (_exception) {
855 jniThrowException(_env, _exceptionType, _exceptionMessage);
856 }
Jack Palevich27f80022009-04-15 19:13:17 -0700857}
858
859/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
860static void
861android_glClipPlanexOES__ILjava_nio_IntBuffer_2
862 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700863 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700864 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700865 jint _remaining;
866 GLfixed *equation = (GLfixed *) 0;
867
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700868 equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
869 if (equation == NULL) {
870 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
871 equation = (GLfixed *) (_equationBase + _bufferOffset);
872 }
Jack Palevicha3795852009-04-24 10:35:11 -0700873 glClipPlanexOES(
874 (GLenum)plane,
875 (GLfixed *)equation
876 );
877 if (_array) {
878 releasePointer(_env, _array, equation, JNI_FALSE);
879 }
Jack Palevich27f80022009-04-15 19:13:17 -0700880}
881
882/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
883static void
884android_glColor4xOES__IIII
885 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700886 glColor4xOES(
887 (GLfixed)red,
888 (GLfixed)green,
889 (GLfixed)blue,
890 (GLfixed)alpha
891 );
Jack Palevich27f80022009-04-15 19:13:17 -0700892}
893
894/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
895static void
896android_glDepthRangexOES__II
897 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700898 glDepthRangexOES(
899 (GLclampx)zNear,
900 (GLclampx)zFar
901 );
Jack Palevich27f80022009-04-15 19:13:17 -0700902}
903
904/* void glFogxOES ( GLenum pname, GLfixed param ) */
905static void
906android_glFogxOES__II
907 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -0700908 glFogxOES(
909 (GLenum)pname,
910 (GLfixed)param
911 );
Jack Palevich27f80022009-04-15 19:13:17 -0700912}
913
914/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
915static void
916android_glFogxvOES__I_3II
917 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700918 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800919 const char * _exceptionType = NULL;
920 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700921 GLfixed *params_base = (GLfixed *) 0;
922 jint _remaining;
923 GLfixed *params = (GLfixed *) 0;
924
925 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700926 _exception = 1;
927 _exceptionType = "java/lang/IllegalArgumentException";
928 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700929 goto exit;
930 }
931 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700932 _exception = 1;
933 _exceptionType = "java/lang/IllegalArgumentException";
934 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700935 goto exit;
936 }
937 _remaining = _env->GetArrayLength(params_ref) - offset;
938 params_base = (GLfixed *)
939 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
940 params = params_base + offset;
941
942 glFogxvOES(
943 (GLenum)pname,
944 (GLfixed *)params
945 );
946
947exit:
948 if (params_base) {
949 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
950 JNI_ABORT);
951 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700952 if (_exception) {
953 jniThrowException(_env, _exceptionType, _exceptionMessage);
954 }
Jack Palevich27f80022009-04-15 19:13:17 -0700955}
956
957/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
958static void
959android_glFogxvOES__ILjava_nio_IntBuffer_2
960 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700961 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700962 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700963 jint _remaining;
964 GLfixed *params = (GLfixed *) 0;
965
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700966 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
967 if (params == NULL) {
968 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
969 params = (GLfixed *) (_paramsBase + _bufferOffset);
970 }
Jack Palevicha3795852009-04-24 10:35:11 -0700971 glFogxvOES(
972 (GLenum)pname,
973 (GLfixed *)params
974 );
975 if (_array) {
976 releasePointer(_env, _array, params, JNI_FALSE);
977 }
Jack Palevich27f80022009-04-15 19:13:17 -0700978}
979
980/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
981static void
982android_glFrustumxOES__IIIIII
983 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700984 glFrustumxOES(
985 (GLfixed)left,
986 (GLfixed)right,
987 (GLfixed)bottom,
988 (GLfixed)top,
989 (GLfixed)zNear,
990 (GLfixed)zFar
991 );
Jack Palevich27f80022009-04-15 19:13:17 -0700992}
993
994/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
995static void
996android_glGetClipPlanexOES__I_3II
997 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -0700998 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -0800999 const char * _exceptionType = NULL;
1000 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001001 GLfixed *eqn_base = (GLfixed *) 0;
1002 jint _remaining;
1003 GLfixed *eqn = (GLfixed *) 0;
1004
1005 if (!eqn_ref) {
1006 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001007 _exceptionType = "java/lang/IllegalArgumentException";
1008 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001009 goto exit;
1010 }
1011 if (offset < 0) {
1012 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001013 _exceptionType = "java/lang/IllegalArgumentException";
1014 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001015 goto exit;
1016 }
1017 _remaining = _env->GetArrayLength(eqn_ref) - offset;
1018 if (_remaining < 4) {
1019 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001020 _exceptionType = "java/lang/IllegalArgumentException";
1021 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001022 goto exit;
1023 }
1024 eqn_base = (GLfixed *)
1025 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
1026 eqn = eqn_base + offset;
1027
1028 glGetClipPlanexOES(
1029 (GLenum)pname,
1030 (GLfixed *)eqn
1031 );
1032
1033exit:
1034 if (eqn_base) {
1035 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
1036 _exception ? JNI_ABORT: 0);
1037 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001038 if (_exception) {
1039 jniThrowException(_env, _exceptionType, _exceptionMessage);
1040 }
Jack Palevich27f80022009-04-15 19:13:17 -07001041}
1042
1043/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1044static void
1045android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1046 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001047 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001048 const char * _exceptionType = NULL;
1049 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001050 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001051 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001052 jint _remaining;
1053 GLfixed *eqn = (GLfixed *) 0;
1054
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001055 eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07001056 if (_remaining < 4) {
1057 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001058 _exceptionType = "java/lang/IllegalArgumentException";
1059 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001060 goto exit;
1061 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001062 if (eqn == NULL) {
1063 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1064 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1065 }
Jack Palevicha3795852009-04-24 10:35:11 -07001066 glGetClipPlanexOES(
1067 (GLenum)pname,
1068 (GLfixed *)eqn
1069 );
1070
1071exit:
1072 if (_array) {
1073 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
1074 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001075 if (_exception) {
1076 jniThrowException(_env, _exceptionType, _exceptionMessage);
1077 }
Jack Palevich27f80022009-04-15 19:13:17 -07001078}
1079
1080/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1081static void
1082android_glGetFixedvOES__I_3II
1083 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001084 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001085 const char * _exceptionType = NULL;
1086 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001087 GLfixed *params_base = (GLfixed *) 0;
1088 jint _remaining;
1089 GLfixed *params = (GLfixed *) 0;
1090
1091 if (!params_ref) {
1092 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001093 _exceptionType = "java/lang/IllegalArgumentException";
1094 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001095 goto exit;
1096 }
1097 if (offset < 0) {
1098 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001099 _exceptionType = "java/lang/IllegalArgumentException";
1100 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001101 goto exit;
1102 }
1103 _remaining = _env->GetArrayLength(params_ref) - offset;
1104 params_base = (GLfixed *)
1105 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1106 params = params_base + offset;
1107
1108 glGetFixedvOES(
1109 (GLenum)pname,
1110 (GLfixed *)params
1111 );
1112
1113exit:
1114 if (params_base) {
1115 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1116 _exception ? JNI_ABORT: 0);
1117 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001118 if (_exception) {
1119 jniThrowException(_env, _exceptionType, _exceptionMessage);
1120 }
Jack Palevich27f80022009-04-15 19:13:17 -07001121}
1122
1123/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1124static void
1125android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1126 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001127 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001128 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001129 jint _remaining;
1130 GLfixed *params = (GLfixed *) 0;
1131
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001132 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1133 if (params == NULL) {
1134 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1135 params = (GLfixed *) (_paramsBase + _bufferOffset);
1136 }
Jack Palevicha3795852009-04-24 10:35:11 -07001137 glGetFixedvOES(
1138 (GLenum)pname,
1139 (GLfixed *)params
1140 );
1141 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001142 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001143 }
Jack Palevich27f80022009-04-15 19:13:17 -07001144}
1145
1146/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1147static void
1148android_glGetLightxvOES__II_3II
1149 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001150 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001151 const char * _exceptionType = NULL;
1152 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001153 GLfixed *params_base = (GLfixed *) 0;
1154 jint _remaining;
1155 GLfixed *params = (GLfixed *) 0;
1156
1157 if (!params_ref) {
1158 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001159 _exceptionType = "java/lang/IllegalArgumentException";
1160 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001161 goto exit;
1162 }
1163 if (offset < 0) {
1164 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001165 _exceptionType = "java/lang/IllegalArgumentException";
1166 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001167 goto exit;
1168 }
1169 _remaining = _env->GetArrayLength(params_ref) - offset;
1170 params_base = (GLfixed *)
1171 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1172 params = params_base + offset;
1173
1174 glGetLightxvOES(
1175 (GLenum)light,
1176 (GLenum)pname,
1177 (GLfixed *)params
1178 );
1179
1180exit:
1181 if (params_base) {
1182 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1183 _exception ? JNI_ABORT: 0);
1184 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001185 if (_exception) {
1186 jniThrowException(_env, _exceptionType, _exceptionMessage);
1187 }
Jack Palevich27f80022009-04-15 19:13:17 -07001188}
1189
1190/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1191static void
1192android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1193 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001194 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001195 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001196 jint _remaining;
1197 GLfixed *params = (GLfixed *) 0;
1198
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001199 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1200 if (params == NULL) {
1201 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1202 params = (GLfixed *) (_paramsBase + _bufferOffset);
1203 }
Jack Palevicha3795852009-04-24 10:35:11 -07001204 glGetLightxvOES(
1205 (GLenum)light,
1206 (GLenum)pname,
1207 (GLfixed *)params
1208 );
1209 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001210 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001211 }
Jack Palevich27f80022009-04-15 19:13:17 -07001212}
1213
1214/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1215static void
1216android_glGetMaterialxvOES__II_3II
1217 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001218 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001219 const char * _exceptionType = NULL;
1220 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001221 GLfixed *params_base = (GLfixed *) 0;
1222 jint _remaining;
1223 GLfixed *params = (GLfixed *) 0;
1224
1225 if (!params_ref) {
1226 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001227 _exceptionType = "java/lang/IllegalArgumentException";
1228 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001229 goto exit;
1230 }
1231 if (offset < 0) {
1232 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001233 _exceptionType = "java/lang/IllegalArgumentException";
1234 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001235 goto exit;
1236 }
1237 _remaining = _env->GetArrayLength(params_ref) - offset;
1238 params_base = (GLfixed *)
1239 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1240 params = params_base + offset;
1241
1242 glGetMaterialxvOES(
1243 (GLenum)face,
1244 (GLenum)pname,
1245 (GLfixed *)params
1246 );
1247
1248exit:
1249 if (params_base) {
1250 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1251 _exception ? JNI_ABORT: 0);
1252 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001253 if (_exception) {
1254 jniThrowException(_env, _exceptionType, _exceptionMessage);
1255 }
Jack Palevich27f80022009-04-15 19:13:17 -07001256}
1257
1258/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1259static void
1260android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1261 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001262 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001263 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001264 jint _remaining;
1265 GLfixed *params = (GLfixed *) 0;
1266
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001267 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1268 if (params == NULL) {
1269 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1270 params = (GLfixed *) (_paramsBase + _bufferOffset);
1271 }
Jack Palevicha3795852009-04-24 10:35:11 -07001272 glGetMaterialxvOES(
1273 (GLenum)face,
1274 (GLenum)pname,
1275 (GLfixed *)params
1276 );
1277 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001278 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001279 }
Jack Palevich27f80022009-04-15 19:13:17 -07001280}
1281
1282/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1283static void
1284android_glGetTexEnvxvOES__II_3II
1285 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001286 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001287 const char * _exceptionType = NULL;
1288 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001289 GLfixed *params_base = (GLfixed *) 0;
1290 jint _remaining;
1291 GLfixed *params = (GLfixed *) 0;
1292
1293 if (!params_ref) {
1294 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001295 _exceptionType = "java/lang/IllegalArgumentException";
1296 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001297 goto exit;
1298 }
1299 if (offset < 0) {
1300 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001301 _exceptionType = "java/lang/IllegalArgumentException";
1302 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001303 goto exit;
1304 }
1305 _remaining = _env->GetArrayLength(params_ref) - offset;
1306 params_base = (GLfixed *)
1307 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1308 params = params_base + offset;
1309
1310 glGetTexEnvxvOES(
1311 (GLenum)env,
1312 (GLenum)pname,
1313 (GLfixed *)params
1314 );
1315
1316exit:
1317 if (params_base) {
1318 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1319 _exception ? JNI_ABORT: 0);
1320 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001321 if (_exception) {
1322 jniThrowException(_env, _exceptionType, _exceptionMessage);
1323 }
Jack Palevich27f80022009-04-15 19:13:17 -07001324}
1325
1326/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1327static void
1328android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1329 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001330 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001331 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001332 jint _remaining;
1333 GLfixed *params = (GLfixed *) 0;
1334
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001335 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1336 if (params == NULL) {
1337 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1338 params = (GLfixed *) (_paramsBase + _bufferOffset);
1339 }
Jack Palevicha3795852009-04-24 10:35:11 -07001340 glGetTexEnvxvOES(
1341 (GLenum)env,
1342 (GLenum)pname,
1343 (GLfixed *)params
1344 );
1345 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001346 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001347 }
Jack Palevich27f80022009-04-15 19:13:17 -07001348}
1349
1350/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1351static void
1352android_glGetTexParameterxvOES__II_3II
1353 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001354 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001355 const char * _exceptionType = NULL;
1356 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001357 GLfixed *params_base = (GLfixed *) 0;
1358 jint _remaining;
1359 GLfixed *params = (GLfixed *) 0;
1360
1361 if (!params_ref) {
1362 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001363 _exceptionType = "java/lang/IllegalArgumentException";
1364 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001365 goto exit;
1366 }
1367 if (offset < 0) {
1368 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001369 _exceptionType = "java/lang/IllegalArgumentException";
1370 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001371 goto exit;
1372 }
1373 _remaining = _env->GetArrayLength(params_ref) - offset;
1374 params_base = (GLfixed *)
1375 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1376 params = params_base + offset;
1377
1378 glGetTexParameterxvOES(
1379 (GLenum)target,
1380 (GLenum)pname,
1381 (GLfixed *)params
1382 );
1383
1384exit:
1385 if (params_base) {
1386 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1387 _exception ? JNI_ABORT: 0);
1388 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001389 if (_exception) {
1390 jniThrowException(_env, _exceptionType, _exceptionMessage);
1391 }
Jack Palevich27f80022009-04-15 19:13:17 -07001392}
1393
1394/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1395static void
1396android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1397 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001398 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001399 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001400 jint _remaining;
1401 GLfixed *params = (GLfixed *) 0;
1402
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001403 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1404 if (params == NULL) {
1405 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1406 params = (GLfixed *) (_paramsBase + _bufferOffset);
1407 }
Jack Palevicha3795852009-04-24 10:35:11 -07001408 glGetTexParameterxvOES(
1409 (GLenum)target,
1410 (GLenum)pname,
1411 (GLfixed *)params
1412 );
1413 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001414 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001415 }
Jack Palevich27f80022009-04-15 19:13:17 -07001416}
1417
1418/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1419static void
1420android_glLightModelxOES__II
1421 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001422 glLightModelxOES(
1423 (GLenum)pname,
1424 (GLfixed)param
1425 );
Jack Palevich27f80022009-04-15 19:13:17 -07001426}
1427
1428/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1429static void
1430android_glLightModelxvOES__I_3II
1431 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001432 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001433 const char * _exceptionType = NULL;
1434 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001435 GLfixed *params_base = (GLfixed *) 0;
1436 jint _remaining;
1437 GLfixed *params = (GLfixed *) 0;
1438
1439 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001440 _exception = 1;
1441 _exceptionType = "java/lang/IllegalArgumentException";
1442 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001443 goto exit;
1444 }
1445 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001446 _exception = 1;
1447 _exceptionType = "java/lang/IllegalArgumentException";
1448 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001449 goto exit;
1450 }
1451 _remaining = _env->GetArrayLength(params_ref) - offset;
1452 params_base = (GLfixed *)
1453 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1454 params = params_base + offset;
1455
1456 glLightModelxvOES(
1457 (GLenum)pname,
1458 (GLfixed *)params
1459 );
1460
1461exit:
1462 if (params_base) {
1463 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1464 JNI_ABORT);
1465 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001466 if (_exception) {
1467 jniThrowException(_env, _exceptionType, _exceptionMessage);
1468 }
Jack Palevich27f80022009-04-15 19:13:17 -07001469}
1470
1471/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1472static void
1473android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1474 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001475 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001476 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001477 jint _remaining;
1478 GLfixed *params = (GLfixed *) 0;
1479
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001480 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1481 if (params == NULL) {
1482 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1483 params = (GLfixed *) (_paramsBase + _bufferOffset);
1484 }
Jack Palevicha3795852009-04-24 10:35:11 -07001485 glLightModelxvOES(
1486 (GLenum)pname,
1487 (GLfixed *)params
1488 );
1489 if (_array) {
1490 releasePointer(_env, _array, params, JNI_FALSE);
1491 }
Jack Palevich27f80022009-04-15 19:13:17 -07001492}
1493
1494/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1495static void
1496android_glLightxOES__III
1497 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001498 glLightxOES(
1499 (GLenum)light,
1500 (GLenum)pname,
1501 (GLfixed)param
1502 );
Jack Palevich27f80022009-04-15 19:13:17 -07001503}
1504
1505/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1506static void
1507android_glLightxvOES__II_3II
1508 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001509 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001510 const char * _exceptionType = NULL;
1511 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001512 GLfixed *params_base = (GLfixed *) 0;
1513 jint _remaining;
1514 GLfixed *params = (GLfixed *) 0;
1515
1516 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001517 _exception = 1;
1518 _exceptionType = "java/lang/IllegalArgumentException";
1519 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001520 goto exit;
1521 }
1522 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001523 _exception = 1;
1524 _exceptionType = "java/lang/IllegalArgumentException";
1525 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001526 goto exit;
1527 }
1528 _remaining = _env->GetArrayLength(params_ref) - offset;
1529 params_base = (GLfixed *)
1530 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1531 params = params_base + offset;
1532
1533 glLightxvOES(
1534 (GLenum)light,
1535 (GLenum)pname,
1536 (GLfixed *)params
1537 );
1538
1539exit:
1540 if (params_base) {
1541 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1542 JNI_ABORT);
1543 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001544 if (_exception) {
1545 jniThrowException(_env, _exceptionType, _exceptionMessage);
1546 }
Jack Palevich27f80022009-04-15 19:13:17 -07001547}
1548
1549/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1550static void
1551android_glLightxvOES__IILjava_nio_IntBuffer_2
1552 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001553 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001554 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001555 jint _remaining;
1556 GLfixed *params = (GLfixed *) 0;
1557
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001558 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1559 if (params == NULL) {
1560 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1561 params = (GLfixed *) (_paramsBase + _bufferOffset);
1562 }
Jack Palevicha3795852009-04-24 10:35:11 -07001563 glLightxvOES(
1564 (GLenum)light,
1565 (GLenum)pname,
1566 (GLfixed *)params
1567 );
1568 if (_array) {
1569 releasePointer(_env, _array, params, JNI_FALSE);
1570 }
Jack Palevich27f80022009-04-15 19:13:17 -07001571}
1572
1573/* void glLineWidthxOES ( GLfixed width ) */
1574static void
1575android_glLineWidthxOES__I
1576 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001577 glLineWidthxOES(
1578 (GLfixed)width
1579 );
Jack Palevich27f80022009-04-15 19:13:17 -07001580}
1581
1582/* void glLoadMatrixxOES ( const GLfixed *m ) */
1583static void
1584android_glLoadMatrixxOES___3II
1585 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001586 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001587 const char * _exceptionType = NULL;
1588 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001589 GLfixed *m_base = (GLfixed *) 0;
1590 jint _remaining;
1591 GLfixed *m = (GLfixed *) 0;
1592
1593 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001594 _exception = 1;
1595 _exceptionType = "java/lang/IllegalArgumentException";
1596 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001597 goto exit;
1598 }
1599 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001600 _exception = 1;
1601 _exceptionType = "java/lang/IllegalArgumentException";
1602 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001603 goto exit;
1604 }
1605 _remaining = _env->GetArrayLength(m_ref) - offset;
1606 m_base = (GLfixed *)
1607 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1608 m = m_base + offset;
1609
1610 glLoadMatrixxOES(
1611 (GLfixed *)m
1612 );
1613
1614exit:
1615 if (m_base) {
1616 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1617 JNI_ABORT);
1618 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001619 if (_exception) {
1620 jniThrowException(_env, _exceptionType, _exceptionMessage);
1621 }
Jack Palevich27f80022009-04-15 19:13:17 -07001622}
1623
1624/* void glLoadMatrixxOES ( const GLfixed *m ) */
1625static void
1626android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1627 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001628 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001629 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001630 jint _remaining;
1631 GLfixed *m = (GLfixed *) 0;
1632
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001633 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1634 if (m == NULL) {
1635 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1636 m = (GLfixed *) (_mBase + _bufferOffset);
1637 }
Jack Palevicha3795852009-04-24 10:35:11 -07001638 glLoadMatrixxOES(
1639 (GLfixed *)m
1640 );
1641 if (_array) {
1642 releasePointer(_env, _array, m, JNI_FALSE);
1643 }
Jack Palevich27f80022009-04-15 19:13:17 -07001644}
1645
1646/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1647static void
1648android_glMaterialxOES__III
1649 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001650 glMaterialxOES(
1651 (GLenum)face,
1652 (GLenum)pname,
1653 (GLfixed)param
1654 );
Jack Palevich27f80022009-04-15 19:13:17 -07001655}
1656
1657/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1658static void
1659android_glMaterialxvOES__II_3II
1660 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001661 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001662 const char * _exceptionType = NULL;
1663 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001664 GLfixed *params_base = (GLfixed *) 0;
1665 jint _remaining;
1666 GLfixed *params = (GLfixed *) 0;
1667
1668 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001669 _exception = 1;
1670 _exceptionType = "java/lang/IllegalArgumentException";
1671 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001672 goto exit;
1673 }
1674 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001675 _exception = 1;
1676 _exceptionType = "java/lang/IllegalArgumentException";
1677 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001678 goto exit;
1679 }
1680 _remaining = _env->GetArrayLength(params_ref) - offset;
1681 params_base = (GLfixed *)
1682 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1683 params = params_base + offset;
1684
1685 glMaterialxvOES(
1686 (GLenum)face,
1687 (GLenum)pname,
1688 (GLfixed *)params
1689 );
1690
1691exit:
1692 if (params_base) {
1693 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1694 JNI_ABORT);
1695 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001696 if (_exception) {
1697 jniThrowException(_env, _exceptionType, _exceptionMessage);
1698 }
Jack Palevich27f80022009-04-15 19:13:17 -07001699}
1700
1701/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1702static void
1703android_glMaterialxvOES__IILjava_nio_IntBuffer_2
1704 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001705 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001706 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001707 jint _remaining;
1708 GLfixed *params = (GLfixed *) 0;
1709
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001710 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1711 if (params == NULL) {
1712 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1713 params = (GLfixed *) (_paramsBase + _bufferOffset);
1714 }
Jack Palevicha3795852009-04-24 10:35:11 -07001715 glMaterialxvOES(
1716 (GLenum)face,
1717 (GLenum)pname,
1718 (GLfixed *)params
1719 );
1720 if (_array) {
1721 releasePointer(_env, _array, params, JNI_FALSE);
1722 }
Jack Palevich27f80022009-04-15 19:13:17 -07001723}
1724
1725/* void glMultMatrixxOES ( const GLfixed *m ) */
1726static void
1727android_glMultMatrixxOES___3II
1728 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001729 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001730 const char * _exceptionType = NULL;
1731 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001732 GLfixed *m_base = (GLfixed *) 0;
1733 jint _remaining;
1734 GLfixed *m = (GLfixed *) 0;
1735
1736 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001737 _exception = 1;
1738 _exceptionType = "java/lang/IllegalArgumentException";
1739 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001740 goto exit;
1741 }
1742 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001743 _exception = 1;
1744 _exceptionType = "java/lang/IllegalArgumentException";
1745 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001746 goto exit;
1747 }
1748 _remaining = _env->GetArrayLength(m_ref) - offset;
1749 m_base = (GLfixed *)
1750 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1751 m = m_base + offset;
1752
1753 glMultMatrixxOES(
1754 (GLfixed *)m
1755 );
1756
1757exit:
1758 if (m_base) {
1759 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1760 JNI_ABORT);
1761 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001762 if (_exception) {
1763 jniThrowException(_env, _exceptionType, _exceptionMessage);
1764 }
Jack Palevich27f80022009-04-15 19:13:17 -07001765}
1766
1767/* void glMultMatrixxOES ( const GLfixed *m ) */
1768static void
1769android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
1770 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001771 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001772 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001773 jint _remaining;
1774 GLfixed *m = (GLfixed *) 0;
1775
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001776 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1777 if (m == NULL) {
1778 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1779 m = (GLfixed *) (_mBase + _bufferOffset);
1780 }
Jack Palevicha3795852009-04-24 10:35:11 -07001781 glMultMatrixxOES(
1782 (GLfixed *)m
1783 );
1784 if (_array) {
1785 releasePointer(_env, _array, m, JNI_FALSE);
1786 }
Jack Palevich27f80022009-04-15 19:13:17 -07001787}
1788
1789/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
1790static void
1791android_glMultiTexCoord4xOES__IIIII
1792 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07001793 glMultiTexCoord4xOES(
1794 (GLenum)target,
1795 (GLfixed)s,
1796 (GLfixed)t,
1797 (GLfixed)r,
1798 (GLfixed)q
1799 );
Jack Palevich27f80022009-04-15 19:13:17 -07001800}
1801
1802/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
1803static void
1804android_glNormal3xOES__III
1805 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07001806 glNormal3xOES(
1807 (GLfixed)nx,
1808 (GLfixed)ny,
1809 (GLfixed)nz
1810 );
Jack Palevich27f80022009-04-15 19:13:17 -07001811}
1812
1813/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1814static void
1815android_glOrthoxOES__IIIIII
1816 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001817 glOrthoxOES(
1818 (GLfixed)left,
1819 (GLfixed)right,
1820 (GLfixed)bottom,
1821 (GLfixed)top,
1822 (GLfixed)zNear,
1823 (GLfixed)zFar
1824 );
Jack Palevich27f80022009-04-15 19:13:17 -07001825}
1826
1827/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
1828static void
1829android_glPointParameterxOES__II
1830 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001831 glPointParameterxOES(
1832 (GLenum)pname,
1833 (GLfixed)param
1834 );
Jack Palevich27f80022009-04-15 19:13:17 -07001835}
1836
1837/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1838static void
1839android_glPointParameterxvOES__I_3II
1840 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001841 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001842 const char * _exceptionType = NULL;
1843 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001844 GLfixed *params_base = (GLfixed *) 0;
1845 jint _remaining;
1846 GLfixed *params = (GLfixed *) 0;
1847
1848 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001849 _exception = 1;
1850 _exceptionType = "java/lang/IllegalArgumentException";
1851 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001852 goto exit;
1853 }
1854 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001855 _exception = 1;
1856 _exceptionType = "java/lang/IllegalArgumentException";
1857 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001858 goto exit;
1859 }
1860 _remaining = _env->GetArrayLength(params_ref) - offset;
1861 params_base = (GLfixed *)
1862 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1863 params = params_base + offset;
1864
1865 glPointParameterxvOES(
1866 (GLenum)pname,
1867 (GLfixed *)params
1868 );
1869
1870exit:
1871 if (params_base) {
1872 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1873 JNI_ABORT);
1874 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001875 if (_exception) {
1876 jniThrowException(_env, _exceptionType, _exceptionMessage);
1877 }
Jack Palevich27f80022009-04-15 19:13:17 -07001878}
1879
1880/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1881static void
1882android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
1883 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001884 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001885 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001886 jint _remaining;
1887 GLfixed *params = (GLfixed *) 0;
1888
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001889 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1890 if (params == NULL) {
1891 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1892 params = (GLfixed *) (_paramsBase + _bufferOffset);
1893 }
Jack Palevicha3795852009-04-24 10:35:11 -07001894 glPointParameterxvOES(
1895 (GLenum)pname,
1896 (GLfixed *)params
1897 );
1898 if (_array) {
1899 releasePointer(_env, _array, params, JNI_FALSE);
1900 }
Jack Palevich27f80022009-04-15 19:13:17 -07001901}
1902
1903/* void glPointSizexOES ( GLfixed size ) */
1904static void
1905android_glPointSizexOES__I
1906 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07001907 glPointSizexOES(
1908 (GLfixed)size
1909 );
Jack Palevich27f80022009-04-15 19:13:17 -07001910}
1911
1912/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
1913static void
1914android_glPolygonOffsetxOES__II
1915 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07001916 glPolygonOffsetxOES(
1917 (GLfixed)factor,
1918 (GLfixed)units
1919 );
Jack Palevich27f80022009-04-15 19:13:17 -07001920}
1921
1922/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
1923static void
1924android_glRotatexOES__IIII
1925 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001926 glRotatexOES(
1927 (GLfixed)angle,
1928 (GLfixed)x,
1929 (GLfixed)y,
1930 (GLfixed)z
1931 );
Jack Palevich27f80022009-04-15 19:13:17 -07001932}
1933
1934/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
1935static void
1936android_glSampleCoveragexOES__IZ
1937 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07001938 glSampleCoveragexOES(
1939 (GLclampx)value,
1940 (GLboolean)invert
1941 );
Jack Palevich27f80022009-04-15 19:13:17 -07001942}
1943
1944/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1945static void
1946android_glScalexOES__III
1947 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001948 glScalexOES(
1949 (GLfixed)x,
1950 (GLfixed)y,
1951 (GLfixed)z
1952 );
Jack Palevich27f80022009-04-15 19:13:17 -07001953}
1954
1955/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
1956static void
1957android_glTexEnvxOES__III
1958 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001959 glTexEnvxOES(
1960 (GLenum)target,
1961 (GLenum)pname,
1962 (GLfixed)param
1963 );
Jack Palevich27f80022009-04-15 19:13:17 -07001964}
1965
1966/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1967static void
1968android_glTexEnvxvOES__II_3II
1969 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001970 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08001971 const char * _exceptionType = NULL;
1972 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001973 GLfixed *params_base = (GLfixed *) 0;
1974 jint _remaining;
1975 GLfixed *params = (GLfixed *) 0;
1976
1977 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001978 _exception = 1;
1979 _exceptionType = "java/lang/IllegalArgumentException";
1980 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001981 goto exit;
1982 }
1983 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001984 _exception = 1;
1985 _exceptionType = "java/lang/IllegalArgumentException";
1986 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001987 goto exit;
1988 }
1989 _remaining = _env->GetArrayLength(params_ref) - offset;
1990 params_base = (GLfixed *)
1991 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1992 params = params_base + offset;
1993
1994 glTexEnvxvOES(
1995 (GLenum)target,
1996 (GLenum)pname,
1997 (GLfixed *)params
1998 );
1999
2000exit:
2001 if (params_base) {
2002 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2003 JNI_ABORT);
2004 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002005 if (_exception) {
2006 jniThrowException(_env, _exceptionType, _exceptionMessage);
2007 }
Jack Palevich27f80022009-04-15 19:13:17 -07002008}
2009
2010/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2011static void
2012android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2013 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002014 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002015 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002016 jint _remaining;
2017 GLfixed *params = (GLfixed *) 0;
2018
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002019 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2020 if (params == NULL) {
2021 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2022 params = (GLfixed *) (_paramsBase + _bufferOffset);
2023 }
Jack Palevicha3795852009-04-24 10:35:11 -07002024 glTexEnvxvOES(
2025 (GLenum)target,
2026 (GLenum)pname,
2027 (GLfixed *)params
2028 );
2029 if (_array) {
2030 releasePointer(_env, _array, params, JNI_FALSE);
2031 }
Jack Palevich27f80022009-04-15 19:13:17 -07002032}
2033
2034/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2035static void
2036android_glTexParameterxOES__III
2037 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002038 glTexParameterxOES(
2039 (GLenum)target,
2040 (GLenum)pname,
2041 (GLfixed)param
2042 );
Jack Palevich27f80022009-04-15 19:13:17 -07002043}
2044
2045/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2046static void
2047android_glTexParameterxvOES__II_3II
2048 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002049 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002050 const char * _exceptionType = NULL;
2051 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002052 GLfixed *params_base = (GLfixed *) 0;
2053 jint _remaining;
2054 GLfixed *params = (GLfixed *) 0;
2055
2056 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002057 _exception = 1;
2058 _exceptionType = "java/lang/IllegalArgumentException";
2059 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002060 goto exit;
2061 }
2062 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002063 _exception = 1;
2064 _exceptionType = "java/lang/IllegalArgumentException";
2065 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002066 goto exit;
2067 }
2068 _remaining = _env->GetArrayLength(params_ref) - offset;
2069 params_base = (GLfixed *)
2070 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2071 params = params_base + offset;
2072
2073 glTexParameterxvOES(
2074 (GLenum)target,
2075 (GLenum)pname,
2076 (GLfixed *)params
2077 );
2078
2079exit:
2080 if (params_base) {
2081 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2082 JNI_ABORT);
2083 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002084 if (_exception) {
2085 jniThrowException(_env, _exceptionType, _exceptionMessage);
2086 }
Jack Palevich27f80022009-04-15 19:13:17 -07002087}
2088
2089/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2090static void
2091android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2092 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002093 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002094 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002095 jint _remaining;
2096 GLfixed *params = (GLfixed *) 0;
2097
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002098 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2099 if (params == NULL) {
2100 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2101 params = (GLfixed *) (_paramsBase + _bufferOffset);
2102 }
Jack Palevicha3795852009-04-24 10:35:11 -07002103 glTexParameterxvOES(
2104 (GLenum)target,
2105 (GLenum)pname,
2106 (GLfixed *)params
2107 );
2108 if (_array) {
2109 releasePointer(_env, _array, params, JNI_FALSE);
2110 }
Jack Palevich27f80022009-04-15 19:13:17 -07002111}
2112
2113/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2114static void
2115android_glTranslatexOES__III
2116 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002117 glTranslatexOES(
2118 (GLfixed)x,
2119 (GLfixed)y,
2120 (GLfixed)z
2121 );
Jack Palevich27f80022009-04-15 19:13:17 -07002122}
2123
2124/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2125static jboolean
2126android_glIsRenderbufferOES__I
2127 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002128 GLboolean _returnValue;
2129 _returnValue = glIsRenderbufferOES(
2130 (GLuint)renderbuffer
2131 );
2132 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002133}
2134
2135/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2136static void
2137android_glBindRenderbufferOES__II
2138 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002139 glBindRenderbufferOES(
2140 (GLenum)target,
2141 (GLuint)renderbuffer
2142 );
Jack Palevich27f80022009-04-15 19:13:17 -07002143}
2144
2145/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2146static void
2147android_glDeleteRenderbuffersOES__I_3II
2148 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002149 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002150 const char * _exceptionType = NULL;
2151 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002152 GLuint *renderbuffers_base = (GLuint *) 0;
2153 jint _remaining;
2154 GLuint *renderbuffers = (GLuint *) 0;
2155
2156 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002157 _exception = 1;
2158 _exceptionType = "java/lang/IllegalArgumentException";
2159 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002160 goto exit;
2161 }
2162 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002163 _exception = 1;
2164 _exceptionType = "java/lang/IllegalArgumentException";
2165 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002166 goto exit;
2167 }
2168 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2169 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002170 _exception = 1;
2171 _exceptionType = "java/lang/IllegalArgumentException";
2172 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002173 goto exit;
2174 }
2175 renderbuffers_base = (GLuint *)
2176 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
2177 renderbuffers = renderbuffers_base + offset;
2178
2179 glDeleteRenderbuffersOES(
2180 (GLsizei)n,
2181 (GLuint *)renderbuffers
2182 );
2183
2184exit:
2185 if (renderbuffers_base) {
2186 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
2187 JNI_ABORT);
2188 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002189 if (_exception) {
2190 jniThrowException(_env, _exceptionType, _exceptionMessage);
2191 }
Jack Palevich27f80022009-04-15 19:13:17 -07002192}
2193
2194/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2195static void
2196android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2197 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002198 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002199 const char * _exceptionType = NULL;
2200 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002201 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002202 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002203 jint _remaining;
2204 GLuint *renderbuffers = (GLuint *) 0;
2205
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002206 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002207 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002208 _exception = 1;
2209 _exceptionType = "java/lang/IllegalArgumentException";
2210 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002211 goto exit;
2212 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002213 if (renderbuffers == NULL) {
2214 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2215 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2216 }
Jack Palevich73108672011-03-28 14:49:12 -07002217 glDeleteRenderbuffersOES(
2218 (GLsizei)n,
2219 (GLuint *)renderbuffers
2220 );
2221
2222exit:
2223 if (_array) {
2224 releasePointer(_env, _array, renderbuffers, JNI_FALSE);
2225 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002226 if (_exception) {
2227 jniThrowException(_env, _exceptionType, _exceptionMessage);
2228 }
Jack Palevich27f80022009-04-15 19:13:17 -07002229}
2230
2231/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2232static void
2233android_glGenRenderbuffersOES__I_3II
2234 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002235 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002236 const char * _exceptionType = NULL;
2237 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002238 GLuint *renderbuffers_base = (GLuint *) 0;
2239 jint _remaining;
2240 GLuint *renderbuffers = (GLuint *) 0;
2241
2242 if (!renderbuffers_ref) {
2243 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002244 _exceptionType = "java/lang/IllegalArgumentException";
2245 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002246 goto exit;
2247 }
2248 if (offset < 0) {
2249 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002250 _exceptionType = "java/lang/IllegalArgumentException";
2251 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002252 goto exit;
2253 }
2254 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2255 if (_remaining < n) {
2256 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002257 _exceptionType = "java/lang/IllegalArgumentException";
2258 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002259 goto exit;
2260 }
2261 renderbuffers_base = (GLuint *)
2262 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
2263 renderbuffers = renderbuffers_base + offset;
2264
2265 glGenRenderbuffersOES(
2266 (GLsizei)n,
2267 (GLuint *)renderbuffers
2268 );
2269
2270exit:
2271 if (renderbuffers_base) {
2272 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
2273 _exception ? JNI_ABORT: 0);
2274 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002275 if (_exception) {
2276 jniThrowException(_env, _exceptionType, _exceptionMessage);
2277 }
Jack Palevich27f80022009-04-15 19:13:17 -07002278}
2279
2280/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2281static void
2282android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2283 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002284 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002285 const char * _exceptionType = NULL;
2286 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002287 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002288 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002289 jint _remaining;
2290 GLuint *renderbuffers = (GLuint *) 0;
2291
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002292 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002293 if (_remaining < n) {
2294 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002295 _exceptionType = "java/lang/IllegalArgumentException";
2296 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002297 goto exit;
2298 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002299 if (renderbuffers == NULL) {
2300 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2301 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2302 }
Jack Palevich73108672011-03-28 14:49:12 -07002303 glGenRenderbuffersOES(
2304 (GLsizei)n,
2305 (GLuint *)renderbuffers
2306 );
2307
2308exit:
2309 if (_array) {
2310 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
2311 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002312 if (_exception) {
2313 jniThrowException(_env, _exceptionType, _exceptionMessage);
2314 }
Jack Palevich27f80022009-04-15 19:13:17 -07002315}
2316
2317/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2318static void
2319android_glRenderbufferStorageOES__IIII
2320 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002321 glRenderbufferStorageOES(
2322 (GLenum)target,
2323 (GLenum)internalformat,
2324 (GLsizei)width,
2325 (GLsizei)height
2326 );
Jack Palevich27f80022009-04-15 19:13:17 -07002327}
2328
2329/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2330static void
2331android_glGetRenderbufferParameterivOES__II_3II
2332 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002333 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002334 const char * _exceptionType = NULL;
2335 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002336 GLint *params_base = (GLint *) 0;
2337 jint _remaining;
2338 GLint *params = (GLint *) 0;
2339
2340 if (!params_ref) {
2341 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002342 _exceptionType = "java/lang/IllegalArgumentException";
2343 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002344 goto exit;
2345 }
2346 if (offset < 0) {
2347 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002348 _exceptionType = "java/lang/IllegalArgumentException";
2349 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002350 goto exit;
2351 }
2352 _remaining = _env->GetArrayLength(params_ref) - offset;
2353 if (_remaining < 1) {
2354 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002355 _exceptionType = "java/lang/IllegalArgumentException";
2356 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002357 goto exit;
2358 }
2359 params_base = (GLint *)
2360 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2361 params = params_base + offset;
2362
2363 glGetRenderbufferParameterivOES(
2364 (GLenum)target,
2365 (GLenum)pname,
2366 (GLint *)params
2367 );
2368
2369exit:
2370 if (params_base) {
2371 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2372 _exception ? JNI_ABORT: 0);
2373 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002374 if (_exception) {
2375 jniThrowException(_env, _exceptionType, _exceptionMessage);
2376 }
Jack Palevich27f80022009-04-15 19:13:17 -07002377}
2378
2379/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2380static void
2381android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2382 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002383 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002384 const char * _exceptionType = NULL;
2385 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002386 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002387 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002388 jint _remaining;
2389 GLint *params = (GLint *) 0;
2390
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002391 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002392 if (_remaining < 1) {
2393 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002394 _exceptionType = "java/lang/IllegalArgumentException";
2395 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002396 goto exit;
2397 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002398 if (params == NULL) {
2399 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2400 params = (GLint *) (_paramsBase + _bufferOffset);
2401 }
Jack Palevich73108672011-03-28 14:49:12 -07002402 glGetRenderbufferParameterivOES(
2403 (GLenum)target,
2404 (GLenum)pname,
2405 (GLint *)params
2406 );
2407
2408exit:
2409 if (_array) {
2410 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2411 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002412 if (_exception) {
2413 jniThrowException(_env, _exceptionType, _exceptionMessage);
2414 }
Jack Palevich27f80022009-04-15 19:13:17 -07002415}
2416
2417/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2418static jboolean
2419android_glIsFramebufferOES__I
2420 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002421 GLboolean _returnValue;
2422 _returnValue = glIsFramebufferOES(
2423 (GLuint)framebuffer
2424 );
2425 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002426}
2427
2428/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2429static void
2430android_glBindFramebufferOES__II
2431 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002432 glBindFramebufferOES(
2433 (GLenum)target,
2434 (GLuint)framebuffer
2435 );
Jack Palevich27f80022009-04-15 19:13:17 -07002436}
2437
2438/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2439static void
2440android_glDeleteFramebuffersOES__I_3II
2441 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002442 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002443 const char * _exceptionType = NULL;
2444 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002445 GLuint *framebuffers_base = (GLuint *) 0;
2446 jint _remaining;
2447 GLuint *framebuffers = (GLuint *) 0;
2448
2449 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002450 _exception = 1;
2451 _exceptionType = "java/lang/IllegalArgumentException";
2452 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002453 goto exit;
2454 }
2455 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002456 _exception = 1;
2457 _exceptionType = "java/lang/IllegalArgumentException";
2458 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002459 goto exit;
2460 }
2461 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2462 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002463 _exception = 1;
2464 _exceptionType = "java/lang/IllegalArgumentException";
2465 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002466 goto exit;
2467 }
2468 framebuffers_base = (GLuint *)
2469 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2470 framebuffers = framebuffers_base + offset;
2471
2472 glDeleteFramebuffersOES(
2473 (GLsizei)n,
2474 (GLuint *)framebuffers
2475 );
2476
2477exit:
2478 if (framebuffers_base) {
2479 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2480 JNI_ABORT);
2481 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002482 if (_exception) {
2483 jniThrowException(_env, _exceptionType, _exceptionMessage);
2484 }
Jack Palevich27f80022009-04-15 19:13:17 -07002485}
2486
2487/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2488static void
2489android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2490 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002491 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002492 const char * _exceptionType = NULL;
2493 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002494 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002495 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002496 jint _remaining;
2497 GLuint *framebuffers = (GLuint *) 0;
2498
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002499 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002500 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002501 _exception = 1;
2502 _exceptionType = "java/lang/IllegalArgumentException";
2503 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002504 goto exit;
2505 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002506 if (framebuffers == NULL) {
2507 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2508 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2509 }
Jack Palevich73108672011-03-28 14:49:12 -07002510 glDeleteFramebuffersOES(
2511 (GLsizei)n,
2512 (GLuint *)framebuffers
2513 );
2514
2515exit:
2516 if (_array) {
2517 releasePointer(_env, _array, framebuffers, JNI_FALSE);
2518 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002519 if (_exception) {
2520 jniThrowException(_env, _exceptionType, _exceptionMessage);
2521 }
Jack Palevich27f80022009-04-15 19:13:17 -07002522}
2523
2524/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2525static void
2526android_glGenFramebuffersOES__I_3II
2527 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002528 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002529 const char * _exceptionType = NULL;
2530 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002531 GLuint *framebuffers_base = (GLuint *) 0;
2532 jint _remaining;
2533 GLuint *framebuffers = (GLuint *) 0;
2534
2535 if (!framebuffers_ref) {
2536 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002537 _exceptionType = "java/lang/IllegalArgumentException";
2538 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002539 goto exit;
2540 }
2541 if (offset < 0) {
2542 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002543 _exceptionType = "java/lang/IllegalArgumentException";
2544 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002545 goto exit;
2546 }
2547 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2548 if (_remaining < n) {
2549 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002550 _exceptionType = "java/lang/IllegalArgumentException";
2551 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002552 goto exit;
2553 }
2554 framebuffers_base = (GLuint *)
2555 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2556 framebuffers = framebuffers_base + offset;
2557
2558 glGenFramebuffersOES(
2559 (GLsizei)n,
2560 (GLuint *)framebuffers
2561 );
2562
2563exit:
2564 if (framebuffers_base) {
2565 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2566 _exception ? JNI_ABORT: 0);
2567 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002568 if (_exception) {
2569 jniThrowException(_env, _exceptionType, _exceptionMessage);
2570 }
Jack Palevich27f80022009-04-15 19:13:17 -07002571}
2572
2573/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2574static void
2575android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
2576 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002577 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002578 const char * _exceptionType = NULL;
2579 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002580 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002581 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002582 jint _remaining;
2583 GLuint *framebuffers = (GLuint *) 0;
2584
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002585 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002586 if (_remaining < n) {
2587 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002588 _exceptionType = "java/lang/IllegalArgumentException";
2589 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002590 goto exit;
2591 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002592 if (framebuffers == NULL) {
2593 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2594 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2595 }
Jack Palevich73108672011-03-28 14:49:12 -07002596 glGenFramebuffersOES(
2597 (GLsizei)n,
2598 (GLuint *)framebuffers
2599 );
2600
2601exit:
2602 if (_array) {
2603 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
2604 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002605 if (_exception) {
2606 jniThrowException(_env, _exceptionType, _exceptionMessage);
2607 }
Jack Palevich27f80022009-04-15 19:13:17 -07002608}
2609
2610/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
2611static jint
2612android_glCheckFramebufferStatusOES__I
2613 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002614 GLenum _returnValue;
2615 _returnValue = glCheckFramebufferStatusOES(
2616 (GLenum)target
2617 );
2618 return _returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002619}
2620
2621/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
2622static void
2623android_glFramebufferRenderbufferOES__IIII
2624 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002625 glFramebufferRenderbufferOES(
2626 (GLenum)target,
2627 (GLenum)attachment,
2628 (GLenum)renderbuffertarget,
2629 (GLuint)renderbuffer
2630 );
Jack Palevich27f80022009-04-15 19:13:17 -07002631}
2632
2633/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
2634static void
2635android_glFramebufferTexture2DOES__IIIII
2636 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07002637 glFramebufferTexture2DOES(
2638 (GLenum)target,
2639 (GLenum)attachment,
2640 (GLenum)textarget,
2641 (GLuint)texture,
2642 (GLint)level
2643 );
Jack Palevich27f80022009-04-15 19:13:17 -07002644}
2645
2646/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2647static void
2648android_glGetFramebufferAttachmentParameterivOES__III_3II
2649 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002650 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002651 const char * _exceptionType = NULL;
2652 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002653 GLint *params_base = (GLint *) 0;
2654 jint _remaining;
2655 GLint *params = (GLint *) 0;
2656
2657 if (!params_ref) {
2658 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002659 _exceptionType = "java/lang/IllegalArgumentException";
2660 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002661 goto exit;
2662 }
2663 if (offset < 0) {
2664 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002665 _exceptionType = "java/lang/IllegalArgumentException";
2666 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002667 goto exit;
2668 }
2669 _remaining = _env->GetArrayLength(params_ref) - offset;
2670 if (_remaining < 1) {
2671 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002672 _exceptionType = "java/lang/IllegalArgumentException";
2673 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002674 goto exit;
2675 }
2676 params_base = (GLint *)
2677 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2678 params = params_base + offset;
2679
2680 glGetFramebufferAttachmentParameterivOES(
2681 (GLenum)target,
2682 (GLenum)attachment,
2683 (GLenum)pname,
2684 (GLint *)params
2685 );
2686
2687exit:
2688 if (params_base) {
2689 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2690 _exception ? JNI_ABORT: 0);
2691 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002692 if (_exception) {
2693 jniThrowException(_env, _exceptionType, _exceptionMessage);
2694 }
Jack Palevich27f80022009-04-15 19:13:17 -07002695}
2696
2697/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2698static void
2699android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
2700 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002701 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002702 const char * _exceptionType = NULL;
2703 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002704 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002705 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002706 jint _remaining;
2707 GLint *params = (GLint *) 0;
2708
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002709 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002710 if (_remaining < 1) {
2711 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002712 _exceptionType = "java/lang/IllegalArgumentException";
2713 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002714 goto exit;
2715 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002716 if (params == NULL) {
2717 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2718 params = (GLint *) (_paramsBase + _bufferOffset);
2719 }
Jack Palevich73108672011-03-28 14:49:12 -07002720 glGetFramebufferAttachmentParameterivOES(
2721 (GLenum)target,
2722 (GLenum)attachment,
2723 (GLenum)pname,
2724 (GLint *)params
2725 );
2726
2727exit:
2728 if (_array) {
2729 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2730 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002731 if (_exception) {
2732 jniThrowException(_env, _exceptionType, _exceptionMessage);
2733 }
Jack Palevich27f80022009-04-15 19:13:17 -07002734}
2735
2736/* void glGenerateMipmapOES ( GLenum target ) */
2737static void
2738android_glGenerateMipmapOES__I
2739 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002740 glGenerateMipmapOES(
2741 (GLenum)target
2742 );
Jack Palevich27f80022009-04-15 19:13:17 -07002743}
2744
2745/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
2746static void
2747android_glCurrentPaletteMatrixOES__I
2748 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002749 glCurrentPaletteMatrixOES(
2750 (GLuint)matrixpaletteindex
2751 );
Jack Palevich27f80022009-04-15 19:13:17 -07002752}
2753
2754/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
2755static void
2756android_glLoadPaletteFromModelViewMatrixOES__
2757 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002758 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07002759}
2760
2761/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2762static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002763android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
2764 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2765 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002766 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002767 jint _remaining;
2768 GLvoid *pointer = (GLvoid *) 0;
2769
2770 if (pointer_buf) {
2771 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2772 if ( ! pointer ) {
2773 return;
2774 }
2775 }
2776 glMatrixIndexPointerOESBounds(
2777 (GLint)size,
2778 (GLenum)type,
2779 (GLsizei)stride,
2780 (GLvoid *)pointer,
2781 (GLsizei)remaining
2782 );
Jack Palevich27f80022009-04-15 19:13:17 -07002783}
2784
2785/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2786static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002787android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
2788 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2789 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002790 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002791 jint _remaining;
2792 GLvoid *pointer = (GLvoid *) 0;
2793
2794 if (pointer_buf) {
2795 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2796 if ( ! pointer ) {
2797 return;
2798 }
2799 }
2800 glWeightPointerOESBounds(
2801 (GLint)size,
2802 (GLenum)type,
2803 (GLsizei)stride,
2804 (GLvoid *)pointer,
2805 (GLsizei)remaining
2806 );
Jack Palevich27f80022009-04-15 19:13:17 -07002807}
2808
2809/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
2810static void
2811android_glDepthRangefOES__FF
2812 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002813 glDepthRangefOES(
2814 (GLclampf)zNear,
2815 (GLclampf)zFar
2816 );
Jack Palevich27f80022009-04-15 19:13:17 -07002817}
2818
2819/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2820static void
2821android_glFrustumfOES__FFFFFF
2822 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002823 glFrustumfOES(
2824 (GLfloat)left,
2825 (GLfloat)right,
2826 (GLfloat)bottom,
2827 (GLfloat)top,
2828 (GLfloat)zNear,
2829 (GLfloat)zFar
2830 );
Jack Palevich27f80022009-04-15 19:13:17 -07002831}
2832
2833/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2834static void
2835android_glOrthofOES__FFFFFF
2836 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002837 glOrthofOES(
2838 (GLfloat)left,
2839 (GLfloat)right,
2840 (GLfloat)bottom,
2841 (GLfloat)top,
2842 (GLfloat)zNear,
2843 (GLfloat)zFar
2844 );
Jack Palevich27f80022009-04-15 19:13:17 -07002845}
2846
2847/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2848static void
2849android_glClipPlanefOES__I_3FI
2850 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002851 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002852 const char * _exceptionType = NULL;
2853 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002854 GLfloat *equation_base = (GLfloat *) 0;
2855 jint _remaining;
2856 GLfloat *equation = (GLfloat *) 0;
2857
2858 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002859 _exception = 1;
2860 _exceptionType = "java/lang/IllegalArgumentException";
2861 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002862 goto exit;
2863 }
2864 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002865 _exception = 1;
2866 _exceptionType = "java/lang/IllegalArgumentException";
2867 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002868 goto exit;
2869 }
2870 _remaining = _env->GetArrayLength(equation_ref) - offset;
2871 equation_base = (GLfloat *)
2872 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
2873 equation = equation_base + offset;
2874
2875 glClipPlanefOES(
2876 (GLenum)plane,
2877 (GLfloat *)equation
2878 );
2879
2880exit:
2881 if (equation_base) {
2882 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
2883 JNI_ABORT);
2884 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002885 if (_exception) {
2886 jniThrowException(_env, _exceptionType, _exceptionMessage);
2887 }
Jack Palevich27f80022009-04-15 19:13:17 -07002888}
2889
2890/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2891static void
2892android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
2893 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002894 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002895 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002896 jint _remaining;
2897 GLfloat *equation = (GLfloat *) 0;
2898
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002899 equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
2900 if (equation == NULL) {
2901 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2902 equation = (GLfloat *) (_equationBase + _bufferOffset);
2903 }
Jack Palevicha3795852009-04-24 10:35:11 -07002904 glClipPlanefOES(
2905 (GLenum)plane,
2906 (GLfloat *)equation
2907 );
2908 if (_array) {
2909 releasePointer(_env, _array, equation, JNI_FALSE);
2910 }
Jack Palevich27f80022009-04-15 19:13:17 -07002911}
2912
2913/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2914static void
2915android_glGetClipPlanefOES__I_3FI
2916 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002917 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002918 const char * _exceptionType = NULL;
2919 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002920 GLfloat *eqn_base = (GLfloat *) 0;
2921 jint _remaining;
2922 GLfloat *eqn = (GLfloat *) 0;
2923
2924 if (!eqn_ref) {
2925 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002926 _exceptionType = "java/lang/IllegalArgumentException";
2927 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002928 goto exit;
2929 }
2930 if (offset < 0) {
2931 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002932 _exceptionType = "java/lang/IllegalArgumentException";
2933 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002934 goto exit;
2935 }
2936 _remaining = _env->GetArrayLength(eqn_ref) - offset;
2937 if (_remaining < 4) {
2938 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002939 _exceptionType = "java/lang/IllegalArgumentException";
2940 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002941 goto exit;
2942 }
2943 eqn_base = (GLfloat *)
2944 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
2945 eqn = eqn_base + offset;
2946
2947 glGetClipPlanefOES(
2948 (GLenum)pname,
2949 (GLfloat *)eqn
2950 );
2951
2952exit:
2953 if (eqn_base) {
2954 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
2955 _exception ? JNI_ABORT: 0);
2956 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002957 if (_exception) {
2958 jniThrowException(_env, _exceptionType, _exceptionMessage);
2959 }
Jack Palevich27f80022009-04-15 19:13:17 -07002960}
2961
2962/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2963static void
2964android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
2965 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002966 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08002967 const char * _exceptionType = NULL;
2968 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002969 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002970 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002971 jint _remaining;
2972 GLfloat *eqn = (GLfloat *) 0;
2973
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002974 eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07002975 if (_remaining < 4) {
2976 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002977 _exceptionType = "java/lang/IllegalArgumentException";
2978 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002979 goto exit;
2980 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002981 if (eqn == NULL) {
2982 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2983 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
2984 }
Jack Palevicha3795852009-04-24 10:35:11 -07002985 glGetClipPlanefOES(
2986 (GLenum)pname,
2987 (GLfloat *)eqn
2988 );
2989
2990exit:
2991 if (_array) {
2992 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
2993 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002994 if (_exception) {
2995 jniThrowException(_env, _exceptionType, _exceptionMessage);
2996 }
Jack Palevich27f80022009-04-15 19:13:17 -07002997}
2998
2999/* void glClearDepthfOES ( GLclampf depth ) */
3000static void
3001android_glClearDepthfOES__F
3002 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07003003 glClearDepthfOES(
3004 (GLclampf)depth
3005 );
Jack Palevich27f80022009-04-15 19:13:17 -07003006}
3007
3008/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3009static void
3010android_glTexGenfOES__IIF
3011 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003012 glTexGenfOES(
3013 (GLenum)coord,
3014 (GLenum)pname,
3015 (GLfloat)param
3016 );
Jack Palevich27f80022009-04-15 19:13:17 -07003017}
3018
3019/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3020static void
3021android_glTexGenfvOES__II_3FI
3022 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003023 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08003024 const char * _exceptionType = NULL;
3025 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003026 GLfloat *params_base = (GLfloat *) 0;
3027 jint _remaining;
3028 GLfloat *params = (GLfloat *) 0;
3029
3030 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003031 _exception = 1;
3032 _exceptionType = "java/lang/IllegalArgumentException";
3033 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003034 goto exit;
3035 }
3036 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003037 _exception = 1;
3038 _exceptionType = "java/lang/IllegalArgumentException";
3039 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003040 goto exit;
3041 }
3042 _remaining = _env->GetArrayLength(params_ref) - offset;
3043 params_base = (GLfloat *)
3044 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3045 params = params_base + offset;
3046
3047 glTexGenfvOES(
3048 (GLenum)coord,
3049 (GLenum)pname,
3050 (GLfloat *)params
3051 );
3052
3053exit:
3054 if (params_base) {
3055 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3056 JNI_ABORT);
3057 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003058 if (_exception) {
3059 jniThrowException(_env, _exceptionType, _exceptionMessage);
3060 }
Jack Palevich27f80022009-04-15 19:13:17 -07003061}
3062
3063/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3064static void
3065android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3066 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003067 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003068 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003069 jint _remaining;
3070 GLfloat *params = (GLfloat *) 0;
3071
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003072 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3073 if (params == NULL) {
3074 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3075 params = (GLfloat *) (_paramsBase + _bufferOffset);
3076 }
Jack Palevicha3795852009-04-24 10:35:11 -07003077 glTexGenfvOES(
3078 (GLenum)coord,
3079 (GLenum)pname,
3080 (GLfloat *)params
3081 );
3082 if (_array) {
3083 releasePointer(_env, _array, params, JNI_FALSE);
3084 }
Jack Palevich27f80022009-04-15 19:13:17 -07003085}
3086
3087/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3088static void
3089android_glTexGeniOES__III
3090 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003091 glTexGeniOES(
3092 (GLenum)coord,
3093 (GLenum)pname,
3094 (GLint)param
3095 );
Jack Palevich27f80022009-04-15 19:13:17 -07003096}
3097
3098/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3099static void
3100android_glTexGenivOES__II_3II
3101 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003102 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08003103 const char * _exceptionType = NULL;
3104 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003105 GLint *params_base = (GLint *) 0;
3106 jint _remaining;
3107 GLint *params = (GLint *) 0;
3108
3109 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003110 _exception = 1;
3111 _exceptionType = "java/lang/IllegalArgumentException";
3112 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003113 goto exit;
3114 }
3115 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003116 _exception = 1;
3117 _exceptionType = "java/lang/IllegalArgumentException";
3118 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003119 goto exit;
3120 }
3121 _remaining = _env->GetArrayLength(params_ref) - offset;
3122 params_base = (GLint *)
3123 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3124 params = params_base + offset;
3125
3126 glTexGenivOES(
3127 (GLenum)coord,
3128 (GLenum)pname,
3129 (GLint *)params
3130 );
3131
3132exit:
3133 if (params_base) {
3134 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3135 JNI_ABORT);
3136 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003137 if (_exception) {
3138 jniThrowException(_env, _exceptionType, _exceptionMessage);
3139 }
Jack Palevich27f80022009-04-15 19:13:17 -07003140}
3141
3142/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3143static void
3144android_glTexGenivOES__IILjava_nio_IntBuffer_2
3145 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003146 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003147 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003148 jint _remaining;
3149 GLint *params = (GLint *) 0;
3150
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003151 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3152 if (params == NULL) {
3153 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3154 params = (GLint *) (_paramsBase + _bufferOffset);
3155 }
Jack Palevicha3795852009-04-24 10:35:11 -07003156 glTexGenivOES(
3157 (GLenum)coord,
3158 (GLenum)pname,
3159 (GLint *)params
3160 );
3161 if (_array) {
3162 releasePointer(_env, _array, params, JNI_FALSE);
3163 }
Jack Palevich27f80022009-04-15 19:13:17 -07003164}
3165
3166/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3167static void
3168android_glTexGenxOES__III
3169 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003170 glTexGenxOES(
3171 (GLenum)coord,
3172 (GLenum)pname,
3173 (GLfixed)param
3174 );
Jack Palevich27f80022009-04-15 19:13:17 -07003175}
3176
3177/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3178static void
3179android_glTexGenxvOES__II_3II
3180 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003181 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08003182 const char * _exceptionType = NULL;
3183 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003184 GLfixed *params_base = (GLfixed *) 0;
3185 jint _remaining;
3186 GLfixed *params = (GLfixed *) 0;
3187
3188 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003189 _exception = 1;
3190 _exceptionType = "java/lang/IllegalArgumentException";
3191 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003192 goto exit;
3193 }
3194 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003195 _exception = 1;
3196 _exceptionType = "java/lang/IllegalArgumentException";
3197 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003198 goto exit;
3199 }
3200 _remaining = _env->GetArrayLength(params_ref) - offset;
3201 params_base = (GLfixed *)
3202 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3203 params = params_base + offset;
3204
3205 glTexGenxvOES(
3206 (GLenum)coord,
3207 (GLenum)pname,
3208 (GLfixed *)params
3209 );
3210
3211exit:
3212 if (params_base) {
3213 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3214 JNI_ABORT);
3215 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003216 if (_exception) {
3217 jniThrowException(_env, _exceptionType, _exceptionMessage);
3218 }
Jack Palevich27f80022009-04-15 19:13:17 -07003219}
3220
3221/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3222static void
3223android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3224 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003225 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003226 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003227 jint _remaining;
3228 GLfixed *params = (GLfixed *) 0;
3229
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003230 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3231 if (params == NULL) {
3232 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3233 params = (GLfixed *) (_paramsBase + _bufferOffset);
3234 }
Jack Palevicha3795852009-04-24 10:35:11 -07003235 glTexGenxvOES(
3236 (GLenum)coord,
3237 (GLenum)pname,
3238 (GLfixed *)params
3239 );
3240 if (_array) {
3241 releasePointer(_env, _array, params, JNI_FALSE);
3242 }
Jack Palevich27f80022009-04-15 19:13:17 -07003243}
3244
3245/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3246static void
3247android_glGetTexGenfvOES__II_3FI
3248 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003249 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08003250 const char * _exceptionType = NULL;
3251 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003252 GLfloat *params_base = (GLfloat *) 0;
3253 jint _remaining;
3254 GLfloat *params = (GLfloat *) 0;
3255
3256 if (!params_ref) {
3257 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003258 _exceptionType = "java/lang/IllegalArgumentException";
3259 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003260 goto exit;
3261 }
3262 if (offset < 0) {
3263 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003264 _exceptionType = "java/lang/IllegalArgumentException";
3265 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003266 goto exit;
3267 }
3268 _remaining = _env->GetArrayLength(params_ref) - offset;
3269 params_base = (GLfloat *)
3270 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3271 params = params_base + offset;
3272
3273 glGetTexGenfvOES(
3274 (GLenum)coord,
3275 (GLenum)pname,
3276 (GLfloat *)params
3277 );
3278
3279exit:
3280 if (params_base) {
3281 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3282 _exception ? JNI_ABORT: 0);
3283 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003284 if (_exception) {
3285 jniThrowException(_env, _exceptionType, _exceptionMessage);
3286 }
Jack Palevich27f80022009-04-15 19:13:17 -07003287}
3288
3289/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3290static void
3291android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3292 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003293 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003294 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003295 jint _remaining;
3296 GLfloat *params = (GLfloat *) 0;
3297
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003298 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3299 if (params == NULL) {
3300 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3301 params = (GLfloat *) (_paramsBase + _bufferOffset);
3302 }
Jack Palevicha3795852009-04-24 10:35:11 -07003303 glGetTexGenfvOES(
3304 (GLenum)coord,
3305 (GLenum)pname,
3306 (GLfloat *)params
3307 );
3308 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003309 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003310 }
Jack Palevich27f80022009-04-15 19:13:17 -07003311}
3312
3313/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3314static void
3315android_glGetTexGenivOES__II_3II
3316 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003317 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08003318 const char * _exceptionType = NULL;
3319 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003320 GLint *params_base = (GLint *) 0;
3321 jint _remaining;
3322 GLint *params = (GLint *) 0;
3323
3324 if (!params_ref) {
3325 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003326 _exceptionType = "java/lang/IllegalArgumentException";
3327 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003328 goto exit;
3329 }
3330 if (offset < 0) {
3331 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003332 _exceptionType = "java/lang/IllegalArgumentException";
3333 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003334 goto exit;
3335 }
3336 _remaining = _env->GetArrayLength(params_ref) - offset;
3337 params_base = (GLint *)
3338 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3339 params = params_base + offset;
3340
3341 glGetTexGenivOES(
3342 (GLenum)coord,
3343 (GLenum)pname,
3344 (GLint *)params
3345 );
3346
3347exit:
3348 if (params_base) {
3349 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3350 _exception ? JNI_ABORT: 0);
3351 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003352 if (_exception) {
3353 jniThrowException(_env, _exceptionType, _exceptionMessage);
3354 }
Jack Palevich27f80022009-04-15 19:13:17 -07003355}
3356
3357/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3358static void
3359android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3360 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003361 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003362 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003363 jint _remaining;
3364 GLint *params = (GLint *) 0;
3365
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003366 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3367 if (params == NULL) {
3368 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3369 params = (GLint *) (_paramsBase + _bufferOffset);
3370 }
Jack Palevicha3795852009-04-24 10:35:11 -07003371 glGetTexGenivOES(
3372 (GLenum)coord,
3373 (GLenum)pname,
3374 (GLint *)params
3375 );
3376 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003377 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003378 }
Jack Palevich27f80022009-04-15 19:13:17 -07003379}
3380
3381/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3382static void
3383android_glGetTexGenxvOES__II_3II
3384 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003385 jint _exception = 0;
Mathias Agopian15284de2013-02-23 03:12:30 -08003386 const char * _exceptionType = NULL;
3387 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003388 GLfixed *params_base = (GLfixed *) 0;
3389 jint _remaining;
3390 GLfixed *params = (GLfixed *) 0;
3391
3392 if (!params_ref) {
3393 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003394 _exceptionType = "java/lang/IllegalArgumentException";
3395 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003396 goto exit;
3397 }
3398 if (offset < 0) {
3399 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003400 _exceptionType = "java/lang/IllegalArgumentException";
3401 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003402 goto exit;
3403 }
3404 _remaining = _env->GetArrayLength(params_ref) - offset;
3405 params_base = (GLfixed *)
3406 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3407 params = params_base + offset;
3408
3409 glGetTexGenxvOES(
3410 (GLenum)coord,
3411 (GLenum)pname,
3412 (GLfixed *)params
3413 );
3414
3415exit:
3416 if (params_base) {
3417 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3418 _exception ? JNI_ABORT: 0);
3419 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003420 if (_exception) {
3421 jniThrowException(_env, _exceptionType, _exceptionMessage);
3422 }
Jack Palevich27f80022009-04-15 19:13:17 -07003423}
3424
3425/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3426static void
3427android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3428 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003429 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003430 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003431 jint _remaining;
3432 GLfixed *params = (GLfixed *) 0;
3433
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003434 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3435 if (params == NULL) {
3436 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3437 params = (GLfixed *) (_paramsBase + _bufferOffset);
3438 }
Jack Palevicha3795852009-04-24 10:35:11 -07003439 glGetTexGenxvOES(
3440 (GLenum)coord,
3441 (GLenum)pname,
3442 (GLfixed *)params
3443 );
3444 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003445 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003446 }
Jack Palevich27f80022009-04-15 19:13:17 -07003447}
3448
3449static const char *classPathName = "android/opengl/GLES11Ext";
3450
3451static JNINativeMethod methods[] = {
3452{"_nativeClassInit", "()V", (void*)nativeClassInit },
3453{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
3454{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
3455{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
3456{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
3457{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
3458{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
3459{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
3460{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
3461{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
3462{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
3463{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
3464{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
3465{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
3466{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
3467{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
3468{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
3469{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
3470{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
3471{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
3472{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
3473{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
3474{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
3475{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
3476{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
3477{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
3478{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
3479{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
3480{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
3481{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
3482{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
3483{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
3484{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
3485{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
3486{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
3487{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
3488{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
3489{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
3490{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3491{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
3492{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3493{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
3494{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
3495{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
3496{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
3497{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
3498{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
3499{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
3500{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
3501{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
3502{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
3503{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
3504{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
3505{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
3506{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
3507{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
3508{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
3509{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
3510{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
3511{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
3512{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
3513{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
3514{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
3515{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
3516{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
3517{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
3518{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
3519{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
3520{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3521{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
3522{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
3523{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3524{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
3525{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
3526{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
3527{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
3528{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3529{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
3530{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3531{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
3532{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
3533{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
3534{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
3535{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
3536{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
3537{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
3538{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
3539{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
3540{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
3541{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
3542{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
3543{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
3544{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
3545{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
3546{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
3547{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08003548{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
3549{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07003550{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
3551{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
3552{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
3553{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
3554{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3555{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
3556{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3557{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
3558{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
3559{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
3560{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3561{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
3562{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
3563{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
3564{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
3565{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
3566{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
3567{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
3568{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3569{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
3570{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
3571{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
3572{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
3573};
3574
3575int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
3576{
3577 int err;
3578 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3579 return err;
3580}