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