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, (void *)((char *)data - _bufferOffset), 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, (void *)((char *)data - _bufferOffset), 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, (void *)((char *)indices - _bufferOffset), 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, (void *)((char *)pixels - _bufferOffset),
3492 _exception ? JNI_FALSE : JNI_TRUE);
3493 }
3494 if (_exception) {
3495 jniThrowException(_env, _exceptionType, _exceptionMessage);
3496 }
3497 }
3498
3499 /* void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) */
3500 static void
android_glRotatef__FFFF(JNIEnv * _env,jobject _this,jfloat angle,jfloat x,jfloat y,jfloat z)3501 android_glRotatef__FFFF
3502 (JNIEnv *_env, jobject _this, jfloat angle, jfloat x, jfloat y, jfloat z) {
3503 glRotatef(
3504 (GLfloat)angle,
3505 (GLfloat)x,
3506 (GLfloat)y,
3507 (GLfloat)z
3508 );
3509 }
3510
3511 /* void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */
3512 static void
android_glRotatex__IIII(JNIEnv * _env,jobject _this,jint angle,jint x,jint y,jint z)3513 android_glRotatex__IIII
3514 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) {
3515 glRotatex(
3516 (GLfixed)angle,
3517 (GLfixed)x,
3518 (GLfixed)y,
3519 (GLfixed)z
3520 );
3521 }
3522
3523 /* void glSampleCoverage ( GLclampf value, GLboolean invert ) */
3524 static void
android_glSampleCoverage__FZ(JNIEnv * _env,jobject _this,jfloat value,jboolean invert)3525 android_glSampleCoverage__FZ
3526 (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) {
3527 glSampleCoverage(
3528 (GLclampf)value,
3529 (GLboolean)invert
3530 );
3531 }
3532
3533 /* void glSampleCoveragex ( GLclampx value, GLboolean invert ) */
3534 static void
android_glSampleCoveragex__IZ(JNIEnv * _env,jobject _this,jint value,jboolean invert)3535 android_glSampleCoveragex__IZ
3536 (JNIEnv *_env, jobject _this, jint value, jboolean invert) {
3537 glSampleCoveragex(
3538 (GLclampx)value,
3539 (GLboolean)invert
3540 );
3541 }
3542
3543 /* void glScalef ( GLfloat x, GLfloat y, GLfloat z ) */
3544 static void
android_glScalef__FFF(JNIEnv * _env,jobject _this,jfloat x,jfloat y,jfloat z)3545 android_glScalef__FFF
3546 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
3547 glScalef(
3548 (GLfloat)x,
3549 (GLfloat)y,
3550 (GLfloat)z
3551 );
3552 }
3553
3554 /* void glScalex ( GLfixed x, GLfixed y, GLfixed z ) */
3555 static void
android_glScalex__III(JNIEnv * _env,jobject _this,jint x,jint y,jint z)3556 android_glScalex__III
3557 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
3558 glScalex(
3559 (GLfixed)x,
3560 (GLfixed)y,
3561 (GLfixed)z
3562 );
3563 }
3564
3565 /* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */
3566 static void
android_glScissor__IIII(JNIEnv * _env,jobject _this,jint x,jint y,jint width,jint height)3567 android_glScissor__IIII
3568 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
3569 glScissor(
3570 (GLint)x,
3571 (GLint)y,
3572 (GLsizei)width,
3573 (GLsizei)height
3574 );
3575 }
3576
3577 /* void glShadeModel ( GLenum mode ) */
3578 static void
android_glShadeModel__I(JNIEnv * _env,jobject _this,jint mode)3579 android_glShadeModel__I
3580 (JNIEnv *_env, jobject _this, jint mode) {
3581 glShadeModel(
3582 (GLenum)mode
3583 );
3584 }
3585
3586 /* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */
3587 static void
android_glStencilFunc__III(JNIEnv * _env,jobject _this,jint func,jint ref,jint mask)3588 android_glStencilFunc__III
3589 (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) {
3590 glStencilFunc(
3591 (GLenum)func,
3592 (GLint)ref,
3593 (GLuint)mask
3594 );
3595 }
3596
3597 /* void glStencilMask ( GLuint mask ) */
3598 static void
android_glStencilMask__I(JNIEnv * _env,jobject _this,jint mask)3599 android_glStencilMask__I
3600 (JNIEnv *_env, jobject _this, jint mask) {
3601 glStencilMask(
3602 (GLuint)mask
3603 );
3604 }
3605
3606 /* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */
3607 static void
android_glStencilOp__III(JNIEnv * _env,jobject _this,jint fail,jint zfail,jint zpass)3608 android_glStencilOp__III
3609 (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) {
3610 glStencilOp(
3611 (GLenum)fail,
3612 (GLenum)zfail,
3613 (GLenum)zpass
3614 );
3615 }
3616
3617 /* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
3618 static void
android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)3619 android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
3620 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
3621 jint _exception = 0;
3622 const char * _exceptionType = NULL;
3623 const char * _exceptionMessage = NULL;
3624 jarray _array = (jarray) 0;
3625 jint _bufferOffset = (jint) 0;
3626 jint _remaining;
3627 GLvoid *pointer = (GLvoid *) 0;
3628
3629 if (pointer_buf) {
3630 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
3631 if ( ! pointer ) {
3632 return;
3633 }
3634 }
3635 glTexCoordPointerBounds(
3636 (GLint)size,
3637 (GLenum)type,
3638 (GLsizei)stride,
3639 (GLvoid *)pointer,
3640 (GLsizei)remaining
3641 );
3642 if (_exception) {
3643 jniThrowException(_env, _exceptionType, _exceptionMessage);
3644 }
3645 }
3646
3647 /* void glTexEnvf ( GLenum target, GLenum pname, GLfloat param ) */
3648 static void
android_glTexEnvf__IIF(JNIEnv * _env,jobject _this,jint target,jint pname,jfloat param)3649 android_glTexEnvf__IIF
3650 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3651 glTexEnvf(
3652 (GLenum)target,
3653 (GLenum)pname,
3654 (GLfloat)param
3655 );
3656 }
3657
3658 /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3659 static void
android_glTexEnvfv__II_3FI(JNIEnv * _env,jobject _this,jint target,jint pname,jfloatArray params_ref,jint offset)3660 android_glTexEnvfv__II_3FI
3661 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
3662 jint _exception = 0;
3663 const char * _exceptionType = NULL;
3664 const char * _exceptionMessage = NULL;
3665 GLfloat *params_base = (GLfloat *) 0;
3666 jint _remaining;
3667 GLfloat *params = (GLfloat *) 0;
3668
3669 if (!params_ref) {
3670 _exception = 1;
3671 _exceptionType = "java/lang/IllegalArgumentException";
3672 _exceptionMessage = "params == null";
3673 goto exit;
3674 }
3675 if (offset < 0) {
3676 _exception = 1;
3677 _exceptionType = "java/lang/IllegalArgumentException";
3678 _exceptionMessage = "offset < 0";
3679 goto exit;
3680 }
3681 _remaining = _env->GetArrayLength(params_ref) - offset;
3682 int _needed;
3683 switch (pname) {
3684 #if defined(GL_TEXTURE_ENV_MODE)
3685 case GL_TEXTURE_ENV_MODE:
3686 #endif // defined(GL_TEXTURE_ENV_MODE)
3687 #if defined(GL_COMBINE_RGB)
3688 case GL_COMBINE_RGB:
3689 #endif // defined(GL_COMBINE_RGB)
3690 #if defined(GL_COMBINE_ALPHA)
3691 case GL_COMBINE_ALPHA:
3692 #endif // defined(GL_COMBINE_ALPHA)
3693 _needed = 1;
3694 break;
3695 #if defined(GL_TEXTURE_ENV_COLOR)
3696 case GL_TEXTURE_ENV_COLOR:
3697 #endif // defined(GL_TEXTURE_ENV_COLOR)
3698 _needed = 4;
3699 break;
3700 default:
3701 _needed = 1;
3702 break;
3703 }
3704 if (_remaining < _needed) {
3705 _exception = 1;
3706 _exceptionType = "java/lang/IllegalArgumentException";
3707 _exceptionMessage = "length - offset < needed";
3708 goto exit;
3709 }
3710 params_base = (GLfloat *)
3711 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3712 params = params_base + offset;
3713
3714 glTexEnvfv(
3715 (GLenum)target,
3716 (GLenum)pname,
3717 (GLfloat *)params
3718 );
3719
3720 exit:
3721 if (params_base) {
3722 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3723 JNI_ABORT);
3724 }
3725 if (_exception) {
3726 jniThrowException(_env, _exceptionType, _exceptionMessage);
3727 }
3728 }
3729
3730 /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3731 static void
android_glTexEnvfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)3732 android_glTexEnvfv__IILjava_nio_FloatBuffer_2
3733 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3734 jint _exception = 0;
3735 const char * _exceptionType = NULL;
3736 const char * _exceptionMessage = NULL;
3737 jfloatArray _array = (jfloatArray) 0;
3738 jint _bufferOffset = (jint) 0;
3739 jint _remaining;
3740 GLfloat *params = (GLfloat *) 0;
3741
3742 if (!params_buf) {
3743 _exception = 1;
3744 _exceptionType = "java/lang/IllegalArgumentException";
3745 _exceptionMessage = "params == null";
3746 goto exit;
3747 }
3748 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3749 int _needed;
3750 switch (pname) {
3751 #if defined(GL_TEXTURE_ENV_MODE)
3752 case GL_TEXTURE_ENV_MODE:
3753 #endif // defined(GL_TEXTURE_ENV_MODE)
3754 #if defined(GL_COMBINE_RGB)
3755 case GL_COMBINE_RGB:
3756 #endif // defined(GL_COMBINE_RGB)
3757 #if defined(GL_COMBINE_ALPHA)
3758 case GL_COMBINE_ALPHA:
3759 #endif // defined(GL_COMBINE_ALPHA)
3760 _needed = 1;
3761 break;
3762 #if defined(GL_TEXTURE_ENV_COLOR)
3763 case GL_TEXTURE_ENV_COLOR:
3764 #endif // defined(GL_TEXTURE_ENV_COLOR)
3765 _needed = 4;
3766 break;
3767 default:
3768 _needed = 1;
3769 break;
3770 }
3771 if (_remaining < _needed) {
3772 _exception = 1;
3773 _exceptionType = "java/lang/IllegalArgumentException";
3774 _exceptionMessage = "remaining() < needed";
3775 goto exit;
3776 }
3777 if (params == NULL) {
3778 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3779 params = (GLfloat *) (_paramsBase + _bufferOffset);
3780 }
3781 glTexEnvfv(
3782 (GLenum)target,
3783 (GLenum)pname,
3784 (GLfloat *)params
3785 );
3786
3787 exit:
3788 if (_array) {
3789 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
3790 }
3791 if (_exception) {
3792 jniThrowException(_env, _exceptionType, _exceptionMessage);
3793 }
3794 }
3795
3796 /* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */
3797 static void
android_glTexEnvx__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)3798 android_glTexEnvx__III
3799 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3800 glTexEnvx(
3801 (GLenum)target,
3802 (GLenum)pname,
3803 (GLfixed)param
3804 );
3805 }
3806
3807 /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3808 static void
android_glTexEnvxv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)3809 android_glTexEnvxv__II_3II
3810 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3811 jint _exception = 0;
3812 const char * _exceptionType = NULL;
3813 const char * _exceptionMessage = NULL;
3814 GLfixed *params_base = (GLfixed *) 0;
3815 jint _remaining;
3816 GLfixed *params = (GLfixed *) 0;
3817
3818 if (!params_ref) {
3819 _exception = 1;
3820 _exceptionType = "java/lang/IllegalArgumentException";
3821 _exceptionMessage = "params == null";
3822 goto exit;
3823 }
3824 if (offset < 0) {
3825 _exception = 1;
3826 _exceptionType = "java/lang/IllegalArgumentException";
3827 _exceptionMessage = "offset < 0";
3828 goto exit;
3829 }
3830 _remaining = _env->GetArrayLength(params_ref) - offset;
3831 int _needed;
3832 switch (pname) {
3833 #if defined(GL_TEXTURE_ENV_MODE)
3834 case GL_TEXTURE_ENV_MODE:
3835 #endif // defined(GL_TEXTURE_ENV_MODE)
3836 #if defined(GL_COMBINE_RGB)
3837 case GL_COMBINE_RGB:
3838 #endif // defined(GL_COMBINE_RGB)
3839 #if defined(GL_COMBINE_ALPHA)
3840 case GL_COMBINE_ALPHA:
3841 #endif // defined(GL_COMBINE_ALPHA)
3842 _needed = 1;
3843 break;
3844 #if defined(GL_TEXTURE_ENV_COLOR)
3845 case GL_TEXTURE_ENV_COLOR:
3846 #endif // defined(GL_TEXTURE_ENV_COLOR)
3847 _needed = 4;
3848 break;
3849 default:
3850 _needed = 1;
3851 break;
3852 }
3853 if (_remaining < _needed) {
3854 _exception = 1;
3855 _exceptionType = "java/lang/IllegalArgumentException";
3856 _exceptionMessage = "length - offset < needed";
3857 goto exit;
3858 }
3859 params_base = (GLfixed *)
3860 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3861 params = params_base + offset;
3862
3863 glTexEnvxv(
3864 (GLenum)target,
3865 (GLenum)pname,
3866 (GLfixed *)params
3867 );
3868
3869 exit:
3870 if (params_base) {
3871 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3872 JNI_ABORT);
3873 }
3874 if (_exception) {
3875 jniThrowException(_env, _exceptionType, _exceptionMessage);
3876 }
3877 }
3878
3879 /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
3880 static void
android_glTexEnvxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)3881 android_glTexEnvxv__IILjava_nio_IntBuffer_2
3882 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3883 jint _exception = 0;
3884 const char * _exceptionType = NULL;
3885 const char * _exceptionMessage = NULL;
3886 jintArray _array = (jintArray) 0;
3887 jint _bufferOffset = (jint) 0;
3888 jint _remaining;
3889 GLfixed *params = (GLfixed *) 0;
3890
3891 if (!params_buf) {
3892 _exception = 1;
3893 _exceptionType = "java/lang/IllegalArgumentException";
3894 _exceptionMessage = "params == null";
3895 goto exit;
3896 }
3897 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3898 int _needed;
3899 switch (pname) {
3900 #if defined(GL_TEXTURE_ENV_MODE)
3901 case GL_TEXTURE_ENV_MODE:
3902 #endif // defined(GL_TEXTURE_ENV_MODE)
3903 #if defined(GL_COMBINE_RGB)
3904 case GL_COMBINE_RGB:
3905 #endif // defined(GL_COMBINE_RGB)
3906 #if defined(GL_COMBINE_ALPHA)
3907 case GL_COMBINE_ALPHA:
3908 #endif // defined(GL_COMBINE_ALPHA)
3909 _needed = 1;
3910 break;
3911 #if defined(GL_TEXTURE_ENV_COLOR)
3912 case GL_TEXTURE_ENV_COLOR:
3913 #endif // defined(GL_TEXTURE_ENV_COLOR)
3914 _needed = 4;
3915 break;
3916 default:
3917 _needed = 1;
3918 break;
3919 }
3920 if (_remaining < _needed) {
3921 _exception = 1;
3922 _exceptionType = "java/lang/IllegalArgumentException";
3923 _exceptionMessage = "remaining() < needed";
3924 goto exit;
3925 }
3926 if (params == NULL) {
3927 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3928 params = (GLfixed *) (_paramsBase + _bufferOffset);
3929 }
3930 glTexEnvxv(
3931 (GLenum)target,
3932 (GLenum)pname,
3933 (GLfixed *)params
3934 );
3935
3936 exit:
3937 if (_array) {
3938 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
3939 }
3940 if (_exception) {
3941 jniThrowException(_env, _exceptionType, _exceptionMessage);
3942 }
3943 }
3944
3945 /* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
3946 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)3947 android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
3948 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
3949 jint _exception = 0;
3950 const char * _exceptionType = NULL;
3951 const char * _exceptionMessage = NULL;
3952 jarray _array = (jarray) 0;
3953 jint _bufferOffset = (jint) 0;
3954 jint _remaining;
3955 GLvoid *pixels = (GLvoid *) 0;
3956
3957 if (pixels_buf) {
3958 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3959 }
3960 if (pixels_buf && pixels == NULL) {
3961 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
3962 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
3963 }
3964 glTexImage2D(
3965 (GLenum)target,
3966 (GLint)level,
3967 (GLint)internalformat,
3968 (GLsizei)width,
3969 (GLsizei)height,
3970 (GLint)border,
3971 (GLenum)format,
3972 (GLenum)type,
3973 (GLvoid *)pixels
3974 );
3975 if (_array) {
3976 releasePointer(_env, _array, (void *)((char *)pixels - _bufferOffset), JNI_FALSE);
3977 }
3978 if (_exception) {
3979 jniThrowException(_env, _exceptionType, _exceptionMessage);
3980 }
3981 }
3982
3983 /* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
3984 static void
android_glTexParameterf__IIF(JNIEnv * _env,jobject _this,jint target,jint pname,jfloat param)3985 android_glTexParameterf__IIF
3986 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3987 glTexParameterf(
3988 (GLenum)target,
3989 (GLenum)pname,
3990 (GLfloat)param
3991 );
3992 }
3993
3994 /* void glTexParameterx ( GLenum target, GLenum pname, GLfixed param ) */
3995 static void
android_glTexParameterx__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)3996 android_glTexParameterx__III
3997 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3998 glTexParameterx(
3999 (GLenum)target,
4000 (GLenum)pname,
4001 (GLfixed)param
4002 );
4003 }
4004
4005 /* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */
4006 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)4007 android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
4008 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
4009 jint _exception = 0;
4010 const char * _exceptionType = NULL;
4011 const char * _exceptionMessage = NULL;
4012 jarray _array = (jarray) 0;
4013 jint _bufferOffset = (jint) 0;
4014 jint _remaining;
4015 GLvoid *pixels = (GLvoid *) 0;
4016
4017 if (pixels_buf) {
4018 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4019 }
4020 if (pixels_buf && pixels == NULL) {
4021 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4022 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
4023 }
4024 glTexSubImage2D(
4025 (GLenum)target,
4026 (GLint)level,
4027 (GLint)xoffset,
4028 (GLint)yoffset,
4029 (GLsizei)width,
4030 (GLsizei)height,
4031 (GLenum)format,
4032 (GLenum)type,
4033 (GLvoid *)pixels
4034 );
4035 if (_array) {
4036 releasePointer(_env, _array, (void *)((char *)pixels - _bufferOffset), JNI_FALSE);
4037 }
4038 if (_exception) {
4039 jniThrowException(_env, _exceptionType, _exceptionMessage);
4040 }
4041 }
4042
4043 /* void glTranslatef ( GLfloat x, GLfloat y, GLfloat z ) */
4044 static void
android_glTranslatef__FFF(JNIEnv * _env,jobject _this,jfloat x,jfloat y,jfloat z)4045 android_glTranslatef__FFF
4046 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z) {
4047 glTranslatef(
4048 (GLfloat)x,
4049 (GLfloat)y,
4050 (GLfloat)z
4051 );
4052 }
4053
4054 /* void glTranslatex ( GLfixed x, GLfixed y, GLfixed z ) */
4055 static void
android_glTranslatex__III(JNIEnv * _env,jobject _this,jint x,jint y,jint z)4056 android_glTranslatex__III
4057 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) {
4058 glTranslatex(
4059 (GLfixed)x,
4060 (GLfixed)y,
4061 (GLfixed)z
4062 );
4063 }
4064
4065 /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
4066 static void
android_glVertexPointerBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)4067 android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
4068 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
4069 jint _exception = 0;
4070 const char * _exceptionType = NULL;
4071 const char * _exceptionMessage = NULL;
4072 jarray _array = (jarray) 0;
4073 jint _bufferOffset = (jint) 0;
4074 jint _remaining;
4075 GLvoid *pointer = (GLvoid *) 0;
4076
4077 if (pointer_buf) {
4078 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
4079 if ( ! pointer ) {
4080 return;
4081 }
4082 }
4083 glVertexPointerBounds(
4084 (GLint)size,
4085 (GLenum)type,
4086 (GLsizei)stride,
4087 (GLvoid *)pointer,
4088 (GLsizei)remaining
4089 );
4090 if (_exception) {
4091 jniThrowException(_env, _exceptionType, _exceptionMessage);
4092 }
4093 }
4094
4095 /* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */
4096 static void
android_glViewport__IIII(JNIEnv * _env,jobject _this,jint x,jint y,jint width,jint height)4097 android_glViewport__IIII
4098 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
4099 glViewport(
4100 (GLint)x,
4101 (GLint)y,
4102 (GLsizei)width,
4103 (GLsizei)height
4104 );
4105 }
4106
4107 /* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
4108 static jint
android_glQueryMatrixxOES___3II_3II(JNIEnv * _env,jobject _this,jintArray mantissa_ref,jint mantissaOffset,jintArray exponent_ref,jint exponentOffset)4109 android_glQueryMatrixxOES___3II_3II
4110 (JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) {
4111 jint _exception = 0;
4112 const char * _exceptionType = NULL;
4113 const char * _exceptionMessage = NULL;
4114 GLbitfield _returnValue = -1;
4115 GLfixed *mantissa_base = (GLfixed *) 0;
4116 jint _mantissaRemaining;
4117 GLfixed *mantissa = (GLfixed *) 0;
4118 GLint *exponent_base = (GLint *) 0;
4119 jint _exponentRemaining;
4120 GLint *exponent = (GLint *) 0;
4121
4122 if (!mantissa_ref) {
4123 _exception = 1;
4124 _exceptionType = "java/lang/IllegalArgumentException";
4125 _exceptionMessage = "mantissa == null";
4126 goto exit;
4127 }
4128 if (mantissaOffset < 0) {
4129 _exception = 1;
4130 _exceptionType = "java/lang/IllegalArgumentException";
4131 _exceptionMessage = "mantissaOffset < 0";
4132 goto exit;
4133 }
4134 _mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset;
4135 if (_mantissaRemaining < 16) {
4136 _exception = 1;
4137 _exceptionType = "java/lang/IllegalArgumentException";
4138 _exceptionMessage = "length - mantissaOffset < 16 < needed";
4139 goto exit;
4140 }
4141 mantissa_base = (GLfixed *)
4142 _env->GetIntArrayElements(mantissa_ref, (jboolean *)0);
4143 mantissa = mantissa_base + mantissaOffset;
4144
4145 if (!exponent_ref) {
4146 _exception = 1;
4147 _exceptionType = "java/lang/IllegalArgumentException";
4148 _exceptionMessage = "exponent == null";
4149 goto exit;
4150 }
4151 if (exponentOffset < 0) {
4152 _exception = 1;
4153 _exceptionType = "java/lang/IllegalArgumentException";
4154 _exceptionMessage = "exponentOffset < 0";
4155 goto exit;
4156 }
4157 _exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset;
4158 if (_exponentRemaining < 16) {
4159 _exception = 1;
4160 _exceptionType = "java/lang/IllegalArgumentException";
4161 _exceptionMessage = "length - exponentOffset < 16 < needed";
4162 goto exit;
4163 }
4164 exponent_base = (GLint *)
4165 _env->GetIntArrayElements(exponent_ref, (jboolean *)0);
4166 exponent = exponent_base + exponentOffset;
4167
4168 _returnValue = glQueryMatrixxOES(
4169 (GLfixed *)mantissa,
4170 (GLint *)exponent
4171 );
4172
4173 exit:
4174 if (exponent_base) {
4175 _env->ReleaseIntArrayElements(exponent_ref, (jint*)exponent_base,
4176 _exception ? JNI_ABORT: 0);
4177 }
4178 if (mantissa_base) {
4179 _env->ReleaseIntArrayElements(mantissa_ref, (jint*)mantissa_base,
4180 _exception ? JNI_ABORT: 0);
4181 }
4182 if (_exception) {
4183 jniThrowException(_env, _exceptionType, _exceptionMessage);
4184 return (jint)0;
4185 }
4186 return (jint)_returnValue;
4187 }
4188
4189 /* GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent ) */
4190 static jint
android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject mantissa_buf,jobject exponent_buf)4191 android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
4192 (JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) {
4193 jint _exception = 0;
4194 const char * _exceptionType = NULL;
4195 const char * _exceptionMessage = NULL;
4196 jintArray _mantissaArray = (jintArray) 0;
4197 jint _mantissaBufferOffset = (jint) 0;
4198 jintArray _exponentArray = (jintArray) 0;
4199 jint _exponentBufferOffset = (jint) 0;
4200 GLbitfield _returnValue = -1;
4201 jint _mantissaRemaining;
4202 GLfixed *mantissa = (GLfixed *) 0;
4203 jint _exponentRemaining;
4204 GLint *exponent = (GLint *) 0;
4205
4206 if (!mantissa_buf) {
4207 _exception = 1;
4208 _exceptionType = "java/lang/IllegalArgumentException";
4209 _exceptionMessage = "mantissa == null";
4210 goto exit;
4211 }
4212 mantissa = (GLfixed *)getPointer(_env, mantissa_buf, (jarray*)&_mantissaArray, &_mantissaRemaining, &_mantissaBufferOffset);
4213 if (_mantissaRemaining < 16) {
4214 _exception = 1;
4215 _exceptionType = "java/lang/IllegalArgumentException";
4216 _exceptionMessage = "remaining() < 16 < needed";
4217 goto exit;
4218 }
4219 if (!exponent_buf) {
4220 _exception = 1;
4221 _exceptionType = "java/lang/IllegalArgumentException";
4222 _exceptionMessage = "exponent == null";
4223 goto exit;
4224 }
4225 exponent = (GLint *)getPointer(_env, exponent_buf, (jarray*)&_exponentArray, &_exponentRemaining, &_exponentBufferOffset);
4226 if (_exponentRemaining < 16) {
4227 _exception = 1;
4228 _exceptionType = "java/lang/IllegalArgumentException";
4229 _exceptionMessage = "remaining() < 16 < needed";
4230 goto exit;
4231 }
4232 if (mantissa == NULL) {
4233 char * _mantissaBase = (char *)_env->GetIntArrayElements(_mantissaArray, (jboolean *) 0);
4234 mantissa = (GLfixed *) (_mantissaBase + _mantissaBufferOffset);
4235 }
4236 if (exponent == NULL) {
4237 char * _exponentBase = (char *)_env->GetIntArrayElements(_exponentArray, (jboolean *) 0);
4238 exponent = (GLint *) (_exponentBase + _exponentBufferOffset);
4239 }
4240 _returnValue = glQueryMatrixxOES(
4241 (GLfixed *)mantissa,
4242 (GLint *)exponent
4243 );
4244
4245 exit:
4246 if (_exponentArray) {
4247 _env->ReleaseIntArrayElements(_exponentArray, (jint*)exponent, _exception ? JNI_ABORT : 0);
4248 }
4249 if (_mantissaArray) {
4250 _env->ReleaseIntArrayElements(_mantissaArray, (jint*)mantissa, _exception ? JNI_ABORT : 0);
4251 }
4252 if (_exception) {
4253 jniThrowException(_env, _exceptionType, _exceptionMessage);
4254 return (jint)0;
4255 }
4256 return (jint)_returnValue;
4257 }
4258
4259 /* void glBindBuffer ( GLenum target, GLuint buffer ) */
4260 static void
android_glBindBuffer__II(JNIEnv * _env,jobject _this,jint target,jint buffer)4261 android_glBindBuffer__II
4262 (JNIEnv *_env, jobject _this, jint target, jint buffer) {
4263 glBindBuffer(
4264 (GLenum)target,
4265 (GLuint)buffer
4266 );
4267 }
4268
4269 /* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */
4270 static void
android_glBufferData__IILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint target,jint size,jobject data_buf,jint usage)4271 android_glBufferData__IILjava_nio_Buffer_2I
4272 (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
4273 jint _exception = 0;
4274 const char * _exceptionType = NULL;
4275 const char * _exceptionMessage = NULL;
4276 jarray _array = (jarray) 0;
4277 jint _bufferOffset = (jint) 0;
4278 jint _remaining;
4279 GLvoid *data = (GLvoid *) 0;
4280
4281 if (data_buf) {
4282 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4283 if (_remaining < size) {
4284 _exception = 1;
4285 _exceptionType = "java/lang/IllegalArgumentException";
4286 _exceptionMessage = "remaining() < size < needed";
4287 goto exit;
4288 }
4289 }
4290 if (data_buf && data == NULL) {
4291 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4292 data = (GLvoid *) (_dataBase + _bufferOffset);
4293 }
4294 glBufferData(
4295 (GLenum)target,
4296 (GLsizeiptr)size,
4297 (GLvoid *)data,
4298 (GLenum)usage
4299 );
4300
4301 exit:
4302 if (_array) {
4303 releasePointer(_env, _array, (void *)((char *)data - _bufferOffset), JNI_FALSE);
4304 }
4305 if (_exception) {
4306 jniThrowException(_env, _exceptionType, _exceptionMessage);
4307 }
4308 }
4309
4310 /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
4311 static void
android_glBufferSubData__IIILjava_nio_Buffer_2(JNIEnv * _env,jobject _this,jint target,jint offset,jint size,jobject data_buf)4312 android_glBufferSubData__IIILjava_nio_Buffer_2
4313 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
4314 jint _exception = 0;
4315 const char * _exceptionType = NULL;
4316 const char * _exceptionMessage = NULL;
4317 jarray _array = (jarray) 0;
4318 jint _bufferOffset = (jint) 0;
4319 jint _remaining;
4320 GLvoid *data = (GLvoid *) 0;
4321
4322 if (!data_buf) {
4323 _exception = 1;
4324 _exceptionType = "java/lang/IllegalArgumentException";
4325 _exceptionMessage = "data == null";
4326 goto exit;
4327 }
4328 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4329 if (_remaining < size) {
4330 _exception = 1;
4331 _exceptionType = "java/lang/IllegalArgumentException";
4332 _exceptionMessage = "remaining() < size < needed";
4333 goto exit;
4334 }
4335 if (data == NULL) {
4336 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4337 data = (GLvoid *) (_dataBase + _bufferOffset);
4338 }
4339 glBufferSubData(
4340 (GLenum)target,
4341 (GLintptr)offset,
4342 (GLsizeiptr)size,
4343 (GLvoid *)data
4344 );
4345
4346 exit:
4347 if (_array) {
4348 releasePointer(_env, _array, (void *)((char *)data - _bufferOffset), JNI_FALSE);
4349 }
4350 if (_exception) {
4351 jniThrowException(_env, _exceptionType, _exceptionMessage);
4352 }
4353 }
4354
4355 /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
4356 static void
android_glClipPlanef__I_3FI(JNIEnv * _env,jobject _this,jint plane,jfloatArray equation_ref,jint offset)4357 android_glClipPlanef__I_3FI
4358 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
4359 jint _exception = 0;
4360 const char * _exceptionType = NULL;
4361 const char * _exceptionMessage = NULL;
4362 GLfloat *equation_base = (GLfloat *) 0;
4363 jint _remaining;
4364 GLfloat *equation = (GLfloat *) 0;
4365
4366 if (!equation_ref) {
4367 _exception = 1;
4368 _exceptionType = "java/lang/IllegalArgumentException";
4369 _exceptionMessage = "equation == null";
4370 goto exit;
4371 }
4372 if (offset < 0) {
4373 _exception = 1;
4374 _exceptionType = "java/lang/IllegalArgumentException";
4375 _exceptionMessage = "offset < 0";
4376 goto exit;
4377 }
4378 _remaining = _env->GetArrayLength(equation_ref) - offset;
4379 if (_remaining < 4) {
4380 _exception = 1;
4381 _exceptionType = "java/lang/IllegalArgumentException";
4382 _exceptionMessage = "length - offset < 4 < needed";
4383 goto exit;
4384 }
4385 equation_base = (GLfloat *)
4386 _env->GetFloatArrayElements(equation_ref, (jboolean *)0);
4387 equation = equation_base + offset;
4388
4389 glClipPlanef(
4390 (GLenum)plane,
4391 (GLfloat *)equation
4392 );
4393
4394 exit:
4395 if (equation_base) {
4396 _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base,
4397 JNI_ABORT);
4398 }
4399 if (_exception) {
4400 jniThrowException(_env, _exceptionType, _exceptionMessage);
4401 }
4402 }
4403
4404 /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
4405 static void
android_glClipPlanef__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint plane,jobject equation_buf)4406 android_glClipPlanef__ILjava_nio_FloatBuffer_2
4407 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
4408 jint _exception = 0;
4409 const char * _exceptionType = NULL;
4410 const char * _exceptionMessage = NULL;
4411 jfloatArray _array = (jfloatArray) 0;
4412 jint _bufferOffset = (jint) 0;
4413 jint _remaining;
4414 GLfloat *equation = (GLfloat *) 0;
4415
4416 if (!equation_buf) {
4417 _exception = 1;
4418 _exceptionType = "java/lang/IllegalArgumentException";
4419 _exceptionMessage = "equation == null";
4420 goto exit;
4421 }
4422 equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4423 if (_remaining < 4) {
4424 _exception = 1;
4425 _exceptionType = "java/lang/IllegalArgumentException";
4426 _exceptionMessage = "remaining() < 4 < needed";
4427 goto exit;
4428 }
4429 if (equation == NULL) {
4430 char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
4431 equation = (GLfloat *) (_equationBase + _bufferOffset);
4432 }
4433 glClipPlanef(
4434 (GLenum)plane,
4435 (GLfloat *)equation
4436 );
4437
4438 exit:
4439 if (_array) {
4440 _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
4441 }
4442 if (_exception) {
4443 jniThrowException(_env, _exceptionType, _exceptionMessage);
4444 }
4445 }
4446
4447 /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
4448 static void
android_glClipPlanex__I_3II(JNIEnv * _env,jobject _this,jint plane,jintArray equation_ref,jint offset)4449 android_glClipPlanex__I_3II
4450 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
4451 jint _exception = 0;
4452 const char * _exceptionType = NULL;
4453 const char * _exceptionMessage = NULL;
4454 GLfixed *equation_base = (GLfixed *) 0;
4455 jint _remaining;
4456 GLfixed *equation = (GLfixed *) 0;
4457
4458 if (!equation_ref) {
4459 _exception = 1;
4460 _exceptionType = "java/lang/IllegalArgumentException";
4461 _exceptionMessage = "equation == null";
4462 goto exit;
4463 }
4464 if (offset < 0) {
4465 _exception = 1;
4466 _exceptionType = "java/lang/IllegalArgumentException";
4467 _exceptionMessage = "offset < 0";
4468 goto exit;
4469 }
4470 _remaining = _env->GetArrayLength(equation_ref) - offset;
4471 if (_remaining < 4) {
4472 _exception = 1;
4473 _exceptionType = "java/lang/IllegalArgumentException";
4474 _exceptionMessage = "length - offset < 4 < needed";
4475 goto exit;
4476 }
4477 equation_base = (GLfixed *)
4478 _env->GetIntArrayElements(equation_ref, (jboolean *)0);
4479 equation = equation_base + offset;
4480
4481 glClipPlanex(
4482 (GLenum)plane,
4483 (GLfixed *)equation
4484 );
4485
4486 exit:
4487 if (equation_base) {
4488 _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base,
4489 JNI_ABORT);
4490 }
4491 if (_exception) {
4492 jniThrowException(_env, _exceptionType, _exceptionMessage);
4493 }
4494 }
4495
4496 /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
4497 static void
android_glClipPlanex__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint plane,jobject equation_buf)4498 android_glClipPlanex__ILjava_nio_IntBuffer_2
4499 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
4500 jint _exception = 0;
4501 const char * _exceptionType = NULL;
4502 const char * _exceptionMessage = NULL;
4503 jintArray _array = (jintArray) 0;
4504 jint _bufferOffset = (jint) 0;
4505 jint _remaining;
4506 GLfixed *equation = (GLfixed *) 0;
4507
4508 if (!equation_buf) {
4509 _exception = 1;
4510 _exceptionType = "java/lang/IllegalArgumentException";
4511 _exceptionMessage = "equation == null";
4512 goto exit;
4513 }
4514 equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4515 if (_remaining < 4) {
4516 _exception = 1;
4517 _exceptionType = "java/lang/IllegalArgumentException";
4518 _exceptionMessage = "remaining() < 4 < needed";
4519 goto exit;
4520 }
4521 if (equation == NULL) {
4522 char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4523 equation = (GLfixed *) (_equationBase + _bufferOffset);
4524 }
4525 glClipPlanex(
4526 (GLenum)plane,
4527 (GLfixed *)equation
4528 );
4529
4530 exit:
4531 if (_array) {
4532 _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
4533 }
4534 if (_exception) {
4535 jniThrowException(_env, _exceptionType, _exceptionMessage);
4536 }
4537 }
4538
4539 /* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */
4540 static void
android_glColor4ub__BBBB(JNIEnv * _env,jobject _this,jbyte red,jbyte green,jbyte blue,jbyte alpha)4541 android_glColor4ub__BBBB
4542 (JNIEnv *_env, jobject _this, jbyte red, jbyte green, jbyte blue, jbyte alpha) {
4543 glColor4ub(
4544 (GLubyte)red,
4545 (GLubyte)green,
4546 (GLubyte)blue,
4547 (GLubyte)alpha
4548 );
4549 }
4550
4551 /* void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
4552 static void
android_glColorPointer__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)4553 android_glColorPointer__IIII
4554 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
4555 glColorPointer(
4556 (GLint)size,
4557 (GLenum)type,
4558 (GLsizei)stride,
4559 reinterpret_cast<GLvoid *>(offset)
4560 );
4561 }
4562
4563 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
4564 static void
android_glDeleteBuffers__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray buffers_ref,jint offset)4565 android_glDeleteBuffers__I_3II
4566 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
4567 jint _exception = 0;
4568 const char * _exceptionType = NULL;
4569 const char * _exceptionMessage = NULL;
4570 GLuint *buffers_base = (GLuint *) 0;
4571 jint _remaining;
4572 GLuint *buffers = (GLuint *) 0;
4573
4574 if (!buffers_ref) {
4575 _exception = 1;
4576 _exceptionType = "java/lang/IllegalArgumentException";
4577 _exceptionMessage = "buffers == null";
4578 goto exit;
4579 }
4580 if (offset < 0) {
4581 _exception = 1;
4582 _exceptionType = "java/lang/IllegalArgumentException";
4583 _exceptionMessage = "offset < 0";
4584 goto exit;
4585 }
4586 _remaining = _env->GetArrayLength(buffers_ref) - offset;
4587 if (_remaining < n) {
4588 _exception = 1;
4589 _exceptionType = "java/lang/IllegalArgumentException";
4590 _exceptionMessage = "length - offset < n < needed";
4591 goto exit;
4592 }
4593 buffers_base = (GLuint *)
4594 _env->GetIntArrayElements(buffers_ref, (jboolean *)0);
4595 buffers = buffers_base + offset;
4596
4597 glDeleteBuffers(
4598 (GLsizei)n,
4599 (GLuint *)buffers
4600 );
4601
4602 exit:
4603 if (buffers_base) {
4604 _env->ReleaseIntArrayElements(buffers_ref, (jint*)buffers_base,
4605 JNI_ABORT);
4606 }
4607 if (_exception) {
4608 jniThrowException(_env, _exceptionType, _exceptionMessage);
4609 }
4610 }
4611
4612 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
4613 static void
android_glDeleteBuffers__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject buffers_buf)4614 android_glDeleteBuffers__ILjava_nio_IntBuffer_2
4615 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
4616 jint _exception = 0;
4617 const char * _exceptionType = NULL;
4618 const char * _exceptionMessage = NULL;
4619 jintArray _array = (jintArray) 0;
4620 jint _bufferOffset = (jint) 0;
4621 jint _remaining;
4622 GLuint *buffers = (GLuint *) 0;
4623
4624 if (!buffers_buf) {
4625 _exception = 1;
4626 _exceptionType = "java/lang/IllegalArgumentException";
4627 _exceptionMessage = "buffers == null";
4628 goto exit;
4629 }
4630 buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4631 if (_remaining < n) {
4632 _exception = 1;
4633 _exceptionType = "java/lang/IllegalArgumentException";
4634 _exceptionMessage = "remaining() < n < needed";
4635 goto exit;
4636 }
4637 if (buffers == NULL) {
4638 char * _buffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4639 buffers = (GLuint *) (_buffersBase + _bufferOffset);
4640 }
4641 glDeleteBuffers(
4642 (GLsizei)n,
4643 (GLuint *)buffers
4644 );
4645
4646 exit:
4647 if (_array) {
4648 _env->ReleaseIntArrayElements(_array, (jint*)buffers, JNI_ABORT);
4649 }
4650 if (_exception) {
4651 jniThrowException(_env, _exceptionType, _exceptionMessage);
4652 }
4653 }
4654
4655 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
4656 static void
android_glDrawElements__IIII(JNIEnv * _env,jobject _this,jint mode,jint count,jint type,jint offset)4657 android_glDrawElements__IIII
4658 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
4659 jint _exception = 0;
4660 const char * _exceptionType = NULL;
4661 const char * _exceptionMessage = NULL;
4662 glDrawElements(
4663 (GLenum)mode,
4664 (GLsizei)count,
4665 (GLenum)type,
4666 reinterpret_cast<GLvoid *>(offset)
4667 );
4668 if (_exception) {
4669 jniThrowException(_env, _exceptionType, _exceptionMessage);
4670 }
4671 }
4672
4673 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
4674 static void
android_glGenBuffers__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray buffers_ref,jint offset)4675 android_glGenBuffers__I_3II
4676 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
4677 jint _exception = 0;
4678 const char * _exceptionType = NULL;
4679 const char * _exceptionMessage = NULL;
4680 GLuint *buffers_base = (GLuint *) 0;
4681 jint _remaining;
4682 GLuint *buffers = (GLuint *) 0;
4683
4684 if (!buffers_ref) {
4685 _exception = 1;
4686 _exceptionType = "java/lang/IllegalArgumentException";
4687 _exceptionMessage = "buffers == null";
4688 goto exit;
4689 }
4690 if (offset < 0) {
4691 _exception = 1;
4692 _exceptionType = "java/lang/IllegalArgumentException";
4693 _exceptionMessage = "offset < 0";
4694 goto exit;
4695 }
4696 _remaining = _env->GetArrayLength(buffers_ref) - offset;
4697 if (_remaining < n) {
4698 _exception = 1;
4699 _exceptionType = "java/lang/IllegalArgumentException";
4700 _exceptionMessage = "length - offset < n < needed";
4701 goto exit;
4702 }
4703 buffers_base = (GLuint *)
4704 _env->GetIntArrayElements(buffers_ref, (jboolean *)0);
4705 buffers = buffers_base + offset;
4706
4707 glGenBuffers(
4708 (GLsizei)n,
4709 (GLuint *)buffers
4710 );
4711
4712 exit:
4713 if (buffers_base) {
4714 _env->ReleaseIntArrayElements(buffers_ref, (jint*)buffers_base,
4715 _exception ? JNI_ABORT: 0);
4716 }
4717 if (_exception) {
4718 jniThrowException(_env, _exceptionType, _exceptionMessage);
4719 }
4720 }
4721
4722 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
4723 static void
android_glGenBuffers__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject buffers_buf)4724 android_glGenBuffers__ILjava_nio_IntBuffer_2
4725 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
4726 jint _exception = 0;
4727 const char * _exceptionType = NULL;
4728 const char * _exceptionMessage = NULL;
4729 jintArray _array = (jintArray) 0;
4730 jint _bufferOffset = (jint) 0;
4731 jint _remaining;
4732 GLuint *buffers = (GLuint *) 0;
4733
4734 if (!buffers_buf) {
4735 _exception = 1;
4736 _exceptionType = "java/lang/IllegalArgumentException";
4737 _exceptionMessage = "buffers == null";
4738 goto exit;
4739 }
4740 buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4741 if (_remaining < n) {
4742 _exception = 1;
4743 _exceptionType = "java/lang/IllegalArgumentException";
4744 _exceptionMessage = "remaining() < n < needed";
4745 goto exit;
4746 }
4747 if (buffers == NULL) {
4748 char * _buffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4749 buffers = (GLuint *) (_buffersBase + _bufferOffset);
4750 }
4751 glGenBuffers(
4752 (GLsizei)n,
4753 (GLuint *)buffers
4754 );
4755
4756 exit:
4757 if (_array) {
4758 _env->ReleaseIntArrayElements(_array, (jint*)buffers, _exception ? JNI_ABORT : 0);
4759 }
4760 if (_exception) {
4761 jniThrowException(_env, _exceptionType, _exceptionMessage);
4762 }
4763 }
4764
4765 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
4766 static void
android_glGetBooleanv__I_3ZI(JNIEnv * _env,jobject _this,jint pname,jbooleanArray params_ref,jint offset)4767 android_glGetBooleanv__I_3ZI
4768 (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
4769 jint _exception = 0;
4770 const char * _exceptionType = NULL;
4771 const char * _exceptionMessage = NULL;
4772 GLboolean *params_base = (GLboolean *) 0;
4773 jint _remaining;
4774 GLboolean *params = (GLboolean *) 0;
4775
4776 if (!params_ref) {
4777 _exception = 1;
4778 _exceptionType = "java/lang/IllegalArgumentException";
4779 _exceptionMessage = "params == null";
4780 goto exit;
4781 }
4782 if (offset < 0) {
4783 _exception = 1;
4784 _exceptionType = "java/lang/IllegalArgumentException";
4785 _exceptionMessage = "offset < 0";
4786 goto exit;
4787 }
4788 _remaining = _env->GetArrayLength(params_ref) - offset;
4789 params_base = (GLboolean *)
4790 _env->GetBooleanArrayElements(params_ref, (jboolean *)0);
4791 params = params_base + offset;
4792
4793 glGetBooleanv(
4794 (GLenum)pname,
4795 (GLboolean *)params
4796 );
4797
4798 exit:
4799 if (params_base) {
4800 _env->ReleaseBooleanArrayElements(params_ref, (jboolean*)params_base,
4801 _exception ? JNI_ABORT: 0);
4802 }
4803 if (_exception) {
4804 jniThrowException(_env, _exceptionType, _exceptionMessage);
4805 }
4806 }
4807
4808 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
4809 static void
android_glGetBooleanv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)4810 android_glGetBooleanv__ILjava_nio_IntBuffer_2
4811 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
4812 jint _exception = 0;
4813 const char * _exceptionType = NULL;
4814 const char * _exceptionMessage = NULL;
4815 jintArray _array = (jintArray) 0;
4816 jint _bufferOffset = (jint) 0;
4817 jint _remaining;
4818 GLboolean *params = (GLboolean *) 0;
4819
4820 if (!params_buf) {
4821 _exception = 1;
4822 _exceptionType = "java/lang/IllegalArgumentException";
4823 _exceptionMessage = "params == null";
4824 goto exit;
4825 }
4826 params = (GLboolean *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4827 if (params == NULL) {
4828 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4829 params = (GLboolean *) (_paramsBase + _bufferOffset);
4830 }
4831 glGetBooleanv(
4832 (GLenum)pname,
4833 (GLboolean *)params
4834 );
4835
4836 exit:
4837 if (_array) {
4838 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
4839 }
4840 if (_exception) {
4841 jniThrowException(_env, _exceptionType, _exceptionMessage);
4842 }
4843 }
4844
4845 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
4846 static void
android_glGetBufferParameteriv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)4847 android_glGetBufferParameteriv__II_3II
4848 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
4849 jniThrowException(_env, "java/lang/UnsupportedOperationException",
4850 "glGetBufferParameteriv");
4851 return;
4852 }
4853
4854 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
4855 static void
android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)4856 android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
4857 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
4858 jniThrowException(_env, "java/lang/UnsupportedOperationException",
4859 "glGetBufferParameteriv");
4860 return;
4861 }
4862
4863 /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
4864 static void
android_glGetClipPlanef__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray eqn_ref,jint offset)4865 android_glGetClipPlanef__I_3FI
4866 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
4867 jint _exception = 0;
4868 const char * _exceptionType = NULL;
4869 const char * _exceptionMessage = NULL;
4870 GLfloat *eqn_base = (GLfloat *) 0;
4871 jint _remaining;
4872 GLfloat *eqn = (GLfloat *) 0;
4873
4874 if (!eqn_ref) {
4875 _exception = 1;
4876 _exceptionType = "java/lang/IllegalArgumentException";
4877 _exceptionMessage = "eqn == null";
4878 goto exit;
4879 }
4880 if (offset < 0) {
4881 _exception = 1;
4882 _exceptionType = "java/lang/IllegalArgumentException";
4883 _exceptionMessage = "offset < 0";
4884 goto exit;
4885 }
4886 _remaining = _env->GetArrayLength(eqn_ref) - offset;
4887 eqn_base = (GLfloat *)
4888 _env->GetFloatArrayElements(eqn_ref, (jboolean *)0);
4889 eqn = eqn_base + offset;
4890
4891 glGetClipPlanef(
4892 (GLenum)pname,
4893 (GLfloat *)eqn
4894 );
4895
4896 exit:
4897 if (eqn_base) {
4898 _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base,
4899 _exception ? JNI_ABORT: 0);
4900 }
4901 if (_exception) {
4902 jniThrowException(_env, _exceptionType, _exceptionMessage);
4903 }
4904 }
4905
4906 /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
4907 static void
android_glGetClipPlanef__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject eqn_buf)4908 android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
4909 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
4910 jint _exception = 0;
4911 const char * _exceptionType = NULL;
4912 const char * _exceptionMessage = NULL;
4913 jfloatArray _array = (jfloatArray) 0;
4914 jint _bufferOffset = (jint) 0;
4915 jint _remaining;
4916 GLfloat *eqn = (GLfloat *) 0;
4917
4918 if (!eqn_buf) {
4919 _exception = 1;
4920 _exceptionType = "java/lang/IllegalArgumentException";
4921 _exceptionMessage = "eqn == null";
4922 goto exit;
4923 }
4924 eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4925 if (eqn == NULL) {
4926 char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
4927 eqn = (GLfloat *) (_eqnBase + _bufferOffset);
4928 }
4929 glGetClipPlanef(
4930 (GLenum)pname,
4931 (GLfloat *)eqn
4932 );
4933
4934 exit:
4935 if (_array) {
4936 _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0);
4937 }
4938 if (_exception) {
4939 jniThrowException(_env, _exceptionType, _exceptionMessage);
4940 }
4941 }
4942
4943 /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4944 static void
android_glGetClipPlanex__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray eqn_ref,jint offset)4945 android_glGetClipPlanex__I_3II
4946 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
4947 jint _exception = 0;
4948 const char * _exceptionType = NULL;
4949 const char * _exceptionMessage = NULL;
4950 GLfixed *eqn_base = (GLfixed *) 0;
4951 jint _remaining;
4952 GLfixed *eqn = (GLfixed *) 0;
4953
4954 if (!eqn_ref) {
4955 _exception = 1;
4956 _exceptionType = "java/lang/IllegalArgumentException";
4957 _exceptionMessage = "eqn == null";
4958 goto exit;
4959 }
4960 if (offset < 0) {
4961 _exception = 1;
4962 _exceptionType = "java/lang/IllegalArgumentException";
4963 _exceptionMessage = "offset < 0";
4964 goto exit;
4965 }
4966 _remaining = _env->GetArrayLength(eqn_ref) - offset;
4967 eqn_base = (GLfixed *)
4968 _env->GetIntArrayElements(eqn_ref, (jboolean *)0);
4969 eqn = eqn_base + offset;
4970
4971 glGetClipPlanex(
4972 (GLenum)pname,
4973 (GLfixed *)eqn
4974 );
4975
4976 exit:
4977 if (eqn_base) {
4978 _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base,
4979 _exception ? JNI_ABORT: 0);
4980 }
4981 if (_exception) {
4982 jniThrowException(_env, _exceptionType, _exceptionMessage);
4983 }
4984 }
4985
4986 /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
4987 static void
android_glGetClipPlanex__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject eqn_buf)4988 android_glGetClipPlanex__ILjava_nio_IntBuffer_2
4989 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
4990 jint _exception = 0;
4991 const char * _exceptionType = NULL;
4992 const char * _exceptionMessage = NULL;
4993 jintArray _array = (jintArray) 0;
4994 jint _bufferOffset = (jint) 0;
4995 jint _remaining;
4996 GLfixed *eqn = (GLfixed *) 0;
4997
4998 if (!eqn_buf) {
4999 _exception = 1;
5000 _exceptionType = "java/lang/IllegalArgumentException";
5001 _exceptionMessage = "eqn == null";
5002 goto exit;
5003 }
5004 eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5005 if (eqn == NULL) {
5006 char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5007 eqn = (GLfixed *) (_eqnBase + _bufferOffset);
5008 }
5009 glGetClipPlanex(
5010 (GLenum)pname,
5011 (GLfixed *)eqn
5012 );
5013
5014 exit:
5015 if (_array) {
5016 _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0);
5017 }
5018 if (_exception) {
5019 jniThrowException(_env, _exceptionType, _exceptionMessage);
5020 }
5021 }
5022
5023 /* void glGetFixedv ( GLenum pname, GLfixed *params ) */
5024 static void
android_glGetFixedv__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)5025 android_glGetFixedv__I_3II
5026 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
5027 jint _exception = 0;
5028 const char * _exceptionType = NULL;
5029 const char * _exceptionMessage = NULL;
5030 GLfixed *params_base = (GLfixed *) 0;
5031 jint _remaining;
5032 GLfixed *params = (GLfixed *) 0;
5033
5034 if (!params_ref) {
5035 _exception = 1;
5036 _exceptionType = "java/lang/IllegalArgumentException";
5037 _exceptionMessage = "params == null";
5038 goto exit;
5039 }
5040 if (offset < 0) {
5041 _exception = 1;
5042 _exceptionType = "java/lang/IllegalArgumentException";
5043 _exceptionMessage = "offset < 0";
5044 goto exit;
5045 }
5046 _remaining = _env->GetArrayLength(params_ref) - offset;
5047 params_base = (GLfixed *)
5048 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5049 params = params_base + offset;
5050
5051 glGetFixedv(
5052 (GLenum)pname,
5053 (GLfixed *)params
5054 );
5055
5056 exit:
5057 if (params_base) {
5058 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5059 _exception ? JNI_ABORT: 0);
5060 }
5061 if (_exception) {
5062 jniThrowException(_env, _exceptionType, _exceptionMessage);
5063 }
5064 }
5065
5066 /* void glGetFixedv ( GLenum pname, GLfixed *params ) */
5067 static void
android_glGetFixedv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)5068 android_glGetFixedv__ILjava_nio_IntBuffer_2
5069 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5070 jint _exception = 0;
5071 const char * _exceptionType = NULL;
5072 const char * _exceptionMessage = NULL;
5073 jintArray _array = (jintArray) 0;
5074 jint _bufferOffset = (jint) 0;
5075 jint _remaining;
5076 GLfixed *params = (GLfixed *) 0;
5077
5078 if (!params_buf) {
5079 _exception = 1;
5080 _exceptionType = "java/lang/IllegalArgumentException";
5081 _exceptionMessage = "params == null";
5082 goto exit;
5083 }
5084 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5085 if (params == NULL) {
5086 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5087 params = (GLfixed *) (_paramsBase + _bufferOffset);
5088 }
5089 glGetFixedv(
5090 (GLenum)pname,
5091 (GLfixed *)params
5092 );
5093
5094 exit:
5095 if (_array) {
5096 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5097 }
5098 if (_exception) {
5099 jniThrowException(_env, _exceptionType, _exceptionMessage);
5100 }
5101 }
5102
5103 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
5104 static void
android_glGetFloatv__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray params_ref,jint offset)5105 android_glGetFloatv__I_3FI
5106 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
5107 jint _exception = 0;
5108 const char * _exceptionType = NULL;
5109 const char * _exceptionMessage = NULL;
5110 GLfloat *params_base = (GLfloat *) 0;
5111 jint _remaining;
5112 GLfloat *params = (GLfloat *) 0;
5113
5114 if (!params_ref) {
5115 _exception = 1;
5116 _exceptionType = "java/lang/IllegalArgumentException";
5117 _exceptionMessage = "params == null";
5118 goto exit;
5119 }
5120 if (offset < 0) {
5121 _exception = 1;
5122 _exceptionType = "java/lang/IllegalArgumentException";
5123 _exceptionMessage = "offset < 0";
5124 goto exit;
5125 }
5126 _remaining = _env->GetArrayLength(params_ref) - offset;
5127 params_base = (GLfloat *)
5128 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
5129 params = params_base + offset;
5130
5131 glGetFloatv(
5132 (GLenum)pname,
5133 (GLfloat *)params
5134 );
5135
5136 exit:
5137 if (params_base) {
5138 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
5139 _exception ? JNI_ABORT: 0);
5140 }
5141 if (_exception) {
5142 jniThrowException(_env, _exceptionType, _exceptionMessage);
5143 }
5144 }
5145
5146 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
5147 static void
android_glGetFloatv__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)5148 android_glGetFloatv__ILjava_nio_FloatBuffer_2
5149 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
5150 jint _exception = 0;
5151 const char * _exceptionType = NULL;
5152 const char * _exceptionMessage = NULL;
5153 jfloatArray _array = (jfloatArray) 0;
5154 jint _bufferOffset = (jint) 0;
5155 jint _remaining;
5156 GLfloat *params = (GLfloat *) 0;
5157
5158 if (!params_buf) {
5159 _exception = 1;
5160 _exceptionType = "java/lang/IllegalArgumentException";
5161 _exceptionMessage = "params == null";
5162 goto exit;
5163 }
5164 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5165 if (params == NULL) {
5166 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5167 params = (GLfloat *) (_paramsBase + _bufferOffset);
5168 }
5169 glGetFloatv(
5170 (GLenum)pname,
5171 (GLfloat *)params
5172 );
5173
5174 exit:
5175 if (_array) {
5176 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
5177 }
5178 if (_exception) {
5179 jniThrowException(_env, _exceptionType, _exceptionMessage);
5180 }
5181 }
5182
5183 /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
5184 static void
android_glGetLightfv__II_3FI(JNIEnv * _env,jobject _this,jint light,jint pname,jfloatArray params_ref,jint offset)5185 android_glGetLightfv__II_3FI
5186 (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
5187 jint _exception = 0;
5188 const char * _exceptionType = NULL;
5189 const char * _exceptionMessage = NULL;
5190 GLfloat *params_base = (GLfloat *) 0;
5191 jint _remaining;
5192 GLfloat *params = (GLfloat *) 0;
5193
5194 if (!params_ref) {
5195 _exception = 1;
5196 _exceptionType = "java/lang/IllegalArgumentException";
5197 _exceptionMessage = "params == null";
5198 goto exit;
5199 }
5200 if (offset < 0) {
5201 _exception = 1;
5202 _exceptionType = "java/lang/IllegalArgumentException";
5203 _exceptionMessage = "offset < 0";
5204 goto exit;
5205 }
5206 _remaining = _env->GetArrayLength(params_ref) - offset;
5207 int _needed;
5208 switch (pname) {
5209 #if defined(GL_SPOT_EXPONENT)
5210 case GL_SPOT_EXPONENT:
5211 #endif // defined(GL_SPOT_EXPONENT)
5212 #if defined(GL_SPOT_CUTOFF)
5213 case GL_SPOT_CUTOFF:
5214 #endif // defined(GL_SPOT_CUTOFF)
5215 #if defined(GL_CONSTANT_ATTENUATION)
5216 case GL_CONSTANT_ATTENUATION:
5217 #endif // defined(GL_CONSTANT_ATTENUATION)
5218 #if defined(GL_LINEAR_ATTENUATION)
5219 case GL_LINEAR_ATTENUATION:
5220 #endif // defined(GL_LINEAR_ATTENUATION)
5221 #if defined(GL_QUADRATIC_ATTENUATION)
5222 case GL_QUADRATIC_ATTENUATION:
5223 #endif // defined(GL_QUADRATIC_ATTENUATION)
5224 _needed = 1;
5225 break;
5226 #if defined(GL_SPOT_DIRECTION)
5227 case GL_SPOT_DIRECTION:
5228 #endif // defined(GL_SPOT_DIRECTION)
5229 _needed = 3;
5230 break;
5231 #if defined(GL_AMBIENT)
5232 case GL_AMBIENT:
5233 #endif // defined(GL_AMBIENT)
5234 #if defined(GL_DIFFUSE)
5235 case GL_DIFFUSE:
5236 #endif // defined(GL_DIFFUSE)
5237 #if defined(GL_SPECULAR)
5238 case GL_SPECULAR:
5239 #endif // defined(GL_SPECULAR)
5240 #if defined(GL_EMISSION)
5241 case GL_EMISSION:
5242 #endif // defined(GL_EMISSION)
5243 _needed = 4;
5244 break;
5245 default:
5246 _needed = 1;
5247 break;
5248 }
5249 if (_remaining < _needed) {
5250 _exception = 1;
5251 _exceptionType = "java/lang/IllegalArgumentException";
5252 _exceptionMessage = "length - offset < needed";
5253 goto exit;
5254 }
5255 params_base = (GLfloat *)
5256 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
5257 params = params_base + offset;
5258
5259 glGetLightfv(
5260 (GLenum)light,
5261 (GLenum)pname,
5262 (GLfloat *)params
5263 );
5264
5265 exit:
5266 if (params_base) {
5267 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
5268 _exception ? JNI_ABORT: 0);
5269 }
5270 if (_exception) {
5271 jniThrowException(_env, _exceptionType, _exceptionMessage);
5272 }
5273 }
5274
5275 /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
5276 static void
android_glGetLightfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)5277 android_glGetLightfv__IILjava_nio_FloatBuffer_2
5278 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
5279 jint _exception = 0;
5280 const char * _exceptionType = NULL;
5281 const char * _exceptionMessage = NULL;
5282 jfloatArray _array = (jfloatArray) 0;
5283 jint _bufferOffset = (jint) 0;
5284 jint _remaining;
5285 GLfloat *params = (GLfloat *) 0;
5286
5287 if (!params_buf) {
5288 _exception = 1;
5289 _exceptionType = "java/lang/IllegalArgumentException";
5290 _exceptionMessage = "params == null";
5291 goto exit;
5292 }
5293 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5294 int _needed;
5295 switch (pname) {
5296 #if defined(GL_SPOT_EXPONENT)
5297 case GL_SPOT_EXPONENT:
5298 #endif // defined(GL_SPOT_EXPONENT)
5299 #if defined(GL_SPOT_CUTOFF)
5300 case GL_SPOT_CUTOFF:
5301 #endif // defined(GL_SPOT_CUTOFF)
5302 #if defined(GL_CONSTANT_ATTENUATION)
5303 case GL_CONSTANT_ATTENUATION:
5304 #endif // defined(GL_CONSTANT_ATTENUATION)
5305 #if defined(GL_LINEAR_ATTENUATION)
5306 case GL_LINEAR_ATTENUATION:
5307 #endif // defined(GL_LINEAR_ATTENUATION)
5308 #if defined(GL_QUADRATIC_ATTENUATION)
5309 case GL_QUADRATIC_ATTENUATION:
5310 #endif // defined(GL_QUADRATIC_ATTENUATION)
5311 _needed = 1;
5312 break;
5313 #if defined(GL_SPOT_DIRECTION)
5314 case GL_SPOT_DIRECTION:
5315 #endif // defined(GL_SPOT_DIRECTION)
5316 _needed = 3;
5317 break;
5318 #if defined(GL_AMBIENT)
5319 case GL_AMBIENT:
5320 #endif // defined(GL_AMBIENT)
5321 #if defined(GL_DIFFUSE)
5322 case GL_DIFFUSE:
5323 #endif // defined(GL_DIFFUSE)
5324 #if defined(GL_SPECULAR)
5325 case GL_SPECULAR:
5326 #endif // defined(GL_SPECULAR)
5327 #if defined(GL_EMISSION)
5328 case GL_EMISSION:
5329 #endif // defined(GL_EMISSION)
5330 _needed = 4;
5331 break;
5332 default:
5333 _needed = 1;
5334 break;
5335 }
5336 if (_remaining < _needed) {
5337 _exception = 1;
5338 _exceptionType = "java/lang/IllegalArgumentException";
5339 _exceptionMessage = "remaining() < needed";
5340 goto exit;
5341 }
5342 if (params == NULL) {
5343 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5344 params = (GLfloat *) (_paramsBase + _bufferOffset);
5345 }
5346 glGetLightfv(
5347 (GLenum)light,
5348 (GLenum)pname,
5349 (GLfloat *)params
5350 );
5351
5352 exit:
5353 if (_array) {
5354 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
5355 }
5356 if (_exception) {
5357 jniThrowException(_env, _exceptionType, _exceptionMessage);
5358 }
5359 }
5360
5361 /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
5362 static void
android_glGetLightxv__II_3II(JNIEnv * _env,jobject _this,jint light,jint pname,jintArray params_ref,jint offset)5363 android_glGetLightxv__II_3II
5364 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
5365 jint _exception = 0;
5366 const char * _exceptionType = NULL;
5367 const char * _exceptionMessage = NULL;
5368 GLfixed *params_base = (GLfixed *) 0;
5369 jint _remaining;
5370 GLfixed *params = (GLfixed *) 0;
5371
5372 if (!params_ref) {
5373 _exception = 1;
5374 _exceptionType = "java/lang/IllegalArgumentException";
5375 _exceptionMessage = "params == null";
5376 goto exit;
5377 }
5378 if (offset < 0) {
5379 _exception = 1;
5380 _exceptionType = "java/lang/IllegalArgumentException";
5381 _exceptionMessage = "offset < 0";
5382 goto exit;
5383 }
5384 _remaining = _env->GetArrayLength(params_ref) - offset;
5385 int _needed;
5386 switch (pname) {
5387 #if defined(GL_SPOT_EXPONENT)
5388 case GL_SPOT_EXPONENT:
5389 #endif // defined(GL_SPOT_EXPONENT)
5390 #if defined(GL_SPOT_CUTOFF)
5391 case GL_SPOT_CUTOFF:
5392 #endif // defined(GL_SPOT_CUTOFF)
5393 #if defined(GL_CONSTANT_ATTENUATION)
5394 case GL_CONSTANT_ATTENUATION:
5395 #endif // defined(GL_CONSTANT_ATTENUATION)
5396 #if defined(GL_LINEAR_ATTENUATION)
5397 case GL_LINEAR_ATTENUATION:
5398 #endif // defined(GL_LINEAR_ATTENUATION)
5399 #if defined(GL_QUADRATIC_ATTENUATION)
5400 case GL_QUADRATIC_ATTENUATION:
5401 #endif // defined(GL_QUADRATIC_ATTENUATION)
5402 _needed = 1;
5403 break;
5404 #if defined(GL_SPOT_DIRECTION)
5405 case GL_SPOT_DIRECTION:
5406 #endif // defined(GL_SPOT_DIRECTION)
5407 _needed = 3;
5408 break;
5409 #if defined(GL_AMBIENT)
5410 case GL_AMBIENT:
5411 #endif // defined(GL_AMBIENT)
5412 #if defined(GL_DIFFUSE)
5413 case GL_DIFFUSE:
5414 #endif // defined(GL_DIFFUSE)
5415 #if defined(GL_SPECULAR)
5416 case GL_SPECULAR:
5417 #endif // defined(GL_SPECULAR)
5418 #if defined(GL_EMISSION)
5419 case GL_EMISSION:
5420 #endif // defined(GL_EMISSION)
5421 _needed = 4;
5422 break;
5423 default:
5424 _needed = 1;
5425 break;
5426 }
5427 if (_remaining < _needed) {
5428 _exception = 1;
5429 _exceptionType = "java/lang/IllegalArgumentException";
5430 _exceptionMessage = "length - offset < needed";
5431 goto exit;
5432 }
5433 params_base = (GLfixed *)
5434 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5435 params = params_base + offset;
5436
5437 glGetLightxv(
5438 (GLenum)light,
5439 (GLenum)pname,
5440 (GLfixed *)params
5441 );
5442
5443 exit:
5444 if (params_base) {
5445 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5446 _exception ? JNI_ABORT: 0);
5447 }
5448 if (_exception) {
5449 jniThrowException(_env, _exceptionType, _exceptionMessage);
5450 }
5451 }
5452
5453 /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
5454 static void
android_glGetLightxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint light,jint pname,jobject params_buf)5455 android_glGetLightxv__IILjava_nio_IntBuffer_2
5456 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
5457 jint _exception = 0;
5458 const char * _exceptionType = NULL;
5459 const char * _exceptionMessage = NULL;
5460 jintArray _array = (jintArray) 0;
5461 jint _bufferOffset = (jint) 0;
5462 jint _remaining;
5463 GLfixed *params = (GLfixed *) 0;
5464
5465 if (!params_buf) {
5466 _exception = 1;
5467 _exceptionType = "java/lang/IllegalArgumentException";
5468 _exceptionMessage = "params == null";
5469 goto exit;
5470 }
5471 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5472 int _needed;
5473 switch (pname) {
5474 #if defined(GL_SPOT_EXPONENT)
5475 case GL_SPOT_EXPONENT:
5476 #endif // defined(GL_SPOT_EXPONENT)
5477 #if defined(GL_SPOT_CUTOFF)
5478 case GL_SPOT_CUTOFF:
5479 #endif // defined(GL_SPOT_CUTOFF)
5480 #if defined(GL_CONSTANT_ATTENUATION)
5481 case GL_CONSTANT_ATTENUATION:
5482 #endif // defined(GL_CONSTANT_ATTENUATION)
5483 #if defined(GL_LINEAR_ATTENUATION)
5484 case GL_LINEAR_ATTENUATION:
5485 #endif // defined(GL_LINEAR_ATTENUATION)
5486 #if defined(GL_QUADRATIC_ATTENUATION)
5487 case GL_QUADRATIC_ATTENUATION:
5488 #endif // defined(GL_QUADRATIC_ATTENUATION)
5489 _needed = 1;
5490 break;
5491 #if defined(GL_SPOT_DIRECTION)
5492 case GL_SPOT_DIRECTION:
5493 #endif // defined(GL_SPOT_DIRECTION)
5494 _needed = 3;
5495 break;
5496 #if defined(GL_AMBIENT)
5497 case GL_AMBIENT:
5498 #endif // defined(GL_AMBIENT)
5499 #if defined(GL_DIFFUSE)
5500 case GL_DIFFUSE:
5501 #endif // defined(GL_DIFFUSE)
5502 #if defined(GL_SPECULAR)
5503 case GL_SPECULAR:
5504 #endif // defined(GL_SPECULAR)
5505 #if defined(GL_EMISSION)
5506 case GL_EMISSION:
5507 #endif // defined(GL_EMISSION)
5508 _needed = 4;
5509 break;
5510 default:
5511 _needed = 1;
5512 break;
5513 }
5514 if (_remaining < _needed) {
5515 _exception = 1;
5516 _exceptionType = "java/lang/IllegalArgumentException";
5517 _exceptionMessage = "remaining() < needed";
5518 goto exit;
5519 }
5520 if (params == NULL) {
5521 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5522 params = (GLfixed *) (_paramsBase + _bufferOffset);
5523 }
5524 glGetLightxv(
5525 (GLenum)light,
5526 (GLenum)pname,
5527 (GLfixed *)params
5528 );
5529
5530 exit:
5531 if (_array) {
5532 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5533 }
5534 if (_exception) {
5535 jniThrowException(_env, _exceptionType, _exceptionMessage);
5536 }
5537 }
5538
5539 /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
5540 static void
android_glGetMaterialfv__II_3FI(JNIEnv * _env,jobject _this,jint face,jint pname,jfloatArray params_ref,jint offset)5541 android_glGetMaterialfv__II_3FI
5542 (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
5543 jint _exception = 0;
5544 const char * _exceptionType = NULL;
5545 const char * _exceptionMessage = NULL;
5546 GLfloat *params_base = (GLfloat *) 0;
5547 jint _remaining;
5548 GLfloat *params = (GLfloat *) 0;
5549
5550 if (!params_ref) {
5551 _exception = 1;
5552 _exceptionType = "java/lang/IllegalArgumentException";
5553 _exceptionMessage = "params == null";
5554 goto exit;
5555 }
5556 if (offset < 0) {
5557 _exception = 1;
5558 _exceptionType = "java/lang/IllegalArgumentException";
5559 _exceptionMessage = "offset < 0";
5560 goto exit;
5561 }
5562 _remaining = _env->GetArrayLength(params_ref) - offset;
5563 int _needed;
5564 switch (pname) {
5565 #if defined(GL_SHININESS)
5566 case GL_SHININESS:
5567 #endif // defined(GL_SHININESS)
5568 _needed = 1;
5569 break;
5570 #if defined(GL_AMBIENT)
5571 case GL_AMBIENT:
5572 #endif // defined(GL_AMBIENT)
5573 #if defined(GL_DIFFUSE)
5574 case GL_DIFFUSE:
5575 #endif // defined(GL_DIFFUSE)
5576 #if defined(GL_SPECULAR)
5577 case GL_SPECULAR:
5578 #endif // defined(GL_SPECULAR)
5579 #if defined(GL_EMISSION)
5580 case GL_EMISSION:
5581 #endif // defined(GL_EMISSION)
5582 #if defined(GL_AMBIENT_AND_DIFFUSE)
5583 case GL_AMBIENT_AND_DIFFUSE:
5584 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5585 _needed = 4;
5586 break;
5587 default:
5588 _needed = 1;
5589 break;
5590 }
5591 if (_remaining < _needed) {
5592 _exception = 1;
5593 _exceptionType = "java/lang/IllegalArgumentException";
5594 _exceptionMessage = "length - offset < needed";
5595 goto exit;
5596 }
5597 params_base = (GLfloat *)
5598 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
5599 params = params_base + offset;
5600
5601 glGetMaterialfv(
5602 (GLenum)face,
5603 (GLenum)pname,
5604 (GLfloat *)params
5605 );
5606
5607 exit:
5608 if (params_base) {
5609 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
5610 _exception ? JNI_ABORT: 0);
5611 }
5612 if (_exception) {
5613 jniThrowException(_env, _exceptionType, _exceptionMessage);
5614 }
5615 }
5616
5617 /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
5618 static void
android_glGetMaterialfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)5619 android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
5620 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
5621 jint _exception = 0;
5622 const char * _exceptionType = NULL;
5623 const char * _exceptionMessage = NULL;
5624 jfloatArray _array = (jfloatArray) 0;
5625 jint _bufferOffset = (jint) 0;
5626 jint _remaining;
5627 GLfloat *params = (GLfloat *) 0;
5628
5629 if (!params_buf) {
5630 _exception = 1;
5631 _exceptionType = "java/lang/IllegalArgumentException";
5632 _exceptionMessage = "params == null";
5633 goto exit;
5634 }
5635 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5636 int _needed;
5637 switch (pname) {
5638 #if defined(GL_SHININESS)
5639 case GL_SHININESS:
5640 #endif // defined(GL_SHININESS)
5641 _needed = 1;
5642 break;
5643 #if defined(GL_AMBIENT)
5644 case GL_AMBIENT:
5645 #endif // defined(GL_AMBIENT)
5646 #if defined(GL_DIFFUSE)
5647 case GL_DIFFUSE:
5648 #endif // defined(GL_DIFFUSE)
5649 #if defined(GL_SPECULAR)
5650 case GL_SPECULAR:
5651 #endif // defined(GL_SPECULAR)
5652 #if defined(GL_EMISSION)
5653 case GL_EMISSION:
5654 #endif // defined(GL_EMISSION)
5655 #if defined(GL_AMBIENT_AND_DIFFUSE)
5656 case GL_AMBIENT_AND_DIFFUSE:
5657 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5658 _needed = 4;
5659 break;
5660 default:
5661 _needed = 1;
5662 break;
5663 }
5664 if (_remaining < _needed) {
5665 _exception = 1;
5666 _exceptionType = "java/lang/IllegalArgumentException";
5667 _exceptionMessage = "remaining() < needed";
5668 goto exit;
5669 }
5670 if (params == NULL) {
5671 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5672 params = (GLfloat *) (_paramsBase + _bufferOffset);
5673 }
5674 glGetMaterialfv(
5675 (GLenum)face,
5676 (GLenum)pname,
5677 (GLfloat *)params
5678 );
5679
5680 exit:
5681 if (_array) {
5682 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
5683 }
5684 if (_exception) {
5685 jniThrowException(_env, _exceptionType, _exceptionMessage);
5686 }
5687 }
5688
5689 /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
5690 static void
android_glGetMaterialxv__II_3II(JNIEnv * _env,jobject _this,jint face,jint pname,jintArray params_ref,jint offset)5691 android_glGetMaterialxv__II_3II
5692 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
5693 jint _exception = 0;
5694 const char * _exceptionType = NULL;
5695 const char * _exceptionMessage = NULL;
5696 GLfixed *params_base = (GLfixed *) 0;
5697 jint _remaining;
5698 GLfixed *params = (GLfixed *) 0;
5699
5700 if (!params_ref) {
5701 _exception = 1;
5702 _exceptionType = "java/lang/IllegalArgumentException";
5703 _exceptionMessage = "params == null";
5704 goto exit;
5705 }
5706 if (offset < 0) {
5707 _exception = 1;
5708 _exceptionType = "java/lang/IllegalArgumentException";
5709 _exceptionMessage = "offset < 0";
5710 goto exit;
5711 }
5712 _remaining = _env->GetArrayLength(params_ref) - offset;
5713 int _needed;
5714 switch (pname) {
5715 #if defined(GL_SHININESS)
5716 case GL_SHININESS:
5717 #endif // defined(GL_SHININESS)
5718 _needed = 1;
5719 break;
5720 #if defined(GL_AMBIENT)
5721 case GL_AMBIENT:
5722 #endif // defined(GL_AMBIENT)
5723 #if defined(GL_DIFFUSE)
5724 case GL_DIFFUSE:
5725 #endif // defined(GL_DIFFUSE)
5726 #if defined(GL_SPECULAR)
5727 case GL_SPECULAR:
5728 #endif // defined(GL_SPECULAR)
5729 #if defined(GL_EMISSION)
5730 case GL_EMISSION:
5731 #endif // defined(GL_EMISSION)
5732 #if defined(GL_AMBIENT_AND_DIFFUSE)
5733 case GL_AMBIENT_AND_DIFFUSE:
5734 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5735 _needed = 4;
5736 break;
5737 default:
5738 _needed = 1;
5739 break;
5740 }
5741 if (_remaining < _needed) {
5742 _exception = 1;
5743 _exceptionType = "java/lang/IllegalArgumentException";
5744 _exceptionMessage = "length - offset < needed";
5745 goto exit;
5746 }
5747 params_base = (GLfixed *)
5748 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5749 params = params_base + offset;
5750
5751 glGetMaterialxv(
5752 (GLenum)face,
5753 (GLenum)pname,
5754 (GLfixed *)params
5755 );
5756
5757 exit:
5758 if (params_base) {
5759 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5760 _exception ? JNI_ABORT: 0);
5761 }
5762 if (_exception) {
5763 jniThrowException(_env, _exceptionType, _exceptionMessage);
5764 }
5765 }
5766
5767 /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
5768 static void
android_glGetMaterialxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint face,jint pname,jobject params_buf)5769 android_glGetMaterialxv__IILjava_nio_IntBuffer_2
5770 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
5771 jint _exception = 0;
5772 const char * _exceptionType = NULL;
5773 const char * _exceptionMessage = NULL;
5774 jintArray _array = (jintArray) 0;
5775 jint _bufferOffset = (jint) 0;
5776 jint _remaining;
5777 GLfixed *params = (GLfixed *) 0;
5778
5779 if (!params_buf) {
5780 _exception = 1;
5781 _exceptionType = "java/lang/IllegalArgumentException";
5782 _exceptionMessage = "params == null";
5783 goto exit;
5784 }
5785 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5786 int _needed;
5787 switch (pname) {
5788 #if defined(GL_SHININESS)
5789 case GL_SHININESS:
5790 #endif // defined(GL_SHININESS)
5791 _needed = 1;
5792 break;
5793 #if defined(GL_AMBIENT)
5794 case GL_AMBIENT:
5795 #endif // defined(GL_AMBIENT)
5796 #if defined(GL_DIFFUSE)
5797 case GL_DIFFUSE:
5798 #endif // defined(GL_DIFFUSE)
5799 #if defined(GL_SPECULAR)
5800 case GL_SPECULAR:
5801 #endif // defined(GL_SPECULAR)
5802 #if defined(GL_EMISSION)
5803 case GL_EMISSION:
5804 #endif // defined(GL_EMISSION)
5805 #if defined(GL_AMBIENT_AND_DIFFUSE)
5806 case GL_AMBIENT_AND_DIFFUSE:
5807 #endif // defined(GL_AMBIENT_AND_DIFFUSE)
5808 _needed = 4;
5809 break;
5810 default:
5811 _needed = 1;
5812 break;
5813 }
5814 if (_remaining < _needed) {
5815 _exception = 1;
5816 _exceptionType = "java/lang/IllegalArgumentException";
5817 _exceptionMessage = "remaining() < needed";
5818 goto exit;
5819 }
5820 if (params == NULL) {
5821 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5822 params = (GLfixed *) (_paramsBase + _bufferOffset);
5823 }
5824 glGetMaterialxv(
5825 (GLenum)face,
5826 (GLenum)pname,
5827 (GLfixed *)params
5828 );
5829
5830 exit:
5831 if (_array) {
5832 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5833 }
5834 if (_exception) {
5835 jniThrowException(_env, _exceptionType, _exceptionMessage);
5836 }
5837 }
5838
5839 /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
5840 static void
android_glGetTexEnviv__II_3II(JNIEnv * _env,jobject _this,jint env,jint pname,jintArray params_ref,jint offset)5841 android_glGetTexEnviv__II_3II
5842 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
5843 jint _exception = 0;
5844 const char * _exceptionType = NULL;
5845 const char * _exceptionMessage = NULL;
5846 GLint *params_base = (GLint *) 0;
5847 jint _remaining;
5848 GLint *params = (GLint *) 0;
5849
5850 if (!params_ref) {
5851 _exception = 1;
5852 _exceptionType = "java/lang/IllegalArgumentException";
5853 _exceptionMessage = "params == null";
5854 goto exit;
5855 }
5856 if (offset < 0) {
5857 _exception = 1;
5858 _exceptionType = "java/lang/IllegalArgumentException";
5859 _exceptionMessage = "offset < 0";
5860 goto exit;
5861 }
5862 _remaining = _env->GetArrayLength(params_ref) - offset;
5863 int _needed;
5864 switch (pname) {
5865 #if defined(GL_TEXTURE_ENV_MODE)
5866 case GL_TEXTURE_ENV_MODE:
5867 #endif // defined(GL_TEXTURE_ENV_MODE)
5868 #if defined(GL_COMBINE_RGB)
5869 case GL_COMBINE_RGB:
5870 #endif // defined(GL_COMBINE_RGB)
5871 #if defined(GL_COMBINE_ALPHA)
5872 case GL_COMBINE_ALPHA:
5873 #endif // defined(GL_COMBINE_ALPHA)
5874 _needed = 1;
5875 break;
5876 #if defined(GL_TEXTURE_ENV_COLOR)
5877 case GL_TEXTURE_ENV_COLOR:
5878 #endif // defined(GL_TEXTURE_ENV_COLOR)
5879 _needed = 4;
5880 break;
5881 default:
5882 _needed = 1;
5883 break;
5884 }
5885 if (_remaining < _needed) {
5886 _exception = 1;
5887 _exceptionType = "java/lang/IllegalArgumentException";
5888 _exceptionMessage = "length - offset < needed";
5889 goto exit;
5890 }
5891 params_base = (GLint *)
5892 _env->GetIntArrayElements(params_ref, (jboolean *)0);
5893 params = params_base + offset;
5894
5895 glGetTexEnviv(
5896 (GLenum)env,
5897 (GLenum)pname,
5898 (GLint *)params
5899 );
5900
5901 exit:
5902 if (params_base) {
5903 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
5904 _exception ? JNI_ABORT: 0);
5905 }
5906 if (_exception) {
5907 jniThrowException(_env, _exceptionType, _exceptionMessage);
5908 }
5909 }
5910
5911 /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
5912 static void
android_glGetTexEnviv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint env,jint pname,jobject params_buf)5913 android_glGetTexEnviv__IILjava_nio_IntBuffer_2
5914 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
5915 jint _exception = 0;
5916 const char * _exceptionType = NULL;
5917 const char * _exceptionMessage = NULL;
5918 jintArray _array = (jintArray) 0;
5919 jint _bufferOffset = (jint) 0;
5920 jint _remaining;
5921 GLint *params = (GLint *) 0;
5922
5923 if (!params_buf) {
5924 _exception = 1;
5925 _exceptionType = "java/lang/IllegalArgumentException";
5926 _exceptionMessage = "params == null";
5927 goto exit;
5928 }
5929 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5930 int _needed;
5931 switch (pname) {
5932 #if defined(GL_TEXTURE_ENV_MODE)
5933 case GL_TEXTURE_ENV_MODE:
5934 #endif // defined(GL_TEXTURE_ENV_MODE)
5935 #if defined(GL_COMBINE_RGB)
5936 case GL_COMBINE_RGB:
5937 #endif // defined(GL_COMBINE_RGB)
5938 #if defined(GL_COMBINE_ALPHA)
5939 case GL_COMBINE_ALPHA:
5940 #endif // defined(GL_COMBINE_ALPHA)
5941 _needed = 1;
5942 break;
5943 #if defined(GL_TEXTURE_ENV_COLOR)
5944 case GL_TEXTURE_ENV_COLOR:
5945 #endif // defined(GL_TEXTURE_ENV_COLOR)
5946 _needed = 4;
5947 break;
5948 default:
5949 _needed = 1;
5950 break;
5951 }
5952 if (_remaining < _needed) {
5953 _exception = 1;
5954 _exceptionType = "java/lang/IllegalArgumentException";
5955 _exceptionMessage = "remaining() < needed";
5956 goto exit;
5957 }
5958 if (params == NULL) {
5959 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5960 params = (GLint *) (_paramsBase + _bufferOffset);
5961 }
5962 glGetTexEnviv(
5963 (GLenum)env,
5964 (GLenum)pname,
5965 (GLint *)params
5966 );
5967
5968 exit:
5969 if (_array) {
5970 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
5971 }
5972 if (_exception) {
5973 jniThrowException(_env, _exceptionType, _exceptionMessage);
5974 }
5975 }
5976
5977 /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
5978 static void
android_glGetTexEnvxv__II_3II(JNIEnv * _env,jobject _this,jint env,jint pname,jintArray params_ref,jint offset)5979 android_glGetTexEnvxv__II_3II
5980 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
5981 jint _exception = 0;
5982 const char * _exceptionType = NULL;
5983 const char * _exceptionMessage = NULL;
5984 GLfixed *params_base = (GLfixed *) 0;
5985 jint _remaining;
5986 GLfixed *params = (GLfixed *) 0;
5987
5988 if (!params_ref) {
5989 _exception = 1;
5990 _exceptionType = "java/lang/IllegalArgumentException";
5991 _exceptionMessage = "params == null";
5992 goto exit;
5993 }
5994 if (offset < 0) {
5995 _exception = 1;
5996 _exceptionType = "java/lang/IllegalArgumentException";
5997 _exceptionMessage = "offset < 0";
5998 goto exit;
5999 }
6000 _remaining = _env->GetArrayLength(params_ref) - offset;
6001 int _needed;
6002 switch (pname) {
6003 #if defined(GL_TEXTURE_ENV_MODE)
6004 case GL_TEXTURE_ENV_MODE:
6005 #endif // defined(GL_TEXTURE_ENV_MODE)
6006 #if defined(GL_COMBINE_RGB)
6007 case GL_COMBINE_RGB:
6008 #endif // defined(GL_COMBINE_RGB)
6009 #if defined(GL_COMBINE_ALPHA)
6010 case GL_COMBINE_ALPHA:
6011 #endif // defined(GL_COMBINE_ALPHA)
6012 _needed = 1;
6013 break;
6014 #if defined(GL_TEXTURE_ENV_COLOR)
6015 case GL_TEXTURE_ENV_COLOR:
6016 #endif // defined(GL_TEXTURE_ENV_COLOR)
6017 _needed = 4;
6018 break;
6019 default:
6020 _needed = 1;
6021 break;
6022 }
6023 if (_remaining < _needed) {
6024 _exception = 1;
6025 _exceptionType = "java/lang/IllegalArgumentException";
6026 _exceptionMessage = "length - offset < needed";
6027 goto exit;
6028 }
6029 params_base = (GLfixed *)
6030 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6031 params = params_base + offset;
6032
6033 glGetTexEnvxv(
6034 (GLenum)env,
6035 (GLenum)pname,
6036 (GLfixed *)params
6037 );
6038
6039 exit:
6040 if (params_base) {
6041 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6042 _exception ? JNI_ABORT: 0);
6043 }
6044 if (_exception) {
6045 jniThrowException(_env, _exceptionType, _exceptionMessage);
6046 }
6047 }
6048
6049 /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
6050 static void
android_glGetTexEnvxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint env,jint pname,jobject params_buf)6051 android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
6052 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
6053 jint _exception = 0;
6054 const char * _exceptionType = NULL;
6055 const char * _exceptionMessage = NULL;
6056 jintArray _array = (jintArray) 0;
6057 jint _bufferOffset = (jint) 0;
6058 jint _remaining;
6059 GLfixed *params = (GLfixed *) 0;
6060
6061 if (!params_buf) {
6062 _exception = 1;
6063 _exceptionType = "java/lang/IllegalArgumentException";
6064 _exceptionMessage = "params == null";
6065 goto exit;
6066 }
6067 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6068 int _needed;
6069 switch (pname) {
6070 #if defined(GL_TEXTURE_ENV_MODE)
6071 case GL_TEXTURE_ENV_MODE:
6072 #endif // defined(GL_TEXTURE_ENV_MODE)
6073 #if defined(GL_COMBINE_RGB)
6074 case GL_COMBINE_RGB:
6075 #endif // defined(GL_COMBINE_RGB)
6076 #if defined(GL_COMBINE_ALPHA)
6077 case GL_COMBINE_ALPHA:
6078 #endif // defined(GL_COMBINE_ALPHA)
6079 _needed = 1;
6080 break;
6081 #if defined(GL_TEXTURE_ENV_COLOR)
6082 case GL_TEXTURE_ENV_COLOR:
6083 #endif // defined(GL_TEXTURE_ENV_COLOR)
6084 _needed = 4;
6085 break;
6086 default:
6087 _needed = 1;
6088 break;
6089 }
6090 if (_remaining < _needed) {
6091 _exception = 1;
6092 _exceptionType = "java/lang/IllegalArgumentException";
6093 _exceptionMessage = "remaining() < needed";
6094 goto exit;
6095 }
6096 if (params == NULL) {
6097 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6098 params = (GLfixed *) (_paramsBase + _bufferOffset);
6099 }
6100 glGetTexEnvxv(
6101 (GLenum)env,
6102 (GLenum)pname,
6103 (GLfixed *)params
6104 );
6105
6106 exit:
6107 if (_array) {
6108 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
6109 }
6110 if (_exception) {
6111 jniThrowException(_env, _exceptionType, _exceptionMessage);
6112 }
6113 }
6114
6115 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
6116 static void
android_glGetTexParameterfv__II_3FI(JNIEnv * _env,jobject _this,jint target,jint pname,jfloatArray params_ref,jint offset)6117 android_glGetTexParameterfv__II_3FI
6118 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
6119 jint _exception = 0;
6120 const char * _exceptionType = NULL;
6121 const char * _exceptionMessage = NULL;
6122 GLfloat *params_base = (GLfloat *) 0;
6123 jint _remaining;
6124 GLfloat *params = (GLfloat *) 0;
6125
6126 if (!params_ref) {
6127 _exception = 1;
6128 _exceptionType = "java/lang/IllegalArgumentException";
6129 _exceptionMessage = "params == null";
6130 goto exit;
6131 }
6132 if (offset < 0) {
6133 _exception = 1;
6134 _exceptionType = "java/lang/IllegalArgumentException";
6135 _exceptionMessage = "offset < 0";
6136 goto exit;
6137 }
6138 _remaining = _env->GetArrayLength(params_ref) - offset;
6139 if (_remaining < 1) {
6140 _exception = 1;
6141 _exceptionType = "java/lang/IllegalArgumentException";
6142 _exceptionMessage = "length - offset < 1 < needed";
6143 goto exit;
6144 }
6145 params_base = (GLfloat *)
6146 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
6147 params = params_base + offset;
6148
6149 glGetTexParameterfv(
6150 (GLenum)target,
6151 (GLenum)pname,
6152 (GLfloat *)params
6153 );
6154
6155 exit:
6156 if (params_base) {
6157 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
6158 _exception ? JNI_ABORT: 0);
6159 }
6160 if (_exception) {
6161 jniThrowException(_env, _exceptionType, _exceptionMessage);
6162 }
6163 }
6164
6165 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
6166 static void
android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6167 android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
6168 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6169 jint _exception = 0;
6170 const char * _exceptionType = NULL;
6171 const char * _exceptionMessage = NULL;
6172 jfloatArray _array = (jfloatArray) 0;
6173 jint _bufferOffset = (jint) 0;
6174 jint _remaining;
6175 GLfloat *params = (GLfloat *) 0;
6176
6177 if (!params_buf) {
6178 _exception = 1;
6179 _exceptionType = "java/lang/IllegalArgumentException";
6180 _exceptionMessage = "params == null";
6181 goto exit;
6182 }
6183 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6184 if (_remaining < 1) {
6185 _exception = 1;
6186 _exceptionType = "java/lang/IllegalArgumentException";
6187 _exceptionMessage = "remaining() < 1 < needed";
6188 goto exit;
6189 }
6190 if (params == NULL) {
6191 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
6192 params = (GLfloat *) (_paramsBase + _bufferOffset);
6193 }
6194 glGetTexParameterfv(
6195 (GLenum)target,
6196 (GLenum)pname,
6197 (GLfloat *)params
6198 );
6199
6200 exit:
6201 if (_array) {
6202 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
6203 }
6204 if (_exception) {
6205 jniThrowException(_env, _exceptionType, _exceptionMessage);
6206 }
6207 }
6208
6209 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
6210 static void
android_glGetTexParameteriv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6211 android_glGetTexParameteriv__II_3II
6212 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6213 jint _exception = 0;
6214 const char * _exceptionType = NULL;
6215 const char * _exceptionMessage = NULL;
6216 GLint *params_base = (GLint *) 0;
6217 jint _remaining;
6218 GLint *params = (GLint *) 0;
6219
6220 if (!params_ref) {
6221 _exception = 1;
6222 _exceptionType = "java/lang/IllegalArgumentException";
6223 _exceptionMessage = "params == null";
6224 goto exit;
6225 }
6226 if (offset < 0) {
6227 _exception = 1;
6228 _exceptionType = "java/lang/IllegalArgumentException";
6229 _exceptionMessage = "offset < 0";
6230 goto exit;
6231 }
6232 _remaining = _env->GetArrayLength(params_ref) - offset;
6233 if (_remaining < 1) {
6234 _exception = 1;
6235 _exceptionType = "java/lang/IllegalArgumentException";
6236 _exceptionMessage = "length - offset < 1 < needed";
6237 goto exit;
6238 }
6239 params_base = (GLint *)
6240 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6241 params = params_base + offset;
6242
6243 glGetTexParameteriv(
6244 (GLenum)target,
6245 (GLenum)pname,
6246 (GLint *)params
6247 );
6248
6249 exit:
6250 if (params_base) {
6251 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6252 _exception ? JNI_ABORT: 0);
6253 }
6254 if (_exception) {
6255 jniThrowException(_env, _exceptionType, _exceptionMessage);
6256 }
6257 }
6258
6259 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
6260 static void
android_glGetTexParameteriv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6261 android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
6262 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6263 jint _exception = 0;
6264 const char * _exceptionType = NULL;
6265 const char * _exceptionMessage = NULL;
6266 jintArray _array = (jintArray) 0;
6267 jint _bufferOffset = (jint) 0;
6268 jint _remaining;
6269 GLint *params = (GLint *) 0;
6270
6271 if (!params_buf) {
6272 _exception = 1;
6273 _exceptionType = "java/lang/IllegalArgumentException";
6274 _exceptionMessage = "params == null";
6275 goto exit;
6276 }
6277 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6278 if (_remaining < 1) {
6279 _exception = 1;
6280 _exceptionType = "java/lang/IllegalArgumentException";
6281 _exceptionMessage = "remaining() < 1 < needed";
6282 goto exit;
6283 }
6284 if (params == NULL) {
6285 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6286 params = (GLint *) (_paramsBase + _bufferOffset);
6287 }
6288 glGetTexParameteriv(
6289 (GLenum)target,
6290 (GLenum)pname,
6291 (GLint *)params
6292 );
6293
6294 exit:
6295 if (_array) {
6296 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
6297 }
6298 if (_exception) {
6299 jniThrowException(_env, _exceptionType, _exceptionMessage);
6300 }
6301 }
6302
6303 /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
6304 static void
android_glGetTexParameterxv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6305 android_glGetTexParameterxv__II_3II
6306 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6307 jint _exception = 0;
6308 const char * _exceptionType = NULL;
6309 const char * _exceptionMessage = NULL;
6310 GLfixed *params_base = (GLfixed *) 0;
6311 jint _remaining;
6312 GLfixed *params = (GLfixed *) 0;
6313
6314 if (!params_ref) {
6315 _exception = 1;
6316 _exceptionType = "java/lang/IllegalArgumentException";
6317 _exceptionMessage = "params == null";
6318 goto exit;
6319 }
6320 if (offset < 0) {
6321 _exception = 1;
6322 _exceptionType = "java/lang/IllegalArgumentException";
6323 _exceptionMessage = "offset < 0";
6324 goto exit;
6325 }
6326 _remaining = _env->GetArrayLength(params_ref) - offset;
6327 if (_remaining < 1) {
6328 _exception = 1;
6329 _exceptionType = "java/lang/IllegalArgumentException";
6330 _exceptionMessage = "length - offset < 1 < needed";
6331 goto exit;
6332 }
6333 params_base = (GLfixed *)
6334 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6335 params = params_base + offset;
6336
6337 glGetTexParameterxv(
6338 (GLenum)target,
6339 (GLenum)pname,
6340 (GLfixed *)params
6341 );
6342
6343 exit:
6344 if (params_base) {
6345 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6346 _exception ? JNI_ABORT: 0);
6347 }
6348 if (_exception) {
6349 jniThrowException(_env, _exceptionType, _exceptionMessage);
6350 }
6351 }
6352
6353 /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
6354 static void
android_glGetTexParameterxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6355 android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
6356 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6357 jint _exception = 0;
6358 const char * _exceptionType = NULL;
6359 const char * _exceptionMessage = NULL;
6360 jintArray _array = (jintArray) 0;
6361 jint _bufferOffset = (jint) 0;
6362 jint _remaining;
6363 GLfixed *params = (GLfixed *) 0;
6364
6365 if (!params_buf) {
6366 _exception = 1;
6367 _exceptionType = "java/lang/IllegalArgumentException";
6368 _exceptionMessage = "params == null";
6369 goto exit;
6370 }
6371 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6372 if (_remaining < 1) {
6373 _exception = 1;
6374 _exceptionType = "java/lang/IllegalArgumentException";
6375 _exceptionMessage = "remaining() < 1 < needed";
6376 goto exit;
6377 }
6378 if (params == NULL) {
6379 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6380 params = (GLfixed *) (_paramsBase + _bufferOffset);
6381 }
6382 glGetTexParameterxv(
6383 (GLenum)target,
6384 (GLenum)pname,
6385 (GLfixed *)params
6386 );
6387
6388 exit:
6389 if (_array) {
6390 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
6391 }
6392 if (_exception) {
6393 jniThrowException(_env, _exceptionType, _exceptionMessage);
6394 }
6395 }
6396
6397 /* GLboolean glIsBuffer ( GLuint buffer ) */
6398 static jboolean
android_glIsBuffer__I(JNIEnv * _env,jobject _this,jint buffer)6399 android_glIsBuffer__I
6400 (JNIEnv *_env, jobject _this, jint buffer) {
6401 GLboolean _returnValue;
6402 _returnValue = glIsBuffer(
6403 (GLuint)buffer
6404 );
6405 return (jboolean)_returnValue;
6406 }
6407
6408 /* GLboolean glIsEnabled ( GLenum cap ) */
6409 static jboolean
android_glIsEnabled__I(JNIEnv * _env,jobject _this,jint cap)6410 android_glIsEnabled__I
6411 (JNIEnv *_env, jobject _this, jint cap) {
6412 GLboolean _returnValue;
6413 _returnValue = glIsEnabled(
6414 (GLenum)cap
6415 );
6416 return (jboolean)_returnValue;
6417 }
6418
6419 /* GLboolean glIsTexture ( GLuint texture ) */
6420 static jboolean
android_glIsTexture__I(JNIEnv * _env,jobject _this,jint texture)6421 android_glIsTexture__I
6422 (JNIEnv *_env, jobject _this, jint texture) {
6423 GLboolean _returnValue;
6424 _returnValue = glIsTexture(
6425 (GLuint)texture
6426 );
6427 return (jboolean)_returnValue;
6428 }
6429
6430 /* void glNormalPointer ( GLenum type, GLsizei stride, GLint offset ) */
6431 static void
android_glNormalPointer__III(JNIEnv * _env,jobject _this,jint type,jint stride,jint offset)6432 android_glNormalPointer__III
6433 (JNIEnv *_env, jobject _this, jint type, jint stride, jint offset) {
6434 glNormalPointer(
6435 (GLenum)type,
6436 (GLsizei)stride,
6437 reinterpret_cast<GLvoid *>(offset)
6438 );
6439 }
6440
6441 /* void glPointParameterf ( GLenum pname, GLfloat param ) */
6442 static void
android_glPointParameterf__IF(JNIEnv * _env,jobject _this,jint pname,jfloat param)6443 android_glPointParameterf__IF
6444 (JNIEnv *_env, jobject _this, jint pname, jfloat param) {
6445 glPointParameterf(
6446 (GLenum)pname,
6447 (GLfloat)param
6448 );
6449 }
6450
6451 /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
6452 static void
android_glPointParameterfv__I_3FI(JNIEnv * _env,jobject _this,jint pname,jfloatArray params_ref,jint offset)6453 android_glPointParameterfv__I_3FI
6454 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
6455 jint _exception = 0;
6456 const char * _exceptionType = NULL;
6457 const char * _exceptionMessage = NULL;
6458 GLfloat *params_base = (GLfloat *) 0;
6459 jint _remaining;
6460 GLfloat *params = (GLfloat *) 0;
6461
6462 if (!params_ref) {
6463 _exception = 1;
6464 _exceptionType = "java/lang/IllegalArgumentException";
6465 _exceptionMessage = "params == null";
6466 goto exit;
6467 }
6468 if (offset < 0) {
6469 _exception = 1;
6470 _exceptionType = "java/lang/IllegalArgumentException";
6471 _exceptionMessage = "offset < 0";
6472 goto exit;
6473 }
6474 _remaining = _env->GetArrayLength(params_ref) - offset;
6475 if (_remaining < 1) {
6476 _exception = 1;
6477 _exceptionType = "java/lang/IllegalArgumentException";
6478 _exceptionMessage = "length - offset < 1 < needed";
6479 goto exit;
6480 }
6481 params_base = (GLfloat *)
6482 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
6483 params = params_base + offset;
6484
6485 glPointParameterfv(
6486 (GLenum)pname,
6487 (GLfloat *)params
6488 );
6489
6490 exit:
6491 if (params_base) {
6492 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
6493 JNI_ABORT);
6494 }
6495 if (_exception) {
6496 jniThrowException(_env, _exceptionType, _exceptionMessage);
6497 }
6498 }
6499
6500 /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
6501 static void
android_glPointParameterfv__ILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)6502 android_glPointParameterfv__ILjava_nio_FloatBuffer_2
6503 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
6504 jint _exception = 0;
6505 const char * _exceptionType = NULL;
6506 const char * _exceptionMessage = NULL;
6507 jfloatArray _array = (jfloatArray) 0;
6508 jint _bufferOffset = (jint) 0;
6509 jint _remaining;
6510 GLfloat *params = (GLfloat *) 0;
6511
6512 if (!params_buf) {
6513 _exception = 1;
6514 _exceptionType = "java/lang/IllegalArgumentException";
6515 _exceptionMessage = "params == null";
6516 goto exit;
6517 }
6518 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6519 if (_remaining < 1) {
6520 _exception = 1;
6521 _exceptionType = "java/lang/IllegalArgumentException";
6522 _exceptionMessage = "remaining() < 1 < needed";
6523 goto exit;
6524 }
6525 if (params == NULL) {
6526 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
6527 params = (GLfloat *) (_paramsBase + _bufferOffset);
6528 }
6529 glPointParameterfv(
6530 (GLenum)pname,
6531 (GLfloat *)params
6532 );
6533
6534 exit:
6535 if (_array) {
6536 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
6537 }
6538 if (_exception) {
6539 jniThrowException(_env, _exceptionType, _exceptionMessage);
6540 }
6541 }
6542
6543 /* void glPointParameterx ( GLenum pname, GLfixed param ) */
6544 static void
android_glPointParameterx__II(JNIEnv * _env,jobject _this,jint pname,jint param)6545 android_glPointParameterx__II
6546 (JNIEnv *_env, jobject _this, jint pname, jint param) {
6547 glPointParameterx(
6548 (GLenum)pname,
6549 (GLfixed)param
6550 );
6551 }
6552
6553 /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
6554 static void
android_glPointParameterxv__I_3II(JNIEnv * _env,jobject _this,jint pname,jintArray params_ref,jint offset)6555 android_glPointParameterxv__I_3II
6556 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
6557 jint _exception = 0;
6558 const char * _exceptionType = NULL;
6559 const char * _exceptionMessage = NULL;
6560 GLfixed *params_base = (GLfixed *) 0;
6561 jint _remaining;
6562 GLfixed *params = (GLfixed *) 0;
6563
6564 if (!params_ref) {
6565 _exception = 1;
6566 _exceptionType = "java/lang/IllegalArgumentException";
6567 _exceptionMessage = "params == null";
6568 goto exit;
6569 }
6570 if (offset < 0) {
6571 _exception = 1;
6572 _exceptionType = "java/lang/IllegalArgumentException";
6573 _exceptionMessage = "offset < 0";
6574 goto exit;
6575 }
6576 _remaining = _env->GetArrayLength(params_ref) - offset;
6577 if (_remaining < 1) {
6578 _exception = 1;
6579 _exceptionType = "java/lang/IllegalArgumentException";
6580 _exceptionMessage = "length - offset < 1 < needed";
6581 goto exit;
6582 }
6583 params_base = (GLfixed *)
6584 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6585 params = params_base + offset;
6586
6587 glPointParameterxv(
6588 (GLenum)pname,
6589 (GLfixed *)params
6590 );
6591
6592 exit:
6593 if (params_base) {
6594 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6595 JNI_ABORT);
6596 }
6597 if (_exception) {
6598 jniThrowException(_env, _exceptionType, _exceptionMessage);
6599 }
6600 }
6601
6602 /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
6603 static void
android_glPointParameterxv__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint pname,jobject params_buf)6604 android_glPointParameterxv__ILjava_nio_IntBuffer_2
6605 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
6606 jint _exception = 0;
6607 const char * _exceptionType = NULL;
6608 const char * _exceptionMessage = NULL;
6609 jintArray _array = (jintArray) 0;
6610 jint _bufferOffset = (jint) 0;
6611 jint _remaining;
6612 GLfixed *params = (GLfixed *) 0;
6613
6614 if (!params_buf) {
6615 _exception = 1;
6616 _exceptionType = "java/lang/IllegalArgumentException";
6617 _exceptionMessage = "params == null";
6618 goto exit;
6619 }
6620 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6621 if (_remaining < 1) {
6622 _exception = 1;
6623 _exceptionType = "java/lang/IllegalArgumentException";
6624 _exceptionMessage = "remaining() < 1 < needed";
6625 goto exit;
6626 }
6627 if (params == NULL) {
6628 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6629 params = (GLfixed *) (_paramsBase + _bufferOffset);
6630 }
6631 glPointParameterxv(
6632 (GLenum)pname,
6633 (GLfixed *)params
6634 );
6635
6636 exit:
6637 if (_array) {
6638 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
6639 }
6640 if (_exception) {
6641 jniThrowException(_env, _exceptionType, _exceptionMessage);
6642 }
6643 }
6644
6645 /* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
6646 static void
android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint type,jint stride,jobject pointer_buf,jint remaining)6647 android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I
6648 (JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
6649 jint _exception = 0;
6650 const char * _exceptionType = NULL;
6651 const char * _exceptionMessage = NULL;
6652 jarray _array = (jarray) 0;
6653 jint _bufferOffset = (jint) 0;
6654 jint _remaining;
6655 GLvoid *pointer = (GLvoid *) 0;
6656
6657 if (pointer_buf) {
6658 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
6659 if ( ! pointer ) {
6660 return;
6661 }
6662 }
6663 glPointSizePointerOESBounds(
6664 (GLenum)type,
6665 (GLsizei)stride,
6666 (GLvoid *)pointer,
6667 (GLsizei)remaining
6668 );
6669 if (_exception) {
6670 jniThrowException(_env, _exceptionType, _exceptionMessage);
6671 }
6672 }
6673
6674 /* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
6675 static void
android_glTexCoordPointer__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)6676 android_glTexCoordPointer__IIII
6677 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
6678 glTexCoordPointer(
6679 (GLint)size,
6680 (GLenum)type,
6681 (GLsizei)stride,
6682 reinterpret_cast<GLvoid *>(offset)
6683 );
6684 }
6685
6686 /* void glTexEnvi ( GLenum target, GLenum pname, GLint param ) */
6687 static void
android_glTexEnvi__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)6688 android_glTexEnvi__III
6689 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
6690 glTexEnvi(
6691 (GLenum)target,
6692 (GLenum)pname,
6693 (GLint)param
6694 );
6695 }
6696
6697 /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
6698 static void
android_glTexEnviv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6699 android_glTexEnviv__II_3II
6700 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6701 jint _exception = 0;
6702 const char * _exceptionType = NULL;
6703 const char * _exceptionMessage = NULL;
6704 GLint *params_base = (GLint *) 0;
6705 jint _remaining;
6706 GLint *params = (GLint *) 0;
6707
6708 if (!params_ref) {
6709 _exception = 1;
6710 _exceptionType = "java/lang/IllegalArgumentException";
6711 _exceptionMessage = "params == null";
6712 goto exit;
6713 }
6714 if (offset < 0) {
6715 _exception = 1;
6716 _exceptionType = "java/lang/IllegalArgumentException";
6717 _exceptionMessage = "offset < 0";
6718 goto exit;
6719 }
6720 _remaining = _env->GetArrayLength(params_ref) - offset;
6721 int _needed;
6722 switch (pname) {
6723 #if defined(GL_TEXTURE_ENV_MODE)
6724 case GL_TEXTURE_ENV_MODE:
6725 #endif // defined(GL_TEXTURE_ENV_MODE)
6726 #if defined(GL_COMBINE_RGB)
6727 case GL_COMBINE_RGB:
6728 #endif // defined(GL_COMBINE_RGB)
6729 #if defined(GL_COMBINE_ALPHA)
6730 case GL_COMBINE_ALPHA:
6731 #endif // defined(GL_COMBINE_ALPHA)
6732 _needed = 1;
6733 break;
6734 #if defined(GL_TEXTURE_ENV_COLOR)
6735 case GL_TEXTURE_ENV_COLOR:
6736 #endif // defined(GL_TEXTURE_ENV_COLOR)
6737 _needed = 4;
6738 break;
6739 default:
6740 _needed = 1;
6741 break;
6742 }
6743 if (_remaining < _needed) {
6744 _exception = 1;
6745 _exceptionType = "java/lang/IllegalArgumentException";
6746 _exceptionMessage = "length - offset < needed";
6747 goto exit;
6748 }
6749 params_base = (GLint *)
6750 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6751 params = params_base + offset;
6752
6753 glTexEnviv(
6754 (GLenum)target,
6755 (GLenum)pname,
6756 (GLint *)params
6757 );
6758
6759 exit:
6760 if (params_base) {
6761 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6762 JNI_ABORT);
6763 }
6764 if (_exception) {
6765 jniThrowException(_env, _exceptionType, _exceptionMessage);
6766 }
6767 }
6768
6769 /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
6770 static void
android_glTexEnviv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6771 android_glTexEnviv__IILjava_nio_IntBuffer_2
6772 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6773 jint _exception = 0;
6774 const char * _exceptionType = NULL;
6775 const char * _exceptionMessage = NULL;
6776 jintArray _array = (jintArray) 0;
6777 jint _bufferOffset = (jint) 0;
6778 jint _remaining;
6779 GLint *params = (GLint *) 0;
6780
6781 if (!params_buf) {
6782 _exception = 1;
6783 _exceptionType = "java/lang/IllegalArgumentException";
6784 _exceptionMessage = "params == null";
6785 goto exit;
6786 }
6787 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6788 int _needed;
6789 switch (pname) {
6790 #if defined(GL_TEXTURE_ENV_MODE)
6791 case GL_TEXTURE_ENV_MODE:
6792 #endif // defined(GL_TEXTURE_ENV_MODE)
6793 #if defined(GL_COMBINE_RGB)
6794 case GL_COMBINE_RGB:
6795 #endif // defined(GL_COMBINE_RGB)
6796 #if defined(GL_COMBINE_ALPHA)
6797 case GL_COMBINE_ALPHA:
6798 #endif // defined(GL_COMBINE_ALPHA)
6799 _needed = 1;
6800 break;
6801 #if defined(GL_TEXTURE_ENV_COLOR)
6802 case GL_TEXTURE_ENV_COLOR:
6803 #endif // defined(GL_TEXTURE_ENV_COLOR)
6804 _needed = 4;
6805 break;
6806 default:
6807 _needed = 1;
6808 break;
6809 }
6810 if (_remaining < _needed) {
6811 _exception = 1;
6812 _exceptionType = "java/lang/IllegalArgumentException";
6813 _exceptionMessage = "remaining() < needed";
6814 goto exit;
6815 }
6816 if (params == NULL) {
6817 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
6818 params = (GLint *) (_paramsBase + _bufferOffset);
6819 }
6820 glTexEnviv(
6821 (GLenum)target,
6822 (GLenum)pname,
6823 (GLint *)params
6824 );
6825
6826 exit:
6827 if (_array) {
6828 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
6829 }
6830 if (_exception) {
6831 jniThrowException(_env, _exceptionType, _exceptionMessage);
6832 }
6833 }
6834
6835 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
6836 static void
android_glTexParameterfv__II_3FI(JNIEnv * _env,jobject _this,jint target,jint pname,jfloatArray params_ref,jint offset)6837 android_glTexParameterfv__II_3FI
6838 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
6839 jint _exception = 0;
6840 const char * _exceptionType = NULL;
6841 const char * _exceptionMessage = NULL;
6842 GLfloat *params_base = (GLfloat *) 0;
6843 jint _remaining;
6844 GLfloat *params = (GLfloat *) 0;
6845
6846 if (!params_ref) {
6847 _exception = 1;
6848 _exceptionType = "java/lang/IllegalArgumentException";
6849 _exceptionMessage = "params == null";
6850 goto exit;
6851 }
6852 if (offset < 0) {
6853 _exception = 1;
6854 _exceptionType = "java/lang/IllegalArgumentException";
6855 _exceptionMessage = "offset < 0";
6856 goto exit;
6857 }
6858 _remaining = _env->GetArrayLength(params_ref) - offset;
6859 if (_remaining < 1) {
6860 _exception = 1;
6861 _exceptionType = "java/lang/IllegalArgumentException";
6862 _exceptionMessage = "length - offset < 1 < needed";
6863 goto exit;
6864 }
6865 params_base = (GLfloat *)
6866 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
6867 params = params_base + offset;
6868
6869 glTexParameterfv(
6870 (GLenum)target,
6871 (GLenum)pname,
6872 (GLfloat *)params
6873 );
6874
6875 exit:
6876 if (params_base) {
6877 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
6878 JNI_ABORT);
6879 }
6880 if (_exception) {
6881 jniThrowException(_env, _exceptionType, _exceptionMessage);
6882 }
6883 }
6884
6885 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
6886 static void
android_glTexParameterfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6887 android_glTexParameterfv__IILjava_nio_FloatBuffer_2
6888 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6889 jint _exception = 0;
6890 const char * _exceptionType = NULL;
6891 const char * _exceptionMessage = NULL;
6892 jfloatArray _array = (jfloatArray) 0;
6893 jint _bufferOffset = (jint) 0;
6894 jint _remaining;
6895 GLfloat *params = (GLfloat *) 0;
6896
6897 if (!params_buf) {
6898 _exception = 1;
6899 _exceptionType = "java/lang/IllegalArgumentException";
6900 _exceptionMessage = "params == null";
6901 goto exit;
6902 }
6903 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6904 if (_remaining < 1) {
6905 _exception = 1;
6906 _exceptionType = "java/lang/IllegalArgumentException";
6907 _exceptionMessage = "remaining() < 1 < needed";
6908 goto exit;
6909 }
6910 if (params == NULL) {
6911 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
6912 params = (GLfloat *) (_paramsBase + _bufferOffset);
6913 }
6914 glTexParameterfv(
6915 (GLenum)target,
6916 (GLenum)pname,
6917 (GLfloat *)params
6918 );
6919
6920 exit:
6921 if (_array) {
6922 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
6923 }
6924 if (_exception) {
6925 jniThrowException(_env, _exceptionType, _exceptionMessage);
6926 }
6927 }
6928
6929 /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
6930 static void
android_glTexParameteri__III(JNIEnv * _env,jobject _this,jint target,jint pname,jint param)6931 android_glTexParameteri__III
6932 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
6933 glTexParameteri(
6934 (GLenum)target,
6935 (GLenum)pname,
6936 (GLint)param
6937 );
6938 }
6939
6940 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
6941 static void
android_glTexParameteriv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)6942 android_glTexParameteriv__II_3II
6943 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
6944 jint _exception = 0;
6945 const char * _exceptionType = NULL;
6946 const char * _exceptionMessage = NULL;
6947 GLint *params_base = (GLint *) 0;
6948 jint _remaining;
6949 GLint *params = (GLint *) 0;
6950
6951 if (!params_ref) {
6952 _exception = 1;
6953 _exceptionType = "java/lang/IllegalArgumentException";
6954 _exceptionMessage = "params == null";
6955 goto exit;
6956 }
6957 if (offset < 0) {
6958 _exception = 1;
6959 _exceptionType = "java/lang/IllegalArgumentException";
6960 _exceptionMessage = "offset < 0";
6961 goto exit;
6962 }
6963 _remaining = _env->GetArrayLength(params_ref) - offset;
6964 if (_remaining < 1) {
6965 _exception = 1;
6966 _exceptionType = "java/lang/IllegalArgumentException";
6967 _exceptionMessage = "length - offset < 1 < needed";
6968 goto exit;
6969 }
6970 params_base = (GLint *)
6971 _env->GetIntArrayElements(params_ref, (jboolean *)0);
6972 params = params_base + offset;
6973
6974 glTexParameteriv(
6975 (GLenum)target,
6976 (GLenum)pname,
6977 (GLint *)params
6978 );
6979
6980 exit:
6981 if (params_base) {
6982 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
6983 JNI_ABORT);
6984 }
6985 if (_exception) {
6986 jniThrowException(_env, _exceptionType, _exceptionMessage);
6987 }
6988 }
6989
6990 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
6991 static void
android_glTexParameteriv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)6992 android_glTexParameteriv__IILjava_nio_IntBuffer_2
6993 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
6994 jint _exception = 0;
6995 const char * _exceptionType = NULL;
6996 const char * _exceptionMessage = NULL;
6997 jintArray _array = (jintArray) 0;
6998 jint _bufferOffset = (jint) 0;
6999 jint _remaining;
7000 GLint *params = (GLint *) 0;
7001
7002 if (!params_buf) {
7003 _exception = 1;
7004 _exceptionType = "java/lang/IllegalArgumentException";
7005 _exceptionMessage = "params == null";
7006 goto exit;
7007 }
7008 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7009 if (_remaining < 1) {
7010 _exception = 1;
7011 _exceptionType = "java/lang/IllegalArgumentException";
7012 _exceptionMessage = "remaining() < 1 < needed";
7013 goto exit;
7014 }
7015 if (params == NULL) {
7016 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7017 params = (GLint *) (_paramsBase + _bufferOffset);
7018 }
7019 glTexParameteriv(
7020 (GLenum)target,
7021 (GLenum)pname,
7022 (GLint *)params
7023 );
7024
7025 exit:
7026 if (_array) {
7027 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
7028 }
7029 if (_exception) {
7030 jniThrowException(_env, _exceptionType, _exceptionMessage);
7031 }
7032 }
7033
7034 /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
7035 static void
android_glTexParameterxv__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)7036 android_glTexParameterxv__II_3II
7037 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
7038 jint _exception = 0;
7039 const char * _exceptionType = NULL;
7040 const char * _exceptionMessage = NULL;
7041 GLfixed *params_base = (GLfixed *) 0;
7042 jint _remaining;
7043 GLfixed *params = (GLfixed *) 0;
7044
7045 if (!params_ref) {
7046 _exception = 1;
7047 _exceptionType = "java/lang/IllegalArgumentException";
7048 _exceptionMessage = "params == null";
7049 goto exit;
7050 }
7051 if (offset < 0) {
7052 _exception = 1;
7053 _exceptionType = "java/lang/IllegalArgumentException";
7054 _exceptionMessage = "offset < 0";
7055 goto exit;
7056 }
7057 _remaining = _env->GetArrayLength(params_ref) - offset;
7058 if (_remaining < 1) {
7059 _exception = 1;
7060 _exceptionType = "java/lang/IllegalArgumentException";
7061 _exceptionMessage = "length - offset < 1 < needed";
7062 goto exit;
7063 }
7064 params_base = (GLfixed *)
7065 _env->GetIntArrayElements(params_ref, (jboolean *)0);
7066 params = params_base + offset;
7067
7068 glTexParameterxv(
7069 (GLenum)target,
7070 (GLenum)pname,
7071 (GLfixed *)params
7072 );
7073
7074 exit:
7075 if (params_base) {
7076 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
7077 JNI_ABORT);
7078 }
7079 if (_exception) {
7080 jniThrowException(_env, _exceptionType, _exceptionMessage);
7081 }
7082 }
7083
7084 /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
7085 static void
android_glTexParameterxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)7086 android_glTexParameterxv__IILjava_nio_IntBuffer_2
7087 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
7088 jint _exception = 0;
7089 const char * _exceptionType = NULL;
7090 const char * _exceptionMessage = NULL;
7091 jintArray _array = (jintArray) 0;
7092 jint _bufferOffset = (jint) 0;
7093 jint _remaining;
7094 GLfixed *params = (GLfixed *) 0;
7095
7096 if (!params_buf) {
7097 _exception = 1;
7098 _exceptionType = "java/lang/IllegalArgumentException";
7099 _exceptionMessage = "params == null";
7100 goto exit;
7101 }
7102 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7103 if (_remaining < 1) {
7104 _exception = 1;
7105 _exceptionType = "java/lang/IllegalArgumentException";
7106 _exceptionMessage = "remaining() < 1 < needed";
7107 goto exit;
7108 }
7109 if (params == NULL) {
7110 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7111 params = (GLfixed *) (_paramsBase + _bufferOffset);
7112 }
7113 glTexParameterxv(
7114 (GLenum)target,
7115 (GLenum)pname,
7116 (GLfixed *)params
7117 );
7118
7119 exit:
7120 if (_array) {
7121 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
7122 }
7123 if (_exception) {
7124 jniThrowException(_env, _exceptionType, _exceptionMessage);
7125 }
7126 }
7127
7128 /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
7129 static void
android_glVertexPointer__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)7130 android_glVertexPointer__IIII
7131 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
7132 glVertexPointer(
7133 (GLint)size,
7134 (GLenum)type,
7135 (GLsizei)stride,
7136 reinterpret_cast<GLvoid *>(offset)
7137 );
7138 }
7139
7140 /* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */
7141 static void
android_glCurrentPaletteMatrixOES__I(JNIEnv * _env,jobject _this,jint matrixpaletteindex)7142 android_glCurrentPaletteMatrixOES__I
7143 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) {
7144 glCurrentPaletteMatrixOES(
7145 (GLuint)matrixpaletteindex
7146 );
7147 }
7148
7149 /* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
7150 static void
android_glDrawTexfOES__FFFFF(JNIEnv * _env,jobject _this,jfloat x,jfloat y,jfloat z,jfloat width,jfloat height)7151 android_glDrawTexfOES__FFFFF
7152 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) {
7153 glDrawTexfOES(
7154 (GLfloat)x,
7155 (GLfloat)y,
7156 (GLfloat)z,
7157 (GLfloat)width,
7158 (GLfloat)height
7159 );
7160 }
7161
7162 /* void glDrawTexfvOES ( const GLfloat *coords ) */
7163 static void
android_glDrawTexfvOES___3FI(JNIEnv * _env,jobject _this,jfloatArray coords_ref,jint offset)7164 android_glDrawTexfvOES___3FI
7165 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
7166 jint _exception = 0;
7167 const char * _exceptionType = NULL;
7168 const char * _exceptionMessage = NULL;
7169 GLfloat *coords_base = (GLfloat *) 0;
7170 jint _remaining;
7171 GLfloat *coords = (GLfloat *) 0;
7172
7173 if (!coords_ref) {
7174 _exception = 1;
7175 _exceptionType = "java/lang/IllegalArgumentException";
7176 _exceptionMessage = "coords == null";
7177 goto exit;
7178 }
7179 if (offset < 0) {
7180 _exception = 1;
7181 _exceptionType = "java/lang/IllegalArgumentException";
7182 _exceptionMessage = "offset < 0";
7183 goto exit;
7184 }
7185 _remaining = _env->GetArrayLength(coords_ref) - offset;
7186 if (_remaining < 5) {
7187 _exception = 1;
7188 _exceptionType = "java/lang/IllegalArgumentException";
7189 _exceptionMessage = "length - offset < 5 < needed";
7190 goto exit;
7191 }
7192 coords_base = (GLfloat *)
7193 _env->GetFloatArrayElements(coords_ref, (jboolean *)0);
7194 coords = coords_base + offset;
7195
7196 glDrawTexfvOES(
7197 (GLfloat *)coords
7198 );
7199
7200 exit:
7201 if (coords_base) {
7202 _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base,
7203 JNI_ABORT);
7204 }
7205 if (_exception) {
7206 jniThrowException(_env, _exceptionType, _exceptionMessage);
7207 }
7208 }
7209
7210 /* void glDrawTexfvOES ( const GLfloat *coords ) */
7211 static void
android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7212 android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
7213 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7214 jint _exception = 0;
7215 const char * _exceptionType = NULL;
7216 const char * _exceptionMessage = NULL;
7217 jfloatArray _array = (jfloatArray) 0;
7218 jint _bufferOffset = (jint) 0;
7219 jint _remaining;
7220 GLfloat *coords = (GLfloat *) 0;
7221
7222 if (!coords_buf) {
7223 _exception = 1;
7224 _exceptionType = "java/lang/IllegalArgumentException";
7225 _exceptionMessage = "coords == null";
7226 goto exit;
7227 }
7228 coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7229 if (_remaining < 5) {
7230 _exception = 1;
7231 _exceptionType = "java/lang/IllegalArgumentException";
7232 _exceptionMessage = "remaining() < 5 < needed";
7233 goto exit;
7234 }
7235 if (coords == NULL) {
7236 char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
7237 coords = (GLfloat *) (_coordsBase + _bufferOffset);
7238 }
7239 glDrawTexfvOES(
7240 (GLfloat *)coords
7241 );
7242
7243 exit:
7244 if (_array) {
7245 _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT);
7246 }
7247 if (_exception) {
7248 jniThrowException(_env, _exceptionType, _exceptionMessage);
7249 }
7250 }
7251
7252 /* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
7253 static void
android_glDrawTexiOES__IIIII(JNIEnv * _env,jobject _this,jint x,jint y,jint z,jint width,jint height)7254 android_glDrawTexiOES__IIIII
7255 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
7256 glDrawTexiOES(
7257 (GLint)x,
7258 (GLint)y,
7259 (GLint)z,
7260 (GLint)width,
7261 (GLint)height
7262 );
7263 }
7264
7265 /* void glDrawTexivOES ( const GLint *coords ) */
7266 static void
android_glDrawTexivOES___3II(JNIEnv * _env,jobject _this,jintArray coords_ref,jint offset)7267 android_glDrawTexivOES___3II
7268 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
7269 jint _exception = 0;
7270 const char * _exceptionType = NULL;
7271 const char * _exceptionMessage = NULL;
7272 GLint *coords_base = (GLint *) 0;
7273 jint _remaining;
7274 GLint *coords = (GLint *) 0;
7275
7276 if (!coords_ref) {
7277 _exception = 1;
7278 _exceptionType = "java/lang/IllegalArgumentException";
7279 _exceptionMessage = "coords == null";
7280 goto exit;
7281 }
7282 if (offset < 0) {
7283 _exception = 1;
7284 _exceptionType = "java/lang/IllegalArgumentException";
7285 _exceptionMessage = "offset < 0";
7286 goto exit;
7287 }
7288 _remaining = _env->GetArrayLength(coords_ref) - offset;
7289 if (_remaining < 5) {
7290 _exception = 1;
7291 _exceptionType = "java/lang/IllegalArgumentException";
7292 _exceptionMessage = "length - offset < 5 < needed";
7293 goto exit;
7294 }
7295 coords_base = (GLint *)
7296 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
7297 coords = coords_base + offset;
7298
7299 glDrawTexivOES(
7300 (GLint *)coords
7301 );
7302
7303 exit:
7304 if (coords_base) {
7305 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
7306 JNI_ABORT);
7307 }
7308 if (_exception) {
7309 jniThrowException(_env, _exceptionType, _exceptionMessage);
7310 }
7311 }
7312
7313 /* void glDrawTexivOES ( const GLint *coords ) */
7314 static void
android_glDrawTexivOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7315 android_glDrawTexivOES__Ljava_nio_IntBuffer_2
7316 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7317 jint _exception = 0;
7318 const char * _exceptionType = NULL;
7319 const char * _exceptionMessage = NULL;
7320 jintArray _array = (jintArray) 0;
7321 jint _bufferOffset = (jint) 0;
7322 jint _remaining;
7323 GLint *coords = (GLint *) 0;
7324
7325 if (!coords_buf) {
7326 _exception = 1;
7327 _exceptionType = "java/lang/IllegalArgumentException";
7328 _exceptionMessage = "coords == null";
7329 goto exit;
7330 }
7331 coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7332 if (_remaining < 5) {
7333 _exception = 1;
7334 _exceptionType = "java/lang/IllegalArgumentException";
7335 _exceptionMessage = "remaining() < 5 < needed";
7336 goto exit;
7337 }
7338 if (coords == NULL) {
7339 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7340 coords = (GLint *) (_coordsBase + _bufferOffset);
7341 }
7342 glDrawTexivOES(
7343 (GLint *)coords
7344 );
7345
7346 exit:
7347 if (_array) {
7348 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
7349 }
7350 if (_exception) {
7351 jniThrowException(_env, _exceptionType, _exceptionMessage);
7352 }
7353 }
7354
7355 /* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
7356 static void
android_glDrawTexsOES__SSSSS(JNIEnv * _env,jobject _this,jshort x,jshort y,jshort z,jshort width,jshort height)7357 android_glDrawTexsOES__SSSSS
7358 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) {
7359 glDrawTexsOES(
7360 (GLshort)x,
7361 (GLshort)y,
7362 (GLshort)z,
7363 (GLshort)width,
7364 (GLshort)height
7365 );
7366 }
7367
7368 /* void glDrawTexsvOES ( const GLshort *coords ) */
7369 static void
android_glDrawTexsvOES___3SI(JNIEnv * _env,jobject _this,jshortArray coords_ref,jint offset)7370 android_glDrawTexsvOES___3SI
7371 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
7372 jint _exception = 0;
7373 const char * _exceptionType = NULL;
7374 const char * _exceptionMessage = NULL;
7375 GLshort *coords_base = (GLshort *) 0;
7376 jint _remaining;
7377 GLshort *coords = (GLshort *) 0;
7378
7379 if (!coords_ref) {
7380 _exception = 1;
7381 _exceptionType = "java/lang/IllegalArgumentException";
7382 _exceptionMessage = "coords == null";
7383 goto exit;
7384 }
7385 if (offset < 0) {
7386 _exception = 1;
7387 _exceptionType = "java/lang/IllegalArgumentException";
7388 _exceptionMessage = "offset < 0";
7389 goto exit;
7390 }
7391 _remaining = _env->GetArrayLength(coords_ref) - offset;
7392 if (_remaining < 5) {
7393 _exception = 1;
7394 _exceptionType = "java/lang/IllegalArgumentException";
7395 _exceptionMessage = "length - offset < 5 < needed";
7396 goto exit;
7397 }
7398 coords_base = (GLshort *)
7399 _env->GetShortArrayElements(coords_ref, (jboolean *)0);
7400 coords = coords_base + offset;
7401
7402 glDrawTexsvOES(
7403 (GLshort *)coords
7404 );
7405
7406 exit:
7407 if (coords_base) {
7408 _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base,
7409 JNI_ABORT);
7410 }
7411 if (_exception) {
7412 jniThrowException(_env, _exceptionType, _exceptionMessage);
7413 }
7414 }
7415
7416 /* void glDrawTexsvOES ( const GLshort *coords ) */
7417 static void
android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7418 android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
7419 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7420 jint _exception = 0;
7421 const char * _exceptionType = NULL;
7422 const char * _exceptionMessage = NULL;
7423 jshortArray _array = (jshortArray) 0;
7424 jint _bufferOffset = (jint) 0;
7425 jint _remaining;
7426 GLshort *coords = (GLshort *) 0;
7427
7428 if (!coords_buf) {
7429 _exception = 1;
7430 _exceptionType = "java/lang/IllegalArgumentException";
7431 _exceptionMessage = "coords == null";
7432 goto exit;
7433 }
7434 coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7435 if (_remaining < 5) {
7436 _exception = 1;
7437 _exceptionType = "java/lang/IllegalArgumentException";
7438 _exceptionMessage = "remaining() < 5 < needed";
7439 goto exit;
7440 }
7441 if (coords == NULL) {
7442 char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0);
7443 coords = (GLshort *) (_coordsBase + _bufferOffset);
7444 }
7445 glDrawTexsvOES(
7446 (GLshort *)coords
7447 );
7448
7449 exit:
7450 if (_array) {
7451 _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT);
7452 }
7453 if (_exception) {
7454 jniThrowException(_env, _exceptionType, _exceptionMessage);
7455 }
7456 }
7457
7458 /* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
7459 static void
android_glDrawTexxOES__IIIII(JNIEnv * _env,jobject _this,jint x,jint y,jint z,jint width,jint height)7460 android_glDrawTexxOES__IIIII
7461 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) {
7462 glDrawTexxOES(
7463 (GLfixed)x,
7464 (GLfixed)y,
7465 (GLfixed)z,
7466 (GLfixed)width,
7467 (GLfixed)height
7468 );
7469 }
7470
7471 /* void glDrawTexxvOES ( const GLfixed *coords ) */
7472 static void
android_glDrawTexxvOES___3II(JNIEnv * _env,jobject _this,jintArray coords_ref,jint offset)7473 android_glDrawTexxvOES___3II
7474 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
7475 jint _exception = 0;
7476 const char * _exceptionType = NULL;
7477 const char * _exceptionMessage = NULL;
7478 GLfixed *coords_base = (GLfixed *) 0;
7479 jint _remaining;
7480 GLfixed *coords = (GLfixed *) 0;
7481
7482 if (!coords_ref) {
7483 _exception = 1;
7484 _exceptionType = "java/lang/IllegalArgumentException";
7485 _exceptionMessage = "coords == null";
7486 goto exit;
7487 }
7488 if (offset < 0) {
7489 _exception = 1;
7490 _exceptionType = "java/lang/IllegalArgumentException";
7491 _exceptionMessage = "offset < 0";
7492 goto exit;
7493 }
7494 _remaining = _env->GetArrayLength(coords_ref) - offset;
7495 if (_remaining < 5) {
7496 _exception = 1;
7497 _exceptionType = "java/lang/IllegalArgumentException";
7498 _exceptionMessage = "length - offset < 5 < needed";
7499 goto exit;
7500 }
7501 coords_base = (GLfixed *)
7502 _env->GetIntArrayElements(coords_ref, (jboolean *)0);
7503 coords = coords_base + offset;
7504
7505 glDrawTexxvOES(
7506 (GLfixed *)coords
7507 );
7508
7509 exit:
7510 if (coords_base) {
7511 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base,
7512 JNI_ABORT);
7513 }
7514 if (_exception) {
7515 jniThrowException(_env, _exceptionType, _exceptionMessage);
7516 }
7517 }
7518
7519 /* void glDrawTexxvOES ( const GLfixed *coords ) */
7520 static void
android_glDrawTexxvOES__Ljava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jobject coords_buf)7521 android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
7522 (JNIEnv *_env, jobject _this, jobject coords_buf) {
7523 jint _exception = 0;
7524 const char * _exceptionType = NULL;
7525 const char * _exceptionMessage = NULL;
7526 jintArray _array = (jintArray) 0;
7527 jint _bufferOffset = (jint) 0;
7528 jint _remaining;
7529 GLfixed *coords = (GLfixed *) 0;
7530
7531 if (!coords_buf) {
7532 _exception = 1;
7533 _exceptionType = "java/lang/IllegalArgumentException";
7534 _exceptionMessage = "coords == null";
7535 goto exit;
7536 }
7537 coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7538 if (_remaining < 5) {
7539 _exception = 1;
7540 _exceptionType = "java/lang/IllegalArgumentException";
7541 _exceptionMessage = "remaining() < 5 < needed";
7542 goto exit;
7543 }
7544 if (coords == NULL) {
7545 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7546 coords = (GLfixed *) (_coordsBase + _bufferOffset);
7547 }
7548 glDrawTexxvOES(
7549 (GLfixed *)coords
7550 );
7551
7552 exit:
7553 if (_array) {
7554 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT);
7555 }
7556 if (_exception) {
7557 jniThrowException(_env, _exceptionType, _exceptionMessage);
7558 }
7559 }
7560
7561 /* void glLoadPaletteFromModelViewMatrixOES ( void ) */
7562 static void
android_glLoadPaletteFromModelViewMatrixOES__(JNIEnv * _env,jobject _this)7563 android_glLoadPaletteFromModelViewMatrixOES__
7564 (JNIEnv *_env, jobject _this) {
7565 glLoadPaletteFromModelViewMatrixOES();
7566 }
7567
7568 /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
7569 static void
android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)7570 android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
7571 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
7572 jint _exception = 0;
7573 const char * _exceptionType = NULL;
7574 const char * _exceptionMessage = NULL;
7575 jarray _array = (jarray) 0;
7576 jint _bufferOffset = (jint) 0;
7577 jint _remaining;
7578 GLvoid *pointer = (GLvoid *) 0;
7579
7580 if (pointer_buf) {
7581 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
7582 if ( ! pointer ) {
7583 return;
7584 }
7585 }
7586 glMatrixIndexPointerOESBounds(
7587 (GLint)size,
7588 (GLenum)type,
7589 (GLsizei)stride,
7590 (GLvoid *)pointer,
7591 (GLsizei)remaining
7592 );
7593 if (_exception) {
7594 jniThrowException(_env, _exceptionType, _exceptionMessage);
7595 }
7596 }
7597
7598 /* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
7599 static void
android_glMatrixIndexPointerOES__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)7600 android_glMatrixIndexPointerOES__IIII
7601 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
7602 glMatrixIndexPointerOES(
7603 (GLint)size,
7604 (GLenum)type,
7605 (GLsizei)stride,
7606 reinterpret_cast<GLvoid *>(offset)
7607 );
7608 }
7609
7610 /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
7611 static void
android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jobject pointer_buf,jint remaining)7612 android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
7613 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
7614 jint _exception = 0;
7615 const char * _exceptionType = NULL;
7616 const char * _exceptionMessage = NULL;
7617 jarray _array = (jarray) 0;
7618 jint _bufferOffset = (jint) 0;
7619 jint _remaining;
7620 GLvoid *pointer = (GLvoid *) 0;
7621
7622 if (pointer_buf) {
7623 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
7624 if ( ! pointer ) {
7625 return;
7626 }
7627 }
7628 glWeightPointerOESBounds(
7629 (GLint)size,
7630 (GLenum)type,
7631 (GLsizei)stride,
7632 (GLvoid *)pointer,
7633 (GLsizei)remaining
7634 );
7635 if (_exception) {
7636 jniThrowException(_env, _exceptionType, _exceptionMessage);
7637 }
7638 }
7639
7640 /* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
7641 static void
android_glWeightPointerOES__IIII(JNIEnv * _env,jobject _this,jint size,jint type,jint stride,jint offset)7642 android_glWeightPointerOES__IIII
7643 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jint offset) {
7644 glWeightPointerOES(
7645 (GLint)size,
7646 (GLenum)type,
7647 (GLsizei)stride,
7648 reinterpret_cast<GLvoid *>(offset)
7649 );
7650 }
7651
7652 /* void glBindFramebufferOES ( GLint target, GLint framebuffer ) */
7653 static void
android_glBindFramebufferOES__II(JNIEnv * _env,jobject _this,jint target,jint framebuffer)7654 android_glBindFramebufferOES__II
7655 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
7656 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7657 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7658 "glBindFramebufferOES");
7659 return;
7660 }
7661 glBindFramebufferOES(
7662 (GLint)target,
7663 (GLint)framebuffer
7664 );
7665 }
7666
7667 /* void glBindRenderbufferOES ( GLint target, GLint renderbuffer ) */
7668 static void
android_glBindRenderbufferOES__II(JNIEnv * _env,jobject _this,jint target,jint renderbuffer)7669 android_glBindRenderbufferOES__II
7670 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
7671 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7672 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7673 "glBindRenderbufferOES");
7674 return;
7675 }
7676 glBindRenderbufferOES(
7677 (GLint)target,
7678 (GLint)renderbuffer
7679 );
7680 }
7681
7682 /* void glBlendEquation ( GLint mode ) */
7683 static void
android_glBlendEquation__I(JNIEnv * _env,jobject _this,jint mode)7684 android_glBlendEquation__I
7685 (JNIEnv *_env, jobject _this, jint mode) {
7686 if (! supportsExtension(_env, _this, have_OES_blend_subtractID)) {
7687 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7688 "glBlendEquation");
7689 return;
7690 }
7691 glBlendEquation(
7692 (GLint)mode
7693 );
7694 }
7695
7696 /* void glBlendEquationSeparate ( GLint modeRGB, GLint modeAlpha ) */
7697 static void
android_glBlendEquationSeparate__II(JNIEnv * _env,jobject _this,jint modeRGB,jint modeAlpha)7698 android_glBlendEquationSeparate__II
7699 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
7700 if (! supportsExtension(_env, _this, have_OES_blend_equation_separateID)) {
7701 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7702 "glBlendEquationSeparate");
7703 return;
7704 }
7705 glBlendEquationSeparate(
7706 (GLint)modeRGB,
7707 (GLint)modeAlpha
7708 );
7709 }
7710
7711 /* void glBlendFuncSeparate ( GLint srcRGB, GLint dstRGB, GLint srcAlpha, GLint dstAlpha ) */
7712 static void
android_glBlendFuncSeparate__IIII(JNIEnv * _env,jobject _this,jint srcRGB,jint dstRGB,jint srcAlpha,jint dstAlpha)7713 android_glBlendFuncSeparate__IIII
7714 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
7715 if (! supportsExtension(_env, _this, have_OES_blend_equation_separateID)) {
7716 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7717 "glBlendFuncSeparate");
7718 return;
7719 }
7720 glBlendFuncSeparate(
7721 (GLint)srcRGB,
7722 (GLint)dstRGB,
7723 (GLint)srcAlpha,
7724 (GLint)dstAlpha
7725 );
7726 }
7727
7728 /* GLint glCheckFramebufferStatusOES ( GLint target ) */
7729 static jint
android_glCheckFramebufferStatusOES__I(JNIEnv * _env,jobject _this,jint target)7730 android_glCheckFramebufferStatusOES__I
7731 (JNIEnv *_env, jobject _this, jint target) {
7732 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7733 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7734 "glCheckFramebufferStatusOES");
7735 return 0;
7736 }
7737 GLint _returnValue = 0;
7738 _returnValue = glCheckFramebufferStatusOES(
7739 (GLint)target
7740 );
7741 return (jint)_returnValue;
7742 }
7743
7744 /* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */
7745 static void
android_glDeleteFramebuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray framebuffers_ref,jint offset)7746 android_glDeleteFramebuffersOES__I_3II
7747 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
7748 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7749 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7750 "glDeleteFramebuffersOES");
7751 return;
7752 }
7753 jint _exception = 0;
7754 const char * _exceptionType = NULL;
7755 const char * _exceptionMessage = NULL;
7756 GLuint *framebuffers_base = (GLuint *) 0;
7757 jint _remaining;
7758 GLuint *framebuffers = (GLuint *) 0;
7759
7760 if (!framebuffers_ref) {
7761 _exception = 1;
7762 _exceptionType = "java/lang/IllegalArgumentException";
7763 _exceptionMessage = "framebuffers == null";
7764 goto exit;
7765 }
7766 if (offset < 0) {
7767 _exception = 1;
7768 _exceptionType = "java/lang/IllegalArgumentException";
7769 _exceptionMessage = "offset < 0";
7770 goto exit;
7771 }
7772 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
7773 if (_remaining < n) {
7774 _exception = 1;
7775 _exceptionType = "java/lang/IllegalArgumentException";
7776 _exceptionMessage = "length - offset < n < needed";
7777 goto exit;
7778 }
7779 framebuffers_base = (GLuint *)
7780 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
7781 framebuffers = framebuffers_base + offset;
7782
7783 glDeleteFramebuffersOES(
7784 (GLint)n,
7785 (GLuint *)framebuffers
7786 );
7787
7788 exit:
7789 if (framebuffers_base) {
7790 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
7791 _exception ? JNI_ABORT: 0);
7792 }
7793 if (_exception) {
7794 jniThrowException(_env, _exceptionType, _exceptionMessage);
7795 }
7796 }
7797
7798 /* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */
7799 static void
android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject framebuffers_buf)7800 android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
7801 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
7802 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7803 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7804 "glDeleteFramebuffersOES");
7805 return;
7806 }
7807 jint _exception = 0;
7808 const char * _exceptionType = NULL;
7809 const char * _exceptionMessage = NULL;
7810 jintArray _array = (jintArray) 0;
7811 jint _bufferOffset = (jint) 0;
7812 jint _remaining;
7813 GLuint *framebuffers = (GLuint *) 0;
7814
7815 if (!framebuffers_buf) {
7816 _exception = 1;
7817 _exceptionType = "java/lang/IllegalArgumentException";
7818 _exceptionMessage = "framebuffers == null";
7819 goto exit;
7820 }
7821 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7822 if (_remaining < n) {
7823 _exception = 1;
7824 _exceptionType = "java/lang/IllegalArgumentException";
7825 _exceptionMessage = "remaining() < n < needed";
7826 goto exit;
7827 }
7828 if (framebuffers == NULL) {
7829 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7830 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
7831 }
7832 glDeleteFramebuffersOES(
7833 (GLint)n,
7834 (GLuint *)framebuffers
7835 );
7836
7837 exit:
7838 if (_array) {
7839 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
7840 }
7841 if (_exception) {
7842 jniThrowException(_env, _exceptionType, _exceptionMessage);
7843 }
7844 }
7845
7846 /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
7847 static void
android_glDeleteRenderbuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray renderbuffers_ref,jint offset)7848 android_glDeleteRenderbuffersOES__I_3II
7849 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
7850 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7851 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7852 "glDeleteRenderbuffersOES");
7853 return;
7854 }
7855 jint _exception = 0;
7856 const char * _exceptionType = NULL;
7857 const char * _exceptionMessage = NULL;
7858 GLuint *renderbuffers_base = (GLuint *) 0;
7859 jint _remaining;
7860 GLuint *renderbuffers = (GLuint *) 0;
7861
7862 if (!renderbuffers_ref) {
7863 _exception = 1;
7864 _exceptionType = "java/lang/IllegalArgumentException";
7865 _exceptionMessage = "renderbuffers == null";
7866 goto exit;
7867 }
7868 if (offset < 0) {
7869 _exception = 1;
7870 _exceptionType = "java/lang/IllegalArgumentException";
7871 _exceptionMessage = "offset < 0";
7872 goto exit;
7873 }
7874 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
7875 if (_remaining < n) {
7876 _exception = 1;
7877 _exceptionType = "java/lang/IllegalArgumentException";
7878 _exceptionMessage = "length - offset < n < needed";
7879 goto exit;
7880 }
7881 renderbuffers_base = (GLuint *)
7882 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
7883 renderbuffers = renderbuffers_base + offset;
7884
7885 glDeleteRenderbuffersOES(
7886 (GLint)n,
7887 (GLuint *)renderbuffers
7888 );
7889
7890 exit:
7891 if (renderbuffers_base) {
7892 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
7893 _exception ? JNI_ABORT: 0);
7894 }
7895 if (_exception) {
7896 jniThrowException(_env, _exceptionType, _exceptionMessage);
7897 }
7898 }
7899
7900 /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
7901 static void
android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject renderbuffers_buf)7902 android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
7903 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
7904 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7905 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7906 "glDeleteRenderbuffersOES");
7907 return;
7908 }
7909 jint _exception = 0;
7910 const char * _exceptionType = NULL;
7911 const char * _exceptionMessage = NULL;
7912 jintArray _array = (jintArray) 0;
7913 jint _bufferOffset = (jint) 0;
7914 jint _remaining;
7915 GLuint *renderbuffers = (GLuint *) 0;
7916
7917 if (!renderbuffers_buf) {
7918 _exception = 1;
7919 _exceptionType = "java/lang/IllegalArgumentException";
7920 _exceptionMessage = "renderbuffers == null";
7921 goto exit;
7922 }
7923 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
7924 if (_remaining < n) {
7925 _exception = 1;
7926 _exceptionType = "java/lang/IllegalArgumentException";
7927 _exceptionMessage = "remaining() < n < needed";
7928 goto exit;
7929 }
7930 if (renderbuffers == NULL) {
7931 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
7932 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
7933 }
7934 glDeleteRenderbuffersOES(
7935 (GLint)n,
7936 (GLuint *)renderbuffers
7937 );
7938
7939 exit:
7940 if (_array) {
7941 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
7942 }
7943 if (_exception) {
7944 jniThrowException(_env, _exceptionType, _exceptionMessage);
7945 }
7946 }
7947
7948 /* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */
7949 static void
android_glFramebufferRenderbufferOES__IIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint renderbuffertarget,jint renderbuffer)7950 android_glFramebufferRenderbufferOES__IIII
7951 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
7952 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7953 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7954 "glFramebufferRenderbufferOES");
7955 return;
7956 }
7957 glFramebufferRenderbufferOES(
7958 (GLint)target,
7959 (GLint)attachment,
7960 (GLint)renderbuffertarget,
7961 (GLint)renderbuffer
7962 );
7963 }
7964
7965 /* void glFramebufferTexture2DOES ( GLint target, GLint attachment, GLint textarget, GLint texture, GLint level ) */
7966 static void
android_glFramebufferTexture2DOES__IIIII(JNIEnv * _env,jobject _this,jint target,jint attachment,jint textarget,jint texture,jint level)7967 android_glFramebufferTexture2DOES__IIIII
7968 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
7969 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7970 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7971 "glFramebufferTexture2DOES");
7972 return;
7973 }
7974 glFramebufferTexture2DOES(
7975 (GLint)target,
7976 (GLint)attachment,
7977 (GLint)textarget,
7978 (GLint)texture,
7979 (GLint)level
7980 );
7981 }
7982
7983 /* void glGenerateMipmapOES ( GLint target ) */
7984 static void
android_glGenerateMipmapOES__I(JNIEnv * _env,jobject _this,jint target)7985 android_glGenerateMipmapOES__I
7986 (JNIEnv *_env, jobject _this, jint target) {
7987 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
7988 jniThrowException(_env, "java/lang/UnsupportedOperationException",
7989 "glGenerateMipmapOES");
7990 return;
7991 }
7992 glGenerateMipmapOES(
7993 (GLint)target
7994 );
7995 }
7996
7997 /* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */
7998 static void
android_glGenFramebuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray framebuffers_ref,jint offset)7999 android_glGenFramebuffersOES__I_3II
8000 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
8001 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8002 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8003 "glGenFramebuffersOES");
8004 return;
8005 }
8006 jint _exception = 0;
8007 const char * _exceptionType = NULL;
8008 const char * _exceptionMessage = NULL;
8009 GLuint *framebuffers_base = (GLuint *) 0;
8010 jint _remaining;
8011 GLuint *framebuffers = (GLuint *) 0;
8012
8013 if (!framebuffers_ref) {
8014 _exception = 1;
8015 _exceptionType = "java/lang/IllegalArgumentException";
8016 _exceptionMessage = "framebuffers == null";
8017 goto exit;
8018 }
8019 if (offset < 0) {
8020 _exception = 1;
8021 _exceptionType = "java/lang/IllegalArgumentException";
8022 _exceptionMessage = "offset < 0";
8023 goto exit;
8024 }
8025 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
8026 if (_remaining < n) {
8027 _exception = 1;
8028 _exceptionType = "java/lang/IllegalArgumentException";
8029 _exceptionMessage = "length - offset < n < needed";
8030 goto exit;
8031 }
8032 framebuffers_base = (GLuint *)
8033 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
8034 framebuffers = framebuffers_base + offset;
8035
8036 glGenFramebuffersOES(
8037 (GLint)n,
8038 (GLuint *)framebuffers
8039 );
8040
8041 exit:
8042 if (framebuffers_base) {
8043 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
8044 _exception ? JNI_ABORT: 0);
8045 }
8046 if (_exception) {
8047 jniThrowException(_env, _exceptionType, _exceptionMessage);
8048 }
8049 }
8050
8051 /* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */
8052 static void
android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject framebuffers_buf)8053 android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
8054 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
8055 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8056 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8057 "glGenFramebuffersOES");
8058 return;
8059 }
8060 jint _exception = 0;
8061 const char * _exceptionType = NULL;
8062 const char * _exceptionMessage = NULL;
8063 jintArray _array = (jintArray) 0;
8064 jint _bufferOffset = (jint) 0;
8065 jint _remaining;
8066 GLuint *framebuffers = (GLuint *) 0;
8067
8068 if (!framebuffers_buf) {
8069 _exception = 1;
8070 _exceptionType = "java/lang/IllegalArgumentException";
8071 _exceptionMessage = "framebuffers == null";
8072 goto exit;
8073 }
8074 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8075 if (_remaining < n) {
8076 _exception = 1;
8077 _exceptionType = "java/lang/IllegalArgumentException";
8078 _exceptionMessage = "remaining() < n < needed";
8079 goto exit;
8080 }
8081 if (framebuffers == NULL) {
8082 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8083 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
8084 }
8085 glGenFramebuffersOES(
8086 (GLint)n,
8087 (GLuint *)framebuffers
8088 );
8089
8090 exit:
8091 if (_array) {
8092 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
8093 }
8094 if (_exception) {
8095 jniThrowException(_env, _exceptionType, _exceptionMessage);
8096 }
8097 }
8098
8099 /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
8100 static void
android_glGenRenderbuffersOES__I_3II(JNIEnv * _env,jobject _this,jint n,jintArray renderbuffers_ref,jint offset)8101 android_glGenRenderbuffersOES__I_3II
8102 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
8103 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8104 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8105 "glGenRenderbuffersOES");
8106 return;
8107 }
8108 jint _exception = 0;
8109 const char * _exceptionType = NULL;
8110 const char * _exceptionMessage = NULL;
8111 GLuint *renderbuffers_base = (GLuint *) 0;
8112 jint _remaining;
8113 GLuint *renderbuffers = (GLuint *) 0;
8114
8115 if (!renderbuffers_ref) {
8116 _exception = 1;
8117 _exceptionType = "java/lang/IllegalArgumentException";
8118 _exceptionMessage = "renderbuffers == null";
8119 goto exit;
8120 }
8121 if (offset < 0) {
8122 _exception = 1;
8123 _exceptionType = "java/lang/IllegalArgumentException";
8124 _exceptionMessage = "offset < 0";
8125 goto exit;
8126 }
8127 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
8128 if (_remaining < n) {
8129 _exception = 1;
8130 _exceptionType = "java/lang/IllegalArgumentException";
8131 _exceptionMessage = "length - offset < n < needed";
8132 goto exit;
8133 }
8134 renderbuffers_base = (GLuint *)
8135 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
8136 renderbuffers = renderbuffers_base + offset;
8137
8138 glGenRenderbuffersOES(
8139 (GLint)n,
8140 (GLuint *)renderbuffers
8141 );
8142
8143 exit:
8144 if (renderbuffers_base) {
8145 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
8146 _exception ? JNI_ABORT: 0);
8147 }
8148 if (_exception) {
8149 jniThrowException(_env, _exceptionType, _exceptionMessage);
8150 }
8151 }
8152
8153 /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
8154 static void
android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint n,jobject renderbuffers_buf)8155 android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
8156 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
8157 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8158 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8159 "glGenRenderbuffersOES");
8160 return;
8161 }
8162 jint _exception = 0;
8163 const char * _exceptionType = NULL;
8164 const char * _exceptionMessage = NULL;
8165 jintArray _array = (jintArray) 0;
8166 jint _bufferOffset = (jint) 0;
8167 jint _remaining;
8168 GLuint *renderbuffers = (GLuint *) 0;
8169
8170 if (!renderbuffers_buf) {
8171 _exception = 1;
8172 _exceptionType = "java/lang/IllegalArgumentException";
8173 _exceptionMessage = "renderbuffers == null";
8174 goto exit;
8175 }
8176 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8177 if (_remaining < n) {
8178 _exception = 1;
8179 _exceptionType = "java/lang/IllegalArgumentException";
8180 _exceptionMessage = "remaining() < n < needed";
8181 goto exit;
8182 }
8183 if (renderbuffers == NULL) {
8184 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8185 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
8186 }
8187 glGenRenderbuffersOES(
8188 (GLint)n,
8189 (GLuint *)renderbuffers
8190 );
8191
8192 exit:
8193 if (_array) {
8194 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
8195 }
8196 if (_exception) {
8197 jniThrowException(_env, _exceptionType, _exceptionMessage);
8198 }
8199 }
8200
8201 /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
8202 static void
android_glGetFramebufferAttachmentParameterivOES__III_3II(JNIEnv * _env,jobject _this,jint target,jint attachment,jint pname,jintArray params_ref,jint offset)8203 android_glGetFramebufferAttachmentParameterivOES__III_3II
8204 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
8205 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8206 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8207 "glGetFramebufferAttachmentParameterivOES");
8208 return;
8209 }
8210 jint _exception = 0;
8211 const char * _exceptionType = NULL;
8212 const char * _exceptionMessage = NULL;
8213 GLint *params_base = (GLint *) 0;
8214 jint _remaining;
8215 GLint *params = (GLint *) 0;
8216
8217 if (!params_ref) {
8218 _exception = 1;
8219 _exceptionType = "java/lang/IllegalArgumentException";
8220 _exceptionMessage = "params == null";
8221 goto exit;
8222 }
8223 if (offset < 0) {
8224 _exception = 1;
8225 _exceptionType = "java/lang/IllegalArgumentException";
8226 _exceptionMessage = "offset < 0";
8227 goto exit;
8228 }
8229 _remaining = _env->GetArrayLength(params_ref) - offset;
8230 params_base = (GLint *)
8231 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8232 params = params_base + offset;
8233
8234 glGetFramebufferAttachmentParameterivOES(
8235 (GLint)target,
8236 (GLint)attachment,
8237 (GLint)pname,
8238 (GLint *)params
8239 );
8240
8241 exit:
8242 if (params_base) {
8243 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8244 _exception ? JNI_ABORT: 0);
8245 }
8246 if (_exception) {
8247 jniThrowException(_env, _exceptionType, _exceptionMessage);
8248 }
8249 }
8250
8251 /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
8252 static void
android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint attachment,jint pname,jobject params_buf)8253 android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
8254 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
8255 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8256 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8257 "glGetFramebufferAttachmentParameterivOES");
8258 return;
8259 }
8260 jint _exception = 0;
8261 const char * _exceptionType = NULL;
8262 const char * _exceptionMessage = NULL;
8263 jintArray _array = (jintArray) 0;
8264 jint _bufferOffset = (jint) 0;
8265 jint _remaining;
8266 GLint *params = (GLint *) 0;
8267
8268 if (!params_buf) {
8269 _exception = 1;
8270 _exceptionType = "java/lang/IllegalArgumentException";
8271 _exceptionMessage = "params == null";
8272 goto exit;
8273 }
8274 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8275 if (params == NULL) {
8276 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8277 params = (GLint *) (_paramsBase + _bufferOffset);
8278 }
8279 glGetFramebufferAttachmentParameterivOES(
8280 (GLint)target,
8281 (GLint)attachment,
8282 (GLint)pname,
8283 (GLint *)params
8284 );
8285
8286 exit:
8287 if (_array) {
8288 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8289 }
8290 if (_exception) {
8291 jniThrowException(_env, _exceptionType, _exceptionMessage);
8292 }
8293 }
8294
8295 /* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
8296 static void
android_glGetRenderbufferParameterivOES__II_3II(JNIEnv * _env,jobject _this,jint target,jint pname,jintArray params_ref,jint offset)8297 android_glGetRenderbufferParameterivOES__II_3II
8298 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
8299 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8300 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8301 "glGetRenderbufferParameterivOES");
8302 return;
8303 }
8304 jint _exception = 0;
8305 const char * _exceptionType = NULL;
8306 const char * _exceptionMessage = NULL;
8307 GLint *params_base = (GLint *) 0;
8308 jint _remaining;
8309 GLint *params = (GLint *) 0;
8310
8311 if (!params_ref) {
8312 _exception = 1;
8313 _exceptionType = "java/lang/IllegalArgumentException";
8314 _exceptionMessage = "params == null";
8315 goto exit;
8316 }
8317 if (offset < 0) {
8318 _exception = 1;
8319 _exceptionType = "java/lang/IllegalArgumentException";
8320 _exceptionMessage = "offset < 0";
8321 goto exit;
8322 }
8323 _remaining = _env->GetArrayLength(params_ref) - offset;
8324 params_base = (GLint *)
8325 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8326 params = params_base + offset;
8327
8328 glGetRenderbufferParameterivOES(
8329 (GLint)target,
8330 (GLint)pname,
8331 (GLint *)params
8332 );
8333
8334 exit:
8335 if (params_base) {
8336 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8337 _exception ? JNI_ABORT: 0);
8338 }
8339 if (_exception) {
8340 jniThrowException(_env, _exceptionType, _exceptionMessage);
8341 }
8342 }
8343
8344 /* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
8345 static void
android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint target,jint pname,jobject params_buf)8346 android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
8347 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
8348 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8349 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8350 "glGetRenderbufferParameterivOES");
8351 return;
8352 }
8353 jint _exception = 0;
8354 const char * _exceptionType = NULL;
8355 const char * _exceptionMessage = NULL;
8356 jintArray _array = (jintArray) 0;
8357 jint _bufferOffset = (jint) 0;
8358 jint _remaining;
8359 GLint *params = (GLint *) 0;
8360
8361 if (!params_buf) {
8362 _exception = 1;
8363 _exceptionType = "java/lang/IllegalArgumentException";
8364 _exceptionMessage = "params == null";
8365 goto exit;
8366 }
8367 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8368 if (params == NULL) {
8369 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8370 params = (GLint *) (_paramsBase + _bufferOffset);
8371 }
8372 glGetRenderbufferParameterivOES(
8373 (GLint)target,
8374 (GLint)pname,
8375 (GLint *)params
8376 );
8377
8378 exit:
8379 if (_array) {
8380 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8381 }
8382 if (_exception) {
8383 jniThrowException(_env, _exceptionType, _exceptionMessage);
8384 }
8385 }
8386
8387 /* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8388 static void
android_glGetTexGenfv__II_3FI(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloatArray params_ref,jint offset)8389 android_glGetTexGenfv__II_3FI
8390 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
8391 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8392 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8393 "glGetTexGenfv");
8394 return;
8395 }
8396 jint _exception = 0;
8397 const char * _exceptionType = NULL;
8398 const char * _exceptionMessage = NULL;
8399 GLfloat *params_base = (GLfloat *) 0;
8400 jint _remaining;
8401 GLfloat *params = (GLfloat *) 0;
8402
8403 if (!params_ref) {
8404 _exception = 1;
8405 _exceptionType = "java/lang/IllegalArgumentException";
8406 _exceptionMessage = "params == null";
8407 goto exit;
8408 }
8409 if (offset < 0) {
8410 _exception = 1;
8411 _exceptionType = "java/lang/IllegalArgumentException";
8412 _exceptionMessage = "offset < 0";
8413 goto exit;
8414 }
8415 _remaining = _env->GetArrayLength(params_ref) - offset;
8416 params_base = (GLfloat *)
8417 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
8418 params = params_base + offset;
8419
8420 glGetTexGenfv(
8421 (GLint)coord,
8422 (GLint)pname,
8423 (GLfloat *)params
8424 );
8425
8426 exit:
8427 if (params_base) {
8428 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
8429 _exception ? JNI_ABORT: 0);
8430 }
8431 if (_exception) {
8432 jniThrowException(_env, _exceptionType, _exceptionMessage);
8433 }
8434 }
8435
8436 /* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8437 static void
android_glGetTexGenfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8438 android_glGetTexGenfv__IILjava_nio_FloatBuffer_2
8439 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8440 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8441 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8442 "glGetTexGenfv");
8443 return;
8444 }
8445 jint _exception = 0;
8446 const char * _exceptionType = NULL;
8447 const char * _exceptionMessage = NULL;
8448 jfloatArray _array = (jfloatArray) 0;
8449 jint _bufferOffset = (jint) 0;
8450 jint _remaining;
8451 GLfloat *params = (GLfloat *) 0;
8452
8453 if (!params_buf) {
8454 _exception = 1;
8455 _exceptionType = "java/lang/IllegalArgumentException";
8456 _exceptionMessage = "params == null";
8457 goto exit;
8458 }
8459 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8460 if (params == NULL) {
8461 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
8462 params = (GLfloat *) (_paramsBase + _bufferOffset);
8463 }
8464 glGetTexGenfv(
8465 (GLint)coord,
8466 (GLint)pname,
8467 (GLfloat *)params
8468 );
8469
8470 exit:
8471 if (_array) {
8472 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
8473 }
8474 if (_exception) {
8475 jniThrowException(_env, _exceptionType, _exceptionMessage);
8476 }
8477 }
8478
8479 /* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8480 static void
android_glGetTexGeniv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8481 android_glGetTexGeniv__II_3II
8482 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8483 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8484 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8485 "glGetTexGeniv");
8486 return;
8487 }
8488 jint _exception = 0;
8489 const char * _exceptionType = NULL;
8490 const char * _exceptionMessage = NULL;
8491 GLint *params_base = (GLint *) 0;
8492 jint _remaining;
8493 GLint *params = (GLint *) 0;
8494
8495 if (!params_ref) {
8496 _exception = 1;
8497 _exceptionType = "java/lang/IllegalArgumentException";
8498 _exceptionMessage = "params == null";
8499 goto exit;
8500 }
8501 if (offset < 0) {
8502 _exception = 1;
8503 _exceptionType = "java/lang/IllegalArgumentException";
8504 _exceptionMessage = "offset < 0";
8505 goto exit;
8506 }
8507 _remaining = _env->GetArrayLength(params_ref) - offset;
8508 params_base = (GLint *)
8509 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8510 params = params_base + offset;
8511
8512 glGetTexGeniv(
8513 (GLint)coord,
8514 (GLint)pname,
8515 (GLint *)params
8516 );
8517
8518 exit:
8519 if (params_base) {
8520 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8521 _exception ? JNI_ABORT: 0);
8522 }
8523 if (_exception) {
8524 jniThrowException(_env, _exceptionType, _exceptionMessage);
8525 }
8526 }
8527
8528 /* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8529 static void
android_glGetTexGeniv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8530 android_glGetTexGeniv__IILjava_nio_IntBuffer_2
8531 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8532 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8533 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8534 "glGetTexGeniv");
8535 return;
8536 }
8537 jint _exception = 0;
8538 const char * _exceptionType = NULL;
8539 const char * _exceptionMessage = NULL;
8540 jintArray _array = (jintArray) 0;
8541 jint _bufferOffset = (jint) 0;
8542 jint _remaining;
8543 GLint *params = (GLint *) 0;
8544
8545 if (!params_buf) {
8546 _exception = 1;
8547 _exceptionType = "java/lang/IllegalArgumentException";
8548 _exceptionMessage = "params == null";
8549 goto exit;
8550 }
8551 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8552 if (params == NULL) {
8553 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8554 params = (GLint *) (_paramsBase + _bufferOffset);
8555 }
8556 glGetTexGeniv(
8557 (GLint)coord,
8558 (GLint)pname,
8559 (GLint *)params
8560 );
8561
8562 exit:
8563 if (_array) {
8564 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8565 }
8566 if (_exception) {
8567 jniThrowException(_env, _exceptionType, _exceptionMessage);
8568 }
8569 }
8570
8571 /* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8572 static void
android_glGetTexGenxv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8573 android_glGetTexGenxv__II_3II
8574 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8575 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8576 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8577 "glGetTexGenxv");
8578 return;
8579 }
8580 jint _exception = 0;
8581 const char * _exceptionType = NULL;
8582 const char * _exceptionMessage = NULL;
8583 GLint *params_base = (GLint *) 0;
8584 jint _remaining;
8585 GLint *params = (GLint *) 0;
8586
8587 if (!params_ref) {
8588 _exception = 1;
8589 _exceptionType = "java/lang/IllegalArgumentException";
8590 _exceptionMessage = "params == null";
8591 goto exit;
8592 }
8593 if (offset < 0) {
8594 _exception = 1;
8595 _exceptionType = "java/lang/IllegalArgumentException";
8596 _exceptionMessage = "offset < 0";
8597 goto exit;
8598 }
8599 _remaining = _env->GetArrayLength(params_ref) - offset;
8600 params_base = (GLint *)
8601 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8602 params = params_base + offset;
8603
8604 glGetTexGenxv(
8605 (GLint)coord,
8606 (GLint)pname,
8607 (GLint *)params
8608 );
8609
8610 exit:
8611 if (params_base) {
8612 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8613 _exception ? JNI_ABORT: 0);
8614 }
8615 if (_exception) {
8616 jniThrowException(_env, _exceptionType, _exceptionMessage);
8617 }
8618 }
8619
8620 /* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8621 static void
android_glGetTexGenxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8622 android_glGetTexGenxv__IILjava_nio_IntBuffer_2
8623 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8624 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8625 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8626 "glGetTexGenxv");
8627 return;
8628 }
8629 jint _exception = 0;
8630 const char * _exceptionType = NULL;
8631 const char * _exceptionMessage = NULL;
8632 jintArray _array = (jintArray) 0;
8633 jint _bufferOffset = (jint) 0;
8634 jint _remaining;
8635 GLint *params = (GLint *) 0;
8636
8637 if (!params_buf) {
8638 _exception = 1;
8639 _exceptionType = "java/lang/IllegalArgumentException";
8640 _exceptionMessage = "params == null";
8641 goto exit;
8642 }
8643 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8644 if (params == NULL) {
8645 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8646 params = (GLint *) (_paramsBase + _bufferOffset);
8647 }
8648 glGetTexGenxv(
8649 (GLint)coord,
8650 (GLint)pname,
8651 (GLint *)params
8652 );
8653
8654 exit:
8655 if (_array) {
8656 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8657 }
8658 if (_exception) {
8659 jniThrowException(_env, _exceptionType, _exceptionMessage);
8660 }
8661 }
8662
8663 /* GLboolean glIsFramebufferOES ( GLint framebuffer ) */
8664 static jboolean
android_glIsFramebufferOES__I(JNIEnv * _env,jobject _this,jint framebuffer)8665 android_glIsFramebufferOES__I
8666 (JNIEnv *_env, jobject _this, jint framebuffer) {
8667 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8668 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8669 "glIsFramebufferOES");
8670 return JNI_FALSE;
8671 }
8672 GLboolean _returnValue = JNI_FALSE;
8673 _returnValue = glIsFramebufferOES(
8674 (GLint)framebuffer
8675 );
8676 return (jboolean)_returnValue;
8677 }
8678
8679 /* GLboolean glIsRenderbufferOES ( GLint renderbuffer ) */
8680 static jboolean
android_glIsRenderbufferOES__I(JNIEnv * _env,jobject _this,jint renderbuffer)8681 android_glIsRenderbufferOES__I
8682 (JNIEnv *_env, jobject _this, jint renderbuffer) {
8683 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8684 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8685 "glIsRenderbufferOES");
8686 return JNI_FALSE;
8687 }
8688 GLboolean _returnValue = JNI_FALSE;
8689 _returnValue = glIsRenderbufferOES(
8690 (GLint)renderbuffer
8691 );
8692 return (jboolean)_returnValue;
8693 }
8694
8695 /* void glRenderbufferStorageOES ( GLint target, GLint internalformat, GLint width, GLint height ) */
8696 static void
android_glRenderbufferStorageOES__IIII(JNIEnv * _env,jobject _this,jint target,jint internalformat,jint width,jint height)8697 android_glRenderbufferStorageOES__IIII
8698 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
8699 if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
8700 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8701 "glRenderbufferStorageOES");
8702 return;
8703 }
8704 glRenderbufferStorageOES(
8705 (GLint)target,
8706 (GLint)internalformat,
8707 (GLint)width,
8708 (GLint)height
8709 );
8710 }
8711
8712 /* void glTexGenf ( GLint coord, GLint pname, GLfloat param ) */
8713 static void
android_glTexGenf__IIF(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloat param)8714 android_glTexGenf__IIF
8715 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) {
8716 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8717 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8718 "glTexGenf");
8719 return;
8720 }
8721 glTexGenf(
8722 (GLint)coord,
8723 (GLint)pname,
8724 (GLfloat)param
8725 );
8726 }
8727
8728 /* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8729 static void
android_glTexGenfv__II_3FI(JNIEnv * _env,jobject _this,jint coord,jint pname,jfloatArray params_ref,jint offset)8730 android_glTexGenfv__II_3FI
8731 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
8732 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8733 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8734 "glTexGenfv");
8735 return;
8736 }
8737 jint _exception = 0;
8738 const char * _exceptionType = NULL;
8739 const char * _exceptionMessage = NULL;
8740 GLfloat *params_base = (GLfloat *) 0;
8741 jint _remaining;
8742 GLfloat *params = (GLfloat *) 0;
8743
8744 if (!params_ref) {
8745 _exception = 1;
8746 _exceptionType = "java/lang/IllegalArgumentException";
8747 _exceptionMessage = "params == null";
8748 goto exit;
8749 }
8750 if (offset < 0) {
8751 _exception = 1;
8752 _exceptionType = "java/lang/IllegalArgumentException";
8753 _exceptionMessage = "offset < 0";
8754 goto exit;
8755 }
8756 _remaining = _env->GetArrayLength(params_ref) - offset;
8757 params_base = (GLfloat *)
8758 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
8759 params = params_base + offset;
8760
8761 glTexGenfv(
8762 (GLint)coord,
8763 (GLint)pname,
8764 (GLfloat *)params
8765 );
8766
8767 exit:
8768 if (params_base) {
8769 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
8770 _exception ? JNI_ABORT: 0);
8771 }
8772 if (_exception) {
8773 jniThrowException(_env, _exceptionType, _exceptionMessage);
8774 }
8775 }
8776
8777 /* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
8778 static void
android_glTexGenfv__IILjava_nio_FloatBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8779 android_glTexGenfv__IILjava_nio_FloatBuffer_2
8780 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8781 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8782 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8783 "glTexGenfv");
8784 return;
8785 }
8786 jint _exception = 0;
8787 const char * _exceptionType = NULL;
8788 const char * _exceptionMessage = NULL;
8789 jfloatArray _array = (jfloatArray) 0;
8790 jint _bufferOffset = (jint) 0;
8791 jint _remaining;
8792 GLfloat *params = (GLfloat *) 0;
8793
8794 if (!params_buf) {
8795 _exception = 1;
8796 _exceptionType = "java/lang/IllegalArgumentException";
8797 _exceptionMessage = "params == null";
8798 goto exit;
8799 }
8800 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8801 if (params == NULL) {
8802 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
8803 params = (GLfloat *) (_paramsBase + _bufferOffset);
8804 }
8805 glTexGenfv(
8806 (GLint)coord,
8807 (GLint)pname,
8808 (GLfloat *)params
8809 );
8810
8811 exit:
8812 if (_array) {
8813 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
8814 }
8815 if (_exception) {
8816 jniThrowException(_env, _exceptionType, _exceptionMessage);
8817 }
8818 }
8819
8820 /* void glTexGeni ( GLint coord, GLint pname, GLint param ) */
8821 static void
android_glTexGeni__III(JNIEnv * _env,jobject _this,jint coord,jint pname,jint param)8822 android_glTexGeni__III
8823 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
8824 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8825 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8826 "glTexGeni");
8827 return;
8828 }
8829 glTexGeni(
8830 (GLint)coord,
8831 (GLint)pname,
8832 (GLint)param
8833 );
8834 }
8835
8836 /* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8837 static void
android_glTexGeniv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8838 android_glTexGeniv__II_3II
8839 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8840 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8841 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8842 "glTexGeniv");
8843 return;
8844 }
8845 jint _exception = 0;
8846 const char * _exceptionType = NULL;
8847 const char * _exceptionMessage = NULL;
8848 GLint *params_base = (GLint *) 0;
8849 jint _remaining;
8850 GLint *params = (GLint *) 0;
8851
8852 if (!params_ref) {
8853 _exception = 1;
8854 _exceptionType = "java/lang/IllegalArgumentException";
8855 _exceptionMessage = "params == null";
8856 goto exit;
8857 }
8858 if (offset < 0) {
8859 _exception = 1;
8860 _exceptionType = "java/lang/IllegalArgumentException";
8861 _exceptionMessage = "offset < 0";
8862 goto exit;
8863 }
8864 _remaining = _env->GetArrayLength(params_ref) - offset;
8865 params_base = (GLint *)
8866 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8867 params = params_base + offset;
8868
8869 glTexGeniv(
8870 (GLint)coord,
8871 (GLint)pname,
8872 (GLint *)params
8873 );
8874
8875 exit:
8876 if (params_base) {
8877 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8878 _exception ? JNI_ABORT: 0);
8879 }
8880 if (_exception) {
8881 jniThrowException(_env, _exceptionType, _exceptionMessage);
8882 }
8883 }
8884
8885 /* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
8886 static void
android_glTexGeniv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8887 android_glTexGeniv__IILjava_nio_IntBuffer_2
8888 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8889 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8890 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8891 "glTexGeniv");
8892 return;
8893 }
8894 jint _exception = 0;
8895 const char * _exceptionType = NULL;
8896 const char * _exceptionMessage = NULL;
8897 jintArray _array = (jintArray) 0;
8898 jint _bufferOffset = (jint) 0;
8899 jint _remaining;
8900 GLint *params = (GLint *) 0;
8901
8902 if (!params_buf) {
8903 _exception = 1;
8904 _exceptionType = "java/lang/IllegalArgumentException";
8905 _exceptionMessage = "params == null";
8906 goto exit;
8907 }
8908 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
8909 if (params == NULL) {
8910 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
8911 params = (GLint *) (_paramsBase + _bufferOffset);
8912 }
8913 glTexGeniv(
8914 (GLint)coord,
8915 (GLint)pname,
8916 (GLint *)params
8917 );
8918
8919 exit:
8920 if (_array) {
8921 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
8922 }
8923 if (_exception) {
8924 jniThrowException(_env, _exceptionType, _exceptionMessage);
8925 }
8926 }
8927
8928 /* void glTexGenx ( GLint coord, GLint pname, GLint param ) */
8929 static void
android_glTexGenx__III(JNIEnv * _env,jobject _this,jint coord,jint pname,jint param)8930 android_glTexGenx__III
8931 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) {
8932 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8933 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8934 "glTexGenx");
8935 return;
8936 }
8937 glTexGenx(
8938 (GLint)coord,
8939 (GLint)pname,
8940 (GLint)param
8941 );
8942 }
8943
8944 /* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8945 static void
android_glTexGenxv__II_3II(JNIEnv * _env,jobject _this,jint coord,jint pname,jintArray params_ref,jint offset)8946 android_glTexGenxv__II_3II
8947 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
8948 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8949 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8950 "glTexGenxv");
8951 return;
8952 }
8953 jint _exception = 0;
8954 const char * _exceptionType = NULL;
8955 const char * _exceptionMessage = NULL;
8956 GLint *params_base = (GLint *) 0;
8957 jint _remaining;
8958 GLint *params = (GLint *) 0;
8959
8960 if (!params_ref) {
8961 _exception = 1;
8962 _exceptionType = "java/lang/IllegalArgumentException";
8963 _exceptionMessage = "params == null";
8964 goto exit;
8965 }
8966 if (offset < 0) {
8967 _exception = 1;
8968 _exceptionType = "java/lang/IllegalArgumentException";
8969 _exceptionMessage = "offset < 0";
8970 goto exit;
8971 }
8972 _remaining = _env->GetArrayLength(params_ref) - offset;
8973 params_base = (GLint *)
8974 _env->GetIntArrayElements(params_ref, (jboolean *)0);
8975 params = params_base + offset;
8976
8977 glTexGenxv(
8978 (GLint)coord,
8979 (GLint)pname,
8980 (GLint *)params
8981 );
8982
8983 exit:
8984 if (params_base) {
8985 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
8986 _exception ? JNI_ABORT: 0);
8987 }
8988 if (_exception) {
8989 jniThrowException(_env, _exceptionType, _exceptionMessage);
8990 }
8991 }
8992
8993 /* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
8994 static void
android_glTexGenxv__IILjava_nio_IntBuffer_2(JNIEnv * _env,jobject _this,jint coord,jint pname,jobject params_buf)8995 android_glTexGenxv__IILjava_nio_IntBuffer_2
8996 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
8997 if (! supportsExtension(_env, _this, have_OES_texture_cube_mapID)) {
8998 jniThrowException(_env, "java/lang/UnsupportedOperationException",
8999 "glTexGenxv");
9000 return;
9001 }
9002 jint _exception = 0;
9003 const char * _exceptionType = NULL;
9004 const char * _exceptionMessage = NULL;
9005 jintArray _array = (jintArray) 0;
9006 jint _bufferOffset = (jint) 0;
9007 jint _remaining;
9008 GLint *params = (GLint *) 0;
9009
9010 if (!params_buf) {
9011 _exception = 1;
9012 _exceptionType = "java/lang/IllegalArgumentException";
9013 _exceptionMessage = "params == null";
9014 goto exit;
9015 }
9016 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
9017 if (params == NULL) {
9018 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
9019 params = (GLint *) (_paramsBase + _bufferOffset);
9020 }
9021 glTexGenxv(
9022 (GLint)coord,
9023 (GLint)pname,
9024 (GLint *)params
9025 );
9026
9027 exit:
9028 if (_array) {
9029 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
9030 }
9031 if (_exception) {
9032 jniThrowException(_env, _exceptionType, _exceptionMessage);
9033 }
9034 }
9035
9036 static const char *classPathName = "com/google/android/gles_jni/GLImpl";
9037
9038 static const JNINativeMethod methods[] = {
9039 {"_nativeClassInit", "()V", (void*)nativeClassInit },
9040 {"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I },
9041 {"glAlphaFunc", "(IF)V", (void *) android_glAlphaFunc__IF },
9042 {"glAlphaFuncx", "(II)V", (void *) android_glAlphaFuncx__II },
9043 {"glBindTexture", "(II)V", (void *) android_glBindTexture__II },
9044 {"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II },
9045 {"glClear", "(I)V", (void *) android_glClear__I },
9046 {"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF },
9047 {"glClearColorx", "(IIII)V", (void *) android_glClearColorx__IIII },
9048 {"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F },
9049 {"glClearDepthx", "(I)V", (void *) android_glClearDepthx__I },
9050 {"glClearStencil", "(I)V", (void *) android_glClearStencil__I },
9051 {"glClientActiveTexture", "(I)V", (void *) android_glClientActiveTexture__I },
9052 {"glColor4f", "(FFFF)V", (void *) android_glColor4f__FFFF },
9053 {"glColor4x", "(IIII)V", (void *) android_glColor4x__IIII },
9054 {"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ },
9055 {"glColorPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glColorPointerBounds__IIILjava_nio_Buffer_2I },
9056 {"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 },
9057 {"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
9058 {"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII },
9059 {"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII },
9060 {"glCullFace", "(I)V", (void *) android_glCullFace__I },
9061 {"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II },
9062 {"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 },
9063 {"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I },
9064 {"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z },
9065 {"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF },
9066 {"glDepthRangex", "(II)V", (void *) android_glDepthRangex__II },
9067 {"glDisable", "(I)V", (void *) android_glDisable__I },
9068 {"glDisableClientState", "(I)V", (void *) android_glDisableClientState__I },
9069 {"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
9070 {"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
9071 {"glEnable", "(I)V", (void *) android_glEnable__I },
9072 {"glEnableClientState", "(I)V", (void *) android_glEnableClientState__I },
9073 {"glFinish", "()V", (void *) android_glFinish__ },
9074 {"glFlush", "()V", (void *) android_glFlush__ },
9075 {"glFogf", "(IF)V", (void *) android_glFogf__IF },
9076 {"glFogfv", "(I[FI)V", (void *) android_glFogfv__I_3FI },
9077 {"glFogfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glFogfv__ILjava_nio_FloatBuffer_2 },
9078 {"glFogx", "(II)V", (void *) android_glFogx__II },
9079 {"glFogxv", "(I[II)V", (void *) android_glFogxv__I_3II },
9080 {"glFogxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxv__ILjava_nio_IntBuffer_2 },
9081 {"glFrontFace", "(I)V", (void *) android_glFrontFace__I },
9082 {"glFrustumf", "(FFFFFF)V", (void *) android_glFrustumf__FFFFFF },
9083 {"glFrustumx", "(IIIIII)V", (void *) android_glFrustumx__IIIIII },
9084 {"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II },
9085 {"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 },
9086 {"glGetError", "()I", (void *) android_glGetError__ },
9087 {"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II },
9088 {"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 },
9089 {"_glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
9090 {"glHint", "(II)V", (void *) android_glHint__II },
9091 {"glLightModelf", "(IF)V", (void *) android_glLightModelf__IF },
9092 {"glLightModelfv", "(I[FI)V", (void *) android_glLightModelfv__I_3FI },
9093 {"glLightModelfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glLightModelfv__ILjava_nio_FloatBuffer_2 },
9094 {"glLightModelx", "(II)V", (void *) android_glLightModelx__II },
9095 {"glLightModelxv", "(I[II)V", (void *) android_glLightModelxv__I_3II },
9096 {"glLightModelxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxv__ILjava_nio_IntBuffer_2 },
9097 {"glLightf", "(IIF)V", (void *) android_glLightf__IIF },
9098 {"glLightfv", "(II[FI)V", (void *) android_glLightfv__II_3FI },
9099 {"glLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glLightfv__IILjava_nio_FloatBuffer_2 },
9100 {"glLightx", "(III)V", (void *) android_glLightx__III },
9101 {"glLightxv", "(II[II)V", (void *) android_glLightxv__II_3II },
9102 {"glLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxv__IILjava_nio_IntBuffer_2 },
9103 {"glLineWidth", "(F)V", (void *) android_glLineWidth__F },
9104 {"glLineWidthx", "(I)V", (void *) android_glLineWidthx__I },
9105 {"glLoadIdentity", "()V", (void *) android_glLoadIdentity__ },
9106 {"glLoadMatrixf", "([FI)V", (void *) android_glLoadMatrixf___3FI },
9107 {"glLoadMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 },
9108 {"glLoadMatrixx", "([II)V", (void *) android_glLoadMatrixx___3II },
9109 {"glLoadMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixx__Ljava_nio_IntBuffer_2 },
9110 {"glLogicOp", "(I)V", (void *) android_glLogicOp__I },
9111 {"glMaterialf", "(IIF)V", (void *) android_glMaterialf__IIF },
9112 {"glMaterialfv", "(II[FI)V", (void *) android_glMaterialfv__II_3FI },
9113 {"glMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glMaterialfv__IILjava_nio_FloatBuffer_2 },
9114 {"glMaterialx", "(III)V", (void *) android_glMaterialx__III },
9115 {"glMaterialxv", "(II[II)V", (void *) android_glMaterialxv__II_3II },
9116 {"glMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxv__IILjava_nio_IntBuffer_2 },
9117 {"glMatrixMode", "(I)V", (void *) android_glMatrixMode__I },
9118 {"glMultMatrixf", "([FI)V", (void *) android_glMultMatrixf___3FI },
9119 {"glMultMatrixf", "(Ljava/nio/FloatBuffer;)V", (void *) android_glMultMatrixf__Ljava_nio_FloatBuffer_2 },
9120 {"glMultMatrixx", "([II)V", (void *) android_glMultMatrixx___3II },
9121 {"glMultMatrixx", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixx__Ljava_nio_IntBuffer_2 },
9122 {"glMultiTexCoord4f", "(IFFFF)V", (void *) android_glMultiTexCoord4f__IFFFF },
9123 {"glMultiTexCoord4x", "(IIIII)V", (void *) android_glMultiTexCoord4x__IIIII },
9124 {"glNormal3f", "(FFF)V", (void *) android_glNormal3f__FFF },
9125 {"glNormal3x", "(III)V", (void *) android_glNormal3x__III },
9126 {"glNormalPointerBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glNormalPointerBounds__IILjava_nio_Buffer_2I },
9127 {"glOrthof", "(FFFFFF)V", (void *) android_glOrthof__FFFFFF },
9128 {"glOrthox", "(IIIIII)V", (void *) android_glOrthox__IIIIII },
9129 {"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II },
9130 {"glPointSize", "(F)V", (void *) android_glPointSize__F },
9131 {"glPointSizex", "(I)V", (void *) android_glPointSizex__I },
9132 {"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF },
9133 {"glPolygonOffsetx", "(II)V", (void *) android_glPolygonOffsetx__II },
9134 {"glPopMatrix", "()V", (void *) android_glPopMatrix__ },
9135 {"glPushMatrix", "()V", (void *) android_glPushMatrix__ },
9136 {"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 },
9137 {"glRotatef", "(FFFF)V", (void *) android_glRotatef__FFFF },
9138 {"glRotatex", "(IIII)V", (void *) android_glRotatex__IIII },
9139 {"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ },
9140 {"glSampleCoveragex", "(IZ)V", (void *) android_glSampleCoveragex__IZ },
9141 {"glScalef", "(FFF)V", (void *) android_glScalef__FFF },
9142 {"glScalex", "(III)V", (void *) android_glScalex__III },
9143 {"glScissor", "(IIII)V", (void *) android_glScissor__IIII },
9144 {"glShadeModel", "(I)V", (void *) android_glShadeModel__I },
9145 {"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III },
9146 {"glStencilMask", "(I)V", (void *) android_glStencilMask__I },
9147 {"glStencilOp", "(III)V", (void *) android_glStencilOp__III },
9148 {"glTexCoordPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I },
9149 {"glTexEnvf", "(IIF)V", (void *) android_glTexEnvf__IIF },
9150 {"glTexEnvfv", "(II[FI)V", (void *) android_glTexEnvfv__II_3FI },
9151 {"glTexEnvfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexEnvfv__IILjava_nio_FloatBuffer_2 },
9152 {"glTexEnvx", "(III)V", (void *) android_glTexEnvx__III },
9153 {"glTexEnvxv", "(II[II)V", (void *) android_glTexEnvxv__II_3II },
9154 {"glTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxv__IILjava_nio_IntBuffer_2 },
9155 {"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 },
9156 {"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF },
9157 {"glTexParameterx", "(III)V", (void *) android_glTexParameterx__III },
9158 {"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
9159 {"glTranslatef", "(FFF)V", (void *) android_glTranslatef__FFF },
9160 {"glTranslatex", "(III)V", (void *) android_glTranslatex__III },
9161 {"glVertexPointerBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glVertexPointerBounds__IIILjava_nio_Buffer_2I },
9162 {"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
9163 {"glQueryMatrixxOES", "([II[II)I", (void *) android_glQueryMatrixxOES___3II_3II },
9164 {"glQueryMatrixxOES", "(Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)I", (void *) android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
9165 {"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II },
9166 {"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I },
9167 {"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 },
9168 {"glClipPlanef", "(I[FI)V", (void *) android_glClipPlanef__I_3FI },
9169 {"glClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanef__ILjava_nio_FloatBuffer_2 },
9170 {"glClipPlanex", "(I[II)V", (void *) android_glClipPlanex__I_3II },
9171 {"glClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanex__ILjava_nio_IntBuffer_2 },
9172 {"glColor4ub", "(BBBB)V", (void *) android_glColor4ub__BBBB },
9173 {"glColorPointer", "(IIII)V", (void *) android_glColorPointer__IIII },
9174 {"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II },
9175 {"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 },
9176 {"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
9177 {"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II },
9178 {"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 },
9179 {"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI },
9180 {"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 },
9181 {"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II },
9182 {"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 },
9183 {"glGetClipPlanef", "(I[FI)V", (void *) android_glGetClipPlanef__I_3FI },
9184 {"glGetClipPlanef", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 },
9185 {"glGetClipPlanex", "(I[II)V", (void *) android_glGetClipPlanex__I_3II },
9186 {"glGetClipPlanex", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanex__ILjava_nio_IntBuffer_2 },
9187 {"glGetFixedv", "(I[II)V", (void *) android_glGetFixedv__I_3II },
9188 {"glGetFixedv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedv__ILjava_nio_IntBuffer_2 },
9189 {"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI },
9190 {"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 },
9191 {"glGetLightfv", "(II[FI)V", (void *) android_glGetLightfv__II_3FI },
9192 {"glGetLightfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetLightfv__IILjava_nio_FloatBuffer_2 },
9193 {"glGetLightxv", "(II[II)V", (void *) android_glGetLightxv__II_3II },
9194 {"glGetLightxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxv__IILjava_nio_IntBuffer_2 },
9195 {"glGetMaterialfv", "(II[FI)V", (void *) android_glGetMaterialfv__II_3FI },
9196 {"glGetMaterialfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 },
9197 {"glGetMaterialxv", "(II[II)V", (void *) android_glGetMaterialxv__II_3II },
9198 {"glGetMaterialxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxv__IILjava_nio_IntBuffer_2 },
9199 {"glGetTexEnviv", "(II[II)V", (void *) android_glGetTexEnviv__II_3II },
9200 {"glGetTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnviv__IILjava_nio_IntBuffer_2 },
9201 {"glGetTexEnvxv", "(II[II)V", (void *) android_glGetTexEnvxv__II_3II },
9202 {"glGetTexEnvxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 },
9203 {"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI },
9204 {"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 },
9205 {"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II },
9206 {"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 },
9207 {"glGetTexParameterxv", "(II[II)V", (void *) android_glGetTexParameterxv__II_3II },
9208 {"glGetTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 },
9209 {"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I },
9210 {"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I },
9211 {"glIsTexture", "(I)Z", (void *) android_glIsTexture__I },
9212 {"glNormalPointer", "(III)V", (void *) android_glNormalPointer__III },
9213 {"glPointParameterf", "(IF)V", (void *) android_glPointParameterf__IF },
9214 {"glPointParameterfv", "(I[FI)V", (void *) android_glPointParameterfv__I_3FI },
9215 {"glPointParameterfv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glPointParameterfv__ILjava_nio_FloatBuffer_2 },
9216 {"glPointParameterx", "(II)V", (void *) android_glPointParameterx__II },
9217 {"glPointParameterxv", "(I[II)V", (void *) android_glPointParameterxv__I_3II },
9218 {"glPointParameterxv", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxv__ILjava_nio_IntBuffer_2 },
9219 {"glPointSizePointerOESBounds", "(IILjava/nio/Buffer;I)V", (void *) android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I },
9220 {"glTexCoordPointer", "(IIII)V", (void *) android_glTexCoordPointer__IIII },
9221 {"glTexEnvi", "(III)V", (void *) android_glTexEnvi__III },
9222 {"glTexEnviv", "(II[II)V", (void *) android_glTexEnviv__II_3II },
9223 {"glTexEnviv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnviv__IILjava_nio_IntBuffer_2 },
9224 {"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI },
9225 {"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 },
9226 {"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III },
9227 {"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II },
9228 {"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 },
9229 {"glTexParameterxv", "(II[II)V", (void *) android_glTexParameterxv__II_3II },
9230 {"glTexParameterxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxv__IILjava_nio_IntBuffer_2 },
9231 {"glVertexPointer", "(IIII)V", (void *) android_glVertexPointer__IIII },
9232 {"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I },
9233 {"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF },
9234 {"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI },
9235 {"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 },
9236 {"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII },
9237 {"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II },
9238 {"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 },
9239 {"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS },
9240 {"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI },
9241 {"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 },
9242 {"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII },
9243 {"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II },
9244 {"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 },
9245 {"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ },
9246 {"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I },
9247 {"glMatrixIndexPointerOES", "(IIII)V", (void *) android_glMatrixIndexPointerOES__IIII },
9248 {"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I },
9249 {"glWeightPointerOES", "(IIII)V", (void *) android_glWeightPointerOES__IIII },
9250 {"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II },
9251 {"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II },
9252 {"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I },
9253 {"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II },
9254 {"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII },
9255 {"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I },
9256 {"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II },
9257 {"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 },
9258 {"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II },
9259 {"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 },
9260 {"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII },
9261 {"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII },
9262 {"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I },
9263 {"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II },
9264 {"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 },
9265 {"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II },
9266 {"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 },
9267 {"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II },
9268 {"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 },
9269 {"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II },
9270 {"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 },
9271 {"glGetTexGenfv", "(II[FI)V", (void *) android_glGetTexGenfv__II_3FI },
9272 {"glGetTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 },
9273 {"glGetTexGeniv", "(II[II)V", (void *) android_glGetTexGeniv__II_3II },
9274 {"glGetTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGeniv__IILjava_nio_IntBuffer_2 },
9275 {"glGetTexGenxv", "(II[II)V", (void *) android_glGetTexGenxv__II_3II },
9276 {"glGetTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxv__IILjava_nio_IntBuffer_2 },
9277 {"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I },
9278 {"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I },
9279 {"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII },
9280 {"glTexGenf", "(IIF)V", (void *) android_glTexGenf__IIF },
9281 {"glTexGenfv", "(II[FI)V", (void *) android_glTexGenfv__II_3FI },
9282 {"glTexGenfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfv__IILjava_nio_FloatBuffer_2 },
9283 {"glTexGeni", "(III)V", (void *) android_glTexGeni__III },
9284 {"glTexGeniv", "(II[II)V", (void *) android_glTexGeniv__II_3II },
9285 {"glTexGeniv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGeniv__IILjava_nio_IntBuffer_2 },
9286 {"glTexGenx", "(III)V", (void *) android_glTexGenx__III },
9287 {"glTexGenxv", "(II[II)V", (void *) android_glTexGenxv__II_3II },
9288 {"glTexGenxv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxv__IILjava_nio_IntBuffer_2 },
9289 };
9290
register_com_google_android_gles_jni_GLImpl(JNIEnv * _env)9291 int register_com_google_android_gles_jni_GLImpl(JNIEnv *_env)
9292 {
9293 int err;
9294 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
9295 return err;
9296 }
9297