android_opengl_GLES20.cpp revision 73108675c944ab4ee89631dced23566b12341b66
1/* 2** 3** Copyright 2009, 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 <GLES2/gl2.h> 25#include <GLES2/gl2ext.h> 26 27static int initialized = 0; 28 29static jclass nioAccessClass; 30static jclass bufferClass; 31static jclass OOMEClass; 32static jclass UOEClass; 33static jclass IAEClass; 34static jclass AIOOBEClass; 35static jmethodID getBasePointerID; 36static jmethodID getBaseArrayID; 37static jmethodID getBaseArrayOffsetID; 38static jfieldID positionID; 39static jfieldID limitID; 40static jfieldID elementSizeShiftID; 41 42/* Cache method IDs each time the class is loaded. */ 43 44static void 45nativeClassInitBuffer(JNIEnv *_env) 46{ 47 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); 48 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); 49 50 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); 51 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); 52 53 getBasePointerID = _env->GetStaticMethodID(nioAccessClass, 54 "getBasePointer", "(Ljava/nio/Buffer;)J"); 55 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, 56 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); 57 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, 58 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); 59 60 positionID = _env->GetFieldID(bufferClass, "position", "I"); 61 limitID = _env->GetFieldID(bufferClass, "limit", "I"); 62 elementSizeShiftID = 63 _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); 64} 65 66 67static void 68nativeClassInit(JNIEnv *_env, jclass glImplClass) 69{ 70 nativeClassInitBuffer(_env); 71 72 jclass IAEClassLocal = 73 _env->FindClass("java/lang/IllegalArgumentException"); 74 jclass OOMEClassLocal = 75 _env->FindClass("java/lang/OutOfMemoryError"); 76 jclass UOEClassLocal = 77 _env->FindClass("java/lang/UnsupportedOperationException"); 78 jclass AIOOBEClassLocal = 79 _env->FindClass("java/lang/ArrayIndexOutOfBoundsException"); 80 81 IAEClass = (jclass) _env->NewGlobalRef(IAEClassLocal); 82 OOMEClass = (jclass) _env->NewGlobalRef(OOMEClassLocal); 83 UOEClass = (jclass) _env->NewGlobalRef(UOEClassLocal); 84 AIOOBEClass = (jclass) _env->NewGlobalRef(AIOOBEClassLocal); 85} 86 87static void * 88getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining) 89{ 90 jint position; 91 jint limit; 92 jint elementSizeShift; 93 jlong pointer; 94 jint offset; 95 void *data; 96 97 position = _env->GetIntField(buffer, positionID); 98 limit = _env->GetIntField(buffer, limitID); 99 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); 100 *remaining = (limit - position) << elementSizeShift; 101 pointer = _env->CallStaticLongMethod(nioAccessClass, 102 getBasePointerID, buffer); 103 if (pointer != 0L) { 104 *array = NULL; 105 return (void *) (jint) pointer; 106 } 107 108 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, 109 getBaseArrayID, buffer); 110 offset = _env->CallStaticIntMethod(nioAccessClass, 111 getBaseArrayOffsetID, buffer); 112 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0); 113 114 return (void *) ((char *) data + offset); 115} 116 117 118static void 119releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) 120{ 121 _env->ReleasePrimitiveArrayCritical(array, data, 122 commit ? 0 : JNI_ABORT); 123} 124 125static void * 126getDirectBufferPointer(JNIEnv *_env, jobject buffer) { 127 char* buf = (char*) _env->GetDirectBufferAddress(buffer); 128 if (buf) { 129 jint position = _env->GetIntField(buffer, positionID); 130 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); 131 buf += position << elementSizeShift; 132 } else { 133 _env->ThrowNew(IAEClass, "Must use a native order direct Buffer"); 134 } 135 return (void*) buf; 136} 137 138static int 139getNumCompressedTextureFormats() { 140 int numCompressedTextureFormats = 0; 141 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats); 142 return numCompressedTextureFormats; 143} 144 145static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type, 146 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) { 147 glVertexAttribPointer(indx, size, type, normalized, stride, pointer); 148} 149 150// -------------------------------------------------------------------------- 151 152/* void glActiveTexture ( GLenum texture ) */ 153static void 154android_glActiveTexture__I 155 (JNIEnv *_env, jobject _this, jint texture) { 156 glActiveTexture( 157 (GLenum)texture 158 ); 159} 160 161/* void glAttachShader ( GLuint program, GLuint shader ) */ 162static void 163android_glAttachShader__II 164 (JNIEnv *_env, jobject _this, jint program, jint shader) { 165 glAttachShader( 166 (GLuint)program, 167 (GLuint)shader 168 ); 169} 170 171/* void glBindAttribLocation ( GLuint program, GLuint index, const char *name ) */ 172static void 173android_glBindAttribLocation__IILjava_lang_String_2 174 (JNIEnv *_env, jobject _this, jint program, jint index, jstring name) { 175 const char* _nativename = 0; 176 177 if (!name) { 178 _env->ThrowNew(IAEClass, "name == null"); 179 goto exit; 180 } 181 _nativename = _env->GetStringUTFChars(name, 0); 182 183 glBindAttribLocation( 184 (GLuint)program, 185 (GLuint)index, 186 (char *)_nativename 187 ); 188 189exit: 190 if (_nativename) { 191 _env->ReleaseStringUTFChars(name, _nativename); 192 } 193 194} 195 196/* void glBindBuffer ( GLenum target, GLuint buffer ) */ 197static void 198android_glBindBuffer__II 199 (JNIEnv *_env, jobject _this, jint target, jint buffer) { 200 glBindBuffer( 201 (GLenum)target, 202 (GLuint)buffer 203 ); 204} 205 206/* void glBindFramebuffer ( GLenum target, GLuint framebuffer ) */ 207static void 208android_glBindFramebuffer__II 209 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) { 210 glBindFramebuffer( 211 (GLenum)target, 212 (GLuint)framebuffer 213 ); 214} 215 216/* void glBindRenderbuffer ( GLenum target, GLuint renderbuffer ) */ 217static void 218android_glBindRenderbuffer__II 219 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) { 220 glBindRenderbuffer( 221 (GLenum)target, 222 (GLuint)renderbuffer 223 ); 224} 225 226/* void glBindTexture ( GLenum target, GLuint texture ) */ 227static void 228android_glBindTexture__II 229 (JNIEnv *_env, jobject _this, jint target, jint texture) { 230 glBindTexture( 231 (GLenum)target, 232 (GLuint)texture 233 ); 234} 235 236/* void glBlendColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */ 237static void 238android_glBlendColor__FFFF 239 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) { 240 glBlendColor( 241 (GLclampf)red, 242 (GLclampf)green, 243 (GLclampf)blue, 244 (GLclampf)alpha 245 ); 246} 247 248/* void glBlendEquation ( GLenum mode ) */ 249static void 250android_glBlendEquation__I 251 (JNIEnv *_env, jobject _this, jint mode) { 252 glBlendEquation( 253 (GLenum)mode 254 ); 255} 256 257/* void glBlendEquationSeparate ( GLenum modeRGB, GLenum modeAlpha ) */ 258static void 259android_glBlendEquationSeparate__II 260 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) { 261 glBlendEquationSeparate( 262 (GLenum)modeRGB, 263 (GLenum)modeAlpha 264 ); 265} 266 267/* void glBlendFunc ( GLenum sfactor, GLenum dfactor ) */ 268static void 269android_glBlendFunc__II 270 (JNIEnv *_env, jobject _this, jint sfactor, jint dfactor) { 271 glBlendFunc( 272 (GLenum)sfactor, 273 (GLenum)dfactor 274 ); 275} 276 277/* void glBlendFuncSeparate ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */ 278static void 279android_glBlendFuncSeparate__IIII 280 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { 281 glBlendFuncSeparate( 282 (GLenum)srcRGB, 283 (GLenum)dstRGB, 284 (GLenum)srcAlpha, 285 (GLenum)dstAlpha 286 ); 287} 288 289/* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */ 290static void 291android_glBufferData__IILjava_nio_Buffer_2I 292 (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) { 293 jarray _array = (jarray) 0; 294 jint _remaining; 295 GLvoid *data = (GLvoid *) 0; 296 297 if (data_buf) { 298 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); 299 if (_remaining < size) { 300 _env->ThrowNew(IAEClass, "remaining() < size"); 301 goto exit; 302 } 303 } 304 glBufferData( 305 (GLenum)target, 306 (GLsizeiptr)size, 307 (GLvoid *)data, 308 (GLenum)usage 309 ); 310 311exit: 312 if (_array) { 313 releasePointer(_env, _array, data, JNI_FALSE); 314 } 315} 316 317/* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */ 318static void 319android_glBufferSubData__IIILjava_nio_Buffer_2 320 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) { 321 jarray _array = (jarray) 0; 322 jint _remaining; 323 GLvoid *data = (GLvoid *) 0; 324 325 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); 326 if (_remaining < size) { 327 _env->ThrowNew(IAEClass, "remaining() < size"); 328 goto exit; 329 } 330 glBufferSubData( 331 (GLenum)target, 332 (GLintptr)offset, 333 (GLsizeiptr)size, 334 (GLvoid *)data 335 ); 336 337exit: 338 if (_array) { 339 releasePointer(_env, _array, data, JNI_FALSE); 340 } 341} 342 343/* GLenum glCheckFramebufferStatus ( GLenum target ) */ 344static jint 345android_glCheckFramebufferStatus__I 346 (JNIEnv *_env, jobject _this, jint target) { 347 GLenum _returnValue; 348 _returnValue = glCheckFramebufferStatus( 349 (GLenum)target 350 ); 351 return _returnValue; 352} 353 354/* void glClear ( GLbitfield mask ) */ 355static void 356android_glClear__I 357 (JNIEnv *_env, jobject _this, jint mask) { 358 glClear( 359 (GLbitfield)mask 360 ); 361} 362 363/* void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */ 364static void 365android_glClearColor__FFFF 366 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) { 367 glClearColor( 368 (GLclampf)red, 369 (GLclampf)green, 370 (GLclampf)blue, 371 (GLclampf)alpha 372 ); 373} 374 375/* void glClearDepthf ( GLclampf depth ) */ 376static void 377android_glClearDepthf__F 378 (JNIEnv *_env, jobject _this, jfloat depth) { 379 glClearDepthf( 380 (GLclampf)depth 381 ); 382} 383 384/* void glClearStencil ( GLint s ) */ 385static void 386android_glClearStencil__I 387 (JNIEnv *_env, jobject _this, jint s) { 388 glClearStencil( 389 (GLint)s 390 ); 391} 392 393/* void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) */ 394static void 395android_glColorMask__ZZZZ 396 (JNIEnv *_env, jobject _this, jboolean red, jboolean green, jboolean blue, jboolean alpha) { 397 glColorMask( 398 (GLboolean)red, 399 (GLboolean)green, 400 (GLboolean)blue, 401 (GLboolean)alpha 402 ); 403} 404 405/* void glCompileShader ( GLuint shader ) */ 406static void 407android_glCompileShader__I 408 (JNIEnv *_env, jobject _this, jint shader) { 409 glCompileShader( 410 (GLuint)shader 411 ); 412} 413 414/* void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) */ 415static void 416android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 417 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) { 418 jarray _array = (jarray) 0; 419 jint _remaining; 420 GLvoid *data = (GLvoid *) 0; 421 422 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); 423 glCompressedTexImage2D( 424 (GLenum)target, 425 (GLint)level, 426 (GLenum)internalformat, 427 (GLsizei)width, 428 (GLsizei)height, 429 (GLint)border, 430 (GLsizei)imageSize, 431 (GLvoid *)data 432 ); 433 if (_array) { 434 releasePointer(_env, _array, data, JNI_FALSE); 435 } 436} 437 438/* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */ 439static void 440android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 441 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) { 442 jarray _array = (jarray) 0; 443 jint _remaining; 444 GLvoid *data = (GLvoid *) 0; 445 446 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); 447 glCompressedTexSubImage2D( 448 (GLenum)target, 449 (GLint)level, 450 (GLint)xoffset, 451 (GLint)yoffset, 452 (GLsizei)width, 453 (GLsizei)height, 454 (GLenum)format, 455 (GLsizei)imageSize, 456 (GLvoid *)data 457 ); 458 if (_array) { 459 releasePointer(_env, _array, data, JNI_FALSE); 460 } 461} 462 463/* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */ 464static void 465android_glCopyTexImage2D__IIIIIIII 466 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) { 467 glCopyTexImage2D( 468 (GLenum)target, 469 (GLint)level, 470 (GLenum)internalformat, 471 (GLint)x, 472 (GLint)y, 473 (GLsizei)width, 474 (GLsizei)height, 475 (GLint)border 476 ); 477} 478 479/* void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */ 480static void 481android_glCopyTexSubImage2D__IIIIIIII 482 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) { 483 glCopyTexSubImage2D( 484 (GLenum)target, 485 (GLint)level, 486 (GLint)xoffset, 487 (GLint)yoffset, 488 (GLint)x, 489 (GLint)y, 490 (GLsizei)width, 491 (GLsizei)height 492 ); 493} 494 495/* GLuint glCreateProgram ( void ) */ 496static jint 497android_glCreateProgram__ 498 (JNIEnv *_env, jobject _this) { 499 GLuint _returnValue; 500 _returnValue = glCreateProgram(); 501 return _returnValue; 502} 503 504/* GLuint glCreateShader ( GLenum type ) */ 505static jint 506android_glCreateShader__I 507 (JNIEnv *_env, jobject _this, jint type) { 508 GLuint _returnValue; 509 _returnValue = glCreateShader( 510 (GLenum)type 511 ); 512 return _returnValue; 513} 514 515/* void glCullFace ( GLenum mode ) */ 516static void 517android_glCullFace__I 518 (JNIEnv *_env, jobject _this, jint mode) { 519 glCullFace( 520 (GLenum)mode 521 ); 522} 523 524/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */ 525static void 526android_glDeleteBuffers__I_3II 527 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { 528 GLuint *buffers_base = (GLuint *) 0; 529 jint _remaining; 530 GLuint *buffers = (GLuint *) 0; 531 532 if (!buffers_ref) { 533 _env->ThrowNew(IAEClass, "buffers == null"); 534 goto exit; 535 } 536 if (offset < 0) { 537 _env->ThrowNew(IAEClass, "offset < 0"); 538 goto exit; 539 } 540 _remaining = _env->GetArrayLength(buffers_ref) - offset; 541 if (_remaining < n) { 542 _env->ThrowNew(IAEClass, "length - offset < n"); 543 goto exit; 544 } 545 buffers_base = (GLuint *) 546 _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0); 547 buffers = buffers_base + offset; 548 549 glDeleteBuffers( 550 (GLsizei)n, 551 (GLuint *)buffers 552 ); 553 554exit: 555 if (buffers_base) { 556 _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, 557 JNI_ABORT); 558 } 559} 560 561/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */ 562static void 563android_glDeleteBuffers__ILjava_nio_IntBuffer_2 564 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { 565 jarray _array = (jarray) 0; 566 jint _remaining; 567 GLuint *buffers = (GLuint *) 0; 568 569 buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); 570 if (_remaining < n) { 571 _env->ThrowNew(IAEClass, "remaining() < n"); 572 goto exit; 573 } 574 glDeleteBuffers( 575 (GLsizei)n, 576 (GLuint *)buffers 577 ); 578 579exit: 580 if (_array) { 581 releasePointer(_env, _array, buffers, JNI_FALSE); 582 } 583} 584 585/* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */ 586static void 587android_glDeleteFramebuffers__I_3II 588 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { 589 GLuint *framebuffers_base = (GLuint *) 0; 590 jint _remaining; 591 GLuint *framebuffers = (GLuint *) 0; 592 593 if (!framebuffers_ref) { 594 _env->ThrowNew(IAEClass, "framebuffers == null"); 595 goto exit; 596 } 597 if (offset < 0) { 598 _env->ThrowNew(IAEClass, "offset < 0"); 599 goto exit; 600 } 601 _remaining = _env->GetArrayLength(framebuffers_ref) - offset; 602 framebuffers_base = (GLuint *) 603 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0); 604 framebuffers = framebuffers_base + offset; 605 606 glDeleteFramebuffers( 607 (GLsizei)n, 608 (GLuint *)framebuffers 609 ); 610 611exit: 612 if (framebuffers_base) { 613 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, 614 JNI_ABORT); 615 } 616} 617 618/* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */ 619static void 620android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2 621 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { 622 jarray _array = (jarray) 0; 623 jint _remaining; 624 GLuint *framebuffers = (GLuint *) 0; 625 626 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); 627 glDeleteFramebuffers( 628 (GLsizei)n, 629 (GLuint *)framebuffers 630 ); 631 if (_array) { 632 releasePointer(_env, _array, framebuffers, JNI_FALSE); 633 } 634} 635 636/* void glDeleteProgram ( GLuint program ) */ 637static void 638android_glDeleteProgram__I 639 (JNIEnv *_env, jobject _this, jint program) { 640 glDeleteProgram( 641 (GLuint)program 642 ); 643} 644 645/* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */ 646static void 647android_glDeleteRenderbuffers__I_3II 648 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { 649 GLuint *renderbuffers_base = (GLuint *) 0; 650 jint _remaining; 651 GLuint *renderbuffers = (GLuint *) 0; 652 653 if (!renderbuffers_ref) { 654 _env->ThrowNew(IAEClass, "renderbuffers == null"); 655 goto exit; 656 } 657 if (offset < 0) { 658 _env->ThrowNew(IAEClass, "offset < 0"); 659 goto exit; 660 } 661 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; 662 renderbuffers_base = (GLuint *) 663 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0); 664 renderbuffers = renderbuffers_base + offset; 665 666 glDeleteRenderbuffers( 667 (GLsizei)n, 668 (GLuint *)renderbuffers 669 ); 670 671exit: 672 if (renderbuffers_base) { 673 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, 674 JNI_ABORT); 675 } 676} 677 678/* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */ 679static void 680android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2 681 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { 682 jarray _array = (jarray) 0; 683 jint _remaining; 684 GLuint *renderbuffers = (GLuint *) 0; 685 686 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); 687 glDeleteRenderbuffers( 688 (GLsizei)n, 689 (GLuint *)renderbuffers 690 ); 691 if (_array) { 692 releasePointer(_env, _array, renderbuffers, JNI_FALSE); 693 } 694} 695 696/* void glDeleteShader ( GLuint shader ) */ 697static void 698android_glDeleteShader__I 699 (JNIEnv *_env, jobject _this, jint shader) { 700 glDeleteShader( 701 (GLuint)shader 702 ); 703} 704 705/* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */ 706static void 707android_glDeleteTextures__I_3II 708 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { 709 GLuint *textures_base = (GLuint *) 0; 710 jint _remaining; 711 GLuint *textures = (GLuint *) 0; 712 713 if (!textures_ref) { 714 _env->ThrowNew(IAEClass, "textures == null"); 715 goto exit; 716 } 717 if (offset < 0) { 718 _env->ThrowNew(IAEClass, "offset < 0"); 719 goto exit; 720 } 721 _remaining = _env->GetArrayLength(textures_ref) - offset; 722 if (_remaining < n) { 723 _env->ThrowNew(IAEClass, "length - offset < n"); 724 goto exit; 725 } 726 textures_base = (GLuint *) 727 _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0); 728 textures = textures_base + offset; 729 730 glDeleteTextures( 731 (GLsizei)n, 732 (GLuint *)textures 733 ); 734 735exit: 736 if (textures_base) { 737 _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, 738 JNI_ABORT); 739 } 740} 741 742/* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */ 743static void 744android_glDeleteTextures__ILjava_nio_IntBuffer_2 745 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { 746 jarray _array = (jarray) 0; 747 jint _remaining; 748 GLuint *textures = (GLuint *) 0; 749 750 textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); 751 if (_remaining < n) { 752 _env->ThrowNew(IAEClass, "remaining() < n"); 753 goto exit; 754 } 755 glDeleteTextures( 756 (GLsizei)n, 757 (GLuint *)textures 758 ); 759 760exit: 761 if (_array) { 762 releasePointer(_env, _array, textures, JNI_FALSE); 763 } 764} 765 766/* void glDepthFunc ( GLenum func ) */ 767static void 768android_glDepthFunc__I 769 (JNIEnv *_env, jobject _this, jint func) { 770 glDepthFunc( 771 (GLenum)func 772 ); 773} 774 775/* void glDepthMask ( GLboolean flag ) */ 776static void 777android_glDepthMask__Z 778 (JNIEnv *_env, jobject _this, jboolean flag) { 779 glDepthMask( 780 (GLboolean)flag 781 ); 782} 783 784/* void glDepthRangef ( GLclampf zNear, GLclampf zFar ) */ 785static void 786android_glDepthRangef__FF 787 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) { 788 glDepthRangef( 789 (GLclampf)zNear, 790 (GLclampf)zFar 791 ); 792} 793 794/* void glDetachShader ( GLuint program, GLuint shader ) */ 795static void 796android_glDetachShader__II 797 (JNIEnv *_env, jobject _this, jint program, jint shader) { 798 glDetachShader( 799 (GLuint)program, 800 (GLuint)shader 801 ); 802} 803 804/* void glDisable ( GLenum cap ) */ 805static void 806android_glDisable__I 807 (JNIEnv *_env, jobject _this, jint cap) { 808 glDisable( 809 (GLenum)cap 810 ); 811} 812 813/* void glDisableVertexAttribArray ( GLuint index ) */ 814static void 815android_glDisableVertexAttribArray__I 816 (JNIEnv *_env, jobject _this, jint index) { 817 glDisableVertexAttribArray( 818 (GLuint)index 819 ); 820} 821 822/* void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) */ 823static void 824android_glDrawArrays__III 825 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count) { 826 glDrawArrays( 827 (GLenum)mode, 828 (GLint)first, 829 (GLsizei)count 830 ); 831} 832 833/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */ 834static void 835android_glDrawElements__IIII 836 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) { 837 glDrawElements( 838 (GLenum)mode, 839 (GLsizei)count, 840 (GLenum)type, 841 (const GLvoid *)offset 842 ); 843} 844 845/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */ 846static void 847android_glDrawElements__IIILjava_nio_Buffer_2 848 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) { 849 jarray _array = (jarray) 0; 850 jint _remaining; 851 GLvoid *indices = (GLvoid *) 0; 852 853 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining); 854 if (_remaining < count) { 855 _env->ThrowNew(AIOOBEClass, "remaining() < count"); 856 goto exit; 857 } 858 glDrawElements( 859 (GLenum)mode, 860 (GLsizei)count, 861 (GLenum)type, 862 (GLvoid *)indices 863 ); 864 865exit: 866 if (_array) { 867 releasePointer(_env, _array, indices, JNI_FALSE); 868 } 869} 870 871/* void glEnable ( GLenum cap ) */ 872static void 873android_glEnable__I 874 (JNIEnv *_env, jobject _this, jint cap) { 875 glEnable( 876 (GLenum)cap 877 ); 878} 879 880/* void glEnableVertexAttribArray ( GLuint index ) */ 881static void 882android_glEnableVertexAttribArray__I 883 (JNIEnv *_env, jobject _this, jint index) { 884 glEnableVertexAttribArray( 885 (GLuint)index 886 ); 887} 888 889/* void glFinish ( void ) */ 890static void 891android_glFinish__ 892 (JNIEnv *_env, jobject _this) { 893 glFinish(); 894} 895 896/* void glFlush ( void ) */ 897static void 898android_glFlush__ 899 (JNIEnv *_env, jobject _this) { 900 glFlush(); 901} 902 903/* void glFramebufferRenderbuffer ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */ 904static void 905android_glFramebufferRenderbuffer__IIII 906 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { 907 glFramebufferRenderbuffer( 908 (GLenum)target, 909 (GLenum)attachment, 910 (GLenum)renderbuffertarget, 911 (GLuint)renderbuffer 912 ); 913} 914 915/* void glFramebufferTexture2D ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */ 916static void 917android_glFramebufferTexture2D__IIIII 918 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) { 919 glFramebufferTexture2D( 920 (GLenum)target, 921 (GLenum)attachment, 922 (GLenum)textarget, 923 (GLuint)texture, 924 (GLint)level 925 ); 926} 927 928/* void glFrontFace ( GLenum mode ) */ 929static void 930android_glFrontFace__I 931 (JNIEnv *_env, jobject _this, jint mode) { 932 glFrontFace( 933 (GLenum)mode 934 ); 935} 936 937/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ 938static void 939android_glGenBuffers__I_3II 940 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { 941 jint _exception = 0; 942 GLuint *buffers_base = (GLuint *) 0; 943 jint _remaining; 944 GLuint *buffers = (GLuint *) 0; 945 946 if (!buffers_ref) { 947 _exception = 1; 948 _env->ThrowNew(IAEClass, "buffers == null"); 949 goto exit; 950 } 951 if (offset < 0) { 952 _exception = 1; 953 _env->ThrowNew(IAEClass, "offset < 0"); 954 goto exit; 955 } 956 _remaining = _env->GetArrayLength(buffers_ref) - offset; 957 if (_remaining < n) { 958 _exception = 1; 959 _env->ThrowNew(IAEClass, "length - offset < n"); 960 goto exit; 961 } 962 buffers_base = (GLuint *) 963 _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0); 964 buffers = buffers_base + offset; 965 966 glGenBuffers( 967 (GLsizei)n, 968 (GLuint *)buffers 969 ); 970 971exit: 972 if (buffers_base) { 973 _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, 974 _exception ? JNI_ABORT: 0); 975 } 976} 977 978/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ 979static void 980android_glGenBuffers__ILjava_nio_IntBuffer_2 981 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { 982 jint _exception = 0; 983 jarray _array = (jarray) 0; 984 jint _remaining; 985 GLuint *buffers = (GLuint *) 0; 986 987 buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); 988 if (_remaining < n) { 989 _exception = 1; 990 _env->ThrowNew(IAEClass, "remaining() < n"); 991 goto exit; 992 } 993 glGenBuffers( 994 (GLsizei)n, 995 (GLuint *)buffers 996 ); 997 998exit: 999 if (_array) { 1000 releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE); 1001 } 1002} 1003 1004/* void glGenerateMipmap ( GLenum target ) */ 1005static void 1006android_glGenerateMipmap__I 1007 (JNIEnv *_env, jobject _this, jint target) { 1008 glGenerateMipmap( 1009 (GLenum)target 1010 ); 1011} 1012 1013/* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */ 1014static void 1015android_glGenFramebuffers__I_3II 1016 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { 1017 jint _exception = 0; 1018 GLuint *framebuffers_base = (GLuint *) 0; 1019 jint _remaining; 1020 GLuint *framebuffers = (GLuint *) 0; 1021 1022 if (!framebuffers_ref) { 1023 _exception = 1; 1024 _env->ThrowNew(IAEClass, "framebuffers == null"); 1025 goto exit; 1026 } 1027 if (offset < 0) { 1028 _exception = 1; 1029 _env->ThrowNew(IAEClass, "offset < 0"); 1030 goto exit; 1031 } 1032 _remaining = _env->GetArrayLength(framebuffers_ref) - offset; 1033 framebuffers_base = (GLuint *) 1034 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0); 1035 framebuffers = framebuffers_base + offset; 1036 1037 glGenFramebuffers( 1038 (GLsizei)n, 1039 (GLuint *)framebuffers 1040 ); 1041 1042exit: 1043 if (framebuffers_base) { 1044 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, 1045 _exception ? JNI_ABORT: 0); 1046 } 1047} 1048 1049/* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */ 1050static void 1051android_glGenFramebuffers__ILjava_nio_IntBuffer_2 1052 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { 1053 jint _exception = 0; 1054 jarray _array = (jarray) 0; 1055 jint _remaining; 1056 GLuint *framebuffers = (GLuint *) 0; 1057 1058 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); 1059 glGenFramebuffers( 1060 (GLsizei)n, 1061 (GLuint *)framebuffers 1062 ); 1063 if (_array) { 1064 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); 1065 } 1066} 1067 1068/* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */ 1069static void 1070android_glGenRenderbuffers__I_3II 1071 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { 1072 jint _exception = 0; 1073 GLuint *renderbuffers_base = (GLuint *) 0; 1074 jint _remaining; 1075 GLuint *renderbuffers = (GLuint *) 0; 1076 1077 if (!renderbuffers_ref) { 1078 _exception = 1; 1079 _env->ThrowNew(IAEClass, "renderbuffers == null"); 1080 goto exit; 1081 } 1082 if (offset < 0) { 1083 _exception = 1; 1084 _env->ThrowNew(IAEClass, "offset < 0"); 1085 goto exit; 1086 } 1087 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; 1088 renderbuffers_base = (GLuint *) 1089 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0); 1090 renderbuffers = renderbuffers_base + offset; 1091 1092 glGenRenderbuffers( 1093 (GLsizei)n, 1094 (GLuint *)renderbuffers 1095 ); 1096 1097exit: 1098 if (renderbuffers_base) { 1099 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, 1100 _exception ? JNI_ABORT: 0); 1101 } 1102} 1103 1104/* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */ 1105static void 1106android_glGenRenderbuffers__ILjava_nio_IntBuffer_2 1107 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { 1108 jint _exception = 0; 1109 jarray _array = (jarray) 0; 1110 jint _remaining; 1111 GLuint *renderbuffers = (GLuint *) 0; 1112 1113 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); 1114 glGenRenderbuffers( 1115 (GLsizei)n, 1116 (GLuint *)renderbuffers 1117 ); 1118 if (_array) { 1119 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); 1120 } 1121} 1122 1123/* void glGenTextures ( GLsizei n, GLuint *textures ) */ 1124static void 1125android_glGenTextures__I_3II 1126 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { 1127 jint _exception = 0; 1128 GLuint *textures_base = (GLuint *) 0; 1129 jint _remaining; 1130 GLuint *textures = (GLuint *) 0; 1131 1132 if (!textures_ref) { 1133 _exception = 1; 1134 _env->ThrowNew(IAEClass, "textures == null"); 1135 goto exit; 1136 } 1137 if (offset < 0) { 1138 _exception = 1; 1139 _env->ThrowNew(IAEClass, "offset < 0"); 1140 goto exit; 1141 } 1142 _remaining = _env->GetArrayLength(textures_ref) - offset; 1143 if (_remaining < n) { 1144 _exception = 1; 1145 _env->ThrowNew(IAEClass, "length - offset < n"); 1146 goto exit; 1147 } 1148 textures_base = (GLuint *) 1149 _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0); 1150 textures = textures_base + offset; 1151 1152 glGenTextures( 1153 (GLsizei)n, 1154 (GLuint *)textures 1155 ); 1156 1157exit: 1158 if (textures_base) { 1159 _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, 1160 _exception ? JNI_ABORT: 0); 1161 } 1162} 1163 1164/* void glGenTextures ( GLsizei n, GLuint *textures ) */ 1165static void 1166android_glGenTextures__ILjava_nio_IntBuffer_2 1167 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { 1168 jint _exception = 0; 1169 jarray _array = (jarray) 0; 1170 jint _remaining; 1171 GLuint *textures = (GLuint *) 0; 1172 1173 textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); 1174 if (_remaining < n) { 1175 _exception = 1; 1176 _env->ThrowNew(IAEClass, "remaining() < n"); 1177 goto exit; 1178 } 1179 glGenTextures( 1180 (GLsizei)n, 1181 (GLuint *)textures 1182 ); 1183 1184exit: 1185 if (_array) { 1186 releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE); 1187 } 1188} 1189 1190/* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */ 1191static void 1192android_glGetActiveAttrib__III_3II_3II_3II_3BI 1193 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) { 1194 jint _exception = 0; 1195 GLsizei *length_base = (GLsizei *) 0; 1196 jint _lengthRemaining; 1197 GLsizei *length = (GLsizei *) 0; 1198 GLint *size_base = (GLint *) 0; 1199 jint _sizeRemaining; 1200 GLint *size = (GLint *) 0; 1201 GLenum *type_base = (GLenum *) 0; 1202 jint _typeRemaining; 1203 GLenum *type = (GLenum *) 0; 1204 char *name_base = (char *) 0; 1205 jint _nameRemaining; 1206 char *name = (char *) 0; 1207 1208 if (!length_ref) { 1209 _exception = 1; 1210 _env->ThrowNew(IAEClass, "length == null"); 1211 goto exit; 1212 } 1213 if (lengthOffset < 0) { 1214 _exception = 1; 1215 _env->ThrowNew(IAEClass, "lengthOffset < 0"); 1216 goto exit; 1217 } 1218 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 1219 length_base = (GLsizei *) 1220 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0); 1221 length = length_base + lengthOffset; 1222 1223 if (!size_ref) { 1224 _exception = 1; 1225 _env->ThrowNew(IAEClass, "size == null"); 1226 goto exit; 1227 } 1228 if (sizeOffset < 0) { 1229 _exception = 1; 1230 _env->ThrowNew(IAEClass, "sizeOffset < 0"); 1231 goto exit; 1232 } 1233 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; 1234 size_base = (GLint *) 1235 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0); 1236 size = size_base + sizeOffset; 1237 1238 if (!type_ref) { 1239 _exception = 1; 1240 _env->ThrowNew(IAEClass, "type == null"); 1241 goto exit; 1242 } 1243 if (typeOffset < 0) { 1244 _exception = 1; 1245 _env->ThrowNew(IAEClass, "typeOffset < 0"); 1246 goto exit; 1247 } 1248 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; 1249 type_base = (GLenum *) 1250 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0); 1251 type = type_base + typeOffset; 1252 1253 if (!name_ref) { 1254 _exception = 1; 1255 _env->ThrowNew(IAEClass, "name == null"); 1256 goto exit; 1257 } 1258 if (nameOffset < 0) { 1259 _exception = 1; 1260 _env->ThrowNew(IAEClass, "nameOffset < 0"); 1261 goto exit; 1262 } 1263 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; 1264 name_base = (char *) 1265 _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0); 1266 name = name_base + nameOffset; 1267 1268 glGetActiveAttrib( 1269 (GLuint)program, 1270 (GLuint)index, 1271 (GLsizei)bufsize, 1272 (GLsizei *)length, 1273 (GLint *)size, 1274 (GLenum *)type, 1275 (char *)name 1276 ); 1277 1278exit: 1279 if (name_base) { 1280 _env->ReleasePrimitiveArrayCritical(name_ref, name_base, 1281 _exception ? JNI_ABORT: 0); 1282 } 1283 if (type_base) { 1284 _env->ReleasePrimitiveArrayCritical(type_ref, type_base, 1285 _exception ? JNI_ABORT: 0); 1286 } 1287 if (size_base) { 1288 _env->ReleasePrimitiveArrayCritical(size_ref, size_base, 1289 _exception ? JNI_ABORT: 0); 1290 } 1291 if (length_base) { 1292 _env->ReleasePrimitiveArrayCritical(length_ref, length_base, 1293 _exception ? JNI_ABORT: 0); 1294 } 1295} 1296 1297/* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */ 1298static void 1299android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B 1300 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) { 1301 jint _exception = 0; 1302 jarray _lengthArray = (jarray) 0; 1303 jarray _sizeArray = (jarray) 0; 1304 jarray _typeArray = (jarray) 0; 1305 jint _lengthRemaining; 1306 GLsizei *length = (GLsizei *) 0; 1307 jint _sizeRemaining; 1308 GLint *size = (GLint *) 0; 1309 jint _typeRemaining; 1310 GLenum *type = (GLenum *) 0; 1311 1312 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining); 1313 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining); 1314 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining); 1315 glGetActiveAttrib( 1316 (GLuint)program, 1317 (GLuint)index, 1318 (GLsizei)bufsize, 1319 (GLsizei *)length, 1320 (GLint *)size, 1321 (GLenum *)type, 1322 (char *)name 1323 ); 1324 if (_lengthArray) { 1325 releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE); 1326 } 1327 if (_sizeArray) { 1328 releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE); 1329 } 1330 if (_typeArray) { 1331 releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE); 1332 } 1333} 1334 1335/* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */ 1336static void 1337android_glGetActiveUniform__III_3II_3II_3II_3BI 1338 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) { 1339 jint _exception = 0; 1340 GLsizei *length_base = (GLsizei *) 0; 1341 jint _lengthRemaining; 1342 GLsizei *length = (GLsizei *) 0; 1343 GLint *size_base = (GLint *) 0; 1344 jint _sizeRemaining; 1345 GLint *size = (GLint *) 0; 1346 GLenum *type_base = (GLenum *) 0; 1347 jint _typeRemaining; 1348 GLenum *type = (GLenum *) 0; 1349 char *name_base = (char *) 0; 1350 jint _nameRemaining; 1351 char *name = (char *) 0; 1352 1353 if (!length_ref) { 1354 _exception = 1; 1355 _env->ThrowNew(IAEClass, "length == null"); 1356 goto exit; 1357 } 1358 if (lengthOffset < 0) { 1359 _exception = 1; 1360 _env->ThrowNew(IAEClass, "lengthOffset < 0"); 1361 goto exit; 1362 } 1363 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 1364 length_base = (GLsizei *) 1365 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0); 1366 length = length_base + lengthOffset; 1367 1368 if (!size_ref) { 1369 _exception = 1; 1370 _env->ThrowNew(IAEClass, "size == null"); 1371 goto exit; 1372 } 1373 if (sizeOffset < 0) { 1374 _exception = 1; 1375 _env->ThrowNew(IAEClass, "sizeOffset < 0"); 1376 goto exit; 1377 } 1378 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; 1379 size_base = (GLint *) 1380 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0); 1381 size = size_base + sizeOffset; 1382 1383 if (!type_ref) { 1384 _exception = 1; 1385 _env->ThrowNew(IAEClass, "type == null"); 1386 goto exit; 1387 } 1388 if (typeOffset < 0) { 1389 _exception = 1; 1390 _env->ThrowNew(IAEClass, "typeOffset < 0"); 1391 goto exit; 1392 } 1393 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; 1394 type_base = (GLenum *) 1395 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0); 1396 type = type_base + typeOffset; 1397 1398 if (!name_ref) { 1399 _exception = 1; 1400 _env->ThrowNew(IAEClass, "name == null"); 1401 goto exit; 1402 } 1403 if (nameOffset < 0) { 1404 _exception = 1; 1405 _env->ThrowNew(IAEClass, "nameOffset < 0"); 1406 goto exit; 1407 } 1408 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; 1409 name_base = (char *) 1410 _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0); 1411 name = name_base + nameOffset; 1412 1413 glGetActiveUniform( 1414 (GLuint)program, 1415 (GLuint)index, 1416 (GLsizei)bufsize, 1417 (GLsizei *)length, 1418 (GLint *)size, 1419 (GLenum *)type, 1420 (char *)name 1421 ); 1422 1423exit: 1424 if (name_base) { 1425 _env->ReleasePrimitiveArrayCritical(name_ref, name_base, 1426 _exception ? JNI_ABORT: 0); 1427 } 1428 if (type_base) { 1429 _env->ReleasePrimitiveArrayCritical(type_ref, type_base, 1430 _exception ? JNI_ABORT: 0); 1431 } 1432 if (size_base) { 1433 _env->ReleasePrimitiveArrayCritical(size_ref, size_base, 1434 _exception ? JNI_ABORT: 0); 1435 } 1436 if (length_base) { 1437 _env->ReleasePrimitiveArrayCritical(length_ref, length_base, 1438 _exception ? JNI_ABORT: 0); 1439 } 1440} 1441 1442/* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */ 1443static void 1444android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B 1445 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) { 1446 jint _exception = 0; 1447 jarray _lengthArray = (jarray) 0; 1448 jarray _sizeArray = (jarray) 0; 1449 jarray _typeArray = (jarray) 0; 1450 jint _lengthRemaining; 1451 GLsizei *length = (GLsizei *) 0; 1452 jint _sizeRemaining; 1453 GLint *size = (GLint *) 0; 1454 jint _typeRemaining; 1455 GLenum *type = (GLenum *) 0; 1456 1457 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining); 1458 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining); 1459 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining); 1460 glGetActiveUniform( 1461 (GLuint)program, 1462 (GLuint)index, 1463 (GLsizei)bufsize, 1464 (GLsizei *)length, 1465 (GLint *)size, 1466 (GLenum *)type, 1467 (char *)name 1468 ); 1469 if (_lengthArray) { 1470 releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE); 1471 } 1472 if (_sizeArray) { 1473 releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE); 1474 } 1475 if (_typeArray) { 1476 releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE); 1477 } 1478} 1479 1480/* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */ 1481static void 1482android_glGetAttachedShaders__II_3II_3II 1483 (JNIEnv *_env, jobject _this, jint program, jint maxcount, jintArray count_ref, jint countOffset, jintArray shaders_ref, jint shadersOffset) { 1484 jint _exception = 0; 1485 GLsizei *count_base = (GLsizei *) 0; 1486 jint _countRemaining; 1487 GLsizei *count = (GLsizei *) 0; 1488 GLuint *shaders_base = (GLuint *) 0; 1489 jint _shadersRemaining; 1490 GLuint *shaders = (GLuint *) 0; 1491 1492 if (!count_ref) { 1493 _exception = 1; 1494 _env->ThrowNew(IAEClass, "count == null"); 1495 goto exit; 1496 } 1497 if (countOffset < 0) { 1498 _exception = 1; 1499 _env->ThrowNew(IAEClass, "countOffset < 0"); 1500 goto exit; 1501 } 1502 _countRemaining = _env->GetArrayLength(count_ref) - countOffset; 1503 count_base = (GLsizei *) 1504 _env->GetPrimitiveArrayCritical(count_ref, (jboolean *)0); 1505 count = count_base + countOffset; 1506 1507 if (!shaders_ref) { 1508 _exception = 1; 1509 _env->ThrowNew(IAEClass, "shaders == null"); 1510 goto exit; 1511 } 1512 if (shadersOffset < 0) { 1513 _exception = 1; 1514 _env->ThrowNew(IAEClass, "shadersOffset < 0"); 1515 goto exit; 1516 } 1517 _shadersRemaining = _env->GetArrayLength(shaders_ref) - shadersOffset; 1518 shaders_base = (GLuint *) 1519 _env->GetPrimitiveArrayCritical(shaders_ref, (jboolean *)0); 1520 shaders = shaders_base + shadersOffset; 1521 1522 glGetAttachedShaders( 1523 (GLuint)program, 1524 (GLsizei)maxcount, 1525 (GLsizei *)count, 1526 (GLuint *)shaders 1527 ); 1528 1529exit: 1530 if (shaders_base) { 1531 _env->ReleasePrimitiveArrayCritical(shaders_ref, shaders_base, 1532 _exception ? JNI_ABORT: 0); 1533 } 1534 if (count_base) { 1535 _env->ReleasePrimitiveArrayCritical(count_ref, count_base, 1536 _exception ? JNI_ABORT: 0); 1537 } 1538} 1539 1540/* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */ 1541static void 1542android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 1543 (JNIEnv *_env, jobject _this, jint program, jint maxcount, jobject count_buf, jobject shaders_buf) { 1544 jint _exception = 0; 1545 jarray _countArray = (jarray) 0; 1546 jarray _shadersArray = (jarray) 0; 1547 jint _countRemaining; 1548 GLsizei *count = (GLsizei *) 0; 1549 jint _shadersRemaining; 1550 GLuint *shaders = (GLuint *) 0; 1551 1552 count = (GLsizei *)getPointer(_env, count_buf, &_countArray, &_countRemaining); 1553 shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining); 1554 glGetAttachedShaders( 1555 (GLuint)program, 1556 (GLsizei)maxcount, 1557 (GLsizei *)count, 1558 (GLuint *)shaders 1559 ); 1560 if (_countArray) { 1561 releasePointer(_env, _countArray, shaders, _exception ? JNI_FALSE : JNI_TRUE); 1562 } 1563 if (_shadersArray) { 1564 releasePointer(_env, _shadersArray, count, _exception ? JNI_FALSE : JNI_TRUE); 1565 } 1566} 1567 1568/* int glGetAttribLocation ( GLuint program, const char *name ) */ 1569static jint 1570android_glGetAttribLocation__ILjava_lang_String_2 1571 (JNIEnv *_env, jobject _this, jint program, jstring name) { 1572 int _returnValue = 0; 1573 const char* _nativename = 0; 1574 1575 if (!name) { 1576 _env->ThrowNew(IAEClass, "name == null"); 1577 goto exit; 1578 } 1579 _nativename = _env->GetStringUTFChars(name, 0); 1580 1581 _returnValue = glGetAttribLocation( 1582 (GLuint)program, 1583 (char *)_nativename 1584 ); 1585 1586exit: 1587 if (_nativename) { 1588 _env->ReleaseStringUTFChars(name, _nativename); 1589 } 1590 1591 return _returnValue; 1592} 1593 1594/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ 1595static void 1596android_glGetBooleanv__I_3ZI 1597 (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) { 1598 jint _exception = 0; 1599 GLboolean *params_base = (GLboolean *) 0; 1600 jint _remaining; 1601 GLboolean *params = (GLboolean *) 0; 1602 1603 if (!params_ref) { 1604 _exception = 1; 1605 _env->ThrowNew(IAEClass, "params == null"); 1606 goto exit; 1607 } 1608 if (offset < 0) { 1609 _exception = 1; 1610 _env->ThrowNew(IAEClass, "offset < 0"); 1611 goto exit; 1612 } 1613 _remaining = _env->GetArrayLength(params_ref) - offset; 1614 params_base = (GLboolean *) 1615 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 1616 params = params_base + offset; 1617 1618 glGetBooleanv( 1619 (GLenum)pname, 1620 (GLboolean *)params 1621 ); 1622 1623exit: 1624 if (params_base) { 1625 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 1626 _exception ? JNI_ABORT: 0); 1627 } 1628} 1629 1630/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ 1631static void 1632android_glGetBooleanv__ILjava_nio_IntBuffer_2 1633 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 1634 jint _exception = 0; 1635 jarray _array = (jarray) 0; 1636 jint _remaining; 1637 GLboolean *params = (GLboolean *) 0; 1638 1639 params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining); 1640 glGetBooleanv( 1641 (GLenum)pname, 1642 (GLboolean *)params 1643 ); 1644 if (_array) { 1645 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 1646 } 1647} 1648 1649/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 1650static void 1651android_glGetBufferParameteriv__II_3II 1652 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 1653 jint _exception = 0; 1654 GLint *params_base = (GLint *) 0; 1655 jint _remaining; 1656 GLint *params = (GLint *) 0; 1657 1658 if (!params_ref) { 1659 _exception = 1; 1660 _env->ThrowNew(IAEClass, "params == null"); 1661 goto exit; 1662 } 1663 if (offset < 0) { 1664 _exception = 1; 1665 _env->ThrowNew(IAEClass, "offset < 0"); 1666 goto exit; 1667 } 1668 _remaining = _env->GetArrayLength(params_ref) - offset; 1669 if (_remaining < 1) { 1670 _exception = 1; 1671 _env->ThrowNew(IAEClass, "length - offset < 1"); 1672 goto exit; 1673 } 1674 params_base = (GLint *) 1675 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 1676 params = params_base + offset; 1677 1678 glGetBufferParameteriv( 1679 (GLenum)target, 1680 (GLenum)pname, 1681 (GLint *)params 1682 ); 1683 1684exit: 1685 if (params_base) { 1686 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 1687 _exception ? JNI_ABORT: 0); 1688 } 1689} 1690 1691/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 1692static void 1693android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 1694 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 1695 jint _exception = 0; 1696 jarray _array = (jarray) 0; 1697 jint _remaining; 1698 GLint *params = (GLint *) 0; 1699 1700 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 1701 if (_remaining < 1) { 1702 _exception = 1; 1703 _env->ThrowNew(IAEClass, "remaining() < 1"); 1704 goto exit; 1705 } 1706 glGetBufferParameteriv( 1707 (GLenum)target, 1708 (GLenum)pname, 1709 (GLint *)params 1710 ); 1711 1712exit: 1713 if (_array) { 1714 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 1715 } 1716} 1717 1718/* GLenum glGetError ( void ) */ 1719static jint 1720android_glGetError__ 1721 (JNIEnv *_env, jobject _this) { 1722 GLenum _returnValue; 1723 _returnValue = glGetError(); 1724 return _returnValue; 1725} 1726 1727/* void glGetFloatv ( GLenum pname, GLfloat *params ) */ 1728static void 1729android_glGetFloatv__I_3FI 1730 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { 1731 jint _exception = 0; 1732 GLfloat *params_base = (GLfloat *) 0; 1733 jint _remaining; 1734 GLfloat *params = (GLfloat *) 0; 1735 1736 if (!params_ref) { 1737 _exception = 1; 1738 _env->ThrowNew(IAEClass, "params == null"); 1739 goto exit; 1740 } 1741 if (offset < 0) { 1742 _exception = 1; 1743 _env->ThrowNew(IAEClass, "offset < 0"); 1744 goto exit; 1745 } 1746 _remaining = _env->GetArrayLength(params_ref) - offset; 1747 params_base = (GLfloat *) 1748 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 1749 params = params_base + offset; 1750 1751 glGetFloatv( 1752 (GLenum)pname, 1753 (GLfloat *)params 1754 ); 1755 1756exit: 1757 if (params_base) { 1758 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 1759 _exception ? JNI_ABORT: 0); 1760 } 1761} 1762 1763/* void glGetFloatv ( GLenum pname, GLfloat *params ) */ 1764static void 1765android_glGetFloatv__ILjava_nio_FloatBuffer_2 1766 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 1767 jint _exception = 0; 1768 jarray _array = (jarray) 0; 1769 jint _remaining; 1770 GLfloat *params = (GLfloat *) 0; 1771 1772 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); 1773 glGetFloatv( 1774 (GLenum)pname, 1775 (GLfloat *)params 1776 ); 1777 if (_array) { 1778 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 1779 } 1780} 1781 1782/* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ 1783static void 1784android_glGetFramebufferAttachmentParameteriv__III_3II 1785 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) { 1786 jint _exception = 0; 1787 GLint *params_base = (GLint *) 0; 1788 jint _remaining; 1789 GLint *params = (GLint *) 0; 1790 1791 if (!params_ref) { 1792 _exception = 1; 1793 _env->ThrowNew(IAEClass, "params == null"); 1794 goto exit; 1795 } 1796 if (offset < 0) { 1797 _exception = 1; 1798 _env->ThrowNew(IAEClass, "offset < 0"); 1799 goto exit; 1800 } 1801 _remaining = _env->GetArrayLength(params_ref) - offset; 1802 params_base = (GLint *) 1803 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 1804 params = params_base + offset; 1805 1806 glGetFramebufferAttachmentParameteriv( 1807 (GLenum)target, 1808 (GLenum)attachment, 1809 (GLenum)pname, 1810 (GLint *)params 1811 ); 1812 1813exit: 1814 if (params_base) { 1815 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 1816 _exception ? JNI_ABORT: 0); 1817 } 1818} 1819 1820/* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ 1821static void 1822android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2 1823 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) { 1824 jint _exception = 0; 1825 jarray _array = (jarray) 0; 1826 jint _remaining; 1827 GLint *params = (GLint *) 0; 1828 1829 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 1830 glGetFramebufferAttachmentParameteriv( 1831 (GLenum)target, 1832 (GLenum)attachment, 1833 (GLenum)pname, 1834 (GLint *)params 1835 ); 1836 if (_array) { 1837 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 1838 } 1839} 1840 1841/* void glGetIntegerv ( GLenum pname, GLint *params ) */ 1842static void 1843android_glGetIntegerv__I_3II 1844 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { 1845 jint _exception = 0; 1846 GLint *params_base = (GLint *) 0; 1847 jint _remaining; 1848 GLint *params = (GLint *) 0; 1849 1850 if (!params_ref) { 1851 _exception = 1; 1852 _env->ThrowNew(IAEClass, "params == null"); 1853 goto exit; 1854 } 1855 if (offset < 0) { 1856 _exception = 1; 1857 _env->ThrowNew(IAEClass, "offset < 0"); 1858 goto exit; 1859 } 1860 _remaining = _env->GetArrayLength(params_ref) - offset; 1861 int _needed; 1862 switch (pname) { 1863#if defined(GL_ALPHA_BITS) 1864 case GL_ALPHA_BITS: 1865#endif // defined(GL_ALPHA_BITS) 1866#if defined(GL_ALPHA_TEST_FUNC) 1867 case GL_ALPHA_TEST_FUNC: 1868#endif // defined(GL_ALPHA_TEST_FUNC) 1869#if defined(GL_ALPHA_TEST_REF) 1870 case GL_ALPHA_TEST_REF: 1871#endif // defined(GL_ALPHA_TEST_REF) 1872#if defined(GL_BLEND_DST) 1873 case GL_BLEND_DST: 1874#endif // defined(GL_BLEND_DST) 1875#if defined(GL_BLUE_BITS) 1876 case GL_BLUE_BITS: 1877#endif // defined(GL_BLUE_BITS) 1878#if defined(GL_COLOR_ARRAY_BUFFER_BINDING) 1879 case GL_COLOR_ARRAY_BUFFER_BINDING: 1880#endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING) 1881#if defined(GL_COLOR_ARRAY_SIZE) 1882 case GL_COLOR_ARRAY_SIZE: 1883#endif // defined(GL_COLOR_ARRAY_SIZE) 1884#if defined(GL_COLOR_ARRAY_STRIDE) 1885 case GL_COLOR_ARRAY_STRIDE: 1886#endif // defined(GL_COLOR_ARRAY_STRIDE) 1887#if defined(GL_COLOR_ARRAY_TYPE) 1888 case GL_COLOR_ARRAY_TYPE: 1889#endif // defined(GL_COLOR_ARRAY_TYPE) 1890#if defined(GL_CULL_FACE) 1891 case GL_CULL_FACE: 1892#endif // defined(GL_CULL_FACE) 1893#if defined(GL_DEPTH_BITS) 1894 case GL_DEPTH_BITS: 1895#endif // defined(GL_DEPTH_BITS) 1896#if defined(GL_DEPTH_CLEAR_VALUE) 1897 case GL_DEPTH_CLEAR_VALUE: 1898#endif // defined(GL_DEPTH_CLEAR_VALUE) 1899#if defined(GL_DEPTH_FUNC) 1900 case GL_DEPTH_FUNC: 1901#endif // defined(GL_DEPTH_FUNC) 1902#if defined(GL_DEPTH_WRITEMASK) 1903 case GL_DEPTH_WRITEMASK: 1904#endif // defined(GL_DEPTH_WRITEMASK) 1905#if defined(GL_FOG_DENSITY) 1906 case GL_FOG_DENSITY: 1907#endif // defined(GL_FOG_DENSITY) 1908#if defined(GL_FOG_END) 1909 case GL_FOG_END: 1910#endif // defined(GL_FOG_END) 1911#if defined(GL_FOG_MODE) 1912 case GL_FOG_MODE: 1913#endif // defined(GL_FOG_MODE) 1914#if defined(GL_FOG_START) 1915 case GL_FOG_START: 1916#endif // defined(GL_FOG_START) 1917#if defined(GL_FRONT_FACE) 1918 case GL_FRONT_FACE: 1919#endif // defined(GL_FRONT_FACE) 1920#if defined(GL_GREEN_BITS) 1921 case GL_GREEN_BITS: 1922#endif // defined(GL_GREEN_BITS) 1923#if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) 1924 case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES: 1925#endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) 1926#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) 1927 case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES: 1928#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) 1929#if defined(GL_LIGHT_MODEL_COLOR_CONTROL) 1930 case GL_LIGHT_MODEL_COLOR_CONTROL: 1931#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL) 1932#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER) 1933 case GL_LIGHT_MODEL_LOCAL_VIEWER: 1934#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER) 1935#if defined(GL_LIGHT_MODEL_TWO_SIDE) 1936 case GL_LIGHT_MODEL_TWO_SIDE: 1937#endif // defined(GL_LIGHT_MODEL_TWO_SIDE) 1938#if defined(GL_LINE_SMOOTH_HINT) 1939 case GL_LINE_SMOOTH_HINT: 1940#endif // defined(GL_LINE_SMOOTH_HINT) 1941#if defined(GL_LINE_WIDTH) 1942 case GL_LINE_WIDTH: 1943#endif // defined(GL_LINE_WIDTH) 1944#if defined(GL_LOGIC_OP_MODE) 1945 case GL_LOGIC_OP_MODE: 1946#endif // defined(GL_LOGIC_OP_MODE) 1947#if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) 1948 case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES: 1949#endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) 1950#if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) 1951 case GL_MATRIX_INDEX_ARRAY_SIZE_OES: 1952#endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) 1953#if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) 1954 case GL_MATRIX_INDEX_ARRAY_STRIDE_OES: 1955#endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) 1956#if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) 1957 case GL_MATRIX_INDEX_ARRAY_TYPE_OES: 1958#endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) 1959#if defined(GL_MATRIX_MODE) 1960 case GL_MATRIX_MODE: 1961#endif // defined(GL_MATRIX_MODE) 1962#if defined(GL_MAX_CLIP_PLANES) 1963 case GL_MAX_CLIP_PLANES: 1964#endif // defined(GL_MAX_CLIP_PLANES) 1965#if defined(GL_MAX_ELEMENTS_INDICES) 1966 case GL_MAX_ELEMENTS_INDICES: 1967#endif // defined(GL_MAX_ELEMENTS_INDICES) 1968#if defined(GL_MAX_ELEMENTS_VERTICES) 1969 case GL_MAX_ELEMENTS_VERTICES: 1970#endif // defined(GL_MAX_ELEMENTS_VERTICES) 1971#if defined(GL_MAX_LIGHTS) 1972 case GL_MAX_LIGHTS: 1973#endif // defined(GL_MAX_LIGHTS) 1974#if defined(GL_MAX_MODELVIEW_STACK_DEPTH) 1975 case GL_MAX_MODELVIEW_STACK_DEPTH: 1976#endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH) 1977#if defined(GL_MAX_PALETTE_MATRICES_OES) 1978 case GL_MAX_PALETTE_MATRICES_OES: 1979#endif // defined(GL_MAX_PALETTE_MATRICES_OES) 1980#if defined(GL_MAX_PROJECTION_STACK_DEPTH) 1981 case GL_MAX_PROJECTION_STACK_DEPTH: 1982#endif // defined(GL_MAX_PROJECTION_STACK_DEPTH) 1983#if defined(GL_MAX_TEXTURE_SIZE) 1984 case GL_MAX_TEXTURE_SIZE: 1985#endif // defined(GL_MAX_TEXTURE_SIZE) 1986#if defined(GL_MAX_TEXTURE_STACK_DEPTH) 1987 case GL_MAX_TEXTURE_STACK_DEPTH: 1988#endif // defined(GL_MAX_TEXTURE_STACK_DEPTH) 1989#if defined(GL_MAX_TEXTURE_UNITS) 1990 case GL_MAX_TEXTURE_UNITS: 1991#endif // defined(GL_MAX_TEXTURE_UNITS) 1992#if defined(GL_MAX_VERTEX_UNITS_OES) 1993 case GL_MAX_VERTEX_UNITS_OES: 1994#endif // defined(GL_MAX_VERTEX_UNITS_OES) 1995#if defined(GL_MODELVIEW_STACK_DEPTH) 1996 case GL_MODELVIEW_STACK_DEPTH: 1997#endif // defined(GL_MODELVIEW_STACK_DEPTH) 1998#if defined(GL_NORMAL_ARRAY_BUFFER_BINDING) 1999 case GL_NORMAL_ARRAY_BUFFER_BINDING: 2000#endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING) 2001#if defined(GL_NORMAL_ARRAY_STRIDE) 2002 case GL_NORMAL_ARRAY_STRIDE: 2003#endif // defined(GL_NORMAL_ARRAY_STRIDE) 2004#if defined(GL_NORMAL_ARRAY_TYPE) 2005 case GL_NORMAL_ARRAY_TYPE: 2006#endif // defined(GL_NORMAL_ARRAY_TYPE) 2007#if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) 2008 case GL_NUM_COMPRESSED_TEXTURE_FORMATS: 2009#endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) 2010#if defined(GL_PACK_ALIGNMENT) 2011 case GL_PACK_ALIGNMENT: 2012#endif // defined(GL_PACK_ALIGNMENT) 2013#if defined(GL_PERSPECTIVE_CORRECTION_HINT) 2014 case GL_PERSPECTIVE_CORRECTION_HINT: 2015#endif // defined(GL_PERSPECTIVE_CORRECTION_HINT) 2016#if defined(GL_POINT_SIZE) 2017 case GL_POINT_SIZE: 2018#endif // defined(GL_POINT_SIZE) 2019#if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) 2020 case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES: 2021#endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) 2022#if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) 2023 case GL_POINT_SIZE_ARRAY_STRIDE_OES: 2024#endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) 2025#if defined(GL_POINT_SIZE_ARRAY_TYPE_OES) 2026 case GL_POINT_SIZE_ARRAY_TYPE_OES: 2027#endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES) 2028#if defined(GL_POINT_SMOOTH_HINT) 2029 case GL_POINT_SMOOTH_HINT: 2030#endif // defined(GL_POINT_SMOOTH_HINT) 2031#if defined(GL_POLYGON_OFFSET_FACTOR) 2032 case GL_POLYGON_OFFSET_FACTOR: 2033#endif // defined(GL_POLYGON_OFFSET_FACTOR) 2034#if defined(GL_POLYGON_OFFSET_UNITS) 2035 case GL_POLYGON_OFFSET_UNITS: 2036#endif // defined(GL_POLYGON_OFFSET_UNITS) 2037#if defined(GL_PROJECTION_STACK_DEPTH) 2038 case GL_PROJECTION_STACK_DEPTH: 2039#endif // defined(GL_PROJECTION_STACK_DEPTH) 2040#if defined(GL_RED_BITS) 2041 case GL_RED_BITS: 2042#endif // defined(GL_RED_BITS) 2043#if defined(GL_SHADE_MODEL) 2044 case GL_SHADE_MODEL: 2045#endif // defined(GL_SHADE_MODEL) 2046#if defined(GL_STENCIL_BITS) 2047 case GL_STENCIL_BITS: 2048#endif // defined(GL_STENCIL_BITS) 2049#if defined(GL_STENCIL_CLEAR_VALUE) 2050 case GL_STENCIL_CLEAR_VALUE: 2051#endif // defined(GL_STENCIL_CLEAR_VALUE) 2052#if defined(GL_STENCIL_FAIL) 2053 case GL_STENCIL_FAIL: 2054#endif // defined(GL_STENCIL_FAIL) 2055#if defined(GL_STENCIL_FUNC) 2056 case GL_STENCIL_FUNC: 2057#endif // defined(GL_STENCIL_FUNC) 2058#if defined(GL_STENCIL_PASS_DEPTH_FAIL) 2059 case GL_STENCIL_PASS_DEPTH_FAIL: 2060#endif // defined(GL_STENCIL_PASS_DEPTH_FAIL) 2061#if defined(GL_STENCIL_PASS_DEPTH_PASS) 2062 case GL_STENCIL_PASS_DEPTH_PASS: 2063#endif // defined(GL_STENCIL_PASS_DEPTH_PASS) 2064#if defined(GL_STENCIL_REF) 2065 case GL_STENCIL_REF: 2066#endif // defined(GL_STENCIL_REF) 2067#if defined(GL_STENCIL_VALUE_MASK) 2068 case GL_STENCIL_VALUE_MASK: 2069#endif // defined(GL_STENCIL_VALUE_MASK) 2070#if defined(GL_STENCIL_WRITEMASK) 2071 case GL_STENCIL_WRITEMASK: 2072#endif // defined(GL_STENCIL_WRITEMASK) 2073#if defined(GL_SUBPIXEL_BITS) 2074 case GL_SUBPIXEL_BITS: 2075#endif // defined(GL_SUBPIXEL_BITS) 2076#if defined(GL_TEXTURE_BINDING_2D) 2077 case GL_TEXTURE_BINDING_2D: 2078#endif // defined(GL_TEXTURE_BINDING_2D) 2079#if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) 2080 case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING: 2081#endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) 2082#if defined(GL_TEXTURE_COORD_ARRAY_SIZE) 2083 case GL_TEXTURE_COORD_ARRAY_SIZE: 2084#endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE) 2085#if defined(GL_TEXTURE_COORD_ARRAY_STRIDE) 2086 case GL_TEXTURE_COORD_ARRAY_STRIDE: 2087#endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE) 2088#if defined(GL_TEXTURE_COORD_ARRAY_TYPE) 2089 case GL_TEXTURE_COORD_ARRAY_TYPE: 2090#endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE) 2091#if defined(GL_TEXTURE_STACK_DEPTH) 2092 case GL_TEXTURE_STACK_DEPTH: 2093#endif // defined(GL_TEXTURE_STACK_DEPTH) 2094#if defined(GL_UNPACK_ALIGNMENT) 2095 case GL_UNPACK_ALIGNMENT: 2096#endif // defined(GL_UNPACK_ALIGNMENT) 2097#if defined(GL_VERTEX_ARRAY_BUFFER_BINDING) 2098 case GL_VERTEX_ARRAY_BUFFER_BINDING: 2099#endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING) 2100#if defined(GL_VERTEX_ARRAY_SIZE) 2101 case GL_VERTEX_ARRAY_SIZE: 2102#endif // defined(GL_VERTEX_ARRAY_SIZE) 2103#if defined(GL_VERTEX_ARRAY_STRIDE) 2104 case GL_VERTEX_ARRAY_STRIDE: 2105#endif // defined(GL_VERTEX_ARRAY_STRIDE) 2106#if defined(GL_VERTEX_ARRAY_TYPE) 2107 case GL_VERTEX_ARRAY_TYPE: 2108#endif // defined(GL_VERTEX_ARRAY_TYPE) 2109#if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) 2110 case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES: 2111#endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) 2112#if defined(GL_WEIGHT_ARRAY_SIZE_OES) 2113 case GL_WEIGHT_ARRAY_SIZE_OES: 2114#endif // defined(GL_WEIGHT_ARRAY_SIZE_OES) 2115#if defined(GL_WEIGHT_ARRAY_STRIDE_OES) 2116 case GL_WEIGHT_ARRAY_STRIDE_OES: 2117#endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES) 2118#if defined(GL_WEIGHT_ARRAY_TYPE_OES) 2119 case GL_WEIGHT_ARRAY_TYPE_OES: 2120#endif // defined(GL_WEIGHT_ARRAY_TYPE_OES) 2121 _needed = 1; 2122 break; 2123#if defined(GL_ALIASED_POINT_SIZE_RANGE) 2124 case GL_ALIASED_POINT_SIZE_RANGE: 2125#endif // defined(GL_ALIASED_POINT_SIZE_RANGE) 2126#if defined(GL_ALIASED_LINE_WIDTH_RANGE) 2127 case GL_ALIASED_LINE_WIDTH_RANGE: 2128#endif // defined(GL_ALIASED_LINE_WIDTH_RANGE) 2129#if defined(GL_DEPTH_RANGE) 2130 case GL_DEPTH_RANGE: 2131#endif // defined(GL_DEPTH_RANGE) 2132#if defined(GL_MAX_VIEWPORT_DIMS) 2133 case GL_MAX_VIEWPORT_DIMS: 2134#endif // defined(GL_MAX_VIEWPORT_DIMS) 2135#if defined(GL_SMOOTH_LINE_WIDTH_RANGE) 2136 case GL_SMOOTH_LINE_WIDTH_RANGE: 2137#endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE) 2138#if defined(GL_SMOOTH_POINT_SIZE_RANGE) 2139 case GL_SMOOTH_POINT_SIZE_RANGE: 2140#endif // defined(GL_SMOOTH_POINT_SIZE_RANGE) 2141 _needed = 2; 2142 break; 2143#if defined(GL_COLOR_CLEAR_VALUE) 2144 case GL_COLOR_CLEAR_VALUE: 2145#endif // defined(GL_COLOR_CLEAR_VALUE) 2146#if defined(GL_COLOR_WRITEMASK) 2147 case GL_COLOR_WRITEMASK: 2148#endif // defined(GL_COLOR_WRITEMASK) 2149#if defined(GL_FOG_COLOR) 2150 case GL_FOG_COLOR: 2151#endif // defined(GL_FOG_COLOR) 2152#if defined(GL_LIGHT_MODEL_AMBIENT) 2153 case GL_LIGHT_MODEL_AMBIENT: 2154#endif // defined(GL_LIGHT_MODEL_AMBIENT) 2155#if defined(GL_SCISSOR_BOX) 2156 case GL_SCISSOR_BOX: 2157#endif // defined(GL_SCISSOR_BOX) 2158#if defined(GL_VIEWPORT) 2159 case GL_VIEWPORT: 2160#endif // defined(GL_VIEWPORT) 2161 _needed = 4; 2162 break; 2163#if defined(GL_MODELVIEW_MATRIX) 2164 case GL_MODELVIEW_MATRIX: 2165#endif // defined(GL_MODELVIEW_MATRIX) 2166#if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) 2167 case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES: 2168#endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) 2169#if defined(GL_PROJECTION_MATRIX) 2170 case GL_PROJECTION_MATRIX: 2171#endif // defined(GL_PROJECTION_MATRIX) 2172#if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) 2173 case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES: 2174#endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) 2175#if defined(GL_TEXTURE_MATRIX) 2176 case GL_TEXTURE_MATRIX: 2177#endif // defined(GL_TEXTURE_MATRIX) 2178#if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) 2179 case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES: 2180#endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) 2181 _needed = 16; 2182 break; 2183#if defined(GL_COMPRESSED_TEXTURE_FORMATS) 2184 case GL_COMPRESSED_TEXTURE_FORMATS: 2185#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS) 2186 _needed = getNumCompressedTextureFormats(); 2187 break; 2188 default: 2189 _needed = 0; 2190 break; 2191 } 2192 if (_remaining < _needed) { 2193 _exception = 1; 2194 _env->ThrowNew(IAEClass, "length - offset < needed"); 2195 goto exit; 2196 } 2197 params_base = (GLint *) 2198 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 2199 params = params_base + offset; 2200 2201 glGetIntegerv( 2202 (GLenum)pname, 2203 (GLint *)params 2204 ); 2205 2206exit: 2207 if (params_base) { 2208 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 2209 _exception ? JNI_ABORT: 0); 2210 } 2211} 2212 2213/* void glGetIntegerv ( GLenum pname, GLint *params ) */ 2214static void 2215android_glGetIntegerv__ILjava_nio_IntBuffer_2 2216 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 2217 jint _exception = 0; 2218 jarray _array = (jarray) 0; 2219 jint _remaining; 2220 GLint *params = (GLint *) 0; 2221 2222 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 2223 int _needed; 2224 switch (pname) { 2225#if defined(GL_ALPHA_BITS) 2226 case GL_ALPHA_BITS: 2227#endif // defined(GL_ALPHA_BITS) 2228#if defined(GL_ALPHA_TEST_FUNC) 2229 case GL_ALPHA_TEST_FUNC: 2230#endif // defined(GL_ALPHA_TEST_FUNC) 2231#if defined(GL_ALPHA_TEST_REF) 2232 case GL_ALPHA_TEST_REF: 2233#endif // defined(GL_ALPHA_TEST_REF) 2234#if defined(GL_BLEND_DST) 2235 case GL_BLEND_DST: 2236#endif // defined(GL_BLEND_DST) 2237#if defined(GL_BLUE_BITS) 2238 case GL_BLUE_BITS: 2239#endif // defined(GL_BLUE_BITS) 2240#if defined(GL_COLOR_ARRAY_BUFFER_BINDING) 2241 case GL_COLOR_ARRAY_BUFFER_BINDING: 2242#endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING) 2243#if defined(GL_COLOR_ARRAY_SIZE) 2244 case GL_COLOR_ARRAY_SIZE: 2245#endif // defined(GL_COLOR_ARRAY_SIZE) 2246#if defined(GL_COLOR_ARRAY_STRIDE) 2247 case GL_COLOR_ARRAY_STRIDE: 2248#endif // defined(GL_COLOR_ARRAY_STRIDE) 2249#if defined(GL_COLOR_ARRAY_TYPE) 2250 case GL_COLOR_ARRAY_TYPE: 2251#endif // defined(GL_COLOR_ARRAY_TYPE) 2252#if defined(GL_CULL_FACE) 2253 case GL_CULL_FACE: 2254#endif // defined(GL_CULL_FACE) 2255#if defined(GL_DEPTH_BITS) 2256 case GL_DEPTH_BITS: 2257#endif // defined(GL_DEPTH_BITS) 2258#if defined(GL_DEPTH_CLEAR_VALUE) 2259 case GL_DEPTH_CLEAR_VALUE: 2260#endif // defined(GL_DEPTH_CLEAR_VALUE) 2261#if defined(GL_DEPTH_FUNC) 2262 case GL_DEPTH_FUNC: 2263#endif // defined(GL_DEPTH_FUNC) 2264#if defined(GL_DEPTH_WRITEMASK) 2265 case GL_DEPTH_WRITEMASK: 2266#endif // defined(GL_DEPTH_WRITEMASK) 2267#if defined(GL_FOG_DENSITY) 2268 case GL_FOG_DENSITY: 2269#endif // defined(GL_FOG_DENSITY) 2270#if defined(GL_FOG_END) 2271 case GL_FOG_END: 2272#endif // defined(GL_FOG_END) 2273#if defined(GL_FOG_MODE) 2274 case GL_FOG_MODE: 2275#endif // defined(GL_FOG_MODE) 2276#if defined(GL_FOG_START) 2277 case GL_FOG_START: 2278#endif // defined(GL_FOG_START) 2279#if defined(GL_FRONT_FACE) 2280 case GL_FRONT_FACE: 2281#endif // defined(GL_FRONT_FACE) 2282#if defined(GL_GREEN_BITS) 2283 case GL_GREEN_BITS: 2284#endif // defined(GL_GREEN_BITS) 2285#if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) 2286 case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES: 2287#endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) 2288#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) 2289 case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES: 2290#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) 2291#if defined(GL_LIGHT_MODEL_COLOR_CONTROL) 2292 case GL_LIGHT_MODEL_COLOR_CONTROL: 2293#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL) 2294#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER) 2295 case GL_LIGHT_MODEL_LOCAL_VIEWER: 2296#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER) 2297#if defined(GL_LIGHT_MODEL_TWO_SIDE) 2298 case GL_LIGHT_MODEL_TWO_SIDE: 2299#endif // defined(GL_LIGHT_MODEL_TWO_SIDE) 2300#if defined(GL_LINE_SMOOTH_HINT) 2301 case GL_LINE_SMOOTH_HINT: 2302#endif // defined(GL_LINE_SMOOTH_HINT) 2303#if defined(GL_LINE_WIDTH) 2304 case GL_LINE_WIDTH: 2305#endif // defined(GL_LINE_WIDTH) 2306#if defined(GL_LOGIC_OP_MODE) 2307 case GL_LOGIC_OP_MODE: 2308#endif // defined(GL_LOGIC_OP_MODE) 2309#if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) 2310 case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES: 2311#endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) 2312#if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) 2313 case GL_MATRIX_INDEX_ARRAY_SIZE_OES: 2314#endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES) 2315#if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) 2316 case GL_MATRIX_INDEX_ARRAY_STRIDE_OES: 2317#endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES) 2318#if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) 2319 case GL_MATRIX_INDEX_ARRAY_TYPE_OES: 2320#endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES) 2321#if defined(GL_MATRIX_MODE) 2322 case GL_MATRIX_MODE: 2323#endif // defined(GL_MATRIX_MODE) 2324#if defined(GL_MAX_CLIP_PLANES) 2325 case GL_MAX_CLIP_PLANES: 2326#endif // defined(GL_MAX_CLIP_PLANES) 2327#if defined(GL_MAX_ELEMENTS_INDICES) 2328 case GL_MAX_ELEMENTS_INDICES: 2329#endif // defined(GL_MAX_ELEMENTS_INDICES) 2330#if defined(GL_MAX_ELEMENTS_VERTICES) 2331 case GL_MAX_ELEMENTS_VERTICES: 2332#endif // defined(GL_MAX_ELEMENTS_VERTICES) 2333#if defined(GL_MAX_LIGHTS) 2334 case GL_MAX_LIGHTS: 2335#endif // defined(GL_MAX_LIGHTS) 2336#if defined(GL_MAX_MODELVIEW_STACK_DEPTH) 2337 case GL_MAX_MODELVIEW_STACK_DEPTH: 2338#endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH) 2339#if defined(GL_MAX_PALETTE_MATRICES_OES) 2340 case GL_MAX_PALETTE_MATRICES_OES: 2341#endif // defined(GL_MAX_PALETTE_MATRICES_OES) 2342#if defined(GL_MAX_PROJECTION_STACK_DEPTH) 2343 case GL_MAX_PROJECTION_STACK_DEPTH: 2344#endif // defined(GL_MAX_PROJECTION_STACK_DEPTH) 2345#if defined(GL_MAX_TEXTURE_SIZE) 2346 case GL_MAX_TEXTURE_SIZE: 2347#endif // defined(GL_MAX_TEXTURE_SIZE) 2348#if defined(GL_MAX_TEXTURE_STACK_DEPTH) 2349 case GL_MAX_TEXTURE_STACK_DEPTH: 2350#endif // defined(GL_MAX_TEXTURE_STACK_DEPTH) 2351#if defined(GL_MAX_TEXTURE_UNITS) 2352 case GL_MAX_TEXTURE_UNITS: 2353#endif // defined(GL_MAX_TEXTURE_UNITS) 2354#if defined(GL_MAX_VERTEX_UNITS_OES) 2355 case GL_MAX_VERTEX_UNITS_OES: 2356#endif // defined(GL_MAX_VERTEX_UNITS_OES) 2357#if defined(GL_MODELVIEW_STACK_DEPTH) 2358 case GL_MODELVIEW_STACK_DEPTH: 2359#endif // defined(GL_MODELVIEW_STACK_DEPTH) 2360#if defined(GL_NORMAL_ARRAY_BUFFER_BINDING) 2361 case GL_NORMAL_ARRAY_BUFFER_BINDING: 2362#endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING) 2363#if defined(GL_NORMAL_ARRAY_STRIDE) 2364 case GL_NORMAL_ARRAY_STRIDE: 2365#endif // defined(GL_NORMAL_ARRAY_STRIDE) 2366#if defined(GL_NORMAL_ARRAY_TYPE) 2367 case GL_NORMAL_ARRAY_TYPE: 2368#endif // defined(GL_NORMAL_ARRAY_TYPE) 2369#if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) 2370 case GL_NUM_COMPRESSED_TEXTURE_FORMATS: 2371#endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS) 2372#if defined(GL_PACK_ALIGNMENT) 2373 case GL_PACK_ALIGNMENT: 2374#endif // defined(GL_PACK_ALIGNMENT) 2375#if defined(GL_PERSPECTIVE_CORRECTION_HINT) 2376 case GL_PERSPECTIVE_CORRECTION_HINT: 2377#endif // defined(GL_PERSPECTIVE_CORRECTION_HINT) 2378#if defined(GL_POINT_SIZE) 2379 case GL_POINT_SIZE: 2380#endif // defined(GL_POINT_SIZE) 2381#if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) 2382 case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES: 2383#endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) 2384#if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) 2385 case GL_POINT_SIZE_ARRAY_STRIDE_OES: 2386#endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES) 2387#if defined(GL_POINT_SIZE_ARRAY_TYPE_OES) 2388 case GL_POINT_SIZE_ARRAY_TYPE_OES: 2389#endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES) 2390#if defined(GL_POINT_SMOOTH_HINT) 2391 case GL_POINT_SMOOTH_HINT: 2392#endif // defined(GL_POINT_SMOOTH_HINT) 2393#if defined(GL_POLYGON_OFFSET_FACTOR) 2394 case GL_POLYGON_OFFSET_FACTOR: 2395#endif // defined(GL_POLYGON_OFFSET_FACTOR) 2396#if defined(GL_POLYGON_OFFSET_UNITS) 2397 case GL_POLYGON_OFFSET_UNITS: 2398#endif // defined(GL_POLYGON_OFFSET_UNITS) 2399#if defined(GL_PROJECTION_STACK_DEPTH) 2400 case GL_PROJECTION_STACK_DEPTH: 2401#endif // defined(GL_PROJECTION_STACK_DEPTH) 2402#if defined(GL_RED_BITS) 2403 case GL_RED_BITS: 2404#endif // defined(GL_RED_BITS) 2405#if defined(GL_SHADE_MODEL) 2406 case GL_SHADE_MODEL: 2407#endif // defined(GL_SHADE_MODEL) 2408#if defined(GL_STENCIL_BITS) 2409 case GL_STENCIL_BITS: 2410#endif // defined(GL_STENCIL_BITS) 2411#if defined(GL_STENCIL_CLEAR_VALUE) 2412 case GL_STENCIL_CLEAR_VALUE: 2413#endif // defined(GL_STENCIL_CLEAR_VALUE) 2414#if defined(GL_STENCIL_FAIL) 2415 case GL_STENCIL_FAIL: 2416#endif // defined(GL_STENCIL_FAIL) 2417#if defined(GL_STENCIL_FUNC) 2418 case GL_STENCIL_FUNC: 2419#endif // defined(GL_STENCIL_FUNC) 2420#if defined(GL_STENCIL_PASS_DEPTH_FAIL) 2421 case GL_STENCIL_PASS_DEPTH_FAIL: 2422#endif // defined(GL_STENCIL_PASS_DEPTH_FAIL) 2423#if defined(GL_STENCIL_PASS_DEPTH_PASS) 2424 case GL_STENCIL_PASS_DEPTH_PASS: 2425#endif // defined(GL_STENCIL_PASS_DEPTH_PASS) 2426#if defined(GL_STENCIL_REF) 2427 case GL_STENCIL_REF: 2428#endif // defined(GL_STENCIL_REF) 2429#if defined(GL_STENCIL_VALUE_MASK) 2430 case GL_STENCIL_VALUE_MASK: 2431#endif // defined(GL_STENCIL_VALUE_MASK) 2432#if defined(GL_STENCIL_WRITEMASK) 2433 case GL_STENCIL_WRITEMASK: 2434#endif // defined(GL_STENCIL_WRITEMASK) 2435#if defined(GL_SUBPIXEL_BITS) 2436 case GL_SUBPIXEL_BITS: 2437#endif // defined(GL_SUBPIXEL_BITS) 2438#if defined(GL_TEXTURE_BINDING_2D) 2439 case GL_TEXTURE_BINDING_2D: 2440#endif // defined(GL_TEXTURE_BINDING_2D) 2441#if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) 2442 case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING: 2443#endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) 2444#if defined(GL_TEXTURE_COORD_ARRAY_SIZE) 2445 case GL_TEXTURE_COORD_ARRAY_SIZE: 2446#endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE) 2447#if defined(GL_TEXTURE_COORD_ARRAY_STRIDE) 2448 case GL_TEXTURE_COORD_ARRAY_STRIDE: 2449#endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE) 2450#if defined(GL_TEXTURE_COORD_ARRAY_TYPE) 2451 case GL_TEXTURE_COORD_ARRAY_TYPE: 2452#endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE) 2453#if defined(GL_TEXTURE_STACK_DEPTH) 2454 case GL_TEXTURE_STACK_DEPTH: 2455#endif // defined(GL_TEXTURE_STACK_DEPTH) 2456#if defined(GL_UNPACK_ALIGNMENT) 2457 case GL_UNPACK_ALIGNMENT: 2458#endif // defined(GL_UNPACK_ALIGNMENT) 2459#if defined(GL_VERTEX_ARRAY_BUFFER_BINDING) 2460 case GL_VERTEX_ARRAY_BUFFER_BINDING: 2461#endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING) 2462#if defined(GL_VERTEX_ARRAY_SIZE) 2463 case GL_VERTEX_ARRAY_SIZE: 2464#endif // defined(GL_VERTEX_ARRAY_SIZE) 2465#if defined(GL_VERTEX_ARRAY_STRIDE) 2466 case GL_VERTEX_ARRAY_STRIDE: 2467#endif // defined(GL_VERTEX_ARRAY_STRIDE) 2468#if defined(GL_VERTEX_ARRAY_TYPE) 2469 case GL_VERTEX_ARRAY_TYPE: 2470#endif // defined(GL_VERTEX_ARRAY_TYPE) 2471#if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) 2472 case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES: 2473#endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) 2474#if defined(GL_WEIGHT_ARRAY_SIZE_OES) 2475 case GL_WEIGHT_ARRAY_SIZE_OES: 2476#endif // defined(GL_WEIGHT_ARRAY_SIZE_OES) 2477#if defined(GL_WEIGHT_ARRAY_STRIDE_OES) 2478 case GL_WEIGHT_ARRAY_STRIDE_OES: 2479#endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES) 2480#if defined(GL_WEIGHT_ARRAY_TYPE_OES) 2481 case GL_WEIGHT_ARRAY_TYPE_OES: 2482#endif // defined(GL_WEIGHT_ARRAY_TYPE_OES) 2483 _needed = 1; 2484 break; 2485#if defined(GL_ALIASED_POINT_SIZE_RANGE) 2486 case GL_ALIASED_POINT_SIZE_RANGE: 2487#endif // defined(GL_ALIASED_POINT_SIZE_RANGE) 2488#if defined(GL_ALIASED_LINE_WIDTH_RANGE) 2489 case GL_ALIASED_LINE_WIDTH_RANGE: 2490#endif // defined(GL_ALIASED_LINE_WIDTH_RANGE) 2491#if defined(GL_DEPTH_RANGE) 2492 case GL_DEPTH_RANGE: 2493#endif // defined(GL_DEPTH_RANGE) 2494#if defined(GL_MAX_VIEWPORT_DIMS) 2495 case GL_MAX_VIEWPORT_DIMS: 2496#endif // defined(GL_MAX_VIEWPORT_DIMS) 2497#if defined(GL_SMOOTH_LINE_WIDTH_RANGE) 2498 case GL_SMOOTH_LINE_WIDTH_RANGE: 2499#endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE) 2500#if defined(GL_SMOOTH_POINT_SIZE_RANGE) 2501 case GL_SMOOTH_POINT_SIZE_RANGE: 2502#endif // defined(GL_SMOOTH_POINT_SIZE_RANGE) 2503 _needed = 2; 2504 break; 2505#if defined(GL_COLOR_CLEAR_VALUE) 2506 case GL_COLOR_CLEAR_VALUE: 2507#endif // defined(GL_COLOR_CLEAR_VALUE) 2508#if defined(GL_COLOR_WRITEMASK) 2509 case GL_COLOR_WRITEMASK: 2510#endif // defined(GL_COLOR_WRITEMASK) 2511#if defined(GL_FOG_COLOR) 2512 case GL_FOG_COLOR: 2513#endif // defined(GL_FOG_COLOR) 2514#if defined(GL_LIGHT_MODEL_AMBIENT) 2515 case GL_LIGHT_MODEL_AMBIENT: 2516#endif // defined(GL_LIGHT_MODEL_AMBIENT) 2517#if defined(GL_SCISSOR_BOX) 2518 case GL_SCISSOR_BOX: 2519#endif // defined(GL_SCISSOR_BOX) 2520#if defined(GL_VIEWPORT) 2521 case GL_VIEWPORT: 2522#endif // defined(GL_VIEWPORT) 2523 _needed = 4; 2524 break; 2525#if defined(GL_MODELVIEW_MATRIX) 2526 case GL_MODELVIEW_MATRIX: 2527#endif // defined(GL_MODELVIEW_MATRIX) 2528#if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) 2529 case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES: 2530#endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) 2531#if defined(GL_PROJECTION_MATRIX) 2532 case GL_PROJECTION_MATRIX: 2533#endif // defined(GL_PROJECTION_MATRIX) 2534#if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) 2535 case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES: 2536#endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) 2537#if defined(GL_TEXTURE_MATRIX) 2538 case GL_TEXTURE_MATRIX: 2539#endif // defined(GL_TEXTURE_MATRIX) 2540#if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) 2541 case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES: 2542#endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) 2543 _needed = 16; 2544 break; 2545#if defined(GL_COMPRESSED_TEXTURE_FORMATS) 2546 case GL_COMPRESSED_TEXTURE_FORMATS: 2547#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS) 2548 _needed = getNumCompressedTextureFormats(); 2549 break; 2550 default: 2551 _needed = 0; 2552 break; 2553 } 2554 if (_remaining < _needed) { 2555 _exception = 1; 2556 _env->ThrowNew(IAEClass, "remaining() < needed"); 2557 goto exit; 2558 } 2559 glGetIntegerv( 2560 (GLenum)pname, 2561 (GLint *)params 2562 ); 2563 2564exit: 2565 if (_array) { 2566 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 2567 } 2568} 2569 2570/* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */ 2571static void 2572android_glGetProgramiv__II_3II 2573 (JNIEnv *_env, jobject _this, jint program, jint pname, jintArray params_ref, jint offset) { 2574 jint _exception = 0; 2575 GLint *params_base = (GLint *) 0; 2576 jint _remaining; 2577 GLint *params = (GLint *) 0; 2578 2579 if (!params_ref) { 2580 _exception = 1; 2581 _env->ThrowNew(IAEClass, "params == null"); 2582 goto exit; 2583 } 2584 if (offset < 0) { 2585 _exception = 1; 2586 _env->ThrowNew(IAEClass, "offset < 0"); 2587 goto exit; 2588 } 2589 _remaining = _env->GetArrayLength(params_ref) - offset; 2590 params_base = (GLint *) 2591 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 2592 params = params_base + offset; 2593 2594 glGetProgramiv( 2595 (GLuint)program, 2596 (GLenum)pname, 2597 (GLint *)params 2598 ); 2599 2600exit: 2601 if (params_base) { 2602 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 2603 _exception ? JNI_ABORT: 0); 2604 } 2605} 2606 2607/* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */ 2608static void 2609android_glGetProgramiv__IILjava_nio_IntBuffer_2 2610 (JNIEnv *_env, jobject _this, jint program, jint pname, jobject params_buf) { 2611 jint _exception = 0; 2612 jarray _array = (jarray) 0; 2613 jint _remaining; 2614 GLint *params = (GLint *) 0; 2615 2616 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 2617 glGetProgramiv( 2618 (GLuint)program, 2619 (GLenum)pname, 2620 (GLint *)params 2621 ); 2622 if (_array) { 2623 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 2624 } 2625} 2626 2627#include <string.h> 2628 2629/* void glGetProgramInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */ 2630static 2631jstring 2632android_glGetProgramInfoLog (JNIEnv *_env, jobject _this, jint shader) { 2633 GLint infoLen = 0; 2634 jstring _result = 0; 2635 char* buf = 0; 2636 glGetProgramiv(shader, GL_INFO_LOG_LENGTH, &infoLen); 2637 if (infoLen) { 2638 char* buf = (char*) malloc(infoLen); 2639 if (buf == 0) { 2640 _env->ThrowNew(IAEClass, "out of memory"); 2641 goto exit; 2642 } 2643 glGetProgramInfoLog(shader, infoLen, NULL, buf); 2644 _result = _env->NewStringUTF(buf); 2645 } else { 2646 _result = _env->NewStringUTF(""); 2647 } 2648exit: 2649 if (buf) { 2650 free(buf); 2651 } 2652 return _result; 2653} 2654/* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 2655static void 2656android_glGetRenderbufferParameteriv__II_3II 2657 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 2658 jint _exception = 0; 2659 GLint *params_base = (GLint *) 0; 2660 jint _remaining; 2661 GLint *params = (GLint *) 0; 2662 2663 if (!params_ref) { 2664 _exception = 1; 2665 _env->ThrowNew(IAEClass, "params == null"); 2666 goto exit; 2667 } 2668 if (offset < 0) { 2669 _exception = 1; 2670 _env->ThrowNew(IAEClass, "offset < 0"); 2671 goto exit; 2672 } 2673 _remaining = _env->GetArrayLength(params_ref) - offset; 2674 params_base = (GLint *) 2675 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 2676 params = params_base + offset; 2677 2678 glGetRenderbufferParameteriv( 2679 (GLenum)target, 2680 (GLenum)pname, 2681 (GLint *)params 2682 ); 2683 2684exit: 2685 if (params_base) { 2686 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 2687 _exception ? JNI_ABORT: 0); 2688 } 2689} 2690 2691/* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 2692static void 2693android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2 2694 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 2695 jint _exception = 0; 2696 jarray _array = (jarray) 0; 2697 jint _remaining; 2698 GLint *params = (GLint *) 0; 2699 2700 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 2701 glGetRenderbufferParameteriv( 2702 (GLenum)target, 2703 (GLenum)pname, 2704 (GLint *)params 2705 ); 2706 if (_array) { 2707 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 2708 } 2709} 2710 2711/* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */ 2712static void 2713android_glGetShaderiv__II_3II 2714 (JNIEnv *_env, jobject _this, jint shader, jint pname, jintArray params_ref, jint offset) { 2715 jint _exception = 0; 2716 GLint *params_base = (GLint *) 0; 2717 jint _remaining; 2718 GLint *params = (GLint *) 0; 2719 2720 if (!params_ref) { 2721 _exception = 1; 2722 _env->ThrowNew(IAEClass, "params == null"); 2723 goto exit; 2724 } 2725 if (offset < 0) { 2726 _exception = 1; 2727 _env->ThrowNew(IAEClass, "offset < 0"); 2728 goto exit; 2729 } 2730 _remaining = _env->GetArrayLength(params_ref) - offset; 2731 params_base = (GLint *) 2732 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 2733 params = params_base + offset; 2734 2735 glGetShaderiv( 2736 (GLuint)shader, 2737 (GLenum)pname, 2738 (GLint *)params 2739 ); 2740 2741exit: 2742 if (params_base) { 2743 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 2744 _exception ? JNI_ABORT: 0); 2745 } 2746} 2747 2748/* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */ 2749static void 2750android_glGetShaderiv__IILjava_nio_IntBuffer_2 2751 (JNIEnv *_env, jobject _this, jint shader, jint pname, jobject params_buf) { 2752 jint _exception = 0; 2753 jarray _array = (jarray) 0; 2754 jint _remaining; 2755 GLint *params = (GLint *) 0; 2756 2757 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 2758 glGetShaderiv( 2759 (GLuint)shader, 2760 (GLenum)pname, 2761 (GLint *)params 2762 ); 2763 if (_array) { 2764 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 2765 } 2766} 2767 2768#include <string.h> 2769 2770/* void glGetShaderInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */ 2771static 2772jstring 2773android_glGetShaderInfoLog (JNIEnv *_env, jobject _this, jint shader) { 2774 GLint infoLen = 0; 2775 jstring _result = 0; 2776 char* buf = 0; 2777 glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen); 2778 if (infoLen) { 2779 char* buf = (char*) malloc(infoLen); 2780 if (buf == 0) { 2781 _env->ThrowNew(IAEClass, "out of memory"); 2782 goto exit; 2783 } 2784 glGetShaderInfoLog(shader, infoLen, NULL, buf); 2785 _result = _env->NewStringUTF(buf); 2786 } else { 2787 _result = _env->NewStringUTF(""); 2788 } 2789exit: 2790 if (buf) { 2791 free(buf); 2792 } 2793 return _result; 2794} 2795/* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */ 2796static void 2797android_glGetShaderPrecisionFormat__II_3II_3II 2798 (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jintArray range_ref, jint rangeOffset, jintArray precision_ref, jint precisionOffset) { 2799 jint _exception = 0; 2800 GLint *range_base = (GLint *) 0; 2801 jint _rangeRemaining; 2802 GLint *range = (GLint *) 0; 2803 GLint *precision_base = (GLint *) 0; 2804 jint _precisionRemaining; 2805 GLint *precision = (GLint *) 0; 2806 2807 if (!range_ref) { 2808 _exception = 1; 2809 _env->ThrowNew(IAEClass, "range == null"); 2810 goto exit; 2811 } 2812 if (rangeOffset < 0) { 2813 _exception = 1; 2814 _env->ThrowNew(IAEClass, "rangeOffset < 0"); 2815 goto exit; 2816 } 2817 _rangeRemaining = _env->GetArrayLength(range_ref) - rangeOffset; 2818 range_base = (GLint *) 2819 _env->GetPrimitiveArrayCritical(range_ref, (jboolean *)0); 2820 range = range_base + rangeOffset; 2821 2822 if (!precision_ref) { 2823 _exception = 1; 2824 _env->ThrowNew(IAEClass, "precision == null"); 2825 goto exit; 2826 } 2827 if (precisionOffset < 0) { 2828 _exception = 1; 2829 _env->ThrowNew(IAEClass, "precisionOffset < 0"); 2830 goto exit; 2831 } 2832 _precisionRemaining = _env->GetArrayLength(precision_ref) - precisionOffset; 2833 precision_base = (GLint *) 2834 _env->GetPrimitiveArrayCritical(precision_ref, (jboolean *)0); 2835 precision = precision_base + precisionOffset; 2836 2837 glGetShaderPrecisionFormat( 2838 (GLenum)shadertype, 2839 (GLenum)precisiontype, 2840 (GLint *)range, 2841 (GLint *)precision 2842 ); 2843 2844exit: 2845 if (precision_base) { 2846 _env->ReleasePrimitiveArrayCritical(precision_ref, precision_base, 2847 _exception ? JNI_ABORT: 0); 2848 } 2849 if (range_base) { 2850 _env->ReleasePrimitiveArrayCritical(range_ref, range_base, 2851 _exception ? JNI_ABORT: 0); 2852 } 2853} 2854 2855/* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */ 2856static void 2857android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 2858 (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jobject range_buf, jobject precision_buf) { 2859 jint _exception = 0; 2860 jarray _rangeArray = (jarray) 0; 2861 jarray _precisionArray = (jarray) 0; 2862 jint _rangeRemaining; 2863 GLint *range = (GLint *) 0; 2864 jint _precisionRemaining; 2865 GLint *precision = (GLint *) 0; 2866 2867 range = (GLint *)getPointer(_env, range_buf, &_rangeArray, &_rangeRemaining); 2868 precision = (GLint *)getPointer(_env, precision_buf, &_precisionArray, &_precisionRemaining); 2869 glGetShaderPrecisionFormat( 2870 (GLenum)shadertype, 2871 (GLenum)precisiontype, 2872 (GLint *)range, 2873 (GLint *)precision 2874 ); 2875 if (_rangeArray) { 2876 releasePointer(_env, _rangeArray, precision, _exception ? JNI_FALSE : JNI_TRUE); 2877 } 2878 if (_precisionArray) { 2879 releasePointer(_env, _precisionArray, range, _exception ? JNI_FALSE : JNI_TRUE); 2880 } 2881} 2882 2883/* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */ 2884static void 2885android_glGetShaderSource__II_3II_3BI 2886 (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jintArray length_ref, jint lengthOffset, jbyteArray source_ref, jint sourceOffset) { 2887 jint _exception = 0; 2888 GLsizei *length_base = (GLsizei *) 0; 2889 jint _lengthRemaining; 2890 GLsizei *length = (GLsizei *) 0; 2891 char *source_base = (char *) 0; 2892 jint _sourceRemaining; 2893 char *source = (char *) 0; 2894 2895 if (!length_ref) { 2896 _exception = 1; 2897 _env->ThrowNew(IAEClass, "length == null"); 2898 goto exit; 2899 } 2900 if (lengthOffset < 0) { 2901 _exception = 1; 2902 _env->ThrowNew(IAEClass, "lengthOffset < 0"); 2903 goto exit; 2904 } 2905 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 2906 length_base = (GLsizei *) 2907 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0); 2908 length = length_base + lengthOffset; 2909 2910 if (!source_ref) { 2911 _exception = 1; 2912 _env->ThrowNew(IAEClass, "source == null"); 2913 goto exit; 2914 } 2915 if (sourceOffset < 0) { 2916 _exception = 1; 2917 _env->ThrowNew(IAEClass, "sourceOffset < 0"); 2918 goto exit; 2919 } 2920 _sourceRemaining = _env->GetArrayLength(source_ref) - sourceOffset; 2921 source_base = (char *) 2922 _env->GetPrimitiveArrayCritical(source_ref, (jboolean *)0); 2923 source = source_base + sourceOffset; 2924 2925 glGetShaderSource( 2926 (GLuint)shader, 2927 (GLsizei)bufsize, 2928 (GLsizei *)length, 2929 (char *)source 2930 ); 2931 2932exit: 2933 if (source_base) { 2934 _env->ReleasePrimitiveArrayCritical(source_ref, source_base, 2935 _exception ? JNI_ABORT: 0); 2936 } 2937 if (length_base) { 2938 _env->ReleasePrimitiveArrayCritical(length_ref, length_base, 2939 _exception ? JNI_ABORT: 0); 2940 } 2941} 2942 2943/* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */ 2944static void 2945android_glGetShaderSource__IILjava_nio_IntBuffer_2B 2946 (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jobject length_buf, jbyte source) { 2947 jint _exception = 0; 2948 jarray _array = (jarray) 0; 2949 jint _remaining; 2950 GLsizei *length = (GLsizei *) 0; 2951 2952 length = (GLsizei *)getPointer(_env, length_buf, &_array, &_remaining); 2953 glGetShaderSource( 2954 (GLuint)shader, 2955 (GLsizei)bufsize, 2956 (GLsizei *)length, 2957 (char *)source 2958 ); 2959 if (_array) { 2960 releasePointer(_env, _array, length, _exception ? JNI_FALSE : JNI_TRUE); 2961 } 2962} 2963 2964#include <string.h> 2965 2966/* const GLubyte * glGetString ( GLenum name ) */ 2967static 2968jstring 2969android_glGetString 2970 (JNIEnv *_env, jobject _this, jint name) { 2971 const char * chars = (const char *)glGetString((GLenum)name); 2972 jstring output = _env->NewStringUTF(chars); 2973 return output; 2974} 2975/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ 2976static void 2977android_glGetTexParameterfv__II_3FI 2978 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { 2979 jint _exception = 0; 2980 GLfloat *params_base = (GLfloat *) 0; 2981 jint _remaining; 2982 GLfloat *params = (GLfloat *) 0; 2983 2984 if (!params_ref) { 2985 _exception = 1; 2986 _env->ThrowNew(IAEClass, "params == null"); 2987 goto exit; 2988 } 2989 if (offset < 0) { 2990 _exception = 1; 2991 _env->ThrowNew(IAEClass, "offset < 0"); 2992 goto exit; 2993 } 2994 _remaining = _env->GetArrayLength(params_ref) - offset; 2995 if (_remaining < 1) { 2996 _exception = 1; 2997 _env->ThrowNew(IAEClass, "length - offset < 1"); 2998 goto exit; 2999 } 3000 params_base = (GLfloat *) 3001 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3002 params = params_base + offset; 3003 3004 glGetTexParameterfv( 3005 (GLenum)target, 3006 (GLenum)pname, 3007 (GLfloat *)params 3008 ); 3009 3010exit: 3011 if (params_base) { 3012 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3013 _exception ? JNI_ABORT: 0); 3014 } 3015} 3016 3017/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ 3018static void 3019android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 3020 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 3021 jint _exception = 0; 3022 jarray _array = (jarray) 0; 3023 jint _remaining; 3024 GLfloat *params = (GLfloat *) 0; 3025 3026 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); 3027 if (_remaining < 1) { 3028 _exception = 1; 3029 _env->ThrowNew(IAEClass, "remaining() < 1"); 3030 goto exit; 3031 } 3032 glGetTexParameterfv( 3033 (GLenum)target, 3034 (GLenum)pname, 3035 (GLfloat *)params 3036 ); 3037 3038exit: 3039 if (_array) { 3040 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 3041 } 3042} 3043 3044/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 3045static void 3046android_glGetTexParameteriv__II_3II 3047 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 3048 jint _exception = 0; 3049 GLint *params_base = (GLint *) 0; 3050 jint _remaining; 3051 GLint *params = (GLint *) 0; 3052 3053 if (!params_ref) { 3054 _exception = 1; 3055 _env->ThrowNew(IAEClass, "params == null"); 3056 goto exit; 3057 } 3058 if (offset < 0) { 3059 _exception = 1; 3060 _env->ThrowNew(IAEClass, "offset < 0"); 3061 goto exit; 3062 } 3063 _remaining = _env->GetArrayLength(params_ref) - offset; 3064 if (_remaining < 1) { 3065 _exception = 1; 3066 _env->ThrowNew(IAEClass, "length - offset < 1"); 3067 goto exit; 3068 } 3069 params_base = (GLint *) 3070 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3071 params = params_base + offset; 3072 3073 glGetTexParameteriv( 3074 (GLenum)target, 3075 (GLenum)pname, 3076 (GLint *)params 3077 ); 3078 3079exit: 3080 if (params_base) { 3081 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3082 _exception ? JNI_ABORT: 0); 3083 } 3084} 3085 3086/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 3087static void 3088android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 3089 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 3090 jint _exception = 0; 3091 jarray _array = (jarray) 0; 3092 jint _remaining; 3093 GLint *params = (GLint *) 0; 3094 3095 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 3096 if (_remaining < 1) { 3097 _exception = 1; 3098 _env->ThrowNew(IAEClass, "remaining() < 1"); 3099 goto exit; 3100 } 3101 glGetTexParameteriv( 3102 (GLenum)target, 3103 (GLenum)pname, 3104 (GLint *)params 3105 ); 3106 3107exit: 3108 if (_array) { 3109 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 3110 } 3111} 3112 3113/* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */ 3114static void 3115android_glGetUniformfv__II_3FI 3116 (JNIEnv *_env, jobject _this, jint program, jint location, jfloatArray params_ref, jint offset) { 3117 jint _exception = 0; 3118 GLfloat *params_base = (GLfloat *) 0; 3119 jint _remaining; 3120 GLfloat *params = (GLfloat *) 0; 3121 3122 if (!params_ref) { 3123 _exception = 1; 3124 _env->ThrowNew(IAEClass, "params == null"); 3125 goto exit; 3126 } 3127 if (offset < 0) { 3128 _exception = 1; 3129 _env->ThrowNew(IAEClass, "offset < 0"); 3130 goto exit; 3131 } 3132 _remaining = _env->GetArrayLength(params_ref) - offset; 3133 params_base = (GLfloat *) 3134 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3135 params = params_base + offset; 3136 3137 glGetUniformfv( 3138 (GLuint)program, 3139 (GLint)location, 3140 (GLfloat *)params 3141 ); 3142 3143exit: 3144 if (params_base) { 3145 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3146 _exception ? JNI_ABORT: 0); 3147 } 3148} 3149 3150/* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */ 3151static void 3152android_glGetUniformfv__IILjava_nio_FloatBuffer_2 3153 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) { 3154 jint _exception = 0; 3155 jarray _array = (jarray) 0; 3156 jint _remaining; 3157 GLfloat *params = (GLfloat *) 0; 3158 3159 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); 3160 glGetUniformfv( 3161 (GLuint)program, 3162 (GLint)location, 3163 (GLfloat *)params 3164 ); 3165 if (_array) { 3166 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 3167 } 3168} 3169 3170/* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */ 3171static void 3172android_glGetUniformiv__II_3II 3173 (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) { 3174 jint _exception = 0; 3175 GLint *params_base = (GLint *) 0; 3176 jint _remaining; 3177 GLint *params = (GLint *) 0; 3178 3179 if (!params_ref) { 3180 _exception = 1; 3181 _env->ThrowNew(IAEClass, "params == null"); 3182 goto exit; 3183 } 3184 if (offset < 0) { 3185 _exception = 1; 3186 _env->ThrowNew(IAEClass, "offset < 0"); 3187 goto exit; 3188 } 3189 _remaining = _env->GetArrayLength(params_ref) - offset; 3190 params_base = (GLint *) 3191 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3192 params = params_base + offset; 3193 3194 glGetUniformiv( 3195 (GLuint)program, 3196 (GLint)location, 3197 (GLint *)params 3198 ); 3199 3200exit: 3201 if (params_base) { 3202 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3203 _exception ? JNI_ABORT: 0); 3204 } 3205} 3206 3207/* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */ 3208static void 3209android_glGetUniformiv__IILjava_nio_IntBuffer_2 3210 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) { 3211 jint _exception = 0; 3212 jarray _array = (jarray) 0; 3213 jint _remaining; 3214 GLint *params = (GLint *) 0; 3215 3216 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 3217 glGetUniformiv( 3218 (GLuint)program, 3219 (GLint)location, 3220 (GLint *)params 3221 ); 3222 if (_array) { 3223 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 3224 } 3225} 3226 3227/* int glGetUniformLocation ( GLuint program, const char *name ) */ 3228static jint 3229android_glGetUniformLocation__ILjava_lang_String_2 3230 (JNIEnv *_env, jobject _this, jint program, jstring name) { 3231 int _returnValue = 0; 3232 const char* _nativename = 0; 3233 3234 if (!name) { 3235 _env->ThrowNew(IAEClass, "name == null"); 3236 goto exit; 3237 } 3238 _nativename = _env->GetStringUTFChars(name, 0); 3239 3240 _returnValue = glGetUniformLocation( 3241 (GLuint)program, 3242 (char *)_nativename 3243 ); 3244 3245exit: 3246 if (_nativename) { 3247 _env->ReleaseStringUTFChars(name, _nativename); 3248 } 3249 3250 return _returnValue; 3251} 3252 3253/* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */ 3254static void 3255android_glGetVertexAttribfv__II_3FI 3256 (JNIEnv *_env, jobject _this, jint index, jint pname, jfloatArray params_ref, jint offset) { 3257 jint _exception = 0; 3258 GLfloat *params_base = (GLfloat *) 0; 3259 jint _remaining; 3260 GLfloat *params = (GLfloat *) 0; 3261 3262 if (!params_ref) { 3263 _exception = 1; 3264 _env->ThrowNew(IAEClass, "params == null"); 3265 goto exit; 3266 } 3267 if (offset < 0) { 3268 _exception = 1; 3269 _env->ThrowNew(IAEClass, "offset < 0"); 3270 goto exit; 3271 } 3272 _remaining = _env->GetArrayLength(params_ref) - offset; 3273 params_base = (GLfloat *) 3274 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3275 params = params_base + offset; 3276 3277 glGetVertexAttribfv( 3278 (GLuint)index, 3279 (GLenum)pname, 3280 (GLfloat *)params 3281 ); 3282 3283exit: 3284 if (params_base) { 3285 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3286 _exception ? JNI_ABORT: 0); 3287 } 3288} 3289 3290/* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */ 3291static void 3292android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2 3293 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) { 3294 jint _exception = 0; 3295 jarray _array = (jarray) 0; 3296 jint _remaining; 3297 GLfloat *params = (GLfloat *) 0; 3298 3299 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); 3300 glGetVertexAttribfv( 3301 (GLuint)index, 3302 (GLenum)pname, 3303 (GLfloat *)params 3304 ); 3305 if (_array) { 3306 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 3307 } 3308} 3309 3310/* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */ 3311static void 3312android_glGetVertexAttribiv__II_3II 3313 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) { 3314 jint _exception = 0; 3315 GLint *params_base = (GLint *) 0; 3316 jint _remaining; 3317 GLint *params = (GLint *) 0; 3318 3319 if (!params_ref) { 3320 _exception = 1; 3321 _env->ThrowNew(IAEClass, "params == null"); 3322 goto exit; 3323 } 3324 if (offset < 0) { 3325 _exception = 1; 3326 _env->ThrowNew(IAEClass, "offset < 0"); 3327 goto exit; 3328 } 3329 _remaining = _env->GetArrayLength(params_ref) - offset; 3330 params_base = (GLint *) 3331 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3332 params = params_base + offset; 3333 3334 glGetVertexAttribiv( 3335 (GLuint)index, 3336 (GLenum)pname, 3337 (GLint *)params 3338 ); 3339 3340exit: 3341 if (params_base) { 3342 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3343 _exception ? JNI_ABORT: 0); 3344 } 3345} 3346 3347/* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */ 3348static void 3349android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2 3350 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) { 3351 jint _exception = 0; 3352 jarray _array = (jarray) 0; 3353 jint _remaining; 3354 GLint *params = (GLint *) 0; 3355 3356 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 3357 glGetVertexAttribiv( 3358 (GLuint)index, 3359 (GLenum)pname, 3360 (GLint *)params 3361 ); 3362 if (_array) { 3363 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 3364 } 3365} 3366 3367/* void glHint ( GLenum target, GLenum mode ) */ 3368static void 3369android_glHint__II 3370 (JNIEnv *_env, jobject _this, jint target, jint mode) { 3371 glHint( 3372 (GLenum)target, 3373 (GLenum)mode 3374 ); 3375} 3376 3377/* GLboolean glIsBuffer ( GLuint buffer ) */ 3378static jboolean 3379android_glIsBuffer__I 3380 (JNIEnv *_env, jobject _this, jint buffer) { 3381 GLboolean _returnValue; 3382 _returnValue = glIsBuffer( 3383 (GLuint)buffer 3384 ); 3385 return _returnValue; 3386} 3387 3388/* GLboolean glIsEnabled ( GLenum cap ) */ 3389static jboolean 3390android_glIsEnabled__I 3391 (JNIEnv *_env, jobject _this, jint cap) { 3392 GLboolean _returnValue; 3393 _returnValue = glIsEnabled( 3394 (GLenum)cap 3395 ); 3396 return _returnValue; 3397} 3398 3399/* GLboolean glIsFramebuffer ( GLuint framebuffer ) */ 3400static jboolean 3401android_glIsFramebuffer__I 3402 (JNIEnv *_env, jobject _this, jint framebuffer) { 3403 GLboolean _returnValue; 3404 _returnValue = glIsFramebuffer( 3405 (GLuint)framebuffer 3406 ); 3407 return _returnValue; 3408} 3409 3410/* GLboolean glIsProgram ( GLuint program ) */ 3411static jboolean 3412android_glIsProgram__I 3413 (JNIEnv *_env, jobject _this, jint program) { 3414 GLboolean _returnValue; 3415 _returnValue = glIsProgram( 3416 (GLuint)program 3417 ); 3418 return _returnValue; 3419} 3420 3421/* GLboolean glIsRenderbuffer ( GLuint renderbuffer ) */ 3422static jboolean 3423android_glIsRenderbuffer__I 3424 (JNIEnv *_env, jobject _this, jint renderbuffer) { 3425 GLboolean _returnValue; 3426 _returnValue = glIsRenderbuffer( 3427 (GLuint)renderbuffer 3428 ); 3429 return _returnValue; 3430} 3431 3432/* GLboolean glIsShader ( GLuint shader ) */ 3433static jboolean 3434android_glIsShader__I 3435 (JNIEnv *_env, jobject _this, jint shader) { 3436 GLboolean _returnValue; 3437 _returnValue = glIsShader( 3438 (GLuint)shader 3439 ); 3440 return _returnValue; 3441} 3442 3443/* GLboolean glIsTexture ( GLuint texture ) */ 3444static jboolean 3445android_glIsTexture__I 3446 (JNIEnv *_env, jobject _this, jint texture) { 3447 GLboolean _returnValue; 3448 _returnValue = glIsTexture( 3449 (GLuint)texture 3450 ); 3451 return _returnValue; 3452} 3453 3454/* void glLineWidth ( GLfloat width ) */ 3455static void 3456android_glLineWidth__F 3457 (JNIEnv *_env, jobject _this, jfloat width) { 3458 glLineWidth( 3459 (GLfloat)width 3460 ); 3461} 3462 3463/* void glLinkProgram ( GLuint program ) */ 3464static void 3465android_glLinkProgram__I 3466 (JNIEnv *_env, jobject _this, jint program) { 3467 glLinkProgram( 3468 (GLuint)program 3469 ); 3470} 3471 3472/* void glPixelStorei ( GLenum pname, GLint param ) */ 3473static void 3474android_glPixelStorei__II 3475 (JNIEnv *_env, jobject _this, jint pname, jint param) { 3476 glPixelStorei( 3477 (GLenum)pname, 3478 (GLint)param 3479 ); 3480} 3481 3482/* void glPolygonOffset ( GLfloat factor, GLfloat units ) */ 3483static void 3484android_glPolygonOffset__FF 3485 (JNIEnv *_env, jobject _this, jfloat factor, jfloat units) { 3486 glPolygonOffset( 3487 (GLfloat)factor, 3488 (GLfloat)units 3489 ); 3490} 3491 3492/* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) */ 3493static void 3494android_glReadPixels__IIIIIILjava_nio_Buffer_2 3495 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) { 3496 jint _exception = 0; 3497 jarray _array = (jarray) 0; 3498 jint _remaining; 3499 GLvoid *pixels = (GLvoid *) 0; 3500 3501 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining); 3502 glReadPixels( 3503 (GLint)x, 3504 (GLint)y, 3505 (GLsizei)width, 3506 (GLsizei)height, 3507 (GLenum)format, 3508 (GLenum)type, 3509 (GLvoid *)pixels 3510 ); 3511 if (_array) { 3512 releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE); 3513 } 3514} 3515 3516/* void glReleaseShaderCompiler ( void ) */ 3517static void 3518android_glReleaseShaderCompiler__ 3519 (JNIEnv *_env, jobject _this) { 3520 glReleaseShaderCompiler(); 3521} 3522 3523/* void glRenderbufferStorage ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */ 3524static void 3525android_glRenderbufferStorage__IIII 3526 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) { 3527 glRenderbufferStorage( 3528 (GLenum)target, 3529 (GLenum)internalformat, 3530 (GLsizei)width, 3531 (GLsizei)height 3532 ); 3533} 3534 3535/* void glSampleCoverage ( GLclampf value, GLboolean invert ) */ 3536static void 3537android_glSampleCoverage__FZ 3538 (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) { 3539 glSampleCoverage( 3540 (GLclampf)value, 3541 (GLboolean)invert 3542 ); 3543} 3544 3545/* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */ 3546static void 3547android_glScissor__IIII 3548 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) { 3549 glScissor( 3550 (GLint)x, 3551 (GLint)y, 3552 (GLsizei)width, 3553 (GLsizei)height 3554 ); 3555} 3556 3557/* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */ 3558static void 3559android_glShaderBinary__I_3IIILjava_nio_Buffer_2I 3560 (JNIEnv *_env, jobject _this, jint n, jintArray shaders_ref, jint offset, jint binaryformat, jobject binary_buf, jint length) { 3561 jarray _array = (jarray) 0; 3562 GLuint *shaders_base = (GLuint *) 0; 3563 jint _shadersRemaining; 3564 GLuint *shaders = (GLuint *) 0; 3565 jint _binaryRemaining; 3566 GLvoid *binary = (GLvoid *) 0; 3567 3568 if (!shaders_ref) { 3569 _env->ThrowNew(IAEClass, "shaders == null"); 3570 goto exit; 3571 } 3572 if (offset < 0) { 3573 _env->ThrowNew(IAEClass, "offset < 0"); 3574 goto exit; 3575 } 3576 _shadersRemaining = _env->GetArrayLength(shaders_ref) - offset; 3577 shaders_base = (GLuint *) 3578 _env->GetPrimitiveArrayCritical(shaders_ref, (jboolean *)0); 3579 shaders = shaders_base + offset; 3580 3581 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining); 3582 glShaderBinary( 3583 (GLsizei)n, 3584 (GLuint *)shaders, 3585 (GLenum)binaryformat, 3586 (GLvoid *)binary, 3587 (GLsizei)length 3588 ); 3589 3590exit: 3591 if (_array) { 3592 releasePointer(_env, _array, binary, JNI_FALSE); 3593 } 3594 if (shaders_base) { 3595 _env->ReleasePrimitiveArrayCritical(shaders_ref, shaders_base, 3596 JNI_ABORT); 3597 } 3598} 3599 3600/* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */ 3601static void 3602android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I 3603 (JNIEnv *_env, jobject _this, jint n, jobject shaders_buf, jint binaryformat, jobject binary_buf, jint length) { 3604 jarray _shadersArray = (jarray) 0; 3605 jarray _binaryArray = (jarray) 0; 3606 jint _shadersRemaining; 3607 GLuint *shaders = (GLuint *) 0; 3608 jint _binaryRemaining; 3609 GLvoid *binary = (GLvoid *) 0; 3610 3611 shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining); 3612 binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining); 3613 glShaderBinary( 3614 (GLsizei)n, 3615 (GLuint *)shaders, 3616 (GLenum)binaryformat, 3617 (GLvoid *)binary, 3618 (GLsizei)length 3619 ); 3620 if (_shadersArray) { 3621 releasePointer(_env, _shadersArray, binary, JNI_FALSE); 3622 } 3623 if (_binaryArray) { 3624 releasePointer(_env, _binaryArray, shaders, JNI_FALSE); 3625 } 3626} 3627 3628 3629/* void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint * length ) */ 3630static 3631void 3632android_glShaderSource 3633 (JNIEnv *_env, jobject _this, jint shader, jstring string) { 3634 3635 if (!string) { 3636 _env->ThrowNew(IAEClass, "string == null"); 3637 return; 3638 } 3639 3640 const char* nativeString = _env->GetStringUTFChars(string, 0); 3641 const char* strings[] = {nativeString}; 3642 glShaderSource(shader, 1, strings, 0); 3643 _env->ReleaseStringUTFChars(string, nativeString); 3644} 3645/* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */ 3646static void 3647android_glStencilFunc__III 3648 (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) { 3649 glStencilFunc( 3650 (GLenum)func, 3651 (GLint)ref, 3652 (GLuint)mask 3653 ); 3654} 3655 3656/* void glStencilFuncSeparate ( GLenum face, GLenum func, GLint ref, GLuint mask ) */ 3657static void 3658android_glStencilFuncSeparate__IIII 3659 (JNIEnv *_env, jobject _this, jint face, jint func, jint ref, jint mask) { 3660 glStencilFuncSeparate( 3661 (GLenum)face, 3662 (GLenum)func, 3663 (GLint)ref, 3664 (GLuint)mask 3665 ); 3666} 3667 3668/* void glStencilMask ( GLuint mask ) */ 3669static void 3670android_glStencilMask__I 3671 (JNIEnv *_env, jobject _this, jint mask) { 3672 glStencilMask( 3673 (GLuint)mask 3674 ); 3675} 3676 3677/* void glStencilMaskSeparate ( GLenum face, GLuint mask ) */ 3678static void 3679android_glStencilMaskSeparate__II 3680 (JNIEnv *_env, jobject _this, jint face, jint mask) { 3681 glStencilMaskSeparate( 3682 (GLenum)face, 3683 (GLuint)mask 3684 ); 3685} 3686 3687/* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */ 3688static void 3689android_glStencilOp__III 3690 (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) { 3691 glStencilOp( 3692 (GLenum)fail, 3693 (GLenum)zfail, 3694 (GLenum)zpass 3695 ); 3696} 3697 3698/* void glStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass ) */ 3699static void 3700android_glStencilOpSeparate__IIII 3701 (JNIEnv *_env, jobject _this, jint face, jint fail, jint zfail, jint zpass) { 3702 glStencilOpSeparate( 3703 (GLenum)face, 3704 (GLenum)fail, 3705 (GLenum)zfail, 3706 (GLenum)zpass 3707 ); 3708} 3709 3710/* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */ 3711static void 3712android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 3713 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) { 3714 jarray _array = (jarray) 0; 3715 jint _remaining; 3716 GLvoid *pixels = (GLvoid *) 0; 3717 3718 if (pixels_buf) { 3719 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining); 3720 } 3721 glTexImage2D( 3722 (GLenum)target, 3723 (GLint)level, 3724 (GLint)internalformat, 3725 (GLsizei)width, 3726 (GLsizei)height, 3727 (GLint)border, 3728 (GLenum)format, 3729 (GLenum)type, 3730 (GLvoid *)pixels 3731 ); 3732 if (_array) { 3733 releasePointer(_env, _array, pixels, JNI_FALSE); 3734 } 3735} 3736 3737/* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */ 3738static void 3739android_glTexParameterf__IIF 3740 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) { 3741 glTexParameterf( 3742 (GLenum)target, 3743 (GLenum)pname, 3744 (GLfloat)param 3745 ); 3746} 3747 3748/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ 3749static void 3750android_glTexParameterfv__II_3FI 3751 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { 3752 GLfloat *params_base = (GLfloat *) 0; 3753 jint _remaining; 3754 GLfloat *params = (GLfloat *) 0; 3755 3756 if (!params_ref) { 3757 _env->ThrowNew(IAEClass, "params == null"); 3758 goto exit; 3759 } 3760 if (offset < 0) { 3761 _env->ThrowNew(IAEClass, "offset < 0"); 3762 goto exit; 3763 } 3764 _remaining = _env->GetArrayLength(params_ref) - offset; 3765 if (_remaining < 1) { 3766 _env->ThrowNew(IAEClass, "length - offset < 1"); 3767 goto exit; 3768 } 3769 params_base = (GLfloat *) 3770 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3771 params = params_base + offset; 3772 3773 glTexParameterfv( 3774 (GLenum)target, 3775 (GLenum)pname, 3776 (GLfloat *)params 3777 ); 3778 3779exit: 3780 if (params_base) { 3781 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3782 JNI_ABORT); 3783 } 3784} 3785 3786/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ 3787static void 3788android_glTexParameterfv__IILjava_nio_FloatBuffer_2 3789 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 3790 jarray _array = (jarray) 0; 3791 jint _remaining; 3792 GLfloat *params = (GLfloat *) 0; 3793 3794 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); 3795 if (_remaining < 1) { 3796 _env->ThrowNew(IAEClass, "remaining() < 1"); 3797 goto exit; 3798 } 3799 glTexParameterfv( 3800 (GLenum)target, 3801 (GLenum)pname, 3802 (GLfloat *)params 3803 ); 3804 3805exit: 3806 if (_array) { 3807 releasePointer(_env, _array, params, JNI_FALSE); 3808 } 3809} 3810 3811/* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */ 3812static void 3813android_glTexParameteri__III 3814 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { 3815 glTexParameteri( 3816 (GLenum)target, 3817 (GLenum)pname, 3818 (GLint)param 3819 ); 3820} 3821 3822/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */ 3823static void 3824android_glTexParameteriv__II_3II 3825 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 3826 GLint *params_base = (GLint *) 0; 3827 jint _remaining; 3828 GLint *params = (GLint *) 0; 3829 3830 if (!params_ref) { 3831 _env->ThrowNew(IAEClass, "params == null"); 3832 goto exit; 3833 } 3834 if (offset < 0) { 3835 _env->ThrowNew(IAEClass, "offset < 0"); 3836 goto exit; 3837 } 3838 _remaining = _env->GetArrayLength(params_ref) - offset; 3839 if (_remaining < 1) { 3840 _env->ThrowNew(IAEClass, "length - offset < 1"); 3841 goto exit; 3842 } 3843 params_base = (GLint *) 3844 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 3845 params = params_base + offset; 3846 3847 glTexParameteriv( 3848 (GLenum)target, 3849 (GLenum)pname, 3850 (GLint *)params 3851 ); 3852 3853exit: 3854 if (params_base) { 3855 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 3856 JNI_ABORT); 3857 } 3858} 3859 3860/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */ 3861static void 3862android_glTexParameteriv__IILjava_nio_IntBuffer_2 3863 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 3864 jarray _array = (jarray) 0; 3865 jint _remaining; 3866 GLint *params = (GLint *) 0; 3867 3868 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); 3869 if (_remaining < 1) { 3870 _env->ThrowNew(IAEClass, "remaining() < 1"); 3871 goto exit; 3872 } 3873 glTexParameteriv( 3874 (GLenum)target, 3875 (GLenum)pname, 3876 (GLint *)params 3877 ); 3878 3879exit: 3880 if (_array) { 3881 releasePointer(_env, _array, params, JNI_FALSE); 3882 } 3883} 3884 3885/* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */ 3886static void 3887android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 3888 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) { 3889 jarray _array = (jarray) 0; 3890 jint _remaining; 3891 GLvoid *pixels = (GLvoid *) 0; 3892 3893 if (pixels_buf) { 3894 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining); 3895 } 3896 glTexSubImage2D( 3897 (GLenum)target, 3898 (GLint)level, 3899 (GLint)xoffset, 3900 (GLint)yoffset, 3901 (GLsizei)width, 3902 (GLsizei)height, 3903 (GLenum)format, 3904 (GLenum)type, 3905 (GLvoid *)pixels 3906 ); 3907 if (_array) { 3908 releasePointer(_env, _array, pixels, JNI_FALSE); 3909 } 3910} 3911 3912/* void glUniform1f ( GLint location, GLfloat x ) */ 3913static void 3914android_glUniform1f__IF 3915 (JNIEnv *_env, jobject _this, jint location, jfloat x) { 3916 glUniform1f( 3917 (GLint)location, 3918 (GLfloat)x 3919 ); 3920} 3921 3922/* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */ 3923static void 3924android_glUniform1fv__II_3FI 3925 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { 3926 GLfloat *v_base = (GLfloat *) 0; 3927 jint _remaining; 3928 GLfloat *v = (GLfloat *) 0; 3929 3930 if (!v_ref) { 3931 _env->ThrowNew(IAEClass, "v == null"); 3932 goto exit; 3933 } 3934 if (offset < 0) { 3935 _env->ThrowNew(IAEClass, "offset < 0"); 3936 goto exit; 3937 } 3938 _remaining = _env->GetArrayLength(v_ref) - offset; 3939 v_base = (GLfloat *) 3940 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 3941 v = v_base + offset; 3942 3943 glUniform1fv( 3944 (GLint)location, 3945 (GLsizei)count, 3946 (GLfloat *)v 3947 ); 3948 3949exit: 3950 if (v_base) { 3951 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 3952 JNI_ABORT); 3953 } 3954} 3955 3956/* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */ 3957static void 3958android_glUniform1fv__IILjava_nio_FloatBuffer_2 3959 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 3960 jarray _array = (jarray) 0; 3961 jint _remaining; 3962 GLfloat *v = (GLfloat *) 0; 3963 3964 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining); 3965 glUniform1fv( 3966 (GLint)location, 3967 (GLsizei)count, 3968 (GLfloat *)v 3969 ); 3970 if (_array) { 3971 releasePointer(_env, _array, v, JNI_FALSE); 3972 } 3973} 3974 3975/* void glUniform1i ( GLint location, GLint x ) */ 3976static void 3977android_glUniform1i__II 3978 (JNIEnv *_env, jobject _this, jint location, jint x) { 3979 glUniform1i( 3980 (GLint)location, 3981 (GLint)x 3982 ); 3983} 3984 3985/* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */ 3986static void 3987android_glUniform1iv__II_3II 3988 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { 3989 GLint *v_base = (GLint *) 0; 3990 jint _remaining; 3991 GLint *v = (GLint *) 0; 3992 3993 if (!v_ref) { 3994 _env->ThrowNew(IAEClass, "v == null"); 3995 goto exit; 3996 } 3997 if (offset < 0) { 3998 _env->ThrowNew(IAEClass, "offset < 0"); 3999 goto exit; 4000 } 4001 _remaining = _env->GetArrayLength(v_ref) - offset; 4002 v_base = (GLint *) 4003 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 4004 v = v_base + offset; 4005 4006 glUniform1iv( 4007 (GLint)location, 4008 (GLsizei)count, 4009 (GLint *)v 4010 ); 4011 4012exit: 4013 if (v_base) { 4014 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 4015 JNI_ABORT); 4016 } 4017} 4018 4019/* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */ 4020static void 4021android_glUniform1iv__IILjava_nio_IntBuffer_2 4022 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 4023 jarray _array = (jarray) 0; 4024 jint _remaining; 4025 GLint *v = (GLint *) 0; 4026 4027 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining); 4028 glUniform1iv( 4029 (GLint)location, 4030 (GLsizei)count, 4031 (GLint *)v 4032 ); 4033 if (_array) { 4034 releasePointer(_env, _array, v, JNI_FALSE); 4035 } 4036} 4037 4038/* void glUniform2f ( GLint location, GLfloat x, GLfloat y ) */ 4039static void 4040android_glUniform2f__IFF 4041 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y) { 4042 glUniform2f( 4043 (GLint)location, 4044 (GLfloat)x, 4045 (GLfloat)y 4046 ); 4047} 4048 4049/* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */ 4050static void 4051android_glUniform2fv__II_3FI 4052 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { 4053 GLfloat *v_base = (GLfloat *) 0; 4054 jint _remaining; 4055 GLfloat *v = (GLfloat *) 0; 4056 4057 if (!v_ref) { 4058 _env->ThrowNew(IAEClass, "v == null"); 4059 goto exit; 4060 } 4061 if (offset < 0) { 4062 _env->ThrowNew(IAEClass, "offset < 0"); 4063 goto exit; 4064 } 4065 _remaining = _env->GetArrayLength(v_ref) - offset; 4066 v_base = (GLfloat *) 4067 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 4068 v = v_base + offset; 4069 4070 glUniform2fv( 4071 (GLint)location, 4072 (GLsizei)count, 4073 (GLfloat *)v 4074 ); 4075 4076exit: 4077 if (v_base) { 4078 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 4079 JNI_ABORT); 4080 } 4081} 4082 4083/* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */ 4084static void 4085android_glUniform2fv__IILjava_nio_FloatBuffer_2 4086 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 4087 jarray _array = (jarray) 0; 4088 jint _remaining; 4089 GLfloat *v = (GLfloat *) 0; 4090 4091 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining); 4092 glUniform2fv( 4093 (GLint)location, 4094 (GLsizei)count, 4095 (GLfloat *)v 4096 ); 4097 if (_array) { 4098 releasePointer(_env, _array, v, JNI_FALSE); 4099 } 4100} 4101 4102/* void glUniform2i ( GLint location, GLint x, GLint y ) */ 4103static void 4104android_glUniform2i__III 4105 (JNIEnv *_env, jobject _this, jint location, jint x, jint y) { 4106 glUniform2i( 4107 (GLint)location, 4108 (GLint)x, 4109 (GLint)y 4110 ); 4111} 4112 4113/* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */ 4114static void 4115android_glUniform2iv__II_3II 4116 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { 4117 GLint *v_base = (GLint *) 0; 4118 jint _remaining; 4119 GLint *v = (GLint *) 0; 4120 4121 if (!v_ref) { 4122 _env->ThrowNew(IAEClass, "v == null"); 4123 goto exit; 4124 } 4125 if (offset < 0) { 4126 _env->ThrowNew(IAEClass, "offset < 0"); 4127 goto exit; 4128 } 4129 _remaining = _env->GetArrayLength(v_ref) - offset; 4130 v_base = (GLint *) 4131 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 4132 v = v_base + offset; 4133 4134 glUniform2iv( 4135 (GLint)location, 4136 (GLsizei)count, 4137 (GLint *)v 4138 ); 4139 4140exit: 4141 if (v_base) { 4142 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 4143 JNI_ABORT); 4144 } 4145} 4146 4147/* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */ 4148static void 4149android_glUniform2iv__IILjava_nio_IntBuffer_2 4150 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 4151 jarray _array = (jarray) 0; 4152 jint _remaining; 4153 GLint *v = (GLint *) 0; 4154 4155 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining); 4156 glUniform2iv( 4157 (GLint)location, 4158 (GLsizei)count, 4159 (GLint *)v 4160 ); 4161 if (_array) { 4162 releasePointer(_env, _array, v, JNI_FALSE); 4163 } 4164} 4165 4166/* void glUniform3f ( GLint location, GLfloat x, GLfloat y, GLfloat z ) */ 4167static void 4168android_glUniform3f__IFFF 4169 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y, jfloat z) { 4170 glUniform3f( 4171 (GLint)location, 4172 (GLfloat)x, 4173 (GLfloat)y, 4174 (GLfloat)z 4175 ); 4176} 4177 4178/* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */ 4179static void 4180android_glUniform3fv__II_3FI 4181 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { 4182 GLfloat *v_base = (GLfloat *) 0; 4183 jint _remaining; 4184 GLfloat *v = (GLfloat *) 0; 4185 4186 if (!v_ref) { 4187 _env->ThrowNew(IAEClass, "v == null"); 4188 goto exit; 4189 } 4190 if (offset < 0) { 4191 _env->ThrowNew(IAEClass, "offset < 0"); 4192 goto exit; 4193 } 4194 _remaining = _env->GetArrayLength(v_ref) - offset; 4195 v_base = (GLfloat *) 4196 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 4197 v = v_base + offset; 4198 4199 glUniform3fv( 4200 (GLint)location, 4201 (GLsizei)count, 4202 (GLfloat *)v 4203 ); 4204 4205exit: 4206 if (v_base) { 4207 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 4208 JNI_ABORT); 4209 } 4210} 4211 4212/* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */ 4213static void 4214android_glUniform3fv__IILjava_nio_FloatBuffer_2 4215 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 4216 jarray _array = (jarray) 0; 4217 jint _remaining; 4218 GLfloat *v = (GLfloat *) 0; 4219 4220 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining); 4221 glUniform3fv( 4222 (GLint)location, 4223 (GLsizei)count, 4224 (GLfloat *)v 4225 ); 4226 if (_array) { 4227 releasePointer(_env, _array, v, JNI_FALSE); 4228 } 4229} 4230 4231/* void glUniform3i ( GLint location, GLint x, GLint y, GLint z ) */ 4232static void 4233android_glUniform3i__IIII 4234 (JNIEnv *_env, jobject _this, jint location, jint x, jint y, jint z) { 4235 glUniform3i( 4236 (GLint)location, 4237 (GLint)x, 4238 (GLint)y, 4239 (GLint)z 4240 ); 4241} 4242 4243/* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */ 4244static void 4245android_glUniform3iv__II_3II 4246 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { 4247 GLint *v_base = (GLint *) 0; 4248 jint _remaining; 4249 GLint *v = (GLint *) 0; 4250 4251 if (!v_ref) { 4252 _env->ThrowNew(IAEClass, "v == null"); 4253 goto exit; 4254 } 4255 if (offset < 0) { 4256 _env->ThrowNew(IAEClass, "offset < 0"); 4257 goto exit; 4258 } 4259 _remaining = _env->GetArrayLength(v_ref) - offset; 4260 v_base = (GLint *) 4261 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 4262 v = v_base + offset; 4263 4264 glUniform3iv( 4265 (GLint)location, 4266 (GLsizei)count, 4267 (GLint *)v 4268 ); 4269 4270exit: 4271 if (v_base) { 4272 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 4273 JNI_ABORT); 4274 } 4275} 4276 4277/* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */ 4278static void 4279android_glUniform3iv__IILjava_nio_IntBuffer_2 4280 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 4281 jarray _array = (jarray) 0; 4282 jint _remaining; 4283 GLint *v = (GLint *) 0; 4284 4285 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining); 4286 glUniform3iv( 4287 (GLint)location, 4288 (GLsizei)count, 4289 (GLint *)v 4290 ); 4291 if (_array) { 4292 releasePointer(_env, _array, v, JNI_FALSE); 4293 } 4294} 4295 4296/* void glUniform4f ( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) */ 4297static void 4298android_glUniform4f__IFFFF 4299 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y, jfloat z, jfloat w) { 4300 glUniform4f( 4301 (GLint)location, 4302 (GLfloat)x, 4303 (GLfloat)y, 4304 (GLfloat)z, 4305 (GLfloat)w 4306 ); 4307} 4308 4309/* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */ 4310static void 4311android_glUniform4fv__II_3FI 4312 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { 4313 GLfloat *v_base = (GLfloat *) 0; 4314 jint _remaining; 4315 GLfloat *v = (GLfloat *) 0; 4316 4317 if (!v_ref) { 4318 _env->ThrowNew(IAEClass, "v == null"); 4319 goto exit; 4320 } 4321 if (offset < 0) { 4322 _env->ThrowNew(IAEClass, "offset < 0"); 4323 goto exit; 4324 } 4325 _remaining = _env->GetArrayLength(v_ref) - offset; 4326 v_base = (GLfloat *) 4327 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 4328 v = v_base + offset; 4329 4330 glUniform4fv( 4331 (GLint)location, 4332 (GLsizei)count, 4333 (GLfloat *)v 4334 ); 4335 4336exit: 4337 if (v_base) { 4338 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 4339 JNI_ABORT); 4340 } 4341} 4342 4343/* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */ 4344static void 4345android_glUniform4fv__IILjava_nio_FloatBuffer_2 4346 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 4347 jarray _array = (jarray) 0; 4348 jint _remaining; 4349 GLfloat *v = (GLfloat *) 0; 4350 4351 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining); 4352 glUniform4fv( 4353 (GLint)location, 4354 (GLsizei)count, 4355 (GLfloat *)v 4356 ); 4357 if (_array) { 4358 releasePointer(_env, _array, v, JNI_FALSE); 4359 } 4360} 4361 4362/* void glUniform4i ( GLint location, GLint x, GLint y, GLint z, GLint w ) */ 4363static void 4364android_glUniform4i__IIIII 4365 (JNIEnv *_env, jobject _this, jint location, jint x, jint y, jint z, jint w) { 4366 glUniform4i( 4367 (GLint)location, 4368 (GLint)x, 4369 (GLint)y, 4370 (GLint)z, 4371 (GLint)w 4372 ); 4373} 4374 4375/* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */ 4376static void 4377android_glUniform4iv__II_3II 4378 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { 4379 GLint *v_base = (GLint *) 0; 4380 jint _remaining; 4381 GLint *v = (GLint *) 0; 4382 4383 if (!v_ref) { 4384 _env->ThrowNew(IAEClass, "v == null"); 4385 goto exit; 4386 } 4387 if (offset < 0) { 4388 _env->ThrowNew(IAEClass, "offset < 0"); 4389 goto exit; 4390 } 4391 _remaining = _env->GetArrayLength(v_ref) - offset; 4392 v_base = (GLint *) 4393 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0); 4394 v = v_base + offset; 4395 4396 glUniform4iv( 4397 (GLint)location, 4398 (GLsizei)count, 4399 (GLint *)v 4400 ); 4401 4402exit: 4403 if (v_base) { 4404 _env->ReleasePrimitiveArrayCritical(v_ref, v_base, 4405 JNI_ABORT); 4406 } 4407} 4408 4409/* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */ 4410static void 4411android_glUniform4iv__IILjava_nio_IntBuffer_2 4412 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) { 4413 jarray _array = (jarray) 0; 4414 jint _remaining; 4415 GLint *v = (GLint *) 0; 4416 4417 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining); 4418 glUniform4iv( 4419 (GLint)location, 4420 (GLsizei)count, 4421 (GLint *)v 4422 ); 4423 if (_array) { 4424 releasePointer(_env, _array, v, JNI_FALSE); 4425 } 4426} 4427 4428/* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 4429static void 4430android_glUniformMatrix2fv__IIZ_3FI 4431 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 4432 GLfloat *value_base = (GLfloat *) 0; 4433 jint _remaining; 4434 GLfloat *value = (GLfloat *) 0; 4435 4436 if (!value_ref) { 4437 _env->ThrowNew(IAEClass, "value == null"); 4438 goto exit; 4439 } 4440 if (offset < 0) { 4441 _env->ThrowNew(IAEClass, "offset < 0"); 4442 goto exit; 4443 } 4444 _remaining = _env->GetArrayLength(value_ref) - offset; 4445 value_base = (GLfloat *) 4446 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 4447 value = value_base + offset; 4448 4449 glUniformMatrix2fv( 4450 (GLint)location, 4451 (GLsizei)count, 4452 (GLboolean)transpose, 4453 (GLfloat *)value 4454 ); 4455 4456exit: 4457 if (value_base) { 4458 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 4459 JNI_ABORT); 4460 } 4461} 4462 4463/* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 4464static void 4465android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2 4466 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 4467 jarray _array = (jarray) 0; 4468 jint _remaining; 4469 GLfloat *value = (GLfloat *) 0; 4470 4471 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining); 4472 glUniformMatrix2fv( 4473 (GLint)location, 4474 (GLsizei)count, 4475 (GLboolean)transpose, 4476 (GLfloat *)value 4477 ); 4478 if (_array) { 4479 releasePointer(_env, _array, value, JNI_FALSE); 4480 } 4481} 4482 4483/* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 4484static void 4485android_glUniformMatrix3fv__IIZ_3FI 4486 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 4487 GLfloat *value_base = (GLfloat *) 0; 4488 jint _remaining; 4489 GLfloat *value = (GLfloat *) 0; 4490 4491 if (!value_ref) { 4492 _env->ThrowNew(IAEClass, "value == null"); 4493 goto exit; 4494 } 4495 if (offset < 0) { 4496 _env->ThrowNew(IAEClass, "offset < 0"); 4497 goto exit; 4498 } 4499 _remaining = _env->GetArrayLength(value_ref) - offset; 4500 value_base = (GLfloat *) 4501 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 4502 value = value_base + offset; 4503 4504 glUniformMatrix3fv( 4505 (GLint)location, 4506 (GLsizei)count, 4507 (GLboolean)transpose, 4508 (GLfloat *)value 4509 ); 4510 4511exit: 4512 if (value_base) { 4513 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 4514 JNI_ABORT); 4515 } 4516} 4517 4518/* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 4519static void 4520android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2 4521 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 4522 jarray _array = (jarray) 0; 4523 jint _remaining; 4524 GLfloat *value = (GLfloat *) 0; 4525 4526 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining); 4527 glUniformMatrix3fv( 4528 (GLint)location, 4529 (GLsizei)count, 4530 (GLboolean)transpose, 4531 (GLfloat *)value 4532 ); 4533 if (_array) { 4534 releasePointer(_env, _array, value, JNI_FALSE); 4535 } 4536} 4537 4538/* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 4539static void 4540android_glUniformMatrix4fv__IIZ_3FI 4541 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 4542 GLfloat *value_base = (GLfloat *) 0; 4543 jint _remaining; 4544 GLfloat *value = (GLfloat *) 0; 4545 4546 if (!value_ref) { 4547 _env->ThrowNew(IAEClass, "value == null"); 4548 goto exit; 4549 } 4550 if (offset < 0) { 4551 _env->ThrowNew(IAEClass, "offset < 0"); 4552 goto exit; 4553 } 4554 _remaining = _env->GetArrayLength(value_ref) - offset; 4555 value_base = (GLfloat *) 4556 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 4557 value = value_base + offset; 4558 4559 glUniformMatrix4fv( 4560 (GLint)location, 4561 (GLsizei)count, 4562 (GLboolean)transpose, 4563 (GLfloat *)value 4564 ); 4565 4566exit: 4567 if (value_base) { 4568 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 4569 JNI_ABORT); 4570 } 4571} 4572 4573/* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 4574static void 4575android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2 4576 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 4577 jarray _array = (jarray) 0; 4578 jint _remaining; 4579 GLfloat *value = (GLfloat *) 0; 4580 4581 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining); 4582 glUniformMatrix4fv( 4583 (GLint)location, 4584 (GLsizei)count, 4585 (GLboolean)transpose, 4586 (GLfloat *)value 4587 ); 4588 if (_array) { 4589 releasePointer(_env, _array, value, JNI_FALSE); 4590 } 4591} 4592 4593/* void glUseProgram ( GLuint program ) */ 4594static void 4595android_glUseProgram__I 4596 (JNIEnv *_env, jobject _this, jint program) { 4597 glUseProgram( 4598 (GLuint)program 4599 ); 4600} 4601 4602/* void glValidateProgram ( GLuint program ) */ 4603static void 4604android_glValidateProgram__I 4605 (JNIEnv *_env, jobject _this, jint program) { 4606 glValidateProgram( 4607 (GLuint)program 4608 ); 4609} 4610 4611/* void glVertexAttrib1f ( GLuint indx, GLfloat x ) */ 4612static void 4613android_glVertexAttrib1f__IF 4614 (JNIEnv *_env, jobject _this, jint indx, jfloat x) { 4615 glVertexAttrib1f( 4616 (GLuint)indx, 4617 (GLfloat)x 4618 ); 4619} 4620 4621/* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */ 4622static void 4623android_glVertexAttrib1fv__I_3FI 4624 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { 4625 GLfloat *values_base = (GLfloat *) 0; 4626 jint _remaining; 4627 GLfloat *values = (GLfloat *) 0; 4628 4629 if (!values_ref) { 4630 _env->ThrowNew(IAEClass, "values == null"); 4631 goto exit; 4632 } 4633 if (offset < 0) { 4634 _env->ThrowNew(IAEClass, "offset < 0"); 4635 goto exit; 4636 } 4637 _remaining = _env->GetArrayLength(values_ref) - offset; 4638 values_base = (GLfloat *) 4639 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0); 4640 values = values_base + offset; 4641 4642 glVertexAttrib1fv( 4643 (GLuint)indx, 4644 (GLfloat *)values 4645 ); 4646 4647exit: 4648 if (values_base) { 4649 _env->ReleasePrimitiveArrayCritical(values_ref, values_base, 4650 JNI_ABORT); 4651 } 4652} 4653 4654/* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */ 4655static void 4656android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2 4657 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) { 4658 jarray _array = (jarray) 0; 4659 jint _remaining; 4660 GLfloat *values = (GLfloat *) 0; 4661 4662 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining); 4663 glVertexAttrib1fv( 4664 (GLuint)indx, 4665 (GLfloat *)values 4666 ); 4667 if (_array) { 4668 releasePointer(_env, _array, values, JNI_FALSE); 4669 } 4670} 4671 4672/* void glVertexAttrib2f ( GLuint indx, GLfloat x, GLfloat y ) */ 4673static void 4674android_glVertexAttrib2f__IFF 4675 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y) { 4676 glVertexAttrib2f( 4677 (GLuint)indx, 4678 (GLfloat)x, 4679 (GLfloat)y 4680 ); 4681} 4682 4683/* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */ 4684static void 4685android_glVertexAttrib2fv__I_3FI 4686 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { 4687 GLfloat *values_base = (GLfloat *) 0; 4688 jint _remaining; 4689 GLfloat *values = (GLfloat *) 0; 4690 4691 if (!values_ref) { 4692 _env->ThrowNew(IAEClass, "values == null"); 4693 goto exit; 4694 } 4695 if (offset < 0) { 4696 _env->ThrowNew(IAEClass, "offset < 0"); 4697 goto exit; 4698 } 4699 _remaining = _env->GetArrayLength(values_ref) - offset; 4700 values_base = (GLfloat *) 4701 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0); 4702 values = values_base + offset; 4703 4704 glVertexAttrib2fv( 4705 (GLuint)indx, 4706 (GLfloat *)values 4707 ); 4708 4709exit: 4710 if (values_base) { 4711 _env->ReleasePrimitiveArrayCritical(values_ref, values_base, 4712 JNI_ABORT); 4713 } 4714} 4715 4716/* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */ 4717static void 4718android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2 4719 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) { 4720 jarray _array = (jarray) 0; 4721 jint _remaining; 4722 GLfloat *values = (GLfloat *) 0; 4723 4724 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining); 4725 glVertexAttrib2fv( 4726 (GLuint)indx, 4727 (GLfloat *)values 4728 ); 4729 if (_array) { 4730 releasePointer(_env, _array, values, JNI_FALSE); 4731 } 4732} 4733 4734/* void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z ) */ 4735static void 4736android_glVertexAttrib3f__IFFF 4737 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y, jfloat z) { 4738 glVertexAttrib3f( 4739 (GLuint)indx, 4740 (GLfloat)x, 4741 (GLfloat)y, 4742 (GLfloat)z 4743 ); 4744} 4745 4746/* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */ 4747static void 4748android_glVertexAttrib3fv__I_3FI 4749 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { 4750 GLfloat *values_base = (GLfloat *) 0; 4751 jint _remaining; 4752 GLfloat *values = (GLfloat *) 0; 4753 4754 if (!values_ref) { 4755 _env->ThrowNew(IAEClass, "values == null"); 4756 goto exit; 4757 } 4758 if (offset < 0) { 4759 _env->ThrowNew(IAEClass, "offset < 0"); 4760 goto exit; 4761 } 4762 _remaining = _env->GetArrayLength(values_ref) - offset; 4763 values_base = (GLfloat *) 4764 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0); 4765 values = values_base + offset; 4766 4767 glVertexAttrib3fv( 4768 (GLuint)indx, 4769 (GLfloat *)values 4770 ); 4771 4772exit: 4773 if (values_base) { 4774 _env->ReleasePrimitiveArrayCritical(values_ref, values_base, 4775 JNI_ABORT); 4776 } 4777} 4778 4779/* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */ 4780static void 4781android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2 4782 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) { 4783 jarray _array = (jarray) 0; 4784 jint _remaining; 4785 GLfloat *values = (GLfloat *) 0; 4786 4787 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining); 4788 glVertexAttrib3fv( 4789 (GLuint)indx, 4790 (GLfloat *)values 4791 ); 4792 if (_array) { 4793 releasePointer(_env, _array, values, JNI_FALSE); 4794 } 4795} 4796 4797/* void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) */ 4798static void 4799android_glVertexAttrib4f__IFFFF 4800 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y, jfloat z, jfloat w) { 4801 glVertexAttrib4f( 4802 (GLuint)indx, 4803 (GLfloat)x, 4804 (GLfloat)y, 4805 (GLfloat)z, 4806 (GLfloat)w 4807 ); 4808} 4809 4810/* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */ 4811static void 4812android_glVertexAttrib4fv__I_3FI 4813 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { 4814 GLfloat *values_base = (GLfloat *) 0; 4815 jint _remaining; 4816 GLfloat *values = (GLfloat *) 0; 4817 4818 if (!values_ref) { 4819 _env->ThrowNew(IAEClass, "values == null"); 4820 goto exit; 4821 } 4822 if (offset < 0) { 4823 _env->ThrowNew(IAEClass, "offset < 0"); 4824 goto exit; 4825 } 4826 _remaining = _env->GetArrayLength(values_ref) - offset; 4827 values_base = (GLfloat *) 4828 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0); 4829 values = values_base + offset; 4830 4831 glVertexAttrib4fv( 4832 (GLuint)indx, 4833 (GLfloat *)values 4834 ); 4835 4836exit: 4837 if (values_base) { 4838 _env->ReleasePrimitiveArrayCritical(values_ref, values_base, 4839 JNI_ABORT); 4840 } 4841} 4842 4843/* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */ 4844static void 4845android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 4846 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) { 4847 jarray _array = (jarray) 0; 4848 jint _remaining; 4849 GLfloat *values = (GLfloat *) 0; 4850 4851 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining); 4852 glVertexAttrib4fv( 4853 (GLuint)indx, 4854 (GLfloat *)values 4855 ); 4856 if (_array) { 4857 releasePointer(_env, _array, values, JNI_FALSE); 4858 } 4859} 4860 4861/* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset ) */ 4862static void 4863android_glVertexAttribPointer__IIIZII 4864 (JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jint offset) { 4865 glVertexAttribPointer( 4866 (GLuint)indx, 4867 (GLint)size, 4868 (GLenum)type, 4869 (GLboolean)normalized, 4870 (GLsizei)stride, 4871 (const GLvoid *)offset 4872 ); 4873} 4874 4875/* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) */ 4876static void 4877android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I 4878 (JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jobject ptr_buf, jint remaining) { 4879 jarray _array = (jarray) 0; 4880 jint _remaining; 4881 GLvoid *ptr = (GLvoid *) 0; 4882 4883 if (ptr_buf) { 4884 ptr = (GLvoid *) getDirectBufferPointer(_env, ptr_buf); 4885 if ( ! ptr ) { 4886 return; 4887 } 4888 } 4889 glVertexAttribPointerBounds( 4890 (GLuint)indx, 4891 (GLint)size, 4892 (GLenum)type, 4893 (GLboolean)normalized, 4894 (GLsizei)stride, 4895 (GLvoid *)ptr, 4896 (GLsizei)remaining 4897 ); 4898} 4899 4900/* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */ 4901static void 4902android_glViewport__IIII 4903 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) { 4904 glViewport( 4905 (GLint)x, 4906 (GLint)y, 4907 (GLsizei)width, 4908 (GLsizei)height 4909 ); 4910} 4911 4912static const char *classPathName = "android/opengl/GLES20"; 4913 4914static JNINativeMethod methods[] = { 4915{"_nativeClassInit", "()V", (void*)nativeClassInit }, 4916{"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I }, 4917{"glAttachShader", "(II)V", (void *) android_glAttachShader__II }, 4918{"glBindAttribLocation", "(IILjava/lang/String;)V", (void *) android_glBindAttribLocation__IILjava_lang_String_2 }, 4919{"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II }, 4920{"glBindFramebuffer", "(II)V", (void *) android_glBindFramebuffer__II }, 4921{"glBindRenderbuffer", "(II)V", (void *) android_glBindRenderbuffer__II }, 4922{"glBindTexture", "(II)V", (void *) android_glBindTexture__II }, 4923{"glBlendColor", "(FFFF)V", (void *) android_glBlendColor__FFFF }, 4924{"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I }, 4925{"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II }, 4926{"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II }, 4927{"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII }, 4928{"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I }, 4929{"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 }, 4930{"glCheckFramebufferStatus", "(I)I", (void *) android_glCheckFramebufferStatus__I }, 4931{"glClear", "(I)V", (void *) android_glClear__I }, 4932{"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF }, 4933{"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F }, 4934{"glClearStencil", "(I)V", (void *) android_glClearStencil__I }, 4935{"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ }, 4936{"glCompileShader", "(I)V", (void *) android_glCompileShader__I }, 4937{"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 }, 4938{"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 }, 4939{"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII }, 4940{"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII }, 4941{"glCreateProgram", "()I", (void *) android_glCreateProgram__ }, 4942{"glCreateShader", "(I)I", (void *) android_glCreateShader__I }, 4943{"glCullFace", "(I)V", (void *) android_glCullFace__I }, 4944{"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II }, 4945{"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 }, 4946{"glDeleteFramebuffers", "(I[II)V", (void *) android_glDeleteFramebuffers__I_3II }, 4947{"glDeleteFramebuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2 }, 4948{"glDeleteProgram", "(I)V", (void *) android_glDeleteProgram__I }, 4949{"glDeleteRenderbuffers", "(I[II)V", (void *) android_glDeleteRenderbuffers__I_3II }, 4950{"glDeleteRenderbuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2 }, 4951{"glDeleteShader", "(I)V", (void *) android_glDeleteShader__I }, 4952{"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II }, 4953{"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 }, 4954{"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I }, 4955{"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z }, 4956{"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF }, 4957{"glDetachShader", "(II)V", (void *) android_glDetachShader__II }, 4958{"glDisable", "(I)V", (void *) android_glDisable__I }, 4959{"glDisableVertexAttribArray", "(I)V", (void *) android_glDisableVertexAttribArray__I }, 4960{"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III }, 4961{"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII }, 4962{"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 }, 4963{"glEnable", "(I)V", (void *) android_glEnable__I }, 4964{"glEnableVertexAttribArray", "(I)V", (void *) android_glEnableVertexAttribArray__I }, 4965{"glFinish", "()V", (void *) android_glFinish__ }, 4966{"glFlush", "()V", (void *) android_glFlush__ }, 4967{"glFramebufferRenderbuffer", "(IIII)V", (void *) android_glFramebufferRenderbuffer__IIII }, 4968{"glFramebufferTexture2D", "(IIIII)V", (void *) android_glFramebufferTexture2D__IIIII }, 4969{"glFrontFace", "(I)V", (void *) android_glFrontFace__I }, 4970{"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II }, 4971{"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 }, 4972{"glGenerateMipmap", "(I)V", (void *) android_glGenerateMipmap__I }, 4973{"glGenFramebuffers", "(I[II)V", (void *) android_glGenFramebuffers__I_3II }, 4974{"glGenFramebuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffers__ILjava_nio_IntBuffer_2 }, 4975{"glGenRenderbuffers", "(I[II)V", (void *) android_glGenRenderbuffers__I_3II }, 4976{"glGenRenderbuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffers__ILjava_nio_IntBuffer_2 }, 4977{"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II }, 4978{"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 }, 4979{"glGetActiveAttrib", "(III[II[II[II[BI)V", (void *) android_glGetActiveAttrib__III_3II_3II_3II_3BI }, 4980{"glGetActiveAttrib", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B }, 4981{"glGetActiveUniform", "(III[II[II[II[BI)V", (void *) android_glGetActiveUniform__III_3II_3II_3II_3BI }, 4982{"glGetActiveUniform", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B }, 4983{"glGetAttachedShaders", "(II[II[II)V", (void *) android_glGetAttachedShaders__II_3II_3II }, 4984{"glGetAttachedShaders", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 }, 4985{"glGetAttribLocation", "(ILjava/lang/String;)I", (void *) android_glGetAttribLocation__ILjava_lang_String_2 }, 4986{"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI }, 4987{"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 }, 4988{"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II }, 4989{"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 }, 4990{"glGetError", "()I", (void *) android_glGetError__ }, 4991{"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI }, 4992{"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 }, 4993{"glGetFramebufferAttachmentParameteriv", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameteriv__III_3II }, 4994{"glGetFramebufferAttachmentParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2 }, 4995{"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II }, 4996{"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 }, 4997{"glGetProgramiv", "(II[II)V", (void *) android_glGetProgramiv__II_3II }, 4998{"glGetProgramiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramiv__IILjava_nio_IntBuffer_2 }, 4999{"glGetProgramInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramInfoLog }, 5000{"glGetRenderbufferParameteriv", "(II[II)V", (void *) android_glGetRenderbufferParameteriv__II_3II }, 5001{"glGetRenderbufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2 }, 5002{"glGetShaderiv", "(II[II)V", (void *) android_glGetShaderiv__II_3II }, 5003{"glGetShaderiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetShaderiv__IILjava_nio_IntBuffer_2 }, 5004{"glGetShaderInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetShaderInfoLog }, 5005{"glGetShaderPrecisionFormat", "(II[II[II)V", (void *) android_glGetShaderPrecisionFormat__II_3II_3II }, 5006{"glGetShaderPrecisionFormat", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 }, 5007{"glGetShaderSource", "(II[II[BI)V", (void *) android_glGetShaderSource__II_3II_3BI }, 5008{"glGetShaderSource", "(IILjava/nio/IntBuffer;B)V", (void *) android_glGetShaderSource__IILjava_nio_IntBuffer_2B }, 5009{"glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString }, 5010{"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI }, 5011{"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 }, 5012{"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II }, 5013{"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 }, 5014{"glGetUniformfv", "(II[FI)V", (void *) android_glGetUniformfv__II_3FI }, 5015{"glGetUniformfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetUniformfv__IILjava_nio_FloatBuffer_2 }, 5016{"glGetUniformiv", "(II[II)V", (void *) android_glGetUniformiv__II_3II }, 5017{"glGetUniformiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformiv__IILjava_nio_IntBuffer_2 }, 5018{"glGetUniformLocation", "(ILjava/lang/String;)I", (void *) android_glGetUniformLocation__ILjava_lang_String_2 }, 5019{"glGetVertexAttribfv", "(II[FI)V", (void *) android_glGetVertexAttribfv__II_3FI }, 5020{"glGetVertexAttribfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2 }, 5021{"glGetVertexAttribiv", "(II[II)V", (void *) android_glGetVertexAttribiv__II_3II }, 5022{"glGetVertexAttribiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2 }, 5023{"glHint", "(II)V", (void *) android_glHint__II }, 5024{"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I }, 5025{"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I }, 5026{"glIsFramebuffer", "(I)Z", (void *) android_glIsFramebuffer__I }, 5027{"glIsProgram", "(I)Z", (void *) android_glIsProgram__I }, 5028{"glIsRenderbuffer", "(I)Z", (void *) android_glIsRenderbuffer__I }, 5029{"glIsShader", "(I)Z", (void *) android_glIsShader__I }, 5030{"glIsTexture", "(I)Z", (void *) android_glIsTexture__I }, 5031{"glLineWidth", "(F)V", (void *) android_glLineWidth__F }, 5032{"glLinkProgram", "(I)V", (void *) android_glLinkProgram__I }, 5033{"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II }, 5034{"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF }, 5035{"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 }, 5036{"glReleaseShaderCompiler", "()V", (void *) android_glReleaseShaderCompiler__ }, 5037{"glRenderbufferStorage", "(IIII)V", (void *) android_glRenderbufferStorage__IIII }, 5038{"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ }, 5039{"glScissor", "(IIII)V", (void *) android_glScissor__IIII }, 5040{"glShaderBinary", "(I[IIILjava/nio/Buffer;I)V", (void *) android_glShaderBinary__I_3IIILjava_nio_Buffer_2I }, 5041{"glShaderBinary", "(ILjava/nio/IntBuffer;ILjava/nio/Buffer;I)V", (void *) android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I }, 5042{"glShaderSource", "(ILjava/lang/String;)V", (void *) android_glShaderSource }, 5043{"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III }, 5044{"glStencilFuncSeparate", "(IIII)V", (void *) android_glStencilFuncSeparate__IIII }, 5045{"glStencilMask", "(I)V", (void *) android_glStencilMask__I }, 5046{"glStencilMaskSeparate", "(II)V", (void *) android_glStencilMaskSeparate__II }, 5047{"glStencilOp", "(III)V", (void *) android_glStencilOp__III }, 5048{"glStencilOpSeparate", "(IIII)V", (void *) android_glStencilOpSeparate__IIII }, 5049{"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 }, 5050{"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF }, 5051{"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI }, 5052{"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 }, 5053{"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III }, 5054{"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II }, 5055{"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 }, 5056{"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 }, 5057{"glUniform1f", "(IF)V", (void *) android_glUniform1f__IF }, 5058{"glUniform1fv", "(II[FI)V", (void *) android_glUniform1fv__II_3FI }, 5059{"glUniform1fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform1fv__IILjava_nio_FloatBuffer_2 }, 5060{"glUniform1i", "(II)V", (void *) android_glUniform1i__II }, 5061{"glUniform1iv", "(II[II)V", (void *) android_glUniform1iv__II_3II }, 5062{"glUniform1iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1iv__IILjava_nio_IntBuffer_2 }, 5063{"glUniform2f", "(IFF)V", (void *) android_glUniform2f__IFF }, 5064{"glUniform2fv", "(II[FI)V", (void *) android_glUniform2fv__II_3FI }, 5065{"glUniform2fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform2fv__IILjava_nio_FloatBuffer_2 }, 5066{"glUniform2i", "(III)V", (void *) android_glUniform2i__III }, 5067{"glUniform2iv", "(II[II)V", (void *) android_glUniform2iv__II_3II }, 5068{"glUniform2iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2iv__IILjava_nio_IntBuffer_2 }, 5069{"glUniform3f", "(IFFF)V", (void *) android_glUniform3f__IFFF }, 5070{"glUniform3fv", "(II[FI)V", (void *) android_glUniform3fv__II_3FI }, 5071{"glUniform3fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform3fv__IILjava_nio_FloatBuffer_2 }, 5072{"glUniform3i", "(IIII)V", (void *) android_glUniform3i__IIII }, 5073{"glUniform3iv", "(II[II)V", (void *) android_glUniform3iv__II_3II }, 5074{"glUniform3iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3iv__IILjava_nio_IntBuffer_2 }, 5075{"glUniform4f", "(IFFFF)V", (void *) android_glUniform4f__IFFFF }, 5076{"glUniform4fv", "(II[FI)V", (void *) android_glUniform4fv__II_3FI }, 5077{"glUniform4fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform4fv__IILjava_nio_FloatBuffer_2 }, 5078{"glUniform4i", "(IIIII)V", (void *) android_glUniform4i__IIIII }, 5079{"glUniform4iv", "(II[II)V", (void *) android_glUniform4iv__II_3II }, 5080{"glUniform4iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4iv__IILjava_nio_IntBuffer_2 }, 5081{"glUniformMatrix2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2fv__IIZ_3FI }, 5082{"glUniformMatrix2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2 }, 5083{"glUniformMatrix3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3fv__IIZ_3FI }, 5084{"glUniformMatrix3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2 }, 5085{"glUniformMatrix4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4fv__IIZ_3FI }, 5086{"glUniformMatrix4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2 }, 5087{"glUseProgram", "(I)V", (void *) android_glUseProgram__I }, 5088{"glValidateProgram", "(I)V", (void *) android_glValidateProgram__I }, 5089{"glVertexAttrib1f", "(IF)V", (void *) android_glVertexAttrib1f__IF }, 5090{"glVertexAttrib1fv", "(I[FI)V", (void *) android_glVertexAttrib1fv__I_3FI }, 5091{"glVertexAttrib1fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2 }, 5092{"glVertexAttrib2f", "(IFF)V", (void *) android_glVertexAttrib2f__IFF }, 5093{"glVertexAttrib2fv", "(I[FI)V", (void *) android_glVertexAttrib2fv__I_3FI }, 5094{"glVertexAttrib2fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2 }, 5095{"glVertexAttrib3f", "(IFFF)V", (void *) android_glVertexAttrib3f__IFFF }, 5096{"glVertexAttrib3fv", "(I[FI)V", (void *) android_glVertexAttrib3fv__I_3FI }, 5097{"glVertexAttrib3fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2 }, 5098{"glVertexAttrib4f", "(IFFFF)V", (void *) android_glVertexAttrib4f__IFFFF }, 5099{"glVertexAttrib4fv", "(I[FI)V", (void *) android_glVertexAttrib4fv__I_3FI }, 5100{"glVertexAttrib4fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 }, 5101{"glVertexAttribPointer", "(IIIZII)V", (void *) android_glVertexAttribPointer__IIIZII }, 5102{"glVertexAttribPointerBounds", "(IIIZILjava/nio/Buffer;I)V", (void *) android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I }, 5103{"glViewport", "(IIII)V", (void *) android_glViewport__IIII }, 5104}; 5105 5106int register_android_opengl_jni_GLES20(JNIEnv *_env) 5107{ 5108 int err; 5109 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); 5110 return err; 5111} 5112