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