1 /* //device/libs/android_runtime/com_google_android_gles_jni_GLImpl.cpp
2 **
3 ** Copyright 2006, The Android Open Source Project
4 **
5 ** 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
8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** 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
15 ** limitations under the License.
16 */
17
18 // This source file is automatically generated
19
20 #pragma GCC diagnostic ignored "-Wunused-variable"
21 #pragma GCC diagnostic ignored "-Wunused-function"
22
23 #include "jni.h"
24 #include <nativehelper/JNIPlatformHelp.h>
25 #include <android_runtime/AndroidRuntime.h>
26 #include <utils/misc.h>
27
28 #include <assert.h>
29 #include <GLES/gl.h>
30 #include <GLES/glext.h>
31
32 // Work around differences between the generated name and the actual name.
33
34 #define glBlendEquation glBlendEquationOES
35 #define glBlendEquationSeparate glBlendEquationSeparateOES
36 #define glBlendFuncSeparate glBlendFuncSeparateOES
37 #define glGetTexGenfv glGetTexGenfvOES
38 #define glGetTexGeniv glGetTexGenivOES
39 #define glGetTexGenxv glGetTexGenxvOES
40 #define glTexGenf glTexGenfOES
41 #define glTexGenfv glTexGenfvOES
42 #define glTexGeni glTexGeniOES
43 #define glTexGeniv glTexGenivOES
44 #define glTexGenx glTexGenxOES
45 #define glTexGenxv glTexGenxvOES
46
47
48
49 /* special calls implemented in Android's GLES wrapper used to more
50 * efficiently bound-check passed arrays */
51 extern "C" {
52 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
53 const GLvoid *ptr, GLsizei count);
54 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
55 const GLvoid *pointer, GLsizei count);
56 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
57 GLsizei stride, const GLvoid *pointer, GLsizei count);
58 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
59 GLsizei stride, const GLvoid *pointer, GLsizei count);
60 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
61 GLsizei stride, const GLvoid *pointer, GLsizei count);
62 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
63 GLsizei stride, const GLvoid *pointer, GLsizei count);
64 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
65 GLsizei stride, const GLvoid *pointer, GLsizei count);
66 }
67
68 static jclass G11ImplClass;
69 static jfieldID haveCheckedExtensionsID;
70 static jfieldID have_OES_blend_equation_separateID;
71 static jfieldID have_OES_blend_subtractID;
72 static jfieldID have_OES_framebuffer_objectID;
73 static jfieldID have_OES_texture_cube_mapID;
74
75 /* Cache method IDs each time the class is loaded. */
76
77 static void
nativeClassInit(JNIEnv * _env,jclass glImplClass)78 nativeClassInit(JNIEnv *_env, jclass glImplClass)
79 {
80 jclass g11impClassLocal = _env->FindClass("com/google/android/gles_jni/GLImpl");
81 G11ImplClass = (jclass) _env->NewGlobalRef(g11impClassLocal);
82 haveCheckedExtensionsID = _env->GetFieldID(G11ImplClass, "haveCheckedExtensions", "Z");
83 have_OES_blend_equation_separateID = _env->GetFieldID(G11ImplClass, "have_OES_blend_equation_separate", "Z");
84 have_OES_blend_subtractID = _env->GetFieldID(G11ImplClass, "have_OES_blend_subtract", "Z");
85 have_OES_framebuffer_objectID = _env->GetFieldID(G11ImplClass, "have_OES_framebuffer_object", "Z");
86 have_OES_texture_cube_mapID = _env->GetFieldID(G11ImplClass, "have_OES_texture_cube_map", "Z");
87 }
88
89 static void *
getPointer(JNIEnv * _env,jobject buffer,jarray * array,jint * remaining,jint * offset)90 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
91 {
92 jint position;
93 jint limit;
94 jint elementSizeShift;
95 jlong pointer;
96
97 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
98 *remaining = (limit - position) << elementSizeShift;
99 if (pointer != 0L) {
100 *array = nullptr;
101 pointer += position << elementSizeShift;
102 return reinterpret_cast<void*>(pointer);
103 }
104
105 *array = jniGetNioBufferBaseArray(_env, buffer);
106 *offset = jniGetNioBufferBaseArrayOffset(_env, buffer);
107 return nullptr;
108 }
109
110 static void
releasePointer(JNIEnv * _env,jarray array,void * data,jboolean commit)111 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
112 {
113 _env->ReleasePrimitiveArrayCritical(array, data,
114 commit ? 0 : JNI_ABORT);
115 }
116
117 extern "C" {
118 extern char* __progname;
119 }
120
121 static void *
getDirectBufferPointer(JNIEnv * _env,jobject buffer)122 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
123 if (buffer == nullptr) {
124 return nullptr;
125 }
126
127 jint position;
128 jint limit;
129 jint elementSizeShift;
130 jlong pointer;
131 pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift);
132 if (pointer == 0) {
133 jniThrowException(_env, "java/lang/IllegalArgumentException",
134 "Must use a native order direct Buffer");
135 return nullptr;
136 }
137 pointer += position << elementSizeShift;
138 return reinterpret_cast<void*>(pointer);
139 }
140
141 static int
getNumCompressedTextureFormats()142 getNumCompressedTextureFormats() {
143 int numCompressedTextureFormats = 0;
144 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats);
145 return numCompressedTextureFormats;
146 }
147
148 // Check if the extension at the head of pExtensions is pExtension. Note that pExtensions is
149 // terminated by either 0 or space, while pExtension is terminated by 0.
150
151 static bool
extensionEqual(const GLubyte * pExtensions,const GLubyte * pExtension)152 extensionEqual(const GLubyte* pExtensions, const GLubyte* pExtension) {
153 while (true) {
154 char a = *pExtensions++;
155 char b = *pExtension++;
156 bool aEnd = a == '\0' || a == ' ';
157 bool bEnd = b == '\0';
158 if ( aEnd || bEnd) {
159 return aEnd == bEnd;
160 }
161 if ( a != b ) {
162 return false;
163 }
164 }
165 }
166
167 static const GLubyte*
nextExtension(const GLubyte * pExtensions)168 nextExtension(const GLubyte* pExtensions) {
169 while (true) {
170 char a = *pExtensions++;
171 if ( a == '\0') {
172 return pExtensions-1;
173 } else if ( a == ' ') {
174 return pExtensions;
175 }
176 }
177 }
178
179 static bool
checkForExtension(const GLubyte * pExtensions,const GLubyte * pExtension)180 checkForExtension(const GLubyte* pExtensions, const GLubyte* pExtension) {
181 for (;*pExtensions != '\0'; pExtensions = nextExtension(pExtensions)) {
182 if (extensionEqual(pExtensions, pExtension)) {
183 return true;
184 }
185 }
186 return false;
187 }
188
189 static bool
supportsExtension(JNIEnv * _env,jobject impl,jfieldID fieldId)190 supportsExtension(JNIEnv *_env, jobject impl, jfieldID fieldId) {
191 if (!_env->GetBooleanField(impl, haveCheckedExtensionsID)) {
192 _env->SetBooleanField(impl, haveCheckedExtensionsID, true);
193 const GLubyte* sExtensions = glGetString(GL_EXTENSIONS);
194 _env->SetBooleanField(impl, have_OES_blend_equation_separateID,
195 checkForExtension(sExtensions, (const GLubyte*) "GL_OES_blend_equation_separate"));
196 _env->SetBooleanField(impl, have_OES_blend_subtractID,
197 checkForExtension(sExtensions, (const GLubyte*) "GL_OES_blend_subtract"));
198 _env->SetBooleanField(impl, have_OES_framebuffer_objectID,
199 checkForExtension(sExtensions, (const GLubyte*) "GL_OES_framebuffer_object"));
200 _env->SetBooleanField(impl, have_OES_texture_cube_mapID,
201 checkForExtension(sExtensions, (const GLubyte*) "GL_OES_texture_cube_map"));
202 }
203 return _env->GetBooleanField(impl, fieldId);
204 }
205
206 // --------------------------------------------------------------------------
207 /* void glActiveTexture ( GLenum texture ) */
208 static void
android_glActiveTexture__I(JNIEnv * _env,jobject _this,jint texture)209 android_glActiveTexture__I
210 (JNIEnv *_env, jobject _this, jint texture) {
211 glActiveTexture(
212 (GLenum)texture
213 );
214 }
215
216 /* void glAlphaFunc ( GLenum func, GLclampf ref ) */
217 static void
android_glAlphaFunc__IF(JNIEnv * _env,jobject _this,jint func,jfloat ref)218 android_glAlphaFunc__IF
219 (JNIEnv *_env, jobject _this, jint func, jfloat ref) {
220 glAlphaFunc(
221 (GLenum)func,
222 (GLclampf)ref
223 );
224 }
225
226 /* void glAlphaFuncx ( GLenum func, GLclampx ref ) */
227 static void
android_glAlphaFuncx__II(JNIEnv * _env,jobject _this,jint func,jint ref)228 android_glAlphaFuncx__II
229 (JNIEnv *_env, jobject _this, jint func, jint ref) {
230 glAlphaFuncx(
231 (GLenum)func,
232 (GLclampx)ref
233 );
234 }
235
236 /* void glBindTexture ( GLenum target, GLuint texture ) */
237 static void
android_glBindTexture__II(JNIEnv * _env,jobject _this,jint target,jint texture)238 android_glBindTexture__II
239 (JNIEnv *_env, jobject _this, jint target, jint texture) {
240 glBindTexture(
241 (GLenum)target,
242 (GLuint)texture
243 );
244 }
245
246 /* void glBlendFunc ( GLenum sfactor, GLenum dfactor ) */
247 static void
android_glBlendFunc__II(JNIEnv * _env,jobject _this,jint sfactor,jint dfactor)248 android_glBlendFunc__II
249 (JNIEnv *_env, jobject _this, jint sfactor, jint dfactor) {
250 glBlendFunc(
251 (GLenum)sfactor,
252 (GLenum)dfactor
253 );
254 }
255
256 /* void glClear ( GLbitfield mask ) */
257 static void
android_glClear__I(JNIEnv * _env,jobject _this,jint mask)258 android_glClear__I
259 (JNIEnv *_env, jobject _this, jint mask) {
260 glClear(
261 (GLbitfield)mask
262 );
263 }
264
265 /* void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */
266 static void
android_glClearColor__FFFF(JNIEnv * _env,jobject _this,jfloat red,jfloat green,jfloat blue,jfloat alpha)267 android_glClearColor__FFFF
268 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
269 glClearColor(
270 (GLclampf)red,
271 (GLclampf)green,
272 (GLclampf)blue,
273 (GLclampf)alpha
274 );
275 }
276
277 /* void glClearColorx ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */
278 static void
android_glClearColorx__IIII(JNIEnv * _env,jobject _this,jint red,jint green,jint blue,jint alpha)279 android_glClearColorx__IIII
280 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
281 glClearColorx(
282 (GLclampx)red,
283 (GLclampx)green,
284 (GLclampx)blue,
285 (GLclampx)alpha
286 );
287 }
288
289 /* void glClearDepthf ( GLclampf depth ) */
290 static void
android_glClearDepthf__F(JNIEnv * _env,jobject _this,jfloat depth)291 android_glClearDepthf__F
292 (JNIEnv *_env, jobject _this, jfloat depth) {
293 glClearDepthf(
294 (GLclampf)depth
295 );
296 }
297
298 /* void glClearDepthx ( GLclampx depth ) */
299 static void
android_glClearDepthx__I(JNIEnv * _env,jobject _this,jint depth)300 android_glClearDepthx__I
301 (JNIEnv *_env, jobject _this, jint depth) {
302 glClearDepthx(
303 (GLclampx)depth
304 );
305 }
306
307 /* void glClearStencil ( GLint s ) */
308 static void
android_glClearStencil__I(JNIEnv * _env,jobject _this,jint s)309 android_glClearStencil__I
310 (JNIEnv *_env, jobject _this, jint s) {
311 glClearStencil(
312 (GLint)s
313 );
314 }
315
316 /* void glClientActiveTexture ( GLenum texture ) */
317 static void
android_glClientActiveTexture__I(JNIEnv * _env,jobject _this,jint texture)318 android_glClientActiveTexture__I
319 (JNIEnv *_env, jobject _this, jint texture) {
320 glClientActiveTexture(
321 (GLenum)texture
322 );
323 }
324
325 /* void glColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) */
326 static void
android_glColor4f__FFFF(JNIEnv * _env,jobject _this,jfloat red,jfloat green,jfloat blue,jfloat alpha)327 android_glColor4f__FFFF
328 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
329 glColor4f(
330 (GLfloat)red,
331 (GLfloat)green,
332 (GLfloat)blue,
333 (GLfloat)alpha
334 );
335 }
336
337 /* void glColor4x ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
338 static void
android_glColor4x__IIII(JNIEnv * _env,jobject _this,jint red,jint green,jint blue,jint alpha)339 android_glColor4x__IIII
340 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) {
341 glColor4x(
342 (GLfixed)red,
343 (GLfixed)green,
344 (GLfixed)blue,
345 (GLfixed)alpha
346 );
347 }
348
349 /* void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) */
350 static void
android_glColorMask__ZZZZ(JNIEnv * _env,jobject _this,jboolean red,jboolean green,jboolean blue,jboolean alpha)351 android_glColorMask__ZZZZ
352 (JNIEnv *_env, jobject _this, jboolean red, jboolean green, jboolean blue, jboolean alpha) {
353 glColorMask(
354 (GLboolean)red,
355 (GLboolean)green,
356 (GLboolean)blue,
357 (GLboolean)alpha
358 );
359 }
360
361 /* void glColorPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
362 static void
android_glColorPointerBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)363 android_glColorPointerBounds__IIILjava_nio_Buffer_2I
364 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
365 jint _exception = 0;
366 const char * _exceptionType = NULL;
367 const char * _exceptionMessage = NULL;
368 jarray _array = (jarray) 0;
369 jint _bufferOffset = (jint) 0;
370 jint _remaining;
371 GLvoid *pointer = (GLvoid *) 0;
372
373 if (pointer_buf) {
374 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
375 if ( ! pointer ) {
376 return;
377 }
378 }
379 glColorPointerBounds(
380 (GLint)size,
381 (GLenum)type,
382 (GLsizei)stride,
383 (GLvoid *)pointer,
384 (GLsizei)remaining
385 );
386 if (_exception) {
387 jniThrowException(_env, _exceptionType, _exceptionMessage);
388 }
389 }
390
391 /* void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) */
392 static void
android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jint level,jint internalformat,jint width,jint height,jint border,jint imageSize,jobject data_buf)393 android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
394 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
395 jint _exception = 0;
396 const char * _exceptionType = NULL;
397 const char * _exceptionMessage = NULL;
398 jarray _array = (jarray) 0;
399 jint _bufferOffset = (jint) 0;
400 jint _remaining;
401 GLvoid *data = (GLvoid *) 0;
402
403 if (!data_buf) {
404 _exception = 1;
405 _exceptionType = "java/lang/IllegalArgumentException";
406 _exceptionMessage = "data == null";
407 goto exit;
408 }
409 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
410 if (data == NULL) {
411 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
412 data = (GLvoid *) (_dataBase + _bufferOffset);
413 }
414 glCompressedTexImage2D(
415 (GLenum)target,
416 (GLint)level,
417 (GLenum)internalformat,
418 (GLsizei)width,
419 (GLsizei)height,
420 (GLint)border,
421 (GLsizei)imageSize,
422 (GLvoid *)data
423 );
424
425 exit:
426 if (_array) {
427 releasePointer(_env, _array, data, JNI_FALSE);
428 }
429 if (_exception) {
430 jniThrowException(_env, _exceptionType, _exceptionMessage);
431 }
432 }
433
434 /* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */
435 static void
android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jint level,jint xoffset,jint yoffset,jint width,jint height,jint format,jint imageSize,jobject data_buf)436 android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
437 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
438 jint _exception = 0;
439 const char * _exceptionType = NULL;
440 const char * _exceptionMessage = NULL;
441 jarray _array = (jarray) 0;
442 jint _bufferOffset = (jint) 0;
443 jint _remaining;
444 GLvoid *data = (GLvoid *) 0;
445
446 if (!data_buf) {
447 _exception = 1;
448 _exceptionType = "java/lang/IllegalArgumentException";
449 _exceptionMessage = "data == null";
450 goto exit;
451 }
452 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
453 if (data == NULL) {
454 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
455 data = (GLvoid *) (_dataBase + _bufferOffset);
456 }
457 glCompressedTexSubImage2D(
458 (GLenum)target,
459 (GLint)level,
460 (GLint)xoffset,
461 (GLint)yoffset,
462 (GLsizei)width,
463 (GLsizei)height,
464 (GLenum)format,
465 (GLsizei)imageSize,
466 (GLvoid *)data
467 );
468
469 exit:
470 if (_array) {
471 releasePointer(_env, _array, data, JNI_FALSE);
472 }
473 if (_exception) {
474 jniThrowException(_env, _exceptionType, _exceptionMessage);
475 }
476 }
477
478 /* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */
479 static void
android_glCopyTexImage2D__IIIIIIII(JNIEnv * _env,jobject _this,jint target,jint level,jint internalformat,jint x,jint y,jint width,jint height,jint border)480 android_glCopyTexImage2D__IIIIIIII
481 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) {
482 glCopyTexImage2D(
483 (GLenum)target,
484 (GLint)level,
485 (GLenum)internalformat,
486 (GLint)x,
487 (GLint)y,
488 (GLsizei)width,
489 (GLsizei)height,
490 (GLint)border
491 );
492 }
493
494 /* void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
495 static void
android_glCopyTexSubImage2D__IIIIIIII(JNIEnv * _env,jobject _this,jint target,jint level,jint xoffset,jint yoffset,jint x,jint y,jint width,jint height)496 android_glCopyTexSubImage2D__IIIIIIII
497 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) {
498 glCopyTexSubImage2D(
499 (GLenum)target,
500 (GLint)level,
501 (GLint)xoffset,
502 (GLint)yoffset,
503 (GLint)x,
504 (GLint)y,
505 (GLsizei)width,
506 (GLsizei)height
507 );
508 }
509
510 /* void glCullFace ( GLenum mode ) */
511 static void
android_glCullFace__I(JNIEnv * _env,jobject _this,jint mode)512 android_glCullFace__I
513 (JNIEnv *_env, jobject _this, jint mode) {
514 glCullFace(
515 (GLenum)mode
516 );
517 }
518
519 /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
520 static void
android_glDeleteTextures__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray textures_ref,jint offset)521 android_glDeleteTextures__I_3II
522 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
523 jint _exception = 0;
524 const char * _exceptionType = NULL;
525 const char * _exceptionMessage = NULL;
526 GLuint *textures_base = (GLuint *) 0;
527 jint _remaining;
528 GLuint *textures = (GLuint *) 0;
529
530 if (!textures_ref) {
531 _exception = 1;
532 _exceptionType = "java/lang/IllegalArgumentException";
533 _exceptionMessage = "textures == null";
534 goto exit;
535 }
536 if (offset < 0) {
537 _exception = 1;
538 _exceptionType = "java/lang/IllegalArgumentException";
539 _exceptionMessage = "offset < 0";
540 goto exit;
541 }
542 _remaining = _env->GetArrayLength(textures_ref) - offset;
543 if (_remaining < n) {
544 _exception = 1;
545 _exceptionType = "java/lang/IllegalArgumentException";
546 _exceptionMessage = "length - offset < n < needed";
547 goto exit;
548 }
549 textures_base = (GLuint *)
550 _env->GetIntArrayElements(textures_ref, (jboolean *)0);
551 textures = textures_base + offset;
552
553 glDeleteTextures(
554 (GLsizei)n,
555 (GLuint *)textures
556 );
557
558 exit:
559 if (textures_base) {
560 _env->ReleaseIntArrayElements(textures_ref, (jint*)textures_base,
561 JNI_ABORT);
562 }
563 if (_exception) {
564 jniThrowException(_env, _exceptionType, _exceptionMessage);
565 }
566 }
567
568 /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
569 static void
android_glDeleteTextures__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject textures_buf)570 android_glDeleteTextures__ILjava_nio_IntBuffer_2
571 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
572 jint _exception = 0;
573 const char * _exceptionType = NULL;
574 const char * _exceptionMessage = NULL;
575 jintArray _array = (jintArray) 0;
576 jint _bufferOffset = (jint) 0;
577 jint _remaining;
578 GLuint *textures = (GLuint *) 0;
579
580 if (!textures_buf) {
581 _exception = 1;
582 _exceptionType = "java/lang/IllegalArgumentException";
583 _exceptionMessage = "textures == null";
584 goto exit;
585 }
586 textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
587 if (_remaining < n) {
588 _exception = 1;
589 _exceptionType = "java/lang/IllegalArgumentException";
590 _exceptionMessage = "remaining() < n < needed";
591 goto exit;
592 }
593 if (textures == NULL) {
594 char * _texturesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
595 textures = (GLuint *) (_texturesBase + _bufferOffset);
596 }
597 glDeleteTextures(
598 (GLsizei)n,
599 (GLuint *)textures
600 );
601
602 exit:
603 if (_array) {
604 _env->ReleaseIntArrayElements(_array, (jint*)textures, JNI_ABORT);
605 }
606 if (_exception) {
607 jniThrowException(_env, _exceptionType, _exceptionMessage);
608 }
609 }
610
611 /* void glDepthFunc ( GLenum func ) */
612 static void
android_glDepthFunc__I(JNIEnv * _env,jobject _this,jint func)613 android_glDepthFunc__I
614 (JNIEnv *_env, jobject _this, jint func) {
615 glDepthFunc(
616 (GLenum)func
617 );
618 }
619
620 /* void glDepthMask ( GLboolean flag ) */
621 static void
android_glDepthMask__Z(JNIEnv * _env,jobject _this,jboolean flag)622 android_glDepthMask__Z
623 (JNIEnv *_env, jobject _this, jboolean flag) {
624 glDepthMask(
625 (GLboolean)flag
626 );
627 }
628
629 /* void glDepthRangef ( GLclampf zNear, GLclampf zFar ) */
630 static void
android_glDepthRangef__FF(JNIEnv * _env,jobject _this,jfloat zNear,jfloat zFar)631 android_glDepthRangef__FF
632 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
633 glDepthRangef(
634 (GLclampf)zNear,
635 (GLclampf)zFar
636 );
637 }
638
639 /* void glDepthRangex ( GLclampx zNear, GLclampx zFar ) */
640 static void
android_glDepthRangex__II(JNIEnv * _env,jobject _this,jint zNear,jint zFar)641 android_glDepthRangex__II
642 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) {
643 glDepthRangex(
644 (GLclampx)zNear,
645 (GLclampx)zFar
646 );
647 }
648
649 /* void glDisable ( GLenum cap ) */
650 static void
android_glDisable__I(JNIEnv * _env,jobject _this,jint cap)651 android_glDisable__I
652 (JNIEnv *_env, jobject _this, jint cap) {
653 glDisable(
654 (GLenum)cap
655 );
656 }
657
658 /* void glDisableClientState ( GLenum array ) */
659 static void
android_glDisableClientState__I(JNIEnv * _env,jobject _this,jint array)660 android_glDisableClientState__I
661 (JNIEnv *_env, jobject _this, jint array) {
662 glDisableClientState(
663 (GLenum)array
664 );
665 }
666
667 /* void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) */
668 static void
android_glDrawArrays__III(JNIEnv * _env,jobject _this,jint mode,jint first,jint count)669 android_glDrawArrays__III
670 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count) {
671 glDrawArrays(
672 (GLenum)mode,
673 (GLint)first,
674 (GLsizei)count
675 );
676 }
677
678 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
679 static void
android_glDrawElements__IIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jobject indices_buf)680 android_glDrawElements__IIILjava_nio_Buffer_2
681 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) {
682 jint _exception = 0;
683 const char * _exceptionType = NULL;
684 const char * _exceptionMessage = NULL;
685 jarray _array = (jarray) 0;
686 jint _bufferOffset = (jint) 0;
687 jint _remaining;
688 GLvoid *indices = (GLvoid *) 0;
689
690 if (!indices_buf) {
691 _exception = 1;
692 _exceptionType = "java/lang/IllegalArgumentException";
693 _exceptionMessage = "indices == null";
694 goto exit;
695 }
696 indices = (GLvoid *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
697 if (_remaining < count) {
698 _exception = 1;
699 _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
700 _exceptionMessage = "remaining() < count < needed";
701 goto exit;
702 }
703 if (indices == NULL) {
704 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
705 indices = (GLvoid *) (_indicesBase + _bufferOffset);
706 }
707 glDrawElements(
708 (GLenum)mode,
709 (GLsizei)count,
710 (GLenum)type,
711 (GLvoid *)indices
712 );
713
714 exit:
715 if (_array) {
716 releasePointer(_env, _array, indices, JNI_FALSE);
717 }
718 if (_exception) {
719 jniThrowException(_env, _exceptionType, _exceptionMessage);
720 }
721 }
722
723 /* void glEnable ( GLenum cap ) */
724 static void
android_glEnable__I(JNIEnv * _env,jobject _this,jint cap)725 android_glEnable__I
726 (JNIEnv *_env, jobject _this, jint cap) {
727 glEnable(
728 (GLenum)cap
729 );
730 }
731
732 /* void glEnableClientState ( GLenum array ) */
733 static void
android_glEnableClientState__I(JNIEnv * _env,jobject _this,jint array)734 android_glEnableClientState__I
735 (JNIEnv *_env, jobject _this, jint array) {
736 glEnableClientState(
737 (GLenum)array
738 );
739 }
740
741 /* void glFinish ( void ) */
742 static void
android_glFinish__(JNIEnv * _env,jobject _this)743 android_glFinish__
744 (JNIEnv *_env, jobject _this) {
745 glFinish();
746 }
747
748 /* void glFlush ( void ) */
749 static void
android_glFlush__(JNIEnv * _env,jobject _this)750 android_glFlush__
751 (JNIEnv *_env, jobject _this) {
752 glFlush();
753 }
754
755 /* void glFogf ( GLenum pname, GLfloat param ) */
756 static void
android_glFogf__IF(JNIEnv * _env,jobject _this,jint pname,jfloat param)757 android_glFogf__IF
758 (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
759 glFogf(
760 (GLenum)pname,
761 (GLfloat)param
762 );
763 }
764
765 /* void glFogfv ( GLenum pname, const GLfloat *params ) */
766 static void
android_glFogfv__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray params_ref,jint offset)767 android_glFogfv__I_3FI
768 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
769 jint _exception = 0;
770 const char * _exceptionType = NULL;
771 const char * _exceptionMessage = NULL;
772 GLfloat *params_base = (GLfloat *) 0;
773 jint _remaining;
774 GLfloat *params = (GLfloat *) 0;
775
776 if (!params_ref) {
777 _exception = 1;
778 _exceptionType = "java/lang/IllegalArgumentException";
779 _exceptionMessage = "params == null";
780 goto exit;
781 }
782 if (offset < 0) {
783 _exception = 1;
784 _exceptionType = "java/lang/IllegalArgumentException";
785 _exceptionMessage = "offset < 0";
786 goto exit;
787 }
788 _remaining = _env->GetArrayLength(params_ref) - offset;
789 int _needed;
790 switch (pname) {
791 #if defined(GL_FOG_MODE)
792 case GL_FOG_MODE:
793 #endif // defined(GL_FOG_MODE)
794 #if defined(GL_FOG_DENSITY)
795 case GL_FOG_DENSITY:
796 #endif // defined(GL_FOG_DENSITY)
797 #if defined(GL_FOG_START)
798 case GL_FOG_START:
799 #endif // defined(GL_FOG_START)
800 #if defined(GL_FOG_END)
801 case GL_FOG_END:
802 #endif // defined(GL_FOG_END)
803 _needed = 1;
804 break;
805 #if defined(GL_FOG_COLOR)
806 case GL_FOG_COLOR:
807 #endif // defined(GL_FOG_COLOR)
808 _needed = 4;
809 break;
810 default:
811 _needed = 1;
812 break;
813 }
814 if (_remaining < _needed) {
815 _exception = 1;
816 _exceptionType = "java/lang/IllegalArgumentException";
817 _exceptionMessage = "length - offset < needed";
818 goto exit;
819 }
820 params_base = (GLfloat *)
821 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
822 params = params_base + offset;
823
824 glFogfv(
825 (GLenum)pname,
826 (GLfloat *)params
827 );
828
829 exit:
830 if (params_base) {
831 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
832 JNI_ABORT);
833 }
834 if (_exception) {
835 jniThrowException(_env, _exceptionType, _exceptionMessage);
836 }
837 }
838
839 /* void glFogfv ( GLenum pname, const GLfloat *params ) */
840 static void
android_glFogfv__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)841 android_glFogfv__ILjava_nio_FloatBuffer_2
842 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
843 jint _exception = 0;
844 const char * _exceptionType = NULL;
845 const char * _exceptionMessage = NULL;
846 jfloatArray _array = (jfloatArray) 0;
847 jint _bufferOffset = (jint) 0;
848 jint _remaining;
849 GLfloat *params = (GLfloat *) 0;
850
851 if (!params_buf) {
852 _exception = 1;
853 _exceptionType = "java/lang/IllegalArgumentException";
854 _exceptionMessage = "params == null";
855 goto exit;
856 }
857 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
858 int _needed;
859 switch (pname) {
860 #if defined(GL_FOG_MODE)
861 case GL_FOG_MODE:
862 #endif // defined(GL_FOG_MODE)
863 #if defined(GL_FOG_DENSITY)
864 case GL_FOG_DENSITY:
865 #endif // defined(GL_FOG_DENSITY)
866 #if defined(GL_FOG_START)
867 case GL_FOG_START:
868 #endif // defined(GL_FOG_START)
869 #if defined(GL_FOG_END)
870 case GL_FOG_END:
871 #endif // defined(GL_FOG_END)
872 _needed = 1;
873 break;
874 #if defined(GL_FOG_COLOR)
875 case GL_FOG_COLOR:
876 #endif // defined(GL_FOG_COLOR)
877 _needed = 4;
878 break;
879 default:
880 _needed = 1;
881 break;
882 }
883 if (_remaining < _needed) {
884 _exception = 1;
885 _exceptionType = "java/lang/IllegalArgumentException";
886 _exceptionMessage = "remaining() < needed";
887 goto exit;
888 }
889 if (params == NULL) {
890 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
891 params = (GLfloat *) (_paramsBase + _bufferOffset);
892 }
893 glFogfv(
894 (GLenum)pname,
895 (GLfloat *)params
896 );
897
898 exit:
899 if (_array) {
900 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
901 }
902 if (_exception) {
903 jniThrowException(_env, _exceptionType, _exceptionMessage);
904 }
905 }
906
907 /* void glFogx ( GLenum pname, GLfixed param ) */
908 static void
android_glFogx__II(JNIEnv * _env,jobject _this,jint pname,jint param)909 android_glFogx__II
910 (JNIEnv *_env, jobject _this, jint pname, jint param) {
911 glFogx(
912 (GLenum)pname,
913 (GLfixed)param
914 );
915 }
916
917 /* void glFogxv ( GLenum pname, const GLfixed *params ) */
918 static void
android_glFogxv__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)919 android_glFogxv__I_3II
920 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
921 jint _exception = 0;
922 const char * _exceptionType = NULL;
923 const char * _exceptionMessage = NULL;
924 GLfixed *params_base = (GLfixed *) 0;
925 jint _remaining;
926 GLfixed *params = (GLfixed *) 0;
927
928 if (!params_ref) {
929 _exception = 1;
930 _exceptionType = "java/lang/IllegalArgumentException";
931 _exceptionMessage = "params == null";
932 goto exit;
933 }
934 if (offset < 0) {
935 _exception = 1;
936 _exceptionType = "java/lang/IllegalArgumentException";
937 _exceptionMessage = "offset < 0";
938 goto exit;
939 }
940 _remaining = _env->GetArrayLength(params_ref) - offset;
941 int _needed;
942 switch (pname) {
943 #if defined(GL_FOG_MODE)
944 case GL_FOG_MODE:
945 #endif // defined(GL_FOG_MODE)
946 #if defined(GL_FOG_DENSITY)
947 case GL_FOG_DENSITY:
948 #endif // defined(GL_FOG_DENSITY)
949 #if defined(GL_FOG_START)
950 case GL_FOG_START:
951 #endif // defined(GL_FOG_START)
952 #if defined(GL_FOG_END)
953 case GL_FOG_END:
954 #endif // defined(GL_FOG_END)
955 _needed = 1;
956 break;
957 #if defined(GL_FOG_COLOR)
958 case GL_FOG_COLOR:
959 #endif // defined(GL_FOG_COLOR)
960 _needed = 4;
961 break;
962 default:
963 _needed = 1;
964 break;
965 }
966 if (_remaining < _needed) {
967 _exception = 1;
968 _exceptionType = "java/lang/IllegalArgumentException";
969 _exceptionMessage = "length - offset < needed";
970 goto exit;
971 }
972 params_base = (GLfixed *)
973 _env->GetIntArrayElements(params_ref, (jboolean *)0);
974 params = params_base + offset;
975
976 glFogxv(
977 (GLenum)pname,
978 (GLfixed *)params
979 );
980
981 exit:
982 if (params_base) {
983 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
984 JNI_ABORT);
985 }
986 if (_exception) {
987 jniThrowException(_env, _exceptionType, _exceptionMessage);
988 }
989 }
990
991 /* void glFogxv ( GLenum pname, const GLfixed *params ) */
992 static void
android_glFogxv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)993 android_glFogxv__ILjava_nio_IntBuffer_2
994 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
995 jint _exception = 0;
996 const char * _exceptionType = NULL;
997 const char * _exceptionMessage = NULL;
998 jintArray _array = (jintArray) 0;
999 jint _bufferOffset = (jint) 0;
1000 jint _remaining;
1001 GLfixed *params = (GLfixed *) 0;
1002
1003 if (!params_buf) {
1004 _exception = 1;
1005 _exceptionType = "java/lang/IllegalArgumentException";
1006 _exceptionMessage = "params == null";
1007 goto exit;
1008 }
1009 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1010 int _needed;
1011 switch (pname) {
1012 #if defined(GL_FOG_MODE)
1013 case GL_FOG_MODE:
1014 #endif // defined(GL_FOG_MODE)
1015 #if defined(GL_FOG_DENSITY)
1016 case GL_FOG_DENSITY:
1017 #endif // defined(GL_FOG_DENSITY)
1018 #if defined(GL_FOG_START)
1019 case GL_FOG_START:
1020 #endif // defined(GL_FOG_START)
1021 #if defined(GL_FOG_END)
1022 case GL_FOG_END:
1023 #endif // defined(GL_FOG_END)
1024 _needed = 1;
1025 break;
1026 #if defined(GL_FOG_COLOR)
1027 case GL_FOG_COLOR:
1028 #endif // defined(GL_FOG_COLOR)
1029 _needed = 4;
1030 break;
1031 default:
1032 _needed = 1;
1033 break;
1034 }
1035 if (_remaining < _needed) {
1036 _exception = 1;
1037 _exceptionType = "java/lang/IllegalArgumentException";
1038 _exceptionMessage = "remaining() < needed";
1039 goto exit;
1040 }
1041 if (params == NULL) {
1042 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1043 params = (GLfixed *) (_paramsBase + _bufferOffset);
1044 }
1045 glFogxv(
1046 (GLenum)pname,
1047 (GLfixed *)params
1048 );
1049
1050 exit:
1051 if (_array) {
1052 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
1053 }
1054 if (_exception) {
1055 jniThrowException(_env, _exceptionType, _exceptionMessage);
1056 }
1057 }
1058
1059 /* void glFrontFace ( GLenum mode ) */
1060 static void
android_glFrontFace__I(JNIEnv * _env,jobject _this,jint mode)1061 android_glFrontFace__I
1062 (JNIEnv *_env, jobject _this, jint mode) {
1063 glFrontFace(
1064 (GLenum)mode
1065 );
1066 }
1067
1068 /* void glFrustumf ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
1069 static void
android_glFrustumf__FFFFFF(JNIEnv * _env,jobject _this,jfloat left,jfloat right,jfloat bottom,jfloat top,jfloat zNear,jfloat zFar)1070 android_glFrustumf__FFFFFF
1071 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
1072 glFrustumf(
1073 (GLfloat)left,
1074 (GLfloat)right,
1075 (GLfloat)bottom,
1076 (GLfloat)top,
1077 (GLfloat)zNear,
1078 (GLfloat)zFar
1079 );
1080 }
1081
1082 /* void glFrustumx ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
1083 static void
android_glFrustumx__IIIIII(JNIEnv * _env,jobject _this,jint left,jint right,jint bottom,jint top,jint zNear,jint zFar)1084 android_glFrustumx__IIIIII
1085 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
1086 glFrustumx(
1087 (GLfixed)left,
1088 (GLfixed)right,
1089 (GLfixed)bottom,
1090 (GLfixed)top,
1091 (GLfixed)zNear,
1092 (GLfixed)zFar
1093 );
1094 }
1095
1096 /* void glGenTextures ( GLsizei n, GLuint *textures ) */
1097 static void
android_glGenTextures__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray textures_ref,jint offset)1098 android_glGenTextures__I_3II
1099 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
1100 jint _exception = 0;
1101 const char * _exceptionType = NULL;
1102 const char * _exceptionMessage = NULL;
1103 GLuint *textures_base = (GLuint *) 0;
1104 jint _remaining;
1105 GLuint *textures = (GLuint *) 0;
1106
1107 if (!textures_ref) {
1108 _exception = 1;
1109 _exceptionType = "java/lang/IllegalArgumentException";
1110 _exceptionMessage = "textures == null";
1111 goto exit;
1112 }
1113 if (offset < 0) {
1114 _exception = 1;
1115 _exceptionType = "java/lang/IllegalArgumentException";
1116 _exceptionMessage = "offset < 0";
1117 goto exit;
1118 }
1119 _remaining = _env->GetArrayLength(textures_ref) - offset;
1120 if (_remaining < n) {
1121 _exception = 1;
1122 _exceptionType = "java/lang/IllegalArgumentException";
1123 _exceptionMessage = "length - offset < n < needed";
1124 goto exit;
1125 }
1126 textures_base = (GLuint *)
1127 _env->GetIntArrayElements(textures_ref, (jboolean *)0);
1128 textures = textures_base + offset;
1129
1130 glGenTextures(
1131 (GLsizei)n,
1132 (GLuint *)textures
1133 );
1134
1135 exit:
1136 if (textures_base) {
1137 _env->ReleaseIntArrayElements(textures_ref, (jint*)textures_base,
1138 _exception ? JNI_ABORT: 0);
1139 }
1140 if (_exception) {
1141 jniThrowException(_env, _exceptionType, _exceptionMessage);
1142 }
1143 }
1144
1145 /* void glGenTextures ( GLsizei n, GLuint *textures ) */
1146 static void
android_glGenTextures__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject textures_buf)1147 android_glGenTextures__ILjava_nio_IntBuffer_2
1148 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
1149 jint _exception = 0;
1150 const char * _exceptionType = NULL;
1151 const char * _exceptionMessage = NULL;
1152 jintArray _array = (jintArray) 0;
1153 jint _bufferOffset = (jint) 0;
1154 jint _remaining;
1155 GLuint *textures = (GLuint *) 0;
1156
1157 if (!textures_buf) {
1158 _exception = 1;
1159 _exceptionType = "java/lang/IllegalArgumentException";
1160 _exceptionMessage = "textures == null";
1161 goto exit;
1162 }
1163 textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1164 if (_remaining < n) {
1165 _exception = 1;
1166 _exceptionType = "java/lang/IllegalArgumentException";
1167 _exceptionMessage = "remaining() < n < needed";
1168 goto exit;
1169 }
1170 if (textures == NULL) {
1171 char * _texturesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1172 textures = (GLuint *) (_texturesBase + _bufferOffset);
1173 }
1174 glGenTextures(
1175 (GLsizei)n,
1176 (GLuint *)textures
1177 );
1178
1179 exit:
1180 if (_array) {
1181 _env->ReleaseIntArrayElements(_array, (jint*)textures, _exception ? JNI_ABORT : 0);
1182 }
1183 if (_exception) {
1184 jniThrowException(_env, _exceptionType, _exceptionMessage);
1185 }
1186 }
1187
1188 /* GLenum glGetError ( void ) */
1189 static jint
android_glGetError__(JNIEnv * _env,jobject _this)1190 android_glGetError__
1191 (JNIEnv *_env, jobject _this) {
1192 GLenum _returnValue;
1193 _returnValue = glGetError();
1194 return (jint)_returnValue;
1195 }
1196
1197 /* void glGetIntegerv ( GLenum pname, GLint *params ) */
1198 static void
android_glGetIntegerv__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)1199 android_glGetIntegerv__I_3II
1200 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
1201 jint _exception = 0;
1202 const char * _exceptionType = NULL;
1203 const char * _exceptionMessage = NULL;
1204 GLint *params_base = (GLint *) 0;
1205 jint _remaining;
1206 GLint *params = (GLint *) 0;
1207
1208 if (!params_ref) {
1209 _exception = 1;
1210 _exceptionType = "java/lang/IllegalArgumentException";
1211 _exceptionMessage = "params == null";
1212 goto exit;
1213 }
1214 if (offset < 0) {
1215 _exception = 1;
1216 _exceptionType = "java/lang/IllegalArgumentException";
1217 _exceptionMessage = "offset < 0";
1218 goto exit;
1219 }
1220 _remaining = _env->GetArrayLength(params_ref) - offset;
1221 int _needed;
1222 switch (pname) {
1223 #if defined(GL_ALPHA_BITS)
1224 case GL_ALPHA_BITS:
1225 #endif // defined(GL_ALPHA_BITS)
1226 #if defined(GL_ALPHA_TEST_FUNC)
1227 case GL_ALPHA_TEST_FUNC:
1228 #endif // defined(GL_ALPHA_TEST_FUNC)
1229 #if defined(GL_ALPHA_TEST_REF)
1230 case GL_ALPHA_TEST_REF:
1231 #endif // defined(GL_ALPHA_TEST_REF)
1232 #if defined(GL_BLEND_DST)
1233 case GL_BLEND_DST:
1234 #endif // defined(GL_BLEND_DST)
1235 #if defined(GL_BLUE_BITS)
1236 case GL_BLUE_BITS:
1237 #endif // defined(GL_BLUE_BITS)
1238 #if defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1239 case GL_COLOR_ARRAY_BUFFER_BINDING:
1240 #endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1241 #if defined(GL_COLOR_ARRAY_SIZE)
1242 case GL_COLOR_ARRAY_SIZE:
1243 #endif // defined(GL_COLOR_ARRAY_SIZE)
1244 #if defined(GL_COLOR_ARRAY_STRIDE)
1245 case GL_COLOR_ARRAY_STRIDE:
1246 #endif // defined(GL_COLOR_ARRAY_STRIDE)
1247 #if defined(GL_COLOR_ARRAY_TYPE)
1248 case GL_COLOR_ARRAY_TYPE:
1249 #endif // defined(GL_COLOR_ARRAY_TYPE)
1250 #if defined(GL_CULL_FACE)
1251 case GL_CULL_FACE:
1252 #endif // defined(GL_CULL_FACE)
1253 #if defined(GL_DEPTH_BITS)
1254 case GL_DEPTH_BITS:
1255 #endif // defined(GL_DEPTH_BITS)
1256 #if defined(GL_DEPTH_CLEAR_VALUE)
1257 case GL_DEPTH_CLEAR_VALUE:
1258 #endif // defined(GL_DEPTH_CLEAR_VALUE)
1259 #if defined(GL_DEPTH_FUNC)
1260 case GL_DEPTH_FUNC:
1261 #endif // defined(GL_DEPTH_FUNC)
1262 #if defined(GL_DEPTH_WRITEMASK)
1263 case GL_DEPTH_WRITEMASK:
1264 #endif // defined(GL_DEPTH_WRITEMASK)
1265 #if defined(GL_FOG_DENSITY)
1266 case GL_FOG_DENSITY:
1267 #endif // defined(GL_FOG_DENSITY)
1268 #if defined(GL_FOG_END)
1269 case GL_FOG_END:
1270 #endif // defined(GL_FOG_END)
1271 #if defined(GL_FOG_MODE)
1272 case GL_FOG_MODE:
1273 #endif // defined(GL_FOG_MODE)
1274 #if defined(GL_FOG_START)
1275 case GL_FOG_START:
1276 #endif // defined(GL_FOG_START)
1277 #if defined(GL_FRONT_FACE)
1278 case GL_FRONT_FACE:
1279 #endif // defined(GL_FRONT_FACE)
1280 #if defined(GL_GREEN_BITS)
1281 case GL_GREEN_BITS:
1282 #endif // defined(GL_GREEN_BITS)
1283 #if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1284 case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
1285 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1286 #if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1287 case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
1288 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1289 #if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1290 case GL_LIGHT_MODEL_COLOR_CONTROL:
1291 #endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1292 #if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1293 case GL_LIGHT_MODEL_LOCAL_VIEWER:
1294 #endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1295 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
1296 case GL_LIGHT_MODEL_TWO_SIDE:
1297 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1298 #if defined(GL_LINE_SMOOTH_HINT)
1299 case GL_LINE_SMOOTH_HINT:
1300 #endif // defined(GL_LINE_SMOOTH_HINT)
1301 #if defined(GL_LINE_WIDTH)
1302 case GL_LINE_WIDTH:
1303 #endif // defined(GL_LINE_WIDTH)
1304 #if defined(GL_LOGIC_OP_MODE)
1305 case GL_LOGIC_OP_MODE:
1306 #endif // defined(GL_LOGIC_OP_MODE)
1307 #if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1308 case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES:
1309 #endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1310 #if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1311 case GL_MATRIX_INDEX_ARRAY_SIZE_OES:
1312 #endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1313 #if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1314 case GL_MATRIX_INDEX_ARRAY_STRIDE_OES:
1315 #endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1316 #if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1317 case GL_MATRIX_INDEX_ARRAY_TYPE_OES:
1318 #endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1319 #if defined(GL_MATRIX_MODE)
1320 case GL_MATRIX_MODE:
1321 #endif // defined(GL_MATRIX_MODE)
1322 #if defined(GL_MAX_CLIP_PLANES)
1323 case GL_MAX_CLIP_PLANES:
1324 #endif // defined(GL_MAX_CLIP_PLANES)
1325 #if defined(GL_MAX_ELEMENTS_INDICES)
1326 case GL_MAX_ELEMENTS_INDICES:
1327 #endif // defined(GL_MAX_ELEMENTS_INDICES)
1328 #if defined(GL_MAX_ELEMENTS_VERTICES)
1329 case GL_MAX_ELEMENTS_VERTICES:
1330 #endif // defined(GL_MAX_ELEMENTS_VERTICES)
1331 #if defined(GL_MAX_LIGHTS)
1332 case GL_MAX_LIGHTS:
1333 #endif // defined(GL_MAX_LIGHTS)
1334 #if defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1335 case GL_MAX_MODELVIEW_STACK_DEPTH:
1336 #endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1337 #if defined(GL_MAX_PALETTE_MATRICES_OES)
1338 case GL_MAX_PALETTE_MATRICES_OES:
1339 #endif // defined(GL_MAX_PALETTE_MATRICES_OES)
1340 #if defined(GL_MAX_PROJECTION_STACK_DEPTH)
1341 case GL_MAX_PROJECTION_STACK_DEPTH:
1342 #endif // defined(GL_MAX_PROJECTION_STACK_DEPTH)
1343 #if defined(GL_MAX_TEXTURE_SIZE)
1344 case GL_MAX_TEXTURE_SIZE:
1345 #endif // defined(GL_MAX_TEXTURE_SIZE)
1346 #if defined(GL_MAX_TEXTURE_STACK_DEPTH)
1347 case GL_MAX_TEXTURE_STACK_DEPTH:
1348 #endif // defined(GL_MAX_TEXTURE_STACK_DEPTH)
1349 #if defined(GL_MAX_TEXTURE_UNITS)
1350 case GL_MAX_TEXTURE_UNITS:
1351 #endif // defined(GL_MAX_TEXTURE_UNITS)
1352 #if defined(GL_MAX_VERTEX_UNITS_OES)
1353 case GL_MAX_VERTEX_UNITS_OES:
1354 #endif // defined(GL_MAX_VERTEX_UNITS_OES)
1355 #if defined(GL_MODELVIEW_STACK_DEPTH)
1356 case GL_MODELVIEW_STACK_DEPTH:
1357 #endif // defined(GL_MODELVIEW_STACK_DEPTH)
1358 #if defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1359 case GL_NORMAL_ARRAY_BUFFER_BINDING:
1360 #endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1361 #if defined(GL_NORMAL_ARRAY_STRIDE)
1362 case GL_NORMAL_ARRAY_STRIDE:
1363 #endif // defined(GL_NORMAL_ARRAY_STRIDE)
1364 #if defined(GL_NORMAL_ARRAY_TYPE)
1365 case GL_NORMAL_ARRAY_TYPE:
1366 #endif // defined(GL_NORMAL_ARRAY_TYPE)
1367 #if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1368 case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
1369 #endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1370 #if defined(GL_PACK_ALIGNMENT)
1371 case GL_PACK_ALIGNMENT:
1372 #endif // defined(GL_PACK_ALIGNMENT)
1373 #if defined(GL_PERSPECTIVE_CORRECTION_HINT)
1374 case GL_PERSPECTIVE_CORRECTION_HINT:
1375 #endif // defined(GL_PERSPECTIVE_CORRECTION_HINT)
1376 #if defined(GL_POINT_SIZE)
1377 case GL_POINT_SIZE:
1378 #endif // defined(GL_POINT_SIZE)
1379 #if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1380 case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
1381 #endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1382 #if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1383 case GL_POINT_SIZE_ARRAY_STRIDE_OES:
1384 #endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1385 #if defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1386 case GL_POINT_SIZE_ARRAY_TYPE_OES:
1387 #endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1388 #if defined(GL_POINT_SMOOTH_HINT)
1389 case GL_POINT_SMOOTH_HINT:
1390 #endif // defined(GL_POINT_SMOOTH_HINT)
1391 #if defined(GL_POLYGON_OFFSET_FACTOR)
1392 case GL_POLYGON_OFFSET_FACTOR:
1393 #endif // defined(GL_POLYGON_OFFSET_FACTOR)
1394 #if defined(GL_POLYGON_OFFSET_UNITS)
1395 case GL_POLYGON_OFFSET_UNITS:
1396 #endif // defined(GL_POLYGON_OFFSET_UNITS)
1397 #if defined(GL_PROJECTION_STACK_DEPTH)
1398 case GL_PROJECTION_STACK_DEPTH:
1399 #endif // defined(GL_PROJECTION_STACK_DEPTH)
1400 #if defined(GL_RED_BITS)
1401 case GL_RED_BITS:
1402 #endif // defined(GL_RED_BITS)
1403 #if defined(GL_SHADE_MODEL)
1404 case GL_SHADE_MODEL:
1405 #endif // defined(GL_SHADE_MODEL)
1406 #if defined(GL_STENCIL_BITS)
1407 case GL_STENCIL_BITS:
1408 #endif // defined(GL_STENCIL_BITS)
1409 #if defined(GL_STENCIL_CLEAR_VALUE)
1410 case GL_STENCIL_CLEAR_VALUE:
1411 #endif // defined(GL_STENCIL_CLEAR_VALUE)
1412 #if defined(GL_STENCIL_FAIL)
1413 case GL_STENCIL_FAIL:
1414 #endif // defined(GL_STENCIL_FAIL)
1415 #if defined(GL_STENCIL_FUNC)
1416 case GL_STENCIL_FUNC:
1417 #endif // defined(GL_STENCIL_FUNC)
1418 #if defined(GL_STENCIL_PASS_DEPTH_FAIL)
1419 case GL_STENCIL_PASS_DEPTH_FAIL:
1420 #endif // defined(GL_STENCIL_PASS_DEPTH_FAIL)
1421 #if defined(GL_STENCIL_PASS_DEPTH_PASS)
1422 case GL_STENCIL_PASS_DEPTH_PASS:
1423 #endif // defined(GL_STENCIL_PASS_DEPTH_PASS)
1424 #if defined(GL_STENCIL_REF)
1425 case GL_STENCIL_REF:
1426 #endif // defined(GL_STENCIL_REF)
1427 #if defined(GL_STENCIL_VALUE_MASK)
1428 case GL_STENCIL_VALUE_MASK:
1429 #endif // defined(GL_STENCIL_VALUE_MASK)
1430 #if defined(GL_STENCIL_WRITEMASK)
1431 case GL_STENCIL_WRITEMASK:
1432 #endif // defined(GL_STENCIL_WRITEMASK)
1433 #if defined(GL_SUBPIXEL_BITS)
1434 case GL_SUBPIXEL_BITS:
1435 #endif // defined(GL_SUBPIXEL_BITS)
1436 #if defined(GL_TEXTURE_BINDING_2D)
1437 case GL_TEXTURE_BINDING_2D:
1438 #endif // defined(GL_TEXTURE_BINDING_2D)
1439 #if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1440 case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING:
1441 #endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1442 #if defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1443 case GL_TEXTURE_COORD_ARRAY_SIZE:
1444 #endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1445 #if defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1446 case GL_TEXTURE_COORD_ARRAY_STRIDE:
1447 #endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1448 #if defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1449 case GL_TEXTURE_COORD_ARRAY_TYPE:
1450 #endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1451 #if defined(GL_TEXTURE_STACK_DEPTH)
1452 case GL_TEXTURE_STACK_DEPTH:
1453 #endif // defined(GL_TEXTURE_STACK_DEPTH)
1454 #if defined(GL_UNPACK_ALIGNMENT)
1455 case GL_UNPACK_ALIGNMENT:
1456 #endif // defined(GL_UNPACK_ALIGNMENT)
1457 #if defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1458 case GL_VERTEX_ARRAY_BUFFER_BINDING:
1459 #endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1460 #if defined(GL_VERTEX_ARRAY_SIZE)
1461 case GL_VERTEX_ARRAY_SIZE:
1462 #endif // defined(GL_VERTEX_ARRAY_SIZE)
1463 #if defined(GL_VERTEX_ARRAY_STRIDE)
1464 case GL_VERTEX_ARRAY_STRIDE:
1465 #endif // defined(GL_VERTEX_ARRAY_STRIDE)
1466 #if defined(GL_VERTEX_ARRAY_TYPE)
1467 case GL_VERTEX_ARRAY_TYPE:
1468 #endif // defined(GL_VERTEX_ARRAY_TYPE)
1469 #if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1470 case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES:
1471 #endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1472 #if defined(GL_WEIGHT_ARRAY_SIZE_OES)
1473 case GL_WEIGHT_ARRAY_SIZE_OES:
1474 #endif // defined(GL_WEIGHT_ARRAY_SIZE_OES)
1475 #if defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1476 case GL_WEIGHT_ARRAY_STRIDE_OES:
1477 #endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1478 #if defined(GL_WEIGHT_ARRAY_TYPE_OES)
1479 case GL_WEIGHT_ARRAY_TYPE_OES:
1480 #endif // defined(GL_WEIGHT_ARRAY_TYPE_OES)
1481 _needed = 1;
1482 break;
1483 #if defined(GL_ALIASED_POINT_SIZE_RANGE)
1484 case GL_ALIASED_POINT_SIZE_RANGE:
1485 #endif // defined(GL_ALIASED_POINT_SIZE_RANGE)
1486 #if defined(GL_ALIASED_LINE_WIDTH_RANGE)
1487 case GL_ALIASED_LINE_WIDTH_RANGE:
1488 #endif // defined(GL_ALIASED_LINE_WIDTH_RANGE)
1489 #if defined(GL_DEPTH_RANGE)
1490 case GL_DEPTH_RANGE:
1491 #endif // defined(GL_DEPTH_RANGE)
1492 #if defined(GL_MAX_VIEWPORT_DIMS)
1493 case GL_MAX_VIEWPORT_DIMS:
1494 #endif // defined(GL_MAX_VIEWPORT_DIMS)
1495 #if defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1496 case GL_SMOOTH_LINE_WIDTH_RANGE:
1497 #endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1498 #if defined(GL_SMOOTH_POINT_SIZE_RANGE)
1499 case GL_SMOOTH_POINT_SIZE_RANGE:
1500 #endif // defined(GL_SMOOTH_POINT_SIZE_RANGE)
1501 _needed = 2;
1502 break;
1503 #if defined(GL_COLOR_CLEAR_VALUE)
1504 case GL_COLOR_CLEAR_VALUE:
1505 #endif // defined(GL_COLOR_CLEAR_VALUE)
1506 #if defined(GL_COLOR_WRITEMASK)
1507 case GL_COLOR_WRITEMASK:
1508 #endif // defined(GL_COLOR_WRITEMASK)
1509 #if defined(GL_FOG_COLOR)
1510 case GL_FOG_COLOR:
1511 #endif // defined(GL_FOG_COLOR)
1512 #if defined(GL_LIGHT_MODEL_AMBIENT)
1513 case GL_LIGHT_MODEL_AMBIENT:
1514 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
1515 #if defined(GL_SCISSOR_BOX)
1516 case GL_SCISSOR_BOX:
1517 #endif // defined(GL_SCISSOR_BOX)
1518 #if defined(GL_VIEWPORT)
1519 case GL_VIEWPORT:
1520 #endif // defined(GL_VIEWPORT)
1521 _needed = 4;
1522 break;
1523 #if defined(GL_MODELVIEW_MATRIX)
1524 case GL_MODELVIEW_MATRIX:
1525 #endif // defined(GL_MODELVIEW_MATRIX)
1526 #if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1527 case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES:
1528 #endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1529 #if defined(GL_PROJECTION_MATRIX)
1530 case GL_PROJECTION_MATRIX:
1531 #endif // defined(GL_PROJECTION_MATRIX)
1532 #if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1533 case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES:
1534 #endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1535 #if defined(GL_TEXTURE_MATRIX)
1536 case GL_TEXTURE_MATRIX:
1537 #endif // defined(GL_TEXTURE_MATRIX)
1538 #if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1539 case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES:
1540 #endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1541 _needed = 16;
1542 break;
1543 #if defined(GL_COMPRESSED_TEXTURE_FORMATS)
1544 case GL_COMPRESSED_TEXTURE_FORMATS:
1545 #endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
1546 _needed = getNumCompressedTextureFormats();
1547 break;
1548 default:
1549 _needed = 1;
1550 break;
1551 }
1552 if (_remaining < _needed) {
1553 _exception = 1;
1554 _exceptionType = "java/lang/IllegalArgumentException";
1555 _exceptionMessage = "length - offset < needed";
1556 goto exit;
1557 }
1558 params_base = (GLint *)
1559 _env->GetIntArrayElements(params_ref, (jboolean *)0);
1560 params = params_base + offset;
1561
1562 glGetIntegerv(
1563 (GLenum)pname,
1564 (GLint *)params
1565 );
1566
1567 exit:
1568 if (params_base) {
1569 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
1570 _exception ? JNI_ABORT: 0);
1571 }
1572 if (_exception) {
1573 jniThrowException(_env, _exceptionType, _exceptionMessage);
1574 }
1575 }
1576
1577 /* void glGetIntegerv ( GLenum pname, GLint *params ) */
1578 static void
android_glGetIntegerv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)1579 android_glGetIntegerv__ILjava_nio_IntBuffer_2
1580 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1581 jint _exception = 0;
1582 const char * _exceptionType = NULL;
1583 const char * _exceptionMessage = NULL;
1584 jintArray _array = (jintArray) 0;
1585 jint _bufferOffset = (jint) 0;
1586 jint _remaining;
1587 GLint *params = (GLint *) 0;
1588
1589 if (!params_buf) {
1590 _exception = 1;
1591 _exceptionType = "java/lang/IllegalArgumentException";
1592 _exceptionMessage = "params == null";
1593 goto exit;
1594 }
1595 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1596 int _needed;
1597 switch (pname) {
1598 #if defined(GL_ALPHA_BITS)
1599 case GL_ALPHA_BITS:
1600 #endif // defined(GL_ALPHA_BITS)
1601 #if defined(GL_ALPHA_TEST_FUNC)
1602 case GL_ALPHA_TEST_FUNC:
1603 #endif // defined(GL_ALPHA_TEST_FUNC)
1604 #if defined(GL_ALPHA_TEST_REF)
1605 case GL_ALPHA_TEST_REF:
1606 #endif // defined(GL_ALPHA_TEST_REF)
1607 #if defined(GL_BLEND_DST)
1608 case GL_BLEND_DST:
1609 #endif // defined(GL_BLEND_DST)
1610 #if defined(GL_BLUE_BITS)
1611 case GL_BLUE_BITS:
1612 #endif // defined(GL_BLUE_BITS)
1613 #if defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1614 case GL_COLOR_ARRAY_BUFFER_BINDING:
1615 #endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1616 #if defined(GL_COLOR_ARRAY_SIZE)
1617 case GL_COLOR_ARRAY_SIZE:
1618 #endif // defined(GL_COLOR_ARRAY_SIZE)
1619 #if defined(GL_COLOR_ARRAY_STRIDE)
1620 case GL_COLOR_ARRAY_STRIDE:
1621 #endif // defined(GL_COLOR_ARRAY_STRIDE)
1622 #if defined(GL_COLOR_ARRAY_TYPE)
1623 case GL_COLOR_ARRAY_TYPE:
1624 #endif // defined(GL_COLOR_ARRAY_TYPE)
1625 #if defined(GL_CULL_FACE)
1626 case GL_CULL_FACE:
1627 #endif // defined(GL_CULL_FACE)
1628 #if defined(GL_DEPTH_BITS)
1629 case GL_DEPTH_BITS:
1630 #endif // defined(GL_DEPTH_BITS)
1631 #if defined(GL_DEPTH_CLEAR_VALUE)
1632 case GL_DEPTH_CLEAR_VALUE:
1633 #endif // defined(GL_DEPTH_CLEAR_VALUE)
1634 #if defined(GL_DEPTH_FUNC)
1635 case GL_DEPTH_FUNC:
1636 #endif // defined(GL_DEPTH_FUNC)
1637 #if defined(GL_DEPTH_WRITEMASK)
1638 case GL_DEPTH_WRITEMASK:
1639 #endif // defined(GL_DEPTH_WRITEMASK)
1640 #if defined(GL_FOG_DENSITY)
1641 case GL_FOG_DENSITY:
1642 #endif // defined(GL_FOG_DENSITY)
1643 #if defined(GL_FOG_END)
1644 case GL_FOG_END:
1645 #endif // defined(GL_FOG_END)
1646 #if defined(GL_FOG_MODE)
1647 case GL_FOG_MODE:
1648 #endif // defined(GL_FOG_MODE)
1649 #if defined(GL_FOG_START)
1650 case GL_FOG_START:
1651 #endif // defined(GL_FOG_START)
1652 #if defined(GL_FRONT_FACE)
1653 case GL_FRONT_FACE:
1654 #endif // defined(GL_FRONT_FACE)
1655 #if defined(GL_GREEN_BITS)
1656 case GL_GREEN_BITS:
1657 #endif // defined(GL_GREEN_BITS)
1658 #if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1659 case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
1660 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1661 #if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1662 case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
1663 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1664 #if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1665 case GL_LIGHT_MODEL_COLOR_CONTROL:
1666 #endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1667 #if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1668 case GL_LIGHT_MODEL_LOCAL_VIEWER:
1669 #endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1670 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
1671 case GL_LIGHT_MODEL_TWO_SIDE:
1672 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1673 #if defined(GL_LINE_SMOOTH_HINT)
1674 case GL_LINE_SMOOTH_HINT:
1675 #endif // defined(GL_LINE_SMOOTH_HINT)
1676 #if defined(GL_LINE_WIDTH)
1677 case GL_LINE_WIDTH:
1678 #endif // defined(GL_LINE_WIDTH)
1679 #if defined(GL_LOGIC_OP_MODE)
1680 case GL_LOGIC_OP_MODE:
1681 #endif // defined(GL_LOGIC_OP_MODE)
1682 #if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1683 case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES:
1684 #endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1685 #if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1686 case GL_MATRIX_INDEX_ARRAY_SIZE_OES:
1687 #endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1688 #if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1689 case GL_MATRIX_INDEX_ARRAY_STRIDE_OES:
1690 #endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1691 #if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1692 case GL_MATRIX_INDEX_ARRAY_TYPE_OES:
1693 #endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1694 #if defined(GL_MATRIX_MODE)
1695 case GL_MATRIX_MODE:
1696 #endif // defined(GL_MATRIX_MODE)
1697 #if defined(GL_MAX_CLIP_PLANES)
1698 case GL_MAX_CLIP_PLANES:
1699 #endif // defined(GL_MAX_CLIP_PLANES)
1700 #if defined(GL_MAX_ELEMENTS_INDICES)
1701 case GL_MAX_ELEMENTS_INDICES:
1702 #endif // defined(GL_MAX_ELEMENTS_INDICES)
1703 #if defined(GL_MAX_ELEMENTS_VERTICES)
1704 case GL_MAX_ELEMENTS_VERTICES:
1705 #endif // defined(GL_MAX_ELEMENTS_VERTICES)
1706 #if defined(GL_MAX_LIGHTS)
1707 case GL_MAX_LIGHTS:
1708 #endif // defined(GL_MAX_LIGHTS)
1709 #if defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1710 case GL_MAX_MODELVIEW_STACK_DEPTH:
1711 #endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1712 #if defined(GL_MAX_PALETTE_MATRICES_OES)
1713 case GL_MAX_PALETTE_MATRICES_OES:
1714 #endif // defined(GL_MAX_PALETTE_MATRICES_OES)
1715 #if defined(GL_MAX_PROJECTION_STACK_DEPTH)
1716 case GL_MAX_PROJECTION_STACK_DEPTH:
1717 #endif // defined(GL_MAX_PROJECTION_STACK_DEPTH)
1718 #if defined(GL_MAX_TEXTURE_SIZE)
1719 case GL_MAX_TEXTURE_SIZE:
1720 #endif // defined(GL_MAX_TEXTURE_SIZE)
1721 #if defined(GL_MAX_TEXTURE_STACK_DEPTH)
1722 case GL_MAX_TEXTURE_STACK_DEPTH:
1723 #endif // defined(GL_MAX_TEXTURE_STACK_DEPTH)
1724 #if defined(GL_MAX_TEXTURE_UNITS)
1725 case GL_MAX_TEXTURE_UNITS:
1726 #endif // defined(GL_MAX_TEXTURE_UNITS)
1727 #if defined(GL_MAX_VERTEX_UNITS_OES)
1728 case GL_MAX_VERTEX_UNITS_OES:
1729 #endif // defined(GL_MAX_VERTEX_UNITS_OES)
1730 #if defined(GL_MODELVIEW_STACK_DEPTH)
1731 case GL_MODELVIEW_STACK_DEPTH:
1732 #endif // defined(GL_MODELVIEW_STACK_DEPTH)
1733 #if defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1734 case GL_NORMAL_ARRAY_BUFFER_BINDING:
1735 #endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1736 #if defined(GL_NORMAL_ARRAY_STRIDE)
1737 case GL_NORMAL_ARRAY_STRIDE:
1738 #endif // defined(GL_NORMAL_ARRAY_STRIDE)
1739 #if defined(GL_NORMAL_ARRAY_TYPE)
1740 case GL_NORMAL_ARRAY_TYPE:
1741 #endif // defined(GL_NORMAL_ARRAY_TYPE)
1742 #if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1743 case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
1744 #endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1745 #if defined(GL_PACK_ALIGNMENT)
1746 case GL_PACK_ALIGNMENT:
1747 #endif // defined(GL_PACK_ALIGNMENT)
1748 #if defined(GL_PERSPECTIVE_CORRECTION_HINT)
1749 case GL_PERSPECTIVE_CORRECTION_HINT:
1750 #endif // defined(GL_PERSPECTIVE_CORRECTION_HINT)
1751 #if defined(GL_POINT_SIZE)
1752 case GL_POINT_SIZE:
1753 #endif // defined(GL_POINT_SIZE)
1754 #if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1755 case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
1756 #endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1757 #if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1758 case GL_POINT_SIZE_ARRAY_STRIDE_OES:
1759 #endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1760 #if defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1761 case GL_POINT_SIZE_ARRAY_TYPE_OES:
1762 #endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1763 #if defined(GL_POINT_SMOOTH_HINT)
1764 case GL_POINT_SMOOTH_HINT:
1765 #endif // defined(GL_POINT_SMOOTH_HINT)
1766 #if defined(GL_POLYGON_OFFSET_FACTOR)
1767 case GL_POLYGON_OFFSET_FACTOR:
1768 #endif // defined(GL_POLYGON_OFFSET_FACTOR)
1769 #if defined(GL_POLYGON_OFFSET_UNITS)
1770 case GL_POLYGON_OFFSET_UNITS:
1771 #endif // defined(GL_POLYGON_OFFSET_UNITS)
1772 #if defined(GL_PROJECTION_STACK_DEPTH)
1773 case GL_PROJECTION_STACK_DEPTH:
1774 #endif // defined(GL_PROJECTION_STACK_DEPTH)
1775 #if defined(GL_RED_BITS)
1776 case GL_RED_BITS:
1777 #endif // defined(GL_RED_BITS)
1778 #if defined(GL_SHADE_MODEL)
1779 case GL_SHADE_MODEL:
1780 #endif // defined(GL_SHADE_MODEL)
1781 #if defined(GL_STENCIL_BITS)
1782 case GL_STENCIL_BITS:
1783 #endif // defined(GL_STENCIL_BITS)
1784 #if defined(GL_STENCIL_CLEAR_VALUE)
1785 case GL_STENCIL_CLEAR_VALUE:
1786 #endif // defined(GL_STENCIL_CLEAR_VALUE)
1787 #if defined(GL_STENCIL_FAIL)
1788 case GL_STENCIL_FAIL:
1789 #endif // defined(GL_STENCIL_FAIL)
1790 #if defined(GL_STENCIL_FUNC)
1791 case GL_STENCIL_FUNC:
1792 #endif // defined(GL_STENCIL_FUNC)
1793 #if defined(GL_STENCIL_PASS_DEPTH_FAIL)
1794 case GL_STENCIL_PASS_DEPTH_FAIL:
1795 #endif // defined(GL_STENCIL_PASS_DEPTH_FAIL)
1796 #if defined(GL_STENCIL_PASS_DEPTH_PASS)
1797 case GL_STENCIL_PASS_DEPTH_PASS:
1798 #endif // defined(GL_STENCIL_PASS_DEPTH_PASS)
1799 #if defined(GL_STENCIL_REF)
1800 case GL_STENCIL_REF:
1801 #endif // defined(GL_STENCIL_REF)
1802 #if defined(GL_STENCIL_VALUE_MASK)
1803 case GL_STENCIL_VALUE_MASK:
1804 #endif // defined(GL_STENCIL_VALUE_MASK)
1805 #if defined(GL_STENCIL_WRITEMASK)
1806 case GL_STENCIL_WRITEMASK:
1807 #endif // defined(GL_STENCIL_WRITEMASK)
1808 #if defined(GL_SUBPIXEL_BITS)
1809 case GL_SUBPIXEL_BITS:
1810 #endif // defined(GL_SUBPIXEL_BITS)
1811 #if defined(GL_TEXTURE_BINDING_2D)
1812 case GL_TEXTURE_BINDING_2D:
1813 #endif // defined(GL_TEXTURE_BINDING_2D)
1814 #if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1815 case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING:
1816 #endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
1817 #if defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1818 case GL_TEXTURE_COORD_ARRAY_SIZE:
1819 #endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE)
1820 #if defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1821 case GL_TEXTURE_COORD_ARRAY_STRIDE:
1822 #endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
1823 #if defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1824 case GL_TEXTURE_COORD_ARRAY_TYPE:
1825 #endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE)
1826 #if defined(GL_TEXTURE_STACK_DEPTH)
1827 case GL_TEXTURE_STACK_DEPTH:
1828 #endif // defined(GL_TEXTURE_STACK_DEPTH)
1829 #if defined(GL_UNPACK_ALIGNMENT)
1830 case GL_UNPACK_ALIGNMENT:
1831 #endif // defined(GL_UNPACK_ALIGNMENT)
1832 #if defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1833 case GL_VERTEX_ARRAY_BUFFER_BINDING:
1834 #endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
1835 #if defined(GL_VERTEX_ARRAY_SIZE)
1836 case GL_VERTEX_ARRAY_SIZE:
1837 #endif // defined(GL_VERTEX_ARRAY_SIZE)
1838 #if defined(GL_VERTEX_ARRAY_STRIDE)
1839 case GL_VERTEX_ARRAY_STRIDE:
1840 #endif // defined(GL_VERTEX_ARRAY_STRIDE)
1841 #if defined(GL_VERTEX_ARRAY_TYPE)
1842 case GL_VERTEX_ARRAY_TYPE:
1843 #endif // defined(GL_VERTEX_ARRAY_TYPE)
1844 #if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1845 case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES:
1846 #endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
1847 #if defined(GL_WEIGHT_ARRAY_SIZE_OES)
1848 case GL_WEIGHT_ARRAY_SIZE_OES:
1849 #endif // defined(GL_WEIGHT_ARRAY_SIZE_OES)
1850 #if defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1851 case GL_WEIGHT_ARRAY_STRIDE_OES:
1852 #endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES)
1853 #if defined(GL_WEIGHT_ARRAY_TYPE_OES)
1854 case GL_WEIGHT_ARRAY_TYPE_OES:
1855 #endif // defined(GL_WEIGHT_ARRAY_TYPE_OES)
1856 _needed = 1;
1857 break;
1858 #if defined(GL_ALIASED_POINT_SIZE_RANGE)
1859 case GL_ALIASED_POINT_SIZE_RANGE:
1860 #endif // defined(GL_ALIASED_POINT_SIZE_RANGE)
1861 #if defined(GL_ALIASED_LINE_WIDTH_RANGE)
1862 case GL_ALIASED_LINE_WIDTH_RANGE:
1863 #endif // defined(GL_ALIASED_LINE_WIDTH_RANGE)
1864 #if defined(GL_DEPTH_RANGE)
1865 case GL_DEPTH_RANGE:
1866 #endif // defined(GL_DEPTH_RANGE)
1867 #if defined(GL_MAX_VIEWPORT_DIMS)
1868 case GL_MAX_VIEWPORT_DIMS:
1869 #endif // defined(GL_MAX_VIEWPORT_DIMS)
1870 #if defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1871 case GL_SMOOTH_LINE_WIDTH_RANGE:
1872 #endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE)
1873 #if defined(GL_SMOOTH_POINT_SIZE_RANGE)
1874 case GL_SMOOTH_POINT_SIZE_RANGE:
1875 #endif // defined(GL_SMOOTH_POINT_SIZE_RANGE)
1876 _needed = 2;
1877 break;
1878 #if defined(GL_COLOR_CLEAR_VALUE)
1879 case GL_COLOR_CLEAR_VALUE:
1880 #endif // defined(GL_COLOR_CLEAR_VALUE)
1881 #if defined(GL_COLOR_WRITEMASK)
1882 case GL_COLOR_WRITEMASK:
1883 #endif // defined(GL_COLOR_WRITEMASK)
1884 #if defined(GL_FOG_COLOR)
1885 case GL_FOG_COLOR:
1886 #endif // defined(GL_FOG_COLOR)
1887 #if defined(GL_LIGHT_MODEL_AMBIENT)
1888 case GL_LIGHT_MODEL_AMBIENT:
1889 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
1890 #if defined(GL_SCISSOR_BOX)
1891 case GL_SCISSOR_BOX:
1892 #endif // defined(GL_SCISSOR_BOX)
1893 #if defined(GL_VIEWPORT)
1894 case GL_VIEWPORT:
1895 #endif // defined(GL_VIEWPORT)
1896 _needed = 4;
1897 break;
1898 #if defined(GL_MODELVIEW_MATRIX)
1899 case GL_MODELVIEW_MATRIX:
1900 #endif // defined(GL_MODELVIEW_MATRIX)
1901 #if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1902 case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES:
1903 #endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
1904 #if defined(GL_PROJECTION_MATRIX)
1905 case GL_PROJECTION_MATRIX:
1906 #endif // defined(GL_PROJECTION_MATRIX)
1907 #if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1908 case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES:
1909 #endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
1910 #if defined(GL_TEXTURE_MATRIX)
1911 case GL_TEXTURE_MATRIX:
1912 #endif // defined(GL_TEXTURE_MATRIX)
1913 #if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1914 case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES:
1915 #endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
1916 _needed = 16;
1917 break;
1918 #if defined(GL_COMPRESSED_TEXTURE_FORMATS)
1919 case GL_COMPRESSED_TEXTURE_FORMATS:
1920 #endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
1921 _needed = getNumCompressedTextureFormats();
1922 break;
1923 default:
1924 _needed = 1;
1925 break;
1926 }
1927 if (_remaining < _needed) {
1928 _exception = 1;
1929 _exceptionType = "java/lang/IllegalArgumentException";
1930 _exceptionMessage = "remaining() < needed";
1931 goto exit;
1932 }
1933 if (params == NULL) {
1934 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1935 params = (GLint *) (_paramsBase + _bufferOffset);
1936 }
1937 glGetIntegerv(
1938 (GLenum)pname,
1939 (GLint *)params
1940 );
1941
1942 exit:
1943 if (_array) {
1944 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
1945 }
1946 if (_exception) {
1947 jniThrowException(_env, _exceptionType, _exceptionMessage);
1948 }
1949 }
1950
1951 /* const GLubyte * glGetString ( GLenum name ) */
android_glGetString(JNIEnv * _env,jobject,jint name)1952 static jstring android_glGetString(JNIEnv *_env, jobject, jint name) {
1953 const char* chars = (const char*) glGetString((GLenum) name);
1954 return _env->NewStringUTF(chars);
1955 }
1956 /* void glHint ( GLenum target, GLenum mode ) */
1957 static void
android_glHint__II(JNIEnv * _env,jobject _this,jint target,jint mode)1958 android_glHint__II
1959 (JNIEnv *_env, jobject _this, jint target, jint mode) {
1960 glHint(
1961 (GLenum)target,
1962 (GLenum)mode
1963 );
1964 }
1965
1966 /* void glLightModelf ( GLenum pname, GLfloat param ) */
1967 static void
android_glLightModelf__IF(JNIEnv * _env,jobject _this,jint pname,jfloat param)1968 android_glLightModelf__IF
1969 (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
1970 glLightModelf(
1971 (GLenum)pname,
1972 (GLfloat)param
1973 );
1974 }
1975
1976 /* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
1977 static void
android_glLightModelfv__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray params_ref,jint offset)1978 android_glLightModelfv__I_3FI
1979 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
1980 jint _exception = 0;
1981 const char * _exceptionType = NULL;
1982 const char * _exceptionMessage = NULL;
1983 GLfloat *params_base = (GLfloat *) 0;
1984 jint _remaining;
1985 GLfloat *params = (GLfloat *) 0;
1986
1987 if (!params_ref) {
1988 _exception = 1;
1989 _exceptionType = "java/lang/IllegalArgumentException";
1990 _exceptionMessage = "params == null";
1991 goto exit;
1992 }
1993 if (offset < 0) {
1994 _exception = 1;
1995 _exceptionType = "java/lang/IllegalArgumentException";
1996 _exceptionMessage = "offset < 0";
1997 goto exit;
1998 }
1999 _remaining = _env->GetArrayLength(params_ref) - offset;
2000 int _needed;
2001 switch (pname) {
2002 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
2003 case GL_LIGHT_MODEL_TWO_SIDE:
2004 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
2005 _needed = 1;
2006 break;
2007 #if defined(GL_LIGHT_MODEL_AMBIENT)
2008 case GL_LIGHT_MODEL_AMBIENT:
2009 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
2010 _needed = 4;
2011 break;
2012 default:
2013 _needed = 1;
2014 break;
2015 }
2016 if (_remaining < _needed) {
2017 _exception = 1;
2018 _exceptionType = "java/lang/IllegalArgumentException";
2019 _exceptionMessage = "length - offset < needed";
2020 goto exit;
2021 }
2022 params_base = (GLfloat *)
2023 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
2024 params = params_base + offset;
2025
2026 glLightModelfv(
2027 (GLenum)pname,
2028 (GLfloat *)params
2029 );
2030
2031 exit:
2032 if (params_base) {
2033 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
2034 JNI_ABORT);
2035 }
2036 if (_exception) {
2037 jniThrowException(_env, _exceptionType, _exceptionMessage);
2038 }
2039 }
2040
2041 /* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
2042 static void
android_glLightModelfv__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)2043 android_glLightModelfv__ILjava_nio_FloatBuffer_2
2044 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
2045 jint _exception = 0;
2046 const char * _exceptionType = NULL;
2047 const char * _exceptionMessage = NULL;
2048 jfloatArray _array = (jfloatArray) 0;
2049 jint _bufferOffset = (jint) 0;
2050 jint _remaining;
2051 GLfloat *params = (GLfloat *) 0;
2052
2053 if (!params_buf) {
2054 _exception = 1;
2055 _exceptionType = "java/lang/IllegalArgumentException";
2056 _exceptionMessage = "params == null";
2057 goto exit;
2058 }
2059 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2060 int _needed;
2061 switch (pname) {
2062 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
2063 case GL_LIGHT_MODEL_TWO_SIDE:
2064 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
2065 _needed = 1;
2066 break;
2067 #if defined(GL_LIGHT_MODEL_AMBIENT)
2068 case GL_LIGHT_MODEL_AMBIENT:
2069 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
2070 _needed = 4;
2071 break;
2072 default:
2073 _needed = 1;
2074 break;
2075 }
2076 if (_remaining < _needed) {
2077 _exception = 1;
2078 _exceptionType = "java/lang/IllegalArgumentException";
2079 _exceptionMessage = "remaining() < needed";
2080 goto exit;
2081 }
2082 if (params == NULL) {
2083 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2084 params = (GLfloat *) (_paramsBase + _bufferOffset);
2085 }
2086 glLightModelfv(
2087 (GLenum)pname,
2088 (GLfloat *)params
2089 );
2090
2091 exit:
2092 if (_array) {
2093 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
2094 }
2095 if (_exception) {
2096 jniThrowException(_env, _exceptionType, _exceptionMessage);
2097 }
2098 }
2099
2100 /* void glLightModelx ( GLenum pname, GLfixed param ) */
2101 static void
android_glLightModelx__II(JNIEnv * _env,jobject _this,jint pname,jint param)2102 android_glLightModelx__II
2103 (JNIEnv *_env, jobject _this, jint pname, jint param) {
2104 glLightModelx(
2105 (GLenum)pname,
2106 (GLfixed)param
2107 );
2108 }
2109
2110 /* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
2111 static void
android_glLightModelxv__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)2112 android_glLightModelxv__I_3II
2113 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
2114 jint _exception = 0;
2115 const char * _exceptionType = NULL;
2116 const char * _exceptionMessage = NULL;
2117 GLfixed *params_base = (GLfixed *) 0;
2118 jint _remaining;
2119 GLfixed *params = (GLfixed *) 0;
2120
2121 if (!params_ref) {
2122 _exception = 1;
2123 _exceptionType = "java/lang/IllegalArgumentException";
2124 _exceptionMessage = "params == null";
2125 goto exit;
2126 }
2127 if (offset < 0) {
2128 _exception = 1;
2129 _exceptionType = "java/lang/IllegalArgumentException";
2130 _exceptionMessage = "offset < 0";
2131 goto exit;
2132 }
2133 _remaining = _env->GetArrayLength(params_ref) - offset;
2134 int _needed;
2135 switch (pname) {
2136 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
2137 case GL_LIGHT_MODEL_TWO_SIDE:
2138 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
2139 _needed = 1;
2140 break;
2141 #if defined(GL_LIGHT_MODEL_AMBIENT)
2142 case GL_LIGHT_MODEL_AMBIENT:
2143 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
2144 _needed = 4;
2145 break;
2146 default:
2147 _needed = 1;
2148 break;
2149 }
2150 if (_remaining < _needed) {
2151 _exception = 1;
2152 _exceptionType = "java/lang/IllegalArgumentException";
2153 _exceptionMessage = "length - offset < needed";
2154 goto exit;
2155 }
2156 params_base = (GLfixed *)
2157 _env->GetIntArrayElements(params_ref, (jboolean *)0);
2158 params = params_base + offset;
2159
2160 glLightModelxv(
2161 (GLenum)pname,
2162 (GLfixed *)params
2163 );
2164
2165 exit:
2166 if (params_base) {
2167 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2168 JNI_ABORT);
2169 }
2170 if (_exception) {
2171 jniThrowException(_env, _exceptionType, _exceptionMessage);
2172 }
2173 }
2174
2175 /* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
2176 static void
android_glLightModelxv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)2177 android_glLightModelxv__ILjava_nio_IntBuffer_2
2178 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
2179 jint _exception = 0;
2180 const char * _exceptionType = NULL;
2181 const char * _exceptionMessage = NULL;
2182 jintArray _array = (jintArray) 0;
2183 jint _bufferOffset = (jint) 0;
2184 jint _remaining;
2185 GLfixed *params = (GLfixed *) 0;
2186
2187 if (!params_buf) {
2188 _exception = 1;
2189 _exceptionType = "java/lang/IllegalArgumentException";
2190 _exceptionMessage = "params == null";
2191 goto exit;
2192 }
2193 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2194 int _needed;
2195 switch (pname) {
2196 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
2197 case GL_LIGHT_MODEL_TWO_SIDE:
2198 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
2199 _needed = 1;
2200 break;
2201 #if defined(GL_LIGHT_MODEL_AMBIENT)
2202 case GL_LIGHT_MODEL_AMBIENT:
2203 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
2204 _needed = 4;
2205 break;
2206 default:
2207 _needed = 1;
2208 break;
2209 }
2210 if (_remaining < _needed) {
2211 _exception = 1;
2212 _exceptionType = "java/lang/IllegalArgumentException";
2213 _exceptionMessage = "remaining() < needed";
2214 goto exit;
2215 }
2216 if (params == NULL) {
2217 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2218 params = (GLfixed *) (_paramsBase + _bufferOffset);
2219 }
2220 glLightModelxv(
2221 (GLenum)pname,
2222 (GLfixed *)params
2223 );
2224
2225 exit:
2226 if (_array) {
2227 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
2228 }
2229 if (_exception) {
2230 jniThrowException(_env, _exceptionType, _exceptionMessage);
2231 }
2232 }
2233
2234 /* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */
2235 static void
android_glLightf__IIF(JNIEnv * _env,jobject _this,jint light,jint pname,jfloat param)2236 android_glLightf__IIF
2237 (JNIEnv *_env, jobject _this, jint light, jint pname, jfloat param) {
2238 glLightf(
2239 (GLenum)light,
2240 (GLenum)pname,
2241 (GLfloat)param
2242 );
2243 }
2244
2245 /* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
2246 static void
android_glLightfv__II_3FI(JNIEnv * _env,jobject _this,jint light,jint pname,jfloatArray params_ref,jint offset)2247 android_glLightfv__II_3FI
2248 (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
2249 jint _exception = 0;
2250 const char * _exceptionType = NULL;
2251 const char * _exceptionMessage = NULL;
2252 GLfloat *params_base = (GLfloat *) 0;
2253 jint _remaining;
2254 GLfloat *params = (GLfloat *) 0;
2255
2256 if (!params_ref) {
2257 _exception = 1;
2258 _exceptionType = "java/lang/IllegalArgumentException";
2259 _exceptionMessage = "params == null";
2260 goto exit;
2261 }
2262 if (offset < 0) {
2263 _exception = 1;
2264 _exceptionType = "java/lang/IllegalArgumentException";
2265 _exceptionMessage = "offset < 0";
2266 goto exit;
2267 }
2268 _remaining = _env->GetArrayLength(params_ref) - offset;
2269 int _needed;
2270 switch (pname) {
2271 #if defined(GL_SPOT_EXPONENT)
2272 case GL_SPOT_EXPONENT:
2273 #endif // defined(GL_SPOT_EXPONENT)
2274 #if defined(GL_SPOT_CUTOFF)
2275 case GL_SPOT_CUTOFF:
2276 #endif // defined(GL_SPOT_CUTOFF)
2277 #if defined(GL_CONSTANT_ATTENUATION)
2278 case GL_CONSTANT_ATTENUATION:
2279 #endif // defined(GL_CONSTANT_ATTENUATION)
2280 #if defined(GL_LINEAR_ATTENUATION)
2281 case GL_LINEAR_ATTENUATION:
2282 #endif // defined(GL_LINEAR_ATTENUATION)
2283 #if defined(GL_QUADRATIC_ATTENUATION)
2284 case GL_QUADRATIC_ATTENUATION:
2285 #endif // defined(GL_QUADRATIC_ATTENUATION)
2286 _needed = 1;
2287 break;
2288 #if defined(GL_SPOT_DIRECTION)
2289 case GL_SPOT_DIRECTION:
2290 #endif // defined(GL_SPOT_DIRECTION)
2291 _needed = 3;
2292 break;
2293 #if defined(GL_AMBIENT)
2294 case GL_AMBIENT:
2295 #endif // defined(GL_AMBIENT)
2296 #if defined(GL_DIFFUSE)
2297 case GL_DIFFUSE:
2298 #endif // defined(GL_DIFFUSE)
2299 #if defined(GL_SPECULAR)
2300 case GL_SPECULAR:
2301 #endif // defined(GL_SPECULAR)
2302 #if defined(GL_EMISSION)
2303 case GL_EMISSION:
2304 #endif // defined(GL_EMISSION)
2305 _needed = 4;
2306 break;
2307 default:
2308 _needed = 1;
2309 break;
2310 }
2311 if (_remaining < _needed) {
2312 _exception = 1;
2313 _exceptionType = "java/lang/IllegalArgumentException";
2314 _exceptionMessage = "length - offset < needed";
2315 goto exit;
2316 }
2317 params_base = (GLfloat *)
2318 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
2319 params = params_base + offset;
2320
2321 glLightfv(
2322 (GLenum)light,
2323 (GLenum)pname,
2324 (GLfloat *)params
2325 );
2326
2327 exit:
2328 if (params_base) {
2329 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
2330 JNI_ABORT);
2331 }
2332 if (_exception) {
2333 jniThrowException(_env, _exceptionType, _exceptionMessage);
2334 }
2335 }
2336
2337 /* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
2338 static void
android_glLightfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)2339 android_glLightfv__IILjava_nio_FloatBuffer_2
2340 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
2341 jint _exception = 0;
2342 const char * _exceptionType = NULL;
2343 const char * _exceptionMessage = NULL;
2344 jfloatArray _array = (jfloatArray) 0;
2345 jint _bufferOffset = (jint) 0;
2346 jint _remaining;
2347 GLfloat *params = (GLfloat *) 0;
2348
2349 if (!params_buf) {
2350 _exception = 1;
2351 _exceptionType = "java/lang/IllegalArgumentException";
2352 _exceptionMessage = "params == null";
2353 goto exit;
2354 }
2355 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2356 int _needed;
2357 switch (pname) {
2358 #if defined(GL_SPOT_EXPONENT)
2359 case GL_SPOT_EXPONENT:
2360 #endif // defined(GL_SPOT_EXPONENT)
2361 #if defined(GL_SPOT_CUTOFF)
2362 case GL_SPOT_CUTOFF:
2363 #endif // defined(GL_SPOT_CUTOFF)
2364 #if defined(GL_CONSTANT_ATTENUATION)
2365 case GL_CONSTANT_ATTENUATION:
2366 #endif // defined(GL_CONSTANT_ATTENUATION)
2367 #if defined(GL_LINEAR_ATTENUATION)
2368 case GL_LINEAR_ATTENUATION:
2369 #endif // defined(GL_LINEAR_ATTENUATION)
2370 #if defined(GL_QUADRATIC_ATTENUATION)
2371 case GL_QUADRATIC_ATTENUATION:
2372 #endif // defined(GL_QUADRATIC_ATTENUATION)
2373 _needed = 1;
2374 break;
2375 #if defined(GL_SPOT_DIRECTION)
2376 case GL_SPOT_DIRECTION:
2377 #endif // defined(GL_SPOT_DIRECTION)
2378 _needed = 3;
2379 break;
2380 #if defined(GL_AMBIENT)
2381 case GL_AMBIENT:
2382 #endif // defined(GL_AMBIENT)
2383 #if defined(GL_DIFFUSE)
2384 case GL_DIFFUSE:
2385 #endif // defined(GL_DIFFUSE)
2386 #if defined(GL_SPECULAR)
2387 case GL_SPECULAR:
2388 #endif // defined(GL_SPECULAR)
2389 #if defined(GL_EMISSION)
2390 case GL_EMISSION:
2391 #endif // defined(GL_EMISSION)
2392 _needed = 4;
2393 break;
2394 default:
2395 _needed = 1;
2396 break;
2397 }
2398 if (_remaining < _needed) {
2399 _exception = 1;
2400 _exceptionType = "java/lang/IllegalArgumentException";
2401 _exceptionMessage = "remaining() < needed";
2402 goto exit;
2403 }
2404 if (params == NULL) {
2405 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2406 params = (GLfloat *) (_paramsBase + _bufferOffset);
2407 }
2408 glLightfv(
2409 (GLenum)light,
2410 (GLenum)pname,
2411 (GLfloat *)params
2412 );
2413
2414 exit:
2415 if (_array) {
2416 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
2417 }
2418 if (_exception) {
2419 jniThrowException(_env, _exceptionType, _exceptionMessage);
2420 }
2421 }
2422
2423 /* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */
2424 static void
android_glLightx__III(JNIEnv * _env,jobject _this,jint light,jint pname,jint param)2425 android_glLightx__III
2426 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) {
2427 glLightx(
2428 (GLenum)light,
2429 (GLenum)pname,
2430 (GLfixed)param
2431 );
2432 }
2433
2434 /* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
2435 static void
android_glLightxv__II_3II(JNIEnv * _env,jobject _this,jint light,jint pname,jintArray params_ref,jint offset)2436 android_glLightxv__II_3II
2437 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
2438 jint _exception = 0;
2439 const char * _exceptionType = NULL;
2440 const char * _exceptionMessage = NULL;
2441 GLfixed *params_base = (GLfixed *) 0;
2442 jint _remaining;
2443 GLfixed *params = (GLfixed *) 0;
2444
2445 if (!params_ref) {
2446 _exception = 1;
2447 _exceptionType = "java/lang/IllegalArgumentException";
2448 _exceptionMessage = "params == null";
2449 goto exit;
2450 }
2451 if (offset < 0) {
2452 _exception = 1;
2453 _exceptionType = "java/lang/IllegalArgumentException";
2454 _exceptionMessage = "offset < 0";
2455 goto exit;
2456 }
2457 _remaining = _env->GetArrayLength(params_ref) - offset;
2458 int _needed;
2459 switch (pname) {
2460 #if defined(GL_SPOT_EXPONENT)
2461 case GL_SPOT_EXPONENT:
2462 #endif // defined(GL_SPOT_EXPONENT)
2463 #if defined(GL_SPOT_CUTOFF)
2464 case GL_SPOT_CUTOFF:
2465 #endif // defined(GL_SPOT_CUTOFF)
2466 #if defined(GL_CONSTANT_ATTENUATION)
2467 case GL_CONSTANT_ATTENUATION:
2468 #endif // defined(GL_CONSTANT_ATTENUATION)
2469 #if defined(GL_LINEAR_ATTENUATION)
2470 case GL_LINEAR_ATTENUATION:
2471 #endif // defined(GL_LINEAR_ATTENUATION)
2472 #if defined(GL_QUADRATIC_ATTENUATION)
2473 case GL_QUADRATIC_ATTENUATION:
2474 #endif // defined(GL_QUADRATIC_ATTENUATION)
2475 _needed = 1;
2476 break;
2477 #if defined(GL_SPOT_DIRECTION)
2478 case GL_SPOT_DIRECTION:
2479 #endif // defined(GL_SPOT_DIRECTION)
2480 _needed = 3;
2481 break;
2482 #if defined(GL_AMBIENT)
2483 case GL_AMBIENT:
2484 #endif // defined(GL_AMBIENT)
2485 #if defined(GL_DIFFUSE)
2486 case GL_DIFFUSE:
2487 #endif // defined(GL_DIFFUSE)
2488 #if defined(GL_SPECULAR)
2489 case GL_SPECULAR:
2490 #endif // defined(GL_SPECULAR)
2491 #if defined(GL_EMISSION)
2492 case GL_EMISSION:
2493 #endif // defined(GL_EMISSION)
2494 _needed = 4;
2495 break;
2496 default:
2497 _needed = 1;
2498 break;
2499 }
2500 if (_remaining < _needed) {
2501 _exception = 1;
2502 _exceptionType = "java/lang/IllegalArgumentException";
2503 _exceptionMessage = "length - offset < needed";
2504 goto exit;
2505 }
2506 params_base = (GLfixed *)
2507 _env->GetIntArrayElements(params_ref, (jboolean *)0);
2508 params = params_base + offset;
2509
2510 glLightxv(
2511 (GLenum)light,
2512 (GLenum)pname,
2513 (GLfixed *)params
2514 );
2515
2516 exit:
2517 if (params_base) {
2518 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2519 JNI_ABORT);
2520 }
2521 if (_exception) {
2522 jniThrowException(_env, _exceptionType, _exceptionMessage);
2523 }
2524 }
2525
2526 /* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
2527 static void
android_glLightxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)2528 android_glLightxv__IILjava_nio_IntBuffer_2
2529 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
2530 jint _exception = 0;
2531 const char * _exceptionType = NULL;
2532 const char * _exceptionMessage = NULL;
2533 jintArray _array = (jintArray) 0;
2534 jint _bufferOffset = (jint) 0;
2535 jint _remaining;
2536 GLfixed *params = (GLfixed *) 0;
2537
2538 if (!params_buf) {
2539 _exception = 1;
2540 _exceptionType = "java/lang/IllegalArgumentException";
2541 _exceptionMessage = "params == null";
2542 goto exit;
2543 }
2544 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2545 int _needed;
2546 switch (pname) {
2547 #if defined(GL_SPOT_EXPONENT)
2548 case GL_SPOT_EXPONENT:
2549 #endif // defined(GL_SPOT_EXPONENT)
2550 #if defined(GL_SPOT_CUTOFF)
2551 case GL_SPOT_CUTOFF:
2552 #endif // defined(GL_SPOT_CUTOFF)
2553 #if defined(GL_CONSTANT_ATTENUATION)
2554 case GL_CONSTANT_ATTENUATION:
2555 #endif // defined(GL_CONSTANT_ATTENUATION)
2556 #if defined(GL_LINEAR_ATTENUATION)
2557 case GL_LINEAR_ATTENUATION:
2558 #endif // defined(GL_LINEAR_ATTENUATION)
2559 #if defined(GL_QUADRATIC_ATTENUATION)
2560 case GL_QUADRATIC_ATTENUATION:
2561 #endif // defined(GL_QUADRATIC_ATTENUATION)
2562 _needed = 1;
2563 break;
2564 #if defined(GL_SPOT_DIRECTION)
2565 case GL_SPOT_DIRECTION:
2566 #endif // defined(GL_SPOT_DIRECTION)
2567 _needed = 3;
2568 break;
2569 #if defined(GL_AMBIENT)
2570 case GL_AMBIENT:
2571 #endif // defined(GL_AMBIENT)
2572 #if defined(GL_DIFFUSE)
2573 case GL_DIFFUSE:
2574 #endif // defined(GL_DIFFUSE)
2575 #if defined(GL_SPECULAR)
2576 case GL_SPECULAR:
2577 #endif // defined(GL_SPECULAR)
2578 #if defined(GL_EMISSION)
2579 case GL_EMISSION:
2580 #endif // defined(GL_EMISSION)
2581 _needed = 4;
2582 break;
2583 default:
2584 _needed = 1;
2585 break;
2586 }
2587 if (_remaining < _needed) {
2588 _exception = 1;
2589 _exceptionType = "java/lang/IllegalArgumentException";
2590 _exceptionMessage = "remaining() < needed";
2591 goto exit;
2592 }
2593 if (params == NULL) {
2594 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2595 params = (GLfixed *) (_paramsBase + _bufferOffset);
2596 }
2597 glLightxv(
2598 (GLenum)light,
2599 (GLenum)pname,
2600 (GLfixed *)params
2601 );
2602
2603 exit:
2604 if (_array) {
2605 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
2606 }
2607 if (_exception) {
2608 jniThrowException(_env, _exceptionType, _exceptionMessage);
2609 }
2610 }
2611
2612 /* void glLineWidth ( GLfloat width ) */
2613 static void
android_glLineWidth__F(JNIEnv * _env,jobject _this,jfloat width)2614 android_glLineWidth__F
2615 (JNIEnv *_env, jobject _this, jfloat width) {
2616 glLineWidth(
2617 (GLfloat)width
2618 );
2619 }
2620
2621 /* void glLineWidthx ( GLfixed width ) */
2622 static void
android_glLineWidthx__I(JNIEnv * _env,jobject _this,jint width)2623 android_glLineWidthx__I
2624 (JNIEnv *_env, jobject _this, jint width) {
2625 glLineWidthx(
2626 (GLfixed)width
2627 );
2628 }
2629
2630 /* void glLoadIdentity ( void ) */
2631 static void
android_glLoadIdentity__(JNIEnv * _env,jobject _this)2632 android_glLoadIdentity__
2633 (JNIEnv *_env, jobject _this) {
2634 glLoadIdentity();
2635 }
2636
2637 /* void glLoadMatrixf ( const GLfloat *m ) */
2638 static void
android_glLoadMatrixf___3FI(JNIEnv * _env,jobject _this,jfloatArray m_ref,jint offset)2639 android_glLoadMatrixf___3FI
2640 (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
2641 jint _exception = 0;
2642 const char * _exceptionType = NULL;
2643 const char * _exceptionMessage = NULL;
2644 GLfloat *m_base = (GLfloat *) 0;
2645 jint _remaining;
2646 GLfloat *m = (GLfloat *) 0;
2647
2648 if (!m_ref) {
2649 _exception = 1;
2650 _exceptionType = "java/lang/IllegalArgumentException";
2651 _exceptionMessage = "m == null";
2652 goto exit;
2653 }
2654 if (offset < 0) {
2655 _exception = 1;
2656 _exceptionType = "java/lang/IllegalArgumentException";
2657 _exceptionMessage = "offset < 0";
2658 goto exit;
2659 }
2660 _remaining = _env->GetArrayLength(m_ref) - offset;
2661 m_base = (GLfloat *)
2662 _env->GetFloatArrayElements(m_ref, (jboolean *)0);
2663 m = m_base + offset;
2664
2665 glLoadMatrixf(
2666 (GLfloat *)m
2667 );
2668
2669 exit:
2670 if (m_base) {
2671 _env->ReleaseFloatArrayElements(m_ref, (jfloat*)m_base,
2672 JNI_ABORT);
2673 }
2674 if (_exception) {
2675 jniThrowException(_env, _exceptionType, _exceptionMessage);
2676 }
2677 }
2678
2679 /* void glLoadMatrixf ( const GLfloat *m ) */
2680 static void
android_glLoadMatrixf__Ljava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jobject m_buf)2681 android_glLoadMatrixf__Ljava_nio_FloatBuffer_2
2682 (JNIEnv *_env, jobject _this, jobject m_buf) {
2683 jint _exception = 0;
2684 const char * _exceptionType = NULL;
2685 const char * _exceptionMessage = NULL;
2686 jfloatArray _array = (jfloatArray) 0;
2687 jint _bufferOffset = (jint) 0;
2688 jint _remaining;
2689 GLfloat *m = (GLfloat *) 0;
2690
2691 if (!m_buf) {
2692 _exception = 1;
2693 _exceptionType = "java/lang/IllegalArgumentException";
2694 _exceptionMessage = "m == null";
2695 goto exit;
2696 }
2697 m = (GLfloat *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2698 if (m == NULL) {
2699 char * _mBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2700 m = (GLfloat *) (_mBase + _bufferOffset);
2701 }
2702 glLoadMatrixf(
2703 (GLfloat *)m
2704 );
2705
2706 exit:
2707 if (_array) {
2708 _env->ReleaseFloatArrayElements(_array, (jfloat*)m, JNI_ABORT);
2709 }
2710 if (_exception) {
2711 jniThrowException(_env, _exceptionType, _exceptionMessage);
2712 }
2713 }
2714
2715 /* void glLoadMatrixx ( const GLfixed *m ) */
2716 static void
android_glLoadMatrixx___3II(JNIEnv * _env,jobject _this,jintArray m_ref,jint offset)2717 android_glLoadMatrixx___3II
2718 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
2719 jint _exception = 0;
2720 const char * _exceptionType = NULL;
2721 const char * _exceptionMessage = NULL;
2722 GLfixed *m_base = (GLfixed *) 0;
2723 jint _remaining;
2724 GLfixed *m = (GLfixed *) 0;
2725
2726 if (!m_ref) {
2727 _exception = 1;
2728 _exceptionType = "java/lang/IllegalArgumentException";
2729 _exceptionMessage = "m == null";
2730 goto exit;
2731 }
2732 if (offset < 0) {
2733 _exception = 1;
2734 _exceptionType = "java/lang/IllegalArgumentException";
2735 _exceptionMessage = "offset < 0";
2736 goto exit;
2737 }
2738 _remaining = _env->GetArrayLength(m_ref) - offset;
2739 m_base = (GLfixed *)
2740 _env->GetIntArrayElements(m_ref, (jboolean *)0);
2741 m = m_base + offset;
2742
2743 glLoadMatrixx(
2744 (GLfixed *)m
2745 );
2746
2747 exit:
2748 if (m_base) {
2749 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
2750 JNI_ABORT);
2751 }
2752 if (_exception) {
2753 jniThrowException(_env, _exceptionType, _exceptionMessage);
2754 }
2755 }
2756
2757 /* void glLoadMatrixx ( const GLfixed *m ) */
2758 static void
android_glLoadMatrixx__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject m_buf)2759 android_glLoadMatrixx__Ljava_nio_IntBuffer_2
2760 (JNIEnv *_env, jobject _this, jobject m_buf) {
2761 jint _exception = 0;
2762 const char * _exceptionType = NULL;
2763 const char * _exceptionMessage = NULL;
2764 jintArray _array = (jintArray) 0;
2765 jint _bufferOffset = (jint) 0;
2766 jint _remaining;
2767 GLfixed *m = (GLfixed *) 0;
2768
2769 if (!m_buf) {
2770 _exception = 1;
2771 _exceptionType = "java/lang/IllegalArgumentException";
2772 _exceptionMessage = "m == null";
2773 goto exit;
2774 }
2775 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2776 if (m == NULL) {
2777 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2778 m = (GLfixed *) (_mBase + _bufferOffset);
2779 }
2780 glLoadMatrixx(
2781 (GLfixed *)m
2782 );
2783
2784 exit:
2785 if (_array) {
2786 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
2787 }
2788 if (_exception) {
2789 jniThrowException(_env, _exceptionType, _exceptionMessage);
2790 }
2791 }
2792
2793 /* void glLogicOp ( GLenum opcode ) */
2794 static void
android_glLogicOp__I(JNIEnv * _env,jobject _this,jint opcode)2795 android_glLogicOp__I
2796 (JNIEnv *_env, jobject _this, jint opcode) {
2797 glLogicOp(
2798 (GLenum)opcode
2799 );
2800 }
2801
2802 /* void glMaterialf ( GLenum face, GLenum pname, GLfloat param ) */
2803 static void
android_glMaterialf__IIF(JNIEnv * _env,jobject _this,jint face,jint pname,jfloat param)2804 android_glMaterialf__IIF
2805 (JNIEnv *_env, jobject _this, jint face, jint pname, jfloat param) {
2806 glMaterialf(
2807 (GLenum)face,
2808 (GLenum)pname,
2809 (GLfloat)param
2810 );
2811 }
2812
2813 /* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
2814 static void
android_glMaterialfv__II_3FI(JNIEnv * _env,jobject _this,jint face,jint pname,jfloatArray params_ref,jint offset)2815 android_glMaterialfv__II_3FI
2816 (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
2817 jint _exception = 0;
2818 const char * _exceptionType = NULL;
2819 const char * _exceptionMessage = NULL;
2820 GLfloat *params_base = (GLfloat *) 0;
2821 jint _remaining;
2822 GLfloat *params = (GLfloat *) 0;
2823
2824 if (!params_ref) {
2825 _exception = 1;
2826 _exceptionType = "java/lang/IllegalArgumentException";
2827 _exceptionMessage = "params == null";
2828 goto exit;
2829 }
2830 if (offset < 0) {
2831 _exception = 1;
2832 _exceptionType = "java/lang/IllegalArgumentException";
2833 _exceptionMessage = "offset < 0";
2834 goto exit;
2835 }
2836 _remaining = _env->GetArrayLength(params_ref) - offset;
2837 int _needed;
2838 switch (pname) {
2839 #if defined(GL_SHININESS)
2840 case GL_SHININESS:
2841 #endif // defined(GL_SHININESS)
2842 _needed = 1;
2843 break;
2844 #if defined(GL_AMBIENT)
2845 case GL_AMBIENT:
2846 #endif // defined(GL_AMBIENT)
2847 #if defined(GL_DIFFUSE)
2848 case GL_DIFFUSE:
2849 #endif // defined(GL_DIFFUSE)
2850 #if defined(GL_SPECULAR)
2851 case GL_SPECULAR:
2852 #endif // defined(GL_SPECULAR)
2853 #if defined(GL_EMISSION)
2854 case GL_EMISSION:
2855 #endif // defined(GL_EMISSION)
2856 #if defined(GL_AMBIENT_AND_DIFFUSE)
2857 case GL_AMBIENT_AND_DIFFUSE:
2858 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
2859 _needed = 4;
2860 break;
2861 default:
2862 _needed = 1;
2863 break;
2864 }
2865 if (_remaining < _needed) {
2866 _exception = 1;
2867 _exceptionType = "java/lang/IllegalArgumentException";
2868 _exceptionMessage = "length - offset < needed";
2869 goto exit;
2870 }
2871 params_base = (GLfloat *)
2872 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
2873 params = params_base + offset;
2874
2875 glMaterialfv(
2876 (GLenum)face,
2877 (GLenum)pname,
2878 (GLfloat *)params
2879 );
2880
2881 exit:
2882 if (params_base) {
2883 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
2884 JNI_ABORT);
2885 }
2886 if (_exception) {
2887 jniThrowException(_env, _exceptionType, _exceptionMessage);
2888 }
2889 }
2890
2891 /* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
2892 static void
android_glMaterialfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)2893 android_glMaterialfv__IILjava_nio_FloatBuffer_2
2894 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
2895 jint _exception = 0;
2896 const char * _exceptionType = NULL;
2897 const char * _exceptionMessage = NULL;
2898 jfloatArray _array = (jfloatArray) 0;
2899 jint _bufferOffset = (jint) 0;
2900 jint _remaining;
2901 GLfloat *params = (GLfloat *) 0;
2902
2903 if (!params_buf) {
2904 _exception = 1;
2905 _exceptionType = "java/lang/IllegalArgumentException";
2906 _exceptionMessage = "params == null";
2907 goto exit;
2908 }
2909 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2910 int _needed;
2911 switch (pname) {
2912 #if defined(GL_SHININESS)
2913 case GL_SHININESS:
2914 #endif // defined(GL_SHININESS)
2915 _needed = 1;
2916 break;
2917 #if defined(GL_AMBIENT)
2918 case GL_AMBIENT:
2919 #endif // defined(GL_AMBIENT)
2920 #if defined(GL_DIFFUSE)
2921 case GL_DIFFUSE:
2922 #endif // defined(GL_DIFFUSE)
2923 #if defined(GL_SPECULAR)
2924 case GL_SPECULAR:
2925 #endif // defined(GL_SPECULAR)
2926 #if defined(GL_EMISSION)
2927 case GL_EMISSION:
2928 #endif // defined(GL_EMISSION)
2929 #if defined(GL_AMBIENT_AND_DIFFUSE)
2930 case GL_AMBIENT_AND_DIFFUSE:
2931 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
2932 _needed = 4;
2933 break;
2934 default:
2935 _needed = 1;
2936 break;
2937 }
2938 if (_remaining < _needed) {
2939 _exception = 1;
2940 _exceptionType = "java/lang/IllegalArgumentException";
2941 _exceptionMessage = "remaining() < needed";
2942 goto exit;
2943 }
2944 if (params == NULL) {
2945 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
2946 params = (GLfloat *) (_paramsBase + _bufferOffset);
2947 }
2948 glMaterialfv(
2949 (GLenum)face,
2950 (GLenum)pname,
2951 (GLfloat *)params
2952 );
2953
2954 exit:
2955 if (_array) {
2956 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
2957 }
2958 if (_exception) {
2959 jniThrowException(_env, _exceptionType, _exceptionMessage);
2960 }
2961 }
2962
2963 /* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */
2964 static void
android_glMaterialx__III(JNIEnv * _env,jobject _this,jint face,jint pname,jint param)2965 android_glMaterialx__III
2966 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) {
2967 glMaterialx(
2968 (GLenum)face,
2969 (GLenum)pname,
2970 (GLfixed)param
2971 );
2972 }
2973
2974 /* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
2975 static void
android_glMaterialxv__II_3II(JNIEnv * _env,jobject _this,jint face,jint pname,jintArray params_ref,jint offset)2976 android_glMaterialxv__II_3II
2977 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
2978 jint _exception = 0;
2979 const char * _exceptionType = NULL;
2980 const char * _exceptionMessage = NULL;
2981 GLfixed *params_base = (GLfixed *) 0;
2982 jint _remaining;
2983 GLfixed *params = (GLfixed *) 0;
2984
2985 if (!params_ref) {
2986 _exception = 1;
2987 _exceptionType = "java/lang/IllegalArgumentException";
2988 _exceptionMessage = "params == null";
2989 goto exit;
2990 }
2991 if (offset < 0) {
2992 _exception = 1;
2993 _exceptionType = "java/lang/IllegalArgumentException";
2994 _exceptionMessage = "offset < 0";
2995 goto exit;
2996 }
2997 _remaining = _env->GetArrayLength(params_ref) - offset;
2998 int _needed;
2999 switch (pname) {
3000 #if defined(GL_SHININESS)
3001 case GL_SHININESS:
3002 #endif // defined(GL_SHININESS)
3003 _needed = 1;
3004 break;
3005 #if defined(GL_AMBIENT)
3006 case GL_AMBIENT:
3007 #endif // defined(GL_AMBIENT)
3008 #if defined(GL_DIFFUSE)
3009 case GL_DIFFUSE:
3010 #endif // defined(GL_DIFFUSE)
3011 #if defined(GL_SPECULAR)
3012 case GL_SPECULAR:
3013 #endif // defined(GL_SPECULAR)
3014 #if defined(GL_EMISSION)
3015 case GL_EMISSION:
3016 #endif // defined(GL_EMISSION)
3017 #if defined(GL_AMBIENT_AND_DIFFUSE)
3018 case GL_AMBIENT_AND_DIFFUSE:
3019 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
3020 _needed = 4;
3021 break;
3022 default:
3023 _needed = 1;
3024 break;
3025 }
3026 if (_remaining < _needed) {
3027 _exception = 1;
3028 _exceptionType = "java/lang/IllegalArgumentException";
3029 _exceptionMessage = "length - offset < needed";
3030 goto exit;
3031 }
3032 params_base = (GLfixed *)
3033 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3034 params = params_base + offset;
3035
3036 glMaterialxv(
3037 (GLenum)face,
3038 (GLenum)pname,
3039 (GLfixed *)params
3040 );
3041
3042 exit:
3043 if (params_base) {
3044 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3045 JNI_ABORT);
3046 }
3047 if (_exception) {
3048 jniThrowException(_env, _exceptionType, _exceptionMessage);
3049 }
3050 }
3051
3052 /* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
3053 static void
android_glMaterialxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)3054 android_glMaterialxv__IILjava_nio_IntBuffer_2
3055 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
3056 jint _exception = 0;
3057 const char * _exceptionType = NULL;
3058 const char * _exceptionMessage = NULL;
3059 jintArray _array = (jintArray) 0;
3060 jint _bufferOffset = (jint) 0;
3061 jint _remaining;
3062 GLfixed *params = (GLfixed *) 0;
3063
3064 if (!params_buf) {
3065 _exception = 1;
3066 _exceptionType = "java/lang/IllegalArgumentException";
3067 _exceptionMessage = "params == null";
3068 goto exit;
3069 }
3070 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3071 int _needed;
3072 switch (pname) {
3073 #if defined(GL_SHININESS)
3074 case GL_SHININESS:
3075 #endif // defined(GL_SHININESS)
3076 _needed = 1;
3077 break;
3078 #if defined(GL_AMBIENT)
3079 case GL_AMBIENT:
3080 #endif // defined(GL_AMBIENT)
3081 #if defined(GL_DIFFUSE)
3082 case GL_DIFFUSE:
3083 #endif // defined(GL_DIFFUSE)
3084 #if defined(GL_SPECULAR)
3085 case GL_SPECULAR:
3086 #endif // defined(GL_SPECULAR)
3087 #if defined(GL_EMISSION)
3088 case GL_EMISSION:
3089 #endif // defined(GL_EMISSION)
3090 #if defined(GL_AMBIENT_AND_DIFFUSE)
3091 case GL_AMBIENT_AND_DIFFUSE:
3092 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
3093 _needed = 4;
3094 break;
3095 default:
3096 _needed = 1;
3097 break;
3098 }
3099 if (_remaining < _needed) {
3100 _exception = 1;
3101 _exceptionType = "java/lang/IllegalArgumentException";
3102 _exceptionMessage = "remaining() < needed";
3103 goto exit;
3104 }
3105 if (params == NULL) {
3106 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3107 params = (GLfixed *) (_paramsBase + _bufferOffset);
3108 }
3109 glMaterialxv(
3110 (GLenum)face,
3111 (GLenum)pname,
3112 (GLfixed *)params
3113 );
3114
3115 exit:
3116 if (_array) {
3117 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
3118 }
3119 if (_exception) {
3120 jniThrowException(_env, _exceptionType, _exceptionMessage);
3121 }
3122 }
3123
3124 /* void glMatrixMode ( GLenum mode ) */
3125 static void
android_glMatrixMode__I(JNIEnv * _env,jobject _this,jint mode)3126 android_glMatrixMode__I
3127 (JNIEnv *_env, jobject _this, jint mode) {
3128 glMatrixMode(
3129 (GLenum)mode
3130 );
3131 }
3132
3133 /* void glMultMatrixf ( const GLfloat *m ) */
3134 static void
android_glMultMatrixf___3FI(JNIEnv * _env,jobject _this,jfloatArray m_ref,jint offset)3135 android_glMultMatrixf___3FI
3136 (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
3137 jint _exception = 0;
3138 const char * _exceptionType = NULL;
3139 const char * _exceptionMessage = NULL;
3140 GLfloat *m_base = (GLfloat *) 0;
3141 jint _remaining;
3142 GLfloat *m = (GLfloat *) 0;
3143
3144 if (!m_ref) {
3145 _exception = 1;
3146 _exceptionType = "java/lang/IllegalArgumentException";
3147 _exceptionMessage = "m == null";
3148 goto exit;
3149 }
3150 if (offset < 0) {
3151 _exception = 1;
3152 _exceptionType = "java/lang/IllegalArgumentException";
3153 _exceptionMessage = "offset < 0";
3154 goto exit;
3155 }
3156 _remaining = _env->GetArrayLength(m_ref) - offset;
3157 m_base = (GLfloat *)
3158 _env->GetFloatArrayElements(m_ref, (jboolean *)0);
3159 m = m_base + offset;
3160
3161 glMultMatrixf(
3162 (GLfloat *)m
3163 );
3164
3165 exit:
3166 if (m_base) {
3167 _env->ReleaseFloatArrayElements(m_ref, (jfloat*)m_base,
3168 JNI_ABORT);
3169 }
3170 if (_exception) {
3171 jniThrowException(_env, _exceptionType, _exceptionMessage);
3172 }
3173 }
3174
3175 /* void glMultMatrixf ( const GLfloat *m ) */
3176 static void
android_glMultMatrixf__Ljava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jobject m_buf)3177 android_glMultMatrixf__Ljava_nio_FloatBuffer_2
3178 (JNIEnv *_env, jobject _this, jobject m_buf) {
3179 jint _exception = 0;
3180 const char * _exceptionType = NULL;
3181 const char * _exceptionMessage = NULL;
3182 jfloatArray _array = (jfloatArray) 0;
3183 jint _bufferOffset = (jint) 0;
3184 jint _remaining;
3185 GLfloat *m = (GLfloat *) 0;
3186
3187 if (!m_buf) {
3188 _exception = 1;
3189 _exceptionType = "java/lang/IllegalArgumentException";
3190 _exceptionMessage = "m == null";
3191 goto exit;
3192 }
3193 m = (GLfloat *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3194 if (m == NULL) {
3195 char * _mBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3196 m = (GLfloat *) (_mBase + _bufferOffset);
3197 }
3198 glMultMatrixf(
3199 (GLfloat *)m
3200 );
3201
3202 exit:
3203 if (_array) {
3204 _env->ReleaseFloatArrayElements(_array, (jfloat*)m, JNI_ABORT);
3205 }
3206 if (_exception) {
3207 jniThrowException(_env, _exceptionType, _exceptionMessage);
3208 }
3209 }
3210
3211 /* void glMultMatrixx ( const GLfixed *m ) */
3212 static void
android_glMultMatrixx___3II(JNIEnv * _env,jobject _this,jintArray m_ref,jint offset)3213 android_glMultMatrixx___3II
3214 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
3215 jint _exception = 0;
3216 const char * _exceptionType = NULL;
3217 const char * _exceptionMessage = NULL;
3218 GLfixed *m_base = (GLfixed *) 0;
3219 jint _remaining;
3220 GLfixed *m = (GLfixed *) 0;
3221
3222 if (!m_ref) {
3223 _exception = 1;
3224 _exceptionType = "java/lang/IllegalArgumentException";
3225 _exceptionMessage = "m == null";
3226 goto exit;
3227 }
3228 if (offset < 0) {
3229 _exception = 1;
3230 _exceptionType = "java/lang/IllegalArgumentException";
3231 _exceptionMessage = "offset < 0";
3232 goto exit;
3233 }
3234 _remaining = _env->GetArrayLength(m_ref) - offset;
3235 m_base = (GLfixed *)
3236 _env->GetIntArrayElements(m_ref, (jboolean *)0);
3237 m = m_base + offset;
3238
3239 glMultMatrixx(
3240 (GLfixed *)m
3241 );
3242
3243 exit:
3244 if (m_base) {
3245 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base,
3246 JNI_ABORT);
3247 }
3248 if (_exception) {
3249 jniThrowException(_env, _exceptionType, _exceptionMessage);
3250 }
3251 }
3252
3253 /* void glMultMatrixx ( const GLfixed *m ) */
3254 static void
android_glMultMatrixx__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject m_buf)3255 android_glMultMatrixx__Ljava_nio_IntBuffer_2
3256 (JNIEnv *_env, jobject _this, jobject m_buf) {
3257 jint _exception = 0;
3258 const char * _exceptionType = NULL;
3259 const char * _exceptionMessage = NULL;
3260 jintArray _array = (jintArray) 0;
3261 jint _bufferOffset = (jint) 0;
3262 jint _remaining;
3263 GLfixed *m = (GLfixed *) 0;
3264
3265 if (!m_buf) {
3266 _exception = 1;
3267 _exceptionType = "java/lang/IllegalArgumentException";
3268 _exceptionMessage = "m == null";
3269 goto exit;
3270 }
3271 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3272 if (m == NULL) {
3273 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3274 m = (GLfixed *) (_mBase + _bufferOffset);
3275 }
3276 glMultMatrixx(
3277 (GLfixed *)m
3278 );
3279
3280 exit:
3281 if (_array) {
3282 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
3283 }
3284 if (_exception) {
3285 jniThrowException(_env, _exceptionType, _exceptionMessage);
3286 }
3287 }
3288
3289 /* void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) */
3290 static void
android_glMultiTexCoord4f__IFFFF(JNIEnv * _env,jobject _this,jint target,jfloat s,jfloat t,jfloat r,jfloat q)3291 android_glMultiTexCoord4f__IFFFF
3292 (JNIEnv *_env, jobject _this, jint target, jfloat s, jfloat t, jfloat r, jfloat q) {
3293 glMultiTexCoord4f(
3294 (GLenum)target,
3295 (GLfloat)s,
3296 (GLfloat)t,
3297 (GLfloat)r,
3298 (GLfloat)q
3299 );
3300 }
3301
3302 /* void glMultiTexCoord4x ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
3303 static void
android_glMultiTexCoord4x__IIIII(JNIEnv * _env,jobject _this,jint target,jint s,jint t,jint r,jint q)3304 android_glMultiTexCoord4x__IIIII
3305 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) {
3306 glMultiTexCoord4x(
3307 (GLenum)target,
3308 (GLfixed)s,
3309 (GLfixed)t,
3310 (GLfixed)r,
3311 (GLfixed)q
3312 );
3313 }
3314
3315 /* void glNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz ) */
3316 static void
android_glNormal3f__FFF(JNIEnv * _env,jobject _this,jfloat nx,jfloat ny,jfloat nz)3317 android_glNormal3f__FFF
3318 (JNIEnv *_env, jobject _this, jfloat nx, jfloat ny, jfloat nz) {
3319 glNormal3f(
3320 (GLfloat)nx,
3321 (GLfloat)ny,
3322 (GLfloat)nz
3323 );
3324 }
3325
3326 /* void glNormal3x ( GLfixed nx, GLfixed ny, GLfixed nz ) */
3327 static void
android_glNormal3x__III(JNIEnv * _env,jobject _this,jint nx,jint ny,jint nz)3328 android_glNormal3x__III
3329 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) {
3330 glNormal3x(
3331 (GLfixed)nx,
3332 (GLfixed)ny,
3333 (GLfixed)nz
3334 );
3335 }
3336
3337 /* void glNormalPointer ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
3338 static void
android_glNormalPointerBounds__IILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint type,jint stride,jobject pointer_buf,jint remaining)3339 android_glNormalPointerBounds__IILjava_nio_Buffer_2I
3340 (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
3341 jint _exception = 0;
3342 const char * _exceptionType = NULL;
3343 const char * _exceptionMessage = NULL;
3344 jarray _array = (jarray) 0;
3345 jint _bufferOffset = (jint) 0;
3346 jint _remaining;
3347 GLvoid *pointer = (GLvoid *) 0;
3348
3349 if (pointer_buf) {
3350 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3351 if ( ! pointer ) {
3352 return;
3353 }
3354 }
3355 glNormalPointerBounds(
3356 (GLenum)type,
3357 (GLsizei)stride,
3358 (GLvoid *)pointer,
3359 (GLsizei)remaining
3360 );
3361 if (_exception) {
3362 jniThrowException(_env, _exceptionType, _exceptionMessage);
3363 }
3364 }
3365
3366 /* void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
3367 static void
android_glOrthof__FFFFFF(JNIEnv * _env,jobject _this,jfloat left,jfloat right,jfloat bottom,jfloat top,jfloat zNear,jfloat zFar)3368 android_glOrthof__FFFFFF
3369 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) {
3370 glOrthof(
3371 (GLfloat)left,
3372 (GLfloat)right,
3373 (GLfloat)bottom,
3374 (GLfloat)top,
3375 (GLfloat)zNear,
3376 (GLfloat)zFar
3377 );
3378 }
3379
3380 /* void glOrthox ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
3381 static void
android_glOrthox__IIIIII(JNIEnv * _env,jobject _this,jint left,jint right,jint bottom,jint top,jint zNear,jint zFar)3382 android_glOrthox__IIIIII
3383 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) {
3384 glOrthox(
3385 (GLfixed)left,
3386 (GLfixed)right,
3387 (GLfixed)bottom,
3388 (GLfixed)top,
3389 (GLfixed)zNear,
3390 (GLfixed)zFar
3391 );
3392 }
3393
3394 /* void glPixelStorei ( GLenum pname, GLint param ) */
3395 static void
android_glPixelStorei__II(JNIEnv * _env,jobject _this,jint pname,jint param)3396 android_glPixelStorei__II
3397 (JNIEnv *_env, jobject _this, jint pname, jint param) {
3398 glPixelStorei(
3399 (GLenum)pname,
3400 (GLint)param
3401 );
3402 }
3403
3404 /* void glPointSize ( GLfloat size ) */
3405 static void
android_glPointSize__F(JNIEnv * _env,jobject _this,jfloat size)3406 android_glPointSize__F
3407 (JNIEnv *_env, jobject _this, jfloat size) {
3408 glPointSize(
3409 (GLfloat)size
3410 );
3411 }
3412
3413 /* void glPointSizex ( GLfixed size ) */
3414 static void
android_glPointSizex__I(JNIEnv * _env,jobject _this,jint size)3415 android_glPointSizex__I
3416 (JNIEnv *_env, jobject _this, jint size) {
3417 glPointSizex(
3418 (GLfixed)size
3419 );
3420 }
3421
3422 /* void glPolygonOffset ( GLfloat factor, GLfloat units ) */
3423 static void
android_glPolygonOffset__FF(JNIEnv * _env,jobject _this,jfloat factor,jfloat units)3424 android_glPolygonOffset__FF
3425 (JNIEnv *_env, jobject _this, jfloat factor, jfloat units) {
3426 glPolygonOffset(
3427 (GLfloat)factor,
3428 (GLfloat)units
3429 );
3430 }
3431
3432 /* void glPolygonOffsetx ( GLfixed factor, GLfixed units ) */
3433 static void
android_glPolygonOffsetx__II(JNIEnv * _env,jobject _this,jint factor,jint units)3434 android_glPolygonOffsetx__II
3435 (JNIEnv *_env, jobject _this, jint factor, jint units) {
3436 glPolygonOffsetx(
3437 (GLfixed)factor,
3438 (GLfixed)units
3439 );
3440 }
3441
3442 /* void glPopMatrix ( void ) */
3443 static void
android_glPopMatrix__(JNIEnv * _env,jobject _this)3444 android_glPopMatrix__
3445 (JNIEnv *_env, jobject _this) {
3446 glPopMatrix();
3447 }
3448
3449 /* void glPushMatrix ( void ) */
3450 static void
android_glPushMatrix__(JNIEnv * _env,jobject _this)3451 android_glPushMatrix__
3452 (JNIEnv *_env, jobject _this) {
3453 glPushMatrix();
3454 }
3455
3456 /* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) */
3457 static void
android_glReadPixels__IIIIIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint x,jint y,jint width,jint height,jint format,jint type,jobject pixels_buf)3458 android_glReadPixels__IIIIIILjava_nio_Buffer_2
3459 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
3460 jint _exception = 0;
3461 const char * _exceptionType = NULL;
3462 const char * _exceptionMessage = NULL;
3463 jarray _array = (jarray) 0;
3464 jint _bufferOffset = (jint) 0;
3465 jint _remaining;
3466 GLvoid *pixels = (GLvoid *) 0;
3467
3468 if (!pixels_buf) {
3469 _exception = 1;
3470 _exceptionType = "java/lang/IllegalArgumentException";
3471 _exceptionMessage = "pixels == null";
3472 goto exit;
3473 }
3474 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3475 if (pixels == NULL) {
3476 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3477 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
3478 }
3479 glReadPixels(
3480 (GLint)x,
3481 (GLint)y,
3482 (GLsizei)width,
3483 (GLsizei)height,
3484 (GLenum)format,
3485 (GLenum)type,
3486 (GLvoid *)pixels
3487 );
3488
3489 exit:
3490 if (_array) {
3491 releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
3492 }
3493 if (_exception) {
3494 jniThrowException(_env, _exceptionType, _exceptionMessage);
3495 }
3496 }
3497
3498 /* void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) */
3499 static void
android_glRotatef__FFFF(JNIEnv * _env,jobject _this,jfloat angle,jfloat x,jfloat y,jfloat z)3500 android_glRotatef__FFFF
3501 (JNIEnv *_env, jobject _this, jfloat angle, jfloat x, jfloat y, jfloat z) {
3502 glRotatef(
3503 (GLfloat)angle,
3504 (GLfloat)x,
3505 (GLfloat)y,
3506 (GLfloat)z
3507 );
3508 }
3509
3510 /* void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
3511 static void
android_glRotatex__IIII(JNIEnv * _env,jobject _this,jint angle,jint x,jint y,jint z)3512 android_glRotatex__IIII
3513 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
3514 glRotatex(
3515 (GLfixed)angle,
3516 (GLfixed)x,
3517 (GLfixed)y,
3518 (GLfixed)z
3519 );
3520 }
3521
3522 /* void glSampleCoverage ( GLclampf value, GLboolean invert ) */
3523 static void
android_glSampleCoverage__FZ(JNIEnv * _env,jobject _this,jfloat value,jboolean invert)3524 android_glSampleCoverage__FZ
3525 (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) {
3526 glSampleCoverage(
3527 (GLclampf)value,
3528 (GLboolean)invert
3529 );
3530 }
3531
3532 /* void glSampleCoveragex ( GLclampx value, GLboolean invert ) */
3533 static void
android_glSampleCoveragex__IZ(JNIEnv * _env,jobject _this,jint value,jboolean invert)3534 android_glSampleCoveragex__IZ
3535 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
3536 glSampleCoveragex(
3537 (GLclampx)value,
3538 (GLboolean)invert
3539 );
3540 }
3541
3542 /* void glScalef ( GLfloat x, GLfloat y, GLfloat z ) */
3543 static void
android_glScalef__FFF(JNIEnv * _env,jobject _this,jfloat x,jfloat y,jfloat z)3544 android_glScalef__FFF
3545 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
3546 glScalef(
3547 (GLfloat)x,
3548 (GLfloat)y,
3549 (GLfloat)z
3550 );
3551 }
3552
3553 /* void glScalex ( GLfixed x, GLfixed y, GLfixed z ) */
3554 static void
android_glScalex__III(JNIEnv * _env,jobject _this,jint x,jint y,jint z)3555 android_glScalex__III
3556 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
3557 glScalex(
3558 (GLfixed)x,
3559 (GLfixed)y,
3560 (GLfixed)z
3561 );
3562 }
3563
3564 /* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */
3565 static void
android_glScissor__IIII(JNIEnv * _env,jobject _this,jint x,jint y,jint width,jint height)3566 android_glScissor__IIII
3567 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
3568 glScissor(
3569 (GLint)x,
3570 (GLint)y,
3571 (GLsizei)width,
3572 (GLsizei)height
3573 );
3574 }
3575
3576 /* void glShadeModel ( GLenum mode ) */
3577 static void
android_glShadeModel__I(JNIEnv * _env,jobject _this,jint mode)3578 android_glShadeModel__I
3579 (JNIEnv *_env, jobject _this, jint mode) {
3580 glShadeModel(
3581 (GLenum)mode
3582 );
3583 }
3584
3585 /* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */
3586 static void
android_glStencilFunc__III(JNIEnv * _env,jobject _this,jint func,jint ref,jint mask)3587 android_glStencilFunc__III
3588 (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) {
3589 glStencilFunc(
3590 (GLenum)func,
3591 (GLint)ref,
3592 (GLuint)mask
3593 );
3594 }
3595
3596 /* void glStencilMask ( GLuint mask ) */
3597 static void
android_glStencilMask__I(JNIEnv * _env,jobject _this,jint mask)3598 android_glStencilMask__I
3599 (JNIEnv *_env, jobject _this, jint mask) {
3600 glStencilMask(
3601 (GLuint)mask
3602 );
3603 }
3604
3605 /* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */
3606 static void
android_glStencilOp__III(JNIEnv * _env,jobject _this,jint fail,jint zfail,jint zpass)3607 android_glStencilOp__III
3608 (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) {
3609 glStencilOp(
3610 (GLenum)fail,
3611 (GLenum)zfail,
3612 (GLenum)zpass
3613 );
3614 }
3615
3616 /* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3617 static void
android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)3618 android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
3619 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
3620 jint _exception = 0;
3621 const char * _exceptionType = NULL;
3622 const char * _exceptionMessage = NULL;
3623 jarray _array = (jarray) 0;
3624 jint _bufferOffset = (jint) 0;
3625 jint _remaining;
3626 GLvoid *pointer = (GLvoid *) 0;
3627
3628 if (pointer_buf) {
3629 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3630 if ( ! pointer ) {
3631 return;
3632 }
3633 }
3634 glTexCoordPointerBounds(
3635 (GLint)size,
3636 (GLenum)type,
3637 (GLsizei)stride,
3638 (GLvoid *)pointer,
3639 (GLsizei)remaining
3640 );
3641 if (_exception) {
3642 jniThrowException(_env, _exceptionType, _exceptionMessage);
3643 }
3644 }
3645
3646 /* void glTexEnvf ( GLenum target, GLenum pname, GLfloat param ) */
3647 static void
android_glTexEnvf__IIF(JNIEnv * _env,jobject _this,jint target,jint pname,jfloat param)3648 android_glTexEnvf__IIF
3649 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3650 glTexEnvf(
3651 (GLenum)target,
3652 (GLenum)pname,
3653 (GLfloat)param
3654 );
3655 }
3656
3657 /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3658 static void
android_glTexEnvfv__II_3FI(JNIEnv * _env,jobject _this,jint target,jint pname,jfloatArray params_ref,jint offset)3659 android_glTexEnvfv__II_3FI
3660 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
3661 jint _exception = 0;
3662 const char * _exceptionType = NULL;
3663 const char * _exceptionMessage = NULL;
3664 GLfloat *params_base = (GLfloat *) 0;
3665 jint _remaining;
3666 GLfloat *params = (GLfloat *) 0;
3667
3668 if (!params_ref) {
3669 _exception = 1;
3670 _exceptionType = "java/lang/IllegalArgumentException";
3671 _exceptionMessage = "params == null";
3672 goto exit;
3673 }
3674 if (offset < 0) {
3675 _exception = 1;
3676 _exceptionType = "java/lang/IllegalArgumentException";
3677 _exceptionMessage = "offset < 0";
3678 goto exit;
3679 }
3680 _remaining = _env->GetArrayLength(params_ref) - offset;
3681 int _needed;
3682 switch (pname) {
3683 #if defined(GL_TEXTURE_ENV_MODE)
3684 case GL_TEXTURE_ENV_MODE:
3685 #endif // defined(GL_TEXTURE_ENV_MODE)
3686 #if defined(GL_COMBINE_RGB)
3687 case GL_COMBINE_RGB:
3688 #endif // defined(GL_COMBINE_RGB)
3689 #if defined(GL_COMBINE_ALPHA)
3690 case GL_COMBINE_ALPHA:
3691 #endif // defined(GL_COMBINE_ALPHA)
3692 _needed = 1;
3693 break;
3694 #if defined(GL_TEXTURE_ENV_COLOR)
3695 case GL_TEXTURE_ENV_COLOR:
3696 #endif // defined(GL_TEXTURE_ENV_COLOR)
3697 _needed = 4;
3698 break;
3699 default:
3700 _needed = 1;
3701 break;
3702 }
3703 if (_remaining < _needed) {
3704 _exception = 1;
3705 _exceptionType = "java/lang/IllegalArgumentException";
3706 _exceptionMessage = "length - offset < needed";
3707 goto exit;
3708 }
3709 params_base = (GLfloat *)
3710 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3711 params = params_base + offset;
3712
3713 glTexEnvfv(
3714 (GLenum)target,
3715 (GLenum)pname,
3716 (GLfloat *)params
3717 );
3718
3719 exit:
3720 if (params_base) {
3721 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3722 JNI_ABORT);
3723 }
3724 if (_exception) {
3725 jniThrowException(_env, _exceptionType, _exceptionMessage);
3726 }
3727 }
3728
3729 /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3730 static void
android_glTexEnvfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)3731 android_glTexEnvfv__IILjava_nio_FloatBuffer_2
3732 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3733 jint _exception = 0;
3734 const char * _exceptionType = NULL;
3735 const char * _exceptionMessage = NULL;
3736 jfloatArray _array = (jfloatArray) 0;
3737 jint _bufferOffset = (jint) 0;
3738 jint _remaining;
3739 GLfloat *params = (GLfloat *) 0;
3740
3741 if (!params_buf) {
3742 _exception = 1;
3743 _exceptionType = "java/lang/IllegalArgumentException";
3744 _exceptionMessage = "params == null";
3745 goto exit;
3746 }
3747 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3748 int _needed;
3749 switch (pname) {
3750 #if defined(GL_TEXTURE_ENV_MODE)
3751 case GL_TEXTURE_ENV_MODE:
3752 #endif // defined(GL_TEXTURE_ENV_MODE)
3753 #if defined(GL_COMBINE_RGB)
3754 case GL_COMBINE_RGB:
3755 #endif // defined(GL_COMBINE_RGB)
3756 #if defined(GL_COMBINE_ALPHA)
3757 case GL_COMBINE_ALPHA:
3758 #endif // defined(GL_COMBINE_ALPHA)
3759 _needed = 1;
3760 break;
3761 #if defined(GL_TEXTURE_ENV_COLOR)
3762 case GL_TEXTURE_ENV_COLOR:
3763 #endif // defined(GL_TEXTURE_ENV_COLOR)
3764 _needed = 4;
3765 break;
3766 default:
3767 _needed = 1;
3768 break;
3769 }
3770 if (_remaining < _needed) {
3771 _exception = 1;
3772 _exceptionType = "java/lang/IllegalArgumentException";
3773 _exceptionMessage = "remaining() < needed";
3774 goto exit;
3775 }
3776 if (params == NULL) {
3777 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3778 params = (GLfloat *) (_paramsBase + _bufferOffset);
3779 }
3780 glTexEnvfv(
3781 (GLenum)target,
3782 (GLenum)pname,
3783 (GLfloat *)params
3784 );
3785
3786 exit:
3787 if (_array) {
3788 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
3789 }
3790 if (_exception) {
3791 jniThrowException(_env, _exceptionType, _exceptionMessage);
3792 }
3793 }
3794
3795 /* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */
3796 static void
android_glTexEnvx__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)3797 android_glTexEnvx__III
3798 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3799 glTexEnvx(
3800 (GLenum)target,
3801 (GLenum)pname,
3802 (GLfixed)param
3803 );
3804 }
3805
3806 /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3807 static void
android_glTexEnvxv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)3808 android_glTexEnvxv__II_3II
3809 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3810 jint _exception = 0;
3811 const char * _exceptionType = NULL;
3812 const char * _exceptionMessage = NULL;
3813 GLfixed *params_base = (GLfixed *) 0;
3814 jint _remaining;
3815 GLfixed *params = (GLfixed *) 0;
3816
3817 if (!params_ref) {
3818 _exception = 1;
3819 _exceptionType = "java/lang/IllegalArgumentException";
3820 _exceptionMessage = "params == null";
3821 goto exit;
3822 }
3823 if (offset < 0) {
3824 _exception = 1;
3825 _exceptionType = "java/lang/IllegalArgumentException";
3826 _exceptionMessage = "offset < 0";
3827 goto exit;
3828 }
3829 _remaining = _env->GetArrayLength(params_ref) - offset;
3830 int _needed;
3831 switch (pname) {
3832 #if defined(GL_TEXTURE_ENV_MODE)
3833 case GL_TEXTURE_ENV_MODE:
3834 #endif // defined(GL_TEXTURE_ENV_MODE)
3835 #if defined(GL_COMBINE_RGB)
3836 case GL_COMBINE_RGB:
3837 #endif // defined(GL_COMBINE_RGB)
3838 #if defined(GL_COMBINE_ALPHA)
3839 case GL_COMBINE_ALPHA:
3840 #endif // defined(GL_COMBINE_ALPHA)
3841 _needed = 1;
3842 break;
3843 #if defined(GL_TEXTURE_ENV_COLOR)
3844 case GL_TEXTURE_ENV_COLOR:
3845 #endif // defined(GL_TEXTURE_ENV_COLOR)
3846 _needed = 4;
3847 break;
3848 default:
3849 _needed = 1;
3850 break;
3851 }
3852 if (_remaining < _needed) {
3853 _exception = 1;
3854 _exceptionType = "java/lang/IllegalArgumentException";
3855 _exceptionMessage = "length - offset < needed";
3856 goto exit;
3857 }
3858 params_base = (GLfixed *)
3859 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3860 params = params_base + offset;
3861
3862 glTexEnvxv(
3863 (GLenum)target,
3864 (GLenum)pname,
3865 (GLfixed *)params
3866 );
3867
3868 exit:
3869 if (params_base) {
3870 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3871 JNI_ABORT);
3872 }
3873 if (_exception) {
3874 jniThrowException(_env, _exceptionType, _exceptionMessage);
3875 }
3876 }
3877
3878 /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3879 static void
android_glTexEnvxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)3880 android_glTexEnvxv__IILjava_nio_IntBuffer_2
3881 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3882 jint _exception = 0;
3883 const char * _exceptionType = NULL;
3884 const char * _exceptionMessage = NULL;
3885 jintArray _array = (jintArray) 0;
3886 jint _bufferOffset = (jint) 0;
3887 jint _remaining;
3888 GLfixed *params = (GLfixed *) 0;
3889
3890 if (!params_buf) {
3891 _exception = 1;
3892 _exceptionType = "java/lang/IllegalArgumentException";
3893 _exceptionMessage = "params == null";
3894 goto exit;
3895 }
3896 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3897 int _needed;
3898 switch (pname) {
3899 #if defined(GL_TEXTURE_ENV_MODE)
3900 case GL_TEXTURE_ENV_MODE:
3901 #endif // defined(GL_TEXTURE_ENV_MODE)
3902 #if defined(GL_COMBINE_RGB)
3903 case GL_COMBINE_RGB:
3904 #endif // defined(GL_COMBINE_RGB)
3905 #if defined(GL_COMBINE_ALPHA)
3906 case GL_COMBINE_ALPHA:
3907 #endif // defined(GL_COMBINE_ALPHA)
3908 _needed = 1;
3909 break;
3910 #if defined(GL_TEXTURE_ENV_COLOR)
3911 case GL_TEXTURE_ENV_COLOR:
3912 #endif // defined(GL_TEXTURE_ENV_COLOR)
3913 _needed = 4;
3914 break;
3915 default:
3916 _needed = 1;
3917 break;
3918 }
3919 if (_remaining < _needed) {
3920 _exception = 1;
3921 _exceptionType = "java/lang/IllegalArgumentException";
3922 _exceptionMessage = "remaining() < needed";
3923 goto exit;
3924 }
3925 if (params == NULL) {
3926 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3927 params = (GLfixed *) (_paramsBase + _bufferOffset);
3928 }
3929 glTexEnvxv(
3930 (GLenum)target,
3931 (GLenum)pname,
3932 (GLfixed *)params
3933 );
3934
3935 exit:
3936 if (_array) {
3937 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
3938 }
3939 if (_exception) {
3940 jniThrowException(_env, _exceptionType, _exceptionMessage);
3941 }
3942 }
3943
3944 /* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
3945 static void
android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jint level,jint internalformat,jint width,jint height,jint border,jint format,jint type,jobject pixels_buf)3946 android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
3947 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
3948 jint _exception = 0;
3949 const char * _exceptionType = NULL;
3950 const char * _exceptionMessage = NULL;
3951 jarray _array = (jarray) 0;
3952 jint _bufferOffset = (jint) 0;
3953 jint _remaining;
3954 GLvoid *pixels = (GLvoid *) 0;
3955
3956 if (pixels_buf) {
3957 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3958 }
3959 if (pixels_buf && pixels == NULL) {
3960 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3961 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
3962 }
3963 glTexImage2D(
3964 (GLenum)target,
3965 (GLint)level,
3966 (GLint)internalformat,
3967 (GLsizei)width,
3968 (GLsizei)height,
3969 (GLint)border,
3970 (GLenum)format,
3971 (GLenum)type,
3972 (GLvoid *)pixels
3973 );
3974 if (_array) {
3975 releasePointer(_env, _array, pixels, JNI_FALSE);
3976 }
3977 if (_exception) {
3978 jniThrowException(_env, _exceptionType, _exceptionMessage);
3979 }
3980 }
3981
3982 /* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
3983 static void
android_glTexParameterf__IIF(JNIEnv * _env,jobject _this,jint target,jint pname,jfloat param)3984 android_glTexParameterf__IIF
3985 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3986 glTexParameterf(
3987 (GLenum)target,
3988 (GLenum)pname,
3989 (GLfloat)param
3990 );
3991 }
3992
3993 /* void glTexParameterx ( GLenum target, GLenum pname, GLfixed param ) */
3994 static void
android_glTexParameterx__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)3995 android_glTexParameterx__III
3996 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3997 glTexParameterx(
3998 (GLenum)target,
3999 (GLenum)pname,
4000 (GLfixed)param
4001 );
4002 }
4003
4004 /* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */
4005 static void
android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jint level,jint xoffset,jint yoffset,jint width,jint height,jint format,jint type,jobject pixels_buf)4006 android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
4007 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
4008 jint _exception = 0;
4009 const char * _exceptionType = NULL;
4010 const char * _exceptionMessage = NULL;
4011 jarray _array = (jarray) 0;
4012 jint _bufferOffset = (jint) 0;
4013 jint _remaining;
4014 GLvoid *pixels = (GLvoid *) 0;
4015
4016 if (pixels_buf) {
4017 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4018 }
4019 if (pixels_buf && pixels == NULL) {
4020 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4021 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
4022 }
4023 glTexSubImage2D(
4024 (GLenum)target,
4025 (GLint)level,
4026 (GLint)xoffset,
4027 (GLint)yoffset,
4028 (GLsizei)width,
4029 (GLsizei)height,
4030 (GLenum)format,
4031 (GLenum)type,
4032 (GLvoid *)pixels
4033 );
4034 if (_array) {
4035 releasePointer(_env, _array, pixels, JNI_FALSE);
4036 }
4037 if (_exception) {
4038 jniThrowException(_env, _exceptionType, _exceptionMessage);
4039 }
4040 }
4041
4042 /* void glTranslatef ( GLfloat x, GLfloat y, GLfloat z ) */
4043 static void
android_glTranslatef__FFF(JNIEnv * _env,jobject _this,jfloat x,jfloat y,jfloat z)4044 android_glTranslatef__FFF
4045 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
4046 glTranslatef(
4047 (GLfloat)x,
4048 (GLfloat)y,
4049 (GLfloat)z
4050 );
4051 }
4052
4053 /* void glTranslatex ( GLfixed x, GLfixed y, GLfixed z ) */
4054 static void
android_glTranslatex__III(JNIEnv * _env,jobject _this,jint x,jint y,jint z)4055 android_glTranslatex__III
4056 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
4057 glTranslatex(
4058 (GLfixed)x,
4059 (GLfixed)y,
4060 (GLfixed)z
4061 );
4062 }
4063
4064 /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
4065 static void
android_glVertexPointerBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)4066 android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
4067 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
4068 jint _exception = 0;
4069 const char * _exceptionType = NULL;
4070 const char * _exceptionMessage = NULL;
4071 jarray _array = (jarray) 0;
4072 jint _bufferOffset = (jint) 0;
4073 jint _remaining;
4074 GLvoid *pointer = (GLvoid *) 0;
4075
4076 if (pointer_buf) {
4077 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
4078 if ( ! pointer ) {
4079 return;
4080 }
4081 }
4082 glVertexPointerBounds(
4083 (GLint)size,
4084 (GLenum)type,
4085 (GLsizei)stride,
4086 (GLvoid *)pointer,
4087 (GLsizei)remaining
4088 );
4089 if (_exception) {
4090 jniThrowException(_env, _exceptionType, _exceptionMessage);
4091 }
4092 }
4093
4094 /* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */
4095 static void
android_glViewport__IIII(JNIEnv * _env,jobject _this,jint x,jint y,jint width,jint height)4096 android_glViewport__IIII
4097 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
4098 glViewport(
4099 (GLint)x,
4100 (GLint)y,
4101 (GLsizei)width,
4102 (GLsizei)height
4103 );
4104 }
4105
4106 /* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
4107 static jint
android_glQueryMatrixxOES___3II_3II(JNIEnv * _env,jobject _this,jintArray mantissa_ref,jint mantissaOffset,jintArray exponent_ref,jint exponentOffset)4108 android_glQueryMatrixxOES___3II_3II
4109 (JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) {
4110 jint _exception = 0;
4111 const char * _exceptionType = NULL;
4112 const char * _exceptionMessage = NULL;
4113 GLbitfield _returnValue = -1;
4114 GLfixed *mantissa_base = (GLfixed *) 0;
4115 jint _mantissaRemaining;
4116 GLfixed *mantissa = (GLfixed *) 0;
4117 GLint *exponent_base = (GLint *) 0;
4118 jint _exponentRemaining;
4119 GLint *exponent = (GLint *) 0;
4120
4121 if (!mantissa_ref) {
4122 _exception = 1;
4123 _exceptionType = "java/lang/IllegalArgumentException";
4124 _exceptionMessage = "mantissa == null";
4125 goto exit;
4126 }
4127 if (mantissaOffset < 0) {
4128 _exception = 1;
4129 _exceptionType = "java/lang/IllegalArgumentException";
4130 _exceptionMessage = "mantissaOffset < 0";
4131 goto exit;
4132 }
4133 _mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset;
4134 if (_mantissaRemaining < 16) {
4135 _exception = 1;
4136 _exceptionType = "java/lang/IllegalArgumentException";
4137 _exceptionMessage = "length - mantissaOffset < 16 < needed";
4138 goto exit;
4139 }
4140 mantissa_base = (GLfixed *)
4141 _env->GetIntArrayElements(mantissa_ref, (jboolean *)0);
4142 mantissa = mantissa_base + mantissaOffset;
4143
4144 if (!exponent_ref) {
4145 _exception = 1;
4146 _exceptionType = "java/lang/IllegalArgumentException";
4147 _exceptionMessage = "exponent == null";
4148 goto exit;
4149 }
4150 if (exponentOffset < 0) {
4151 _exception = 1;
4152 _exceptionType = "java/lang/IllegalArgumentException";
4153 _exceptionMessage = "exponentOffset < 0";
4154 goto exit;
4155 }
4156 _exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset;
4157 if (_exponentRemaining < 16) {
4158 _exception = 1;
4159 _exceptionType = "java/lang/IllegalArgumentException";
4160 _exceptionMessage = "length - exponentOffset < 16 < needed";
4161 goto exit;
4162 }
4163 exponent_base = (GLint *)
4164 _env->GetIntArrayElements(exponent_ref, (jboolean *)0);
4165 exponent = exponent_base + exponentOffset;
4166
4167 _returnValue = glQueryMatrixxOES(
4168 (GLfixed *)mantissa,
4169 (GLint *)exponent
4170 );
4171
4172 exit:
4173 if (exponent_base) {
4174 _env->ReleaseIntArrayElements(exponent_ref, (jint*)exponent_base,
4175 _exception ? JNI_ABORT: 0);
4176 }
4177 if (mantissa_base) {
4178 _env->ReleaseIntArrayElements(mantissa_ref, (jint*)mantissa_base,
4179 _exception ? JNI_ABORT: 0);
4180 }
4181 if (_exception) {
4182 jniThrowException(_env, _exceptionType, _exceptionMessage);
4183 return (jint)0;
4184 }
4185 return (jint)_returnValue;
4186 }
4187
4188 /* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
4189 static jint
android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject mantissa_buf,jobject exponent_buf)4190 android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
4191 (JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) {
4192 jint _exception = 0;
4193 const char * _exceptionType = NULL;
4194 const char * _exceptionMessage = NULL;
4195 jintArray _mantissaArray = (jintArray) 0;
4196 jint _mantissaBufferOffset = (jint) 0;
4197 jintArray _exponentArray = (jintArray) 0;
4198 jint _exponentBufferOffset = (jint) 0;
4199 GLbitfield _returnValue = -1;
4200 jint _mantissaRemaining;
4201 GLfixed *mantissa = (GLfixed *) 0;
4202 jint _exponentRemaining;
4203 GLint *exponent = (GLint *) 0;
4204
4205 if (!mantissa_buf) {
4206 _exception = 1;
4207 _exceptionType = "java/lang/IllegalArgumentException";
4208 _exceptionMessage = "mantissa == null";
4209 goto exit;
4210 }
4211 mantissa = (GLfixed *)getPointer(_env, mantissa_buf, (jarray*)&_mantissaArray, &_mantissaRemaining, &_mantissaBufferOffset);
4212 if (_mantissaRemaining < 16) {
4213 _exception = 1;
4214 _exceptionType = "java/lang/IllegalArgumentException";
4215 _exceptionMessage = "remaining() < 16 < needed";
4216 goto exit;
4217 }
4218 if (!exponent_buf) {
4219 _exception = 1;
4220 _exceptionType = "java/lang/IllegalArgumentException";
4221 _exceptionMessage = "exponent == null";
4222 goto exit;
4223 }
4224 exponent = (GLint *)getPointer(_env, exponent_buf, (jarray*)&_exponentArray, &_exponentRemaining, &_exponentBufferOffset);
4225 if (_exponentRemaining < 16) {
4226 _exception = 1;
4227 _exceptionType = "java/lang/IllegalArgumentException";
4228 _exceptionMessage = "remaining() < 16 < needed";
4229 goto exit;
4230 }
4231 if (mantissa == NULL) {
4232 char * _mantissaBase = (char *)_env->GetIntArrayElements(_mantissaArray, (jboolean *) 0);
4233 mantissa = (GLfixed *) (_mantissaBase + _mantissaBufferOffset);
4234 }
4235 if (exponent == NULL) {
4236 char * _exponentBase = (char *)_env->GetIntArrayElements(_exponentArray, (jboolean *) 0);
4237 exponent = (GLint *) (_exponentBase + _exponentBufferOffset);
4238 }
4239 _returnValue = glQueryMatrixxOES(
4240 (GLfixed *)mantissa,
4241 (GLint *)exponent
4242 );
4243
4244 exit:
4245 if (_exponentArray) {
4246 _env->ReleaseIntArrayElements(_exponentArray, (jint*)exponent, _exception ? JNI_ABORT : 0);
4247 }
4248 if (_mantissaArray) {
4249 _env->ReleaseIntArrayElements(_mantissaArray, (jint*)mantissa, _exception ? JNI_ABORT : 0);
4250 }
4251 if (_exception) {
4252 jniThrowException(_env, _exceptionType, _exceptionMessage);
4253 return (jint)0;
4254 }
4255 return (jint)_returnValue;
4256 }
4257
4258 /* void glBindBuffer ( GLenum target, GLuint buffer ) */
4259 static void
android_glBindBuffer__II(JNIEnv * _env,jobject _this,jint target,jint buffer)4260 android_glBindBuffer__II
4261 (JNIEnv *_env, jobject _this, jint target, jint buffer) {
4262 glBindBuffer(
4263 (GLenum)target,
4264 (GLuint)buffer
4265 );
4266 }
4267
4268 /* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */
4269 static void
android_glBufferData__IILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint target,jint size,jobject data_buf,jint usage)4270 android_glBufferData__IILjava_nio_Buffer_2I
4271 (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
4272 jint _exception = 0;
4273 const char * _exceptionType = NULL;
4274 const char * _exceptionMessage = NULL;
4275 jarray _array = (jarray) 0;
4276 jint _bufferOffset = (jint) 0;
4277 jint _remaining;
4278 GLvoid *data = (GLvoid *) 0;
4279
4280 if (data_buf) {
4281 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4282 if (_remaining < size) {
4283 _exception = 1;
4284 _exceptionType = "java/lang/IllegalArgumentException";
4285 _exceptionMessage = "remaining() < size < needed";
4286 goto exit;
4287 }
4288 }
4289 if (data_buf && data == NULL) {
4290 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4291 data = (GLvoid *) (_dataBase + _bufferOffset);
4292 }
4293 glBufferData(
4294 (GLenum)target,
4295 (GLsizeiptr)size,
4296 (GLvoid *)data,
4297 (GLenum)usage
4298 );
4299
4300 exit:
4301 if (_array) {
4302 releasePointer(_env, _array, data, JNI_FALSE);
4303 }
4304 if (_exception) {
4305 jniThrowException(_env, _exceptionType, _exceptionMessage);
4306 }
4307 }
4308
4309 /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
4310 static void
android_glBufferSubData__IIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jint offset,jint size,jobject data_buf)4311 android_glBufferSubData__IIILjava_nio_Buffer_2
4312 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
4313 jint _exception = 0;
4314 const char * _exceptionType = NULL;
4315 const char * _exceptionMessage = NULL;
4316 jarray _array = (jarray) 0;
4317 jint _bufferOffset = (jint) 0;
4318 jint _remaining;
4319 GLvoid *data = (GLvoid *) 0;
4320
4321 if (!data_buf) {
4322 _exception = 1;
4323 _exceptionType = "java/lang/IllegalArgumentException";
4324 _exceptionMessage = "data == null";
4325 goto exit;
4326 }
4327 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4328 if (_remaining < size) {
4329 _exception = 1;
4330 _exceptionType = "java/lang/IllegalArgumentException";
4331 _exceptionMessage = "remaining() < size < needed";
4332 goto exit;
4333 }
4334 if (data == NULL) {
4335 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4336 data = (GLvoid *) (_dataBase + _bufferOffset);
4337 }
4338 glBufferSubData(
4339 (GLenum)target,
4340 (GLintptr)offset,
4341 (GLsizeiptr)size,
4342 (GLvoid *)data
4343 );
4344
4345 exit:
4346 if (_array) {
4347 releasePointer(_env, _array, data, JNI_FALSE);
4348 }
4349 if (_exception) {
4350 jniThrowException(_env, _exceptionType, _exceptionMessage);
4351 }
4352 }
4353
4354 /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
4355 static void
android_glClipPlanef__I_3FI(JNIEnv * _env,jobject _this,jint plane,jfloatArray equation_ref,jint offset)4356 android_glClipPlanef__I_3FI
4357 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
4358 jint _exception = 0;
4359 const char * _exceptionType = NULL;
4360 const char * _exceptionMessage = NULL;
4361 GLfloat *equation_base = (GLfloat *) 0;
4362 jint _remaining;
4363 GLfloat *equation = (GLfloat *) 0;
4364
4365 if (!equation_ref) {
4366 _exception = 1;
4367 _exceptionType = "java/lang/IllegalArgumentException";
4368 _exceptionMessage = "equation == null";
4369 goto exit;
4370 }
4371 if (offset < 0) {
4372 _exception = 1;
4373 _exceptionType = "java/lang/IllegalArgumentException";
4374 _exceptionMessage = "offset < 0";
4375 goto exit;
4376 }
4377 _remaining = _env->GetArrayLength(equation_ref) - offset;
4378 if (_remaining < 4) {
4379 _exception = 1;
4380 _exceptionType = "java/lang/IllegalArgumentException";
4381 _exceptionMessage = "length - offset < 4 < needed";
4382 goto exit;
4383 }
4384 equation_base = (GLfloat *)
4385 _env->GetFloatArrayElements(equation_ref, (jboolean *)0);
4386 equation = equation_base + offset;
4387
4388 glClipPlanef(
4389 (GLenum)plane,
4390 (GLfloat *)equation
4391 );
4392
4393 exit:
4394 if (equation_base) {
4395 _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base,
4396 JNI_ABORT);
4397 }
4398 if (_exception) {
4399 jniThrowException(_env, _exceptionType, _exceptionMessage);
4400 }
4401 }
4402
4403 /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
4404 static void
android_glClipPlanef__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint plane,jobject equation_buf)4405 android_glClipPlanef__ILjava_nio_FloatBuffer_2
4406 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
4407 jint _exception = 0;
4408 const char * _exceptionType = NULL;
4409 const char * _exceptionMessage = NULL;
4410 jfloatArray _array = (jfloatArray) 0;
4411 jint _bufferOffset = (jint) 0;
4412 jint _remaining;
4413 GLfloat *equation = (GLfloat *) 0;
4414
4415 if (!equation_buf) {
4416 _exception = 1;
4417 _exceptionType = "java/lang/IllegalArgumentException";
4418 _exceptionMessage = "equation == null";
4419 goto exit;
4420 }
4421 equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4422 if (_remaining < 4) {
4423 _exception = 1;
4424 _exceptionType = "java/lang/IllegalArgumentException";
4425 _exceptionMessage = "remaining() < 4 < needed";
4426 goto exit;
4427 }
4428 if (equation == NULL) {
4429 char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
4430 equation = (GLfloat *) (_equationBase + _bufferOffset);
4431 }
4432 glClipPlanef(
4433 (GLenum)plane,
4434 (GLfloat *)equation
4435 );
4436
4437 exit:
4438 if (_array) {
4439 _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
4440 }
4441 if (_exception) {
4442 jniThrowException(_env, _exceptionType, _exceptionMessage);
4443 }
4444 }
4445
4446 /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
4447 static void
android_glClipPlanex__I_3II(JNIEnv * _env,jobject _this,jint plane,jintArray equation_ref,jint offset)4448 android_glClipPlanex__I_3II
4449 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
4450 jint _exception = 0;
4451 const char * _exceptionType = NULL;
4452 const char * _exceptionMessage = NULL;
4453 GLfixed *equation_base = (GLfixed *) 0;
4454 jint _remaining;
4455 GLfixed *equation = (GLfixed *) 0;
4456
4457 if (!equation_ref) {
4458 _exception = 1;
4459 _exceptionType = "java/lang/IllegalArgumentException";
4460 _exceptionMessage = "equation == null";
4461 goto exit;
4462 }
4463 if (offset < 0) {
4464 _exception = 1;
4465 _exceptionType = "java/lang/IllegalArgumentException";
4466 _exceptionMessage = "offset < 0";
4467 goto exit;
4468 }
4469 _remaining = _env->GetArrayLength(equation_ref) - offset;
4470 if (_remaining < 4) {
4471 _exception = 1;
4472 _exceptionType = "java/lang/IllegalArgumentException";
4473 _exceptionMessage = "length - offset < 4 < needed";
4474 goto exit;
4475 }
4476 equation_base = (GLfixed *)
4477 _env->GetIntArrayElements(equation_ref, (jboolean *)0);
4478 equation = equation_base + offset;
4479
4480 glClipPlanex(
4481 (GLenum)plane,
4482 (GLfixed *)equation
4483 );
4484
4485 exit:
4486 if (equation_base) {
4487 _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base,
4488 JNI_ABORT);
4489 }
4490 if (_exception) {
4491 jniThrowException(_env, _exceptionType, _exceptionMessage);
4492 }
4493 }
4494
4495 /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
4496 static void
android_glClipPlanex__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint plane,jobject equation_buf)4497 android_glClipPlanex__ILjava_nio_IntBuffer_2
4498 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
4499 jint _exception = 0;
4500 const char * _exceptionType = NULL;
4501 const char * _exceptionMessage = NULL;
4502 jintArray _array = (jintArray) 0;
4503 jint _bufferOffset = (jint) 0;
4504 jint _remaining;
4505 GLfixed *equation = (GLfixed *) 0;
4506
4507 if (!equation_buf) {
4508 _exception = 1;
4509 _exceptionType = "java/lang/IllegalArgumentException";
4510 _exceptionMessage = "equation == null";
4511 goto exit;
4512 }
4513 equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4514 if (_remaining < 4) {
4515 _exception = 1;
4516 _exceptionType = "java/lang/IllegalArgumentException";
4517 _exceptionMessage = "remaining() < 4 < needed";
4518 goto exit;
4519 }
4520 if (equation == NULL) {
4521 char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4522 equation = (GLfixed *) (_equationBase + _bufferOffset);
4523 }
4524 glClipPlanex(
4525 (GLenum)plane,
4526 (GLfixed *)equation
4527 );
4528
4529 exit:
4530 if (_array) {
4531 _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
4532 }
4533 if (_exception) {
4534 jniThrowException(_env, _exceptionType, _exceptionMessage);
4535 }
4536 }
4537
4538 /* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */
4539 static void
android_glColor4ub__BBBB(JNIEnv * _env,jobject _this,jbyte red,jbyte green,jbyte blue,jbyte alpha)4540 android_glColor4ub__BBBB
4541 (JNIEnv *_env, jobject _this, jbyte red, jbyte green, jbyte blue, jbyte alpha) {
4542 glColor4ub(
4543 (GLubyte)red,
4544 (GLubyte)green,
4545 (GLubyte)blue,
4546 (GLubyte)alpha
4547 );
4548 }
4549
4550 /* void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
4551 static void
android_glColorPointer__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)4552 android_glColorPointer__IIII
4553 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
4554 glColorPointer(
4555 (GLint)size,
4556 (GLenum)type,
4557 (GLsizei)stride,
4558 reinterpret_cast<GLvoid *>(offset)
4559 );
4560 }
4561
4562 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
4563 static void
android_glDeleteBuffers__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray buffers_ref,jint offset)4564 android_glDeleteBuffers__I_3II
4565 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
4566 jint _exception = 0;
4567 const char * _exceptionType = NULL;
4568 const char * _exceptionMessage = NULL;
4569 GLuint *buffers_base = (GLuint *) 0;
4570 jint _remaining;
4571 GLuint *buffers = (GLuint *) 0;
4572
4573 if (!buffers_ref) {
4574 _exception = 1;
4575 _exceptionType = "java/lang/IllegalArgumentException";
4576 _exceptionMessage = "buffers == null";
4577 goto exit;
4578 }
4579 if (offset < 0) {
4580 _exception = 1;
4581 _exceptionType = "java/lang/IllegalArgumentException";
4582 _exceptionMessage = "offset < 0";
4583 goto exit;
4584 }
4585 _remaining = _env->GetArrayLength(buffers_ref) - offset;
4586 if (_remaining < n) {
4587 _exception = 1;
4588 _exceptionType = "java/lang/IllegalArgumentException";
4589 _exceptionMessage = "length - offset < n < needed";
4590 goto exit;
4591 }
4592 buffers_base = (GLuint *)
4593 _env->GetIntArrayElements(buffers_ref, (jboolean *)0);
4594 buffers = buffers_base + offset;
4595
4596 glDeleteBuffers(
4597 (GLsizei)n,
4598 (GLuint *)buffers
4599 );
4600
4601 exit:
4602 if (buffers_base) {
4603 _env->ReleaseIntArrayElements(buffers_ref, (jint*)buffers_base,
4604 JNI_ABORT);
4605 }
4606 if (_exception) {
4607 jniThrowException(_env, _exceptionType, _exceptionMessage);
4608 }
4609 }
4610
4611 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
4612 static void
android_glDeleteBuffers__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject buffers_buf)4613 android_glDeleteBuffers__ILjava_nio_IntBuffer_2
4614 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
4615 jint _exception = 0;
4616 const char * _exceptionType = NULL;
4617 const char * _exceptionMessage = NULL;
4618 jintArray _array = (jintArray) 0;
4619 jint _bufferOffset = (jint) 0;
4620 jint _remaining;
4621 GLuint *buffers = (GLuint *) 0;
4622
4623 if (!buffers_buf) {
4624 _exception = 1;
4625 _exceptionType = "java/lang/IllegalArgumentException";
4626 _exceptionMessage = "buffers == null";
4627 goto exit;
4628 }
4629 buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4630 if (_remaining < n) {
4631 _exception = 1;
4632 _exceptionType = "java/lang/IllegalArgumentException";
4633 _exceptionMessage = "remaining() < n < needed";
4634 goto exit;
4635 }
4636 if (buffers == NULL) {
4637 char * _buffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4638 buffers = (GLuint *) (_buffersBase + _bufferOffset);
4639 }
4640 glDeleteBuffers(
4641 (GLsizei)n,
4642 (GLuint *)buffers
4643 );
4644
4645 exit:
4646 if (_array) {
4647 _env->ReleaseIntArrayElements(_array, (jint*)buffers, JNI_ABORT);
4648 }
4649 if (_exception) {
4650 jniThrowException(_env, _exceptionType, _exceptionMessage);
4651 }
4652 }
4653
4654 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
4655 static void
android_glDrawElements__IIII(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jint offset)4656 android_glDrawElements__IIII
4657 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
4658 jint _exception = 0;
4659 const char * _exceptionType = NULL;
4660 const char * _exceptionMessage = NULL;
4661 glDrawElements(
4662 (GLenum)mode,
4663 (GLsizei)count,
4664 (GLenum)type,
4665 reinterpret_cast<GLvoid *>(offset)
4666 );
4667 if (_exception) {
4668 jniThrowException(_env, _exceptionType, _exceptionMessage);
4669 }
4670 }
4671
4672 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
4673 static void
android_glGenBuffers__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray buffers_ref,jint offset)4674 android_glGenBuffers__I_3II
4675 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
4676 jint _exception = 0;
4677 const char * _exceptionType = NULL;
4678 const char * _exceptionMessage = NULL;
4679 GLuint *buffers_base = (GLuint *) 0;
4680 jint _remaining;
4681 GLuint *buffers = (GLuint *) 0;
4682
4683 if (!buffers_ref) {
4684 _exception = 1;
4685 _exceptionType = "java/lang/IllegalArgumentException";
4686 _exceptionMessage = "buffers == null";
4687 goto exit;
4688 }
4689 if (offset < 0) {
4690 _exception = 1;
4691 _exceptionType = "java/lang/IllegalArgumentException";
4692 _exceptionMessage = "offset < 0";
4693 goto exit;
4694 }
4695 _remaining = _env->GetArrayLength(buffers_ref) - offset;
4696 if (_remaining < n) {
4697 _exception = 1;
4698 _exceptionType = "java/lang/IllegalArgumentException";
4699 _exceptionMessage = "length - offset < n < needed";
4700 goto exit;
4701 }
4702 buffers_base = (GLuint *)
4703 _env->GetIntArrayElements(buffers_ref, (jboolean *)0);
4704 buffers = buffers_base + offset;
4705
4706 glGenBuffers(
4707 (GLsizei)n,
4708 (GLuint *)buffers
4709 );
4710
4711 exit:
4712 if (buffers_base) {
4713 _env->ReleaseIntArrayElements(buffers_ref, (jint*)buffers_base,
4714 _exception ? JNI_ABORT: 0);
4715 }
4716 if (_exception) {
4717 jniThrowException(_env, _exceptionType, _exceptionMessage);
4718 }
4719 }
4720
4721 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
4722 static void
android_glGenBuffers__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject buffers_buf)4723 android_glGenBuffers__ILjava_nio_IntBuffer_2
4724 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
4725 jint _exception = 0;
4726 const char * _exceptionType = NULL;
4727 const char * _exceptionMessage = NULL;
4728 jintArray _array = (jintArray) 0;
4729 jint _bufferOffset = (jint) 0;
4730 jint _remaining;
4731 GLuint *buffers = (GLuint *) 0;
4732
4733 if (!buffers_buf) {
4734 _exception = 1;
4735 _exceptionType = "java/lang/IllegalArgumentException";
4736 _exceptionMessage = "buffers == null";
4737 goto exit;
4738 }
4739 buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4740 if (_remaining < n) {
4741 _exception = 1;
4742 _exceptionType = "java/lang/IllegalArgumentException";
4743 _exceptionMessage = "remaining() < n < needed";
4744 goto exit;
4745 }
4746 if (buffers == NULL) {
4747 char * _buffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4748 buffers = (GLuint *) (_buffersBase + _bufferOffset);
4749 }
4750 glGenBuffers(
4751 (GLsizei)n,
4752 (GLuint *)buffers
4753 );
4754
4755 exit:
4756 if (_array) {
4757 _env->ReleaseIntArrayElements(_array, (jint*)buffers, _exception ? JNI_ABORT : 0);
4758 }
4759 if (_exception) {
4760 jniThrowException(_env, _exceptionType, _exceptionMessage);
4761 }
4762 }
4763
4764 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
4765 static void
android_glGetBooleanv__I_3ZI(JNIEnv * _env,jobject _this,jint pname,jbooleanArray params_ref,jint offset)4766 android_glGetBooleanv__I_3ZI
4767 (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
4768 jint _exception = 0;
4769 const char * _exceptionType = NULL;
4770 const char * _exceptionMessage = NULL;
4771 GLboolean *params_base = (GLboolean *) 0;
4772 jint _remaining;
4773 GLboolean *params = (GLboolean *) 0;
4774
4775 if (!params_ref) {
4776 _exception = 1;
4777 _exceptionType = "java/lang/IllegalArgumentException";
4778 _exceptionMessage = "params == null";
4779 goto exit;
4780 }
4781 if (offset < 0) {
4782 _exception = 1;
4783 _exceptionType = "java/lang/IllegalArgumentException";
4784 _exceptionMessage = "offset < 0";
4785 goto exit;
4786 }
4787 _remaining = _env->GetArrayLength(params_ref) - offset;
4788 params_base = (GLboolean *)
4789 _env->GetBooleanArrayElements(params_ref, (jboolean *)0);
4790 params = params_base + offset;
4791
4792 glGetBooleanv(
4793 (GLenum)pname,
4794 (GLboolean *)params
4795 );
4796
4797 exit:
4798 if (params_base) {
4799 _env->ReleaseBooleanArrayElements(params_ref, (jboolean*)params_base,
4800 _exception ? JNI_ABORT: 0);
4801 }
4802 if (_exception) {
4803 jniThrowException(_env, _exceptionType, _exceptionMessage);
4804 }
4805 }
4806
4807 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
4808 static void
android_glGetBooleanv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)4809 android_glGetBooleanv__ILjava_nio_IntBuffer_2
4810 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4811 jint _exception = 0;
4812 const char * _exceptionType = NULL;
4813 const char * _exceptionMessage = NULL;
4814 jintArray _array = (jintArray) 0;
4815 jint _bufferOffset = (jint) 0;
4816 jint _remaining;
4817 GLboolean *params = (GLboolean *) 0;
4818
4819 if (!params_buf) {
4820 _exception = 1;
4821 _exceptionType = "java/lang/IllegalArgumentException";
4822 _exceptionMessage = "params == null";
4823 goto exit;
4824 }
4825 params = (GLboolean *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4826 if (params == NULL) {
4827 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4828 params = (GLboolean *) (_paramsBase + _bufferOffset);
4829 }
4830 glGetBooleanv(
4831 (GLenum)pname,
4832 (GLboolean *)params
4833 );
4834
4835 exit:
4836 if (_array) {
4837 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
4838 }
4839 if (_exception) {
4840 jniThrowException(_env, _exceptionType, _exceptionMessage);
4841 }
4842 }
4843
4844 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
4845 static void
android_glGetBufferParameteriv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)4846 android_glGetBufferParameteriv__II_3II
4847 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
4848 jniThrowException(_env, "java/lang/UnsupportedOperationException",
4849 "glGetBufferParameteriv");
4850 return;
4851 }
4852
4853 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
4854 static void
android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)4855 android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
4856 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
4857 jniThrowException(_env, "java/lang/UnsupportedOperationException",
4858 "glGetBufferParameteriv");
4859 return;
4860 }
4861
4862 /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
4863 static void
android_glGetClipPlanef__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray eqn_ref,jint offset)4864 android_glGetClipPlanef__I_3FI
4865 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
4866 jint _exception = 0;
4867 const char * _exceptionType = NULL;
4868 const char * _exceptionMessage = NULL;
4869 GLfloat *eqn_base = (GLfloat *) 0;
4870 jint _remaining;
4871 GLfloat *eqn = (GLfloat *) 0;
4872
4873 if (!eqn_ref) {
4874 _exception = 1;
4875 _exceptionType = "java/lang/IllegalArgumentException";
4876 _exceptionMessage = "eqn == null";
4877 goto exit;
4878 }
4879 if (offset < 0) {
4880 _exception = 1;
4881 _exceptionType = "java/lang/IllegalArgumentException";
4882 _exceptionMessage = "offset < 0";
4883 goto exit;
4884 }
4885 _remaining = _env->GetArrayLength(eqn_ref) - offset;
4886 eqn_base = (GLfloat *)
4887 _env->GetFloatArrayElements(eqn_ref, (jboolean *)0);
4888 eqn = eqn_base + offset;
4889
4890 glGetClipPlanef(
4891 (GLenum)pname,
4892 (GLfloat *)eqn
4893 );
4894
4895 exit:
4896 if (eqn_base) {
4897 _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base,
4898 _exception ? JNI_ABORT: 0);
4899 }
4900 if (_exception) {
4901 jniThrowException(_env, _exceptionType, _exceptionMessage);
4902 }
4903 }
4904
4905 /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
4906 static void
android_glGetClipPlanef__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject eqn_buf)4907 android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
4908 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
4909 jint _exception = 0;
4910 const char * _exceptionType = NULL;
4911 const char * _exceptionMessage = NULL;
4912 jfloatArray _array = (jfloatArray) 0;
4913 jint _bufferOffset = (jint) 0;
4914 jint _remaining;
4915 GLfloat *eqn = (GLfloat *) 0;
4916
4917 if (!eqn_buf) {
4918 _exception = 1;
4919 _exceptionType = "java/lang/IllegalArgumentException";
4920 _exceptionMessage = "eqn == null";
4921 goto exit;
4922 }
4923 eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4924 if (eqn == NULL) {
4925 char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
4926 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
4927 }
4928 glGetClipPlanef(
4929 (GLenum)pname,
4930 (GLfloat *)eqn
4931 );
4932
4933 exit:
4934 if (_array) {
4935 _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0);
4936 }
4937 if (_exception) {
4938 jniThrowException(_env, _exceptionType, _exceptionMessage);
4939 }
4940 }
4941
4942 /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4943 static void
android_glGetClipPlanex__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray eqn_ref,jint offset)4944 android_glGetClipPlanex__I_3II
4945 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
4946 jint _exception = 0;
4947 const char * _exceptionType = NULL;
4948 const char * _exceptionMessage = NULL;
4949 GLfixed *eqn_base = (GLfixed *) 0;
4950 jint _remaining;
4951 GLfixed *eqn = (GLfixed *) 0;
4952
4953 if (!eqn_ref) {
4954 _exception = 1;
4955 _exceptionType = "java/lang/IllegalArgumentException";
4956 _exceptionMessage = "eqn == null";
4957 goto exit;
4958 }
4959 if (offset < 0) {
4960 _exception = 1;
4961 _exceptionType = "java/lang/IllegalArgumentException";
4962 _exceptionMessage = "offset < 0";
4963 goto exit;
4964 }
4965 _remaining = _env->GetArrayLength(eqn_ref) - offset;
4966 eqn_base = (GLfixed *)
4967 _env->GetIntArrayElements(eqn_ref, (jboolean *)0);
4968 eqn = eqn_base + offset;
4969
4970 glGetClipPlanex(
4971 (GLenum)pname,
4972 (GLfixed *)eqn
4973 );
4974
4975 exit:
4976 if (eqn_base) {
4977 _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base,
4978 _exception ? JNI_ABORT: 0);
4979 }
4980 if (_exception) {
4981 jniThrowException(_env, _exceptionType, _exceptionMessage);
4982 }
4983 }
4984
4985 /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4986 static void
android_glGetClipPlanex__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject eqn_buf)4987 android_glGetClipPlanex__ILjava_nio_IntBuffer_2
4988 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
4989 jint _exception = 0;
4990 const char * _exceptionType = NULL;
4991 const char * _exceptionMessage = NULL;
4992 jintArray _array = (jintArray) 0;
4993 jint _bufferOffset = (jint) 0;
4994 jint _remaining;
4995 GLfixed *eqn = (GLfixed *) 0;
4996
4997 if (!eqn_buf) {
4998 _exception = 1;
4999 _exceptionType = "java/lang/IllegalArgumentException";
5000 _exceptionMessage = "eqn == null";
5001 goto exit;
5002 }
5003 eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5004 if (eqn == NULL) {
5005 char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5006 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
5007 }
5008 glGetClipPlanex(
5009 (GLenum)pname,
5010 (GLfixed *)eqn
5011 );
5012
5013 exit:
5014 if (_array) {
5015 _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0);
5016 }
5017 if (_exception) {
5018 jniThrowException(_env, _exceptionType, _exceptionMessage);
5019 }
5020 }
5021
5022 /* void glGetFixedv ( GLenum pname, GLfixed *params ) */
5023 static void
android_glGetFixedv__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)5024 android_glGetFixedv__I_3II
5025 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
5026 jint _exception = 0;
5027 const char * _exceptionType = NULL;
5028 const char * _exceptionMessage = NULL;
5029 GLfixed *params_base = (GLfixed *) 0;
5030 jint _remaining;
5031 GLfixed *params = (GLfixed *) 0;
5032
5033 if (!params_ref) {
5034 _exception = 1;
5035 _exceptionType = "java/lang/IllegalArgumentException";
5036 _exceptionMessage = "params == null";
5037 goto exit;
5038 }
5039 if (offset < 0) {
5040 _exception = 1;
5041 _exceptionType = "java/lang/IllegalArgumentException";
5042 _exceptionMessage = "offset < 0";
5043 goto exit;
5044 }
5045 _remaining = _env->GetArrayLength(params_ref) - offset;
5046 params_base = (GLfixed *)
5047 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5048 params = params_base + offset;
5049
5050 glGetFixedv(
5051 (GLenum)pname,
5052 (GLfixed *)params
5053 );
5054
5055 exit:
5056 if (params_base) {
5057 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5058 _exception ? JNI_ABORT: 0);
5059 }
5060 if (_exception) {
5061 jniThrowException(_env, _exceptionType, _exceptionMessage);
5062 }
5063 }
5064
5065 /* void glGetFixedv ( GLenum pname, GLfixed *params ) */
5066 static void
android_glGetFixedv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)5067 android_glGetFixedv__ILjava_nio_IntBuffer_2
5068 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5069 jint _exception = 0;
5070 const char * _exceptionType = NULL;
5071 const char * _exceptionMessage = NULL;
5072 jintArray _array = (jintArray) 0;
5073 jint _bufferOffset = (jint) 0;
5074 jint _remaining;
5075 GLfixed *params = (GLfixed *) 0;
5076
5077 if (!params_buf) {
5078 _exception = 1;
5079 _exceptionType = "java/lang/IllegalArgumentException";
5080 _exceptionMessage = "params == null";
5081 goto exit;
5082 }
5083 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5084 if (params == NULL) {
5085 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5086 params = (GLfixed *) (_paramsBase + _bufferOffset);
5087 }
5088 glGetFixedv(
5089 (GLenum)pname,
5090 (GLfixed *)params
5091 );
5092
5093 exit:
5094 if (_array) {
5095 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5096 }
5097 if (_exception) {
5098 jniThrowException(_env, _exceptionType, _exceptionMessage);
5099 }
5100 }
5101
5102 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
5103 static void
android_glGetFloatv__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray params_ref,jint offset)5104 android_glGetFloatv__I_3FI
5105 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
5106 jint _exception = 0;
5107 const char * _exceptionType = NULL;
5108 const char * _exceptionMessage = NULL;
5109 GLfloat *params_base = (GLfloat *) 0;
5110 jint _remaining;
5111 GLfloat *params = (GLfloat *) 0;
5112
5113 if (!params_ref) {
5114 _exception = 1;
5115 _exceptionType = "java/lang/IllegalArgumentException";
5116 _exceptionMessage = "params == null";
5117 goto exit;
5118 }
5119 if (offset < 0) {
5120 _exception = 1;
5121 _exceptionType = "java/lang/IllegalArgumentException";
5122 _exceptionMessage = "offset < 0";
5123 goto exit;
5124 }
5125 _remaining = _env->GetArrayLength(params_ref) - offset;
5126 params_base = (GLfloat *)
5127 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
5128 params = params_base + offset;
5129
5130 glGetFloatv(
5131 (GLenum)pname,
5132 (GLfloat *)params
5133 );
5134
5135 exit:
5136 if (params_base) {
5137 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
5138 _exception ? JNI_ABORT: 0);
5139 }
5140 if (_exception) {
5141 jniThrowException(_env, _exceptionType, _exceptionMessage);
5142 }
5143 }
5144
5145 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
5146 static void
android_glGetFloatv__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)5147 android_glGetFloatv__ILjava_nio_FloatBuffer_2
5148 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5149 jint _exception = 0;
5150 const char * _exceptionType = NULL;
5151 const char * _exceptionMessage = NULL;
5152 jfloatArray _array = (jfloatArray) 0;
5153 jint _bufferOffset = (jint) 0;
5154 jint _remaining;
5155 GLfloat *params = (GLfloat *) 0;
5156
5157 if (!params_buf) {
5158 _exception = 1;
5159 _exceptionType = "java/lang/IllegalArgumentException";
5160 _exceptionMessage = "params == null";
5161 goto exit;
5162 }
5163 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5164 if (params == NULL) {
5165 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5166 params = (GLfloat *) (_paramsBase + _bufferOffset);
5167 }
5168 glGetFloatv(
5169 (GLenum)pname,
5170 (GLfloat *)params
5171 );
5172
5173 exit:
5174 if (_array) {
5175 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
5176 }
5177 if (_exception) {
5178 jniThrowException(_env, _exceptionType, _exceptionMessage);
5179 }
5180 }
5181
5182 /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
5183 static void
android_glGetLightfv__II_3FI(JNIEnv * _env,jobject _this,jint light,jint pname,jfloatArray params_ref,jint offset)5184 android_glGetLightfv__II_3FI
5185 (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
5186 jint _exception = 0;
5187 const char * _exceptionType = NULL;
5188 const char * _exceptionMessage = NULL;
5189 GLfloat *params_base = (GLfloat *) 0;
5190 jint _remaining;
5191 GLfloat *params = (GLfloat *) 0;
5192
5193 if (!params_ref) {
5194 _exception = 1;
5195 _exceptionType = "java/lang/IllegalArgumentException";
5196 _exceptionMessage = "params == null";
5197 goto exit;
5198 }
5199 if (offset < 0) {
5200 _exception = 1;
5201 _exceptionType = "java/lang/IllegalArgumentException";
5202 _exceptionMessage = "offset < 0";
5203 goto exit;
5204 }
5205 _remaining = _env->GetArrayLength(params_ref) - offset;
5206 int _needed;
5207 switch (pname) {
5208 #if defined(GL_SPOT_EXPONENT)
5209 case GL_SPOT_EXPONENT:
5210 #endif // defined(GL_SPOT_EXPONENT)
5211 #if defined(GL_SPOT_CUTOFF)
5212 case GL_SPOT_CUTOFF:
5213 #endif // defined(GL_SPOT_CUTOFF)
5214 #if defined(GL_CONSTANT_ATTENUATION)
5215 case GL_CONSTANT_ATTENUATION:
5216 #endif // defined(GL_CONSTANT_ATTENUATION)
5217 #if defined(GL_LINEAR_ATTENUATION)
5218 case GL_LINEAR_ATTENUATION:
5219 #endif // defined(GL_LINEAR_ATTENUATION)
5220 #if defined(GL_QUADRATIC_ATTENUATION)
5221 case GL_QUADRATIC_ATTENUATION:
5222 #endif // defined(GL_QUADRATIC_ATTENUATION)
5223 _needed = 1;
5224 break;
5225 #if defined(GL_SPOT_DIRECTION)
5226 case GL_SPOT_DIRECTION:
5227 #endif // defined(GL_SPOT_DIRECTION)
5228 _needed = 3;
5229 break;
5230 #if defined(GL_AMBIENT)
5231 case GL_AMBIENT:
5232 #endif // defined(GL_AMBIENT)
5233 #if defined(GL_DIFFUSE)
5234 case GL_DIFFUSE:
5235 #endif // defined(GL_DIFFUSE)
5236 #if defined(GL_SPECULAR)
5237 case GL_SPECULAR:
5238 #endif // defined(GL_SPECULAR)
5239 #if defined(GL_EMISSION)
5240 case GL_EMISSION:
5241 #endif // defined(GL_EMISSION)
5242 _needed = 4;
5243 break;
5244 default:
5245 _needed = 1;
5246 break;
5247 }
5248 if (_remaining < _needed) {
5249 _exception = 1;
5250 _exceptionType = "java/lang/IllegalArgumentException";
5251 _exceptionMessage = "length - offset < needed";
5252 goto exit;
5253 }
5254 params_base = (GLfloat *)
5255 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
5256 params = params_base + offset;
5257
5258 glGetLightfv(
5259 (GLenum)light,
5260 (GLenum)pname,
5261 (GLfloat *)params
5262 );
5263
5264 exit:
5265 if (params_base) {
5266 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
5267 _exception ? JNI_ABORT: 0);
5268 }
5269 if (_exception) {
5270 jniThrowException(_env, _exceptionType, _exceptionMessage);
5271 }
5272 }
5273
5274 /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
5275 static void
android_glGetLightfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)5276 android_glGetLightfv__IILjava_nio_FloatBuffer_2
5277 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
5278 jint _exception = 0;
5279 const char * _exceptionType = NULL;
5280 const char * _exceptionMessage = NULL;
5281 jfloatArray _array = (jfloatArray) 0;
5282 jint _bufferOffset = (jint) 0;
5283 jint _remaining;
5284 GLfloat *params = (GLfloat *) 0;
5285
5286 if (!params_buf) {
5287 _exception = 1;
5288 _exceptionType = "java/lang/IllegalArgumentException";
5289 _exceptionMessage = "params == null";
5290 goto exit;
5291 }
5292 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5293 int _needed;
5294 switch (pname) {
5295 #if defined(GL_SPOT_EXPONENT)
5296 case GL_SPOT_EXPONENT:
5297 #endif // defined(GL_SPOT_EXPONENT)
5298 #if defined(GL_SPOT_CUTOFF)
5299 case GL_SPOT_CUTOFF:
5300 #endif // defined(GL_SPOT_CUTOFF)
5301 #if defined(GL_CONSTANT_ATTENUATION)
5302 case GL_CONSTANT_ATTENUATION:
5303 #endif // defined(GL_CONSTANT_ATTENUATION)
5304 #if defined(GL_LINEAR_ATTENUATION)
5305 case GL_LINEAR_ATTENUATION:
5306 #endif // defined(GL_LINEAR_ATTENUATION)
5307 #if defined(GL_QUADRATIC_ATTENUATION)
5308 case GL_QUADRATIC_ATTENUATION:
5309 #endif // defined(GL_QUADRATIC_ATTENUATION)
5310 _needed = 1;
5311 break;
5312 #if defined(GL_SPOT_DIRECTION)
5313 case GL_SPOT_DIRECTION:
5314 #endif // defined(GL_SPOT_DIRECTION)
5315 _needed = 3;
5316 break;
5317 #if defined(GL_AMBIENT)
5318 case GL_AMBIENT:
5319 #endif // defined(GL_AMBIENT)
5320 #if defined(GL_DIFFUSE)
5321 case GL_DIFFUSE:
5322 #endif // defined(GL_DIFFUSE)
5323 #if defined(GL_SPECULAR)
5324 case GL_SPECULAR:
5325 #endif // defined(GL_SPECULAR)
5326 #if defined(GL_EMISSION)
5327 case GL_EMISSION:
5328 #endif // defined(GL_EMISSION)
5329 _needed = 4;
5330 break;
5331 default:
5332 _needed = 1;
5333 break;
5334 }
5335 if (_remaining < _needed) {
5336 _exception = 1;
5337 _exceptionType = "java/lang/IllegalArgumentException";
5338 _exceptionMessage = "remaining() < needed";
5339 goto exit;
5340 }
5341 if (params == NULL) {
5342 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5343 params = (GLfloat *) (_paramsBase + _bufferOffset);
5344 }
5345 glGetLightfv(
5346 (GLenum)light,
5347 (GLenum)pname,
5348 (GLfloat *)params
5349 );
5350
5351 exit:
5352 if (_array) {
5353 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
5354 }
5355 if (_exception) {
5356 jniThrowException(_env, _exceptionType, _exceptionMessage);
5357 }
5358 }
5359
5360 /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
5361 static void
android_glGetLightxv__II_3II(JNIEnv * _env,jobject _this,jint light,jint pname,jintArray params_ref,jint offset)5362 android_glGetLightxv__II_3II
5363 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
5364 jint _exception = 0;
5365 const char * _exceptionType = NULL;
5366 const char * _exceptionMessage = NULL;
5367 GLfixed *params_base = (GLfixed *) 0;
5368 jint _remaining;
5369 GLfixed *params = (GLfixed *) 0;
5370
5371 if (!params_ref) {
5372 _exception = 1;
5373 _exceptionType = "java/lang/IllegalArgumentException";
5374 _exceptionMessage = "params == null";
5375 goto exit;
5376 }
5377 if (offset < 0) {
5378 _exception = 1;
5379 _exceptionType = "java/lang/IllegalArgumentException";
5380 _exceptionMessage = "offset < 0";
5381 goto exit;
5382 }
5383 _remaining = _env->GetArrayLength(params_ref) - offset;
5384 int _needed;
5385 switch (pname) {
5386 #if defined(GL_SPOT_EXPONENT)
5387 case GL_SPOT_EXPONENT:
5388 #endif // defined(GL_SPOT_EXPONENT)
5389 #if defined(GL_SPOT_CUTOFF)
5390 case GL_SPOT_CUTOFF:
5391 #endif // defined(GL_SPOT_CUTOFF)
5392 #if defined(GL_CONSTANT_ATTENUATION)
5393 case GL_CONSTANT_ATTENUATION:
5394 #endif // defined(GL_CONSTANT_ATTENUATION)
5395 #if defined(GL_LINEAR_ATTENUATION)
5396 case GL_LINEAR_ATTENUATION:
5397 #endif // defined(GL_LINEAR_ATTENUATION)
5398 #if defined(GL_QUADRATIC_ATTENUATION)
5399 case GL_QUADRATIC_ATTENUATION:
5400 #endif // defined(GL_QUADRATIC_ATTENUATION)
5401 _needed = 1;
5402 break;
5403 #if defined(GL_SPOT_DIRECTION)
5404 case GL_SPOT_DIRECTION:
5405 #endif // defined(GL_SPOT_DIRECTION)
5406 _needed = 3;
5407 break;
5408 #if defined(GL_AMBIENT)
5409 case GL_AMBIENT:
5410 #endif // defined(GL_AMBIENT)
5411 #if defined(GL_DIFFUSE)
5412 case GL_DIFFUSE:
5413 #endif // defined(GL_DIFFUSE)
5414 #if defined(GL_SPECULAR)
5415 case GL_SPECULAR:
5416 #endif // defined(GL_SPECULAR)
5417 #if defined(GL_EMISSION)
5418 case GL_EMISSION:
5419 #endif // defined(GL_EMISSION)
5420 _needed = 4;
5421 break;
5422 default:
5423 _needed = 1;
5424 break;
5425 }
5426 if (_remaining < _needed) {
5427 _exception = 1;
5428 _exceptionType = "java/lang/IllegalArgumentException";
5429 _exceptionMessage = "length - offset < needed";
5430 goto exit;
5431 }
5432 params_base = (GLfixed *)
5433 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5434 params = params_base + offset;
5435
5436 glGetLightxv(
5437 (GLenum)light,
5438 (GLenum)pname,
5439 (GLfixed *)params
5440 );
5441
5442 exit:
5443 if (params_base) {
5444 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5445 _exception ? JNI_ABORT: 0);
5446 }
5447 if (_exception) {
5448 jniThrowException(_env, _exceptionType, _exceptionMessage);
5449 }
5450 }
5451
5452 /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
5453 static void
android_glGetLightxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)5454 android_glGetLightxv__IILjava_nio_IntBuffer_2
5455 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
5456 jint _exception = 0;
5457 const char * _exceptionType = NULL;
5458 const char * _exceptionMessage = NULL;
5459 jintArray _array = (jintArray) 0;
5460 jint _bufferOffset = (jint) 0;
5461 jint _remaining;
5462 GLfixed *params = (GLfixed *) 0;
5463
5464 if (!params_buf) {
5465 _exception = 1;
5466 _exceptionType = "java/lang/IllegalArgumentException";
5467 _exceptionMessage = "params == null";
5468 goto exit;
5469 }
5470 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5471 int _needed;
5472 switch (pname) {
5473 #if defined(GL_SPOT_EXPONENT)
5474 case GL_SPOT_EXPONENT:
5475 #endif // defined(GL_SPOT_EXPONENT)
5476 #if defined(GL_SPOT_CUTOFF)
5477 case GL_SPOT_CUTOFF:
5478 #endif // defined(GL_SPOT_CUTOFF)
5479 #if defined(GL_CONSTANT_ATTENUATION)
5480 case GL_CONSTANT_ATTENUATION:
5481 #endif // defined(GL_CONSTANT_ATTENUATION)
5482 #if defined(GL_LINEAR_ATTENUATION)
5483 case GL_LINEAR_ATTENUATION:
5484 #endif // defined(GL_LINEAR_ATTENUATION)
5485 #if defined(GL_QUADRATIC_ATTENUATION)
5486 case GL_QUADRATIC_ATTENUATION:
5487 #endif // defined(GL_QUADRATIC_ATTENUATION)
5488 _needed = 1;
5489 break;
5490 #if defined(GL_SPOT_DIRECTION)
5491 case GL_SPOT_DIRECTION:
5492 #endif // defined(GL_SPOT_DIRECTION)
5493 _needed = 3;
5494 break;
5495 #if defined(GL_AMBIENT)
5496 case GL_AMBIENT:
5497 #endif // defined(GL_AMBIENT)
5498 #if defined(GL_DIFFUSE)
5499 case GL_DIFFUSE:
5500 #endif // defined(GL_DIFFUSE)
5501 #if defined(GL_SPECULAR)
5502 case GL_SPECULAR:
5503 #endif // defined(GL_SPECULAR)
5504 #if defined(GL_EMISSION)
5505 case GL_EMISSION:
5506 #endif // defined(GL_EMISSION)
5507 _needed = 4;
5508 break;
5509 default:
5510 _needed = 1;
5511 break;
5512 }
5513 if (_remaining < _needed) {
5514 _exception = 1;
5515 _exceptionType = "java/lang/IllegalArgumentException";
5516 _exceptionMessage = "remaining() < needed";
5517 goto exit;
5518 }
5519 if (params == NULL) {
5520 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5521 params = (GLfixed *) (_paramsBase + _bufferOffset);
5522 }
5523 glGetLightxv(
5524 (GLenum)light,
5525 (GLenum)pname,
5526 (GLfixed *)params
5527 );
5528
5529 exit:
5530 if (_array) {
5531 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5532 }
5533 if (_exception) {
5534 jniThrowException(_env, _exceptionType, _exceptionMessage);
5535 }
5536 }
5537
5538 /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
5539 static void
android_glGetMaterialfv__II_3FI(JNIEnv * _env,jobject _this,jint face,jint pname,jfloatArray params_ref,jint offset)5540 android_glGetMaterialfv__II_3FI
5541 (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
5542 jint _exception = 0;
5543 const char * _exceptionType = NULL;
5544 const char * _exceptionMessage = NULL;
5545 GLfloat *params_base = (GLfloat *) 0;
5546 jint _remaining;
5547 GLfloat *params = (GLfloat *) 0;
5548
5549 if (!params_ref) {
5550 _exception = 1;
5551 _exceptionType = "java/lang/IllegalArgumentException";
5552 _exceptionMessage = "params == null";
5553 goto exit;
5554 }
5555 if (offset < 0) {
5556 _exception = 1;
5557 _exceptionType = "java/lang/IllegalArgumentException";
5558 _exceptionMessage = "offset < 0";
5559 goto exit;
5560 }
5561 _remaining = _env->GetArrayLength(params_ref) - offset;
5562 int _needed;
5563 switch (pname) {
5564 #if defined(GL_SHININESS)
5565 case GL_SHININESS:
5566 #endif // defined(GL_SHININESS)
5567 _needed = 1;
5568 break;
5569 #if defined(GL_AMBIENT)
5570 case GL_AMBIENT:
5571 #endif // defined(GL_AMBIENT)
5572 #if defined(GL_DIFFUSE)
5573 case GL_DIFFUSE:
5574 #endif // defined(GL_DIFFUSE)
5575 #if defined(GL_SPECULAR)
5576 case GL_SPECULAR:
5577 #endif // defined(GL_SPECULAR)
5578 #if defined(GL_EMISSION)
5579 case GL_EMISSION:
5580 #endif // defined(GL_EMISSION)
5581 #if defined(GL_AMBIENT_AND_DIFFUSE)
5582 case GL_AMBIENT_AND_DIFFUSE:
5583 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5584 _needed = 4;
5585 break;
5586 default:
5587 _needed = 1;
5588 break;
5589 }
5590 if (_remaining < _needed) {
5591 _exception = 1;
5592 _exceptionType = "java/lang/IllegalArgumentException";
5593 _exceptionMessage = "length - offset < needed";
5594 goto exit;
5595 }
5596 params_base = (GLfloat *)
5597 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
5598 params = params_base + offset;
5599
5600 glGetMaterialfv(
5601 (GLenum)face,
5602 (GLenum)pname,
5603 (GLfloat *)params
5604 );
5605
5606 exit:
5607 if (params_base) {
5608 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
5609 _exception ? JNI_ABORT: 0);
5610 }
5611 if (_exception) {
5612 jniThrowException(_env, _exceptionType, _exceptionMessage);
5613 }
5614 }
5615
5616 /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
5617 static void
android_glGetMaterialfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)5618 android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
5619 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
5620 jint _exception = 0;
5621 const char * _exceptionType = NULL;
5622 const char * _exceptionMessage = NULL;
5623 jfloatArray _array = (jfloatArray) 0;
5624 jint _bufferOffset = (jint) 0;
5625 jint _remaining;
5626 GLfloat *params = (GLfloat *) 0;
5627
5628 if (!params_buf) {
5629 _exception = 1;
5630 _exceptionType = "java/lang/IllegalArgumentException";
5631 _exceptionMessage = "params == null";
5632 goto exit;
5633 }
5634 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5635 int _needed;
5636 switch (pname) {
5637 #if defined(GL_SHININESS)
5638 case GL_SHININESS:
5639 #endif // defined(GL_SHININESS)
5640 _needed = 1;
5641 break;
5642 #if defined(GL_AMBIENT)
5643 case GL_AMBIENT:
5644 #endif // defined(GL_AMBIENT)
5645 #if defined(GL_DIFFUSE)
5646 case GL_DIFFUSE:
5647 #endif // defined(GL_DIFFUSE)
5648 #if defined(GL_SPECULAR)
5649 case GL_SPECULAR:
5650 #endif // defined(GL_SPECULAR)
5651 #if defined(GL_EMISSION)
5652 case GL_EMISSION:
5653 #endif // defined(GL_EMISSION)
5654 #if defined(GL_AMBIENT_AND_DIFFUSE)
5655 case GL_AMBIENT_AND_DIFFUSE:
5656 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5657 _needed = 4;
5658 break;
5659 default:
5660 _needed = 1;
5661 break;
5662 }
5663 if (_remaining < _needed) {
5664 _exception = 1;
5665 _exceptionType = "java/lang/IllegalArgumentException";
5666 _exceptionMessage = "remaining() < needed";
5667 goto exit;
5668 }
5669 if (params == NULL) {
5670 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5671 params = (GLfloat *) (_paramsBase + _bufferOffset);
5672 }
5673 glGetMaterialfv(
5674 (GLenum)face,
5675 (GLenum)pname,
5676 (GLfloat *)params
5677 );
5678
5679 exit:
5680 if (_array) {
5681 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
5682 }
5683 if (_exception) {
5684 jniThrowException(_env, _exceptionType, _exceptionMessage);
5685 }
5686 }
5687
5688 /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
5689 static void
android_glGetMaterialxv__II_3II(JNIEnv * _env,jobject _this,jint face,jint pname,jintArray params_ref,jint offset)5690 android_glGetMaterialxv__II_3II
5691 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
5692 jint _exception = 0;
5693 const char * _exceptionType = NULL;
5694 const char * _exceptionMessage = NULL;
5695 GLfixed *params_base = (GLfixed *) 0;
5696 jint _remaining;
5697 GLfixed *params = (GLfixed *) 0;
5698
5699 if (!params_ref) {
5700 _exception = 1;
5701 _exceptionType = "java/lang/IllegalArgumentException";
5702 _exceptionMessage = "params == null";
5703 goto exit;
5704 }
5705 if (offset < 0) {
5706 _exception = 1;
5707 _exceptionType = "java/lang/IllegalArgumentException";
5708 _exceptionMessage = "offset < 0";
5709 goto exit;
5710 }
5711 _remaining = _env->GetArrayLength(params_ref) - offset;
5712 int _needed;
5713 switch (pname) {
5714 #if defined(GL_SHININESS)
5715 case GL_SHININESS:
5716 #endif // defined(GL_SHININESS)
5717 _needed = 1;
5718 break;
5719 #if defined(GL_AMBIENT)
5720 case GL_AMBIENT:
5721 #endif // defined(GL_AMBIENT)
5722 #if defined(GL_DIFFUSE)
5723 case GL_DIFFUSE:
5724 #endif // defined(GL_DIFFUSE)
5725 #if defined(GL_SPECULAR)
5726 case GL_SPECULAR:
5727 #endif // defined(GL_SPECULAR)
5728 #if defined(GL_EMISSION)
5729 case GL_EMISSION:
5730 #endif // defined(GL_EMISSION)
5731 #if defined(GL_AMBIENT_AND_DIFFUSE)
5732 case GL_AMBIENT_AND_DIFFUSE:
5733 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5734 _needed = 4;
5735 break;
5736 default:
5737 _needed = 1;
5738 break;
5739 }
5740 if (_remaining < _needed) {
5741 _exception = 1;
5742 _exceptionType = "java/lang/IllegalArgumentException";
5743 _exceptionMessage = "length - offset < needed";
5744 goto exit;
5745 }
5746 params_base = (GLfixed *)
5747 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5748 params = params_base + offset;
5749
5750 glGetMaterialxv(
5751 (GLenum)face,
5752 (GLenum)pname,
5753 (GLfixed *)params
5754 );
5755
5756 exit:
5757 if (params_base) {
5758 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5759 _exception ? JNI_ABORT: 0);
5760 }
5761 if (_exception) {
5762 jniThrowException(_env, _exceptionType, _exceptionMessage);
5763 }
5764 }
5765
5766 /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
5767 static void
android_glGetMaterialxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)5768 android_glGetMaterialxv__IILjava_nio_IntBuffer_2
5769 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
5770 jint _exception = 0;
5771 const char * _exceptionType = NULL;
5772 const char * _exceptionMessage = NULL;
5773 jintArray _array = (jintArray) 0;
5774 jint _bufferOffset = (jint) 0;
5775 jint _remaining;
5776 GLfixed *params = (GLfixed *) 0;
5777
5778 if (!params_buf) {
5779 _exception = 1;
5780 _exceptionType = "java/lang/IllegalArgumentException";
5781 _exceptionMessage = "params == null";
5782 goto exit;
5783 }
5784 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5785 int _needed;
5786 switch (pname) {
5787 #if defined(GL_SHININESS)
5788 case GL_SHININESS:
5789 #endif // defined(GL_SHININESS)
5790 _needed = 1;
5791 break;
5792 #if defined(GL_AMBIENT)
5793 case GL_AMBIENT:
5794 #endif // defined(GL_AMBIENT)
5795 #if defined(GL_DIFFUSE)
5796 case GL_DIFFUSE:
5797 #endif // defined(GL_DIFFUSE)
5798 #if defined(GL_SPECULAR)
5799 case GL_SPECULAR:
5800 #endif // defined(GL_SPECULAR)
5801 #if defined(GL_EMISSION)
5802 case GL_EMISSION:
5803 #endif // defined(GL_EMISSION)
5804 #if defined(GL_AMBIENT_AND_DIFFUSE)
5805 case GL_AMBIENT_AND_DIFFUSE:
5806 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5807 _needed = 4;
5808 break;
5809 default:
5810 _needed = 1;
5811 break;
5812 }
5813 if (_remaining < _needed) {
5814 _exception = 1;
5815 _exceptionType = "java/lang/IllegalArgumentException";
5816 _exceptionMessage = "remaining() < needed";
5817 goto exit;
5818 }
5819 if (params == NULL) {
5820 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5821 params = (GLfixed *) (_paramsBase + _bufferOffset);
5822 }
5823 glGetMaterialxv(
5824 (GLenum)face,
5825 (GLenum)pname,
5826 (GLfixed *)params
5827 );
5828
5829 exit:
5830 if (_array) {
5831 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5832 }
5833 if (_exception) {
5834 jniThrowException(_env, _exceptionType, _exceptionMessage);
5835 }
5836 }
5837
5838 /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
5839 static void
android_glGetTexEnviv__II_3II(JNIEnv * _env,jobject _this,jint env,jint pname,jintArray params_ref,jint offset)5840 android_glGetTexEnviv__II_3II
5841 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
5842 jint _exception = 0;
5843 const char * _exceptionType = NULL;
5844 const char * _exceptionMessage = NULL;
5845 GLint *params_base = (GLint *) 0;
5846 jint _remaining;
5847 GLint *params = (GLint *) 0;
5848
5849 if (!params_ref) {
5850 _exception = 1;
5851 _exceptionType = "java/lang/IllegalArgumentException";
5852 _exceptionMessage = "params == null";
5853 goto exit;
5854 }
5855 if (offset < 0) {
5856 _exception = 1;
5857 _exceptionType = "java/lang/IllegalArgumentException";
5858 _exceptionMessage = "offset < 0";
5859 goto exit;
5860 }
5861 _remaining = _env->GetArrayLength(params_ref) - offset;
5862 int _needed;
5863 switch (pname) {
5864 #if defined(GL_TEXTURE_ENV_MODE)
5865 case GL_TEXTURE_ENV_MODE:
5866 #endif // defined(GL_TEXTURE_ENV_MODE)
5867 #if defined(GL_COMBINE_RGB)
5868 case GL_COMBINE_RGB:
5869 #endif // defined(GL_COMBINE_RGB)
5870 #if defined(GL_COMBINE_ALPHA)
5871 case GL_COMBINE_ALPHA:
5872 #endif // defined(GL_COMBINE_ALPHA)
5873 _needed = 1;
5874 break;
5875 #if defined(GL_TEXTURE_ENV_COLOR)
5876 case GL_TEXTURE_ENV_COLOR:
5877 #endif // defined(GL_TEXTURE_ENV_COLOR)
5878 _needed = 4;
5879 break;
5880 default:
5881 _needed = 1;
5882 break;
5883 }
5884 if (_remaining < _needed) {
5885 _exception = 1;
5886 _exceptionType = "java/lang/IllegalArgumentException";
5887 _exceptionMessage = "length - offset < needed";
5888 goto exit;
5889 }
5890 params_base = (GLint *)
5891 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5892 params = params_base + offset;
5893
5894 glGetTexEnviv(
5895 (GLenum)env,
5896 (GLenum)pname,
5897 (GLint *)params
5898 );
5899
5900 exit:
5901 if (params_base) {
5902 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5903 _exception ? JNI_ABORT: 0);
5904 }
5905 if (_exception) {
5906 jniThrowException(_env, _exceptionType, _exceptionMessage);
5907 }
5908 }
5909
5910 /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
5911 static void
android_glGetTexEnviv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint env,jint pname,jobject params_buf)5912 android_glGetTexEnviv__IILjava_nio_IntBuffer_2
5913 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
5914 jint _exception = 0;
5915 const char * _exceptionType = NULL;
5916 const char * _exceptionMessage = NULL;
5917 jintArray _array = (jintArray) 0;
5918 jint _bufferOffset = (jint) 0;
5919 jint _remaining;
5920 GLint *params = (GLint *) 0;
5921
5922 if (!params_buf) {
5923 _exception = 1;
5924 _exceptionType = "java/lang/IllegalArgumentException";
5925 _exceptionMessage = "params == null";
5926 goto exit;
5927 }
5928 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5929 int _needed;
5930 switch (pname) {
5931 #if defined(GL_TEXTURE_ENV_MODE)
5932 case GL_TEXTURE_ENV_MODE:
5933 #endif // defined(GL_TEXTURE_ENV_MODE)
5934 #if defined(GL_COMBINE_RGB)
5935 case GL_COMBINE_RGB:
5936 #endif // defined(GL_COMBINE_RGB)
5937 #if defined(GL_COMBINE_ALPHA)
5938 case GL_COMBINE_ALPHA:
5939 #endif // defined(GL_COMBINE_ALPHA)
5940 _needed = 1;
5941 break;
5942 #if defined(GL_TEXTURE_ENV_COLOR)
5943 case GL_TEXTURE_ENV_COLOR:
5944 #endif // defined(GL_TEXTURE_ENV_COLOR)
5945 _needed = 4;
5946 break;
5947 default:
5948 _needed = 1;
5949 break;
5950 }
5951 if (_remaining < _needed) {
5952 _exception = 1;
5953 _exceptionType = "java/lang/IllegalArgumentException";
5954 _exceptionMessage = "remaining() < needed";
5955 goto exit;
5956 }
5957 if (params == NULL) {
5958 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5959 params = (GLint *) (_paramsBase + _bufferOffset);
5960 }
5961 glGetTexEnviv(
5962 (GLenum)env,
5963 (GLenum)pname,
5964 (GLint *)params
5965 );
5966
5967 exit:
5968 if (_array) {
5969 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5970 }
5971 if (_exception) {
5972 jniThrowException(_env, _exceptionType, _exceptionMessage);
5973 }
5974 }
5975
5976 /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
5977 static void
android_glGetTexEnvxv__II_3II(JNIEnv * _env,jobject _this,jint env,jint pname,jintArray params_ref,jint offset)5978 android_glGetTexEnvxv__II_3II
5979 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
5980 jint _exception = 0;
5981 const char * _exceptionType = NULL;
5982 const char * _exceptionMessage = NULL;
5983 GLfixed *params_base = (GLfixed *) 0;
5984 jint _remaining;
5985 GLfixed *params = (GLfixed *) 0;
5986
5987 if (!params_ref) {
5988 _exception = 1;
5989 _exceptionType = "java/lang/IllegalArgumentException";
5990 _exceptionMessage = "params == null";
5991 goto exit;
5992 }
5993 if (offset < 0) {
5994 _exception = 1;
5995 _exceptionType = "java/lang/IllegalArgumentException";
5996 _exceptionMessage = "offset < 0";
5997 goto exit;
5998 }
5999 _remaining = _env->GetArrayLength(params_ref) - offset;
6000 int _needed;
6001 switch (pname) {
6002 #if defined(GL_TEXTURE_ENV_MODE)
6003 case GL_TEXTURE_ENV_MODE:
6004 #endif // defined(GL_TEXTURE_ENV_MODE)
6005 #if defined(GL_COMBINE_RGB)
6006 case GL_COMBINE_RGB:
6007 #endif // defined(GL_COMBINE_RGB)
6008 #if defined(GL_COMBINE_ALPHA)
6009 case GL_COMBINE_ALPHA:
6010 #endif // defined(GL_COMBINE_ALPHA)
6011 _needed = 1;
6012 break;
6013 #if defined(GL_TEXTURE_ENV_COLOR)
6014 case GL_TEXTURE_ENV_COLOR:
6015 #endif // defined(GL_TEXTURE_ENV_COLOR)
6016 _needed = 4;
6017 break;
6018 default:
6019 _needed = 1;
6020 break;
6021 }
6022 if (_remaining < _needed) {
6023 _exception = 1;
6024 _exceptionType = "java/lang/IllegalArgumentException";
6025 _exceptionMessage = "length - offset < needed";
6026 goto exit;
6027 }
6028 params_base = (GLfixed *)
6029 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6030 params = params_base + offset;
6031
6032 glGetTexEnvxv(
6033 (GLenum)env,
6034 (GLenum)pname,
6035 (GLfixed *)params
6036 );
6037
6038 exit:
6039 if (params_base) {
6040 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6041 _exception ? JNI_ABORT: 0);
6042 }
6043 if (_exception) {
6044 jniThrowException(_env, _exceptionType, _exceptionMessage);
6045 }
6046 }
6047
6048 /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
6049 static void
android_glGetTexEnvxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint env,jint pname,jobject params_buf)6050 android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
6051 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
6052 jint _exception = 0;
6053 const char * _exceptionType = NULL;
6054 const char * _exceptionMessage = NULL;
6055 jintArray _array = (jintArray) 0;
6056 jint _bufferOffset = (jint) 0;
6057 jint _remaining;
6058 GLfixed *params = (GLfixed *) 0;
6059
6060 if (!params_buf) {
6061 _exception = 1;
6062 _exceptionType = "java/lang/IllegalArgumentException";
6063 _exceptionMessage = "params == null";
6064 goto exit;
6065 }
6066 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6067 int _needed;
6068 switch (pname) {
6069 #if defined(GL_TEXTURE_ENV_MODE)
6070 case GL_TEXTURE_ENV_MODE:
6071 #endif // defined(GL_TEXTURE_ENV_MODE)
6072 #if defined(GL_COMBINE_RGB)
6073 case GL_COMBINE_RGB:
6074 #endif // defined(GL_COMBINE_RGB)
6075 #if defined(GL_COMBINE_ALPHA)
6076 case GL_COMBINE_ALPHA:
6077 #endif // defined(GL_COMBINE_ALPHA)
6078 _needed = 1;
6079 break;
6080 #if defined(GL_TEXTURE_ENV_COLOR)
6081 case GL_TEXTURE_ENV_COLOR:
6082 #endif // defined(GL_TEXTURE_ENV_COLOR)
6083 _needed = 4;
6084 break;
6085 default:
6086 _needed = 1;
6087 break;
6088 }
6089 if (_remaining < _needed) {
6090 _exception = 1;
6091 _exceptionType = "java/lang/IllegalArgumentException";
6092 _exceptionMessage = "remaining() < needed";
6093 goto exit;
6094 }
6095 if (params == NULL) {
6096 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6097 params = (GLfixed *) (_paramsBase + _bufferOffset);
6098 }
6099 glGetTexEnvxv(
6100 (GLenum)env,
6101 (GLenum)pname,
6102 (GLfixed *)params
6103 );
6104
6105 exit:
6106 if (_array) {
6107 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
6108 }
6109 if (_exception) {
6110 jniThrowException(_env, _exceptionType, _exceptionMessage);
6111 }
6112 }
6113
6114 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
6115 static void
android_glGetTexParameterfv__II_3FI(JNIEnv * _env,jobject _this,jint target,jint pname,jfloatArray params_ref,jint offset)6116 android_glGetTexParameterfv__II_3FI
6117 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
6118 jint _exception = 0;
6119 const char * _exceptionType = NULL;
6120 const char * _exceptionMessage = NULL;
6121 GLfloat *params_base = (GLfloat *) 0;
6122 jint _remaining;
6123 GLfloat *params = (GLfloat *) 0;
6124
6125 if (!params_ref) {
6126 _exception = 1;
6127 _exceptionType = "java/lang/IllegalArgumentException";
6128 _exceptionMessage = "params == null";
6129 goto exit;
6130 }
6131 if (offset < 0) {
6132 _exception = 1;
6133 _exceptionType = "java/lang/IllegalArgumentException";
6134 _exceptionMessage = "offset < 0";
6135 goto exit;
6136 }
6137 _remaining = _env->GetArrayLength(params_ref) - offset;
6138 if (_remaining < 1) {
6139 _exception = 1;
6140 _exceptionType = "java/lang/IllegalArgumentException";
6141 _exceptionMessage = "length - offset < 1 < needed";
6142 goto exit;
6143 }
6144 params_base = (GLfloat *)
6145 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
6146 params = params_base + offset;
6147
6148 glGetTexParameterfv(
6149 (GLenum)target,
6150 (GLenum)pname,
6151 (GLfloat *)params
6152 );
6153
6154 exit:
6155 if (params_base) {
6156 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
6157 _exception ? JNI_ABORT: 0);
6158 }
6159 if (_exception) {
6160 jniThrowException(_env, _exceptionType, _exceptionMessage);
6161 }
6162 }
6163
6164 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
6165 static void
android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6166 android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
6167 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6168 jint _exception = 0;
6169 const char * _exceptionType = NULL;
6170 const char * _exceptionMessage = NULL;
6171 jfloatArray _array = (jfloatArray) 0;
6172 jint _bufferOffset = (jint) 0;
6173 jint _remaining;
6174 GLfloat *params = (GLfloat *) 0;
6175
6176 if (!params_buf) {
6177 _exception = 1;
6178 _exceptionType = "java/lang/IllegalArgumentException";
6179 _exceptionMessage = "params == null";
6180 goto exit;
6181 }
6182 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6183 if (_remaining < 1) {
6184 _exception = 1;
6185 _exceptionType = "java/lang/IllegalArgumentException";
6186 _exceptionMessage = "remaining() < 1 < needed";
6187 goto exit;
6188 }
6189 if (params == NULL) {
6190 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
6191 params = (GLfloat *) (_paramsBase + _bufferOffset);
6192 }
6193 glGetTexParameterfv(
6194 (GLenum)target,
6195 (GLenum)pname,
6196 (GLfloat *)params
6197 );
6198
6199 exit:
6200 if (_array) {
6201 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
6202 }
6203 if (_exception) {
6204 jniThrowException(_env, _exceptionType, _exceptionMessage);
6205 }
6206 }
6207
6208 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
6209 static void
android_glGetTexParameteriv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6210 android_glGetTexParameteriv__II_3II
6211 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6212 jint _exception = 0;
6213 const char * _exceptionType = NULL;
6214 const char * _exceptionMessage = NULL;
6215 GLint *params_base = (GLint *) 0;
6216 jint _remaining;
6217 GLint *params = (GLint *) 0;
6218
6219 if (!params_ref) {
6220 _exception = 1;
6221 _exceptionType = "java/lang/IllegalArgumentException";
6222 _exceptionMessage = "params == null";
6223 goto exit;
6224 }
6225 if (offset < 0) {
6226 _exception = 1;
6227 _exceptionType = "java/lang/IllegalArgumentException";
6228 _exceptionMessage = "offset < 0";
6229 goto exit;
6230 }
6231 _remaining = _env->GetArrayLength(params_ref) - offset;
6232 if (_remaining < 1) {
6233 _exception = 1;
6234 _exceptionType = "java/lang/IllegalArgumentException";
6235 _exceptionMessage = "length - offset < 1 < needed";
6236 goto exit;
6237 }
6238 params_base = (GLint *)
6239 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6240 params = params_base + offset;
6241
6242 glGetTexParameteriv(
6243 (GLenum)target,
6244 (GLenum)pname,
6245 (GLint *)params
6246 );
6247
6248 exit:
6249 if (params_base) {
6250 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6251 _exception ? JNI_ABORT: 0);
6252 }
6253 if (_exception) {
6254 jniThrowException(_env, _exceptionType, _exceptionMessage);
6255 }
6256 }
6257
6258 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
6259 static void
android_glGetTexParameteriv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6260 android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
6261 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6262 jint _exception = 0;
6263 const char * _exceptionType = NULL;
6264 const char * _exceptionMessage = NULL;
6265 jintArray _array = (jintArray) 0;
6266 jint _bufferOffset = (jint) 0;
6267 jint _remaining;
6268 GLint *params = (GLint *) 0;
6269
6270 if (!params_buf) {
6271 _exception = 1;
6272 _exceptionType = "java/lang/IllegalArgumentException";
6273 _exceptionMessage = "params == null";
6274 goto exit;
6275 }
6276 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6277 if (_remaining < 1) {
6278 _exception = 1;
6279 _exceptionType = "java/lang/IllegalArgumentException";
6280 _exceptionMessage = "remaining() < 1 < needed";
6281 goto exit;
6282 }
6283 if (params == NULL) {
6284 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6285 params = (GLint *) (_paramsBase + _bufferOffset);
6286 }
6287 glGetTexParameteriv(
6288 (GLenum)target,
6289 (GLenum)pname,
6290 (GLint *)params
6291 );
6292
6293 exit:
6294 if (_array) {
6295 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
6296 }
6297 if (_exception) {
6298 jniThrowException(_env, _exceptionType, _exceptionMessage);
6299 }
6300 }
6301
6302 /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
6303 static void
android_glGetTexParameterxv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6304 android_glGetTexParameterxv__II_3II
6305 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6306 jint _exception = 0;
6307 const char * _exceptionType = NULL;
6308 const char * _exceptionMessage = NULL;
6309 GLfixed *params_base = (GLfixed *) 0;
6310 jint _remaining;
6311 GLfixed *params = (GLfixed *) 0;
6312
6313 if (!params_ref) {
6314 _exception = 1;
6315 _exceptionType = "java/lang/IllegalArgumentException";
6316 _exceptionMessage = "params == null";
6317 goto exit;
6318 }
6319 if (offset < 0) {
6320 _exception = 1;
6321 _exceptionType = "java/lang/IllegalArgumentException";
6322 _exceptionMessage = "offset < 0";
6323 goto exit;
6324 }
6325 _remaining = _env->GetArrayLength(params_ref) - offset;
6326 if (_remaining < 1) {
6327 _exception = 1;
6328 _exceptionType = "java/lang/IllegalArgumentException";
6329 _exceptionMessage = "length - offset < 1 < needed";
6330 goto exit;
6331 }
6332 params_base = (GLfixed *)
6333 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6334 params = params_base + offset;
6335
6336 glGetTexParameterxv(
6337 (GLenum)target,
6338 (GLenum)pname,
6339 (GLfixed *)params
6340 );
6341
6342 exit:
6343 if (params_base) {
6344 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6345 _exception ? JNI_ABORT: 0);
6346 }
6347 if (_exception) {
6348 jniThrowException(_env, _exceptionType, _exceptionMessage);
6349 }
6350 }
6351
6352 /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
6353 static void
android_glGetTexParameterxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6354 android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
6355 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6356 jint _exception = 0;
6357 const char * _exceptionType = NULL;
6358 const char * _exceptionMessage = NULL;
6359 jintArray _array = (jintArray) 0;
6360 jint _bufferOffset = (jint) 0;
6361 jint _remaining;
6362 GLfixed *params = (GLfixed *) 0;
6363
6364 if (!params_buf) {
6365 _exception = 1;
6366 _exceptionType = "java/lang/IllegalArgumentException";
6367 _exceptionMessage = "params == null";
6368 goto exit;
6369 }
6370 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6371 if (_remaining < 1) {
6372 _exception = 1;
6373 _exceptionType = "java/lang/IllegalArgumentException";
6374 _exceptionMessage = "remaining() < 1 < needed";
6375 goto exit;
6376 }
6377 if (params == NULL) {
6378 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6379 params = (GLfixed *) (_paramsBase + _bufferOffset);
6380 }
6381 glGetTexParameterxv(
6382 (GLenum)target,
6383 (GLenum)pname,
6384 (GLfixed *)params
6385 );
6386
6387 exit:
6388 if (_array) {
6389 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
6390 }
6391 if (_exception) {
6392 jniThrowException(_env, _exceptionType, _exceptionMessage);
6393 }
6394 }
6395
6396 /* GLboolean glIsBuffer ( GLuint buffer ) */
6397 static jboolean
android_glIsBuffer__I(JNIEnv * _env,jobject _this,jint buffer)6398 android_glIsBuffer__I
6399 (JNIEnv *_env, jobject _this, jint buffer) {
6400 GLboolean _returnValue;
6401 _returnValue = glIsBuffer(
6402 (GLuint)buffer
6403 );
6404 return (jboolean)_returnValue;
6405 }
6406
6407 /* GLboolean glIsEnabled ( GLenum cap ) */
6408 static jboolean
android_glIsEnabled__I(JNIEnv * _env,jobject _this,jint cap)6409 android_glIsEnabled__I
6410 (JNIEnv *_env, jobject _this, jint cap) {
6411 GLboolean _returnValue;
6412 _returnValue = glIsEnabled(
6413 (GLenum)cap
6414 );
6415 return (jboolean)_returnValue;
6416 }
6417
6418 /* GLboolean glIsTexture ( GLuint texture ) */
6419 static jboolean
android_glIsTexture__I(JNIEnv * _env,jobject _this,jint texture)6420 android_glIsTexture__I
6421 (JNIEnv *_env, jobject _this, jint texture) {
6422 GLboolean _returnValue;
6423 _returnValue = glIsTexture(
6424 (GLuint)texture
6425 );
6426 return (jboolean)_returnValue;
6427 }
6428
6429 /* void glNormalPointer ( GLenum type, GLsizei stride, GLint offset ) */
6430 static void
android_glNormalPointer__III(JNIEnv * _env,jobject _this,jint type,jint stride,jint offset)6431 android_glNormalPointer__III
6432 (JNIEnv *_env, jobject _this, jint type, jint stride, jint offset) {
6433 glNormalPointer(
6434 (GLenum)type,
6435 (GLsizei)stride,
6436 reinterpret_cast<GLvoid *>(offset)
6437 );
6438 }
6439
6440 /* void glPointParameterf ( GLenum pname, GLfloat param ) */
6441 static void
android_glPointParameterf__IF(JNIEnv * _env,jobject _this,jint pname,jfloat param)6442 android_glPointParameterf__IF
6443 (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
6444 glPointParameterf(
6445 (GLenum)pname,
6446 (GLfloat)param
6447 );
6448 }
6449
6450 /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
6451 static void
android_glPointParameterfv__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray params_ref,jint offset)6452 android_glPointParameterfv__I_3FI
6453 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
6454 jint _exception = 0;
6455 const char * _exceptionType = NULL;
6456 const char * _exceptionMessage = NULL;
6457 GLfloat *params_base = (GLfloat *) 0;
6458 jint _remaining;
6459 GLfloat *params = (GLfloat *) 0;
6460
6461 if (!params_ref) {
6462 _exception = 1;
6463 _exceptionType = "java/lang/IllegalArgumentException";
6464 _exceptionMessage = "params == null";
6465 goto exit;
6466 }
6467 if (offset < 0) {
6468 _exception = 1;
6469 _exceptionType = "java/lang/IllegalArgumentException";
6470 _exceptionMessage = "offset < 0";
6471 goto exit;
6472 }
6473 _remaining = _env->GetArrayLength(params_ref) - offset;
6474 if (_remaining < 1) {
6475 _exception = 1;
6476 _exceptionType = "java/lang/IllegalArgumentException";
6477 _exceptionMessage = "length - offset < 1 < needed";
6478 goto exit;
6479 }
6480 params_base = (GLfloat *)
6481 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
6482 params = params_base + offset;
6483
6484 glPointParameterfv(
6485 (GLenum)pname,
6486 (GLfloat *)params
6487 );
6488
6489 exit:
6490 if (params_base) {
6491 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
6492 JNI_ABORT);
6493 }
6494 if (_exception) {
6495 jniThrowException(_env, _exceptionType, _exceptionMessage);
6496 }
6497 }
6498
6499 /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
6500 static void
android_glPointParameterfv__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)6501 android_glPointParameterfv__ILjava_nio_FloatBuffer_2
6502 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
6503 jint _exception = 0;
6504 const char * _exceptionType = NULL;
6505 const char * _exceptionMessage = NULL;
6506 jfloatArray _array = (jfloatArray) 0;
6507 jint _bufferOffset = (jint) 0;
6508 jint _remaining;
6509 GLfloat *params = (GLfloat *) 0;
6510
6511 if (!params_buf) {
6512 _exception = 1;
6513 _exceptionType = "java/lang/IllegalArgumentException";
6514 _exceptionMessage = "params == null";
6515 goto exit;
6516 }
6517 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6518 if (_remaining < 1) {
6519 _exception = 1;
6520 _exceptionType = "java/lang/IllegalArgumentException";
6521 _exceptionMessage = "remaining() < 1 < needed";
6522 goto exit;
6523 }
6524 if (params == NULL) {
6525 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
6526 params = (GLfloat *) (_paramsBase + _bufferOffset);
6527 }
6528 glPointParameterfv(
6529 (GLenum)pname,
6530 (GLfloat *)params
6531 );
6532
6533 exit:
6534 if (_array) {
6535 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
6536 }
6537 if (_exception) {
6538 jniThrowException(_env, _exceptionType, _exceptionMessage);
6539 }
6540 }
6541
6542 /* void glPointParameterx ( GLenum pname, GLfixed param ) */
6543 static void
android_glPointParameterx__II(JNIEnv * _env,jobject _this,jint pname,jint param)6544 android_glPointParameterx__II
6545 (JNIEnv *_env, jobject _this, jint pname, jint param) {
6546 glPointParameterx(
6547 (GLenum)pname,
6548 (GLfixed)param
6549 );
6550 }
6551
6552 /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
6553 static void
android_glPointParameterxv__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)6554 android_glPointParameterxv__I_3II
6555 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
6556 jint _exception = 0;
6557 const char * _exceptionType = NULL;
6558 const char * _exceptionMessage = NULL;
6559 GLfixed *params_base = (GLfixed *) 0;
6560 jint _remaining;
6561 GLfixed *params = (GLfixed *) 0;
6562
6563 if (!params_ref) {
6564 _exception = 1;
6565 _exceptionType = "java/lang/IllegalArgumentException";
6566 _exceptionMessage = "params == null";
6567 goto exit;
6568 }
6569 if (offset < 0) {
6570 _exception = 1;
6571 _exceptionType = "java/lang/IllegalArgumentException";
6572 _exceptionMessage = "offset < 0";
6573 goto exit;
6574 }
6575 _remaining = _env->GetArrayLength(params_ref) - offset;
6576 if (_remaining < 1) {
6577 _exception = 1;
6578 _exceptionType = "java/lang/IllegalArgumentException";
6579 _exceptionMessage = "length - offset < 1 < needed";
6580 goto exit;
6581 }
6582 params_base = (GLfixed *)
6583 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6584 params = params_base + offset;
6585
6586 glPointParameterxv(
6587 (GLenum)pname,
6588 (GLfixed *)params
6589 );
6590
6591 exit:
6592 if (params_base) {
6593 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6594 JNI_ABORT);
6595 }
6596 if (_exception) {
6597 jniThrowException(_env, _exceptionType, _exceptionMessage);
6598 }
6599 }
6600
6601 /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
6602 static void
android_glPointParameterxv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)6603 android_glPointParameterxv__ILjava_nio_IntBuffer_2
6604 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
6605 jint _exception = 0;
6606 const char * _exceptionType = NULL;
6607 const char * _exceptionMessage = NULL;
6608 jintArray _array = (jintArray) 0;
6609 jint _bufferOffset = (jint) 0;
6610 jint _remaining;
6611 GLfixed *params = (GLfixed *) 0;
6612
6613 if (!params_buf) {
6614 _exception = 1;
6615 _exceptionType = "java/lang/IllegalArgumentException";
6616 _exceptionMessage = "params == null";
6617 goto exit;
6618 }
6619 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6620 if (_remaining < 1) {
6621 _exception = 1;
6622 _exceptionType = "java/lang/IllegalArgumentException";
6623 _exceptionMessage = "remaining() < 1 < needed";
6624 goto exit;
6625 }
6626 if (params == NULL) {
6627 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6628 params = (GLfixed *) (_paramsBase + _bufferOffset);
6629 }
6630 glPointParameterxv(
6631 (GLenum)pname,
6632 (GLfixed *)params
6633 );
6634
6635 exit:
6636 if (_array) {
6637 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
6638 }
6639 if (_exception) {
6640 jniThrowException(_env, _exceptionType, _exceptionMessage);
6641 }
6642 }
6643
6644 /* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
6645 static void
android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint type,jint stride,jobject pointer_buf,jint remaining)6646 android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I
6647 (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
6648 jint _exception = 0;
6649 const char * _exceptionType = NULL;
6650 const char * _exceptionMessage = NULL;
6651 jarray _array = (jarray) 0;
6652 jint _bufferOffset = (jint) 0;
6653 jint _remaining;
6654 GLvoid *pointer = (GLvoid *) 0;
6655
6656 if (pointer_buf) {
6657 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
6658 if ( ! pointer ) {
6659 return;
6660 }
6661 }
6662 glPointSizePointerOESBounds(
6663 (GLenum)type,
6664 (GLsizei)stride,
6665 (GLvoid *)pointer,
6666 (GLsizei)remaining
6667 );
6668 if (_exception) {
6669 jniThrowException(_env, _exceptionType, _exceptionMessage);
6670 }
6671 }
6672
6673 /* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
6674 static void
android_glTexCoordPointer__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)6675 android_glTexCoordPointer__IIII
6676 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
6677 glTexCoordPointer(
6678 (GLint)size,
6679 (GLenum)type,
6680 (GLsizei)stride,
6681 reinterpret_cast<GLvoid *>(offset)
6682 );
6683 }
6684
6685 /* void glTexEnvi ( GLenum target, GLenum pname, GLint param ) */
6686 static void
android_glTexEnvi__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)6687 android_glTexEnvi__III
6688 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
6689 glTexEnvi(
6690 (GLenum)target,
6691 (GLenum)pname,
6692 (GLint)param
6693 );
6694 }
6695
6696 /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
6697 static void
android_glTexEnviv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6698 android_glTexEnviv__II_3II
6699 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6700 jint _exception = 0;
6701 const char * _exceptionType = NULL;
6702 const char * _exceptionMessage = NULL;
6703 GLint *params_base = (GLint *) 0;
6704 jint _remaining;
6705 GLint *params = (GLint *) 0;
6706
6707 if (!params_ref) {
6708 _exception = 1;
6709 _exceptionType = "java/lang/IllegalArgumentException";
6710 _exceptionMessage = "params == null";
6711 goto exit;
6712 }
6713 if (offset < 0) {
6714 _exception = 1;
6715 _exceptionType = "java/lang/IllegalArgumentException";
6716 _exceptionMessage = "offset < 0";
6717 goto exit;
6718 }
6719 _remaining = _env->GetArrayLength(params_ref) - offset;
6720 int _needed;
6721 switch (pname) {
6722 #if defined(GL_TEXTURE_ENV_MODE)
6723 case GL_TEXTURE_ENV_MODE:
6724 #endif // defined(GL_TEXTURE_ENV_MODE)
6725 #if defined(GL_COMBINE_RGB)
6726 case GL_COMBINE_RGB:
6727 #endif // defined(GL_COMBINE_RGB)
6728 #if defined(GL_COMBINE_ALPHA)
6729 case GL_COMBINE_ALPHA:
6730 #endif // defined(GL_COMBINE_ALPHA)
6731 _needed = 1;
6732 break;
6733 #if defined(GL_TEXTURE_ENV_COLOR)
6734 case GL_TEXTURE_ENV_COLOR:
6735 #endif // defined(GL_TEXTURE_ENV_COLOR)
6736 _needed = 4;
6737 break;
6738 default:
6739 _needed = 1;
6740 break;
6741 }
6742 if (_remaining < _needed) {
6743 _exception = 1;
6744 _exceptionType = "java/lang/IllegalArgumentException";
6745 _exceptionMessage = "length - offset < needed";
6746 goto exit;
6747 }
6748 params_base = (GLint *)
6749 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6750 params = params_base + offset;
6751
6752 glTexEnviv(
6753 (GLenum)target,
6754 (GLenum)pname,
6755 (GLint *)params
6756 );
6757
6758 exit:
6759 if (params_base) {
6760 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6761 JNI_ABORT);
6762 }
6763 if (_exception) {
6764 jniThrowException(_env, _exceptionType, _exceptionMessage);
6765 }
6766 }
6767
6768 /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
6769 static void
android_glTexEnviv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6770 android_glTexEnviv__IILjava_nio_IntBuffer_2
6771 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6772 jint _exception = 0;
6773 const char * _exceptionType = NULL;
6774 const char * _exceptionMessage = NULL;
6775 jintArray _array = (jintArray) 0;
6776 jint _bufferOffset = (jint) 0;
6777 jint _remaining;
6778 GLint *params = (GLint *) 0;
6779
6780 if (!params_buf) {
6781 _exception = 1;
6782 _exceptionType = "java/lang/IllegalArgumentException";
6783 _exceptionMessage = "params == null";
6784 goto exit;
6785 }
6786 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6787 int _needed;
6788 switch (pname) {
6789 #if defined(GL_TEXTURE_ENV_MODE)
6790 case GL_TEXTURE_ENV_MODE:
6791 #endif // defined(GL_TEXTURE_ENV_MODE)
6792 #if defined(GL_COMBINE_RGB)
6793 case GL_COMBINE_RGB:
6794 #endif // defined(GL_COMBINE_RGB)
6795 #if defined(GL_COMBINE_ALPHA)
6796 case GL_COMBINE_ALPHA:
6797 #endif // defined(GL_COMBINE_ALPHA)
6798 _needed = 1;
6799 break;
6800 #if defined(GL_TEXTURE_ENV_COLOR)
6801 case GL_TEXTURE_ENV_COLOR:
6802 #endif // defined(GL_TEXTURE_ENV_COLOR)
6803 _needed = 4;
6804 break;
6805 default:
6806 _needed = 1;
6807 break;
6808 }
6809 if (_remaining < _needed) {
6810 _exception = 1;
6811 _exceptionType = "java/lang/IllegalArgumentException";
6812 _exceptionMessage = "remaining() < needed";
6813 goto exit;
6814 }
6815 if (params == NULL) {
6816 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6817 params = (GLint *) (_paramsBase + _bufferOffset);
6818 }
6819 glTexEnviv(
6820 (GLenum)target,
6821 (GLenum)pname,
6822 (GLint *)params
6823 );
6824
6825 exit:
6826 if (_array) {
6827 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
6828 }
6829 if (_exception) {
6830 jniThrowException(_env, _exceptionType, _exceptionMessage);
6831 }
6832 }
6833
6834 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
6835 static void
android_glTexParameterfv__II_3FI(JNIEnv * _env,jobject _this,jint target,jint pname,jfloatArray params_ref,jint offset)6836 android_glTexParameterfv__II_3FI
6837 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
6838 jint _exception = 0;
6839 const char * _exceptionType = NULL;
6840 const char * _exceptionMessage = NULL;
6841 GLfloat *params_base = (GLfloat *) 0;
6842 jint _remaining;
6843 GLfloat *params = (GLfloat *) 0;
6844
6845 if (!params_ref) {
6846 _exception = 1;
6847 _exceptionType = "java/lang/IllegalArgumentException";
6848 _exceptionMessage = "params == null";
6849 goto exit;
6850 }
6851 if (offset < 0) {
6852 _exception = 1;
6853 _exceptionType = "java/lang/IllegalArgumentException";
6854 _exceptionMessage = "offset < 0";
6855 goto exit;
6856 }
6857 _remaining = _env->GetArrayLength(params_ref) - offset;
6858 if (_remaining < 1) {
6859 _exception = 1;
6860 _exceptionType = "java/lang/IllegalArgumentException";
6861 _exceptionMessage = "length - offset < 1 < needed";
6862 goto exit;
6863 }
6864 params_base = (GLfloat *)
6865 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
6866 params = params_base + offset;
6867
6868 glTexParameterfv(
6869 (GLenum)target,
6870 (GLenum)pname,
6871 (GLfloat *)params
6872 );
6873
6874 exit:
6875 if (params_base) {
6876 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
6877 JNI_ABORT);
6878 }
6879 if (_exception) {
6880 jniThrowException(_env, _exceptionType, _exceptionMessage);
6881 }
6882 }
6883
6884 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
6885 static void
android_glTexParameterfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6886 android_glTexParameterfv__IILjava_nio_FloatBuffer_2
6887 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6888 jint _exception = 0;
6889 const char * _exceptionType = NULL;
6890 const char * _exceptionMessage = NULL;
6891 jfloatArray _array = (jfloatArray) 0;
6892 jint _bufferOffset = (jint) 0;
6893 jint _remaining;
6894 GLfloat *params = (GLfloat *) 0;
6895
6896 if (!params_buf) {
6897 _exception = 1;
6898 _exceptionType = "java/lang/IllegalArgumentException";
6899 _exceptionMessage = "params == null";
6900 goto exit;
6901 }
6902 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6903 if (_remaining < 1) {
6904 _exception = 1;
6905 _exceptionType = "java/lang/IllegalArgumentException";
6906 _exceptionMessage = "remaining() < 1 < needed";
6907 goto exit;
6908 }
6909 if (params == NULL) {
6910 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
6911 params = (GLfloat *) (_paramsBase + _bufferOffset);
6912 }
6913 glTexParameterfv(
6914 (GLenum)target,
6915 (GLenum)pname,
6916 (GLfloat *)params
6917 );
6918
6919 exit:
6920 if (_array) {
6921 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
6922 }
6923 if (_exception) {
6924 jniThrowException(_env, _exceptionType, _exceptionMessage);
6925 }
6926 }
6927
6928 /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
6929 static void
android_glTexParameteri__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)6930 android_glTexParameteri__III
6931 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
6932 glTexParameteri(
6933 (GLenum)target,
6934 (GLenum)pname,
6935 (GLint)param
6936 );
6937 }
6938
6939 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
6940 static void
android_glTexParameteriv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6941 android_glTexParameteriv__II_3II
6942 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6943 jint _exception = 0;
6944 const char * _exceptionType = NULL;
6945 const char * _exceptionMessage = NULL;
6946 GLint *params_base = (GLint *) 0;
6947 jint _remaining;
6948 GLint *params = (GLint *) 0;
6949
6950 if (!params_ref) {
6951 _exception = 1;
6952 _exceptionType = "java/lang/IllegalArgumentException";
6953 _exceptionMessage = "params == null";
6954 goto exit;
6955 }
6956 if (offset < 0) {
6957 _exception = 1;
6958 _exceptionType = "java/lang/IllegalArgumentException";
6959 _exceptionMessage = "offset < 0";
6960 goto exit;
6961 }
6962 _remaining = _env->GetArrayLength(params_ref) - offset;
6963 if (_remaining < 1) {
6964 _exception = 1;
6965 _exceptionType = "java/lang/IllegalArgumentException";
6966 _exceptionMessage = "length - offset < 1 < needed";
6967 goto exit;
6968 }
6969 params_base = (GLint *)
6970 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6971 params = params_base + offset;
6972
6973 glTexParameteriv(
6974 (GLenum)target,
6975 (GLenum)pname,
6976 (GLint *)params
6977 );
6978
6979 exit:
6980 if (params_base) {
6981 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6982 JNI_ABORT);
6983 }
6984 if (_exception) {
6985 jniThrowException(_env, _exceptionType, _exceptionMessage);
6986 }
6987 }
6988
6989 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
6990 static void
android_glTexParameteriv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6991 android_glTexParameteriv__IILjava_nio_IntBuffer_2
6992 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6993 jint _exception = 0;
6994 const char * _exceptionType = NULL;
6995 const char * _exceptionMessage = NULL;
6996 jintArray _array = (jintArray) 0;
6997 jint _bufferOffset = (jint) 0;
6998 jint _remaining;
6999 GLint *params = (GLint *) 0;
7000
7001 if (!params_buf) {
7002 _exception = 1;
7003 _exceptionType = "java/lang/IllegalArgumentException";
7004 _exceptionMessage = "params == null";
7005 goto exit;
7006 }
7007 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7008 if (_remaining < 1) {
7009 _exception = 1;
7010 _exceptionType = "java/lang/IllegalArgumentException";
7011 _exceptionMessage = "remaining() < 1 < needed";
7012 goto exit;
7013 }
7014 if (params == NULL) {
7015 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7016 params = (GLint *) (_paramsBase + _bufferOffset);
7017 }
7018 glTexParameteriv(
7019 (GLenum)target,
7020 (GLenum)pname,
7021 (GLint *)params
7022 );
7023
7024 exit:
7025 if (_array) {
7026 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
7027 }
7028 if (_exception) {
7029 jniThrowException(_env, _exceptionType, _exceptionMessage);
7030 }
7031 }
7032
7033 /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
7034 static void
android_glTexParameterxv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)7035 android_glTexParameterxv__II_3II
7036 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
7037 jint _exception = 0;
7038 const char * _exceptionType = NULL;
7039 const char * _exceptionMessage = NULL;
7040 GLfixed *params_base = (GLfixed *) 0;
7041 jint _remaining;
7042 GLfixed *params = (GLfixed *) 0;
7043
7044 if (!params_ref) {
7045 _exception = 1;
7046 _exceptionType = "java/lang/IllegalArgumentException";
7047 _exceptionMessage = "params == null";
7048 goto exit;
7049 }
7050 if (offset < 0) {
7051 _exception = 1;
7052 _exceptionType = "java/lang/IllegalArgumentException";
7053 _exceptionMessage = "offset < 0";
7054 goto exit;
7055 }
7056 _remaining = _env->GetArrayLength(params_ref) - offset;
7057 if (_remaining < 1) {
7058 _exception = 1;
7059 _exceptionType = "java/lang/IllegalArgumentException";
7060 _exceptionMessage = "length - offset < 1 < needed";
7061 goto exit;
7062 }
7063 params_base = (GLfixed *)
7064 _env->GetIntArrayElements(params_ref, (jboolean *)0);
7065 params = params_base + offset;
7066
7067 glTexParameterxv(
7068 (GLenum)target,
7069 (GLenum)pname,
7070 (GLfixed *)params
7071 );
7072
7073 exit:
7074 if (params_base) {
7075 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
7076 JNI_ABORT);
7077 }
7078 if (_exception) {
7079 jniThrowException(_env, _exceptionType, _exceptionMessage);
7080 }
7081 }
7082
7083 /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
7084 static void
android_glTexParameterxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)7085 android_glTexParameterxv__IILjava_nio_IntBuffer_2
7086 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
7087 jint _exception = 0;
7088 const char * _exceptionType = NULL;
7089 const char * _exceptionMessage = NULL;
7090 jintArray _array = (jintArray) 0;
7091 jint _bufferOffset = (jint) 0;
7092 jint _remaining;
7093 GLfixed *params = (GLfixed *) 0;
7094
7095 if (!params_buf) {
7096 _exception = 1;
7097 _exceptionType = "java/lang/IllegalArgumentException";
7098 _exceptionMessage = "params == null";
7099 goto exit;
7100 }
7101 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7102 if (_remaining < 1) {
7103 _exception = 1;
7104 _exceptionType = "java/lang/IllegalArgumentException";
7105 _exceptionMessage = "remaining() < 1 < needed";
7106 goto exit;
7107 }
7108 if (params == NULL) {
7109 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7110 params = (GLfixed *) (_paramsBase + _bufferOffset);
7111 }
7112 glTexParameterxv(
7113 (GLenum)target,
7114 (GLenum)pname,
7115 (GLfixed *)params
7116 );
7117
7118 exit:
7119 if (_array) {
7120 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
7121 }
7122 if (_exception) {
7123 jniThrowException(_env, _exceptionType, _exceptionMessage);
7124 }
7125 }
7126
7127 /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
7128 static void
android_glVertexPointer__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)7129 android_glVertexPointer__IIII
7130 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
7131 glVertexPointer(
7132 (GLint)size,
7133 (GLenum)type,
7134 (GLsizei)stride,
7135 reinterpret_cast<GLvoid *>(offset)
7136 );
7137 }
7138
7139 /* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
7140 static void
android_glCurrentPaletteMatrixOES__I(JNIEnv * _env,jobject _this,jint matrixpaletteindex)7141 android_glCurrentPaletteMatrixOES__I
7142 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
7143 glCurrentPaletteMatrixOES(
7144 (GLuint)matrixpaletteindex
7145 );
7146 }
7147
7148 /* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
7149 static void
android_glDrawTexfOES__FFFFF(JNIEnv * _env,jobject _this,jfloat x,jfloat y,jfloat z,jfloat width,jfloat height)7150 android_glDrawTexfOES__FFFFF
7151 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
7152 glDrawTexfOES(
7153 (GLfloat)x,
7154 (GLfloat)y,
7155 (GLfloat)z,
7156 (GLfloat)width,
7157 (GLfloat)height
7158 );
7159 }
7160
7161 /* void glDrawTexfvOES ( const GLfloat *coords ) */
7162 static void
android_glDrawTexfvOES___3FI(JNIEnv * _env,jobject _this,jfloatArray coords_ref,jint offset)7163 android_glDrawTexfvOES___3FI
7164 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
7165 jint _exception = 0;
7166 const char * _exceptionType = NULL;
7167 const char * _exceptionMessage = NULL;
7168 GLfloat *coords_base = (GLfloat *) 0;
7169 jint _remaining;
7170 GLfloat *coords = (GLfloat *) 0;
7171
7172 if (!coords_ref) {
7173 _exception = 1;
7174 _exceptionType = "java/lang/IllegalArgumentException";
7175 _exceptionMessage = "coords == null";
7176 goto exit;
7177 }
7178 if (offset < 0) {
7179 _exception = 1;
7180 _exceptionType = "java/lang/IllegalArgumentException";
7181 _exceptionMessage = "offset < 0";
7182 goto exit;
7183 }
7184 _remaining = _env->GetArrayLength(coords_ref) - offset;
7185 if (_remaining < 5) {
7186 _exception = 1;
7187 _exceptionType = "java/lang/IllegalArgumentException";
7188 _exceptionMessage = "length - offset < 5 < needed";
7189 goto exit;
7190 }
7191 coords_base = (GLfloat *)
7192 _env->GetFloatArrayElements(coords_ref, (jboolean *)0);
7193 coords = coords_base + offset;
7194
7195 glDrawTexfvOES(
7196 (GLfloat *)coords
7197 );
7198
7199 exit:
7200 if (coords_base) {
7201 _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base,
7202 JNI_ABORT);
7203 }
7204 if (_exception) {
7205 jniThrowException(_env, _exceptionType, _exceptionMessage);
7206 }
7207 }
7208
7209 /* void glDrawTexfvOES ( const GLfloat *coords ) */
7210 static void
android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7211 android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
7212 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7213 jint _exception = 0;
7214 const char * _exceptionType = NULL;
7215 const char * _exceptionMessage = NULL;
7216 jfloatArray _array = (jfloatArray) 0;
7217 jint _bufferOffset = (jint) 0;
7218 jint _remaining;
7219 GLfloat *coords = (GLfloat *) 0;
7220
7221 if (!coords_buf) {
7222 _exception = 1;
7223 _exceptionType = "java/lang/IllegalArgumentException";
7224 _exceptionMessage = "coords == null";
7225 goto exit;
7226 }
7227 coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7228 if (_remaining < 5) {
7229 _exception = 1;
7230 _exceptionType = "java/lang/IllegalArgumentException";
7231 _exceptionMessage = "remaining() < 5 < needed";
7232 goto exit;
7233 }
7234 if (coords == NULL) {
7235 char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
7236 coords = (GLfloat *) (_coordsBase + _bufferOffset);
7237 }
7238 glDrawTexfvOES(
7239 (GLfloat *)coords
7240 );
7241
7242 exit:
7243 if (_array) {
7244 _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT);
7245 }
7246 if (_exception) {
7247 jniThrowException(_env, _exceptionType, _exceptionMessage);
7248 }
7249 }
7250
7251 /* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
7252 static void
android_glDrawTexiOES__IIIII(JNIEnv * _env,jobject _this,jint x,jint y,jint z,jint width,jint height)7253 android_glDrawTexiOES__IIIII
7254 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
7255 glDrawTexiOES(
7256 (GLint)x,
7257 (GLint)y,
7258 (GLint)z,
7259 (GLint)width,
7260 (GLint)height
7261 );
7262 }
7263
7264 /* void glDrawTexivOES ( const GLint *coords ) */
7265 static void
android_glDrawTexivOES___3II(JNIEnv * _env,jobject _this,jintArray coords_ref,jint offset)7266 android_glDrawTexivOES___3II
7267 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
7268 jint _exception = 0;
7269 const char * _exceptionType = NULL;
7270 const char * _exceptionMessage = NULL;
7271 GLint *coords_base = (GLint *) 0;
7272 jint _remaining;
7273 GLint *coords = (GLint *) 0;
7274
7275 if (!coords_ref) {
7276 _exception = 1;
7277 _exceptionType = "java/lang/IllegalArgumentException";
7278 _exceptionMessage = "coords == null";
7279 goto exit;
7280 }
7281 if (offset < 0) {
7282 _exception = 1;
7283 _exceptionType = "java/lang/IllegalArgumentException";
7284 _exceptionMessage = "offset < 0";
7285 goto exit;
7286 }
7287 _remaining = _env->GetArrayLength(coords_ref) - offset;
7288 if (_remaining < 5) {
7289 _exception = 1;
7290 _exceptionType = "java/lang/IllegalArgumentException";
7291 _exceptionMessage = "length - offset < 5 < needed";
7292 goto exit;
7293 }
7294 coords_base = (GLint *)
7295 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
7296 coords = coords_base + offset;
7297
7298 glDrawTexivOES(
7299 (GLint *)coords
7300 );
7301
7302 exit:
7303 if (coords_base) {
7304 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
7305 JNI_ABORT);
7306 }
7307 if (_exception) {
7308 jniThrowException(_env, _exceptionType, _exceptionMessage);
7309 }
7310 }
7311
7312 /* void glDrawTexivOES ( const GLint *coords ) */
7313 static void
android_glDrawTexivOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7314 android_glDrawTexivOES__Ljava_nio_IntBuffer_2
7315 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7316 jint _exception = 0;
7317 const char * _exceptionType = NULL;
7318 const char * _exceptionMessage = NULL;
7319 jintArray _array = (jintArray) 0;
7320 jint _bufferOffset = (jint) 0;
7321 jint _remaining;
7322 GLint *coords = (GLint *) 0;
7323
7324 if (!coords_buf) {
7325 _exception = 1;
7326 _exceptionType = "java/lang/IllegalArgumentException";
7327 _exceptionMessage = "coords == null";
7328 goto exit;
7329 }
7330 coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7331 if (_remaining < 5) {
7332 _exception = 1;
7333 _exceptionType = "java/lang/IllegalArgumentException";
7334 _exceptionMessage = "remaining() < 5 < needed";
7335 goto exit;
7336 }
7337 if (coords == NULL) {
7338 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7339 coords = (GLint *) (_coordsBase + _bufferOffset);
7340 }
7341 glDrawTexivOES(
7342 (GLint *)coords
7343 );
7344
7345 exit:
7346 if (_array) {
7347 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
7348 }
7349 if (_exception) {
7350 jniThrowException(_env, _exceptionType, _exceptionMessage);
7351 }
7352 }
7353
7354 /* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
7355 static void
android_glDrawTexsOES__SSSSS(JNIEnv * _env,jobject _this,jshort x,jshort y,jshort z,jshort width,jshort height)7356 android_glDrawTexsOES__SSSSS
7357 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
7358 glDrawTexsOES(
7359 (GLshort)x,
7360 (GLshort)y,
7361 (GLshort)z,
7362 (GLshort)width,
7363 (GLshort)height
7364 );
7365 }
7366
7367 /* void glDrawTexsvOES ( const GLshort *coords ) */
7368 static void
android_glDrawTexsvOES___3SI(JNIEnv * _env,jobject _this,jshortArray coords_ref,jint offset)7369 android_glDrawTexsvOES___3SI
7370 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
7371 jint _exception = 0;
7372 const char * _exceptionType = NULL;
7373 const char * _exceptionMessage = NULL;
7374 GLshort *coords_base = (GLshort *) 0;
7375 jint _remaining;
7376 GLshort *coords = (GLshort *) 0;
7377
7378 if (!coords_ref) {
7379 _exception = 1;
7380 _exceptionType = "java/lang/IllegalArgumentException";
7381 _exceptionMessage = "coords == null";
7382 goto exit;
7383 }
7384 if (offset < 0) {
7385 _exception = 1;
7386 _exceptionType = "java/lang/IllegalArgumentException";
7387 _exceptionMessage = "offset < 0";
7388 goto exit;
7389 }
7390 _remaining = _env->GetArrayLength(coords_ref) - offset;
7391 if (_remaining < 5) {
7392 _exception = 1;
7393 _exceptionType = "java/lang/IllegalArgumentException";
7394 _exceptionMessage = "length - offset < 5 < needed";
7395 goto exit;
7396 }
7397 coords_base = (GLshort *)
7398 _env->GetShortArrayElements(coords_ref, (jboolean *)0);
7399 coords = coords_base + offset;
7400
7401 glDrawTexsvOES(
7402 (GLshort *)coords
7403 );
7404
7405 exit:
7406 if (coords_base) {
7407 _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base,
7408 JNI_ABORT);
7409 }
7410 if (_exception) {
7411 jniThrowException(_env, _exceptionType, _exceptionMessage);
7412 }
7413 }
7414
7415 /* void glDrawTexsvOES ( const GLshort *coords ) */
7416 static void
android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7417 android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
7418 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7419 jint _exception = 0;
7420 const char * _exceptionType = NULL;
7421 const char * _exceptionMessage = NULL;
7422 jshortArray _array = (jshortArray) 0;
7423 jint _bufferOffset = (jint) 0;
7424 jint _remaining;
7425 GLshort *coords = (GLshort *) 0;
7426
7427 if (!coords_buf) {
7428 _exception = 1;
7429 _exceptionType = "java/lang/IllegalArgumentException";
7430 _exceptionMessage = "coords == null";
7431 goto exit;
7432 }
7433 coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7434 if (_remaining < 5) {
7435 _exception = 1;
7436 _exceptionType = "java/lang/IllegalArgumentException";
7437 _exceptionMessage = "remaining() < 5 < needed";
7438 goto exit;
7439 }
7440 if (coords == NULL) {
7441 char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0);
7442 coords = (GLshort *) (_coordsBase + _bufferOffset);
7443 }
7444 glDrawTexsvOES(
7445 (GLshort *)coords
7446 );
7447
7448 exit:
7449 if (_array) {
7450 _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT);
7451 }
7452 if (_exception) {
7453 jniThrowException(_env, _exceptionType, _exceptionMessage);
7454 }
7455 }
7456
7457 /* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
7458 static void
android_glDrawTexxOES__IIIII(JNIEnv * _env,jobject _this,jint x,jint y,jint z,jint width,jint height)7459 android_glDrawTexxOES__IIIII
7460 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
7461 glDrawTexxOES(
7462 (GLfixed)x,
7463 (GLfixed)y,
7464 (GLfixed)z,
7465 (GLfixed)width,
7466 (GLfixed)height
7467 );
7468 }
7469
7470 /* void glDrawTexxvOES ( const GLfixed *coords ) */
7471 static void
android_glDrawTexxvOES___3II(JNIEnv * _env,jobject _this,jintArray coords_ref,jint offset)7472 android_glDrawTexxvOES___3II
7473 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
7474 jint _exception = 0;
7475 const char * _exceptionType = NULL;
7476 const char * _exceptionMessage = NULL;
7477 GLfixed *coords_base = (GLfixed *) 0;
7478 jint _remaining;
7479 GLfixed *coords = (GLfixed *) 0;
7480
7481 if (!coords_ref) {
7482 _exception = 1;
7483 _exceptionType = "java/lang/IllegalArgumentException";
7484 _exceptionMessage = "coords == null";
7485 goto exit;
7486 }
7487 if (offset < 0) {
7488 _exception = 1;
7489 _exceptionType = "java/lang/IllegalArgumentException";
7490 _exceptionMessage = "offset < 0";
7491 goto exit;
7492 }
7493 _remaining = _env->GetArrayLength(coords_ref) - offset;
7494 if (_remaining < 5) {
7495 _exception = 1;
7496 _exceptionType = "java/lang/IllegalArgumentException";
7497 _exceptionMessage = "length - offset < 5 < needed";
7498 goto exit;
7499 }
7500 coords_base = (GLfixed *)
7501 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
7502 coords = coords_base + offset;
7503
7504 glDrawTexxvOES(
7505 (GLfixed *)coords
7506 );
7507
7508 exit:
7509 if (coords_base) {
7510 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
7511 JNI_ABORT);
7512 }
7513 if (_exception) {
7514 jniThrowException(_env, _exceptionType, _exceptionMessage);
7515 }
7516 }
7517
7518 /* void glDrawTexxvOES ( const GLfixed *coords ) */
7519 static void
android_glDrawTexxvOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7520 android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
7521 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7522 jint _exception = 0;
7523 const char * _exceptionType = NULL;
7524 const char * _exceptionMessage = NULL;
7525 jintArray _array = (jintArray) 0;
7526 jint _bufferOffset = (jint) 0;
7527 jint _remaining;
7528 GLfixed *coords = (GLfixed *) 0;
7529
7530 if (!coords_buf) {
7531 _exception = 1;
7532 _exceptionType = "java/lang/IllegalArgumentException";
7533 _exceptionMessage = "coords == null";
7534 goto exit;
7535 }
7536 coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7537 if (_remaining < 5) {
7538 _exception = 1;
7539 _exceptionType = "java/lang/IllegalArgumentException";
7540 _exceptionMessage = "remaining() < 5 < needed";
7541 goto exit;
7542 }
7543 if (coords == NULL) {
7544 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7545 coords = (GLfixed *) (_coordsBase + _bufferOffset);
7546 }
7547 glDrawTexxvOES(
7548 (GLfixed *)coords
7549 );
7550
7551 exit:
7552 if (_array) {
7553 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
7554 }
7555 if (_exception) {
7556 jniThrowException(_env, _exceptionType, _exceptionMessage);
7557 }
7558 }
7559
7560 /* void glLoadPaletteFromModelViewMatrixOES ( void ) */
7561 static void
android_glLoadPaletteFromModelViewMatrixOES__(JNIEnv * _env,jobject _this)7562 android_glLoadPaletteFromModelViewMatrixOES__
7563 (JNIEnv *_env, jobject _this) {
7564 glLoadPaletteFromModelViewMatrixOES();
7565 }
7566
7567 /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
7568 static void
android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)7569 android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
7570 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
7571 jint _exception = 0;
7572 const char * _exceptionType = NULL;
7573 const char * _exceptionMessage = NULL;
7574 jarray _array = (jarray) 0;
7575 jint _bufferOffset = (jint) 0;
7576 jint _remaining;
7577 GLvoid *pointer = (GLvoid *) 0;
7578
7579 if (pointer_buf) {
7580 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
7581 if ( ! pointer ) {
7582 return;
7583 }
7584 }
7585 glMatrixIndexPointerOESBounds(
7586 (GLint)size,
7587 (GLenum)type,
7588 (GLsizei)stride,
7589 (GLvoid *)pointer,
7590 (GLsizei)remaining
7591 );
7592 if (_exception) {
7593 jniThrowException(_env, _exceptionType, _exceptionMessage);
7594 }
7595 }
7596
7597 /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
7598 static void
android_glMatrixIndexPointerOES__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)7599 android_glMatrixIndexPointerOES__IIII
7600 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
7601 glMatrixIndexPointerOES(
7602 (GLint)size,
7603 (GLenum)type,
7604 (GLsizei)stride,
7605 reinterpret_cast<GLvoid *>(offset)
7606 );
7607 }
7608
7609 /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
7610 static void
android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)7611 android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
7612 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
7613 jint _exception = 0;
7614 const char * _exceptionType = NULL;
7615 const char * _exceptionMessage = NULL;
7616 jarray _array = (jarray) 0;
7617 jint _bufferOffset = (jint) 0;
7618 jint _remaining;
7619 GLvoid *pointer = (GLvoid *) 0;
7620
7621 if (pointer_buf) {
7622 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
7623 if ( ! pointer ) {
7624 return;
7625 }
7626 }
7627 glWeightPointerOESBounds(
7628 (GLint)size,
7629 (GLenum)type,
7630 (GLsizei)stride,
7631 (GLvoid *)pointer,
7632 (GLsizei)remaining
7633 );
7634 if (_exception) {
7635 jniThrowException(_env, _exceptionType, _exceptionMessage);
7636 }
7637 }
7638
7639 /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
7640 static void
android_glWeightPointerOES__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)7641 android_glWeightPointerOES__IIII
7642 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
7643 glWeightPointerOES(
7644 (GLint)size,
7645 (GLenum)type,
7646 (GLsizei)stride,
7647 reinterpret_cast<GLvoid *>(offset)
7648 );
7649 }
7650
7651 /* void glBindFramebufferOES ( GLint target, GLint framebuffer ) */
7652 static void
android_glBindFramebufferOES__II(JNIEnv * _env,jobject _this,jint target,jint framebuffer)7653 android_glBindFramebufferOES__II
7654 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
7655 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7656 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7657 "glBindFramebufferOES");
7658 return;
7659 }
7660 glBindFramebufferOES(
7661 (GLint)target,
7662 (GLint)framebuffer
7663 );
7664 }
7665
7666 /* void glBindRenderbufferOES ( GLint target, GLint renderbuffer ) */
7667 static void
android_glBindRenderbufferOES__II(JNIEnv * _env,jobject _this,jint target,jint renderbuffer)7668 android_glBindRenderbufferOES__II
7669 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
7670 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7671 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7672 "glBindRenderbufferOES");
7673 return;
7674 }
7675 glBindRenderbufferOES(
7676 (GLint)target,
7677 (GLint)renderbuffer
7678 );
7679 }
7680
7681 /* void glBlendEquation ( GLint mode ) */
7682 static void
android_glBlendEquation__I(JNIEnv * _env,jobject _this,jint mode)7683 android_glBlendEquation__I
7684 (JNIEnv *_env, jobject _this, jint mode) {
7685 if (! supportsExtension(_env, _this, have_OES_blend_subtractID)) {
7686 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7687 "glBlendEquation");
7688 return;
7689 }
7690 glBlendEquation(
7691 (GLint)mode
7692 );
7693 }
7694
7695 /* void glBlendEquationSeparate ( GLint modeRGB, GLint modeAlpha ) */
7696 static void
android_glBlendEquationSeparate__II(JNIEnv * _env,jobject _this,jint modeRGB,jint modeAlpha)7697 android_glBlendEquationSeparate__II
7698 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
7699 if (! supportsExtension(_env, _this, have_OES_blend_equation_separateID)) {
7700 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7701 "glBlendEquationSeparate");
7702 return;
7703 }
7704 glBlendEquationSeparate(
7705 (GLint)modeRGB,
7706 (GLint)modeAlpha
7707 );
7708 }
7709
7710 /* void glBlendFuncSeparate ( GLint srcRGB, GLint dstRGB, GLint srcAlpha, GLint dstAlpha ) */
7711 static void
android_glBlendFuncSeparate__IIII(JNIEnv * _env,jobject _this,jint srcRGB,jint dstRGB,jint srcAlpha,jint dstAlpha)7712 android_glBlendFuncSeparate__IIII
7713 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
7714 if (! supportsExtension(_env, _this, have_OES_blend_equation_separateID)) {
7715 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7716 "glBlendFuncSeparate");
7717 return;
7718 }
7719 glBlendFuncSeparate(
7720 (GLint)srcRGB,
7721 (GLint)dstRGB,
7722 (GLint)srcAlpha,
7723 (GLint)dstAlpha
7724 );
7725 }
7726
7727 /* GLint glCheckFramebufferStatusOES ( GLint target ) */
7728 static jint
android_glCheckFramebufferStatusOES__I(JNIEnv * _env,jobject _this,jint target)7729 android_glCheckFramebufferStatusOES__I
7730 (JNIEnv *_env, jobject _this, jint target) {
7731 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7732 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7733 "glCheckFramebufferStatusOES");
7734 return 0;
7735 }
7736 GLint _returnValue = 0;
7737 _returnValue = glCheckFramebufferStatusOES(
7738 (GLint)target
7739 );
7740 return (jint)_returnValue;
7741 }
7742
7743 /* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */
7744 static void
android_glDeleteFramebuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray framebuffers_ref,jint offset)7745 android_glDeleteFramebuffersOES__I_3II
7746 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
7747 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7748 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7749 "glDeleteFramebuffersOES");
7750 return;
7751 }
7752 jint _exception = 0;
7753 const char * _exceptionType = NULL;
7754 const char * _exceptionMessage = NULL;
7755 GLuint *framebuffers_base = (GLuint *) 0;
7756 jint _remaining;
7757 GLuint *framebuffers = (GLuint *) 0;
7758
7759 if (!framebuffers_ref) {
7760 _exception = 1;
7761 _exceptionType = "java/lang/IllegalArgumentException";
7762 _exceptionMessage = "framebuffers == null";
7763 goto exit;
7764 }
7765 if (offset < 0) {
7766 _exception = 1;
7767 _exceptionType = "java/lang/IllegalArgumentException";
7768 _exceptionMessage = "offset < 0";
7769 goto exit;
7770 }
7771 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
7772 if (_remaining < n) {
7773 _exception = 1;
7774 _exceptionType = "java/lang/IllegalArgumentException";
7775 _exceptionMessage = "length - offset < n < needed";
7776 goto exit;
7777 }
7778 framebuffers_base = (GLuint *)
7779 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
7780 framebuffers = framebuffers_base + offset;
7781
7782 glDeleteFramebuffersOES(
7783 (GLint)n,
7784 (GLuint *)framebuffers
7785 );
7786
7787 exit:
7788 if (framebuffers_base) {
7789 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
7790 _exception ? JNI_ABORT: 0);
7791 }
7792 if (_exception) {
7793 jniThrowException(_env, _exceptionType, _exceptionMessage);
7794 }
7795 }
7796
7797 /* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */
7798 static void
android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject framebuffers_buf)7799 android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
7800 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
7801 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7802 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7803 "glDeleteFramebuffersOES");
7804 return;
7805 }
7806 jint _exception = 0;
7807 const char * _exceptionType = NULL;
7808 const char * _exceptionMessage = NULL;
7809 jintArray _array = (jintArray) 0;
7810 jint _bufferOffset = (jint) 0;
7811 jint _remaining;
7812 GLuint *framebuffers = (GLuint *) 0;
7813
7814 if (!framebuffers_buf) {
7815 _exception = 1;
7816 _exceptionType = "java/lang/IllegalArgumentException";
7817 _exceptionMessage = "framebuffers == null";
7818 goto exit;
7819 }
7820 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7821 if (_remaining < n) {
7822 _exception = 1;
7823 _exceptionType = "java/lang/IllegalArgumentException";
7824 _exceptionMessage = "remaining() < n < needed";
7825 goto exit;
7826 }
7827 if (framebuffers == NULL) {
7828 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7829 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
7830 }
7831 glDeleteFramebuffersOES(
7832 (GLint)n,
7833 (GLuint *)framebuffers
7834 );
7835
7836 exit:
7837 if (_array) {
7838 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
7839 }
7840 if (_exception) {
7841 jniThrowException(_env, _exceptionType, _exceptionMessage);
7842 }
7843 }
7844
7845 /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
7846 static void
android_glDeleteRenderbuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray renderbuffers_ref,jint offset)7847 android_glDeleteRenderbuffersOES__I_3II
7848 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
7849 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7850 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7851 "glDeleteRenderbuffersOES");
7852 return;
7853 }
7854 jint _exception = 0;
7855 const char * _exceptionType = NULL;
7856 const char * _exceptionMessage = NULL;
7857 GLuint *renderbuffers_base = (GLuint *) 0;
7858 jint _remaining;
7859 GLuint *renderbuffers = (GLuint *) 0;
7860
7861 if (!renderbuffers_ref) {
7862 _exception = 1;
7863 _exceptionType = "java/lang/IllegalArgumentException";
7864 _exceptionMessage = "renderbuffers == null";
7865 goto exit;
7866 }
7867 if (offset < 0) {
7868 _exception = 1;
7869 _exceptionType = "java/lang/IllegalArgumentException";
7870 _exceptionMessage = "offset < 0";
7871 goto exit;
7872 }
7873 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
7874 if (_remaining < n) {
7875 _exception = 1;
7876 _exceptionType = "java/lang/IllegalArgumentException";
7877 _exceptionMessage = "length - offset < n < needed";
7878 goto exit;
7879 }
7880 renderbuffers_base = (GLuint *)
7881 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
7882 renderbuffers = renderbuffers_base + offset;
7883
7884 glDeleteRenderbuffersOES(
7885 (GLint)n,
7886 (GLuint *)renderbuffers
7887 );
7888
7889 exit:
7890 if (renderbuffers_base) {
7891 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
7892 _exception ? JNI_ABORT: 0);
7893 }
7894 if (_exception) {
7895 jniThrowException(_env, _exceptionType, _exceptionMessage);
7896 }
7897 }
7898
7899 /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
7900 static void
android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject renderbuffers_buf)7901 android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
7902 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
7903 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7904 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7905 "glDeleteRenderbuffersOES");
7906 return;
7907 }
7908 jint _exception = 0;
7909 const char * _exceptionType = NULL;
7910 const char * _exceptionMessage = NULL;
7911 jintArray _array = (jintArray) 0;
7912 jint _bufferOffset = (jint) 0;
7913 jint _remaining;
7914 GLuint *renderbuffers = (GLuint *) 0;
7915
7916 if (!renderbuffers_buf) {
7917 _exception = 1;
7918 _exceptionType = "java/lang/IllegalArgumentException";
7919 _exceptionMessage = "renderbuffers == null";
7920 goto exit;
7921 }
7922 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7923 if (_remaining < n) {
7924 _exception = 1;
7925 _exceptionType = "java/lang/IllegalArgumentException";
7926 _exceptionMessage = "remaining() < n < needed";
7927 goto exit;
7928 }
7929 if (renderbuffers == NULL) {
7930 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7931 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
7932 }
7933 glDeleteRenderbuffersOES(
7934 (GLint)n,
7935 (GLuint *)renderbuffers
7936 );
7937
7938 exit:
7939 if (_array) {
7940 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
7941 }
7942 if (_exception) {
7943 jniThrowException(_env, _exceptionType, _exceptionMessage);
7944 }
7945 }
7946
7947 /* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */
7948 static void
android_glFramebufferRenderbufferOES__IIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint renderbuffertarget,jint renderbuffer)7949 android_glFramebufferRenderbufferOES__IIII
7950 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
7951 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7952 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7953 "glFramebufferRenderbufferOES");
7954 return;
7955 }
7956 glFramebufferRenderbufferOES(
7957 (GLint)target,
7958 (GLint)attachment,
7959 (GLint)renderbuffertarget,
7960 (GLint)renderbuffer
7961 );
7962 }
7963
7964 /* void glFramebufferTexture2DOES ( GLint target, GLint attachment, GLint textarget, GLint texture, GLint level ) */
7965 static void
android_glFramebufferTexture2DOES__IIIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint textarget,jint texture,jint level)7966 android_glFramebufferTexture2DOES__IIIII
7967 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
7968 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7969 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7970 "glFramebufferTexture2DOES");
7971 return;
7972 }
7973 glFramebufferTexture2DOES(
7974 (GLint)target,
7975 (GLint)attachment,
7976 (GLint)textarget,
7977 (GLint)texture,
7978 (GLint)level
7979 );
7980 }
7981
7982 /* void glGenerateMipmapOES ( GLint target ) */
7983 static void
android_glGenerateMipmapOES__I(JNIEnv * _env,jobject _this,jint target)7984 android_glGenerateMipmapOES__I
7985 (JNIEnv *_env, jobject _this, jint target) {
7986 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7987 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7988 "glGenerateMipmapOES");
7989 return;
7990 }
7991 glGenerateMipmapOES(
7992 (GLint)target
7993 );
7994 }
7995
7996 /* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */
7997 static void
android_glGenFramebuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray framebuffers_ref,jint offset)7998 android_glGenFramebuffersOES__I_3II
7999 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
8000 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8001 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8002 "glGenFramebuffersOES");
8003 return;
8004 }
8005 jint _exception = 0;
8006 const char * _exceptionType = NULL;
8007 const char * _exceptionMessage = NULL;
8008 GLuint *framebuffers_base = (GLuint *) 0;
8009 jint _remaining;
8010 GLuint *framebuffers = (GLuint *) 0;
8011
8012 if (!framebuffers_ref) {
8013 _exception = 1;
8014 _exceptionType = "java/lang/IllegalArgumentException";
8015 _exceptionMessage = "framebuffers == null";
8016 goto exit;
8017 }
8018 if (offset < 0) {
8019 _exception = 1;
8020 _exceptionType = "java/lang/IllegalArgumentException";
8021 _exceptionMessage = "offset < 0";
8022 goto exit;
8023 }
8024 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
8025 if (_remaining < n) {
8026 _exception = 1;
8027 _exceptionType = "java/lang/IllegalArgumentException";
8028 _exceptionMessage = "length - offset < n < needed";
8029 goto exit;
8030 }
8031 framebuffers_base = (GLuint *)
8032 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
8033 framebuffers = framebuffers_base + offset;
8034
8035 glGenFramebuffersOES(
8036 (GLint)n,
8037 (GLuint *)framebuffers
8038 );
8039
8040 exit:
8041 if (framebuffers_base) {
8042 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
8043 _exception ? JNI_ABORT: 0);
8044 }
8045 if (_exception) {
8046 jniThrowException(_env, _exceptionType, _exceptionMessage);
8047 }
8048 }
8049
8050 /* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */
8051 static void
android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject framebuffers_buf)8052 android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
8053 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
8054 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8055 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8056 "glGenFramebuffersOES");
8057 return;
8058 }
8059 jint _exception = 0;
8060 const char * _exceptionType = NULL;
8061 const char * _exceptionMessage = NULL;
8062 jintArray _array = (jintArray) 0;
8063 jint _bufferOffset = (jint) 0;
8064 jint _remaining;
8065 GLuint *framebuffers = (GLuint *) 0;
8066
8067 if (!framebuffers_buf) {
8068 _exception = 1;
8069 _exceptionType = "java/lang/IllegalArgumentException";
8070 _exceptionMessage = "framebuffers == null";
8071 goto exit;
8072 }
8073 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8074 if (_remaining < n) {
8075 _exception = 1;
8076 _exceptionType = "java/lang/IllegalArgumentException";
8077 _exceptionMessage = "remaining() < n < needed";
8078 goto exit;
8079 }
8080 if (framebuffers == NULL) {
8081 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8082 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
8083 }
8084 glGenFramebuffersOES(
8085 (GLint)n,
8086 (GLuint *)framebuffers
8087 );
8088
8089 exit:
8090 if (_array) {
8091 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
8092 }
8093 if (_exception) {
8094 jniThrowException(_env, _exceptionType, _exceptionMessage);
8095 }
8096 }
8097
8098 /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
8099 static void
android_glGenRenderbuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray renderbuffers_ref,jint offset)8100 android_glGenRenderbuffersOES__I_3II
8101 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
8102 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8103 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8104 "glGenRenderbuffersOES");
8105 return;
8106 }
8107 jint _exception = 0;
8108 const char * _exceptionType = NULL;
8109 const char * _exceptionMessage = NULL;
8110 GLuint *renderbuffers_base = (GLuint *) 0;
8111 jint _remaining;
8112 GLuint *renderbuffers = (GLuint *) 0;
8113
8114 if (!renderbuffers_ref) {
8115 _exception = 1;
8116 _exceptionType = "java/lang/IllegalArgumentException";
8117 _exceptionMessage = "renderbuffers == null";
8118 goto exit;
8119 }
8120 if (offset < 0) {
8121 _exception = 1;
8122 _exceptionType = "java/lang/IllegalArgumentException";
8123 _exceptionMessage = "offset < 0";
8124 goto exit;
8125 }
8126 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
8127 if (_remaining < n) {
8128 _exception = 1;
8129 _exceptionType = "java/lang/IllegalArgumentException";
8130 _exceptionMessage = "length - offset < n < needed";
8131 goto exit;
8132 }
8133 renderbuffers_base = (GLuint *)
8134 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
8135 renderbuffers = renderbuffers_base + offset;
8136
8137 glGenRenderbuffersOES(
8138 (GLint)n,
8139 (GLuint *)renderbuffers
8140 );
8141
8142 exit:
8143 if (renderbuffers_base) {
8144 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
8145 _exception ? JNI_ABORT: 0);
8146 }
8147 if (_exception) {
8148 jniThrowException(_env, _exceptionType, _exceptionMessage);
8149 }
8150 }
8151
8152 /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
8153 static void
android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject renderbuffers_buf)8154 android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
8155 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
8156 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8157 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8158 "glGenRenderbuffersOES");
8159 return;
8160 }
8161 jint _exception = 0;
8162 const char * _exceptionType = NULL;
8163 const char * _exceptionMessage = NULL;
8164 jintArray _array = (jintArray) 0;
8165 jint _bufferOffset = (jint) 0;
8166 jint _remaining;
8167 GLuint *renderbuffers = (GLuint *) 0;
8168
8169 if (!renderbuffers_buf) {
8170 _exception = 1;
8171 _exceptionType = "java/lang/IllegalArgumentException";
8172 _exceptionMessage = "renderbuffers == null";
8173 goto exit;
8174 }
8175 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8176 if (_remaining < n) {
8177 _exception = 1;
8178 _exceptionType = "java/lang/IllegalArgumentException";
8179 _exceptionMessage = "remaining() < n < needed";
8180 goto exit;
8181 }
8182 if (renderbuffers == NULL) {
8183 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8184 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
8185 }
8186 glGenRenderbuffersOES(
8187 (GLint)n,
8188 (GLuint *)renderbuffers
8189 );
8190
8191 exit:
8192 if (_array) {
8193 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
8194 }
8195 if (_exception) {
8196 jniThrowException(_env, _exceptionType, _exceptionMessage);
8197 }
8198 }
8199
8200 /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
8201 static void
android_glGetFramebufferAttachmentParameterivOES__III_3II(JNIEnv * _env,jobject _this,jint target,jint attachment,jint pname,jintArray params_ref,jint offset)8202 android_glGetFramebufferAttachmentParameterivOES__III_3II
8203 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
8204 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8205 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8206 "glGetFramebufferAttachmentParameterivOES");
8207 return;
8208 }
8209 jint _exception = 0;
8210 const char * _exceptionType = NULL;
8211 const char * _exceptionMessage = NULL;
8212 GLint *params_base = (GLint *) 0;
8213 jint _remaining;
8214 GLint *params = (GLint *) 0;
8215
8216 if (!params_ref) {
8217 _exception = 1;
8218 _exceptionType = "java/lang/IllegalArgumentException";
8219 _exceptionMessage = "params == null";
8220 goto exit;
8221 }
8222 if (offset < 0) {
8223 _exception = 1;
8224 _exceptionType = "java/lang/IllegalArgumentException";
8225 _exceptionMessage = "offset < 0";
8226 goto exit;
8227 }
8228 _remaining = _env->GetArrayLength(params_ref) - offset;
8229 params_base = (GLint *)
8230 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8231 params = params_base + offset;
8232
8233 glGetFramebufferAttachmentParameterivOES(
8234 (GLint)target,
8235 (GLint)attachment,
8236 (GLint)pname,
8237 (GLint *)params
8238 );
8239
8240 exit:
8241 if (params_base) {
8242 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8243 _exception ? JNI_ABORT: 0);
8244 }
8245 if (_exception) {
8246 jniThrowException(_env, _exceptionType, _exceptionMessage);
8247 }
8248 }
8249
8250 /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
8251 static void
android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint attachment,jint pname,jobject params_buf)8252 android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
8253 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
8254 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8255 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8256 "glGetFramebufferAttachmentParameterivOES");
8257 return;
8258 }
8259 jint _exception = 0;
8260 const char * _exceptionType = NULL;
8261 const char * _exceptionMessage = NULL;
8262 jintArray _array = (jintArray) 0;
8263 jint _bufferOffset = (jint) 0;
8264 jint _remaining;
8265 GLint *params = (GLint *) 0;
8266
8267 if (!params_buf) {
8268 _exception = 1;
8269 _exceptionType = "java/lang/IllegalArgumentException";
8270 _exceptionMessage = "params == null";
8271 goto exit;
8272 }
8273 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8274 if (params == NULL) {
8275 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8276 params = (GLint *) (_paramsBase + _bufferOffset);
8277 }
8278 glGetFramebufferAttachmentParameterivOES(
8279 (GLint)target,
8280 (GLint)attachment,
8281 (GLint)pname,
8282 (GLint *)params
8283 );
8284
8285 exit:
8286 if (_array) {
8287 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8288 }
8289 if (_exception) {
8290 jniThrowException(_env, _exceptionType, _exceptionMessage);
8291 }
8292 }
8293
8294 /* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
8295 static void
android_glGetRenderbufferParameterivOES__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)8296 android_glGetRenderbufferParameterivOES__II_3II
8297 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
8298 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8299 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8300 "glGetRenderbufferParameterivOES");
8301 return;
8302 }
8303 jint _exception = 0;
8304 const char * _exceptionType = NULL;
8305 const char * _exceptionMessage = NULL;
8306 GLint *params_base = (GLint *) 0;
8307 jint _remaining;
8308 GLint *params = (GLint *) 0;
8309
8310 if (!params_ref) {
8311 _exception = 1;
8312 _exceptionType = "java/lang/IllegalArgumentException";
8313 _exceptionMessage = "params == null";
8314 goto exit;
8315 }
8316 if (offset < 0) {
8317 _exception = 1;
8318 _exceptionType = "java/lang/IllegalArgumentException";
8319 _exceptionMessage = "offset < 0";
8320 goto exit;
8321 }
8322 _remaining = _env->GetArrayLength(params_ref) - offset;
8323 params_base = (GLint *)
8324 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8325 params = params_base + offset;
8326
8327 glGetRenderbufferParameterivOES(
8328 (GLint)target,
8329 (GLint)pname,
8330 (GLint *)params
8331 );
8332
8333 exit:
8334 if (params_base) {
8335 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8336 _exception ? JNI_ABORT: 0);
8337 }
8338 if (_exception) {
8339 jniThrowException(_env, _exceptionType, _exceptionMessage);
8340 }
8341 }
8342
8343 /* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
8344 static void
android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)8345 android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
8346 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
8347 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8348 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8349 "glGetRenderbufferParameterivOES");
8350 return;
8351 }
8352 jint _exception = 0;
8353 const char * _exceptionType = NULL;
8354 const char * _exceptionMessage = NULL;
8355 jintArray _array = (jintArray) 0;
8356 jint _bufferOffset = (jint) 0;
8357 jint _remaining;
8358 GLint *params = (GLint *) 0;
8359
8360 if (!params_buf) {
8361 _exception = 1;
8362 _exceptionType = "java/lang/IllegalArgumentException";
8363 _exceptionMessage = "params == null";
8364 goto exit;
8365 }
8366 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8367 if (params == NULL) {
8368 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8369 params = (GLint *) (_paramsBase + _bufferOffset);
8370 }
8371 glGetRenderbufferParameterivOES(
8372 (GLint)target,
8373 (GLint)pname,
8374 (GLint *)params
8375 );
8376
8377 exit:
8378 if (_array) {
8379 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8380 }
8381 if (_exception) {
8382 jniThrowException(_env, _exceptionType, _exceptionMessage);
8383 }
8384 }
8385
8386 /* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8387 static void
android_glGetTexGenfv__II_3FI(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloatArray params_ref,jint offset)8388 android_glGetTexGenfv__II_3FI
8389 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
8390 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8391 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8392 "glGetTexGenfv");
8393 return;
8394 }
8395 jint _exception = 0;
8396 const char * _exceptionType = NULL;
8397 const char * _exceptionMessage = NULL;
8398 GLfloat *params_base = (GLfloat *) 0;
8399 jint _remaining;
8400 GLfloat *params = (GLfloat *) 0;
8401
8402 if (!params_ref) {
8403 _exception = 1;
8404 _exceptionType = "java/lang/IllegalArgumentException";
8405 _exceptionMessage = "params == null";
8406 goto exit;
8407 }
8408 if (offset < 0) {
8409 _exception = 1;
8410 _exceptionType = "java/lang/IllegalArgumentException";
8411 _exceptionMessage = "offset < 0";
8412 goto exit;
8413 }
8414 _remaining = _env->GetArrayLength(params_ref) - offset;
8415 params_base = (GLfloat *)
8416 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
8417 params = params_base + offset;
8418
8419 glGetTexGenfv(
8420 (GLint)coord,
8421 (GLint)pname,
8422 (GLfloat *)params
8423 );
8424
8425 exit:
8426 if (params_base) {
8427 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
8428 _exception ? JNI_ABORT: 0);
8429 }
8430 if (_exception) {
8431 jniThrowException(_env, _exceptionType, _exceptionMessage);
8432 }
8433 }
8434
8435 /* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8436 static void
android_glGetTexGenfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8437 android_glGetTexGenfv__IILjava_nio_FloatBuffer_2
8438 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8439 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8440 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8441 "glGetTexGenfv");
8442 return;
8443 }
8444 jint _exception = 0;
8445 const char * _exceptionType = NULL;
8446 const char * _exceptionMessage = NULL;
8447 jfloatArray _array = (jfloatArray) 0;
8448 jint _bufferOffset = (jint) 0;
8449 jint _remaining;
8450 GLfloat *params = (GLfloat *) 0;
8451
8452 if (!params_buf) {
8453 _exception = 1;
8454 _exceptionType = "java/lang/IllegalArgumentException";
8455 _exceptionMessage = "params == null";
8456 goto exit;
8457 }
8458 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8459 if (params == NULL) {
8460 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
8461 params = (GLfloat *) (_paramsBase + _bufferOffset);
8462 }
8463 glGetTexGenfv(
8464 (GLint)coord,
8465 (GLint)pname,
8466 (GLfloat *)params
8467 );
8468
8469 exit:
8470 if (_array) {
8471 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
8472 }
8473 if (_exception) {
8474 jniThrowException(_env, _exceptionType, _exceptionMessage);
8475 }
8476 }
8477
8478 /* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8479 static void
android_glGetTexGeniv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8480 android_glGetTexGeniv__II_3II
8481 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8482 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8483 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8484 "glGetTexGeniv");
8485 return;
8486 }
8487 jint _exception = 0;
8488 const char * _exceptionType = NULL;
8489 const char * _exceptionMessage = NULL;
8490 GLint *params_base = (GLint *) 0;
8491 jint _remaining;
8492 GLint *params = (GLint *) 0;
8493
8494 if (!params_ref) {
8495 _exception = 1;
8496 _exceptionType = "java/lang/IllegalArgumentException";
8497 _exceptionMessage = "params == null";
8498 goto exit;
8499 }
8500 if (offset < 0) {
8501 _exception = 1;
8502 _exceptionType = "java/lang/IllegalArgumentException";
8503 _exceptionMessage = "offset < 0";
8504 goto exit;
8505 }
8506 _remaining = _env->GetArrayLength(params_ref) - offset;
8507 params_base = (GLint *)
8508 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8509 params = params_base + offset;
8510
8511 glGetTexGeniv(
8512 (GLint)coord,
8513 (GLint)pname,
8514 (GLint *)params
8515 );
8516
8517 exit:
8518 if (params_base) {
8519 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8520 _exception ? JNI_ABORT: 0);
8521 }
8522 if (_exception) {
8523 jniThrowException(_env, _exceptionType, _exceptionMessage);
8524 }
8525 }
8526
8527 /* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8528 static void
android_glGetTexGeniv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8529 android_glGetTexGeniv__IILjava_nio_IntBuffer_2
8530 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8531 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8532 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8533 "glGetTexGeniv");
8534 return;
8535 }
8536 jint _exception = 0;
8537 const char * _exceptionType = NULL;
8538 const char * _exceptionMessage = NULL;
8539 jintArray _array = (jintArray) 0;
8540 jint _bufferOffset = (jint) 0;
8541 jint _remaining;
8542 GLint *params = (GLint *) 0;
8543
8544 if (!params_buf) {
8545 _exception = 1;
8546 _exceptionType = "java/lang/IllegalArgumentException";
8547 _exceptionMessage = "params == null";
8548 goto exit;
8549 }
8550 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8551 if (params == NULL) {
8552 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8553 params = (GLint *) (_paramsBase + _bufferOffset);
8554 }
8555 glGetTexGeniv(
8556 (GLint)coord,
8557 (GLint)pname,
8558 (GLint *)params
8559 );
8560
8561 exit:
8562 if (_array) {
8563 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8564 }
8565 if (_exception) {
8566 jniThrowException(_env, _exceptionType, _exceptionMessage);
8567 }
8568 }
8569
8570 /* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8571 static void
android_glGetTexGenxv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8572 android_glGetTexGenxv__II_3II
8573 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8574 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8575 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8576 "glGetTexGenxv");
8577 return;
8578 }
8579 jint _exception = 0;
8580 const char * _exceptionType = NULL;
8581 const char * _exceptionMessage = NULL;
8582 GLint *params_base = (GLint *) 0;
8583 jint _remaining;
8584 GLint *params = (GLint *) 0;
8585
8586 if (!params_ref) {
8587 _exception = 1;
8588 _exceptionType = "java/lang/IllegalArgumentException";
8589 _exceptionMessage = "params == null";
8590 goto exit;
8591 }
8592 if (offset < 0) {
8593 _exception = 1;
8594 _exceptionType = "java/lang/IllegalArgumentException";
8595 _exceptionMessage = "offset < 0";
8596 goto exit;
8597 }
8598 _remaining = _env->GetArrayLength(params_ref) - offset;
8599 params_base = (GLint *)
8600 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8601 params = params_base + offset;
8602
8603 glGetTexGenxv(
8604 (GLint)coord,
8605 (GLint)pname,
8606 (GLint *)params
8607 );
8608
8609 exit:
8610 if (params_base) {
8611 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8612 _exception ? JNI_ABORT: 0);
8613 }
8614 if (_exception) {
8615 jniThrowException(_env, _exceptionType, _exceptionMessage);
8616 }
8617 }
8618
8619 /* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8620 static void
android_glGetTexGenxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8621 android_glGetTexGenxv__IILjava_nio_IntBuffer_2
8622 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8623 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8624 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8625 "glGetTexGenxv");
8626 return;
8627 }
8628 jint _exception = 0;
8629 const char * _exceptionType = NULL;
8630 const char * _exceptionMessage = NULL;
8631 jintArray _array = (jintArray) 0;
8632 jint _bufferOffset = (jint) 0;
8633 jint _remaining;
8634 GLint *params = (GLint *) 0;
8635
8636 if (!params_buf) {
8637 _exception = 1;
8638 _exceptionType = "java/lang/IllegalArgumentException";
8639 _exceptionMessage = "params == null";
8640 goto exit;
8641 }
8642 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8643 if (params == NULL) {
8644 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8645 params = (GLint *) (_paramsBase + _bufferOffset);
8646 }
8647 glGetTexGenxv(
8648 (GLint)coord,
8649 (GLint)pname,
8650 (GLint *)params
8651 );
8652
8653 exit:
8654 if (_array) {
8655 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8656 }
8657 if (_exception) {
8658 jniThrowException(_env, _exceptionType, _exceptionMessage);
8659 }
8660 }
8661
8662 /* GLboolean glIsFramebufferOES ( GLint framebuffer ) */
8663 static jboolean
android_glIsFramebufferOES__I(JNIEnv * _env,jobject _this,jint framebuffer)8664 android_glIsFramebufferOES__I
8665 (JNIEnv *_env, jobject _this, jint framebuffer) {
8666 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8667 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8668 "glIsFramebufferOES");
8669 return JNI_FALSE;
8670 }
8671 GLboolean _returnValue = JNI_FALSE;
8672 _returnValue = glIsFramebufferOES(
8673 (GLint)framebuffer
8674 );
8675 return (jboolean)_returnValue;
8676 }
8677
8678 /* GLboolean glIsRenderbufferOES ( GLint renderbuffer ) */
8679 static jboolean
android_glIsRenderbufferOES__I(JNIEnv * _env,jobject _this,jint renderbuffer)8680 android_glIsRenderbufferOES__I
8681 (JNIEnv *_env, jobject _this, jint renderbuffer) {
8682 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8683 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8684 "glIsRenderbufferOES");
8685 return JNI_FALSE;
8686 }
8687 GLboolean _returnValue = JNI_FALSE;
8688 _returnValue = glIsRenderbufferOES(
8689 (GLint)renderbuffer
8690 );
8691 return (jboolean)_returnValue;
8692 }
8693
8694 /* void glRenderbufferStorageOES ( GLint target, GLint internalformat, GLint width, GLint height ) */
8695 static void
android_glRenderbufferStorageOES__IIII(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint width,jint height)8696 android_glRenderbufferStorageOES__IIII
8697 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
8698 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8699 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8700 "glRenderbufferStorageOES");
8701 return;
8702 }
8703 glRenderbufferStorageOES(
8704 (GLint)target,
8705 (GLint)internalformat,
8706 (GLint)width,
8707 (GLint)height
8708 );
8709 }
8710
8711 /* void glTexGenf ( GLint coord, GLint pname, GLfloat param ) */
8712 static void
android_glTexGenf__IIF(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloat param)8713 android_glTexGenf__IIF
8714 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
8715 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8716 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8717 "glTexGenf");
8718 return;
8719 }
8720 glTexGenf(
8721 (GLint)coord,
8722 (GLint)pname,
8723 (GLfloat)param
8724 );
8725 }
8726
8727 /* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8728 static void
android_glTexGenfv__II_3FI(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloatArray params_ref,jint offset)8729 android_glTexGenfv__II_3FI
8730 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
8731 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8732 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8733 "glTexGenfv");
8734 return;
8735 }
8736 jint _exception = 0;
8737 const char * _exceptionType = NULL;
8738 const char * _exceptionMessage = NULL;
8739 GLfloat *params_base = (GLfloat *) 0;
8740 jint _remaining;
8741 GLfloat *params = (GLfloat *) 0;
8742
8743 if (!params_ref) {
8744 _exception = 1;
8745 _exceptionType = "java/lang/IllegalArgumentException";
8746 _exceptionMessage = "params == null";
8747 goto exit;
8748 }
8749 if (offset < 0) {
8750 _exception = 1;
8751 _exceptionType = "java/lang/IllegalArgumentException";
8752 _exceptionMessage = "offset < 0";
8753 goto exit;
8754 }
8755 _remaining = _env->GetArrayLength(params_ref) - offset;
8756 params_base = (GLfloat *)
8757 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
8758 params = params_base + offset;
8759
8760 glTexGenfv(
8761 (GLint)coord,
8762 (GLint)pname,
8763 (GLfloat *)params
8764 );
8765
8766 exit:
8767 if (params_base) {
8768 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
8769 _exception ? JNI_ABORT: 0);
8770 }
8771 if (_exception) {
8772 jniThrowException(_env, _exceptionType, _exceptionMessage);
8773 }
8774 }
8775
8776 /* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8777 static void
android_glTexGenfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8778 android_glTexGenfv__IILjava_nio_FloatBuffer_2
8779 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8780 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8781 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8782 "glTexGenfv");
8783 return;
8784 }
8785 jint _exception = 0;
8786 const char * _exceptionType = NULL;
8787 const char * _exceptionMessage = NULL;
8788 jfloatArray _array = (jfloatArray) 0;
8789 jint _bufferOffset = (jint) 0;
8790 jint _remaining;
8791 GLfloat *params = (GLfloat *) 0;
8792
8793 if (!params_buf) {
8794 _exception = 1;
8795 _exceptionType = "java/lang/IllegalArgumentException";
8796 _exceptionMessage = "params == null";
8797 goto exit;
8798 }
8799 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8800 if (params == NULL) {
8801 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
8802 params = (GLfloat *) (_paramsBase + _bufferOffset);
8803 }
8804 glTexGenfv(
8805 (GLint)coord,
8806 (GLint)pname,
8807 (GLfloat *)params
8808 );
8809
8810 exit:
8811 if (_array) {
8812 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
8813 }
8814 if (_exception) {
8815 jniThrowException(_env, _exceptionType, _exceptionMessage);
8816 }
8817 }
8818
8819 /* void glTexGeni ( GLint coord, GLint pname, GLint param ) */
8820 static void
android_glTexGeni__III(JNIEnv * _env,jobject _this,jint coord,jint pname,jint param)8821 android_glTexGeni__III
8822 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
8823 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8824 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8825 "glTexGeni");
8826 return;
8827 }
8828 glTexGeni(
8829 (GLint)coord,
8830 (GLint)pname,
8831 (GLint)param
8832 );
8833 }
8834
8835 /* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8836 static void
android_glTexGeniv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8837 android_glTexGeniv__II_3II
8838 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8839 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8840 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8841 "glTexGeniv");
8842 return;
8843 }
8844 jint _exception = 0;
8845 const char * _exceptionType = NULL;
8846 const char * _exceptionMessage = NULL;
8847 GLint *params_base = (GLint *) 0;
8848 jint _remaining;
8849 GLint *params = (GLint *) 0;
8850
8851 if (!params_ref) {
8852 _exception = 1;
8853 _exceptionType = "java/lang/IllegalArgumentException";
8854 _exceptionMessage = "params == null";
8855 goto exit;
8856 }
8857 if (offset < 0) {
8858 _exception = 1;
8859 _exceptionType = "java/lang/IllegalArgumentException";
8860 _exceptionMessage = "offset < 0";
8861 goto exit;
8862 }
8863 _remaining = _env->GetArrayLength(params_ref) - offset;
8864 params_base = (GLint *)
8865 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8866 params = params_base + offset;
8867
8868 glTexGeniv(
8869 (GLint)coord,
8870 (GLint)pname,
8871 (GLint *)params
8872 );
8873
8874 exit:
8875 if (params_base) {
8876 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8877 _exception ? JNI_ABORT: 0);
8878 }
8879 if (_exception) {
8880 jniThrowException(_env, _exceptionType, _exceptionMessage);
8881 }
8882 }
8883
8884 /* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8885 static void
android_glTexGeniv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8886 android_glTexGeniv__IILjava_nio_IntBuffer_2
8887 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8888 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8889 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8890 "glTexGeniv");
8891 return;
8892 }
8893 jint _exception = 0;
8894 const char * _exceptionType = NULL;
8895 const char * _exceptionMessage = NULL;
8896 jintArray _array = (jintArray) 0;
8897 jint _bufferOffset = (jint) 0;
8898 jint _remaining;
8899 GLint *params = (GLint *) 0;
8900
8901 if (!params_buf) {
8902 _exception = 1;
8903 _exceptionType = "java/lang/IllegalArgumentException";
8904 _exceptionMessage = "params == null";
8905 goto exit;
8906 }
8907 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8908 if (params == NULL) {
8909 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8910 params = (GLint *) (_paramsBase + _bufferOffset);
8911 }
8912 glTexGeniv(
8913 (GLint)coord,
8914 (GLint)pname,
8915 (GLint *)params
8916 );
8917
8918 exit:
8919 if (_array) {
8920 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8921 }
8922 if (_exception) {
8923 jniThrowException(_env, _exceptionType, _exceptionMessage);
8924 }
8925 }
8926
8927 /* void glTexGenx ( GLint coord, GLint pname, GLint param ) */
8928 static void
android_glTexGenx__III(JNIEnv * _env,jobject _this,jint coord,jint pname,jint param)8929 android_glTexGenx__III
8930 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
8931 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8932 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8933 "glTexGenx");
8934 return;
8935 }
8936 glTexGenx(
8937 (GLint)coord,
8938 (GLint)pname,
8939 (GLint)param
8940 );
8941 }
8942
8943 /* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8944 static void
android_glTexGenxv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8945 android_glTexGenxv__II_3II
8946 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8947 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8948 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8949 "glTexGenxv");
8950 return;
8951 }
8952 jint _exception = 0;
8953 const char * _exceptionType = NULL;
8954 const char * _exceptionMessage = NULL;
8955 GLint *params_base = (GLint *) 0;
8956 jint _remaining;
8957 GLint *params = (GLint *) 0;
8958
8959 if (!params_ref) {
8960 _exception = 1;
8961 _exceptionType = "java/lang/IllegalArgumentException";
8962 _exceptionMessage = "params == null";
8963 goto exit;
8964 }
8965 if (offset < 0) {
8966 _exception = 1;
8967 _exceptionType = "java/lang/IllegalArgumentException";
8968 _exceptionMessage = "offset < 0";
8969 goto exit;
8970 }
8971 _remaining = _env->GetArrayLength(params_ref) - offset;
8972 params_base = (GLint *)
8973 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8974 params = params_base + offset;
8975
8976 glTexGenxv(
8977 (GLint)coord,
8978 (GLint)pname,
8979 (GLint *)params
8980 );
8981
8982 exit:
8983 if (params_base) {
8984 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8985 _exception ? JNI_ABORT: 0);
8986 }
8987 if (_exception) {
8988 jniThrowException(_env, _exceptionType, _exceptionMessage);
8989 }
8990 }
8991
8992 /* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8993 static void
android_glTexGenxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8994 android_glTexGenxv__IILjava_nio_IntBuffer_2
8995 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8996 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8997 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8998 "glTexGenxv");
8999 return;
9000 }
9001 jint _exception = 0;
9002 const char * _exceptionType = NULL;
9003 const char * _exceptionMessage = NULL;
9004 jintArray _array = (jintArray) 0;
9005 jint _bufferOffset = (jint) 0;
9006 jint _remaining;
9007 GLint *params = (GLint *) 0;
9008
9009 if (!params_buf) {
9010 _exception = 1;
9011 _exceptionType = "java/lang/IllegalArgumentException";
9012 _exceptionMessage = "params == null";
9013 goto exit;
9014 }
9015 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
9016 if (params == NULL) {
9017 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
9018 params = (GLint *) (_paramsBase + _bufferOffset);
9019 }
9020 glTexGenxv(
9021 (GLint)coord,
9022 (GLint)pname,
9023 (GLint *)params
9024 );
9025
9026 exit:
9027 if (_array) {
9028 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
9029 }
9030 if (_exception) {
9031 jniThrowException(_env, _exceptionType, _exceptionMessage);
9032 }
9033 }
9034
9035 static const char *classPathName = "com/google/android/gles_jni/GLImpl";
9036
9037 static const JNINativeMethod methods[] = {
9038 {"_nativeClassInit", "()V", (void*)nativeClassInit },
9039 {"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I },
9040 {"glAlphaFunc", "(IF)V", (void *) android_glAlphaFunc__IF },
9041 {"glAlphaFuncx", "(II)V", (void *) android_glAlphaFuncx__II },
9042 {"glBindTexture", "(II)V", (void *) android_glBindTexture__II },
9043 {"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II },
9044 {"glClear", "(I)V", (void *) android_glClear__I },
9045 {"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF },
9046 {"glClearColorx", "(IIII)V", (void *) android_glClearColorx__IIII },
9047 {"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F },
9048 {"glClearDepthx", "(I)V", (void *) android_glClearDepthx__I },
9049 {"glClearStencil", "(I)V", (void *) android_glClearStencil__I },
9050 {"glClientActiveTexture", "(I)V", (void *) android_glClientActiveTexture__I },
9051 {"glColor4f", "(FFFF)V", (void *) android_glColor4f__FFFF },
9052 {"glColor4x", "(IIII)V", (void *) android_glColor4x__IIII },
9053 {"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ },
9054 {"glColorPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glColorPointerBounds__IIILjava_nio_Buffer_2I },
9055 {"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 },
9056 {"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
9057 {"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII },
9058 {"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII },
9059 {"glCullFace", "(I)V", (void *) android_glCullFace__I },
9060 {"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II },
9061 {"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 },
9062 {"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I },
9063 {"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z },
9064 {"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF },
9065 {"glDepthRangex", "(II)V", (void *) android_glDepthRangex__II },
9066 {"glDisable", "(I)V", (void *) android_glDisable__I },
9067 {"glDisableClientState", "(I)V", (void *) android_glDisableClientState__I },
9068 {"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
9069 {"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
9070 {"glEnable", "(I)V", (void *) android_glEnable__I },
9071 {"glEnableClientState", "(I)V", (void *) android_glEnableClientState__I },
9072 {"glFinish", "()V", (void *) android_glFinish__ },
9073 {"glFlush", "()V", (void *) android_glFlush__ },
9074 {"glFogf", "(IF)V", (void *) android_glFogf__IF },
9075 {"glFogfv", "(I[FI)V", (void *) android_glFogfv__I_3FI },
9076 {"glFogfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glFogfv__ILjava_nio_FloatBuffer_2 },
9077 {"glFogx", "(II)V", (void *) android_glFogx__II },
9078 {"glFogxv", "(I[II)V", (void *) android_glFogxv__I_3II },
9079 {"glFogxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxv__ILjava_nio_IntBuffer_2 },
9080 {"glFrontFace", "(I)V", (void *) android_glFrontFace__I },
9081 {"glFrustumf", "(FFFFFF)V", (void *) android_glFrustumf__FFFFFF },
9082 {"glFrustumx", "(IIIIII)V", (void *) android_glFrustumx__IIIIII },
9083 {"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II },
9084 {"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 },
9085 {"glGetError", "()I", (void *) android_glGetError__ },
9086 {"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II },
9087 {"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 },
9088 {"_glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
9089 {"glHint", "(II)V", (void *) android_glHint__II },
9090 {"glLightModelf", "(IF)V", (void *) android_glLightModelf__IF },
9091 {"glLightModelfv", "(I[FI)V", (void *) android_glLightModelfv__I_3FI },
9092 {"glLightModelfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glLightModelfv__ILjava_nio_FloatBuffer_2 },
9093 {"glLightModelx", "(II)V", (void *) android_glLightModelx__II },
9094 {"glLightModelxv", "(I[II)V", (void *) android_glLightModelxv__I_3II },
9095 {"glLightModelxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxv__ILjava_nio_IntBuffer_2 },
9096 {"glLightf", "(IIF)V", (void *) android_glLightf__IIF },
9097 {"glLightfv", "(II[FI)V", (void *) android_glLightfv__II_3FI },
9098 {"glLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glLightfv__IILjava_nio_FloatBuffer_2 },
9099 {"glLightx", "(III)V", (void *) android_glLightx__III },
9100 {"glLightxv", "(II[II)V", (void *) android_glLightxv__II_3II },
9101 {"glLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxv__IILjava_nio_IntBuffer_2 },
9102 {"glLineWidth", "(F)V", (void *) android_glLineWidth__F },
9103 {"glLineWidthx", "(I)V", (void *) android_glLineWidthx__I },
9104 {"glLoadIdentity", "()V", (void *) android_glLoadIdentity__ },
9105 {"glLoadMatrixf", "([FI)V", (void *) android_glLoadMatrixf___3FI },
9106 {"glLoadMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 },
9107 {"glLoadMatrixx", "([II)V", (void *) android_glLoadMatrixx___3II },
9108 {"glLoadMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixx__Ljava_nio_IntBuffer_2 },
9109 {"glLogicOp", "(I)V", (void *) android_glLogicOp__I },
9110 {"glMaterialf", "(IIF)V", (void *) android_glMaterialf__IIF },
9111 {"glMaterialfv", "(II[FI)V", (void *) android_glMaterialfv__II_3FI },
9112 {"glMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glMaterialfv__IILjava_nio_FloatBuffer_2 },
9113 {"glMaterialx", "(III)V", (void *) android_glMaterialx__III },
9114 {"glMaterialxv", "(II[II)V", (void *) android_glMaterialxv__II_3II },
9115 {"glMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxv__IILjava_nio_IntBuffer_2 },
9116 {"glMatrixMode", "(I)V", (void *) android_glMatrixMode__I },
9117 {"glMultMatrixf", "([FI)V", (void *) android_glMultMatrixf___3FI },
9118 {"glMultMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glMultMatrixf__Ljava_nio_FloatBuffer_2 },
9119 {"glMultMatrixx", "([II)V", (void *) android_glMultMatrixx___3II },
9120 {"glMultMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixx__Ljava_nio_IntBuffer_2 },
9121 {"glMultiTexCoord4f", "(IFFFF)V", (void *) android_glMultiTexCoord4f__IFFFF },
9122 {"glMultiTexCoord4x", "(IIIII)V", (void *) android_glMultiTexCoord4x__IIIII },
9123 {"glNormal3f", "(FFF)V", (void *) android_glNormal3f__FFF },
9124 {"glNormal3x", "(III)V", (void *) android_glNormal3x__III },
9125 {"glNormalPointerBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glNormalPointerBounds__IILjava_nio_Buffer_2I },
9126 {"glOrthof", "(FFFFFF)V", (void *) android_glOrthof__FFFFFF },
9127 {"glOrthox", "(IIIIII)V", (void *) android_glOrthox__IIIIII },
9128 {"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II },
9129 {"glPointSize", "(F)V", (void *) android_glPointSize__F },
9130 {"glPointSizex", "(I)V", (void *) android_glPointSizex__I },
9131 {"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF },
9132 {"glPolygonOffsetx", "(II)V", (void *) android_glPolygonOffsetx__II },
9133 {"glPopMatrix", "()V", (void *) android_glPopMatrix__ },
9134 {"glPushMatrix", "()V", (void *) android_glPushMatrix__ },
9135 {"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 },
9136 {"glRotatef", "(FFFF)V", (void *) android_glRotatef__FFFF },
9137 {"glRotatex", "(IIII)V", (void *) android_glRotatex__IIII },
9138 {"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ },
9139 {"glSampleCoveragex", "(IZ)V", (void *) android_glSampleCoveragex__IZ },
9140 {"glScalef", "(FFF)V", (void *) android_glScalef__FFF },
9141 {"glScalex", "(III)V", (void *) android_glScalex__III },
9142 {"glScissor", "(IIII)V", (void *) android_glScissor__IIII },
9143 {"glShadeModel", "(I)V", (void *) android_glShadeModel__I },
9144 {"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III },
9145 {"glStencilMask", "(I)V", (void *) android_glStencilMask__I },
9146 {"glStencilOp", "(III)V", (void *) android_glStencilOp__III },
9147 {"glTexCoordPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I },
9148 {"glTexEnvf", "(IIF)V", (void *) android_glTexEnvf__IIF },
9149 {"glTexEnvfv", "(II[FI)V", (void *) android_glTexEnvfv__II_3FI },
9150 {"glTexEnvfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexEnvfv__IILjava_nio_FloatBuffer_2 },
9151 {"glTexEnvx", "(III)V", (void *) android_glTexEnvx__III },
9152 {"glTexEnvxv", "(II[II)V", (void *) android_glTexEnvxv__II_3II },
9153 {"glTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxv__IILjava_nio_IntBuffer_2 },
9154 {"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 },
9155 {"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF },
9156 {"glTexParameterx", "(III)V", (void *) android_glTexParameterx__III },
9157 {"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
9158 {"glTranslatef", "(FFF)V", (void *) android_glTranslatef__FFF },
9159 {"glTranslatex", "(III)V", (void *) android_glTranslatex__III },
9160 {"glVertexPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glVertexPointerBounds__IIILjava_nio_Buffer_2I },
9161 {"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
9162 {"glQueryMatrixxOES", "([II[II)I", (void *) android_glQueryMatrixxOES___3II_3II },
9163 {"glQueryMatrixxOES", "(Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)I", (void *) android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
9164 {"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II },
9165 {"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I },
9166 {"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 },
9167 {"glClipPlanef", "(I[FI)V", (void *) android_glClipPlanef__I_3FI },
9168 {"glClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanef__ILjava_nio_FloatBuffer_2 },
9169 {"glClipPlanex", "(I[II)V", (void *) android_glClipPlanex__I_3II },
9170 {"glClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanex__ILjava_nio_IntBuffer_2 },
9171 {"glColor4ub", "(BBBB)V", (void *) android_glColor4ub__BBBB },
9172 {"glColorPointer", "(IIII)V", (void *) android_glColorPointer__IIII },
9173 {"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II },
9174 {"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 },
9175 {"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
9176 {"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II },
9177 {"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 },
9178 {"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI },
9179 {"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 },
9180 {"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II },
9181 {"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 },
9182 {"glGetClipPlanef", "(I[FI)V", (void *) android_glGetClipPlanef__I_3FI },
9183 {"glGetClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 },
9184 {"glGetClipPlanex", "(I[II)V", (void *) android_glGetClipPlanex__I_3II },
9185 {"glGetClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanex__ILjava_nio_IntBuffer_2 },
9186 {"glGetFixedv", "(I[II)V", (void *) android_glGetFixedv__I_3II },
9187 {"glGetFixedv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedv__ILjava_nio_IntBuffer_2 },
9188 {"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI },
9189 {"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 },
9190 {"glGetLightfv", "(II[FI)V", (void *) android_glGetLightfv__II_3FI },
9191 {"glGetLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetLightfv__IILjava_nio_FloatBuffer_2 },
9192 {"glGetLightxv", "(II[II)V", (void *) android_glGetLightxv__II_3II },
9193 {"glGetLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxv__IILjava_nio_IntBuffer_2 },
9194 {"glGetMaterialfv", "(II[FI)V", (void *) android_glGetMaterialfv__II_3FI },
9195 {"glGetMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 },
9196 {"glGetMaterialxv", "(II[II)V", (void *) android_glGetMaterialxv__II_3II },
9197 {"glGetMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxv__IILjava_nio_IntBuffer_2 },
9198 {"glGetTexEnviv", "(II[II)V", (void *) android_glGetTexEnviv__II_3II },
9199 {"glGetTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnviv__IILjava_nio_IntBuffer_2 },
9200 {"glGetTexEnvxv", "(II[II)V", (void *) android_glGetTexEnvxv__II_3II },
9201 {"glGetTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 },
9202 {"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI },
9203 {"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 },
9204 {"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II },
9205 {"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 },
9206 {"glGetTexParameterxv", "(II[II)V", (void *) android_glGetTexParameterxv__II_3II },
9207 {"glGetTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 },
9208 {"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I },
9209 {"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I },
9210 {"glIsTexture", "(I)Z", (void *) android_glIsTexture__I },
9211 {"glNormalPointer", "(III)V", (void *) android_glNormalPointer__III },
9212 {"glPointParameterf", "(IF)V", (void *) android_glPointParameterf__IF },
9213 {"glPointParameterfv", "(I[FI)V", (void *) android_glPointParameterfv__I_3FI },
9214 {"glPointParameterfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glPointParameterfv__ILjava_nio_FloatBuffer_2 },
9215 {"glPointParameterx", "(II)V", (void *) android_glPointParameterx__II },
9216 {"glPointParameterxv", "(I[II)V", (void *) android_glPointParameterxv__I_3II },
9217 {"glPointParameterxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxv__ILjava_nio_IntBuffer_2 },
9218 {"glPointSizePointerOESBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I },
9219 {"glTexCoordPointer", "(IIII)V", (void *) android_glTexCoordPointer__IIII },
9220 {"glTexEnvi", "(III)V", (void *) android_glTexEnvi__III },
9221 {"glTexEnviv", "(II[II)V", (void *) android_glTexEnviv__II_3II },
9222 {"glTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnviv__IILjava_nio_IntBuffer_2 },
9223 {"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI },
9224 {"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 },
9225 {"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III },
9226 {"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II },
9227 {"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 },
9228 {"glTexParameterxv", "(II[II)V", (void *) android_glTexParameterxv__II_3II },
9229 {"glTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxv__IILjava_nio_IntBuffer_2 },
9230 {"glVertexPointer", "(IIII)V", (void *) android_glVertexPointer__IIII },
9231 {"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
9232 {"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
9233 {"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
9234 {"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
9235 {"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
9236 {"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
9237 {"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
9238 {"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
9239 {"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
9240 {"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
9241 {"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
9242 {"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
9243 {"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
9244 {"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
9245 {"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
9246 {"glMatrixIndexPointerOES", "(IIII)V", (void *) android_glMatrixIndexPointerOES__IIII },
9247 {"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
9248 {"glWeightPointerOES", "(IIII)V", (void *) android_glWeightPointerOES__IIII },
9249 {"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
9250 {"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
9251 {"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I },
9252 {"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II },
9253 {"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII },
9254 {"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
9255 {"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
9256 {"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
9257 {"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
9258 {"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
9259 {"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
9260 {"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
9261 {"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
9262 {"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
9263 {"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
9264 {"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
9265 {"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
9266 {"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
9267 {"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
9268 {"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
9269 {"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
9270 {"glGetTexGenfv", "(II[FI)V", (void *) android_glGetTexGenfv__II_3FI },
9271 {"glGetTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 },
9272 {"glGetTexGeniv", "(II[II)V", (void *) android_glGetTexGeniv__II_3II },
9273 {"glGetTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGeniv__IILjava_nio_IntBuffer_2 },
9274 {"glGetTexGenxv", "(II[II)V", (void *) android_glGetTexGenxv__II_3II },
9275 {"glGetTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxv__IILjava_nio_IntBuffer_2 },
9276 {"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
9277 {"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
9278 {"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
9279 {"glTexGenf", "(IIF)V", (void *) android_glTexGenf__IIF },
9280 {"glTexGenfv", "(II[FI)V", (void *) android_glTexGenfv__II_3FI },
9281 {"glTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfv__IILjava_nio_FloatBuffer_2 },
9282 {"glTexGeni", "(III)V", (void *) android_glTexGeni__III },
9283 {"glTexGeniv", "(II[II)V", (void *) android_glTexGeniv__II_3II },
9284 {"glTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGeniv__IILjava_nio_IntBuffer_2 },
9285 {"glTexGenx", "(III)V", (void *) android_glTexGenx__III },
9286 {"glTexGenxv", "(II[II)V", (void *) android_glTexGenxv__II_3II },
9287 {"glTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxv__IILjava_nio_IntBuffer_2 },
9288 };
9289
register_com_google_android_gles_jni_GLImpl(JNIEnv * _env)9290 int register_com_google_android_gles_jni_GLImpl(JNIEnv *_env)
9291 {
9292 int err;
9293 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
9294 return err;
9295 }
9296