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