blob: 21e5670f75aae842d90b5a12ffbc2d2eafaf5206 [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
Andreas Gampebfe63332014-11-12 14:12:45 -080020#pragma GCC diagnostic ignored "-Wunused-variable"
21#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
22#pragma GCC diagnostic ignored "-Wunused-function"
23
Mathias Agopian2ad04772013-02-23 03:12:30 -080024#include <GLES/gl.h>
25#include <GLES/glext.h>
26
Jesse Hall9626f822014-05-19 20:57:49 -070027#include <jni.h>
28#include <JNIHelp.h>
Jack Palevich27f80022009-04-15 19:13:17 -070029#include <android_runtime/AndroidRuntime.h>
30#include <utils/misc.h>
Jack Palevich27f80022009-04-15 19:13:17 -070031#include <assert.h>
Jack Palevichbe6eac82009-12-08 15:43:51 +080032
Jack Palevich27f80022009-04-15 19:13:17 -070033static int initialized = 0;
34
35static jclass nioAccessClass;
36static jclass bufferClass;
Jack Palevich27f80022009-04-15 19:13:17 -070037static jmethodID getBasePointerID;
38static jmethodID getBaseArrayID;
39static jmethodID getBaseArrayOffsetID;
40static jfieldID positionID;
41static jfieldID limitID;
42static jfieldID elementSizeShiftID;
43
Mathias Agopian2ad04772013-02-23 03:12:30 -080044
45/* special calls implemented in Android's GLES wrapper used to more
46 * efficiently bound-check passed arrays */
47extern "C" {
48#ifdef GL_VERSION_ES_CM_1_1
49GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
50 const GLvoid *ptr, GLsizei count);
51GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
52 const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
61GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
62 GLsizei stride, const GLvoid *pointer, GLsizei count);
63#endif
64#ifdef GL_ES_VERSION_2_0
65static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
66 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
67 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
68}
69#endif
Andy McFaddencee51982013-04-25 16:08:31 -070070#ifdef GL_ES_VERSION_3_0
71static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
72 GLsizei stride, const GLvoid *pointer, GLsizei count) {
73 glVertexAttribIPointer(indx, size, type, stride, pointer);
74}
75#endif
Mathias Agopian2ad04772013-02-23 03:12:30 -080076}
77
Jack Palevich27f80022009-04-15 19:13:17 -070078/* Cache method IDs each time the class is loaded. */
79
80static void
Elliott Hughes24ce5fb2011-04-08 20:01:01 -070081nativeClassInit(JNIEnv *_env, jclass glImplClass)
Jack Palevich27f80022009-04-15 19:13:17 -070082{
83 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
84 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
85
86 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
87 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
88
89 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
90 "getBasePointer", "(Ljava/nio/Buffer;)J");
91 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
93 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
94 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
95
96 positionID = _env->GetFieldID(bufferClass, "position", "I");
97 limitID = _env->GetFieldID(bufferClass, "limit", "I");
98 elementSizeShiftID =
99 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
100}
101
Jack Palevich27f80022009-04-15 19:13:17 -0700102static void *
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700103getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
Jack Palevich27f80022009-04-15 19:13:17 -0700104{
105 jint position;
106 jint limit;
107 jint elementSizeShift;
108 jlong pointer;
Jack Palevich27f80022009-04-15 19:13:17 -0700109
110 position = _env->GetIntField(buffer, positionID);
111 limit = _env->GetIntField(buffer, limitID);
112 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
113 *remaining = (limit - position) << elementSizeShift;
114 pointer = _env->CallStaticLongMethod(nioAccessClass,
115 getBasePointerID, buffer);
116 if (pointer != 0L) {
117 *array = NULL;
Ashok Bhat01c26ea2014-02-24 09:49:07 +0000118 return reinterpret_cast<void*>(pointer);
Jack Palevich27f80022009-04-15 19:13:17 -0700119 }
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700120
Jack Palevich27f80022009-04-15 19:13:17 -0700121 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
122 getBaseArrayID, buffer);
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700123 *offset = _env->CallStaticIntMethod(nioAccessClass,
Jack Palevich27f80022009-04-15 19:13:17 -0700124 getBaseArrayOffsetID, buffer);
Mathias Agopian2ad04772013-02-23 03:12:30 -0800125
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700126 return NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700127}
128
Jack Palevich27f80022009-04-15 19:13:17 -0700129static void
130releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
131{
132 _env->ReleasePrimitiveArrayCritical(array, data,
Mathias Agopian2ad04772013-02-23 03:12:30 -0800133 commit ? 0 : JNI_ABORT);
Jack Palevich27f80022009-04-15 19:13:17 -0700134}
135
Jack Palevichbe6eac82009-12-08 15:43:51 +0800136static void *
137getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
138 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
139 if (buf) {
140 jint position = _env->GetIntField(buffer, positionID);
141 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
142 buf += position << elementSizeShift;
143 } else {
Elliott Hughes24ce5fb2011-04-08 20:01:01 -0700144 jniThrowException(_env, "java/lang/IllegalArgumentException",
145 "Must use a native order direct Buffer");
Jack Palevichbe6eac82009-12-08 15:43:51 +0800146 }
147 return (void*) buf;
148}
Mathias Agopian2ad04772013-02-23 03:12:30 -0800149
150// --------------------------------------------------------------------------
151
152/*
153 * returns the number of values glGet returns for a given pname.
154 *
155 * The code below is written such that pnames requiring only one values
156 * are the default (and are not explicitely tested for). This makes the
157 * checking code much shorter/readable/efficient.
158 *
159 * This means that unknown pnames (e.g.: extensions) will default to 1. If
160 * that unknown pname needs more than 1 value, then the validation check
161 * is incomplete and the app may crash if it passed the wrong number params.
162 */
163static int getNeededCount(GLint pname) {
164 int needed = 1;
165#ifdef GL_ES_VERSION_2_0
166 // GLES 2.x pnames
167 switch (pname) {
168 case GL_ALIASED_LINE_WIDTH_RANGE:
169 case GL_ALIASED_POINT_SIZE_RANGE:
170 needed = 2;
171 break;
172
173 case GL_BLEND_COLOR:
174 case GL_COLOR_CLEAR_VALUE:
175 case GL_COLOR_WRITEMASK:
176 case GL_SCISSOR_BOX:
177 case GL_VIEWPORT:
178 needed = 4;
179 break;
180
181 case GL_COMPRESSED_TEXTURE_FORMATS:
182 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
183 break;
184
185 case GL_SHADER_BINARY_FORMATS:
186 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
187 break;
188 }
189#endif
190
191#ifdef GL_VERSION_ES_CM_1_1
192 // GLES 1.x pnames
193 switch (pname) {
194 case GL_ALIASED_LINE_WIDTH_RANGE:
195 case GL_ALIASED_POINT_SIZE_RANGE:
196 case GL_DEPTH_RANGE:
197 case GL_SMOOTH_LINE_WIDTH_RANGE:
198 case GL_SMOOTH_POINT_SIZE_RANGE:
199 needed = 2;
200 break;
201
202 case GL_CURRENT_NORMAL:
203 case GL_POINT_DISTANCE_ATTENUATION:
204 needed = 3;
205 break;
206
207 case GL_COLOR_CLEAR_VALUE:
208 case GL_COLOR_WRITEMASK:
209 case GL_CURRENT_COLOR:
210 case GL_CURRENT_TEXTURE_COORDS:
211 case GL_FOG_COLOR:
212 case GL_LIGHT_MODEL_AMBIENT:
213 case GL_SCISSOR_BOX:
214 case GL_VIEWPORT:
215 needed = 4;
216 break;
217
218 case GL_MODELVIEW_MATRIX:
219 case GL_PROJECTION_MATRIX:
220 case GL_TEXTURE_MATRIX:
221 needed = 16;
222 break;
223
224 case GL_COMPRESSED_TEXTURE_FORMATS:
225 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
226 break;
227 }
228#endif
229 return needed;
230}
231
232template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
233static void
234get
235 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
236 jint _exception = 0;
237 const char * _exceptionType;
238 const char * _exceptionMessage;
239 CTYPE *params_base = (CTYPE *) 0;
240 jint _remaining;
241 CTYPE *params = (CTYPE *) 0;
242 int _needed = 0;
243
244 if (!params_ref) {
245 _exception = 1;
246 _exceptionType = "java/lang/IllegalArgumentException";
247 _exceptionMessage = "params == null";
248 goto exit;
249 }
250 if (offset < 0) {
251 _exception = 1;
252 _exceptionType = "java/lang/IllegalArgumentException";
253 _exceptionMessage = "offset < 0";
254 goto exit;
255 }
256 _remaining = _env->GetArrayLength(params_ref) - offset;
257 _needed = getNeededCount(pname);
258 // if we didn't find this pname, we just assume the user passed
259 // an array of the right size -- this might happen with extensions
260 // or if we forget an enum here.
261 if (_remaining < _needed) {
262 _exception = 1;
263 _exceptionType = "java/lang/IllegalArgumentException";
264 _exceptionMessage = "length - offset < needed";
265 goto exit;
266 }
267 params_base = (CTYPE *)
268 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
269 params = params_base + offset;
270
271 GET(
272 (GLenum)pname,
273 (CTYPE *)params
274 );
275
276exit:
277 if (params_base) {
278 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
279 _exception ? JNI_ABORT: 0);
280 }
281 if (_exception) {
282 jniThrowException(_env, _exceptionType, _exceptionMessage);
283 }
284}
285
286
287template <typename CTYPE, void GET(GLenum, CTYPE*)>
288static void
289getarray
290 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
291 jint _exception = 0;
292 const char * _exceptionType;
293 const char * _exceptionMessage;
294 jarray _array = (jarray) 0;
295 jint _bufferOffset = (jint) 0;
296 jint _remaining;
297 CTYPE *params = (CTYPE *) 0;
298 int _needed = 0;
299
300 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Andy McFaddencee51982013-04-25 16:08:31 -0700301 _remaining /= sizeof(CTYPE); // convert from bytes to item count
Mathias Agopian2ad04772013-02-23 03:12:30 -0800302 _needed = getNeededCount(pname);
303 // if we didn't find this pname, we just assume the user passed
304 // an array of the right size -- this might happen with extensions
305 // or if we forget an enum here.
306 if (_needed>0 && _remaining < _needed) {
307 _exception = 1;
308 _exceptionType = "java/lang/IllegalArgumentException";
309 _exceptionMessage = "remaining() < needed";
310 goto exit;
311 }
312 if (params == NULL) {
313 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
314 params = (CTYPE *) (_paramsBase + _bufferOffset);
315 }
316 GET(
317 (GLenum)pname,
318 (CTYPE *)params
319 );
320
321exit:
322 if (_array) {
323 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
324 }
325 if (_exception) {
326 jniThrowException(_env, _exceptionType, _exceptionMessage);
327 }
328}
329
Jack Palevich27f80022009-04-15 19:13:17 -0700330// --------------------------------------------------------------------------
Jack Palevich27f80022009-04-15 19:13:17 -0700331/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
332static void
333android_glBlendEquationSeparateOES__II
334 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700335 glBlendEquationSeparateOES(
336 (GLenum)modeRGB,
337 (GLenum)modeAlpha
338 );
Jack Palevich27f80022009-04-15 19:13:17 -0700339}
340
341/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
342static void
343android_glBlendFuncSeparateOES__IIII
344 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700345 glBlendFuncSeparateOES(
346 (GLenum)srcRGB,
347 (GLenum)dstRGB,
348 (GLenum)srcAlpha,
349 (GLenum)dstAlpha
350 );
Jack Palevich27f80022009-04-15 19:13:17 -0700351}
352
353/* void glBlendEquationOES ( GLenum mode ) */
354static void
355android_glBlendEquationOES__I
356 (JNIEnv *_env, jobject _this, jint mode) {
Jack Palevicha3795852009-04-24 10:35:11 -0700357 glBlendEquationOES(
358 (GLenum)mode
359 );
Jack Palevich27f80022009-04-15 19:13:17 -0700360}
361
362/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
363static void
364android_glDrawTexsOES__SSSSS
365 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
366 glDrawTexsOES(
367 (GLshort)x,
368 (GLshort)y,
369 (GLshort)z,
370 (GLshort)width,
371 (GLshort)height
372 );
373}
374
375/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
376static void
377android_glDrawTexiOES__IIIII
378 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
379 glDrawTexiOES(
380 (GLint)x,
381 (GLint)y,
382 (GLint)z,
383 (GLint)width,
384 (GLint)height
385 );
386}
387
388/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
389static void
390android_glDrawTexxOES__IIIII
391 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
392 glDrawTexxOES(
393 (GLfixed)x,
394 (GLfixed)y,
395 (GLfixed)z,
396 (GLfixed)width,
397 (GLfixed)height
398 );
399}
400
401/* void glDrawTexsvOES ( const GLshort *coords ) */
402static void
403android_glDrawTexsvOES___3SI
404 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700405 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800406 const char * _exceptionType = NULL;
407 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700408 GLshort *coords_base = (GLshort *) 0;
409 jint _remaining;
410 GLshort *coords = (GLshort *) 0;
411
412 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700413 _exception = 1;
414 _exceptionType = "java/lang/IllegalArgumentException";
415 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700416 goto exit;
417 }
418 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700419 _exception = 1;
420 _exceptionType = "java/lang/IllegalArgumentException";
421 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700422 goto exit;
423 }
424 _remaining = _env->GetArrayLength(coords_ref) - offset;
425 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700426 _exception = 1;
427 _exceptionType = "java/lang/IllegalArgumentException";
428 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700429 goto exit;
430 }
431 coords_base = (GLshort *)
432 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
433 coords = coords_base + offset;
434
435 glDrawTexsvOES(
436 (GLshort *)coords
437 );
438
439exit:
440 if (coords_base) {
441 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
442 JNI_ABORT);
443 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700444 if (_exception) {
445 jniThrowException(_env, _exceptionType, _exceptionMessage);
446 }
Jack Palevich27f80022009-04-15 19:13:17 -0700447}
448
449/* void glDrawTexsvOES ( const GLshort *coords ) */
450static void
451android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
452 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700453 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800454 const char * _exceptionType = NULL;
455 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700456 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700457 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700458 jint _remaining;
459 GLshort *coords = (GLshort *) 0;
460
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700461 coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700462 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700463 _exception = 1;
464 _exceptionType = "java/lang/IllegalArgumentException";
465 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700466 goto exit;
467 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700468 if (coords == NULL) {
469 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
470 coords = (GLshort *) (_coordsBase + _bufferOffset);
471 }
Jack Palevich27f80022009-04-15 19:13:17 -0700472 glDrawTexsvOES(
473 (GLshort *)coords
474 );
475
476exit:
477 if (_array) {
478 releasePointer(_env, _array, coords, JNI_FALSE);
479 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700480 if (_exception) {
481 jniThrowException(_env, _exceptionType, _exceptionMessage);
482 }
Jack Palevich27f80022009-04-15 19:13:17 -0700483}
484
485/* void glDrawTexivOES ( const GLint *coords ) */
486static void
487android_glDrawTexivOES___3II
488 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700489 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800490 const char * _exceptionType = NULL;
491 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700492 GLint *coords_base = (GLint *) 0;
493 jint _remaining;
494 GLint *coords = (GLint *) 0;
495
496 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700497 _exception = 1;
498 _exceptionType = "java/lang/IllegalArgumentException";
499 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700500 goto exit;
501 }
502 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700503 _exception = 1;
504 _exceptionType = "java/lang/IllegalArgumentException";
505 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700506 goto exit;
507 }
508 _remaining = _env->GetArrayLength(coords_ref) - offset;
509 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700510 _exception = 1;
511 _exceptionType = "java/lang/IllegalArgumentException";
512 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700513 goto exit;
514 }
515 coords_base = (GLint *)
516 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
517 coords = coords_base + offset;
518
519 glDrawTexivOES(
520 (GLint *)coords
521 );
522
523exit:
524 if (coords_base) {
525 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
526 JNI_ABORT);
527 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700528 if (_exception) {
529 jniThrowException(_env, _exceptionType, _exceptionMessage);
530 }
Jack Palevich27f80022009-04-15 19:13:17 -0700531}
532
533/* void glDrawTexivOES ( const GLint *coords ) */
534static void
535android_glDrawTexivOES__Ljava_nio_IntBuffer_2
536 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700537 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800538 const char * _exceptionType = NULL;
539 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700540 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700541 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700542 jint _remaining;
543 GLint *coords = (GLint *) 0;
544
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700545 coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700546 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700547 _exception = 1;
548 _exceptionType = "java/lang/IllegalArgumentException";
549 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700550 goto exit;
551 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700552 if (coords == NULL) {
553 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
554 coords = (GLint *) (_coordsBase + _bufferOffset);
555 }
Jack Palevich27f80022009-04-15 19:13:17 -0700556 glDrawTexivOES(
557 (GLint *)coords
558 );
559
560exit:
561 if (_array) {
562 releasePointer(_env, _array, coords, JNI_FALSE);
563 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700564 if (_exception) {
565 jniThrowException(_env, _exceptionType, _exceptionMessage);
566 }
Jack Palevich27f80022009-04-15 19:13:17 -0700567}
568
569/* void glDrawTexxvOES ( const GLfixed *coords ) */
570static void
571android_glDrawTexxvOES___3II
572 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700573 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800574 const char * _exceptionType = NULL;
575 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700576 GLfixed *coords_base = (GLfixed *) 0;
577 jint _remaining;
578 GLfixed *coords = (GLfixed *) 0;
579
580 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700581 _exception = 1;
582 _exceptionType = "java/lang/IllegalArgumentException";
583 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700584 goto exit;
585 }
586 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700587 _exception = 1;
588 _exceptionType = "java/lang/IllegalArgumentException";
589 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700590 goto exit;
591 }
592 _remaining = _env->GetArrayLength(coords_ref) - offset;
593 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700594 _exception = 1;
595 _exceptionType = "java/lang/IllegalArgumentException";
596 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700597 goto exit;
598 }
599 coords_base = (GLfixed *)
600 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
601 coords = coords_base + offset;
602
603 glDrawTexxvOES(
604 (GLfixed *)coords
605 );
606
607exit:
608 if (coords_base) {
609 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
610 JNI_ABORT);
611 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700612 if (_exception) {
613 jniThrowException(_env, _exceptionType, _exceptionMessage);
614 }
Jack Palevich27f80022009-04-15 19:13:17 -0700615}
616
617/* void glDrawTexxvOES ( const GLfixed *coords ) */
618static void
619android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
620 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700621 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800622 const char * _exceptionType = NULL;
623 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700624 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700625 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700626 jint _remaining;
627 GLfixed *coords = (GLfixed *) 0;
628
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700629 coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700630 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700631 _exception = 1;
632 _exceptionType = "java/lang/IllegalArgumentException";
633 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700634 goto exit;
635 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700636 if (coords == NULL) {
637 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
638 coords = (GLfixed *) (_coordsBase + _bufferOffset);
639 }
Jack Palevich27f80022009-04-15 19:13:17 -0700640 glDrawTexxvOES(
641 (GLfixed *)coords
642 );
643
644exit:
645 if (_array) {
646 releasePointer(_env, _array, coords, JNI_FALSE);
647 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700648 if (_exception) {
649 jniThrowException(_env, _exceptionType, _exceptionMessage);
650 }
Jack Palevich27f80022009-04-15 19:13:17 -0700651}
652
653/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
654static void
655android_glDrawTexfOES__FFFFF
656 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
657 glDrawTexfOES(
658 (GLfloat)x,
659 (GLfloat)y,
660 (GLfloat)z,
661 (GLfloat)width,
662 (GLfloat)height
663 );
664}
665
666/* void glDrawTexfvOES ( const GLfloat *coords ) */
667static void
668android_glDrawTexfvOES___3FI
669 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700670 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800671 const char * _exceptionType = NULL;
672 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700673 GLfloat *coords_base = (GLfloat *) 0;
674 jint _remaining;
675 GLfloat *coords = (GLfloat *) 0;
676
677 if (!coords_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700678 _exception = 1;
679 _exceptionType = "java/lang/IllegalArgumentException";
680 _exceptionMessage = "coords == null";
Jack Palevich27f80022009-04-15 19:13:17 -0700681 goto exit;
682 }
683 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700684 _exception = 1;
685 _exceptionType = "java/lang/IllegalArgumentException";
686 _exceptionMessage = "offset < 0";
Jack Palevich27f80022009-04-15 19:13:17 -0700687 goto exit;
688 }
689 _remaining = _env->GetArrayLength(coords_ref) - offset;
690 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700691 _exception = 1;
692 _exceptionType = "java/lang/IllegalArgumentException";
693 _exceptionMessage = "length - offset < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700694 goto exit;
695 }
696 coords_base = (GLfloat *)
697 _env->GetPrimitiveArrayCritical(coords_ref, (jboolean *)0);
698 coords = coords_base + offset;
699
700 glDrawTexfvOES(
701 (GLfloat *)coords
702 );
703
704exit:
705 if (coords_base) {
706 _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
707 JNI_ABORT);
708 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700709 if (_exception) {
710 jniThrowException(_env, _exceptionType, _exceptionMessage);
711 }
Jack Palevich27f80022009-04-15 19:13:17 -0700712}
713
714/* void glDrawTexfvOES ( const GLfloat *coords ) */
715static void
716android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
717 (JNIEnv *_env, jobject _this, jobject coords_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700718 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800719 const char * _exceptionType = NULL;
720 const char * _exceptionMessage = NULL;
Jack Palevich27f80022009-04-15 19:13:17 -0700721 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700722 jint _bufferOffset = (jint) 0;
Jack Palevich27f80022009-04-15 19:13:17 -0700723 jint _remaining;
724 GLfloat *coords = (GLfloat *) 0;
725
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700726 coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich27f80022009-04-15 19:13:17 -0700727 if (_remaining < 5) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700728 _exception = 1;
729 _exceptionType = "java/lang/IllegalArgumentException";
730 _exceptionMessage = "remaining() < 5 < needed";
Jack Palevich27f80022009-04-15 19:13:17 -0700731 goto exit;
732 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700733 if (coords == NULL) {
734 char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
735 coords = (GLfloat *) (_coordsBase + _bufferOffset);
736 }
Jack Palevich27f80022009-04-15 19:13:17 -0700737 glDrawTexfvOES(
738 (GLfloat *)coords
739 );
740
741exit:
742 if (_array) {
743 releasePointer(_env, _array, coords, JNI_FALSE);
744 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700745 if (_exception) {
746 jniThrowException(_env, _exceptionType, _exceptionMessage);
747 }
Jack Palevich27f80022009-04-15 19:13:17 -0700748}
749
750/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
751static void
752android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
753 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700754 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700755 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700756 jint _remaining;
757 GLeglImageOES image = (GLeglImageOES) 0;
758
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700759 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
760 if (image == NULL) {
761 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
762 image = (GLeglImageOES) (_imageBase + _bufferOffset);
763 }
Jack Palevicha3795852009-04-24 10:35:11 -0700764 glEGLImageTargetTexture2DOES(
765 (GLenum)target,
766 (GLeglImageOES)image
767 );
768 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700769 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700770 }
Jack Palevich27f80022009-04-15 19:13:17 -0700771}
772
773/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */
774static void
775android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
776 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700777 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700778 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700779 jint _remaining;
780 GLeglImageOES image = (GLeglImageOES) 0;
781
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700782 image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
783 if (image == NULL) {
784 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
785 image = (GLeglImageOES) (_imageBase + _bufferOffset);
786 }
Jack Palevicha3795852009-04-24 10:35:11 -0700787 glEGLImageTargetRenderbufferStorageOES(
788 (GLenum)target,
789 (GLeglImageOES)image
790 );
791 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700792 releasePointer(_env, _array, image, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -0700793 }
Jack Palevich27f80022009-04-15 19:13:17 -0700794}
795
796/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */
797static void
798android_glAlphaFuncxOES__II
799 (JNIEnv *_env, jobject _this, jint func, jint ref) {
Jack Palevicha3795852009-04-24 10:35:11 -0700800 glAlphaFuncxOES(
801 (GLenum)func,
802 (GLclampx)ref
803 );
Jack Palevich27f80022009-04-15 19:13:17 -0700804}
805
806/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
807static void
808android_glClearColorxOES__IIII
809 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700810 glClearColorxOES(
811 (GLclampx)red,
812 (GLclampx)green,
813 (GLclampx)blue,
814 (GLclampx)alpha
815 );
Jack Palevich27f80022009-04-15 19:13:17 -0700816}
817
818/* void glClearDepthxOES ( GLclampx depth ) */
819static void
820android_glClearDepthxOES__I
821 (JNIEnv *_env, jobject _this, jint depth) {
Jack Palevicha3795852009-04-24 10:35:11 -0700822 glClearDepthxOES(
823 (GLclampx)depth
824 );
Jack Palevich27f80022009-04-15 19:13:17 -0700825}
826
827/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
828static void
829android_glClipPlanexOES__I_3II
830 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700831 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800832 const char * _exceptionType = NULL;
833 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700834 GLfixed *equation_base = (GLfixed *) 0;
835 jint _remaining;
836 GLfixed *equation = (GLfixed *) 0;
837
838 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700839 _exception = 1;
840 _exceptionType = "java/lang/IllegalArgumentException";
841 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700842 goto exit;
843 }
844 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700845 _exception = 1;
846 _exceptionType = "java/lang/IllegalArgumentException";
847 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700848 goto exit;
849 }
850 _remaining = _env->GetArrayLength(equation_ref) - offset;
851 equation_base = (GLfixed *)
852 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
853 equation = equation_base + offset;
854
855 glClipPlanexOES(
856 (GLenum)plane,
857 (GLfixed *)equation
858 );
859
860exit:
861 if (equation_base) {
862 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
863 JNI_ABORT);
864 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700865 if (_exception) {
866 jniThrowException(_env, _exceptionType, _exceptionMessage);
867 }
Jack Palevich27f80022009-04-15 19:13:17 -0700868}
869
870/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
871static void
872android_glClipPlanexOES__ILjava_nio_IntBuffer_2
873 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700874 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700875 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700876 jint _remaining;
877 GLfixed *equation = (GLfixed *) 0;
878
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700879 equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
880 if (equation == NULL) {
881 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
882 equation = (GLfixed *) (_equationBase + _bufferOffset);
883 }
Jack Palevicha3795852009-04-24 10:35:11 -0700884 glClipPlanexOES(
885 (GLenum)plane,
886 (GLfixed *)equation
887 );
888 if (_array) {
889 releasePointer(_env, _array, equation, JNI_FALSE);
890 }
Jack Palevich27f80022009-04-15 19:13:17 -0700891}
892
893/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
894static void
895android_glColor4xOES__IIII
896 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
Jack Palevicha3795852009-04-24 10:35:11 -0700897 glColor4xOES(
898 (GLfixed)red,
899 (GLfixed)green,
900 (GLfixed)blue,
901 (GLfixed)alpha
902 );
Jack Palevich27f80022009-04-15 19:13:17 -0700903}
904
905/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */
906static void
907android_glDepthRangexOES__II
908 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700909 glDepthRangexOES(
910 (GLclampx)zNear,
911 (GLclampx)zFar
912 );
Jack Palevich27f80022009-04-15 19:13:17 -0700913}
914
915/* void glFogxOES ( GLenum pname, GLfixed param ) */
916static void
917android_glFogxOES__II
918 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -0700919 glFogxOES(
920 (GLenum)pname,
921 (GLfixed)param
922 );
Jack Palevich27f80022009-04-15 19:13:17 -0700923}
924
925/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
926static void
927android_glFogxvOES__I_3II
928 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700929 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -0800930 const char * _exceptionType = NULL;
931 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -0700932 GLfixed *params_base = (GLfixed *) 0;
933 jint _remaining;
934 GLfixed *params = (GLfixed *) 0;
935
936 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700937 _exception = 1;
938 _exceptionType = "java/lang/IllegalArgumentException";
939 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -0700940 goto exit;
941 }
942 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700943 _exception = 1;
944 _exceptionType = "java/lang/IllegalArgumentException";
945 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -0700946 goto exit;
947 }
948 _remaining = _env->GetArrayLength(params_ref) - offset;
949 params_base = (GLfixed *)
950 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
951 params = params_base + offset;
952
953 glFogxvOES(
954 (GLenum)pname,
955 (GLfixed *)params
956 );
957
958exit:
959 if (params_base) {
960 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
961 JNI_ABORT);
962 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -0700963 if (_exception) {
964 jniThrowException(_env, _exceptionType, _exceptionMessage);
965 }
Jack Palevich27f80022009-04-15 19:13:17 -0700966}
967
968/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
969static void
970android_glFogxvOES__ILjava_nio_IntBuffer_2
971 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -0700972 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700973 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -0700974 jint _remaining;
975 GLfixed *params = (GLfixed *) 0;
976
Thomas Tafertshofer17045a12012-07-12 13:55:55 -0700977 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
978 if (params == NULL) {
979 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
980 params = (GLfixed *) (_paramsBase + _bufferOffset);
981 }
Jack Palevicha3795852009-04-24 10:35:11 -0700982 glFogxvOES(
983 (GLenum)pname,
984 (GLfixed *)params
985 );
986 if (_array) {
987 releasePointer(_env, _array, params, JNI_FALSE);
988 }
Jack Palevich27f80022009-04-15 19:13:17 -0700989}
990
991/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
992static void
993android_glFrustumxOES__IIIIII
994 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -0700995 glFrustumxOES(
996 (GLfixed)left,
997 (GLfixed)right,
998 (GLfixed)bottom,
999 (GLfixed)top,
1000 (GLfixed)zNear,
1001 (GLfixed)zFar
1002 );
Jack Palevich27f80022009-04-15 19:13:17 -07001003}
1004
1005/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1006static void
1007android_glGetClipPlanexOES__I_3II
1008 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001009 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001010 const char * _exceptionType = NULL;
1011 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001012 GLfixed *eqn_base = (GLfixed *) 0;
1013 jint _remaining;
1014 GLfixed *eqn = (GLfixed *) 0;
1015
1016 if (!eqn_ref) {
1017 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001018 _exceptionType = "java/lang/IllegalArgumentException";
1019 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001020 goto exit;
1021 }
1022 if (offset < 0) {
1023 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001024 _exceptionType = "java/lang/IllegalArgumentException";
1025 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001026 goto exit;
1027 }
1028 _remaining = _env->GetArrayLength(eqn_ref) - offset;
1029 if (_remaining < 4) {
1030 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001031 _exceptionType = "java/lang/IllegalArgumentException";
1032 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001033 goto exit;
1034 }
1035 eqn_base = (GLfixed *)
1036 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
1037 eqn = eqn_base + offset;
1038
1039 glGetClipPlanexOES(
1040 (GLenum)pname,
1041 (GLfixed *)eqn
1042 );
1043
1044exit:
1045 if (eqn_base) {
1046 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
1047 _exception ? JNI_ABORT: 0);
1048 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001049 if (_exception) {
1050 jniThrowException(_env, _exceptionType, _exceptionMessage);
1051 }
Jack Palevich27f80022009-04-15 19:13:17 -07001052}
1053
1054/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
1055static void
1056android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
1057 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001058 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001059 const char * _exceptionType = NULL;
1060 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001061 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001062 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001063 jint _remaining;
1064 GLfixed *eqn = (GLfixed *) 0;
1065
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001066 eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07001067 if (_remaining < 4) {
1068 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001069 _exceptionType = "java/lang/IllegalArgumentException";
1070 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07001071 goto exit;
1072 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001073 if (eqn == NULL) {
1074 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1075 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
1076 }
Jack Palevicha3795852009-04-24 10:35:11 -07001077 glGetClipPlanexOES(
1078 (GLenum)pname,
1079 (GLfixed *)eqn
1080 );
1081
1082exit:
1083 if (_array) {
1084 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
1085 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001086 if (_exception) {
1087 jniThrowException(_env, _exceptionType, _exceptionMessage);
1088 }
Jack Palevich27f80022009-04-15 19:13:17 -07001089}
1090
1091/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1092static void
1093android_glGetFixedvOES__I_3II
1094 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001095 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001096 const char * _exceptionType = NULL;
1097 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001098 GLfixed *params_base = (GLfixed *) 0;
1099 jint _remaining;
1100 GLfixed *params = (GLfixed *) 0;
1101
1102 if (!params_ref) {
1103 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001104 _exceptionType = "java/lang/IllegalArgumentException";
1105 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001106 goto exit;
1107 }
1108 if (offset < 0) {
1109 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001110 _exceptionType = "java/lang/IllegalArgumentException";
1111 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001112 goto exit;
1113 }
1114 _remaining = _env->GetArrayLength(params_ref) - offset;
1115 params_base = (GLfixed *)
1116 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1117 params = params_base + offset;
1118
1119 glGetFixedvOES(
1120 (GLenum)pname,
1121 (GLfixed *)params
1122 );
1123
1124exit:
1125 if (params_base) {
1126 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1127 _exception ? JNI_ABORT: 0);
1128 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001129 if (_exception) {
1130 jniThrowException(_env, _exceptionType, _exceptionMessage);
1131 }
Jack Palevich27f80022009-04-15 19:13:17 -07001132}
1133
1134/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
1135static void
1136android_glGetFixedvOES__ILjava_nio_IntBuffer_2
1137 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001138 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001139 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001140 jint _remaining;
1141 GLfixed *params = (GLfixed *) 0;
1142
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001143 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1144 if (params == NULL) {
1145 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1146 params = (GLfixed *) (_paramsBase + _bufferOffset);
1147 }
Jack Palevicha3795852009-04-24 10:35:11 -07001148 glGetFixedvOES(
1149 (GLenum)pname,
1150 (GLfixed *)params
1151 );
1152 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001153 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001154 }
Jack Palevich27f80022009-04-15 19:13:17 -07001155}
1156
1157/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1158static void
1159android_glGetLightxvOES__II_3II
1160 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001161 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001162 const char * _exceptionType = NULL;
1163 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001164 GLfixed *params_base = (GLfixed *) 0;
1165 jint _remaining;
1166 GLfixed *params = (GLfixed *) 0;
1167
1168 if (!params_ref) {
1169 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001170 _exceptionType = "java/lang/IllegalArgumentException";
1171 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001172 goto exit;
1173 }
1174 if (offset < 0) {
1175 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001176 _exceptionType = "java/lang/IllegalArgumentException";
1177 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001178 goto exit;
1179 }
1180 _remaining = _env->GetArrayLength(params_ref) - offset;
1181 params_base = (GLfixed *)
1182 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1183 params = params_base + offset;
1184
1185 glGetLightxvOES(
1186 (GLenum)light,
1187 (GLenum)pname,
1188 (GLfixed *)params
1189 );
1190
1191exit:
1192 if (params_base) {
1193 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1194 _exception ? JNI_ABORT: 0);
1195 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001196 if (_exception) {
1197 jniThrowException(_env, _exceptionType, _exceptionMessage);
1198 }
Jack Palevich27f80022009-04-15 19:13:17 -07001199}
1200
1201/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
1202static void
1203android_glGetLightxvOES__IILjava_nio_IntBuffer_2
1204 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001205 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001206 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001207 jint _remaining;
1208 GLfixed *params = (GLfixed *) 0;
1209
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001210 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1211 if (params == NULL) {
1212 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1213 params = (GLfixed *) (_paramsBase + _bufferOffset);
1214 }
Jack Palevicha3795852009-04-24 10:35:11 -07001215 glGetLightxvOES(
1216 (GLenum)light,
1217 (GLenum)pname,
1218 (GLfixed *)params
1219 );
1220 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001221 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001222 }
Jack Palevich27f80022009-04-15 19:13:17 -07001223}
1224
1225/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1226static void
1227android_glGetMaterialxvOES__II_3II
1228 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001229 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001230 const char * _exceptionType = NULL;
1231 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001232 GLfixed *params_base = (GLfixed *) 0;
1233 jint _remaining;
1234 GLfixed *params = (GLfixed *) 0;
1235
1236 if (!params_ref) {
1237 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001238 _exceptionType = "java/lang/IllegalArgumentException";
1239 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001240 goto exit;
1241 }
1242 if (offset < 0) {
1243 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001244 _exceptionType = "java/lang/IllegalArgumentException";
1245 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001246 goto exit;
1247 }
1248 _remaining = _env->GetArrayLength(params_ref) - offset;
1249 params_base = (GLfixed *)
1250 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1251 params = params_base + offset;
1252
1253 glGetMaterialxvOES(
1254 (GLenum)face,
1255 (GLenum)pname,
1256 (GLfixed *)params
1257 );
1258
1259exit:
1260 if (params_base) {
1261 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1262 _exception ? JNI_ABORT: 0);
1263 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001264 if (_exception) {
1265 jniThrowException(_env, _exceptionType, _exceptionMessage);
1266 }
Jack Palevich27f80022009-04-15 19:13:17 -07001267}
1268
1269/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
1270static void
1271android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
1272 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001273 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001274 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001275 jint _remaining;
1276 GLfixed *params = (GLfixed *) 0;
1277
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001278 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1279 if (params == NULL) {
1280 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1281 params = (GLfixed *) (_paramsBase + _bufferOffset);
1282 }
Jack Palevicha3795852009-04-24 10:35:11 -07001283 glGetMaterialxvOES(
1284 (GLenum)face,
1285 (GLenum)pname,
1286 (GLfixed *)params
1287 );
1288 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001289 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001290 }
Jack Palevich27f80022009-04-15 19:13:17 -07001291}
1292
1293/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1294static void
1295android_glGetTexEnvxvOES__II_3II
1296 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001297 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001298 const char * _exceptionType = NULL;
1299 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001300 GLfixed *params_base = (GLfixed *) 0;
1301 jint _remaining;
1302 GLfixed *params = (GLfixed *) 0;
1303
1304 if (!params_ref) {
1305 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001306 _exceptionType = "java/lang/IllegalArgumentException";
1307 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001308 goto exit;
1309 }
1310 if (offset < 0) {
1311 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001312 _exceptionType = "java/lang/IllegalArgumentException";
1313 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001314 goto exit;
1315 }
1316 _remaining = _env->GetArrayLength(params_ref) - offset;
1317 params_base = (GLfixed *)
1318 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1319 params = params_base + offset;
1320
1321 glGetTexEnvxvOES(
1322 (GLenum)env,
1323 (GLenum)pname,
1324 (GLfixed *)params
1325 );
1326
1327exit:
1328 if (params_base) {
1329 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1330 _exception ? JNI_ABORT: 0);
1331 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001332 if (_exception) {
1333 jniThrowException(_env, _exceptionType, _exceptionMessage);
1334 }
Jack Palevich27f80022009-04-15 19:13:17 -07001335}
1336
1337/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
1338static void
1339android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
1340 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001341 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001342 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001343 jint _remaining;
1344 GLfixed *params = (GLfixed *) 0;
1345
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001346 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1347 if (params == NULL) {
1348 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1349 params = (GLfixed *) (_paramsBase + _bufferOffset);
1350 }
Jack Palevicha3795852009-04-24 10:35:11 -07001351 glGetTexEnvxvOES(
1352 (GLenum)env,
1353 (GLenum)pname,
1354 (GLfixed *)params
1355 );
1356 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001357 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001358 }
Jack Palevich27f80022009-04-15 19:13:17 -07001359}
1360
1361/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1362static void
1363android_glGetTexParameterxvOES__II_3II
1364 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07001365 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001366 const char * _exceptionType = NULL;
1367 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001368 GLfixed *params_base = (GLfixed *) 0;
1369 jint _remaining;
1370 GLfixed *params = (GLfixed *) 0;
1371
1372 if (!params_ref) {
1373 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001374 _exceptionType = "java/lang/IllegalArgumentException";
1375 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001376 goto exit;
1377 }
1378 if (offset < 0) {
1379 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001380 _exceptionType = "java/lang/IllegalArgumentException";
1381 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001382 goto exit;
1383 }
1384 _remaining = _env->GetArrayLength(params_ref) - offset;
1385 params_base = (GLfixed *)
1386 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1387 params = params_base + offset;
1388
1389 glGetTexParameterxvOES(
1390 (GLenum)target,
1391 (GLenum)pname,
1392 (GLfixed *)params
1393 );
1394
1395exit:
1396 if (params_base) {
1397 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1398 _exception ? JNI_ABORT: 0);
1399 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001400 if (_exception) {
1401 jniThrowException(_env, _exceptionType, _exceptionMessage);
1402 }
Jack Palevich27f80022009-04-15 19:13:17 -07001403}
1404
1405/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
1406static void
1407android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
1408 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001409 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001410 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001411 jint _remaining;
1412 GLfixed *params = (GLfixed *) 0;
1413
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001414 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1415 if (params == NULL) {
1416 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1417 params = (GLfixed *) (_paramsBase + _bufferOffset);
1418 }
Jack Palevicha3795852009-04-24 10:35:11 -07001419 glGetTexParameterxvOES(
1420 (GLenum)target,
1421 (GLenum)pname,
1422 (GLfixed *)params
1423 );
1424 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001425 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07001426 }
Jack Palevich27f80022009-04-15 19:13:17 -07001427}
1428
1429/* void glLightModelxOES ( GLenum pname, GLfixed param ) */
1430static void
1431android_glLightModelxOES__II
1432 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001433 glLightModelxOES(
1434 (GLenum)pname,
1435 (GLfixed)param
1436 );
Jack Palevich27f80022009-04-15 19:13:17 -07001437}
1438
1439/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1440static void
1441android_glLightModelxvOES__I_3II
1442 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001443 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001444 const char * _exceptionType = NULL;
1445 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001446 GLfixed *params_base = (GLfixed *) 0;
1447 jint _remaining;
1448 GLfixed *params = (GLfixed *) 0;
1449
1450 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001451 _exception = 1;
1452 _exceptionType = "java/lang/IllegalArgumentException";
1453 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001454 goto exit;
1455 }
1456 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001457 _exception = 1;
1458 _exceptionType = "java/lang/IllegalArgumentException";
1459 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001460 goto exit;
1461 }
1462 _remaining = _env->GetArrayLength(params_ref) - offset;
1463 params_base = (GLfixed *)
1464 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1465 params = params_base + offset;
1466
1467 glLightModelxvOES(
1468 (GLenum)pname,
1469 (GLfixed *)params
1470 );
1471
1472exit:
1473 if (params_base) {
1474 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1475 JNI_ABORT);
1476 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001477 if (_exception) {
1478 jniThrowException(_env, _exceptionType, _exceptionMessage);
1479 }
Jack Palevich27f80022009-04-15 19:13:17 -07001480}
1481
1482/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
1483static void
1484android_glLightModelxvOES__ILjava_nio_IntBuffer_2
1485 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001486 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001487 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001488 jint _remaining;
1489 GLfixed *params = (GLfixed *) 0;
1490
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001491 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1492 if (params == NULL) {
1493 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1494 params = (GLfixed *) (_paramsBase + _bufferOffset);
1495 }
Jack Palevicha3795852009-04-24 10:35:11 -07001496 glLightModelxvOES(
1497 (GLenum)pname,
1498 (GLfixed *)params
1499 );
1500 if (_array) {
1501 releasePointer(_env, _array, params, JNI_FALSE);
1502 }
Jack Palevich27f80022009-04-15 19:13:17 -07001503}
1504
1505/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
1506static void
1507android_glLightxOES__III
1508 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001509 glLightxOES(
1510 (GLenum)light,
1511 (GLenum)pname,
1512 (GLfixed)param
1513 );
Jack Palevich27f80022009-04-15 19:13:17 -07001514}
1515
1516/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1517static void
1518android_glLightxvOES__II_3II
1519 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001520 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001521 const char * _exceptionType = NULL;
1522 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001523 GLfixed *params_base = (GLfixed *) 0;
1524 jint _remaining;
1525 GLfixed *params = (GLfixed *) 0;
1526
1527 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001528 _exception = 1;
1529 _exceptionType = "java/lang/IllegalArgumentException";
1530 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001531 goto exit;
1532 }
1533 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001534 _exception = 1;
1535 _exceptionType = "java/lang/IllegalArgumentException";
1536 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001537 goto exit;
1538 }
1539 _remaining = _env->GetArrayLength(params_ref) - offset;
1540 params_base = (GLfixed *)
1541 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1542 params = params_base + offset;
1543
1544 glLightxvOES(
1545 (GLenum)light,
1546 (GLenum)pname,
1547 (GLfixed *)params
1548 );
1549
1550exit:
1551 if (params_base) {
1552 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1553 JNI_ABORT);
1554 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001555 if (_exception) {
1556 jniThrowException(_env, _exceptionType, _exceptionMessage);
1557 }
Jack Palevich27f80022009-04-15 19:13:17 -07001558}
1559
1560/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
1561static void
1562android_glLightxvOES__IILjava_nio_IntBuffer_2
1563 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001564 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001565 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001566 jint _remaining;
1567 GLfixed *params = (GLfixed *) 0;
1568
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001569 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1570 if (params == NULL) {
1571 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1572 params = (GLfixed *) (_paramsBase + _bufferOffset);
1573 }
Jack Palevicha3795852009-04-24 10:35:11 -07001574 glLightxvOES(
1575 (GLenum)light,
1576 (GLenum)pname,
1577 (GLfixed *)params
1578 );
1579 if (_array) {
1580 releasePointer(_env, _array, params, JNI_FALSE);
1581 }
Jack Palevich27f80022009-04-15 19:13:17 -07001582}
1583
1584/* void glLineWidthxOES ( GLfixed width ) */
1585static void
1586android_glLineWidthxOES__I
1587 (JNIEnv *_env, jobject _this, jint width) {
Jack Palevicha3795852009-04-24 10:35:11 -07001588 glLineWidthxOES(
1589 (GLfixed)width
1590 );
Jack Palevich27f80022009-04-15 19:13:17 -07001591}
1592
1593/* void glLoadMatrixxOES ( const GLfixed *m ) */
1594static void
1595android_glLoadMatrixxOES___3II
1596 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001597 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001598 const char * _exceptionType = NULL;
1599 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001600 GLfixed *m_base = (GLfixed *) 0;
1601 jint _remaining;
1602 GLfixed *m = (GLfixed *) 0;
1603
1604 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001605 _exception = 1;
1606 _exceptionType = "java/lang/IllegalArgumentException";
1607 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001608 goto exit;
1609 }
1610 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001611 _exception = 1;
1612 _exceptionType = "java/lang/IllegalArgumentException";
1613 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001614 goto exit;
1615 }
1616 _remaining = _env->GetArrayLength(m_ref) - offset;
1617 m_base = (GLfixed *)
1618 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1619 m = m_base + offset;
1620
1621 glLoadMatrixxOES(
1622 (GLfixed *)m
1623 );
1624
1625exit:
1626 if (m_base) {
1627 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1628 JNI_ABORT);
1629 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001630 if (_exception) {
1631 jniThrowException(_env, _exceptionType, _exceptionMessage);
1632 }
Jack Palevich27f80022009-04-15 19:13:17 -07001633}
1634
1635/* void glLoadMatrixxOES ( const GLfixed *m ) */
1636static void
1637android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
1638 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001639 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001640 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001641 jint _remaining;
1642 GLfixed *m = (GLfixed *) 0;
1643
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001644 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1645 if (m == NULL) {
1646 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1647 m = (GLfixed *) (_mBase + _bufferOffset);
1648 }
Jack Palevicha3795852009-04-24 10:35:11 -07001649 glLoadMatrixxOES(
1650 (GLfixed *)m
1651 );
1652 if (_array) {
1653 releasePointer(_env, _array, m, JNI_FALSE);
1654 }
Jack Palevich27f80022009-04-15 19:13:17 -07001655}
1656
1657/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
1658static void
1659android_glMaterialxOES__III
1660 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001661 glMaterialxOES(
1662 (GLenum)face,
1663 (GLenum)pname,
1664 (GLfixed)param
1665 );
Jack Palevich27f80022009-04-15 19:13:17 -07001666}
1667
1668/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1669static void
1670android_glMaterialxvOES__II_3II
1671 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001672 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001673 const char * _exceptionType = NULL;
1674 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001675 GLfixed *params_base = (GLfixed *) 0;
1676 jint _remaining;
1677 GLfixed *params = (GLfixed *) 0;
1678
1679 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001680 _exception = 1;
1681 _exceptionType = "java/lang/IllegalArgumentException";
1682 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001683 goto exit;
1684 }
1685 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001686 _exception = 1;
1687 _exceptionType = "java/lang/IllegalArgumentException";
1688 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001689 goto exit;
1690 }
1691 _remaining = _env->GetArrayLength(params_ref) - offset;
1692 params_base = (GLfixed *)
1693 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1694 params = params_base + offset;
1695
1696 glMaterialxvOES(
1697 (GLenum)face,
1698 (GLenum)pname,
1699 (GLfixed *)params
1700 );
1701
1702exit:
1703 if (params_base) {
1704 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1705 JNI_ABORT);
1706 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001707 if (_exception) {
1708 jniThrowException(_env, _exceptionType, _exceptionMessage);
1709 }
Jack Palevich27f80022009-04-15 19:13:17 -07001710}
1711
1712/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
1713static void
1714android_glMaterialxvOES__IILjava_nio_IntBuffer_2
1715 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001716 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001717 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001718 jint _remaining;
1719 GLfixed *params = (GLfixed *) 0;
1720
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001721 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1722 if (params == NULL) {
1723 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1724 params = (GLfixed *) (_paramsBase + _bufferOffset);
1725 }
Jack Palevicha3795852009-04-24 10:35:11 -07001726 glMaterialxvOES(
1727 (GLenum)face,
1728 (GLenum)pname,
1729 (GLfixed *)params
1730 );
1731 if (_array) {
1732 releasePointer(_env, _array, params, JNI_FALSE);
1733 }
Jack Palevich27f80022009-04-15 19:13:17 -07001734}
1735
1736/* void glMultMatrixxOES ( const GLfixed *m ) */
1737static void
1738android_glMultMatrixxOES___3II
1739 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001740 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001741 const char * _exceptionType = NULL;
1742 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001743 GLfixed *m_base = (GLfixed *) 0;
1744 jint _remaining;
1745 GLfixed *m = (GLfixed *) 0;
1746
1747 if (!m_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001748 _exception = 1;
1749 _exceptionType = "java/lang/IllegalArgumentException";
1750 _exceptionMessage = "m == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001751 goto exit;
1752 }
1753 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001754 _exception = 1;
1755 _exceptionType = "java/lang/IllegalArgumentException";
1756 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001757 goto exit;
1758 }
1759 _remaining = _env->GetArrayLength(m_ref) - offset;
1760 m_base = (GLfixed *)
1761 _env->GetPrimitiveArrayCritical(m_ref, (jboolean *)0);
1762 m = m_base + offset;
1763
1764 glMultMatrixxOES(
1765 (GLfixed *)m
1766 );
1767
1768exit:
1769 if (m_base) {
1770 _env->ReleasePrimitiveArrayCritical(m_ref, m_base,
1771 JNI_ABORT);
1772 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001773 if (_exception) {
1774 jniThrowException(_env, _exceptionType, _exceptionMessage);
1775 }
Jack Palevich27f80022009-04-15 19:13:17 -07001776}
1777
1778/* void glMultMatrixxOES ( const GLfixed *m ) */
1779static void
1780android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
1781 (JNIEnv *_env, jobject _this, jobject m_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001782 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001783 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001784 jint _remaining;
1785 GLfixed *m = (GLfixed *) 0;
1786
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001787 m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
1788 if (m == NULL) {
1789 char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1790 m = (GLfixed *) (_mBase + _bufferOffset);
1791 }
Jack Palevicha3795852009-04-24 10:35:11 -07001792 glMultMatrixxOES(
1793 (GLfixed *)m
1794 );
1795 if (_array) {
1796 releasePointer(_env, _array, m, JNI_FALSE);
1797 }
Jack Palevich27f80022009-04-15 19:13:17 -07001798}
1799
1800/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
1801static void
1802android_glMultiTexCoord4xOES__IIIII
1803 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
Jack Palevicha3795852009-04-24 10:35:11 -07001804 glMultiTexCoord4xOES(
1805 (GLenum)target,
1806 (GLfixed)s,
1807 (GLfixed)t,
1808 (GLfixed)r,
1809 (GLfixed)q
1810 );
Jack Palevich27f80022009-04-15 19:13:17 -07001811}
1812
1813/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */
1814static void
1815android_glNormal3xOES__III
1816 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
Jack Palevicha3795852009-04-24 10:35:11 -07001817 glNormal3xOES(
1818 (GLfixed)nx,
1819 (GLfixed)ny,
1820 (GLfixed)nz
1821 );
Jack Palevich27f80022009-04-15 19:13:17 -07001822}
1823
1824/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1825static void
1826android_glOrthoxOES__IIIIII
1827 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07001828 glOrthoxOES(
1829 (GLfixed)left,
1830 (GLfixed)right,
1831 (GLfixed)bottom,
1832 (GLfixed)top,
1833 (GLfixed)zNear,
1834 (GLfixed)zFar
1835 );
Jack Palevich27f80022009-04-15 19:13:17 -07001836}
1837
1838/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */
1839static void
1840android_glPointParameterxOES__II
1841 (JNIEnv *_env, jobject _this, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001842 glPointParameterxOES(
1843 (GLenum)pname,
1844 (GLfixed)param
1845 );
Jack Palevich27f80022009-04-15 19:13:17 -07001846}
1847
1848/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1849static void
1850android_glPointParameterxvOES__I_3II
1851 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001852 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001853 const char * _exceptionType = NULL;
1854 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001855 GLfixed *params_base = (GLfixed *) 0;
1856 jint _remaining;
1857 GLfixed *params = (GLfixed *) 0;
1858
1859 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001860 _exception = 1;
1861 _exceptionType = "java/lang/IllegalArgumentException";
1862 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001863 goto exit;
1864 }
1865 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001866 _exception = 1;
1867 _exceptionType = "java/lang/IllegalArgumentException";
1868 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001869 goto exit;
1870 }
1871 _remaining = _env->GetArrayLength(params_ref) - offset;
1872 params_base = (GLfixed *)
1873 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1874 params = params_base + offset;
1875
1876 glPointParameterxvOES(
1877 (GLenum)pname,
1878 (GLfixed *)params
1879 );
1880
1881exit:
1882 if (params_base) {
1883 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1884 JNI_ABORT);
1885 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001886 if (_exception) {
1887 jniThrowException(_env, _exceptionType, _exceptionMessage);
1888 }
Jack Palevich27f80022009-04-15 19:13:17 -07001889}
1890
1891/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
1892static void
1893android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
1894 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07001895 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001896 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07001897 jint _remaining;
1898 GLfixed *params = (GLfixed *) 0;
1899
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07001900 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
1901 if (params == NULL) {
1902 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1903 params = (GLfixed *) (_paramsBase + _bufferOffset);
1904 }
Jack Palevicha3795852009-04-24 10:35:11 -07001905 glPointParameterxvOES(
1906 (GLenum)pname,
1907 (GLfixed *)params
1908 );
1909 if (_array) {
1910 releasePointer(_env, _array, params, JNI_FALSE);
1911 }
Jack Palevich27f80022009-04-15 19:13:17 -07001912}
1913
1914/* void glPointSizexOES ( GLfixed size ) */
1915static void
1916android_glPointSizexOES__I
1917 (JNIEnv *_env, jobject _this, jint size) {
Jack Palevicha3795852009-04-24 10:35:11 -07001918 glPointSizexOES(
1919 (GLfixed)size
1920 );
Jack Palevich27f80022009-04-15 19:13:17 -07001921}
1922
1923/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */
1924static void
1925android_glPolygonOffsetxOES__II
1926 (JNIEnv *_env, jobject _this, jint factor, jint units) {
Jack Palevicha3795852009-04-24 10:35:11 -07001927 glPolygonOffsetxOES(
1928 (GLfixed)factor,
1929 (GLfixed)units
1930 );
Jack Palevich27f80022009-04-15 19:13:17 -07001931}
1932
1933/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
1934static void
1935android_glRotatexOES__IIII
1936 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001937 glRotatexOES(
1938 (GLfixed)angle,
1939 (GLfixed)x,
1940 (GLfixed)y,
1941 (GLfixed)z
1942 );
Jack Palevich27f80022009-04-15 19:13:17 -07001943}
1944
1945/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */
1946static void
1947android_glSampleCoveragexOES__IZ
1948 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
Jack Palevicha3795852009-04-24 10:35:11 -07001949 glSampleCoveragexOES(
1950 (GLclampx)value,
1951 (GLboolean)invert
1952 );
Jack Palevich27f80022009-04-15 19:13:17 -07001953}
1954
1955/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */
1956static void
1957android_glScalexOES__III
1958 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07001959 glScalexOES(
1960 (GLfixed)x,
1961 (GLfixed)y,
1962 (GLfixed)z
1963 );
Jack Palevich27f80022009-04-15 19:13:17 -07001964}
1965
1966/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */
1967static void
1968android_glTexEnvxOES__III
1969 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07001970 glTexEnvxOES(
1971 (GLenum)target,
1972 (GLenum)pname,
1973 (GLfixed)param
1974 );
Jack Palevich27f80022009-04-15 19:13:17 -07001975}
1976
1977/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
1978static void
1979android_glTexEnvxvOES__II_3II
1980 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001981 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08001982 const char * _exceptionType = NULL;
1983 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07001984 GLfixed *params_base = (GLfixed *) 0;
1985 jint _remaining;
1986 GLfixed *params = (GLfixed *) 0;
1987
1988 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001989 _exception = 1;
1990 _exceptionType = "java/lang/IllegalArgumentException";
1991 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07001992 goto exit;
1993 }
1994 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07001995 _exception = 1;
1996 _exceptionType = "java/lang/IllegalArgumentException";
1997 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07001998 goto exit;
1999 }
2000 _remaining = _env->GetArrayLength(params_ref) - offset;
2001 params_base = (GLfixed *)
2002 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2003 params = params_base + offset;
2004
2005 glTexEnvxvOES(
2006 (GLenum)target,
2007 (GLenum)pname,
2008 (GLfixed *)params
2009 );
2010
2011exit:
2012 if (params_base) {
2013 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2014 JNI_ABORT);
2015 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002016 if (_exception) {
2017 jniThrowException(_env, _exceptionType, _exceptionMessage);
2018 }
Jack Palevich27f80022009-04-15 19:13:17 -07002019}
2020
2021/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2022static void
2023android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
2024 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002025 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002026 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002027 jint _remaining;
2028 GLfixed *params = (GLfixed *) 0;
2029
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002030 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2031 if (params == NULL) {
2032 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2033 params = (GLfixed *) (_paramsBase + _bufferOffset);
2034 }
Jack Palevicha3795852009-04-24 10:35:11 -07002035 glTexEnvxvOES(
2036 (GLenum)target,
2037 (GLenum)pname,
2038 (GLfixed *)params
2039 );
2040 if (_array) {
2041 releasePointer(_env, _array, params, JNI_FALSE);
2042 }
Jack Palevich27f80022009-04-15 19:13:17 -07002043}
2044
2045/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
2046static void
2047android_glTexParameterxOES__III
2048 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07002049 glTexParameterxOES(
2050 (GLenum)target,
2051 (GLenum)pname,
2052 (GLfixed)param
2053 );
Jack Palevich27f80022009-04-15 19:13:17 -07002054}
2055
2056/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2057static void
2058android_glTexParameterxvOES__II_3II
2059 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002060 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002061 const char * _exceptionType = NULL;
2062 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002063 GLfixed *params_base = (GLfixed *) 0;
2064 jint _remaining;
2065 GLfixed *params = (GLfixed *) 0;
2066
2067 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002068 _exception = 1;
2069 _exceptionType = "java/lang/IllegalArgumentException";
2070 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002071 goto exit;
2072 }
2073 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002074 _exception = 1;
2075 _exceptionType = "java/lang/IllegalArgumentException";
2076 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002077 goto exit;
2078 }
2079 _remaining = _env->GetArrayLength(params_ref) - offset;
2080 params_base = (GLfixed *)
2081 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2082 params = params_base + offset;
2083
2084 glTexParameterxvOES(
2085 (GLenum)target,
2086 (GLenum)pname,
2087 (GLfixed *)params
2088 );
2089
2090exit:
2091 if (params_base) {
2092 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2093 JNI_ABORT);
2094 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002095 if (_exception) {
2096 jniThrowException(_env, _exceptionType, _exceptionMessage);
2097 }
Jack Palevich27f80022009-04-15 19:13:17 -07002098}
2099
2100/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
2101static void
2102android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
2103 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002104 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002105 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002106 jint _remaining;
2107 GLfixed *params = (GLfixed *) 0;
2108
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002109 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
2110 if (params == NULL) {
2111 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2112 params = (GLfixed *) (_paramsBase + _bufferOffset);
2113 }
Jack Palevicha3795852009-04-24 10:35:11 -07002114 glTexParameterxvOES(
2115 (GLenum)target,
2116 (GLenum)pname,
2117 (GLfixed *)params
2118 );
2119 if (_array) {
2120 releasePointer(_env, _array, params, JNI_FALSE);
2121 }
Jack Palevich27f80022009-04-15 19:13:17 -07002122}
2123
2124/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
2125static void
2126android_glTranslatexOES__III
2127 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
Jack Palevicha3795852009-04-24 10:35:11 -07002128 glTranslatexOES(
2129 (GLfixed)x,
2130 (GLfixed)y,
2131 (GLfixed)z
2132 );
Jack Palevich27f80022009-04-15 19:13:17 -07002133}
2134
2135/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */
2136static jboolean
2137android_glIsRenderbufferOES__I
2138 (JNIEnv *_env, jobject _this, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002139 GLboolean _returnValue;
2140 _returnValue = glIsRenderbufferOES(
2141 (GLuint)renderbuffer
2142 );
Andy McFaddencee51982013-04-25 16:08:31 -07002143 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002144}
2145
2146/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */
2147static void
2148android_glBindRenderbufferOES__II
2149 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002150 glBindRenderbufferOES(
2151 (GLenum)target,
2152 (GLuint)renderbuffer
2153 );
Jack Palevich27f80022009-04-15 19:13:17 -07002154}
2155
2156/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2157static void
2158android_glDeleteRenderbuffersOES__I_3II
2159 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002160 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002161 const char * _exceptionType = NULL;
2162 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002163 GLuint *renderbuffers_base = (GLuint *) 0;
2164 jint _remaining;
2165 GLuint *renderbuffers = (GLuint *) 0;
2166
2167 if (!renderbuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002168 _exception = 1;
2169 _exceptionType = "java/lang/IllegalArgumentException";
2170 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002171 goto exit;
2172 }
2173 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002174 _exception = 1;
2175 _exceptionType = "java/lang/IllegalArgumentException";
2176 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002177 goto exit;
2178 }
2179 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2180 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002181 _exception = 1;
2182 _exceptionType = "java/lang/IllegalArgumentException";
2183 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002184 goto exit;
2185 }
2186 renderbuffers_base = (GLuint *)
2187 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
2188 renderbuffers = renderbuffers_base + offset;
2189
2190 glDeleteRenderbuffersOES(
2191 (GLsizei)n,
2192 (GLuint *)renderbuffers
2193 );
2194
2195exit:
2196 if (renderbuffers_base) {
2197 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
2198 JNI_ABORT);
2199 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002200 if (_exception) {
2201 jniThrowException(_env, _exceptionType, _exceptionMessage);
2202 }
Jack Palevich27f80022009-04-15 19:13:17 -07002203}
2204
2205/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
2206static void
2207android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
2208 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002209 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002210 const char * _exceptionType = NULL;
2211 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002212 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002213 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002214 jint _remaining;
2215 GLuint *renderbuffers = (GLuint *) 0;
2216
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002217 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002218 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002219 _exception = 1;
2220 _exceptionType = "java/lang/IllegalArgumentException";
2221 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002222 goto exit;
2223 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002224 if (renderbuffers == NULL) {
2225 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2226 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2227 }
Jack Palevich73108672011-03-28 14:49:12 -07002228 glDeleteRenderbuffersOES(
2229 (GLsizei)n,
2230 (GLuint *)renderbuffers
2231 );
2232
2233exit:
2234 if (_array) {
2235 releasePointer(_env, _array, renderbuffers, JNI_FALSE);
2236 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002237 if (_exception) {
2238 jniThrowException(_env, _exceptionType, _exceptionMessage);
2239 }
Jack Palevich27f80022009-04-15 19:13:17 -07002240}
2241
2242/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2243static void
2244android_glGenRenderbuffersOES__I_3II
2245 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002246 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002247 const char * _exceptionType = NULL;
2248 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002249 GLuint *renderbuffers_base = (GLuint *) 0;
2250 jint _remaining;
2251 GLuint *renderbuffers = (GLuint *) 0;
2252
2253 if (!renderbuffers_ref) {
2254 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002255 _exceptionType = "java/lang/IllegalArgumentException";
2256 _exceptionMessage = "renderbuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002257 goto exit;
2258 }
2259 if (offset < 0) {
2260 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002261 _exceptionType = "java/lang/IllegalArgumentException";
2262 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002263 goto exit;
2264 }
2265 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
2266 if (_remaining < n) {
2267 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002268 _exceptionType = "java/lang/IllegalArgumentException";
2269 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002270 goto exit;
2271 }
2272 renderbuffers_base = (GLuint *)
2273 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
2274 renderbuffers = renderbuffers_base + offset;
2275
2276 glGenRenderbuffersOES(
2277 (GLsizei)n,
2278 (GLuint *)renderbuffers
2279 );
2280
2281exit:
2282 if (renderbuffers_base) {
2283 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
2284 _exception ? JNI_ABORT: 0);
2285 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002286 if (_exception) {
2287 jniThrowException(_env, _exceptionType, _exceptionMessage);
2288 }
Jack Palevich27f80022009-04-15 19:13:17 -07002289}
2290
2291/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
2292static void
2293android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
2294 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002295 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002296 const char * _exceptionType = NULL;
2297 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002298 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002299 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002300 jint _remaining;
2301 GLuint *renderbuffers = (GLuint *) 0;
2302
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002303 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002304 if (_remaining < n) {
2305 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002306 _exceptionType = "java/lang/IllegalArgumentException";
2307 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002308 goto exit;
2309 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002310 if (renderbuffers == NULL) {
2311 char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2312 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
2313 }
Jack Palevich73108672011-03-28 14:49:12 -07002314 glGenRenderbuffersOES(
2315 (GLsizei)n,
2316 (GLuint *)renderbuffers
2317 );
2318
2319exit:
2320 if (_array) {
2321 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
2322 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002323 if (_exception) {
2324 jniThrowException(_env, _exceptionType, _exceptionMessage);
2325 }
Jack Palevich27f80022009-04-15 19:13:17 -07002326}
2327
2328/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
2329static void
2330android_glRenderbufferStorageOES__IIII
2331 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
Jack Palevich73108672011-03-28 14:49:12 -07002332 glRenderbufferStorageOES(
2333 (GLenum)target,
2334 (GLenum)internalformat,
2335 (GLsizei)width,
2336 (GLsizei)height
2337 );
Jack Palevich27f80022009-04-15 19:13:17 -07002338}
2339
2340/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2341static void
2342android_glGetRenderbufferParameterivOES__II_3II
2343 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002344 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002345 const char * _exceptionType = NULL;
2346 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002347 GLint *params_base = (GLint *) 0;
2348 jint _remaining;
2349 GLint *params = (GLint *) 0;
2350
2351 if (!params_ref) {
2352 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002353 _exceptionType = "java/lang/IllegalArgumentException";
2354 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002355 goto exit;
2356 }
2357 if (offset < 0) {
2358 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002359 _exceptionType = "java/lang/IllegalArgumentException";
2360 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002361 goto exit;
2362 }
2363 _remaining = _env->GetArrayLength(params_ref) - offset;
2364 if (_remaining < 1) {
2365 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002366 _exceptionType = "java/lang/IllegalArgumentException";
2367 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002368 goto exit;
2369 }
2370 params_base = (GLint *)
2371 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2372 params = params_base + offset;
2373
2374 glGetRenderbufferParameterivOES(
2375 (GLenum)target,
2376 (GLenum)pname,
2377 (GLint *)params
2378 );
2379
2380exit:
2381 if (params_base) {
2382 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2383 _exception ? JNI_ABORT: 0);
2384 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002385 if (_exception) {
2386 jniThrowException(_env, _exceptionType, _exceptionMessage);
2387 }
Jack Palevich27f80022009-04-15 19:13:17 -07002388}
2389
2390/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
2391static void
2392android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
2393 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002394 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002395 const char * _exceptionType = NULL;
2396 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002397 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002398 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002399 jint _remaining;
2400 GLint *params = (GLint *) 0;
2401
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002402 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002403 if (_remaining < 1) {
2404 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002405 _exceptionType = "java/lang/IllegalArgumentException";
2406 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002407 goto exit;
2408 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002409 if (params == NULL) {
2410 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2411 params = (GLint *) (_paramsBase + _bufferOffset);
2412 }
Jack Palevich73108672011-03-28 14:49:12 -07002413 glGetRenderbufferParameterivOES(
2414 (GLenum)target,
2415 (GLenum)pname,
2416 (GLint *)params
2417 );
2418
2419exit:
2420 if (_array) {
2421 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2422 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002423 if (_exception) {
2424 jniThrowException(_env, _exceptionType, _exceptionMessage);
2425 }
Jack Palevich27f80022009-04-15 19:13:17 -07002426}
2427
2428/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
2429static jboolean
2430android_glIsFramebufferOES__I
2431 (JNIEnv *_env, jobject _this, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002432 GLboolean _returnValue;
2433 _returnValue = glIsFramebufferOES(
2434 (GLuint)framebuffer
2435 );
Andy McFaddencee51982013-04-25 16:08:31 -07002436 return (jboolean)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002437}
2438
2439/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */
2440static void
2441android_glBindFramebufferOES__II
2442 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002443 glBindFramebufferOES(
2444 (GLenum)target,
2445 (GLuint)framebuffer
2446 );
Jack Palevich27f80022009-04-15 19:13:17 -07002447}
2448
2449/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2450static void
2451android_glDeleteFramebuffersOES__I_3II
2452 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002453 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002454 const char * _exceptionType = NULL;
2455 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002456 GLuint *framebuffers_base = (GLuint *) 0;
2457 jint _remaining;
2458 GLuint *framebuffers = (GLuint *) 0;
2459
2460 if (!framebuffers_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002461 _exception = 1;
2462 _exceptionType = "java/lang/IllegalArgumentException";
2463 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002464 goto exit;
2465 }
2466 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002467 _exception = 1;
2468 _exceptionType = "java/lang/IllegalArgumentException";
2469 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002470 goto exit;
2471 }
2472 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2473 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002474 _exception = 1;
2475 _exceptionType = "java/lang/IllegalArgumentException";
2476 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002477 goto exit;
2478 }
2479 framebuffers_base = (GLuint *)
2480 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2481 framebuffers = framebuffers_base + offset;
2482
2483 glDeleteFramebuffersOES(
2484 (GLsizei)n,
2485 (GLuint *)framebuffers
2486 );
2487
2488exit:
2489 if (framebuffers_base) {
2490 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2491 JNI_ABORT);
2492 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002493 if (_exception) {
2494 jniThrowException(_env, _exceptionType, _exceptionMessage);
2495 }
Jack Palevich27f80022009-04-15 19:13:17 -07002496}
2497
2498/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
2499static void
2500android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
2501 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002502 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002503 const char * _exceptionType = NULL;
2504 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002505 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002506 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002507 jint _remaining;
2508 GLuint *framebuffers = (GLuint *) 0;
2509
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002510 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002511 if (_remaining < n) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002512 _exception = 1;
2513 _exceptionType = "java/lang/IllegalArgumentException";
2514 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002515 goto exit;
2516 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002517 if (framebuffers == NULL) {
2518 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2519 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2520 }
Jack Palevich73108672011-03-28 14:49:12 -07002521 glDeleteFramebuffersOES(
2522 (GLsizei)n,
2523 (GLuint *)framebuffers
2524 );
2525
2526exit:
2527 if (_array) {
2528 releasePointer(_env, _array, framebuffers, JNI_FALSE);
2529 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002530 if (_exception) {
2531 jniThrowException(_env, _exceptionType, _exceptionMessage);
2532 }
Jack Palevich27f80022009-04-15 19:13:17 -07002533}
2534
2535/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2536static void
2537android_glGenFramebuffersOES__I_3II
2538 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002539 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002540 const char * _exceptionType = NULL;
2541 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002542 GLuint *framebuffers_base = (GLuint *) 0;
2543 jint _remaining;
2544 GLuint *framebuffers = (GLuint *) 0;
2545
2546 if (!framebuffers_ref) {
2547 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002548 _exceptionType = "java/lang/IllegalArgumentException";
2549 _exceptionMessage = "framebuffers == null";
Jack Palevich73108672011-03-28 14:49:12 -07002550 goto exit;
2551 }
2552 if (offset < 0) {
2553 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002554 _exceptionType = "java/lang/IllegalArgumentException";
2555 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002556 goto exit;
2557 }
2558 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
2559 if (_remaining < n) {
2560 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002561 _exceptionType = "java/lang/IllegalArgumentException";
2562 _exceptionMessage = "length - offset < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002563 goto exit;
2564 }
2565 framebuffers_base = (GLuint *)
2566 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
2567 framebuffers = framebuffers_base + offset;
2568
2569 glGenFramebuffersOES(
2570 (GLsizei)n,
2571 (GLuint *)framebuffers
2572 );
2573
2574exit:
2575 if (framebuffers_base) {
2576 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
2577 _exception ? JNI_ABORT: 0);
2578 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002579 if (_exception) {
2580 jniThrowException(_env, _exceptionType, _exceptionMessage);
2581 }
Jack Palevich27f80022009-04-15 19:13:17 -07002582}
2583
2584/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
2585static void
2586android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
2587 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002588 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002589 const char * _exceptionType = NULL;
2590 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002591 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002592 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002593 jint _remaining;
2594 GLuint *framebuffers = (GLuint *) 0;
2595
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002596 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002597 if (_remaining < n) {
2598 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002599 _exceptionType = "java/lang/IllegalArgumentException";
2600 _exceptionMessage = "remaining() < n < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002601 goto exit;
2602 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002603 if (framebuffers == NULL) {
2604 char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2605 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
2606 }
Jack Palevich73108672011-03-28 14:49:12 -07002607 glGenFramebuffersOES(
2608 (GLsizei)n,
2609 (GLuint *)framebuffers
2610 );
2611
2612exit:
2613 if (_array) {
2614 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
2615 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002616 if (_exception) {
2617 jniThrowException(_env, _exceptionType, _exceptionMessage);
2618 }
Jack Palevich27f80022009-04-15 19:13:17 -07002619}
2620
2621/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
2622static jint
2623android_glCheckFramebufferStatusOES__I
2624 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002625 GLenum _returnValue;
2626 _returnValue = glCheckFramebufferStatusOES(
2627 (GLenum)target
2628 );
Andy McFaddencee51982013-04-25 16:08:31 -07002629 return (jint)_returnValue;
Jack Palevich27f80022009-04-15 19:13:17 -07002630}
2631
2632/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
2633static void
2634android_glFramebufferRenderbufferOES__IIII
2635 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
Jack Palevich73108672011-03-28 14:49:12 -07002636 glFramebufferRenderbufferOES(
2637 (GLenum)target,
2638 (GLenum)attachment,
2639 (GLenum)renderbuffertarget,
2640 (GLuint)renderbuffer
2641 );
Jack Palevich27f80022009-04-15 19:13:17 -07002642}
2643
2644/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
2645static void
2646android_glFramebufferTexture2DOES__IIIII
2647 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
Jack Palevich73108672011-03-28 14:49:12 -07002648 glFramebufferTexture2DOES(
2649 (GLenum)target,
2650 (GLenum)attachment,
2651 (GLenum)textarget,
2652 (GLuint)texture,
2653 (GLint)level
2654 );
Jack Palevich27f80022009-04-15 19:13:17 -07002655}
2656
2657/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2658static void
2659android_glGetFramebufferAttachmentParameterivOES__III_3II
2660 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
Jack Palevich73108672011-03-28 14:49:12 -07002661 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002662 const char * _exceptionType = NULL;
2663 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002664 GLint *params_base = (GLint *) 0;
2665 jint _remaining;
2666 GLint *params = (GLint *) 0;
2667
2668 if (!params_ref) {
2669 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002670 _exceptionType = "java/lang/IllegalArgumentException";
2671 _exceptionMessage = "params == null";
Jack Palevich73108672011-03-28 14:49:12 -07002672 goto exit;
2673 }
2674 if (offset < 0) {
2675 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002676 _exceptionType = "java/lang/IllegalArgumentException";
2677 _exceptionMessage = "offset < 0";
Jack Palevich73108672011-03-28 14:49:12 -07002678 goto exit;
2679 }
2680 _remaining = _env->GetArrayLength(params_ref) - offset;
2681 if (_remaining < 1) {
2682 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002683 _exceptionType = "java/lang/IllegalArgumentException";
2684 _exceptionMessage = "length - offset < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002685 goto exit;
2686 }
2687 params_base = (GLint *)
2688 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2689 params = params_base + offset;
2690
2691 glGetFramebufferAttachmentParameterivOES(
2692 (GLenum)target,
2693 (GLenum)attachment,
2694 (GLenum)pname,
2695 (GLint *)params
2696 );
2697
2698exit:
2699 if (params_base) {
2700 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2701 _exception ? JNI_ABORT: 0);
2702 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002703 if (_exception) {
2704 jniThrowException(_env, _exceptionType, _exceptionMessage);
2705 }
Jack Palevich27f80022009-04-15 19:13:17 -07002706}
2707
2708/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2709static void
2710android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
2711 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
Jack Palevich73108672011-03-28 14:49:12 -07002712 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002713 const char * _exceptionType = NULL;
2714 const char * _exceptionMessage = NULL;
Jack Palevich73108672011-03-28 14:49:12 -07002715 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002716 jint _bufferOffset = (jint) 0;
Jack Palevich73108672011-03-28 14:49:12 -07002717 jint _remaining;
2718 GLint *params = (GLint *) 0;
2719
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002720 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevich73108672011-03-28 14:49:12 -07002721 if (_remaining < 1) {
2722 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002723 _exceptionType = "java/lang/IllegalArgumentException";
2724 _exceptionMessage = "remaining() < 1 < needed";
Jack Palevich73108672011-03-28 14:49:12 -07002725 goto exit;
2726 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002727 if (params == NULL) {
2728 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2729 params = (GLint *) (_paramsBase + _bufferOffset);
2730 }
Jack Palevich73108672011-03-28 14:49:12 -07002731 glGetFramebufferAttachmentParameterivOES(
2732 (GLenum)target,
2733 (GLenum)attachment,
2734 (GLenum)pname,
2735 (GLint *)params
2736 );
2737
2738exit:
2739 if (_array) {
2740 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2741 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002742 if (_exception) {
2743 jniThrowException(_env, _exceptionType, _exceptionMessage);
2744 }
Jack Palevich27f80022009-04-15 19:13:17 -07002745}
2746
2747/* void glGenerateMipmapOES ( GLenum target ) */
2748static void
2749android_glGenerateMipmapOES__I
2750 (JNIEnv *_env, jobject _this, jint target) {
Jack Palevich73108672011-03-28 14:49:12 -07002751 glGenerateMipmapOES(
2752 (GLenum)target
2753 );
Jack Palevich27f80022009-04-15 19:13:17 -07002754}
2755
2756/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
2757static void
2758android_glCurrentPaletteMatrixOES__I
2759 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002760 glCurrentPaletteMatrixOES(
2761 (GLuint)matrixpaletteindex
2762 );
Jack Palevich27f80022009-04-15 19:13:17 -07002763}
2764
2765/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
2766static void
2767android_glLoadPaletteFromModelViewMatrixOES__
2768 (JNIEnv *_env, jobject _this) {
Jack Palevichbe6eac82009-12-08 15:43:51 +08002769 glLoadPaletteFromModelViewMatrixOES();
Jack Palevich27f80022009-04-15 19:13:17 -07002770}
2771
2772/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2773static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002774android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
2775 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2776 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002777 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002778 jint _remaining;
2779 GLvoid *pointer = (GLvoid *) 0;
2780
2781 if (pointer_buf) {
2782 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2783 if ( ! pointer ) {
2784 return;
2785 }
2786 }
2787 glMatrixIndexPointerOESBounds(
2788 (GLint)size,
2789 (GLenum)type,
2790 (GLsizei)stride,
2791 (GLvoid *)pointer,
2792 (GLsizei)remaining
2793 );
Jack Palevich27f80022009-04-15 19:13:17 -07002794}
2795
2796/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
2797static void
Jack Palevichbe6eac82009-12-08 15:43:51 +08002798android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
2799 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
2800 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002801 jint _bufferOffset = (jint) 0;
Jack Palevichbe6eac82009-12-08 15:43:51 +08002802 jint _remaining;
2803 GLvoid *pointer = (GLvoid *) 0;
2804
2805 if (pointer_buf) {
2806 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
2807 if ( ! pointer ) {
2808 return;
2809 }
2810 }
2811 glWeightPointerOESBounds(
2812 (GLint)size,
2813 (GLenum)type,
2814 (GLsizei)stride,
2815 (GLvoid *)pointer,
2816 (GLsizei)remaining
2817 );
Jack Palevich27f80022009-04-15 19:13:17 -07002818}
2819
2820/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
2821static void
2822android_glDepthRangefOES__FF
2823 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002824 glDepthRangefOES(
2825 (GLclampf)zNear,
2826 (GLclampf)zFar
2827 );
Jack Palevich27f80022009-04-15 19:13:17 -07002828}
2829
2830/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2831static void
2832android_glFrustumfOES__FFFFFF
2833 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002834 glFrustumfOES(
2835 (GLfloat)left,
2836 (GLfloat)right,
2837 (GLfloat)bottom,
2838 (GLfloat)top,
2839 (GLfloat)zNear,
2840 (GLfloat)zFar
2841 );
Jack Palevich27f80022009-04-15 19:13:17 -07002842}
2843
2844/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
2845static void
2846android_glOrthofOES__FFFFFF
2847 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
Jack Palevicha3795852009-04-24 10:35:11 -07002848 glOrthofOES(
2849 (GLfloat)left,
2850 (GLfloat)right,
2851 (GLfloat)bottom,
2852 (GLfloat)top,
2853 (GLfloat)zNear,
2854 (GLfloat)zFar
2855 );
Jack Palevich27f80022009-04-15 19:13:17 -07002856}
2857
2858/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2859static void
2860android_glClipPlanefOES__I_3FI
2861 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002862 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002863 const char * _exceptionType = NULL;
2864 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002865 GLfloat *equation_base = (GLfloat *) 0;
2866 jint _remaining;
2867 GLfloat *equation = (GLfloat *) 0;
2868
2869 if (!equation_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002870 _exception = 1;
2871 _exceptionType = "java/lang/IllegalArgumentException";
2872 _exceptionMessage = "equation == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002873 goto exit;
2874 }
2875 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002876 _exception = 1;
2877 _exceptionType = "java/lang/IllegalArgumentException";
2878 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002879 goto exit;
2880 }
2881 _remaining = _env->GetArrayLength(equation_ref) - offset;
2882 equation_base = (GLfloat *)
2883 _env->GetPrimitiveArrayCritical(equation_ref, (jboolean *)0);
2884 equation = equation_base + offset;
2885
2886 glClipPlanefOES(
2887 (GLenum)plane,
2888 (GLfloat *)equation
2889 );
2890
2891exit:
2892 if (equation_base) {
2893 _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
2894 JNI_ABORT);
2895 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002896 if (_exception) {
2897 jniThrowException(_env, _exceptionType, _exceptionMessage);
2898 }
Jack Palevich27f80022009-04-15 19:13:17 -07002899}
2900
2901/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
2902static void
2903android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
2904 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002905 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002906 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002907 jint _remaining;
2908 GLfloat *equation = (GLfloat *) 0;
2909
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002910 equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
2911 if (equation == NULL) {
2912 char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2913 equation = (GLfloat *) (_equationBase + _bufferOffset);
2914 }
Jack Palevicha3795852009-04-24 10:35:11 -07002915 glClipPlanefOES(
2916 (GLenum)plane,
2917 (GLfloat *)equation
2918 );
2919 if (_array) {
2920 releasePointer(_env, _array, equation, JNI_FALSE);
2921 }
Jack Palevich27f80022009-04-15 19:13:17 -07002922}
2923
2924/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2925static void
2926android_glGetClipPlanefOES__I_3FI
2927 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07002928 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002929 const char * _exceptionType = NULL;
2930 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002931 GLfloat *eqn_base = (GLfloat *) 0;
2932 jint _remaining;
2933 GLfloat *eqn = (GLfloat *) 0;
2934
2935 if (!eqn_ref) {
2936 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002937 _exceptionType = "java/lang/IllegalArgumentException";
2938 _exceptionMessage = "eqn == null";
Jack Palevicha3795852009-04-24 10:35:11 -07002939 goto exit;
2940 }
2941 if (offset < 0) {
2942 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002943 _exceptionType = "java/lang/IllegalArgumentException";
2944 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07002945 goto exit;
2946 }
2947 _remaining = _env->GetArrayLength(eqn_ref) - offset;
2948 if (_remaining < 4) {
2949 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002950 _exceptionType = "java/lang/IllegalArgumentException";
2951 _exceptionMessage = "length - offset < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002952 goto exit;
2953 }
2954 eqn_base = (GLfloat *)
2955 _env->GetPrimitiveArrayCritical(eqn_ref, (jboolean *)0);
2956 eqn = eqn_base + offset;
2957
2958 glGetClipPlanefOES(
2959 (GLenum)pname,
2960 (GLfloat *)eqn
2961 );
2962
2963exit:
2964 if (eqn_base) {
2965 _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
2966 _exception ? JNI_ABORT: 0);
2967 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002968 if (_exception) {
2969 jniThrowException(_env, _exceptionType, _exceptionMessage);
2970 }
Jack Palevich27f80022009-04-15 19:13:17 -07002971}
2972
2973/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
2974static void
2975android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
2976 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07002977 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08002978 const char * _exceptionType = NULL;
2979 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07002980 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002981 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07002982 jint _remaining;
2983 GLfloat *eqn = (GLfloat *) 0;
2984
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002985 eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
Jack Palevicha3795852009-04-24 10:35:11 -07002986 if (_remaining < 4) {
2987 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07002988 _exceptionType = "java/lang/IllegalArgumentException";
2989 _exceptionMessage = "remaining() < 4 < needed";
Jack Palevicha3795852009-04-24 10:35:11 -07002990 goto exit;
2991 }
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07002992 if (eqn == NULL) {
2993 char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
2994 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
2995 }
Jack Palevicha3795852009-04-24 10:35:11 -07002996 glGetClipPlanefOES(
2997 (GLenum)pname,
2998 (GLfloat *)eqn
2999 );
3000
3001exit:
3002 if (_array) {
3003 releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
3004 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003005 if (_exception) {
3006 jniThrowException(_env, _exceptionType, _exceptionMessage);
3007 }
Jack Palevich27f80022009-04-15 19:13:17 -07003008}
3009
3010/* void glClearDepthfOES ( GLclampf depth ) */
3011static void
3012android_glClearDepthfOES__F
3013 (JNIEnv *_env, jobject _this, jfloat depth) {
Jack Palevicha3795852009-04-24 10:35:11 -07003014 glClearDepthfOES(
3015 (GLclampf)depth
3016 );
Jack Palevich27f80022009-04-15 19:13:17 -07003017}
3018
3019/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */
3020static void
3021android_glTexGenfOES__IIF
3022 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003023 glTexGenfOES(
3024 (GLenum)coord,
3025 (GLenum)pname,
3026 (GLfloat)param
3027 );
Jack Palevich27f80022009-04-15 19:13:17 -07003028}
3029
3030/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3031static void
3032android_glTexGenfvOES__II_3FI
3033 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003034 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003035 const char * _exceptionType = NULL;
3036 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003037 GLfloat *params_base = (GLfloat *) 0;
3038 jint _remaining;
3039 GLfloat *params = (GLfloat *) 0;
3040
3041 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003042 _exception = 1;
3043 _exceptionType = "java/lang/IllegalArgumentException";
3044 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003045 goto exit;
3046 }
3047 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003048 _exception = 1;
3049 _exceptionType = "java/lang/IllegalArgumentException";
3050 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003051 goto exit;
3052 }
3053 _remaining = _env->GetArrayLength(params_ref) - offset;
3054 params_base = (GLfloat *)
3055 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3056 params = params_base + offset;
3057
3058 glTexGenfvOES(
3059 (GLenum)coord,
3060 (GLenum)pname,
3061 (GLfloat *)params
3062 );
3063
3064exit:
3065 if (params_base) {
3066 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3067 JNI_ABORT);
3068 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003069 if (_exception) {
3070 jniThrowException(_env, _exceptionType, _exceptionMessage);
3071 }
Jack Palevich27f80022009-04-15 19:13:17 -07003072}
3073
3074/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
3075static void
3076android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
3077 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003078 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003079 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003080 jint _remaining;
3081 GLfloat *params = (GLfloat *) 0;
3082
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003083 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3084 if (params == NULL) {
3085 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3086 params = (GLfloat *) (_paramsBase + _bufferOffset);
3087 }
Jack Palevicha3795852009-04-24 10:35:11 -07003088 glTexGenfvOES(
3089 (GLenum)coord,
3090 (GLenum)pname,
3091 (GLfloat *)params
3092 );
3093 if (_array) {
3094 releasePointer(_env, _array, params, JNI_FALSE);
3095 }
Jack Palevich27f80022009-04-15 19:13:17 -07003096}
3097
3098/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
3099static void
3100android_glTexGeniOES__III
3101 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003102 glTexGeniOES(
3103 (GLenum)coord,
3104 (GLenum)pname,
3105 (GLint)param
3106 );
Jack Palevich27f80022009-04-15 19:13:17 -07003107}
3108
3109/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3110static void
3111android_glTexGenivOES__II_3II
3112 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003113 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003114 const char * _exceptionType = NULL;
3115 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003116 GLint *params_base = (GLint *) 0;
3117 jint _remaining;
3118 GLint *params = (GLint *) 0;
3119
3120 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003121 _exception = 1;
3122 _exceptionType = "java/lang/IllegalArgumentException";
3123 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003124 goto exit;
3125 }
3126 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003127 _exception = 1;
3128 _exceptionType = "java/lang/IllegalArgumentException";
3129 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003130 goto exit;
3131 }
3132 _remaining = _env->GetArrayLength(params_ref) - offset;
3133 params_base = (GLint *)
3134 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3135 params = params_base + offset;
3136
3137 glTexGenivOES(
3138 (GLenum)coord,
3139 (GLenum)pname,
3140 (GLint *)params
3141 );
3142
3143exit:
3144 if (params_base) {
3145 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3146 JNI_ABORT);
3147 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003148 if (_exception) {
3149 jniThrowException(_env, _exceptionType, _exceptionMessage);
3150 }
Jack Palevich27f80022009-04-15 19:13:17 -07003151}
3152
3153/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
3154static void
3155android_glTexGenivOES__IILjava_nio_IntBuffer_2
3156 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003157 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003158 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003159 jint _remaining;
3160 GLint *params = (GLint *) 0;
3161
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003162 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3163 if (params == NULL) {
3164 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3165 params = (GLint *) (_paramsBase + _bufferOffset);
3166 }
Jack Palevicha3795852009-04-24 10:35:11 -07003167 glTexGenivOES(
3168 (GLenum)coord,
3169 (GLenum)pname,
3170 (GLint *)params
3171 );
3172 if (_array) {
3173 releasePointer(_env, _array, params, JNI_FALSE);
3174 }
Jack Palevich27f80022009-04-15 19:13:17 -07003175}
3176
3177/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
3178static void
3179android_glTexGenxOES__III
3180 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
Jack Palevicha3795852009-04-24 10:35:11 -07003181 glTexGenxOES(
3182 (GLenum)coord,
3183 (GLenum)pname,
3184 (GLfixed)param
3185 );
Jack Palevich27f80022009-04-15 19:13:17 -07003186}
3187
3188/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3189static void
3190android_glTexGenxvOES__II_3II
3191 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003192 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003193 const char * _exceptionType = NULL;
3194 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003195 GLfixed *params_base = (GLfixed *) 0;
3196 jint _remaining;
3197 GLfixed *params = (GLfixed *) 0;
3198
3199 if (!params_ref) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003200 _exception = 1;
3201 _exceptionType = "java/lang/IllegalArgumentException";
3202 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003203 goto exit;
3204 }
3205 if (offset < 0) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003206 _exception = 1;
3207 _exceptionType = "java/lang/IllegalArgumentException";
3208 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003209 goto exit;
3210 }
3211 _remaining = _env->GetArrayLength(params_ref) - offset;
3212 params_base = (GLfixed *)
3213 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3214 params = params_base + offset;
3215
3216 glTexGenxvOES(
3217 (GLenum)coord,
3218 (GLenum)pname,
3219 (GLfixed *)params
3220 );
3221
3222exit:
3223 if (params_base) {
3224 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3225 JNI_ABORT);
3226 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003227 if (_exception) {
3228 jniThrowException(_env, _exceptionType, _exceptionMessage);
3229 }
Jack Palevich27f80022009-04-15 19:13:17 -07003230}
3231
3232/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
3233static void
3234android_glTexGenxvOES__IILjava_nio_IntBuffer_2
3235 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003236 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003237 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003238 jint _remaining;
3239 GLfixed *params = (GLfixed *) 0;
3240
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003241 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3242 if (params == NULL) {
3243 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3244 params = (GLfixed *) (_paramsBase + _bufferOffset);
3245 }
Jack Palevicha3795852009-04-24 10:35:11 -07003246 glTexGenxvOES(
3247 (GLenum)coord,
3248 (GLenum)pname,
3249 (GLfixed *)params
3250 );
3251 if (_array) {
3252 releasePointer(_env, _array, params, JNI_FALSE);
3253 }
Jack Palevich27f80022009-04-15 19:13:17 -07003254}
3255
3256/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3257static void
3258android_glGetTexGenfvOES__II_3FI
3259 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003260 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003261 const char * _exceptionType = NULL;
3262 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003263 GLfloat *params_base = (GLfloat *) 0;
3264 jint _remaining;
3265 GLfloat *params = (GLfloat *) 0;
3266
3267 if (!params_ref) {
3268 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003269 _exceptionType = "java/lang/IllegalArgumentException";
3270 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003271 goto exit;
3272 }
3273 if (offset < 0) {
3274 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003275 _exceptionType = "java/lang/IllegalArgumentException";
3276 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003277 goto exit;
3278 }
3279 _remaining = _env->GetArrayLength(params_ref) - offset;
3280 params_base = (GLfloat *)
3281 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3282 params = params_base + offset;
3283
3284 glGetTexGenfvOES(
3285 (GLenum)coord,
3286 (GLenum)pname,
3287 (GLfloat *)params
3288 );
3289
3290exit:
3291 if (params_base) {
3292 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3293 _exception ? JNI_ABORT: 0);
3294 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003295 if (_exception) {
3296 jniThrowException(_env, _exceptionType, _exceptionMessage);
3297 }
Jack Palevich27f80022009-04-15 19:13:17 -07003298}
3299
3300/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
3301static void
3302android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
3303 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003304 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003305 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003306 jint _remaining;
3307 GLfloat *params = (GLfloat *) 0;
3308
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003309 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3310 if (params == NULL) {
3311 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3312 params = (GLfloat *) (_paramsBase + _bufferOffset);
3313 }
Jack Palevicha3795852009-04-24 10:35:11 -07003314 glGetTexGenfvOES(
3315 (GLenum)coord,
3316 (GLenum)pname,
3317 (GLfloat *)params
3318 );
3319 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003320 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003321 }
Jack Palevich27f80022009-04-15 19:13:17 -07003322}
3323
3324/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3325static void
3326android_glGetTexGenivOES__II_3II
3327 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003328 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003329 const char * _exceptionType = NULL;
3330 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003331 GLint *params_base = (GLint *) 0;
3332 jint _remaining;
3333 GLint *params = (GLint *) 0;
3334
3335 if (!params_ref) {
3336 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003337 _exceptionType = "java/lang/IllegalArgumentException";
3338 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003339 goto exit;
3340 }
3341 if (offset < 0) {
3342 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003343 _exceptionType = "java/lang/IllegalArgumentException";
3344 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003345 goto exit;
3346 }
3347 _remaining = _env->GetArrayLength(params_ref) - offset;
3348 params_base = (GLint *)
3349 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3350 params = params_base + offset;
3351
3352 glGetTexGenivOES(
3353 (GLenum)coord,
3354 (GLenum)pname,
3355 (GLint *)params
3356 );
3357
3358exit:
3359 if (params_base) {
3360 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3361 _exception ? JNI_ABORT: 0);
3362 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003363 if (_exception) {
3364 jniThrowException(_env, _exceptionType, _exceptionMessage);
3365 }
Jack Palevich27f80022009-04-15 19:13:17 -07003366}
3367
3368/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
3369static void
3370android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
3371 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003372 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003373 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003374 jint _remaining;
3375 GLint *params = (GLint *) 0;
3376
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003377 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3378 if (params == NULL) {
3379 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3380 params = (GLint *) (_paramsBase + _bufferOffset);
3381 }
Jack Palevicha3795852009-04-24 10:35:11 -07003382 glGetTexGenivOES(
3383 (GLenum)coord,
3384 (GLenum)pname,
3385 (GLint *)params
3386 );
3387 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003388 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003389 }
Jack Palevich27f80022009-04-15 19:13:17 -07003390}
3391
3392/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3393static void
3394android_glGetTexGenxvOES__II_3II
3395 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
Jack Palevicha3795852009-04-24 10:35:11 -07003396 jint _exception = 0;
Mathias Agopian2ad04772013-02-23 03:12:30 -08003397 const char * _exceptionType = NULL;
3398 const char * _exceptionMessage = NULL;
Jack Palevicha3795852009-04-24 10:35:11 -07003399 GLfixed *params_base = (GLfixed *) 0;
3400 jint _remaining;
3401 GLfixed *params = (GLfixed *) 0;
3402
3403 if (!params_ref) {
3404 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003405 _exceptionType = "java/lang/IllegalArgumentException";
3406 _exceptionMessage = "params == null";
Jack Palevicha3795852009-04-24 10:35:11 -07003407 goto exit;
3408 }
3409 if (offset < 0) {
3410 _exception = 1;
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003411 _exceptionType = "java/lang/IllegalArgumentException";
3412 _exceptionMessage = "offset < 0";
Jack Palevicha3795852009-04-24 10:35:11 -07003413 goto exit;
3414 }
3415 _remaining = _env->GetArrayLength(params_ref) - offset;
3416 params_base = (GLfixed *)
3417 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3418 params = params_base + offset;
3419
3420 glGetTexGenxvOES(
3421 (GLenum)coord,
3422 (GLenum)pname,
3423 (GLfixed *)params
3424 );
3425
3426exit:
3427 if (params_base) {
3428 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3429 _exception ? JNI_ABORT: 0);
3430 }
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003431 if (_exception) {
3432 jniThrowException(_env, _exceptionType, _exceptionMessage);
3433 }
Jack Palevich27f80022009-04-15 19:13:17 -07003434}
3435
3436/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
3437static void
3438android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
3439 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
Jack Palevicha3795852009-04-24 10:35:11 -07003440 jarray _array = (jarray) 0;
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003441 jint _bufferOffset = (jint) 0;
Jack Palevicha3795852009-04-24 10:35:11 -07003442 jint _remaining;
3443 GLfixed *params = (GLfixed *) 0;
3444
Thomas Tafertshofer17045a12012-07-12 13:55:55 -07003445 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
3446 if (params == NULL) {
3447 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3448 params = (GLfixed *) (_paramsBase + _bufferOffset);
3449 }
Jack Palevicha3795852009-04-24 10:35:11 -07003450 glGetTexGenxvOES(
3451 (GLenum)coord,
3452 (GLenum)pname,
3453 (GLfixed *)params
3454 );
3455 if (_array) {
Thomas Tafertshofer2545b322012-06-27 16:33:26 -07003456 releasePointer(_env, _array, params, JNI_TRUE);
Jack Palevicha3795852009-04-24 10:35:11 -07003457 }
Jack Palevich27f80022009-04-15 19:13:17 -07003458}
3459
3460static const char *classPathName = "android/opengl/GLES11Ext";
3461
3462static JNINativeMethod methods[] = {
3463{"_nativeClassInit", "()V", (void*)nativeClassInit },
3464{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II },
3465{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII },
3466{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I },
3467{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
3468{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
3469{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
3470{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
3471{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
3472{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
3473{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
3474{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
3475{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
3476{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
3477{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
3478{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
3479{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 },
3480{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 },
3481{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II },
3482{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII },
3483{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I },
3484{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II },
3485{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 },
3486{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII },
3487{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II },
3488{"glFogxOES", "(II)V", (void *) android_glFogxOES__II },
3489{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II },
3490{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 },
3491{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII },
3492{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II },
3493{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 },
3494{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II },
3495{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 },
3496{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II },
3497{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 },
3498{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II },
3499{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 },
3500{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II },
3501{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3502{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II },
3503{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3504{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II },
3505{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II },
3506{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 },
3507{"glLightxOES", "(III)V", (void *) android_glLightxOES__III },
3508{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II },
3509{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 },
3510{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I },
3511{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II },
3512{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 },
3513{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III },
3514{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II },
3515{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 },
3516{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II },
3517{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 },
3518{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII },
3519{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III },
3520{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII },
3521{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II },
3522{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II },
3523{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 },
3524{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I },
3525{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II },
3526{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII },
3527{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ },
3528{"glScalexOES", "(III)V", (void *) android_glScalexOES__III },
3529{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III },
3530{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II },
3531{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 },
3532{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III },
3533{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II },
3534{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 },
3535{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III },
3536{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
3537{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
3538{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
3539{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3540{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
3541{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
3542{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
3543{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
3544{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
3545{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
3546{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
3547{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
3548{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
3549{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
3550{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
3551{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
3552{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
3553{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
3554{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
3555{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
3556{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
3557{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
3558{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
Jack Palevichbe6eac82009-12-08 15:43:51 +08003559{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
3560{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
Jack Palevich27f80022009-04-15 19:13:17 -07003561{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF },
3562{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF },
3563{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF },
3564{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI },
3565{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3566{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI },
3567{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 },
3568{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F },
3569{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF },
3570{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI },
3571{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3572{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III },
3573{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II },
3574{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 },
3575{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III },
3576{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II },
3577{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 },
3578{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI },
3579{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 },
3580{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II },
3581{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 },
3582{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II },
3583{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 },
3584};
3585
3586int register_android_opengl_jni_GLES11Ext(JNIEnv *_env)
3587{
3588 int err;
3589 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3590 return err;
3591}