android_opengl_GLES11Ext.cpp revision 84cac20dfdff35932901e978e6b6d3da843a2fa7
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#pragma GCC diagnostic ignored "-Wunused-variable" 21#pragma GCC diagnostic ignored "-Wunused-but-set-variable" 22#pragma GCC diagnostic ignored "-Wunused-function" 23 24#include <GLES/gl.h> 25#include <GLES/glext.h> 26 27#include <jni.h> 28#include <JNIHelp.h> 29#include <android_runtime/AndroidRuntime.h> 30#include <utils/misc.h> 31#include <assert.h> 32 33static int initialized = 0; 34 35static jclass nioAccessClass; 36static jclass bufferClass; 37static jmethodID getBasePointerID; 38static jmethodID getBaseArrayID; 39static jmethodID getBaseArrayOffsetID; 40static jfieldID positionID; 41static jfieldID limitID; 42static jfieldID elementSizeShiftID; 43 44 45/* special calls implemented in Android's GLES wrapper used to more 46 * efficiently bound-check passed arrays */ 47extern "C" { 48#ifdef GL_VERSION_ES_CM_1_1 49GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, 50 const GLvoid *ptr, GLsizei count); 51GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, 52 const GLvoid *pointer, GLsizei count); 53GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, 54 GLsizei stride, const GLvoid *pointer, GLsizei count); 55GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, 56 GLsizei stride, const GLvoid *pointer, GLsizei count); 57GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, 58 GLsizei stride, const GLvoid *pointer, GLsizei count); 59GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, 60 GLsizei stride, const GLvoid *pointer, GLsizei count); 61GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, 62 GLsizei stride, const GLvoid *pointer, GLsizei count); 63#endif 64#ifdef GL_ES_VERSION_2_0 65static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type, 66 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) { 67 glVertexAttribPointer(indx, size, type, normalized, stride, pointer); 68} 69#endif 70#ifdef GL_ES_VERSION_3_0 71static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type, 72 GLsizei stride, const GLvoid *pointer, GLsizei count) { 73 glVertexAttribIPointer(indx, size, type, stride, pointer); 74} 75#endif 76} 77 78/* Cache method IDs each time the class is loaded. */ 79 80static void 81nativeClassInit(JNIEnv *_env, jclass glImplClass) 82{ 83 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); 84 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); 85 86 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); 87 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); 88 89 getBasePointerID = _env->GetStaticMethodID(nioAccessClass, 90 "getBasePointer", "(Ljava/nio/Buffer;)J"); 91 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, 92 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); 93 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, 94 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); 95 96 positionID = _env->GetFieldID(bufferClass, "position", "I"); 97 limitID = _env->GetFieldID(bufferClass, "limit", "I"); 98 elementSizeShiftID = 99 _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); 100} 101 102static void * 103getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) 104{ 105 jint position; 106 jint limit; 107 jint elementSizeShift; 108 jlong pointer; 109 110 position = _env->GetIntField(buffer, positionID); 111 limit = _env->GetIntField(buffer, limitID); 112 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); 113 *remaining = (limit - position) << elementSizeShift; 114 pointer = _env->CallStaticLongMethod(nioAccessClass, 115 getBasePointerID, buffer); 116 if (pointer != 0L) { 117 *array = NULL; 118 return reinterpret_cast<void*>(pointer); 119 } 120 121 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, 122 getBaseArrayID, buffer); 123 *offset = _env->CallStaticIntMethod(nioAccessClass, 124 getBaseArrayOffsetID, buffer); 125 126 return NULL; 127} 128 129class ByteArrayGetter { 130public: 131 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) { 132 return _env->GetByteArrayElements(array, is_copy); 133 } 134}; 135class BooleanArrayGetter { 136public: 137 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) { 138 return _env->GetBooleanArrayElements(array, is_copy); 139 } 140}; 141class CharArrayGetter { 142public: 143 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) { 144 return _env->GetCharArrayElements(array, is_copy); 145 } 146}; 147class ShortArrayGetter { 148public: 149 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) { 150 return _env->GetShortArrayElements(array, is_copy); 151 } 152}; 153class IntArrayGetter { 154public: 155 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) { 156 return _env->GetIntArrayElements(array, is_copy); 157 } 158}; 159class LongArrayGetter { 160public: 161 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) { 162 return _env->GetLongArrayElements(array, is_copy); 163 } 164}; 165class FloatArrayGetter { 166public: 167 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) { 168 return _env->GetFloatArrayElements(array, is_copy); 169 } 170}; 171class DoubleArrayGetter { 172public: 173 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) { 174 return _env->GetDoubleArrayElements(array, is_copy); 175 } 176}; 177 178template<typename JTYPEARRAY, typename ARRAYGETTER> 179static void* 180getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) { 181 return ARRAYGETTER::Get(_env, array, is_copy); 182} 183 184class ByteArrayReleaser { 185public: 186 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) { 187 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT); 188 } 189}; 190class BooleanArrayReleaser { 191public: 192 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) { 193 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT); 194 } 195}; 196class CharArrayReleaser { 197public: 198 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) { 199 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT); 200 } 201}; 202class ShortArrayReleaser { 203public: 204 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) { 205 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT); 206 } 207}; 208class IntArrayReleaser { 209public: 210 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) { 211 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT); 212 } 213}; 214class LongArrayReleaser { 215public: 216 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) { 217 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT); 218 } 219}; 220class FloatArrayReleaser { 221public: 222 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) { 223 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT); 224 } 225}; 226class DoubleArrayReleaser { 227public: 228 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) { 229 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT); 230 } 231}; 232 233template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER> 234static void 235releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) { 236 ARRAYRELEASER::Release(_env, array, data, commit); 237} 238 239static void 240releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) 241{ 242 _env->ReleasePrimitiveArrayCritical(array, data, 243 commit ? 0 : JNI_ABORT); 244} 245 246static void * 247getDirectBufferPointer(JNIEnv *_env, jobject buffer) { 248 char* buf = (char*) _env->GetDirectBufferAddress(buffer); 249 if (buf) { 250 jint position = _env->GetIntField(buffer, positionID); 251 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); 252 buf += position << elementSizeShift; 253 } else { 254 jniThrowException(_env, "java/lang/IllegalArgumentException", 255 "Must use a native order direct Buffer"); 256 } 257 return (void*) buf; 258} 259 260// -------------------------------------------------------------------------- 261 262/* 263 * returns the number of values glGet returns for a given pname. 264 * 265 * The code below is written such that pnames requiring only one values 266 * are the default (and are not explicitely tested for). This makes the 267 * checking code much shorter/readable/efficient. 268 * 269 * This means that unknown pnames (e.g.: extensions) will default to 1. If 270 * that unknown pname needs more than 1 value, then the validation check 271 * is incomplete and the app may crash if it passed the wrong number params. 272 */ 273static int getNeededCount(GLint pname) { 274 int needed = 1; 275#ifdef GL_ES_VERSION_2_0 276 // GLES 2.x pnames 277 switch (pname) { 278 case GL_ALIASED_LINE_WIDTH_RANGE: 279 case GL_ALIASED_POINT_SIZE_RANGE: 280 needed = 2; 281 break; 282 283 case GL_BLEND_COLOR: 284 case GL_COLOR_CLEAR_VALUE: 285 case GL_COLOR_WRITEMASK: 286 case GL_SCISSOR_BOX: 287 case GL_VIEWPORT: 288 needed = 4; 289 break; 290 291 case GL_COMPRESSED_TEXTURE_FORMATS: 292 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); 293 break; 294 295 case GL_SHADER_BINARY_FORMATS: 296 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed); 297 break; 298 } 299#endif 300 301#ifdef GL_VERSION_ES_CM_1_1 302 // GLES 1.x pnames 303 switch (pname) { 304 case GL_ALIASED_LINE_WIDTH_RANGE: 305 case GL_ALIASED_POINT_SIZE_RANGE: 306 case GL_DEPTH_RANGE: 307 case GL_SMOOTH_LINE_WIDTH_RANGE: 308 case GL_SMOOTH_POINT_SIZE_RANGE: 309 needed = 2; 310 break; 311 312 case GL_CURRENT_NORMAL: 313 case GL_POINT_DISTANCE_ATTENUATION: 314 needed = 3; 315 break; 316 317 case GL_COLOR_CLEAR_VALUE: 318 case GL_COLOR_WRITEMASK: 319 case GL_CURRENT_COLOR: 320 case GL_CURRENT_TEXTURE_COORDS: 321 case GL_FOG_COLOR: 322 case GL_LIGHT_MODEL_AMBIENT: 323 case GL_SCISSOR_BOX: 324 case GL_VIEWPORT: 325 needed = 4; 326 break; 327 328 case GL_MODELVIEW_MATRIX: 329 case GL_PROJECTION_MATRIX: 330 case GL_TEXTURE_MATRIX: 331 needed = 16; 332 break; 333 334 case GL_COMPRESSED_TEXTURE_FORMATS: 335 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); 336 break; 337 } 338#endif 339 return needed; 340} 341 342template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY, 343 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)> 344static void 345get 346 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) { 347 jint _exception = 0; 348 const char * _exceptionType; 349 const char * _exceptionMessage; 350 CTYPE *params_base = (CTYPE *) 0; 351 jint _remaining; 352 CTYPE *params = (CTYPE *) 0; 353 int _needed = 0; 354 355 if (!params_ref) { 356 _exception = 1; 357 _exceptionType = "java/lang/IllegalArgumentException"; 358 _exceptionMessage = "params == null"; 359 goto exit; 360 } 361 if (offset < 0) { 362 _exception = 1; 363 _exceptionType = "java/lang/IllegalArgumentException"; 364 _exceptionMessage = "offset < 0"; 365 goto exit; 366 } 367 _remaining = _env->GetArrayLength(params_ref) - offset; 368 _needed = getNeededCount(pname); 369 // if we didn't find this pname, we just assume the user passed 370 // an array of the right size -- this might happen with extensions 371 // or if we forget an enum here. 372 if (_remaining < _needed) { 373 _exception = 1; 374 _exceptionType = "java/lang/IllegalArgumentException"; 375 _exceptionMessage = "length - offset < needed"; 376 goto exit; 377 } 378 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>( 379 _env, params_ref, (jboolean *)0); 380 params = params_base + offset; 381 382 GET( 383 (GLenum)pname, 384 (CTYPE *)params 385 ); 386 387exit: 388 if (params_base) { 389 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>( 390 _env, params_ref, params_base, !_exception); 391 } 392 if (_exception) { 393 jniThrowException(_env, _exceptionType, _exceptionMessage); 394 } 395} 396 397 398template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY, 399 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)> 400static void 401getarray 402 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 403 jint _exception = 0; 404 const char * _exceptionType; 405 const char * _exceptionMessage; 406 JTYPEARRAY _array = (JTYPEARRAY) 0; 407 jint _bufferOffset = (jint) 0; 408 jint _remaining; 409 CTYPE *params = (CTYPE *) 0; 410 int _needed = 0; 411 412 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 413 _remaining /= sizeof(CTYPE); // convert from bytes to item count 414 _needed = getNeededCount(pname); 415 // if we didn't find this pname, we just assume the user passed 416 // an array of the right size -- this might happen with extensions 417 // or if we forget an enum here. 418 if (_needed>0 && _remaining < _needed) { 419 _exception = 1; 420 _exceptionType = "java/lang/IllegalArgumentException"; 421 _exceptionMessage = "remaining() < needed"; 422 goto exit; 423 } 424 if (params == NULL) { 425 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>( 426 _env, _array, (jboolean *) 0); 427 params = (CTYPE *) (_paramsBase + _bufferOffset); 428 } 429 GET( 430 (GLenum)pname, 431 (CTYPE *)params 432 ); 433 434exit: 435 if (_array) { 436 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>( 437 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE); 438 } 439 if (_exception) { 440 jniThrowException(_env, _exceptionType, _exceptionMessage); 441 } 442} 443 444// -------------------------------------------------------------------------- 445/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */ 446static void 447android_glBlendEquationSeparateOES__II 448 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) { 449 glBlendEquationSeparateOES( 450 (GLenum)modeRGB, 451 (GLenum)modeAlpha 452 ); 453} 454 455/* void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */ 456static void 457android_glBlendFuncSeparateOES__IIII 458 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { 459 glBlendFuncSeparateOES( 460 (GLenum)srcRGB, 461 (GLenum)dstRGB, 462 (GLenum)srcAlpha, 463 (GLenum)dstAlpha 464 ); 465} 466 467/* void glBlendEquationOES ( GLenum mode ) */ 468static void 469android_glBlendEquationOES__I 470 (JNIEnv *_env, jobject _this, jint mode) { 471 glBlendEquationOES( 472 (GLenum)mode 473 ); 474} 475 476/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */ 477static void 478android_glDrawTexsOES__SSSSS 479 (JNIEnv *_env, jobject _this, jshort x, jshort y, jshort z, jshort width, jshort height) { 480 glDrawTexsOES( 481 (GLshort)x, 482 (GLshort)y, 483 (GLshort)z, 484 (GLshort)width, 485 (GLshort)height 486 ); 487} 488 489/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */ 490static void 491android_glDrawTexiOES__IIIII 492 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) { 493 glDrawTexiOES( 494 (GLint)x, 495 (GLint)y, 496 (GLint)z, 497 (GLint)width, 498 (GLint)height 499 ); 500} 501 502/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */ 503static void 504android_glDrawTexxOES__IIIII 505 (JNIEnv *_env, jobject _this, jint x, jint y, jint z, jint width, jint height) { 506 glDrawTexxOES( 507 (GLfixed)x, 508 (GLfixed)y, 509 (GLfixed)z, 510 (GLfixed)width, 511 (GLfixed)height 512 ); 513} 514 515/* void glDrawTexsvOES ( const GLshort *coords ) */ 516static void 517android_glDrawTexsvOES___3SI 518 (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) { 519 jint _exception = 0; 520 const char * _exceptionType = NULL; 521 const char * _exceptionMessage = NULL; 522 GLshort *coords_base = (GLshort *) 0; 523 jint _remaining; 524 GLshort *coords = (GLshort *) 0; 525 526 if (!coords_ref) { 527 _exception = 1; 528 _exceptionType = "java/lang/IllegalArgumentException"; 529 _exceptionMessage = "coords == null"; 530 goto exit; 531 } 532 if (offset < 0) { 533 _exception = 1; 534 _exceptionType = "java/lang/IllegalArgumentException"; 535 _exceptionMessage = "offset < 0"; 536 goto exit; 537 } 538 _remaining = _env->GetArrayLength(coords_ref) - offset; 539 if (_remaining < 5) { 540 _exception = 1; 541 _exceptionType = "java/lang/IllegalArgumentException"; 542 _exceptionMessage = "length - offset < 5 < needed"; 543 goto exit; 544 } 545 coords_base = (GLshort *) 546 _env->GetShortArrayElements(coords_ref, (jboolean *)0); 547 coords = coords_base + offset; 548 549 glDrawTexsvOES( 550 (GLshort *)coords 551 ); 552 553exit: 554 if (coords_base) { 555 _env->ReleaseShortArrayElements(coords_ref, (jshort*)coords_base, 556 JNI_ABORT); 557 } 558 if (_exception) { 559 jniThrowException(_env, _exceptionType, _exceptionMessage); 560 } 561} 562 563/* void glDrawTexsvOES ( const GLshort *coords ) */ 564static void 565android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 566 (JNIEnv *_env, jobject _this, jobject coords_buf) { 567 jint _exception = 0; 568 const char * _exceptionType = NULL; 569 const char * _exceptionMessage = NULL; 570 jshortArray _array = (jshortArray) 0; 571 jint _bufferOffset = (jint) 0; 572 jint _remaining; 573 GLshort *coords = (GLshort *) 0; 574 575 if (!coords_buf) { 576 _exception = 1; 577 _exceptionType = "java/lang/IllegalArgumentException"; 578 _exceptionMessage = "coords == null"; 579 goto exit; 580 } 581 coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 582 if (_remaining < 5) { 583 _exception = 1; 584 _exceptionType = "java/lang/IllegalArgumentException"; 585 _exceptionMessage = "remaining() < 5 < needed"; 586 goto exit; 587 } 588 if (coords == NULL) { 589 char * _coordsBase = (char *)_env->GetShortArrayElements(_array, (jboolean *) 0); 590 coords = (GLshort *) (_coordsBase + _bufferOffset); 591 } 592 glDrawTexsvOES( 593 (GLshort *)coords 594 ); 595 596exit: 597 if (_array) { 598 _env->ReleaseShortArrayElements(_array, (jshort*)coords, JNI_ABORT); 599 } 600 if (_exception) { 601 jniThrowException(_env, _exceptionType, _exceptionMessage); 602 } 603} 604 605/* void glDrawTexivOES ( const GLint *coords ) */ 606static void 607android_glDrawTexivOES___3II 608 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { 609 jint _exception = 0; 610 const char * _exceptionType = NULL; 611 const char * _exceptionMessage = NULL; 612 GLint *coords_base = (GLint *) 0; 613 jint _remaining; 614 GLint *coords = (GLint *) 0; 615 616 if (!coords_ref) { 617 _exception = 1; 618 _exceptionType = "java/lang/IllegalArgumentException"; 619 _exceptionMessage = "coords == null"; 620 goto exit; 621 } 622 if (offset < 0) { 623 _exception = 1; 624 _exceptionType = "java/lang/IllegalArgumentException"; 625 _exceptionMessage = "offset < 0"; 626 goto exit; 627 } 628 _remaining = _env->GetArrayLength(coords_ref) - offset; 629 if (_remaining < 5) { 630 _exception = 1; 631 _exceptionType = "java/lang/IllegalArgumentException"; 632 _exceptionMessage = "length - offset < 5 < needed"; 633 goto exit; 634 } 635 coords_base = (GLint *) 636 _env->GetIntArrayElements(coords_ref, (jboolean *)0); 637 coords = coords_base + offset; 638 639 glDrawTexivOES( 640 (GLint *)coords 641 ); 642 643exit: 644 if (coords_base) { 645 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base, 646 JNI_ABORT); 647 } 648 if (_exception) { 649 jniThrowException(_env, _exceptionType, _exceptionMessage); 650 } 651} 652 653/* void glDrawTexivOES ( const GLint *coords ) */ 654static void 655android_glDrawTexivOES__Ljava_nio_IntBuffer_2 656 (JNIEnv *_env, jobject _this, jobject coords_buf) { 657 jint _exception = 0; 658 const char * _exceptionType = NULL; 659 const char * _exceptionMessage = NULL; 660 jintArray _array = (jintArray) 0; 661 jint _bufferOffset = (jint) 0; 662 jint _remaining; 663 GLint *coords = (GLint *) 0; 664 665 if (!coords_buf) { 666 _exception = 1; 667 _exceptionType = "java/lang/IllegalArgumentException"; 668 _exceptionMessage = "coords == null"; 669 goto exit; 670 } 671 coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 672 if (_remaining < 5) { 673 _exception = 1; 674 _exceptionType = "java/lang/IllegalArgumentException"; 675 _exceptionMessage = "remaining() < 5 < needed"; 676 goto exit; 677 } 678 if (coords == NULL) { 679 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 680 coords = (GLint *) (_coordsBase + _bufferOffset); 681 } 682 glDrawTexivOES( 683 (GLint *)coords 684 ); 685 686exit: 687 if (_array) { 688 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT); 689 } 690 if (_exception) { 691 jniThrowException(_env, _exceptionType, _exceptionMessage); 692 } 693} 694 695/* void glDrawTexxvOES ( const GLfixed *coords ) */ 696static void 697android_glDrawTexxvOES___3II 698 (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { 699 jint _exception = 0; 700 const char * _exceptionType = NULL; 701 const char * _exceptionMessage = NULL; 702 GLfixed *coords_base = (GLfixed *) 0; 703 jint _remaining; 704 GLfixed *coords = (GLfixed *) 0; 705 706 if (!coords_ref) { 707 _exception = 1; 708 _exceptionType = "java/lang/IllegalArgumentException"; 709 _exceptionMessage = "coords == null"; 710 goto exit; 711 } 712 if (offset < 0) { 713 _exception = 1; 714 _exceptionType = "java/lang/IllegalArgumentException"; 715 _exceptionMessage = "offset < 0"; 716 goto exit; 717 } 718 _remaining = _env->GetArrayLength(coords_ref) - offset; 719 if (_remaining < 5) { 720 _exception = 1; 721 _exceptionType = "java/lang/IllegalArgumentException"; 722 _exceptionMessage = "length - offset < 5 < needed"; 723 goto exit; 724 } 725 coords_base = (GLfixed *) 726 _env->GetIntArrayElements(coords_ref, (jboolean *)0); 727 coords = coords_base + offset; 728 729 glDrawTexxvOES( 730 (GLfixed *)coords 731 ); 732 733exit: 734 if (coords_base) { 735 _env->ReleaseIntArrayElements(coords_ref, (jint*)coords_base, 736 JNI_ABORT); 737 } 738 if (_exception) { 739 jniThrowException(_env, _exceptionType, _exceptionMessage); 740 } 741} 742 743/* void glDrawTexxvOES ( const GLfixed *coords ) */ 744static void 745android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 746 (JNIEnv *_env, jobject _this, jobject coords_buf) { 747 jint _exception = 0; 748 const char * _exceptionType = NULL; 749 const char * _exceptionMessage = NULL; 750 jintArray _array = (jintArray) 0; 751 jint _bufferOffset = (jint) 0; 752 jint _remaining; 753 GLfixed *coords = (GLfixed *) 0; 754 755 if (!coords_buf) { 756 _exception = 1; 757 _exceptionType = "java/lang/IllegalArgumentException"; 758 _exceptionMessage = "coords == null"; 759 goto exit; 760 } 761 coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 762 if (_remaining < 5) { 763 _exception = 1; 764 _exceptionType = "java/lang/IllegalArgumentException"; 765 _exceptionMessage = "remaining() < 5 < needed"; 766 goto exit; 767 } 768 if (coords == NULL) { 769 char * _coordsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 770 coords = (GLfixed *) (_coordsBase + _bufferOffset); 771 } 772 glDrawTexxvOES( 773 (GLfixed *)coords 774 ); 775 776exit: 777 if (_array) { 778 _env->ReleaseIntArrayElements(_array, (jint*)coords, JNI_ABORT); 779 } 780 if (_exception) { 781 jniThrowException(_env, _exceptionType, _exceptionMessage); 782 } 783} 784 785/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */ 786static void 787android_glDrawTexfOES__FFFFF 788 (JNIEnv *_env, jobject _this, jfloat x, jfloat y, jfloat z, jfloat width, jfloat height) { 789 glDrawTexfOES( 790 (GLfloat)x, 791 (GLfloat)y, 792 (GLfloat)z, 793 (GLfloat)width, 794 (GLfloat)height 795 ); 796} 797 798/* void glDrawTexfvOES ( const GLfloat *coords ) */ 799static void 800android_glDrawTexfvOES___3FI 801 (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) { 802 jint _exception = 0; 803 const char * _exceptionType = NULL; 804 const char * _exceptionMessage = NULL; 805 GLfloat *coords_base = (GLfloat *) 0; 806 jint _remaining; 807 GLfloat *coords = (GLfloat *) 0; 808 809 if (!coords_ref) { 810 _exception = 1; 811 _exceptionType = "java/lang/IllegalArgumentException"; 812 _exceptionMessage = "coords == null"; 813 goto exit; 814 } 815 if (offset < 0) { 816 _exception = 1; 817 _exceptionType = "java/lang/IllegalArgumentException"; 818 _exceptionMessage = "offset < 0"; 819 goto exit; 820 } 821 _remaining = _env->GetArrayLength(coords_ref) - offset; 822 if (_remaining < 5) { 823 _exception = 1; 824 _exceptionType = "java/lang/IllegalArgumentException"; 825 _exceptionMessage = "length - offset < 5 < needed"; 826 goto exit; 827 } 828 coords_base = (GLfloat *) 829 _env->GetFloatArrayElements(coords_ref, (jboolean *)0); 830 coords = coords_base + offset; 831 832 glDrawTexfvOES( 833 (GLfloat *)coords 834 ); 835 836exit: 837 if (coords_base) { 838 _env->ReleaseFloatArrayElements(coords_ref, (jfloat*)coords_base, 839 JNI_ABORT); 840 } 841 if (_exception) { 842 jniThrowException(_env, _exceptionType, _exceptionMessage); 843 } 844} 845 846/* void glDrawTexfvOES ( const GLfloat *coords ) */ 847static void 848android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 849 (JNIEnv *_env, jobject _this, jobject coords_buf) { 850 jint _exception = 0; 851 const char * _exceptionType = NULL; 852 const char * _exceptionMessage = NULL; 853 jfloatArray _array = (jfloatArray) 0; 854 jint _bufferOffset = (jint) 0; 855 jint _remaining; 856 GLfloat *coords = (GLfloat *) 0; 857 858 if (!coords_buf) { 859 _exception = 1; 860 _exceptionType = "java/lang/IllegalArgumentException"; 861 _exceptionMessage = "coords == null"; 862 goto exit; 863 } 864 coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 865 if (_remaining < 5) { 866 _exception = 1; 867 _exceptionType = "java/lang/IllegalArgumentException"; 868 _exceptionMessage = "remaining() < 5 < needed"; 869 goto exit; 870 } 871 if (coords == NULL) { 872 char * _coordsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 873 coords = (GLfloat *) (_coordsBase + _bufferOffset); 874 } 875 glDrawTexfvOES( 876 (GLfloat *)coords 877 ); 878 879exit: 880 if (_array) { 881 _env->ReleaseFloatArrayElements(_array, (jfloat*)coords, JNI_ABORT); 882 } 883 if (_exception) { 884 jniThrowException(_env, _exceptionType, _exceptionMessage); 885 } 886} 887 888/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */ 889static void 890android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 891 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) { 892 jint _exception = 0; 893 const char * _exceptionType = NULL; 894 const char * _exceptionMessage = NULL; 895 jarray _array = (jarray) 0; 896 jint _bufferOffset = (jint) 0; 897 jint _remaining; 898 GLeglImageOES image = (GLeglImageOES) 0; 899 900 if (!image_buf) { 901 _exception = 1; 902 _exceptionType = "java/lang/IllegalArgumentException"; 903 _exceptionMessage = "image == null"; 904 goto exit; 905 } 906 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 907 if (image == NULL) { 908 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 909 image = (GLeglImageOES) (_imageBase + _bufferOffset); 910 } 911 glEGLImageTargetTexture2DOES( 912 (GLenum)target, 913 (GLeglImageOES)image 914 ); 915 916exit: 917 if (_array) { 918 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE); 919 } 920 if (_exception) { 921 jniThrowException(_env, _exceptionType, _exceptionMessage); 922 } 923} 924 925/* void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image ) */ 926static void 927android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 928 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) { 929 jint _exception = 0; 930 const char * _exceptionType = NULL; 931 const char * _exceptionMessage = NULL; 932 jarray _array = (jarray) 0; 933 jint _bufferOffset = (jint) 0; 934 jint _remaining; 935 GLeglImageOES image = (GLeglImageOES) 0; 936 937 if (!image_buf) { 938 _exception = 1; 939 _exceptionType = "java/lang/IllegalArgumentException"; 940 _exceptionMessage = "image == null"; 941 goto exit; 942 } 943 image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 944 if (image == NULL) { 945 char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 946 image = (GLeglImageOES) (_imageBase + _bufferOffset); 947 } 948 glEGLImageTargetRenderbufferStorageOES( 949 (GLenum)target, 950 (GLeglImageOES)image 951 ); 952 953exit: 954 if (_array) { 955 releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE); 956 } 957 if (_exception) { 958 jniThrowException(_env, _exceptionType, _exceptionMessage); 959 } 960} 961 962/* void glAlphaFuncxOES ( GLenum func, GLclampx ref ) */ 963static void 964android_glAlphaFuncxOES__II 965 (JNIEnv *_env, jobject _this, jint func, jint ref) { 966 glAlphaFuncxOES( 967 (GLenum)func, 968 (GLclampx)ref 969 ); 970} 971 972/* void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) */ 973static void 974android_glClearColorxOES__IIII 975 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) { 976 glClearColorxOES( 977 (GLclampx)red, 978 (GLclampx)green, 979 (GLclampx)blue, 980 (GLclampx)alpha 981 ); 982} 983 984/* void glClearDepthxOES ( GLclampx depth ) */ 985static void 986android_glClearDepthxOES__I 987 (JNIEnv *_env, jobject _this, jint depth) { 988 glClearDepthxOES( 989 (GLclampx)depth 990 ); 991} 992 993/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */ 994static void 995android_glClipPlanexOES__I_3II 996 (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) { 997 jint _exception = 0; 998 const char * _exceptionType = NULL; 999 const char * _exceptionMessage = NULL; 1000 GLfixed *equation_base = (GLfixed *) 0; 1001 jint _remaining; 1002 GLfixed *equation = (GLfixed *) 0; 1003 1004 if (!equation_ref) { 1005 _exception = 1; 1006 _exceptionType = "java/lang/IllegalArgumentException"; 1007 _exceptionMessage = "equation == null"; 1008 goto exit; 1009 } 1010 if (offset < 0) { 1011 _exception = 1; 1012 _exceptionType = "java/lang/IllegalArgumentException"; 1013 _exceptionMessage = "offset < 0"; 1014 goto exit; 1015 } 1016 _remaining = _env->GetArrayLength(equation_ref) - offset; 1017 equation_base = (GLfixed *) 1018 _env->GetIntArrayElements(equation_ref, (jboolean *)0); 1019 equation = equation_base + offset; 1020 1021 glClipPlanexOES( 1022 (GLenum)plane, 1023 (GLfixed *)equation 1024 ); 1025 1026exit: 1027 if (equation_base) { 1028 _env->ReleaseIntArrayElements(equation_ref, (jint*)equation_base, 1029 JNI_ABORT); 1030 } 1031 if (_exception) { 1032 jniThrowException(_env, _exceptionType, _exceptionMessage); 1033 } 1034} 1035 1036/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */ 1037static void 1038android_glClipPlanexOES__ILjava_nio_IntBuffer_2 1039 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { 1040 jint _exception = 0; 1041 const char * _exceptionType = NULL; 1042 const char * _exceptionMessage = NULL; 1043 jintArray _array = (jintArray) 0; 1044 jint _bufferOffset = (jint) 0; 1045 jint _remaining; 1046 GLfixed *equation = (GLfixed *) 0; 1047 1048 if (!equation_buf) { 1049 _exception = 1; 1050 _exceptionType = "java/lang/IllegalArgumentException"; 1051 _exceptionMessage = "equation == null"; 1052 goto exit; 1053 } 1054 equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1055 if (equation == NULL) { 1056 char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1057 equation = (GLfixed *) (_equationBase + _bufferOffset); 1058 } 1059 glClipPlanexOES( 1060 (GLenum)plane, 1061 (GLfixed *)equation 1062 ); 1063 1064exit: 1065 if (_array) { 1066 _env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT); 1067 } 1068 if (_exception) { 1069 jniThrowException(_env, _exceptionType, _exceptionMessage); 1070 } 1071} 1072 1073/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */ 1074static void 1075android_glColor4xOES__IIII 1076 (JNIEnv *_env, jobject _this, jint red, jint green, jint blue, jint alpha) { 1077 glColor4xOES( 1078 (GLfixed)red, 1079 (GLfixed)green, 1080 (GLfixed)blue, 1081 (GLfixed)alpha 1082 ); 1083} 1084 1085/* void glDepthRangexOES ( GLclampx zNear, GLclampx zFar ) */ 1086static void 1087android_glDepthRangexOES__II 1088 (JNIEnv *_env, jobject _this, jint zNear, jint zFar) { 1089 glDepthRangexOES( 1090 (GLclampx)zNear, 1091 (GLclampx)zFar 1092 ); 1093} 1094 1095/* void glFogxOES ( GLenum pname, GLfixed param ) */ 1096static void 1097android_glFogxOES__II 1098 (JNIEnv *_env, jobject _this, jint pname, jint param) { 1099 glFogxOES( 1100 (GLenum)pname, 1101 (GLfixed)param 1102 ); 1103} 1104 1105/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */ 1106static void 1107android_glFogxvOES__I_3II 1108 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { 1109 jint _exception = 0; 1110 const char * _exceptionType = NULL; 1111 const char * _exceptionMessage = NULL; 1112 GLfixed *params_base = (GLfixed *) 0; 1113 jint _remaining; 1114 GLfixed *params = (GLfixed *) 0; 1115 1116 if (!params_ref) { 1117 _exception = 1; 1118 _exceptionType = "java/lang/IllegalArgumentException"; 1119 _exceptionMessage = "params == null"; 1120 goto exit; 1121 } 1122 if (offset < 0) { 1123 _exception = 1; 1124 _exceptionType = "java/lang/IllegalArgumentException"; 1125 _exceptionMessage = "offset < 0"; 1126 goto exit; 1127 } 1128 _remaining = _env->GetArrayLength(params_ref) - offset; 1129 params_base = (GLfixed *) 1130 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1131 params = params_base + offset; 1132 1133 glFogxvOES( 1134 (GLenum)pname, 1135 (GLfixed *)params 1136 ); 1137 1138exit: 1139 if (params_base) { 1140 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1141 JNI_ABORT); 1142 } 1143 if (_exception) { 1144 jniThrowException(_env, _exceptionType, _exceptionMessage); 1145 } 1146} 1147 1148/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */ 1149static void 1150android_glFogxvOES__ILjava_nio_IntBuffer_2 1151 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 1152 jint _exception = 0; 1153 const char * _exceptionType = NULL; 1154 const char * _exceptionMessage = NULL; 1155 jintArray _array = (jintArray) 0; 1156 jint _bufferOffset = (jint) 0; 1157 jint _remaining; 1158 GLfixed *params = (GLfixed *) 0; 1159 1160 if (!params_buf) { 1161 _exception = 1; 1162 _exceptionType = "java/lang/IllegalArgumentException"; 1163 _exceptionMessage = "params == null"; 1164 goto exit; 1165 } 1166 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1167 if (params == NULL) { 1168 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1169 params = (GLfixed *) (_paramsBase + _bufferOffset); 1170 } 1171 glFogxvOES( 1172 (GLenum)pname, 1173 (GLfixed *)params 1174 ); 1175 1176exit: 1177 if (_array) { 1178 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 1179 } 1180 if (_exception) { 1181 jniThrowException(_env, _exceptionType, _exceptionMessage); 1182 } 1183} 1184 1185/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */ 1186static void 1187android_glFrustumxOES__IIIIII 1188 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) { 1189 glFrustumxOES( 1190 (GLfixed)left, 1191 (GLfixed)right, 1192 (GLfixed)bottom, 1193 (GLfixed)top, 1194 (GLfixed)zNear, 1195 (GLfixed)zFar 1196 ); 1197} 1198 1199/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */ 1200static void 1201android_glGetClipPlanexOES__I_3II 1202 (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) { 1203 jint _exception = 0; 1204 const char * _exceptionType = NULL; 1205 const char * _exceptionMessage = NULL; 1206 GLfixed *eqn_base = (GLfixed *) 0; 1207 jint _remaining; 1208 GLfixed *eqn = (GLfixed *) 0; 1209 1210 if (!eqn_ref) { 1211 _exception = 1; 1212 _exceptionType = "java/lang/IllegalArgumentException"; 1213 _exceptionMessage = "eqn == null"; 1214 goto exit; 1215 } 1216 if (offset < 0) { 1217 _exception = 1; 1218 _exceptionType = "java/lang/IllegalArgumentException"; 1219 _exceptionMessage = "offset < 0"; 1220 goto exit; 1221 } 1222 _remaining = _env->GetArrayLength(eqn_ref) - offset; 1223 if (_remaining < 4) { 1224 _exception = 1; 1225 _exceptionType = "java/lang/IllegalArgumentException"; 1226 _exceptionMessage = "length - offset < 4 < needed"; 1227 goto exit; 1228 } 1229 eqn_base = (GLfixed *) 1230 _env->GetIntArrayElements(eqn_ref, (jboolean *)0); 1231 eqn = eqn_base + offset; 1232 1233 glGetClipPlanexOES( 1234 (GLenum)pname, 1235 (GLfixed *)eqn 1236 ); 1237 1238exit: 1239 if (eqn_base) { 1240 _env->ReleaseIntArrayElements(eqn_ref, (jint*)eqn_base, 1241 _exception ? JNI_ABORT: 0); 1242 } 1243 if (_exception) { 1244 jniThrowException(_env, _exceptionType, _exceptionMessage); 1245 } 1246} 1247 1248/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */ 1249static void 1250android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 1251 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { 1252 jint _exception = 0; 1253 const char * _exceptionType = NULL; 1254 const char * _exceptionMessage = NULL; 1255 jintArray _array = (jintArray) 0; 1256 jint _bufferOffset = (jint) 0; 1257 jint _remaining; 1258 GLfixed *eqn = (GLfixed *) 0; 1259 1260 if (!eqn_buf) { 1261 _exception = 1; 1262 _exceptionType = "java/lang/IllegalArgumentException"; 1263 _exceptionMessage = "eqn == null"; 1264 goto exit; 1265 } 1266 eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1267 if (_remaining < 4) { 1268 _exception = 1; 1269 _exceptionType = "java/lang/IllegalArgumentException"; 1270 _exceptionMessage = "remaining() < 4 < needed"; 1271 goto exit; 1272 } 1273 if (eqn == NULL) { 1274 char * _eqnBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1275 eqn = (GLfixed *) (_eqnBase + _bufferOffset); 1276 } 1277 glGetClipPlanexOES( 1278 (GLenum)pname, 1279 (GLfixed *)eqn 1280 ); 1281 1282exit: 1283 if (_array) { 1284 _env->ReleaseIntArrayElements(_array, (jint*)eqn, _exception ? JNI_ABORT : 0); 1285 } 1286 if (_exception) { 1287 jniThrowException(_env, _exceptionType, _exceptionMessage); 1288 } 1289} 1290 1291/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */ 1292static void 1293android_glGetFixedvOES__I_3II 1294 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { 1295 jint _exception = 0; 1296 const char * _exceptionType = NULL; 1297 const char * _exceptionMessage = NULL; 1298 GLfixed *params_base = (GLfixed *) 0; 1299 jint _remaining; 1300 GLfixed *params = (GLfixed *) 0; 1301 1302 if (!params_ref) { 1303 _exception = 1; 1304 _exceptionType = "java/lang/IllegalArgumentException"; 1305 _exceptionMessage = "params == null"; 1306 goto exit; 1307 } 1308 if (offset < 0) { 1309 _exception = 1; 1310 _exceptionType = "java/lang/IllegalArgumentException"; 1311 _exceptionMessage = "offset < 0"; 1312 goto exit; 1313 } 1314 _remaining = _env->GetArrayLength(params_ref) - offset; 1315 params_base = (GLfixed *) 1316 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1317 params = params_base + offset; 1318 1319 glGetFixedvOES( 1320 (GLenum)pname, 1321 (GLfixed *)params 1322 ); 1323 1324exit: 1325 if (params_base) { 1326 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1327 _exception ? JNI_ABORT: 0); 1328 } 1329 if (_exception) { 1330 jniThrowException(_env, _exceptionType, _exceptionMessage); 1331 } 1332} 1333 1334/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */ 1335static void 1336android_glGetFixedvOES__ILjava_nio_IntBuffer_2 1337 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 1338 jint _exception = 0; 1339 const char * _exceptionType = NULL; 1340 const char * _exceptionMessage = NULL; 1341 jintArray _array = (jintArray) 0; 1342 jint _bufferOffset = (jint) 0; 1343 jint _remaining; 1344 GLfixed *params = (GLfixed *) 0; 1345 1346 if (!params_buf) { 1347 _exception = 1; 1348 _exceptionType = "java/lang/IllegalArgumentException"; 1349 _exceptionMessage = "params == null"; 1350 goto exit; 1351 } 1352 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1353 if (params == NULL) { 1354 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1355 params = (GLfixed *) (_paramsBase + _bufferOffset); 1356 } 1357 glGetFixedvOES( 1358 (GLenum)pname, 1359 (GLfixed *)params 1360 ); 1361 1362exit: 1363 if (_array) { 1364 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 1365 } 1366 if (_exception) { 1367 jniThrowException(_env, _exceptionType, _exceptionMessage); 1368 } 1369} 1370 1371/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */ 1372static void 1373android_glGetLightxvOES__II_3II 1374 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { 1375 jint _exception = 0; 1376 const char * _exceptionType = NULL; 1377 const char * _exceptionMessage = NULL; 1378 GLfixed *params_base = (GLfixed *) 0; 1379 jint _remaining; 1380 GLfixed *params = (GLfixed *) 0; 1381 1382 if (!params_ref) { 1383 _exception = 1; 1384 _exceptionType = "java/lang/IllegalArgumentException"; 1385 _exceptionMessage = "params == null"; 1386 goto exit; 1387 } 1388 if (offset < 0) { 1389 _exception = 1; 1390 _exceptionType = "java/lang/IllegalArgumentException"; 1391 _exceptionMessage = "offset < 0"; 1392 goto exit; 1393 } 1394 _remaining = _env->GetArrayLength(params_ref) - offset; 1395 params_base = (GLfixed *) 1396 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1397 params = params_base + offset; 1398 1399 glGetLightxvOES( 1400 (GLenum)light, 1401 (GLenum)pname, 1402 (GLfixed *)params 1403 ); 1404 1405exit: 1406 if (params_base) { 1407 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1408 _exception ? JNI_ABORT: 0); 1409 } 1410 if (_exception) { 1411 jniThrowException(_env, _exceptionType, _exceptionMessage); 1412 } 1413} 1414 1415/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */ 1416static void 1417android_glGetLightxvOES__IILjava_nio_IntBuffer_2 1418 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { 1419 jint _exception = 0; 1420 const char * _exceptionType = NULL; 1421 const char * _exceptionMessage = NULL; 1422 jintArray _array = (jintArray) 0; 1423 jint _bufferOffset = (jint) 0; 1424 jint _remaining; 1425 GLfixed *params = (GLfixed *) 0; 1426 1427 if (!params_buf) { 1428 _exception = 1; 1429 _exceptionType = "java/lang/IllegalArgumentException"; 1430 _exceptionMessage = "params == null"; 1431 goto exit; 1432 } 1433 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1434 if (params == NULL) { 1435 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1436 params = (GLfixed *) (_paramsBase + _bufferOffset); 1437 } 1438 glGetLightxvOES( 1439 (GLenum)light, 1440 (GLenum)pname, 1441 (GLfixed *)params 1442 ); 1443 1444exit: 1445 if (_array) { 1446 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 1447 } 1448 if (_exception) { 1449 jniThrowException(_env, _exceptionType, _exceptionMessage); 1450 } 1451} 1452 1453/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */ 1454static void 1455android_glGetMaterialxvOES__II_3II 1456 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { 1457 jint _exception = 0; 1458 const char * _exceptionType = NULL; 1459 const char * _exceptionMessage = NULL; 1460 GLfixed *params_base = (GLfixed *) 0; 1461 jint _remaining; 1462 GLfixed *params = (GLfixed *) 0; 1463 1464 if (!params_ref) { 1465 _exception = 1; 1466 _exceptionType = "java/lang/IllegalArgumentException"; 1467 _exceptionMessage = "params == null"; 1468 goto exit; 1469 } 1470 if (offset < 0) { 1471 _exception = 1; 1472 _exceptionType = "java/lang/IllegalArgumentException"; 1473 _exceptionMessage = "offset < 0"; 1474 goto exit; 1475 } 1476 _remaining = _env->GetArrayLength(params_ref) - offset; 1477 params_base = (GLfixed *) 1478 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1479 params = params_base + offset; 1480 1481 glGetMaterialxvOES( 1482 (GLenum)face, 1483 (GLenum)pname, 1484 (GLfixed *)params 1485 ); 1486 1487exit: 1488 if (params_base) { 1489 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1490 _exception ? JNI_ABORT: 0); 1491 } 1492 if (_exception) { 1493 jniThrowException(_env, _exceptionType, _exceptionMessage); 1494 } 1495} 1496 1497/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */ 1498static void 1499android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 1500 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { 1501 jint _exception = 0; 1502 const char * _exceptionType = NULL; 1503 const char * _exceptionMessage = NULL; 1504 jintArray _array = (jintArray) 0; 1505 jint _bufferOffset = (jint) 0; 1506 jint _remaining; 1507 GLfixed *params = (GLfixed *) 0; 1508 1509 if (!params_buf) { 1510 _exception = 1; 1511 _exceptionType = "java/lang/IllegalArgumentException"; 1512 _exceptionMessage = "params == null"; 1513 goto exit; 1514 } 1515 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1516 if (params == NULL) { 1517 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1518 params = (GLfixed *) (_paramsBase + _bufferOffset); 1519 } 1520 glGetMaterialxvOES( 1521 (GLenum)face, 1522 (GLenum)pname, 1523 (GLfixed *)params 1524 ); 1525 1526exit: 1527 if (_array) { 1528 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 1529 } 1530 if (_exception) { 1531 jniThrowException(_env, _exceptionType, _exceptionMessage); 1532 } 1533} 1534 1535/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */ 1536static void 1537android_glGetTexEnvxvOES__II_3II 1538 (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { 1539 jint _exception = 0; 1540 const char * _exceptionType = NULL; 1541 const char * _exceptionMessage = NULL; 1542 GLfixed *params_base = (GLfixed *) 0; 1543 jint _remaining; 1544 GLfixed *params = (GLfixed *) 0; 1545 1546 if (!params_ref) { 1547 _exception = 1; 1548 _exceptionType = "java/lang/IllegalArgumentException"; 1549 _exceptionMessage = "params == null"; 1550 goto exit; 1551 } 1552 if (offset < 0) { 1553 _exception = 1; 1554 _exceptionType = "java/lang/IllegalArgumentException"; 1555 _exceptionMessage = "offset < 0"; 1556 goto exit; 1557 } 1558 _remaining = _env->GetArrayLength(params_ref) - offset; 1559 params_base = (GLfixed *) 1560 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1561 params = params_base + offset; 1562 1563 glGetTexEnvxvOES( 1564 (GLenum)env, 1565 (GLenum)pname, 1566 (GLfixed *)params 1567 ); 1568 1569exit: 1570 if (params_base) { 1571 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1572 _exception ? JNI_ABORT: 0); 1573 } 1574 if (_exception) { 1575 jniThrowException(_env, _exceptionType, _exceptionMessage); 1576 } 1577} 1578 1579/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */ 1580static void 1581android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 1582 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { 1583 jint _exception = 0; 1584 const char * _exceptionType = NULL; 1585 const char * _exceptionMessage = NULL; 1586 jintArray _array = (jintArray) 0; 1587 jint _bufferOffset = (jint) 0; 1588 jint _remaining; 1589 GLfixed *params = (GLfixed *) 0; 1590 1591 if (!params_buf) { 1592 _exception = 1; 1593 _exceptionType = "java/lang/IllegalArgumentException"; 1594 _exceptionMessage = "params == null"; 1595 goto exit; 1596 } 1597 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1598 if (params == NULL) { 1599 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1600 params = (GLfixed *) (_paramsBase + _bufferOffset); 1601 } 1602 glGetTexEnvxvOES( 1603 (GLenum)env, 1604 (GLenum)pname, 1605 (GLfixed *)params 1606 ); 1607 1608exit: 1609 if (_array) { 1610 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 1611 } 1612 if (_exception) { 1613 jniThrowException(_env, _exceptionType, _exceptionMessage); 1614 } 1615} 1616 1617/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */ 1618static void 1619android_glGetTexParameterxvOES__II_3II 1620 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 1621 jint _exception = 0; 1622 const char * _exceptionType = NULL; 1623 const char * _exceptionMessage = NULL; 1624 GLfixed *params_base = (GLfixed *) 0; 1625 jint _remaining; 1626 GLfixed *params = (GLfixed *) 0; 1627 1628 if (!params_ref) { 1629 _exception = 1; 1630 _exceptionType = "java/lang/IllegalArgumentException"; 1631 _exceptionMessage = "params == null"; 1632 goto exit; 1633 } 1634 if (offset < 0) { 1635 _exception = 1; 1636 _exceptionType = "java/lang/IllegalArgumentException"; 1637 _exceptionMessage = "offset < 0"; 1638 goto exit; 1639 } 1640 _remaining = _env->GetArrayLength(params_ref) - offset; 1641 params_base = (GLfixed *) 1642 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1643 params = params_base + offset; 1644 1645 glGetTexParameterxvOES( 1646 (GLenum)target, 1647 (GLenum)pname, 1648 (GLfixed *)params 1649 ); 1650 1651exit: 1652 if (params_base) { 1653 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1654 _exception ? JNI_ABORT: 0); 1655 } 1656 if (_exception) { 1657 jniThrowException(_env, _exceptionType, _exceptionMessage); 1658 } 1659} 1660 1661/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */ 1662static void 1663android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 1664 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 1665 jint _exception = 0; 1666 const char * _exceptionType = NULL; 1667 const char * _exceptionMessage = NULL; 1668 jintArray _array = (jintArray) 0; 1669 jint _bufferOffset = (jint) 0; 1670 jint _remaining; 1671 GLfixed *params = (GLfixed *) 0; 1672 1673 if (!params_buf) { 1674 _exception = 1; 1675 _exceptionType = "java/lang/IllegalArgumentException"; 1676 _exceptionMessage = "params == null"; 1677 goto exit; 1678 } 1679 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1680 if (params == NULL) { 1681 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1682 params = (GLfixed *) (_paramsBase + _bufferOffset); 1683 } 1684 glGetTexParameterxvOES( 1685 (GLenum)target, 1686 (GLenum)pname, 1687 (GLfixed *)params 1688 ); 1689 1690exit: 1691 if (_array) { 1692 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 1693 } 1694 if (_exception) { 1695 jniThrowException(_env, _exceptionType, _exceptionMessage); 1696 } 1697} 1698 1699/* void glLightModelxOES ( GLenum pname, GLfixed param ) */ 1700static void 1701android_glLightModelxOES__II 1702 (JNIEnv *_env, jobject _this, jint pname, jint param) { 1703 glLightModelxOES( 1704 (GLenum)pname, 1705 (GLfixed)param 1706 ); 1707} 1708 1709/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */ 1710static void 1711android_glLightModelxvOES__I_3II 1712 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { 1713 jint _exception = 0; 1714 const char * _exceptionType = NULL; 1715 const char * _exceptionMessage = NULL; 1716 GLfixed *params_base = (GLfixed *) 0; 1717 jint _remaining; 1718 GLfixed *params = (GLfixed *) 0; 1719 1720 if (!params_ref) { 1721 _exception = 1; 1722 _exceptionType = "java/lang/IllegalArgumentException"; 1723 _exceptionMessage = "params == null"; 1724 goto exit; 1725 } 1726 if (offset < 0) { 1727 _exception = 1; 1728 _exceptionType = "java/lang/IllegalArgumentException"; 1729 _exceptionMessage = "offset < 0"; 1730 goto exit; 1731 } 1732 _remaining = _env->GetArrayLength(params_ref) - offset; 1733 params_base = (GLfixed *) 1734 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1735 params = params_base + offset; 1736 1737 glLightModelxvOES( 1738 (GLenum)pname, 1739 (GLfixed *)params 1740 ); 1741 1742exit: 1743 if (params_base) { 1744 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1745 JNI_ABORT); 1746 } 1747 if (_exception) { 1748 jniThrowException(_env, _exceptionType, _exceptionMessage); 1749 } 1750} 1751 1752/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */ 1753static void 1754android_glLightModelxvOES__ILjava_nio_IntBuffer_2 1755 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 1756 jint _exception = 0; 1757 const char * _exceptionType = NULL; 1758 const char * _exceptionMessage = NULL; 1759 jintArray _array = (jintArray) 0; 1760 jint _bufferOffset = (jint) 0; 1761 jint _remaining; 1762 GLfixed *params = (GLfixed *) 0; 1763 1764 if (!params_buf) { 1765 _exception = 1; 1766 _exceptionType = "java/lang/IllegalArgumentException"; 1767 _exceptionMessage = "params == null"; 1768 goto exit; 1769 } 1770 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1771 if (params == NULL) { 1772 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1773 params = (GLfixed *) (_paramsBase + _bufferOffset); 1774 } 1775 glLightModelxvOES( 1776 (GLenum)pname, 1777 (GLfixed *)params 1778 ); 1779 1780exit: 1781 if (_array) { 1782 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 1783 } 1784 if (_exception) { 1785 jniThrowException(_env, _exceptionType, _exceptionMessage); 1786 } 1787} 1788 1789/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */ 1790static void 1791android_glLightxOES__III 1792 (JNIEnv *_env, jobject _this, jint light, jint pname, jint param) { 1793 glLightxOES( 1794 (GLenum)light, 1795 (GLenum)pname, 1796 (GLfixed)param 1797 ); 1798} 1799 1800/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */ 1801static void 1802android_glLightxvOES__II_3II 1803 (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { 1804 jint _exception = 0; 1805 const char * _exceptionType = NULL; 1806 const char * _exceptionMessage = NULL; 1807 GLfixed *params_base = (GLfixed *) 0; 1808 jint _remaining; 1809 GLfixed *params = (GLfixed *) 0; 1810 1811 if (!params_ref) { 1812 _exception = 1; 1813 _exceptionType = "java/lang/IllegalArgumentException"; 1814 _exceptionMessage = "params == null"; 1815 goto exit; 1816 } 1817 if (offset < 0) { 1818 _exception = 1; 1819 _exceptionType = "java/lang/IllegalArgumentException"; 1820 _exceptionMessage = "offset < 0"; 1821 goto exit; 1822 } 1823 _remaining = _env->GetArrayLength(params_ref) - offset; 1824 params_base = (GLfixed *) 1825 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1826 params = params_base + offset; 1827 1828 glLightxvOES( 1829 (GLenum)light, 1830 (GLenum)pname, 1831 (GLfixed *)params 1832 ); 1833 1834exit: 1835 if (params_base) { 1836 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1837 JNI_ABORT); 1838 } 1839 if (_exception) { 1840 jniThrowException(_env, _exceptionType, _exceptionMessage); 1841 } 1842} 1843 1844/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */ 1845static void 1846android_glLightxvOES__IILjava_nio_IntBuffer_2 1847 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { 1848 jint _exception = 0; 1849 const char * _exceptionType = NULL; 1850 const char * _exceptionMessage = NULL; 1851 jintArray _array = (jintArray) 0; 1852 jint _bufferOffset = (jint) 0; 1853 jint _remaining; 1854 GLfixed *params = (GLfixed *) 0; 1855 1856 if (!params_buf) { 1857 _exception = 1; 1858 _exceptionType = "java/lang/IllegalArgumentException"; 1859 _exceptionMessage = "params == null"; 1860 goto exit; 1861 } 1862 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1863 if (params == NULL) { 1864 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1865 params = (GLfixed *) (_paramsBase + _bufferOffset); 1866 } 1867 glLightxvOES( 1868 (GLenum)light, 1869 (GLenum)pname, 1870 (GLfixed *)params 1871 ); 1872 1873exit: 1874 if (_array) { 1875 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 1876 } 1877 if (_exception) { 1878 jniThrowException(_env, _exceptionType, _exceptionMessage); 1879 } 1880} 1881 1882/* void glLineWidthxOES ( GLfixed width ) */ 1883static void 1884android_glLineWidthxOES__I 1885 (JNIEnv *_env, jobject _this, jint width) { 1886 glLineWidthxOES( 1887 (GLfixed)width 1888 ); 1889} 1890 1891/* void glLoadMatrixxOES ( const GLfixed *m ) */ 1892static void 1893android_glLoadMatrixxOES___3II 1894 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { 1895 jint _exception = 0; 1896 const char * _exceptionType = NULL; 1897 const char * _exceptionMessage = NULL; 1898 GLfixed *m_base = (GLfixed *) 0; 1899 jint _remaining; 1900 GLfixed *m = (GLfixed *) 0; 1901 1902 if (!m_ref) { 1903 _exception = 1; 1904 _exceptionType = "java/lang/IllegalArgumentException"; 1905 _exceptionMessage = "m == null"; 1906 goto exit; 1907 } 1908 if (offset < 0) { 1909 _exception = 1; 1910 _exceptionType = "java/lang/IllegalArgumentException"; 1911 _exceptionMessage = "offset < 0"; 1912 goto exit; 1913 } 1914 _remaining = _env->GetArrayLength(m_ref) - offset; 1915 m_base = (GLfixed *) 1916 _env->GetIntArrayElements(m_ref, (jboolean *)0); 1917 m = m_base + offset; 1918 1919 glLoadMatrixxOES( 1920 (GLfixed *)m 1921 ); 1922 1923exit: 1924 if (m_base) { 1925 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base, 1926 JNI_ABORT); 1927 } 1928 if (_exception) { 1929 jniThrowException(_env, _exceptionType, _exceptionMessage); 1930 } 1931} 1932 1933/* void glLoadMatrixxOES ( const GLfixed *m ) */ 1934static void 1935android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 1936 (JNIEnv *_env, jobject _this, jobject m_buf) { 1937 jint _exception = 0; 1938 const char * _exceptionType = NULL; 1939 const char * _exceptionMessage = NULL; 1940 jintArray _array = (jintArray) 0; 1941 jint _bufferOffset = (jint) 0; 1942 jint _remaining; 1943 GLfixed *m = (GLfixed *) 0; 1944 1945 if (!m_buf) { 1946 _exception = 1; 1947 _exceptionType = "java/lang/IllegalArgumentException"; 1948 _exceptionMessage = "m == null"; 1949 goto exit; 1950 } 1951 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1952 if (m == NULL) { 1953 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1954 m = (GLfixed *) (_mBase + _bufferOffset); 1955 } 1956 glLoadMatrixxOES( 1957 (GLfixed *)m 1958 ); 1959 1960exit: 1961 if (_array) { 1962 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT); 1963 } 1964 if (_exception) { 1965 jniThrowException(_env, _exceptionType, _exceptionMessage); 1966 } 1967} 1968 1969/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */ 1970static void 1971android_glMaterialxOES__III 1972 (JNIEnv *_env, jobject _this, jint face, jint pname, jint param) { 1973 glMaterialxOES( 1974 (GLenum)face, 1975 (GLenum)pname, 1976 (GLfixed)param 1977 ); 1978} 1979 1980/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */ 1981static void 1982android_glMaterialxvOES__II_3II 1983 (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { 1984 jint _exception = 0; 1985 const char * _exceptionType = NULL; 1986 const char * _exceptionMessage = NULL; 1987 GLfixed *params_base = (GLfixed *) 0; 1988 jint _remaining; 1989 GLfixed *params = (GLfixed *) 0; 1990 1991 if (!params_ref) { 1992 _exception = 1; 1993 _exceptionType = "java/lang/IllegalArgumentException"; 1994 _exceptionMessage = "params == null"; 1995 goto exit; 1996 } 1997 if (offset < 0) { 1998 _exception = 1; 1999 _exceptionType = "java/lang/IllegalArgumentException"; 2000 _exceptionMessage = "offset < 0"; 2001 goto exit; 2002 } 2003 _remaining = _env->GetArrayLength(params_ref) - offset; 2004 params_base = (GLfixed *) 2005 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2006 params = params_base + offset; 2007 2008 glMaterialxvOES( 2009 (GLenum)face, 2010 (GLenum)pname, 2011 (GLfixed *)params 2012 ); 2013 2014exit: 2015 if (params_base) { 2016 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2017 JNI_ABORT); 2018 } 2019 if (_exception) { 2020 jniThrowException(_env, _exceptionType, _exceptionMessage); 2021 } 2022} 2023 2024/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */ 2025static void 2026android_glMaterialxvOES__IILjava_nio_IntBuffer_2 2027 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { 2028 jint _exception = 0; 2029 const char * _exceptionType = NULL; 2030 const char * _exceptionMessage = NULL; 2031 jintArray _array = (jintArray) 0; 2032 jint _bufferOffset = (jint) 0; 2033 jint _remaining; 2034 GLfixed *params = (GLfixed *) 0; 2035 2036 if (!params_buf) { 2037 _exception = 1; 2038 _exceptionType = "java/lang/IllegalArgumentException"; 2039 _exceptionMessage = "params == null"; 2040 goto exit; 2041 } 2042 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2043 if (params == NULL) { 2044 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2045 params = (GLfixed *) (_paramsBase + _bufferOffset); 2046 } 2047 glMaterialxvOES( 2048 (GLenum)face, 2049 (GLenum)pname, 2050 (GLfixed *)params 2051 ); 2052 2053exit: 2054 if (_array) { 2055 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 2056 } 2057 if (_exception) { 2058 jniThrowException(_env, _exceptionType, _exceptionMessage); 2059 } 2060} 2061 2062/* void glMultMatrixxOES ( const GLfixed *m ) */ 2063static void 2064android_glMultMatrixxOES___3II 2065 (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { 2066 jint _exception = 0; 2067 const char * _exceptionType = NULL; 2068 const char * _exceptionMessage = NULL; 2069 GLfixed *m_base = (GLfixed *) 0; 2070 jint _remaining; 2071 GLfixed *m = (GLfixed *) 0; 2072 2073 if (!m_ref) { 2074 _exception = 1; 2075 _exceptionType = "java/lang/IllegalArgumentException"; 2076 _exceptionMessage = "m == null"; 2077 goto exit; 2078 } 2079 if (offset < 0) { 2080 _exception = 1; 2081 _exceptionType = "java/lang/IllegalArgumentException"; 2082 _exceptionMessage = "offset < 0"; 2083 goto exit; 2084 } 2085 _remaining = _env->GetArrayLength(m_ref) - offset; 2086 m_base = (GLfixed *) 2087 _env->GetIntArrayElements(m_ref, (jboolean *)0); 2088 m = m_base + offset; 2089 2090 glMultMatrixxOES( 2091 (GLfixed *)m 2092 ); 2093 2094exit: 2095 if (m_base) { 2096 _env->ReleaseIntArrayElements(m_ref, (jint*)m_base, 2097 JNI_ABORT); 2098 } 2099 if (_exception) { 2100 jniThrowException(_env, _exceptionType, _exceptionMessage); 2101 } 2102} 2103 2104/* void glMultMatrixxOES ( const GLfixed *m ) */ 2105static void 2106android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 2107 (JNIEnv *_env, jobject _this, jobject m_buf) { 2108 jint _exception = 0; 2109 const char * _exceptionType = NULL; 2110 const char * _exceptionMessage = NULL; 2111 jintArray _array = (jintArray) 0; 2112 jint _bufferOffset = (jint) 0; 2113 jint _remaining; 2114 GLfixed *m = (GLfixed *) 0; 2115 2116 if (!m_buf) { 2117 _exception = 1; 2118 _exceptionType = "java/lang/IllegalArgumentException"; 2119 _exceptionMessage = "m == null"; 2120 goto exit; 2121 } 2122 m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2123 if (m == NULL) { 2124 char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2125 m = (GLfixed *) (_mBase + _bufferOffset); 2126 } 2127 glMultMatrixxOES( 2128 (GLfixed *)m 2129 ); 2130 2131exit: 2132 if (_array) { 2133 _env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT); 2134 } 2135 if (_exception) { 2136 jniThrowException(_env, _exceptionType, _exceptionMessage); 2137 } 2138} 2139 2140/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */ 2141static void 2142android_glMultiTexCoord4xOES__IIIII 2143 (JNIEnv *_env, jobject _this, jint target, jint s, jint t, jint r, jint q) { 2144 glMultiTexCoord4xOES( 2145 (GLenum)target, 2146 (GLfixed)s, 2147 (GLfixed)t, 2148 (GLfixed)r, 2149 (GLfixed)q 2150 ); 2151} 2152 2153/* void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz ) */ 2154static void 2155android_glNormal3xOES__III 2156 (JNIEnv *_env, jobject _this, jint nx, jint ny, jint nz) { 2157 glNormal3xOES( 2158 (GLfixed)nx, 2159 (GLfixed)ny, 2160 (GLfixed)nz 2161 ); 2162} 2163 2164/* void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */ 2165static void 2166android_glOrthoxOES__IIIIII 2167 (JNIEnv *_env, jobject _this, jint left, jint right, jint bottom, jint top, jint zNear, jint zFar) { 2168 glOrthoxOES( 2169 (GLfixed)left, 2170 (GLfixed)right, 2171 (GLfixed)bottom, 2172 (GLfixed)top, 2173 (GLfixed)zNear, 2174 (GLfixed)zFar 2175 ); 2176} 2177 2178/* void glPointParameterxOES ( GLenum pname, GLfixed param ) */ 2179static void 2180android_glPointParameterxOES__II 2181 (JNIEnv *_env, jobject _this, jint pname, jint param) { 2182 glPointParameterxOES( 2183 (GLenum)pname, 2184 (GLfixed)param 2185 ); 2186} 2187 2188/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */ 2189static void 2190android_glPointParameterxvOES__I_3II 2191 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { 2192 jint _exception = 0; 2193 const char * _exceptionType = NULL; 2194 const char * _exceptionMessage = NULL; 2195 GLfixed *params_base = (GLfixed *) 0; 2196 jint _remaining; 2197 GLfixed *params = (GLfixed *) 0; 2198 2199 if (!params_ref) { 2200 _exception = 1; 2201 _exceptionType = "java/lang/IllegalArgumentException"; 2202 _exceptionMessage = "params == null"; 2203 goto exit; 2204 } 2205 if (offset < 0) { 2206 _exception = 1; 2207 _exceptionType = "java/lang/IllegalArgumentException"; 2208 _exceptionMessage = "offset < 0"; 2209 goto exit; 2210 } 2211 _remaining = _env->GetArrayLength(params_ref) - offset; 2212 params_base = (GLfixed *) 2213 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2214 params = params_base + offset; 2215 2216 glPointParameterxvOES( 2217 (GLenum)pname, 2218 (GLfixed *)params 2219 ); 2220 2221exit: 2222 if (params_base) { 2223 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2224 JNI_ABORT); 2225 } 2226 if (_exception) { 2227 jniThrowException(_env, _exceptionType, _exceptionMessage); 2228 } 2229} 2230 2231/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */ 2232static void 2233android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 2234 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 2235 jint _exception = 0; 2236 const char * _exceptionType = NULL; 2237 const char * _exceptionMessage = NULL; 2238 jintArray _array = (jintArray) 0; 2239 jint _bufferOffset = (jint) 0; 2240 jint _remaining; 2241 GLfixed *params = (GLfixed *) 0; 2242 2243 if (!params_buf) { 2244 _exception = 1; 2245 _exceptionType = "java/lang/IllegalArgumentException"; 2246 _exceptionMessage = "params == null"; 2247 goto exit; 2248 } 2249 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2250 if (params == NULL) { 2251 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2252 params = (GLfixed *) (_paramsBase + _bufferOffset); 2253 } 2254 glPointParameterxvOES( 2255 (GLenum)pname, 2256 (GLfixed *)params 2257 ); 2258 2259exit: 2260 if (_array) { 2261 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 2262 } 2263 if (_exception) { 2264 jniThrowException(_env, _exceptionType, _exceptionMessage); 2265 } 2266} 2267 2268/* void glPointSizexOES ( GLfixed size ) */ 2269static void 2270android_glPointSizexOES__I 2271 (JNIEnv *_env, jobject _this, jint size) { 2272 glPointSizexOES( 2273 (GLfixed)size 2274 ); 2275} 2276 2277/* void glPolygonOffsetxOES ( GLfixed factor, GLfixed units ) */ 2278static void 2279android_glPolygonOffsetxOES__II 2280 (JNIEnv *_env, jobject _this, jint factor, jint units) { 2281 glPolygonOffsetxOES( 2282 (GLfixed)factor, 2283 (GLfixed)units 2284 ); 2285} 2286 2287/* void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) */ 2288static void 2289android_glRotatexOES__IIII 2290 (JNIEnv *_env, jobject _this, jint angle, jint x, jint y, jint z) { 2291 glRotatexOES( 2292 (GLfixed)angle, 2293 (GLfixed)x, 2294 (GLfixed)y, 2295 (GLfixed)z 2296 ); 2297} 2298 2299/* void glSampleCoveragexOES ( GLclampx value, GLboolean invert ) */ 2300static void 2301android_glSampleCoveragexOES__IZ 2302 (JNIEnv *_env, jobject _this, jint value, jboolean invert) { 2303 glSampleCoveragexOES( 2304 (GLclampx)value, 2305 (GLboolean)invert 2306 ); 2307} 2308 2309/* void glScalexOES ( GLfixed x, GLfixed y, GLfixed z ) */ 2310static void 2311android_glScalexOES__III 2312 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) { 2313 glScalexOES( 2314 (GLfixed)x, 2315 (GLfixed)y, 2316 (GLfixed)z 2317 ); 2318} 2319 2320/* void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param ) */ 2321static void 2322android_glTexEnvxOES__III 2323 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { 2324 glTexEnvxOES( 2325 (GLenum)target, 2326 (GLenum)pname, 2327 (GLfixed)param 2328 ); 2329} 2330 2331/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ 2332static void 2333android_glTexEnvxvOES__II_3II 2334 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 2335 jint _exception = 0; 2336 const char * _exceptionType = NULL; 2337 const char * _exceptionMessage = NULL; 2338 GLfixed *params_base = (GLfixed *) 0; 2339 jint _remaining; 2340 GLfixed *params = (GLfixed *) 0; 2341 2342 if (!params_ref) { 2343 _exception = 1; 2344 _exceptionType = "java/lang/IllegalArgumentException"; 2345 _exceptionMessage = "params == null"; 2346 goto exit; 2347 } 2348 if (offset < 0) { 2349 _exception = 1; 2350 _exceptionType = "java/lang/IllegalArgumentException"; 2351 _exceptionMessage = "offset < 0"; 2352 goto exit; 2353 } 2354 _remaining = _env->GetArrayLength(params_ref) - offset; 2355 params_base = (GLfixed *) 2356 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2357 params = params_base + offset; 2358 2359 glTexEnvxvOES( 2360 (GLenum)target, 2361 (GLenum)pname, 2362 (GLfixed *)params 2363 ); 2364 2365exit: 2366 if (params_base) { 2367 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2368 JNI_ABORT); 2369 } 2370 if (_exception) { 2371 jniThrowException(_env, _exceptionType, _exceptionMessage); 2372 } 2373} 2374 2375/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ 2376static void 2377android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 2378 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 2379 jint _exception = 0; 2380 const char * _exceptionType = NULL; 2381 const char * _exceptionMessage = NULL; 2382 jintArray _array = (jintArray) 0; 2383 jint _bufferOffset = (jint) 0; 2384 jint _remaining; 2385 GLfixed *params = (GLfixed *) 0; 2386 2387 if (!params_buf) { 2388 _exception = 1; 2389 _exceptionType = "java/lang/IllegalArgumentException"; 2390 _exceptionMessage = "params == null"; 2391 goto exit; 2392 } 2393 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2394 if (params == NULL) { 2395 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2396 params = (GLfixed *) (_paramsBase + _bufferOffset); 2397 } 2398 glTexEnvxvOES( 2399 (GLenum)target, 2400 (GLenum)pname, 2401 (GLfixed *)params 2402 ); 2403 2404exit: 2405 if (_array) { 2406 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 2407 } 2408 if (_exception) { 2409 jniThrowException(_env, _exceptionType, _exceptionMessage); 2410 } 2411} 2412 2413/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */ 2414static void 2415android_glTexParameterxOES__III 2416 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { 2417 glTexParameterxOES( 2418 (GLenum)target, 2419 (GLenum)pname, 2420 (GLfixed)param 2421 ); 2422} 2423 2424/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ 2425static void 2426android_glTexParameterxvOES__II_3II 2427 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 2428 jint _exception = 0; 2429 const char * _exceptionType = NULL; 2430 const char * _exceptionMessage = NULL; 2431 GLfixed *params_base = (GLfixed *) 0; 2432 jint _remaining; 2433 GLfixed *params = (GLfixed *) 0; 2434 2435 if (!params_ref) { 2436 _exception = 1; 2437 _exceptionType = "java/lang/IllegalArgumentException"; 2438 _exceptionMessage = "params == null"; 2439 goto exit; 2440 } 2441 if (offset < 0) { 2442 _exception = 1; 2443 _exceptionType = "java/lang/IllegalArgumentException"; 2444 _exceptionMessage = "offset < 0"; 2445 goto exit; 2446 } 2447 _remaining = _env->GetArrayLength(params_ref) - offset; 2448 params_base = (GLfixed *) 2449 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2450 params = params_base + offset; 2451 2452 glTexParameterxvOES( 2453 (GLenum)target, 2454 (GLenum)pname, 2455 (GLfixed *)params 2456 ); 2457 2458exit: 2459 if (params_base) { 2460 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2461 JNI_ABORT); 2462 } 2463 if (_exception) { 2464 jniThrowException(_env, _exceptionType, _exceptionMessage); 2465 } 2466} 2467 2468/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ 2469static void 2470android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 2471 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 2472 jint _exception = 0; 2473 const char * _exceptionType = NULL; 2474 const char * _exceptionMessage = NULL; 2475 jintArray _array = (jintArray) 0; 2476 jint _bufferOffset = (jint) 0; 2477 jint _remaining; 2478 GLfixed *params = (GLfixed *) 0; 2479 2480 if (!params_buf) { 2481 _exception = 1; 2482 _exceptionType = "java/lang/IllegalArgumentException"; 2483 _exceptionMessage = "params == null"; 2484 goto exit; 2485 } 2486 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2487 if (params == NULL) { 2488 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2489 params = (GLfixed *) (_paramsBase + _bufferOffset); 2490 } 2491 glTexParameterxvOES( 2492 (GLenum)target, 2493 (GLenum)pname, 2494 (GLfixed *)params 2495 ); 2496 2497exit: 2498 if (_array) { 2499 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 2500 } 2501 if (_exception) { 2502 jniThrowException(_env, _exceptionType, _exceptionMessage); 2503 } 2504} 2505 2506/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */ 2507static void 2508android_glTranslatexOES__III 2509 (JNIEnv *_env, jobject _this, jint x, jint y, jint z) { 2510 glTranslatexOES( 2511 (GLfixed)x, 2512 (GLfixed)y, 2513 (GLfixed)z 2514 ); 2515} 2516 2517/* GLboolean glIsRenderbufferOES ( GLuint renderbuffer ) */ 2518static jboolean 2519android_glIsRenderbufferOES__I 2520 (JNIEnv *_env, jobject _this, jint renderbuffer) { 2521 GLboolean _returnValue; 2522 _returnValue = glIsRenderbufferOES( 2523 (GLuint)renderbuffer 2524 ); 2525 return (jboolean)_returnValue; 2526} 2527 2528/* void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer ) */ 2529static void 2530android_glBindRenderbufferOES__II 2531 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) { 2532 glBindRenderbufferOES( 2533 (GLenum)target, 2534 (GLuint)renderbuffer 2535 ); 2536} 2537 2538/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */ 2539static void 2540android_glDeleteRenderbuffersOES__I_3II 2541 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { 2542 jint _exception = 0; 2543 const char * _exceptionType = NULL; 2544 const char * _exceptionMessage = NULL; 2545 GLuint *renderbuffers_base = (GLuint *) 0; 2546 jint _remaining; 2547 GLuint *renderbuffers = (GLuint *) 0; 2548 2549 if (!renderbuffers_ref) { 2550 _exception = 1; 2551 _exceptionType = "java/lang/IllegalArgumentException"; 2552 _exceptionMessage = "renderbuffers == null"; 2553 goto exit; 2554 } 2555 if (offset < 0) { 2556 _exception = 1; 2557 _exceptionType = "java/lang/IllegalArgumentException"; 2558 _exceptionMessage = "offset < 0"; 2559 goto exit; 2560 } 2561 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; 2562 if (_remaining < n) { 2563 _exception = 1; 2564 _exceptionType = "java/lang/IllegalArgumentException"; 2565 _exceptionMessage = "length - offset < n < needed"; 2566 goto exit; 2567 } 2568 renderbuffers_base = (GLuint *) 2569 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0); 2570 renderbuffers = renderbuffers_base + offset; 2571 2572 glDeleteRenderbuffersOES( 2573 (GLsizei)n, 2574 (GLuint *)renderbuffers 2575 ); 2576 2577exit: 2578 if (renderbuffers_base) { 2579 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base, 2580 JNI_ABORT); 2581 } 2582 if (_exception) { 2583 jniThrowException(_env, _exceptionType, _exceptionMessage); 2584 } 2585} 2586 2587/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */ 2588static void 2589android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 2590 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { 2591 jint _exception = 0; 2592 const char * _exceptionType = NULL; 2593 const char * _exceptionMessage = NULL; 2594 jintArray _array = (jintArray) 0; 2595 jint _bufferOffset = (jint) 0; 2596 jint _remaining; 2597 GLuint *renderbuffers = (GLuint *) 0; 2598 2599 if (!renderbuffers_buf) { 2600 _exception = 1; 2601 _exceptionType = "java/lang/IllegalArgumentException"; 2602 _exceptionMessage = "renderbuffers == null"; 2603 goto exit; 2604 } 2605 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2606 if (_remaining < n) { 2607 _exception = 1; 2608 _exceptionType = "java/lang/IllegalArgumentException"; 2609 _exceptionMessage = "remaining() < n < needed"; 2610 goto exit; 2611 } 2612 if (renderbuffers == NULL) { 2613 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2614 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset); 2615 } 2616 glDeleteRenderbuffersOES( 2617 (GLsizei)n, 2618 (GLuint *)renderbuffers 2619 ); 2620 2621exit: 2622 if (_array) { 2623 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, JNI_ABORT); 2624 } 2625 if (_exception) { 2626 jniThrowException(_env, _exceptionType, _exceptionMessage); 2627 } 2628} 2629 2630/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */ 2631static void 2632android_glGenRenderbuffersOES__I_3II 2633 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { 2634 jint _exception = 0; 2635 const char * _exceptionType = NULL; 2636 const char * _exceptionMessage = NULL; 2637 GLuint *renderbuffers_base = (GLuint *) 0; 2638 jint _remaining; 2639 GLuint *renderbuffers = (GLuint *) 0; 2640 2641 if (!renderbuffers_ref) { 2642 _exception = 1; 2643 _exceptionType = "java/lang/IllegalArgumentException"; 2644 _exceptionMessage = "renderbuffers == null"; 2645 goto exit; 2646 } 2647 if (offset < 0) { 2648 _exception = 1; 2649 _exceptionType = "java/lang/IllegalArgumentException"; 2650 _exceptionMessage = "offset < 0"; 2651 goto exit; 2652 } 2653 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; 2654 if (_remaining < n) { 2655 _exception = 1; 2656 _exceptionType = "java/lang/IllegalArgumentException"; 2657 _exceptionMessage = "length - offset < n < needed"; 2658 goto exit; 2659 } 2660 renderbuffers_base = (GLuint *) 2661 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0); 2662 renderbuffers = renderbuffers_base + offset; 2663 2664 glGenRenderbuffersOES( 2665 (GLsizei)n, 2666 (GLuint *)renderbuffers 2667 ); 2668 2669exit: 2670 if (renderbuffers_base) { 2671 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base, 2672 _exception ? JNI_ABORT: 0); 2673 } 2674 if (_exception) { 2675 jniThrowException(_env, _exceptionType, _exceptionMessage); 2676 } 2677} 2678 2679/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */ 2680static void 2681android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 2682 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { 2683 jint _exception = 0; 2684 const char * _exceptionType = NULL; 2685 const char * _exceptionMessage = NULL; 2686 jintArray _array = (jintArray) 0; 2687 jint _bufferOffset = (jint) 0; 2688 jint _remaining; 2689 GLuint *renderbuffers = (GLuint *) 0; 2690 2691 if (!renderbuffers_buf) { 2692 _exception = 1; 2693 _exceptionType = "java/lang/IllegalArgumentException"; 2694 _exceptionMessage = "renderbuffers == null"; 2695 goto exit; 2696 } 2697 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2698 if (_remaining < n) { 2699 _exception = 1; 2700 _exceptionType = "java/lang/IllegalArgumentException"; 2701 _exceptionMessage = "remaining() < n < needed"; 2702 goto exit; 2703 } 2704 if (renderbuffers == NULL) { 2705 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2706 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset); 2707 } 2708 glGenRenderbuffersOES( 2709 (GLsizei)n, 2710 (GLuint *)renderbuffers 2711 ); 2712 2713exit: 2714 if (_array) { 2715 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0); 2716 } 2717 if (_exception) { 2718 jniThrowException(_env, _exceptionType, _exceptionMessage); 2719 } 2720} 2721 2722/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */ 2723static void 2724android_glRenderbufferStorageOES__IIII 2725 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) { 2726 glRenderbufferStorageOES( 2727 (GLenum)target, 2728 (GLenum)internalformat, 2729 (GLsizei)width, 2730 (GLsizei)height 2731 ); 2732} 2733 2734/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */ 2735static void 2736android_glGetRenderbufferParameterivOES__II_3II 2737 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 2738 jint _exception = 0; 2739 const char * _exceptionType = NULL; 2740 const char * _exceptionMessage = NULL; 2741 GLint *params_base = (GLint *) 0; 2742 jint _remaining; 2743 GLint *params = (GLint *) 0; 2744 2745 if (!params_ref) { 2746 _exception = 1; 2747 _exceptionType = "java/lang/IllegalArgumentException"; 2748 _exceptionMessage = "params == null"; 2749 goto exit; 2750 } 2751 if (offset < 0) { 2752 _exception = 1; 2753 _exceptionType = "java/lang/IllegalArgumentException"; 2754 _exceptionMessage = "offset < 0"; 2755 goto exit; 2756 } 2757 _remaining = _env->GetArrayLength(params_ref) - offset; 2758 if (_remaining < 1) { 2759 _exception = 1; 2760 _exceptionType = "java/lang/IllegalArgumentException"; 2761 _exceptionMessage = "length - offset < 1 < needed"; 2762 goto exit; 2763 } 2764 params_base = (GLint *) 2765 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2766 params = params_base + offset; 2767 2768 glGetRenderbufferParameterivOES( 2769 (GLenum)target, 2770 (GLenum)pname, 2771 (GLint *)params 2772 ); 2773 2774exit: 2775 if (params_base) { 2776 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2777 _exception ? JNI_ABORT: 0); 2778 } 2779 if (_exception) { 2780 jniThrowException(_env, _exceptionType, _exceptionMessage); 2781 } 2782} 2783 2784/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */ 2785static void 2786android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 2787 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 2788 jint _exception = 0; 2789 const char * _exceptionType = NULL; 2790 const char * _exceptionMessage = NULL; 2791 jintArray _array = (jintArray) 0; 2792 jint _bufferOffset = (jint) 0; 2793 jint _remaining; 2794 GLint *params = (GLint *) 0; 2795 2796 if (!params_buf) { 2797 _exception = 1; 2798 _exceptionType = "java/lang/IllegalArgumentException"; 2799 _exceptionMessage = "params == null"; 2800 goto exit; 2801 } 2802 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2803 if (_remaining < 1) { 2804 _exception = 1; 2805 _exceptionType = "java/lang/IllegalArgumentException"; 2806 _exceptionMessage = "remaining() < 1 < needed"; 2807 goto exit; 2808 } 2809 if (params == NULL) { 2810 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2811 params = (GLint *) (_paramsBase + _bufferOffset); 2812 } 2813 glGetRenderbufferParameterivOES( 2814 (GLenum)target, 2815 (GLenum)pname, 2816 (GLint *)params 2817 ); 2818 2819exit: 2820 if (_array) { 2821 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 2822 } 2823 if (_exception) { 2824 jniThrowException(_env, _exceptionType, _exceptionMessage); 2825 } 2826} 2827 2828/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */ 2829static jboolean 2830android_glIsFramebufferOES__I 2831 (JNIEnv *_env, jobject _this, jint framebuffer) { 2832 GLboolean _returnValue; 2833 _returnValue = glIsFramebufferOES( 2834 (GLuint)framebuffer 2835 ); 2836 return (jboolean)_returnValue; 2837} 2838 2839/* void glBindFramebufferOES ( GLenum target, GLuint framebuffer ) */ 2840static void 2841android_glBindFramebufferOES__II 2842 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) { 2843 glBindFramebufferOES( 2844 (GLenum)target, 2845 (GLuint)framebuffer 2846 ); 2847} 2848 2849/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */ 2850static void 2851android_glDeleteFramebuffersOES__I_3II 2852 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { 2853 jint _exception = 0; 2854 const char * _exceptionType = NULL; 2855 const char * _exceptionMessage = NULL; 2856 GLuint *framebuffers_base = (GLuint *) 0; 2857 jint _remaining; 2858 GLuint *framebuffers = (GLuint *) 0; 2859 2860 if (!framebuffers_ref) { 2861 _exception = 1; 2862 _exceptionType = "java/lang/IllegalArgumentException"; 2863 _exceptionMessage = "framebuffers == null"; 2864 goto exit; 2865 } 2866 if (offset < 0) { 2867 _exception = 1; 2868 _exceptionType = "java/lang/IllegalArgumentException"; 2869 _exceptionMessage = "offset < 0"; 2870 goto exit; 2871 } 2872 _remaining = _env->GetArrayLength(framebuffers_ref) - offset; 2873 if (_remaining < n) { 2874 _exception = 1; 2875 _exceptionType = "java/lang/IllegalArgumentException"; 2876 _exceptionMessage = "length - offset < n < needed"; 2877 goto exit; 2878 } 2879 framebuffers_base = (GLuint *) 2880 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0); 2881 framebuffers = framebuffers_base + offset; 2882 2883 glDeleteFramebuffersOES( 2884 (GLsizei)n, 2885 (GLuint *)framebuffers 2886 ); 2887 2888exit: 2889 if (framebuffers_base) { 2890 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base, 2891 JNI_ABORT); 2892 } 2893 if (_exception) { 2894 jniThrowException(_env, _exceptionType, _exceptionMessage); 2895 } 2896} 2897 2898/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */ 2899static void 2900android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 2901 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { 2902 jint _exception = 0; 2903 const char * _exceptionType = NULL; 2904 const char * _exceptionMessage = NULL; 2905 jintArray _array = (jintArray) 0; 2906 jint _bufferOffset = (jint) 0; 2907 jint _remaining; 2908 GLuint *framebuffers = (GLuint *) 0; 2909 2910 if (!framebuffers_buf) { 2911 _exception = 1; 2912 _exceptionType = "java/lang/IllegalArgumentException"; 2913 _exceptionMessage = "framebuffers == null"; 2914 goto exit; 2915 } 2916 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2917 if (_remaining < n) { 2918 _exception = 1; 2919 _exceptionType = "java/lang/IllegalArgumentException"; 2920 _exceptionMessage = "remaining() < n < needed"; 2921 goto exit; 2922 } 2923 if (framebuffers == NULL) { 2924 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2925 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset); 2926 } 2927 glDeleteFramebuffersOES( 2928 (GLsizei)n, 2929 (GLuint *)framebuffers 2930 ); 2931 2932exit: 2933 if (_array) { 2934 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, JNI_ABORT); 2935 } 2936 if (_exception) { 2937 jniThrowException(_env, _exceptionType, _exceptionMessage); 2938 } 2939} 2940 2941/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */ 2942static void 2943android_glGenFramebuffersOES__I_3II 2944 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { 2945 jint _exception = 0; 2946 const char * _exceptionType = NULL; 2947 const char * _exceptionMessage = NULL; 2948 GLuint *framebuffers_base = (GLuint *) 0; 2949 jint _remaining; 2950 GLuint *framebuffers = (GLuint *) 0; 2951 2952 if (!framebuffers_ref) { 2953 _exception = 1; 2954 _exceptionType = "java/lang/IllegalArgumentException"; 2955 _exceptionMessage = "framebuffers == null"; 2956 goto exit; 2957 } 2958 if (offset < 0) { 2959 _exception = 1; 2960 _exceptionType = "java/lang/IllegalArgumentException"; 2961 _exceptionMessage = "offset < 0"; 2962 goto exit; 2963 } 2964 _remaining = _env->GetArrayLength(framebuffers_ref) - offset; 2965 if (_remaining < n) { 2966 _exception = 1; 2967 _exceptionType = "java/lang/IllegalArgumentException"; 2968 _exceptionMessage = "length - offset < n < needed"; 2969 goto exit; 2970 } 2971 framebuffers_base = (GLuint *) 2972 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0); 2973 framebuffers = framebuffers_base + offset; 2974 2975 glGenFramebuffersOES( 2976 (GLsizei)n, 2977 (GLuint *)framebuffers 2978 ); 2979 2980exit: 2981 if (framebuffers_base) { 2982 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base, 2983 _exception ? JNI_ABORT: 0); 2984 } 2985 if (_exception) { 2986 jniThrowException(_env, _exceptionType, _exceptionMessage); 2987 } 2988} 2989 2990/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */ 2991static void 2992android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 2993 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { 2994 jint _exception = 0; 2995 const char * _exceptionType = NULL; 2996 const char * _exceptionMessage = NULL; 2997 jintArray _array = (jintArray) 0; 2998 jint _bufferOffset = (jint) 0; 2999 jint _remaining; 3000 GLuint *framebuffers = (GLuint *) 0; 3001 3002 if (!framebuffers_buf) { 3003 _exception = 1; 3004 _exceptionType = "java/lang/IllegalArgumentException"; 3005 _exceptionMessage = "framebuffers == null"; 3006 goto exit; 3007 } 3008 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3009 if (_remaining < n) { 3010 _exception = 1; 3011 _exceptionType = "java/lang/IllegalArgumentException"; 3012 _exceptionMessage = "remaining() < n < needed"; 3013 goto exit; 3014 } 3015 if (framebuffers == NULL) { 3016 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3017 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset); 3018 } 3019 glGenFramebuffersOES( 3020 (GLsizei)n, 3021 (GLuint *)framebuffers 3022 ); 3023 3024exit: 3025 if (_array) { 3026 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0); 3027 } 3028 if (_exception) { 3029 jniThrowException(_env, _exceptionType, _exceptionMessage); 3030 } 3031} 3032 3033/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */ 3034static jint 3035android_glCheckFramebufferStatusOES__I 3036 (JNIEnv *_env, jobject _this, jint target) { 3037 GLenum _returnValue; 3038 _returnValue = glCheckFramebufferStatusOES( 3039 (GLenum)target 3040 ); 3041 return (jint)_returnValue; 3042} 3043 3044/* void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */ 3045static void 3046android_glFramebufferRenderbufferOES__IIII 3047 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { 3048 glFramebufferRenderbufferOES( 3049 (GLenum)target, 3050 (GLenum)attachment, 3051 (GLenum)renderbuffertarget, 3052 (GLuint)renderbuffer 3053 ); 3054} 3055 3056/* void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */ 3057static void 3058android_glFramebufferTexture2DOES__IIIII 3059 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) { 3060 glFramebufferTexture2DOES( 3061 (GLenum)target, 3062 (GLenum)attachment, 3063 (GLenum)textarget, 3064 (GLuint)texture, 3065 (GLint)level 3066 ); 3067} 3068 3069/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ 3070static void 3071android_glGetFramebufferAttachmentParameterivOES__III_3II 3072 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) { 3073 jint _exception = 0; 3074 const char * _exceptionType = NULL; 3075 const char * _exceptionMessage = NULL; 3076 GLint *params_base = (GLint *) 0; 3077 jint _remaining; 3078 GLint *params = (GLint *) 0; 3079 3080 if (!params_ref) { 3081 _exception = 1; 3082 _exceptionType = "java/lang/IllegalArgumentException"; 3083 _exceptionMessage = "params == null"; 3084 goto exit; 3085 } 3086 if (offset < 0) { 3087 _exception = 1; 3088 _exceptionType = "java/lang/IllegalArgumentException"; 3089 _exceptionMessage = "offset < 0"; 3090 goto exit; 3091 } 3092 _remaining = _env->GetArrayLength(params_ref) - offset; 3093 if (_remaining < 1) { 3094 _exception = 1; 3095 _exceptionType = "java/lang/IllegalArgumentException"; 3096 _exceptionMessage = "length - offset < 1 < needed"; 3097 goto exit; 3098 } 3099 params_base = (GLint *) 3100 _env->GetIntArrayElements(params_ref, (jboolean *)0); 3101 params = params_base + offset; 3102 3103 glGetFramebufferAttachmentParameterivOES( 3104 (GLenum)target, 3105 (GLenum)attachment, 3106 (GLenum)pname, 3107 (GLint *)params 3108 ); 3109 3110exit: 3111 if (params_base) { 3112 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 3113 _exception ? JNI_ABORT: 0); 3114 } 3115 if (_exception) { 3116 jniThrowException(_env, _exceptionType, _exceptionMessage); 3117 } 3118} 3119 3120/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ 3121static void 3122android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 3123 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) { 3124 jint _exception = 0; 3125 const char * _exceptionType = NULL; 3126 const char * _exceptionMessage = NULL; 3127 jintArray _array = (jintArray) 0; 3128 jint _bufferOffset = (jint) 0; 3129 jint _remaining; 3130 GLint *params = (GLint *) 0; 3131 3132 if (!params_buf) { 3133 _exception = 1; 3134 _exceptionType = "java/lang/IllegalArgumentException"; 3135 _exceptionMessage = "params == null"; 3136 goto exit; 3137 } 3138 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3139 if (_remaining < 1) { 3140 _exception = 1; 3141 _exceptionType = "java/lang/IllegalArgumentException"; 3142 _exceptionMessage = "remaining() < 1 < needed"; 3143 goto exit; 3144 } 3145 if (params == NULL) { 3146 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3147 params = (GLint *) (_paramsBase + _bufferOffset); 3148 } 3149 glGetFramebufferAttachmentParameterivOES( 3150 (GLenum)target, 3151 (GLenum)attachment, 3152 (GLenum)pname, 3153 (GLint *)params 3154 ); 3155 3156exit: 3157 if (_array) { 3158 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 3159 } 3160 if (_exception) { 3161 jniThrowException(_env, _exceptionType, _exceptionMessage); 3162 } 3163} 3164 3165/* void glGenerateMipmapOES ( GLenum target ) */ 3166static void 3167android_glGenerateMipmapOES__I 3168 (JNIEnv *_env, jobject _this, jint target) { 3169 glGenerateMipmapOES( 3170 (GLenum)target 3171 ); 3172} 3173 3174/* void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex ) */ 3175static void 3176android_glCurrentPaletteMatrixOES__I 3177 (JNIEnv *_env, jobject _this, jint matrixpaletteindex) { 3178 glCurrentPaletteMatrixOES( 3179 (GLuint)matrixpaletteindex 3180 ); 3181} 3182 3183/* void glLoadPaletteFromModelViewMatrixOES ( void ) */ 3184static void 3185android_glLoadPaletteFromModelViewMatrixOES__ 3186 (JNIEnv *_env, jobject _this) { 3187 glLoadPaletteFromModelViewMatrixOES(); 3188} 3189 3190/* void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ 3191static void 3192android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I 3193 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { 3194 jint _exception = 0; 3195 const char * _exceptionType = NULL; 3196 const char * _exceptionMessage = NULL; 3197 jarray _array = (jarray) 0; 3198 jint _bufferOffset = (jint) 0; 3199 jint _remaining; 3200 GLvoid *pointer = (GLvoid *) 0; 3201 3202 if (pointer_buf) { 3203 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); 3204 if ( ! pointer ) { 3205 return; 3206 } 3207 } 3208 glMatrixIndexPointerOESBounds( 3209 (GLint)size, 3210 (GLenum)type, 3211 (GLsizei)stride, 3212 (GLvoid *)pointer, 3213 (GLsizei)remaining 3214 ); 3215 if (_exception) { 3216 jniThrowException(_env, _exceptionType, _exceptionMessage); 3217 } 3218} 3219 3220/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ 3221static void 3222android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I 3223 (JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { 3224 jint _exception = 0; 3225 const char * _exceptionType = NULL; 3226 const char * _exceptionMessage = NULL; 3227 jarray _array = (jarray) 0; 3228 jint _bufferOffset = (jint) 0; 3229 jint _remaining; 3230 GLvoid *pointer = (GLvoid *) 0; 3231 3232 if (pointer_buf) { 3233 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); 3234 if ( ! pointer ) { 3235 return; 3236 } 3237 } 3238 glWeightPointerOESBounds( 3239 (GLint)size, 3240 (GLenum)type, 3241 (GLsizei)stride, 3242 (GLvoid *)pointer, 3243 (GLsizei)remaining 3244 ); 3245 if (_exception) { 3246 jniThrowException(_env, _exceptionType, _exceptionMessage); 3247 } 3248} 3249 3250/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */ 3251static void 3252android_glDepthRangefOES__FF 3253 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) { 3254 glDepthRangefOES( 3255 (GLclampf)zNear, 3256 (GLclampf)zFar 3257 ); 3258} 3259 3260/* void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */ 3261static void 3262android_glFrustumfOES__FFFFFF 3263 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) { 3264 glFrustumfOES( 3265 (GLfloat)left, 3266 (GLfloat)right, 3267 (GLfloat)bottom, 3268 (GLfloat)top, 3269 (GLfloat)zNear, 3270 (GLfloat)zFar 3271 ); 3272} 3273 3274/* void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */ 3275static void 3276android_glOrthofOES__FFFFFF 3277 (JNIEnv *_env, jobject _this, jfloat left, jfloat right, jfloat bottom, jfloat top, jfloat zNear, jfloat zFar) { 3278 glOrthofOES( 3279 (GLfloat)left, 3280 (GLfloat)right, 3281 (GLfloat)bottom, 3282 (GLfloat)top, 3283 (GLfloat)zNear, 3284 (GLfloat)zFar 3285 ); 3286} 3287 3288/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */ 3289static void 3290android_glClipPlanefOES__I_3FI 3291 (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) { 3292 jint _exception = 0; 3293 const char * _exceptionType = NULL; 3294 const char * _exceptionMessage = NULL; 3295 GLfloat *equation_base = (GLfloat *) 0; 3296 jint _remaining; 3297 GLfloat *equation = (GLfloat *) 0; 3298 3299 if (!equation_ref) { 3300 _exception = 1; 3301 _exceptionType = "java/lang/IllegalArgumentException"; 3302 _exceptionMessage = "equation == null"; 3303 goto exit; 3304 } 3305 if (offset < 0) { 3306 _exception = 1; 3307 _exceptionType = "java/lang/IllegalArgumentException"; 3308 _exceptionMessage = "offset < 0"; 3309 goto exit; 3310 } 3311 _remaining = _env->GetArrayLength(equation_ref) - offset; 3312 equation_base = (GLfloat *) 3313 _env->GetFloatArrayElements(equation_ref, (jboolean *)0); 3314 equation = equation_base + offset; 3315 3316 glClipPlanefOES( 3317 (GLenum)plane, 3318 (GLfloat *)equation 3319 ); 3320 3321exit: 3322 if (equation_base) { 3323 _env->ReleaseFloatArrayElements(equation_ref, (jfloat*)equation_base, 3324 JNI_ABORT); 3325 } 3326 if (_exception) { 3327 jniThrowException(_env, _exceptionType, _exceptionMessage); 3328 } 3329} 3330 3331/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */ 3332static void 3333android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 3334 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { 3335 jint _exception = 0; 3336 const char * _exceptionType = NULL; 3337 const char * _exceptionMessage = NULL; 3338 jfloatArray _array = (jfloatArray) 0; 3339 jint _bufferOffset = (jint) 0; 3340 jint _remaining; 3341 GLfloat *equation = (GLfloat *) 0; 3342 3343 if (!equation_buf) { 3344 _exception = 1; 3345 _exceptionType = "java/lang/IllegalArgumentException"; 3346 _exceptionMessage = "equation == null"; 3347 goto exit; 3348 } 3349 equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3350 if (equation == NULL) { 3351 char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 3352 equation = (GLfloat *) (_equationBase + _bufferOffset); 3353 } 3354 glClipPlanefOES( 3355 (GLenum)plane, 3356 (GLfloat *)equation 3357 ); 3358 3359exit: 3360 if (_array) { 3361 _env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT); 3362 } 3363 if (_exception) { 3364 jniThrowException(_env, _exceptionType, _exceptionMessage); 3365 } 3366} 3367 3368/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */ 3369static void 3370android_glGetClipPlanefOES__I_3FI 3371 (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) { 3372 jint _exception = 0; 3373 const char * _exceptionType = NULL; 3374 const char * _exceptionMessage = NULL; 3375 GLfloat *eqn_base = (GLfloat *) 0; 3376 jint _remaining; 3377 GLfloat *eqn = (GLfloat *) 0; 3378 3379 if (!eqn_ref) { 3380 _exception = 1; 3381 _exceptionType = "java/lang/IllegalArgumentException"; 3382 _exceptionMessage = "eqn == null"; 3383 goto exit; 3384 } 3385 if (offset < 0) { 3386 _exception = 1; 3387 _exceptionType = "java/lang/IllegalArgumentException"; 3388 _exceptionMessage = "offset < 0"; 3389 goto exit; 3390 } 3391 _remaining = _env->GetArrayLength(eqn_ref) - offset; 3392 if (_remaining < 4) { 3393 _exception = 1; 3394 _exceptionType = "java/lang/IllegalArgumentException"; 3395 _exceptionMessage = "length - offset < 4 < needed"; 3396 goto exit; 3397 } 3398 eqn_base = (GLfloat *) 3399 _env->GetFloatArrayElements(eqn_ref, (jboolean *)0); 3400 eqn = eqn_base + offset; 3401 3402 glGetClipPlanefOES( 3403 (GLenum)pname, 3404 (GLfloat *)eqn 3405 ); 3406 3407exit: 3408 if (eqn_base) { 3409 _env->ReleaseFloatArrayElements(eqn_ref, (jfloat*)eqn_base, 3410 _exception ? JNI_ABORT: 0); 3411 } 3412 if (_exception) { 3413 jniThrowException(_env, _exceptionType, _exceptionMessage); 3414 } 3415} 3416 3417/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */ 3418static void 3419android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 3420 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { 3421 jint _exception = 0; 3422 const char * _exceptionType = NULL; 3423 const char * _exceptionMessage = NULL; 3424 jfloatArray _array = (jfloatArray) 0; 3425 jint _bufferOffset = (jint) 0; 3426 jint _remaining; 3427 GLfloat *eqn = (GLfloat *) 0; 3428 3429 if (!eqn_buf) { 3430 _exception = 1; 3431 _exceptionType = "java/lang/IllegalArgumentException"; 3432 _exceptionMessage = "eqn == null"; 3433 goto exit; 3434 } 3435 eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3436 if (_remaining < 4) { 3437 _exception = 1; 3438 _exceptionType = "java/lang/IllegalArgumentException"; 3439 _exceptionMessage = "remaining() < 4 < needed"; 3440 goto exit; 3441 } 3442 if (eqn == NULL) { 3443 char * _eqnBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 3444 eqn = (GLfloat *) (_eqnBase + _bufferOffset); 3445 } 3446 glGetClipPlanefOES( 3447 (GLenum)pname, 3448 (GLfloat *)eqn 3449 ); 3450 3451exit: 3452 if (_array) { 3453 _env->ReleaseFloatArrayElements(_array, (jfloat*)eqn, _exception ? JNI_ABORT : 0); 3454 } 3455 if (_exception) { 3456 jniThrowException(_env, _exceptionType, _exceptionMessage); 3457 } 3458} 3459 3460/* void glClearDepthfOES ( GLclampf depth ) */ 3461static void 3462android_glClearDepthfOES__F 3463 (JNIEnv *_env, jobject _this, jfloat depth) { 3464 glClearDepthfOES( 3465 (GLclampf)depth 3466 ); 3467} 3468 3469/* void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param ) */ 3470static void 3471android_glTexGenfOES__IIF 3472 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloat param) { 3473 glTexGenfOES( 3474 (GLenum)coord, 3475 (GLenum)pname, 3476 (GLfloat)param 3477 ); 3478} 3479 3480/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */ 3481static void 3482android_glTexGenfvOES__II_3FI 3483 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) { 3484 jint _exception = 0; 3485 const char * _exceptionType = NULL; 3486 const char * _exceptionMessage = NULL; 3487 GLfloat *params_base = (GLfloat *) 0; 3488 jint _remaining; 3489 GLfloat *params = (GLfloat *) 0; 3490 3491 if (!params_ref) { 3492 _exception = 1; 3493 _exceptionType = "java/lang/IllegalArgumentException"; 3494 _exceptionMessage = "params == null"; 3495 goto exit; 3496 } 3497 if (offset < 0) { 3498 _exception = 1; 3499 _exceptionType = "java/lang/IllegalArgumentException"; 3500 _exceptionMessage = "offset < 0"; 3501 goto exit; 3502 } 3503 _remaining = _env->GetArrayLength(params_ref) - offset; 3504 params_base = (GLfloat *) 3505 _env->GetFloatArrayElements(params_ref, (jboolean *)0); 3506 params = params_base + offset; 3507 3508 glTexGenfvOES( 3509 (GLenum)coord, 3510 (GLenum)pname, 3511 (GLfloat *)params 3512 ); 3513 3514exit: 3515 if (params_base) { 3516 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base, 3517 JNI_ABORT); 3518 } 3519 if (_exception) { 3520 jniThrowException(_env, _exceptionType, _exceptionMessage); 3521 } 3522} 3523 3524/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */ 3525static void 3526android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 3527 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { 3528 jint _exception = 0; 3529 const char * _exceptionType = NULL; 3530 const char * _exceptionMessage = NULL; 3531 jfloatArray _array = (jfloatArray) 0; 3532 jint _bufferOffset = (jint) 0; 3533 jint _remaining; 3534 GLfloat *params = (GLfloat *) 0; 3535 3536 if (!params_buf) { 3537 _exception = 1; 3538 _exceptionType = "java/lang/IllegalArgumentException"; 3539 _exceptionMessage = "params == null"; 3540 goto exit; 3541 } 3542 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3543 if (params == NULL) { 3544 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 3545 params = (GLfloat *) (_paramsBase + _bufferOffset); 3546 } 3547 glTexGenfvOES( 3548 (GLenum)coord, 3549 (GLenum)pname, 3550 (GLfloat *)params 3551 ); 3552 3553exit: 3554 if (_array) { 3555 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT); 3556 } 3557 if (_exception) { 3558 jniThrowException(_env, _exceptionType, _exceptionMessage); 3559 } 3560} 3561 3562/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */ 3563static void 3564android_glTexGeniOES__III 3565 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) { 3566 glTexGeniOES( 3567 (GLenum)coord, 3568 (GLenum)pname, 3569 (GLint)param 3570 ); 3571} 3572 3573/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */ 3574static void 3575android_glTexGenivOES__II_3II 3576 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { 3577 jint _exception = 0; 3578 const char * _exceptionType = NULL; 3579 const char * _exceptionMessage = NULL; 3580 GLint *params_base = (GLint *) 0; 3581 jint _remaining; 3582 GLint *params = (GLint *) 0; 3583 3584 if (!params_ref) { 3585 _exception = 1; 3586 _exceptionType = "java/lang/IllegalArgumentException"; 3587 _exceptionMessage = "params == null"; 3588 goto exit; 3589 } 3590 if (offset < 0) { 3591 _exception = 1; 3592 _exceptionType = "java/lang/IllegalArgumentException"; 3593 _exceptionMessage = "offset < 0"; 3594 goto exit; 3595 } 3596 _remaining = _env->GetArrayLength(params_ref) - offset; 3597 params_base = (GLint *) 3598 _env->GetIntArrayElements(params_ref, (jboolean *)0); 3599 params = params_base + offset; 3600 3601 glTexGenivOES( 3602 (GLenum)coord, 3603 (GLenum)pname, 3604 (GLint *)params 3605 ); 3606 3607exit: 3608 if (params_base) { 3609 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 3610 JNI_ABORT); 3611 } 3612 if (_exception) { 3613 jniThrowException(_env, _exceptionType, _exceptionMessage); 3614 } 3615} 3616 3617/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */ 3618static void 3619android_glTexGenivOES__IILjava_nio_IntBuffer_2 3620 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { 3621 jint _exception = 0; 3622 const char * _exceptionType = NULL; 3623 const char * _exceptionMessage = NULL; 3624 jintArray _array = (jintArray) 0; 3625 jint _bufferOffset = (jint) 0; 3626 jint _remaining; 3627 GLint *params = (GLint *) 0; 3628 3629 if (!params_buf) { 3630 _exception = 1; 3631 _exceptionType = "java/lang/IllegalArgumentException"; 3632 _exceptionMessage = "params == null"; 3633 goto exit; 3634 } 3635 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3636 if (params == NULL) { 3637 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3638 params = (GLint *) (_paramsBase + _bufferOffset); 3639 } 3640 glTexGenivOES( 3641 (GLenum)coord, 3642 (GLenum)pname, 3643 (GLint *)params 3644 ); 3645 3646exit: 3647 if (_array) { 3648 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 3649 } 3650 if (_exception) { 3651 jniThrowException(_env, _exceptionType, _exceptionMessage); 3652 } 3653} 3654 3655/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */ 3656static void 3657android_glTexGenxOES__III 3658 (JNIEnv *_env, jobject _this, jint coord, jint pname, jint param) { 3659 glTexGenxOES( 3660 (GLenum)coord, 3661 (GLenum)pname, 3662 (GLfixed)param 3663 ); 3664} 3665 3666/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */ 3667static void 3668android_glTexGenxvOES__II_3II 3669 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { 3670 jint _exception = 0; 3671 const char * _exceptionType = NULL; 3672 const char * _exceptionMessage = NULL; 3673 GLfixed *params_base = (GLfixed *) 0; 3674 jint _remaining; 3675 GLfixed *params = (GLfixed *) 0; 3676 3677 if (!params_ref) { 3678 _exception = 1; 3679 _exceptionType = "java/lang/IllegalArgumentException"; 3680 _exceptionMessage = "params == null"; 3681 goto exit; 3682 } 3683 if (offset < 0) { 3684 _exception = 1; 3685 _exceptionType = "java/lang/IllegalArgumentException"; 3686 _exceptionMessage = "offset < 0"; 3687 goto exit; 3688 } 3689 _remaining = _env->GetArrayLength(params_ref) - offset; 3690 params_base = (GLfixed *) 3691 _env->GetIntArrayElements(params_ref, (jboolean *)0); 3692 params = params_base + offset; 3693 3694 glTexGenxvOES( 3695 (GLenum)coord, 3696 (GLenum)pname, 3697 (GLfixed *)params 3698 ); 3699 3700exit: 3701 if (params_base) { 3702 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 3703 JNI_ABORT); 3704 } 3705 if (_exception) { 3706 jniThrowException(_env, _exceptionType, _exceptionMessage); 3707 } 3708} 3709 3710/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */ 3711static void 3712android_glTexGenxvOES__IILjava_nio_IntBuffer_2 3713 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { 3714 jint _exception = 0; 3715 const char * _exceptionType = NULL; 3716 const char * _exceptionMessage = NULL; 3717 jintArray _array = (jintArray) 0; 3718 jint _bufferOffset = (jint) 0; 3719 jint _remaining; 3720 GLfixed *params = (GLfixed *) 0; 3721 3722 if (!params_buf) { 3723 _exception = 1; 3724 _exceptionType = "java/lang/IllegalArgumentException"; 3725 _exceptionMessage = "params == null"; 3726 goto exit; 3727 } 3728 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3729 if (params == NULL) { 3730 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3731 params = (GLfixed *) (_paramsBase + _bufferOffset); 3732 } 3733 glTexGenxvOES( 3734 (GLenum)coord, 3735 (GLenum)pname, 3736 (GLfixed *)params 3737 ); 3738 3739exit: 3740 if (_array) { 3741 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); 3742 } 3743 if (_exception) { 3744 jniThrowException(_env, _exceptionType, _exceptionMessage); 3745 } 3746} 3747 3748/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */ 3749static void 3750android_glGetTexGenfvOES__II_3FI 3751 (JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) { 3752 jint _exception = 0; 3753 const char * _exceptionType = NULL; 3754 const char * _exceptionMessage = NULL; 3755 GLfloat *params_base = (GLfloat *) 0; 3756 jint _remaining; 3757 GLfloat *params = (GLfloat *) 0; 3758 3759 if (!params_ref) { 3760 _exception = 1; 3761 _exceptionType = "java/lang/IllegalArgumentException"; 3762 _exceptionMessage = "params == null"; 3763 goto exit; 3764 } 3765 if (offset < 0) { 3766 _exception = 1; 3767 _exceptionType = "java/lang/IllegalArgumentException"; 3768 _exceptionMessage = "offset < 0"; 3769 goto exit; 3770 } 3771 _remaining = _env->GetArrayLength(params_ref) - offset; 3772 params_base = (GLfloat *) 3773 _env->GetFloatArrayElements(params_ref, (jboolean *)0); 3774 params = params_base + offset; 3775 3776 glGetTexGenfvOES( 3777 (GLenum)coord, 3778 (GLenum)pname, 3779 (GLfloat *)params 3780 ); 3781 3782exit: 3783 if (params_base) { 3784 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base, 3785 _exception ? JNI_ABORT: 0); 3786 } 3787 if (_exception) { 3788 jniThrowException(_env, _exceptionType, _exceptionMessage); 3789 } 3790} 3791 3792/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */ 3793static void 3794android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 3795 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { 3796 jint _exception = 0; 3797 const char * _exceptionType = NULL; 3798 const char * _exceptionMessage = NULL; 3799 jfloatArray _array = (jfloatArray) 0; 3800 jint _bufferOffset = (jint) 0; 3801 jint _remaining; 3802 GLfloat *params = (GLfloat *) 0; 3803 3804 if (!params_buf) { 3805 _exception = 1; 3806 _exceptionType = "java/lang/IllegalArgumentException"; 3807 _exceptionMessage = "params == null"; 3808 goto exit; 3809 } 3810 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3811 if (params == NULL) { 3812 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 3813 params = (GLfloat *) (_paramsBase + _bufferOffset); 3814 } 3815 glGetTexGenfvOES( 3816 (GLenum)coord, 3817 (GLenum)pname, 3818 (GLfloat *)params 3819 ); 3820 3821exit: 3822 if (_array) { 3823 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0); 3824 } 3825 if (_exception) { 3826 jniThrowException(_env, _exceptionType, _exceptionMessage); 3827 } 3828} 3829 3830/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */ 3831static void 3832android_glGetTexGenivOES__II_3II 3833 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { 3834 jint _exception = 0; 3835 const char * _exceptionType = NULL; 3836 const char * _exceptionMessage = NULL; 3837 GLint *params_base = (GLint *) 0; 3838 jint _remaining; 3839 GLint *params = (GLint *) 0; 3840 3841 if (!params_ref) { 3842 _exception = 1; 3843 _exceptionType = "java/lang/IllegalArgumentException"; 3844 _exceptionMessage = "params == null"; 3845 goto exit; 3846 } 3847 if (offset < 0) { 3848 _exception = 1; 3849 _exceptionType = "java/lang/IllegalArgumentException"; 3850 _exceptionMessage = "offset < 0"; 3851 goto exit; 3852 } 3853 _remaining = _env->GetArrayLength(params_ref) - offset; 3854 params_base = (GLint *) 3855 _env->GetIntArrayElements(params_ref, (jboolean *)0); 3856 params = params_base + offset; 3857 3858 glGetTexGenivOES( 3859 (GLenum)coord, 3860 (GLenum)pname, 3861 (GLint *)params 3862 ); 3863 3864exit: 3865 if (params_base) { 3866 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 3867 _exception ? JNI_ABORT: 0); 3868 } 3869 if (_exception) { 3870 jniThrowException(_env, _exceptionType, _exceptionMessage); 3871 } 3872} 3873 3874/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */ 3875static void 3876android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 3877 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { 3878 jint _exception = 0; 3879 const char * _exceptionType = NULL; 3880 const char * _exceptionMessage = NULL; 3881 jintArray _array = (jintArray) 0; 3882 jint _bufferOffset = (jint) 0; 3883 jint _remaining; 3884 GLint *params = (GLint *) 0; 3885 3886 if (!params_buf) { 3887 _exception = 1; 3888 _exceptionType = "java/lang/IllegalArgumentException"; 3889 _exceptionMessage = "params == null"; 3890 goto exit; 3891 } 3892 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3893 if (params == NULL) { 3894 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3895 params = (GLint *) (_paramsBase + _bufferOffset); 3896 } 3897 glGetTexGenivOES( 3898 (GLenum)coord, 3899 (GLenum)pname, 3900 (GLint *)params 3901 ); 3902 3903exit: 3904 if (_array) { 3905 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 3906 } 3907 if (_exception) { 3908 jniThrowException(_env, _exceptionType, _exceptionMessage); 3909 } 3910} 3911 3912/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */ 3913static void 3914android_glGetTexGenxvOES__II_3II 3915 (JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) { 3916 jint _exception = 0; 3917 const char * _exceptionType = NULL; 3918 const char * _exceptionMessage = NULL; 3919 GLfixed *params_base = (GLfixed *) 0; 3920 jint _remaining; 3921 GLfixed *params = (GLfixed *) 0; 3922 3923 if (!params_ref) { 3924 _exception = 1; 3925 _exceptionType = "java/lang/IllegalArgumentException"; 3926 _exceptionMessage = "params == null"; 3927 goto exit; 3928 } 3929 if (offset < 0) { 3930 _exception = 1; 3931 _exceptionType = "java/lang/IllegalArgumentException"; 3932 _exceptionMessage = "offset < 0"; 3933 goto exit; 3934 } 3935 _remaining = _env->GetArrayLength(params_ref) - offset; 3936 params_base = (GLfixed *) 3937 _env->GetIntArrayElements(params_ref, (jboolean *)0); 3938 params = params_base + offset; 3939 3940 glGetTexGenxvOES( 3941 (GLenum)coord, 3942 (GLenum)pname, 3943 (GLfixed *)params 3944 ); 3945 3946exit: 3947 if (params_base) { 3948 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 3949 _exception ? JNI_ABORT: 0); 3950 } 3951 if (_exception) { 3952 jniThrowException(_env, _exceptionType, _exceptionMessage); 3953 } 3954} 3955 3956/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */ 3957static void 3958android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 3959 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { 3960 jint _exception = 0; 3961 const char * _exceptionType = NULL; 3962 const char * _exceptionMessage = NULL; 3963 jintArray _array = (jintArray) 0; 3964 jint _bufferOffset = (jint) 0; 3965 jint _remaining; 3966 GLfixed *params = (GLfixed *) 0; 3967 3968 if (!params_buf) { 3969 _exception = 1; 3970 _exceptionType = "java/lang/IllegalArgumentException"; 3971 _exceptionMessage = "params == null"; 3972 goto exit; 3973 } 3974 params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3975 if (params == NULL) { 3976 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3977 params = (GLfixed *) (_paramsBase + _bufferOffset); 3978 } 3979 glGetTexGenxvOES( 3980 (GLenum)coord, 3981 (GLenum)pname, 3982 (GLfixed *)params 3983 ); 3984 3985exit: 3986 if (_array) { 3987 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 3988 } 3989 if (_exception) { 3990 jniThrowException(_env, _exceptionType, _exceptionMessage); 3991 } 3992} 3993 3994static const char *classPathName = "android/opengl/GLES11Ext"; 3995 3996static const JNINativeMethod methods[] = { 3997{"_nativeClassInit", "()V", (void*)nativeClassInit }, 3998{"glBlendEquationSeparateOES", "(II)V", (void *) android_glBlendEquationSeparateOES__II }, 3999{"glBlendFuncSeparateOES", "(IIII)V", (void *) android_glBlendFuncSeparateOES__IIII }, 4000{"glBlendEquationOES", "(I)V", (void *) android_glBlendEquationOES__I }, 4001{"glDrawTexsOES", "(SSSSS)V", (void *) android_glDrawTexsOES__SSSSS }, 4002{"glDrawTexiOES", "(IIIII)V", (void *) android_glDrawTexiOES__IIIII }, 4003{"glDrawTexxOES", "(IIIII)V", (void *) android_glDrawTexxOES__IIIII }, 4004{"glDrawTexsvOES", "([SI)V", (void *) android_glDrawTexsvOES___3SI }, 4005{"glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V", (void *) android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 }, 4006{"glDrawTexivOES", "([II)V", (void *) android_glDrawTexivOES___3II }, 4007{"glDrawTexivOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexivOES__Ljava_nio_IntBuffer_2 }, 4008{"glDrawTexxvOES", "([II)V", (void *) android_glDrawTexxvOES___3II }, 4009{"glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 }, 4010{"glDrawTexfOES", "(FFFFF)V", (void *) android_glDrawTexfOES__FFFFF }, 4011{"glDrawTexfvOES", "([FI)V", (void *) android_glDrawTexfvOES___3FI }, 4012{"glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V", (void *) android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 }, 4013{"glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 }, 4014{"glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V", (void *) android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 }, 4015{"glAlphaFuncxOES", "(II)V", (void *) android_glAlphaFuncxOES__II }, 4016{"glClearColorxOES", "(IIII)V", (void *) android_glClearColorxOES__IIII }, 4017{"glClearDepthxOES", "(I)V", (void *) android_glClearDepthxOES__I }, 4018{"glClipPlanexOES", "(I[II)V", (void *) android_glClipPlanexOES__I_3II }, 4019{"glClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glClipPlanexOES__ILjava_nio_IntBuffer_2 }, 4020{"glColor4xOES", "(IIII)V", (void *) android_glColor4xOES__IIII }, 4021{"glDepthRangexOES", "(II)V", (void *) android_glDepthRangexOES__II }, 4022{"glFogxOES", "(II)V", (void *) android_glFogxOES__II }, 4023{"glFogxvOES", "(I[II)V", (void *) android_glFogxvOES__I_3II }, 4024{"glFogxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glFogxvOES__ILjava_nio_IntBuffer_2 }, 4025{"glFrustumxOES", "(IIIIII)V", (void *) android_glFrustumxOES__IIIIII }, 4026{"glGetClipPlanexOES", "(I[II)V", (void *) android_glGetClipPlanexOES__I_3II }, 4027{"glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 }, 4028{"glGetFixedvOES", "(I[II)V", (void *) android_glGetFixedvOES__I_3II }, 4029{"glGetFixedvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetFixedvOES__ILjava_nio_IntBuffer_2 }, 4030{"glGetLightxvOES", "(II[II)V", (void *) android_glGetLightxvOES__II_3II }, 4031{"glGetLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetLightxvOES__IILjava_nio_IntBuffer_2 }, 4032{"glGetMaterialxvOES", "(II[II)V", (void *) android_glGetMaterialxvOES__II_3II }, 4033{"glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 }, 4034{"glGetTexEnvxvOES", "(II[II)V", (void *) android_glGetTexEnvxvOES__II_3II }, 4035{"glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 }, 4036{"glGetTexParameterxvOES", "(II[II)V", (void *) android_glGetTexParameterxvOES__II_3II }, 4037{"glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 }, 4038{"glLightModelxOES", "(II)V", (void *) android_glLightModelxOES__II }, 4039{"glLightModelxvOES", "(I[II)V", (void *) android_glLightModelxvOES__I_3II }, 4040{"glLightModelxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glLightModelxvOES__ILjava_nio_IntBuffer_2 }, 4041{"glLightxOES", "(III)V", (void *) android_glLightxOES__III }, 4042{"glLightxvOES", "(II[II)V", (void *) android_glLightxvOES__II_3II }, 4043{"glLightxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glLightxvOES__IILjava_nio_IntBuffer_2 }, 4044{"glLineWidthxOES", "(I)V", (void *) android_glLineWidthxOES__I }, 4045{"glLoadMatrixxOES", "([II)V", (void *) android_glLoadMatrixxOES___3II }, 4046{"glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2 }, 4047{"glMaterialxOES", "(III)V", (void *) android_glMaterialxOES__III }, 4048{"glMaterialxvOES", "(II[II)V", (void *) android_glMaterialxvOES__II_3II }, 4049{"glMaterialxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glMaterialxvOES__IILjava_nio_IntBuffer_2 }, 4050{"glMultMatrixxOES", "([II)V", (void *) android_glMultMatrixxOES___3II }, 4051{"glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V", (void *) android_glMultMatrixxOES__Ljava_nio_IntBuffer_2 }, 4052{"glMultiTexCoord4xOES", "(IIIII)V", (void *) android_glMultiTexCoord4xOES__IIIII }, 4053{"glNormal3xOES", "(III)V", (void *) android_glNormal3xOES__III }, 4054{"glOrthoxOES", "(IIIIII)V", (void *) android_glOrthoxOES__IIIIII }, 4055{"glPointParameterxOES", "(II)V", (void *) android_glPointParameterxOES__II }, 4056{"glPointParameterxvOES", "(I[II)V", (void *) android_glPointParameterxvOES__I_3II }, 4057{"glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glPointParameterxvOES__ILjava_nio_IntBuffer_2 }, 4058{"glPointSizexOES", "(I)V", (void *) android_glPointSizexOES__I }, 4059{"glPolygonOffsetxOES", "(II)V", (void *) android_glPolygonOffsetxOES__II }, 4060{"glRotatexOES", "(IIII)V", (void *) android_glRotatexOES__IIII }, 4061{"glSampleCoveragexOES", "(IZ)V", (void *) android_glSampleCoveragexOES__IZ }, 4062{"glScalexOES", "(III)V", (void *) android_glScalexOES__III }, 4063{"glTexEnvxOES", "(III)V", (void *) android_glTexEnvxOES__III }, 4064{"glTexEnvxvOES", "(II[II)V", (void *) android_glTexEnvxvOES__II_3II }, 4065{"glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexEnvxvOES__IILjava_nio_IntBuffer_2 }, 4066{"glTexParameterxOES", "(III)V", (void *) android_glTexParameterxOES__III }, 4067{"glTexParameterxvOES", "(II[II)V", (void *) android_glTexParameterxvOES__II_3II }, 4068{"glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterxvOES__IILjava_nio_IntBuffer_2 }, 4069{"glTranslatexOES", "(III)V", (void *) android_glTranslatexOES__III }, 4070{"glIsRenderbufferOES", "(I)Z", (void *) android_glIsRenderbufferOES__I }, 4071{"glBindRenderbufferOES", "(II)V", (void *) android_glBindRenderbufferOES__II }, 4072{"glDeleteRenderbuffersOES", "(I[II)V", (void *) android_glDeleteRenderbuffersOES__I_3II }, 4073{"glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 }, 4074{"glGenRenderbuffersOES", "(I[II)V", (void *) android_glGenRenderbuffersOES__I_3II }, 4075{"glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 }, 4076{"glRenderbufferStorageOES", "(IIII)V", (void *) android_glRenderbufferStorageOES__IIII }, 4077{"glGetRenderbufferParameterivOES", "(II[II)V", (void *) android_glGetRenderbufferParameterivOES__II_3II }, 4078{"glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 }, 4079{"glIsFramebufferOES", "(I)Z", (void *) android_glIsFramebufferOES__I }, 4080{"glBindFramebufferOES", "(II)V", (void *) android_glBindFramebufferOES__II }, 4081{"glDeleteFramebuffersOES", "(I[II)V", (void *) android_glDeleteFramebuffersOES__I_3II }, 4082{"glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 }, 4083{"glGenFramebuffersOES", "(I[II)V", (void *) android_glGenFramebuffersOES__I_3II }, 4084{"glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 }, 4085{"glCheckFramebufferStatusOES", "(I)I", (void *) android_glCheckFramebufferStatusOES__I }, 4086{"glFramebufferRenderbufferOES", "(IIII)V", (void *) android_glFramebufferRenderbufferOES__IIII }, 4087{"glFramebufferTexture2DOES", "(IIIII)V", (void *) android_glFramebufferTexture2DOES__IIIII }, 4088{"glGetFramebufferAttachmentParameterivOES", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameterivOES__III_3II }, 4089{"glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 }, 4090{"glGenerateMipmapOES", "(I)V", (void *) android_glGenerateMipmapOES__I }, 4091{"glCurrentPaletteMatrixOES", "(I)V", (void *) android_glCurrentPaletteMatrixOES__I }, 4092{"glLoadPaletteFromModelViewMatrixOES", "()V", (void *) android_glLoadPaletteFromModelViewMatrixOES__ }, 4093{"glMatrixIndexPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I }, 4094{"glWeightPointerOESBounds", "(IIILjava/nio/Buffer;I)V", (void *) android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I }, 4095{"glDepthRangefOES", "(FF)V", (void *) android_glDepthRangefOES__FF }, 4096{"glFrustumfOES", "(FFFFFF)V", (void *) android_glFrustumfOES__FFFFFF }, 4097{"glOrthofOES", "(FFFFFF)V", (void *) android_glOrthofOES__FFFFFF }, 4098{"glClipPlanefOES", "(I[FI)V", (void *) android_glClipPlanefOES__I_3FI }, 4099{"glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glClipPlanefOES__ILjava_nio_FloatBuffer_2 }, 4100{"glGetClipPlanefOES", "(I[FI)V", (void *) android_glGetClipPlanefOES__I_3FI }, 4101{"glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 }, 4102{"glClearDepthfOES", "(F)V", (void *) android_glClearDepthfOES__F }, 4103{"glTexGenfOES", "(IIF)V", (void *) android_glTexGenfOES__IIF }, 4104{"glTexGenfvOES", "(II[FI)V", (void *) android_glTexGenfvOES__II_3FI }, 4105{"glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexGenfvOES__IILjava_nio_FloatBuffer_2 }, 4106{"glTexGeniOES", "(III)V", (void *) android_glTexGeniOES__III }, 4107{"glTexGenivOES", "(II[II)V", (void *) android_glTexGenivOES__II_3II }, 4108{"glTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenivOES__IILjava_nio_IntBuffer_2 }, 4109{"glTexGenxOES", "(III)V", (void *) android_glTexGenxOES__III }, 4110{"glTexGenxvOES", "(II[II)V", (void *) android_glTexGenxvOES__II_3II }, 4111{"glTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexGenxvOES__IILjava_nio_IntBuffer_2 }, 4112{"glGetTexGenfvOES", "(II[FI)V", (void *) android_glGetTexGenfvOES__II_3FI }, 4113{"glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 }, 4114{"glGetTexGenivOES", "(II[II)V", (void *) android_glGetTexGenivOES__II_3II }, 4115{"glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 }, 4116{"glGetTexGenxvOES", "(II[II)V", (void *) android_glGetTexGenxvOES__II_3II }, 4117{"glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 }, 4118}; 4119 4120int register_android_opengl_jni_GLES11Ext(JNIEnv *_env) 4121{ 4122 int err; 4123 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); 4124 return err; 4125} 4126