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