android_opengl_GLES30.cpp revision 84cac20dfdff35932901e978e6b6d3da843a2fa7
1/* 2** 3** Copyright 2013, 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 <GLES3/gl3.h> 25#include <GLES3/gl3ext.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 glReadBuffer ( GLenum mode ) */ 446static void 447android_glReadBuffer__I 448 (JNIEnv *_env, jobject _this, jint mode) { 449 glReadBuffer( 450 (GLenum)mode 451 ); 452} 453 454/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) */ 455static void 456android_glDrawRangeElements__IIIIILjava_nio_Buffer_2 457 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf) { 458 jint _exception = 0; 459 const char * _exceptionType = NULL; 460 const char * _exceptionMessage = NULL; 461 jarray _array = (jarray) 0; 462 jint _bufferOffset = (jint) 0; 463 jint _remaining; 464 GLvoid *indices = (GLvoid *) 0; 465 466 if (!indices_buf) { 467 _exception = 1; 468 _exceptionType = "java/lang/IllegalArgumentException"; 469 _exceptionMessage = "indices == null"; 470 goto exit; 471 } 472 indices = (GLvoid *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 473 if (indices == NULL) { 474 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 475 indices = (GLvoid *) (_indicesBase + _bufferOffset); 476 } 477 glDrawRangeElements( 478 (GLenum)mode, 479 (GLuint)start, 480 (GLuint)end, 481 (GLsizei)count, 482 (GLenum)type, 483 (GLvoid *)indices 484 ); 485 486exit: 487 if (_array) { 488 releasePointer(_env, _array, indices, JNI_FALSE); 489 } 490 if (_exception) { 491 jniThrowException(_env, _exceptionType, _exceptionMessage); 492 } 493} 494 495/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset ) */ 496static void 497android_glDrawRangeElements__IIIIII 498 (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jint offset) { 499 glDrawRangeElements( 500 (GLenum)mode, 501 (GLuint)start, 502 (GLuint)end, 503 (GLsizei)count, 504 (GLenum)type, 505 reinterpret_cast<GLvoid *>(offset) 506 ); 507} 508 509/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */ 510static void 511android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2 512 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject pixels_buf) { 513 jint _exception = 0; 514 const char * _exceptionType = NULL; 515 const char * _exceptionMessage = NULL; 516 jarray _array = (jarray) 0; 517 jint _bufferOffset = (jint) 0; 518 jint _remaining; 519 GLvoid *pixels = (GLvoid *) 0; 520 521 if (pixels_buf) { 522 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 523 } 524 if (pixels_buf && pixels == NULL) { 525 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 526 pixels = (GLvoid *) (_pixelsBase + _bufferOffset); 527 } 528 glTexImage3D( 529 (GLenum)target, 530 (GLint)level, 531 (GLint)internalformat, 532 (GLsizei)width, 533 (GLsizei)height, 534 (GLsizei)depth, 535 (GLint)border, 536 (GLenum)format, 537 (GLenum)type, 538 (GLvoid *)pixels 539 ); 540 if (_array) { 541 releasePointer(_env, _array, pixels, JNI_FALSE); 542 } 543 if (_exception) { 544 jniThrowException(_env, _exceptionType, _exceptionMessage); 545 } 546} 547 548/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset ) */ 549static void 550android_glTexImage3D__IIIIIIIIII 551 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jint offset) { 552 glTexImage3D( 553 (GLenum)target, 554 (GLint)level, 555 (GLint)internalformat, 556 (GLsizei)width, 557 (GLsizei)height, 558 (GLsizei)depth, 559 (GLint)border, 560 (GLenum)format, 561 (GLenum)type, 562 reinterpret_cast<GLvoid *>(offset) 563 ); 564} 565 566/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels ) */ 567static void 568android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 569 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jobject pixels_buf) { 570 jint _exception = 0; 571 const char * _exceptionType = NULL; 572 const char * _exceptionMessage = NULL; 573 jarray _array = (jarray) 0; 574 jint _bufferOffset = (jint) 0; 575 jint _remaining; 576 GLvoid *pixels = (GLvoid *) 0; 577 578 if (!pixels_buf) { 579 _exception = 1; 580 _exceptionType = "java/lang/IllegalArgumentException"; 581 _exceptionMessage = "pixels == null"; 582 goto exit; 583 } 584 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 585 if (pixels == NULL) { 586 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 587 pixels = (GLvoid *) (_pixelsBase + _bufferOffset); 588 } 589 glTexSubImage3D( 590 (GLenum)target, 591 (GLint)level, 592 (GLint)xoffset, 593 (GLint)yoffset, 594 (GLint)zoffset, 595 (GLsizei)width, 596 (GLsizei)height, 597 (GLsizei)depth, 598 (GLenum)format, 599 (GLenum)type, 600 (GLvoid *)pixels 601 ); 602 603exit: 604 if (_array) { 605 releasePointer(_env, _array, pixels, JNI_FALSE); 606 } 607 if (_exception) { 608 jniThrowException(_env, _exceptionType, _exceptionMessage); 609 } 610} 611 612/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset ) */ 613static void 614android_glTexSubImage3D__IIIIIIIIIII 615 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jint offset) { 616 glTexSubImage3D( 617 (GLenum)target, 618 (GLint)level, 619 (GLint)xoffset, 620 (GLint)yoffset, 621 (GLint)zoffset, 622 (GLsizei)width, 623 (GLsizei)height, 624 (GLsizei)depth, 625 (GLenum)format, 626 (GLenum)type, 627 reinterpret_cast<GLvoid *>(offset) 628 ); 629} 630 631/* void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */ 632static void 633android_glCopyTexSubImage3D__IIIIIIIII 634 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { 635 glCopyTexSubImage3D( 636 (GLenum)target, 637 (GLint)level, 638 (GLint)xoffset, 639 (GLint)yoffset, 640 (GLint)zoffset, 641 (GLint)x, 642 (GLint)y, 643 (GLsizei)width, 644 (GLsizei)height 645 ); 646} 647 648/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ) */ 649static void 650android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2 651 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jobject data_buf) { 652 jint _exception = 0; 653 const char * _exceptionType = NULL; 654 const char * _exceptionMessage = NULL; 655 jarray _array = (jarray) 0; 656 jint _bufferOffset = (jint) 0; 657 jint _remaining; 658 GLvoid *data = (GLvoid *) 0; 659 660 if (!data_buf) { 661 _exception = 1; 662 _exceptionType = "java/lang/IllegalArgumentException"; 663 _exceptionMessage = "data == null"; 664 goto exit; 665 } 666 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 667 if (data == NULL) { 668 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 669 data = (GLvoid *) (_dataBase + _bufferOffset); 670 } 671 glCompressedTexImage3D( 672 (GLenum)target, 673 (GLint)level, 674 (GLenum)internalformat, 675 (GLsizei)width, 676 (GLsizei)height, 677 (GLsizei)depth, 678 (GLint)border, 679 (GLsizei)imageSize, 680 (GLvoid *)data 681 ); 682 683exit: 684 if (_array) { 685 releasePointer(_env, _array, data, JNI_FALSE); 686 } 687 if (_exception) { 688 jniThrowException(_env, _exceptionType, _exceptionMessage); 689 } 690} 691 692/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset ) */ 693static void 694android_glCompressedTexImage3D__IIIIIIIII 695 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint offset) { 696 glCompressedTexImage3D( 697 (GLenum)target, 698 (GLint)level, 699 (GLenum)internalformat, 700 (GLsizei)width, 701 (GLsizei)height, 702 (GLsizei)depth, 703 (GLint)border, 704 (GLsizei)imageSize, 705 reinterpret_cast<GLvoid *>(offset) 706 ); 707} 708 709/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ) */ 710static void 711android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 712 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jobject data_buf) { 713 jint _exception = 0; 714 const char * _exceptionType = NULL; 715 const char * _exceptionMessage = NULL; 716 jarray _array = (jarray) 0; 717 jint _bufferOffset = (jint) 0; 718 jint _remaining; 719 GLvoid *data = (GLvoid *) 0; 720 721 if (!data_buf) { 722 _exception = 1; 723 _exceptionType = "java/lang/IllegalArgumentException"; 724 _exceptionMessage = "data == null"; 725 goto exit; 726 } 727 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 728 if (data == NULL) { 729 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 730 data = (GLvoid *) (_dataBase + _bufferOffset); 731 } 732 glCompressedTexSubImage3D( 733 (GLenum)target, 734 (GLint)level, 735 (GLint)xoffset, 736 (GLint)yoffset, 737 (GLint)zoffset, 738 (GLsizei)width, 739 (GLsizei)height, 740 (GLsizei)depth, 741 (GLenum)format, 742 (GLsizei)imageSize, 743 (GLvoid *)data 744 ); 745 746exit: 747 if (_array) { 748 releasePointer(_env, _array, data, JNI_FALSE); 749 } 750 if (_exception) { 751 jniThrowException(_env, _exceptionType, _exceptionMessage); 752 } 753} 754 755/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset ) */ 756static void 757android_glCompressedTexSubImage3D__IIIIIIIIIII 758 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jint offset) { 759 glCompressedTexSubImage3D( 760 (GLenum)target, 761 (GLint)level, 762 (GLint)xoffset, 763 (GLint)yoffset, 764 (GLint)zoffset, 765 (GLsizei)width, 766 (GLsizei)height, 767 (GLsizei)depth, 768 (GLenum)format, 769 (GLsizei)imageSize, 770 reinterpret_cast<GLvoid *>(offset) 771 ); 772} 773 774/* void glGenQueries ( GLsizei n, GLuint *ids ) */ 775static void 776android_glGenQueries__I_3II 777 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) { 778 jint _exception = 0; 779 const char * _exceptionType = NULL; 780 const char * _exceptionMessage = NULL; 781 GLuint *ids_base = (GLuint *) 0; 782 jint _remaining; 783 GLuint *ids = (GLuint *) 0; 784 785 if (!ids_ref) { 786 _exception = 1; 787 _exceptionType = "java/lang/IllegalArgumentException"; 788 _exceptionMessage = "ids == null"; 789 goto exit; 790 } 791 if (offset < 0) { 792 _exception = 1; 793 _exceptionType = "java/lang/IllegalArgumentException"; 794 _exceptionMessage = "offset < 0"; 795 goto exit; 796 } 797 _remaining = _env->GetArrayLength(ids_ref) - offset; 798 ids_base = (GLuint *) 799 _env->GetIntArrayElements(ids_ref, (jboolean *)0); 800 ids = ids_base + offset; 801 802 glGenQueries( 803 (GLsizei)n, 804 (GLuint *)ids 805 ); 806 807exit: 808 if (ids_base) { 809 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base, 810 _exception ? JNI_ABORT: 0); 811 } 812 if (_exception) { 813 jniThrowException(_env, _exceptionType, _exceptionMessage); 814 } 815} 816 817/* void glGenQueries ( GLsizei n, GLuint *ids ) */ 818static void 819android_glGenQueries__ILjava_nio_IntBuffer_2 820 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) { 821 jint _exception = 0; 822 const char * _exceptionType = NULL; 823 const char * _exceptionMessage = NULL; 824 jintArray _array = (jintArray) 0; 825 jint _bufferOffset = (jint) 0; 826 jint _remaining; 827 GLuint *ids = (GLuint *) 0; 828 829 if (!ids_buf) { 830 _exception = 1; 831 _exceptionType = "java/lang/IllegalArgumentException"; 832 _exceptionMessage = "ids == null"; 833 goto exit; 834 } 835 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 836 if (ids == NULL) { 837 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 838 ids = (GLuint *) (_idsBase + _bufferOffset); 839 } 840 glGenQueries( 841 (GLsizei)n, 842 (GLuint *)ids 843 ); 844 845exit: 846 if (_array) { 847 _env->ReleaseIntArrayElements(_array, (jint*)ids, _exception ? JNI_ABORT : 0); 848 } 849 if (_exception) { 850 jniThrowException(_env, _exceptionType, _exceptionMessage); 851 } 852} 853 854/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */ 855static void 856android_glDeleteQueries__I_3II 857 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) { 858 jint _exception = 0; 859 const char * _exceptionType = NULL; 860 const char * _exceptionMessage = NULL; 861 GLuint *ids_base = (GLuint *) 0; 862 jint _remaining; 863 GLuint *ids = (GLuint *) 0; 864 865 if (!ids_ref) { 866 _exception = 1; 867 _exceptionType = "java/lang/IllegalArgumentException"; 868 _exceptionMessage = "ids == null"; 869 goto exit; 870 } 871 if (offset < 0) { 872 _exception = 1; 873 _exceptionType = "java/lang/IllegalArgumentException"; 874 _exceptionMessage = "offset < 0"; 875 goto exit; 876 } 877 _remaining = _env->GetArrayLength(ids_ref) - offset; 878 ids_base = (GLuint *) 879 _env->GetIntArrayElements(ids_ref, (jboolean *)0); 880 ids = ids_base + offset; 881 882 glDeleteQueries( 883 (GLsizei)n, 884 (GLuint *)ids 885 ); 886 887exit: 888 if (ids_base) { 889 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base, 890 JNI_ABORT); 891 } 892 if (_exception) { 893 jniThrowException(_env, _exceptionType, _exceptionMessage); 894 } 895} 896 897/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */ 898static void 899android_glDeleteQueries__ILjava_nio_IntBuffer_2 900 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) { 901 jint _exception = 0; 902 const char * _exceptionType = NULL; 903 const char * _exceptionMessage = NULL; 904 jintArray _array = (jintArray) 0; 905 jint _bufferOffset = (jint) 0; 906 jint _remaining; 907 GLuint *ids = (GLuint *) 0; 908 909 if (!ids_buf) { 910 _exception = 1; 911 _exceptionType = "java/lang/IllegalArgumentException"; 912 _exceptionMessage = "ids == null"; 913 goto exit; 914 } 915 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 916 if (ids == NULL) { 917 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 918 ids = (GLuint *) (_idsBase + _bufferOffset); 919 } 920 glDeleteQueries( 921 (GLsizei)n, 922 (GLuint *)ids 923 ); 924 925exit: 926 if (_array) { 927 _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT); 928 } 929 if (_exception) { 930 jniThrowException(_env, _exceptionType, _exceptionMessage); 931 } 932} 933 934/* GLboolean glIsQuery ( GLuint id ) */ 935static jboolean 936android_glIsQuery__I 937 (JNIEnv *_env, jobject _this, jint id) { 938 GLboolean _returnValue; 939 _returnValue = glIsQuery( 940 (GLuint)id 941 ); 942 return (jboolean)_returnValue; 943} 944 945/* void glBeginQuery ( GLenum target, GLuint id ) */ 946static void 947android_glBeginQuery__II 948 (JNIEnv *_env, jobject _this, jint target, jint id) { 949 glBeginQuery( 950 (GLenum)target, 951 (GLuint)id 952 ); 953} 954 955/* void glEndQuery ( GLenum target ) */ 956static void 957android_glEndQuery__I 958 (JNIEnv *_env, jobject _this, jint target) { 959 glEndQuery( 960 (GLenum)target 961 ); 962} 963 964/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */ 965static void 966android_glGetQueryiv__II_3II 967 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 968 jint _exception = 0; 969 const char * _exceptionType = NULL; 970 const char * _exceptionMessage = NULL; 971 GLint *params_base = (GLint *) 0; 972 jint _remaining; 973 GLint *params = (GLint *) 0; 974 975 if (!params_ref) { 976 _exception = 1; 977 _exceptionType = "java/lang/IllegalArgumentException"; 978 _exceptionMessage = "params == null"; 979 goto exit; 980 } 981 if (offset < 0) { 982 _exception = 1; 983 _exceptionType = "java/lang/IllegalArgumentException"; 984 _exceptionMessage = "offset < 0"; 985 goto exit; 986 } 987 _remaining = _env->GetArrayLength(params_ref) - offset; 988 params_base = (GLint *) 989 _env->GetIntArrayElements(params_ref, (jboolean *)0); 990 params = params_base + offset; 991 992 glGetQueryiv( 993 (GLenum)target, 994 (GLenum)pname, 995 (GLint *)params 996 ); 997 998exit: 999 if (params_base) { 1000 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1001 _exception ? JNI_ABORT: 0); 1002 } 1003 if (_exception) { 1004 jniThrowException(_env, _exceptionType, _exceptionMessage); 1005 } 1006} 1007 1008/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */ 1009static void 1010android_glGetQueryiv__IILjava_nio_IntBuffer_2 1011 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 1012 jint _exception = 0; 1013 const char * _exceptionType = NULL; 1014 const char * _exceptionMessage = NULL; 1015 jintArray _array = (jintArray) 0; 1016 jint _bufferOffset = (jint) 0; 1017 jint _remaining; 1018 GLint *params = (GLint *) 0; 1019 1020 if (!params_buf) { 1021 _exception = 1; 1022 _exceptionType = "java/lang/IllegalArgumentException"; 1023 _exceptionMessage = "params == null"; 1024 goto exit; 1025 } 1026 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1027 if (params == NULL) { 1028 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1029 params = (GLint *) (_paramsBase + _bufferOffset); 1030 } 1031 glGetQueryiv( 1032 (GLenum)target, 1033 (GLenum)pname, 1034 (GLint *)params 1035 ); 1036 1037exit: 1038 if (_array) { 1039 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 1040 } 1041 if (_exception) { 1042 jniThrowException(_env, _exceptionType, _exceptionMessage); 1043 } 1044} 1045 1046/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */ 1047static void 1048android_glGetQueryObjectuiv__II_3II 1049 (JNIEnv *_env, jobject _this, jint id, jint pname, jintArray params_ref, jint offset) { 1050 jint _exception = 0; 1051 const char * _exceptionType = NULL; 1052 const char * _exceptionMessage = NULL; 1053 GLuint *params_base = (GLuint *) 0; 1054 jint _remaining; 1055 GLuint *params = (GLuint *) 0; 1056 1057 if (!params_ref) { 1058 _exception = 1; 1059 _exceptionType = "java/lang/IllegalArgumentException"; 1060 _exceptionMessage = "params == null"; 1061 goto exit; 1062 } 1063 if (offset < 0) { 1064 _exception = 1; 1065 _exceptionType = "java/lang/IllegalArgumentException"; 1066 _exceptionMessage = "offset < 0"; 1067 goto exit; 1068 } 1069 _remaining = _env->GetArrayLength(params_ref) - offset; 1070 params_base = (GLuint *) 1071 _env->GetIntArrayElements(params_ref, (jboolean *)0); 1072 params = params_base + offset; 1073 1074 glGetQueryObjectuiv( 1075 (GLuint)id, 1076 (GLenum)pname, 1077 (GLuint *)params 1078 ); 1079 1080exit: 1081 if (params_base) { 1082 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 1083 _exception ? JNI_ABORT: 0); 1084 } 1085 if (_exception) { 1086 jniThrowException(_env, _exceptionType, _exceptionMessage); 1087 } 1088} 1089 1090/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */ 1091static void 1092android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2 1093 (JNIEnv *_env, jobject _this, jint id, jint pname, jobject params_buf) { 1094 jint _exception = 0; 1095 const char * _exceptionType = NULL; 1096 const char * _exceptionMessage = NULL; 1097 jintArray _array = (jintArray) 0; 1098 jint _bufferOffset = (jint) 0; 1099 jint _remaining; 1100 GLuint *params = (GLuint *) 0; 1101 1102 if (!params_buf) { 1103 _exception = 1; 1104 _exceptionType = "java/lang/IllegalArgumentException"; 1105 _exceptionMessage = "params == null"; 1106 goto exit; 1107 } 1108 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1109 if (params == NULL) { 1110 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1111 params = (GLuint *) (_paramsBase + _bufferOffset); 1112 } 1113 glGetQueryObjectuiv( 1114 (GLuint)id, 1115 (GLenum)pname, 1116 (GLuint *)params 1117 ); 1118 1119exit: 1120 if (_array) { 1121 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 1122 } 1123 if (_exception) { 1124 jniThrowException(_env, _exceptionType, _exceptionMessage); 1125 } 1126} 1127 1128/* GLboolean glUnmapBuffer ( GLenum target ) */ 1129static jboolean 1130android_glUnmapBuffer__I 1131 (JNIEnv *_env, jobject _this, jint target) { 1132 GLboolean _returnValue; 1133 _returnValue = glUnmapBuffer( 1134 (GLenum)target 1135 ); 1136 return (jboolean)_returnValue; 1137} 1138 1139/* void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) */ 1140static jobject 1141android_glGetBufferPointerv__II 1142 (JNIEnv *_env, jobject _this, jint target, jint pname) { 1143 GLint64 _mapLength; 1144 GLvoid* _p; 1145 glGetBufferParameteri64v((GLenum)target, GL_BUFFER_MAP_LENGTH, &_mapLength); 1146 glGetBufferPointerv((GLenum)target, (GLenum)pname, &_p); 1147 return _env->NewDirectByteBuffer(_p, _mapLength); 1148} 1149 1150/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */ 1151static void 1152android_glDrawBuffers__I_3II 1153 (JNIEnv *_env, jobject _this, jint n, jintArray bufs_ref, jint offset) { 1154 jint _exception = 0; 1155 const char * _exceptionType = NULL; 1156 const char * _exceptionMessage = NULL; 1157 GLenum *bufs_base = (GLenum *) 0; 1158 jint _remaining; 1159 GLenum *bufs = (GLenum *) 0; 1160 1161 if (!bufs_ref) { 1162 _exception = 1; 1163 _exceptionType = "java/lang/IllegalArgumentException"; 1164 _exceptionMessage = "bufs == null"; 1165 goto exit; 1166 } 1167 if (offset < 0) { 1168 _exception = 1; 1169 _exceptionType = "java/lang/IllegalArgumentException"; 1170 _exceptionMessage = "offset < 0"; 1171 goto exit; 1172 } 1173 _remaining = _env->GetArrayLength(bufs_ref) - offset; 1174 bufs_base = (GLenum *) 1175 _env->GetIntArrayElements(bufs_ref, (jboolean *)0); 1176 bufs = bufs_base + offset; 1177 1178 glDrawBuffers( 1179 (GLsizei)n, 1180 (GLenum *)bufs 1181 ); 1182 1183exit: 1184 if (bufs_base) { 1185 _env->ReleaseIntArrayElements(bufs_ref, (jint*)bufs_base, 1186 JNI_ABORT); 1187 } 1188 if (_exception) { 1189 jniThrowException(_env, _exceptionType, _exceptionMessage); 1190 } 1191} 1192 1193/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */ 1194static void 1195android_glDrawBuffers__ILjava_nio_IntBuffer_2 1196 (JNIEnv *_env, jobject _this, jint n, jobject bufs_buf) { 1197 jint _exception = 0; 1198 const char * _exceptionType = NULL; 1199 const char * _exceptionMessage = NULL; 1200 jintArray _array = (jintArray) 0; 1201 jint _bufferOffset = (jint) 0; 1202 jint _remaining; 1203 GLenum *bufs = (GLenum *) 0; 1204 1205 if (!bufs_buf) { 1206 _exception = 1; 1207 _exceptionType = "java/lang/IllegalArgumentException"; 1208 _exceptionMessage = "bufs == null"; 1209 goto exit; 1210 } 1211 bufs = (GLenum *)getPointer(_env, bufs_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1212 if (bufs == NULL) { 1213 char * _bufsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1214 bufs = (GLenum *) (_bufsBase + _bufferOffset); 1215 } 1216 glDrawBuffers( 1217 (GLsizei)n, 1218 (GLenum *)bufs 1219 ); 1220 1221exit: 1222 if (_array) { 1223 _env->ReleaseIntArrayElements(_array, (jint*)bufs, JNI_ABORT); 1224 } 1225 if (_exception) { 1226 jniThrowException(_env, _exceptionType, _exceptionMessage); 1227 } 1228} 1229 1230/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1231static void 1232android_glUniformMatrix2x3fv__IIZ_3FI 1233 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 1234 jint _exception = 0; 1235 const char * _exceptionType = NULL; 1236 const char * _exceptionMessage = NULL; 1237 GLfloat *value_base = (GLfloat *) 0; 1238 jint _remaining; 1239 GLfloat *value = (GLfloat *) 0; 1240 1241 if (!value_ref) { 1242 _exception = 1; 1243 _exceptionType = "java/lang/IllegalArgumentException"; 1244 _exceptionMessage = "value == null"; 1245 goto exit; 1246 } 1247 if (offset < 0) { 1248 _exception = 1; 1249 _exceptionType = "java/lang/IllegalArgumentException"; 1250 _exceptionMessage = "offset < 0"; 1251 goto exit; 1252 } 1253 _remaining = _env->GetArrayLength(value_ref) - offset; 1254 value_base = (GLfloat *) 1255 _env->GetFloatArrayElements(value_ref, (jboolean *)0); 1256 value = value_base + offset; 1257 1258 glUniformMatrix2x3fv( 1259 (GLint)location, 1260 (GLsizei)count, 1261 (GLboolean)transpose, 1262 (GLfloat *)value 1263 ); 1264 1265exit: 1266 if (value_base) { 1267 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base, 1268 JNI_ABORT); 1269 } 1270 if (_exception) { 1271 jniThrowException(_env, _exceptionType, _exceptionMessage); 1272 } 1273} 1274 1275/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1276static void 1277android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2 1278 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 1279 jint _exception = 0; 1280 const char * _exceptionType = NULL; 1281 const char * _exceptionMessage = NULL; 1282 jfloatArray _array = (jfloatArray) 0; 1283 jint _bufferOffset = (jint) 0; 1284 jint _remaining; 1285 GLfloat *value = (GLfloat *) 0; 1286 1287 if (!value_buf) { 1288 _exception = 1; 1289 _exceptionType = "java/lang/IllegalArgumentException"; 1290 _exceptionMessage = "value == null"; 1291 goto exit; 1292 } 1293 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1294 if (value == NULL) { 1295 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 1296 value = (GLfloat *) (_valueBase + _bufferOffset); 1297 } 1298 glUniformMatrix2x3fv( 1299 (GLint)location, 1300 (GLsizei)count, 1301 (GLboolean)transpose, 1302 (GLfloat *)value 1303 ); 1304 1305exit: 1306 if (_array) { 1307 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT); 1308 } 1309 if (_exception) { 1310 jniThrowException(_env, _exceptionType, _exceptionMessage); 1311 } 1312} 1313 1314/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1315static void 1316android_glUniformMatrix3x2fv__IIZ_3FI 1317 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 1318 jint _exception = 0; 1319 const char * _exceptionType = NULL; 1320 const char * _exceptionMessage = NULL; 1321 GLfloat *value_base = (GLfloat *) 0; 1322 jint _remaining; 1323 GLfloat *value = (GLfloat *) 0; 1324 1325 if (!value_ref) { 1326 _exception = 1; 1327 _exceptionType = "java/lang/IllegalArgumentException"; 1328 _exceptionMessage = "value == null"; 1329 goto exit; 1330 } 1331 if (offset < 0) { 1332 _exception = 1; 1333 _exceptionType = "java/lang/IllegalArgumentException"; 1334 _exceptionMessage = "offset < 0"; 1335 goto exit; 1336 } 1337 _remaining = _env->GetArrayLength(value_ref) - offset; 1338 value_base = (GLfloat *) 1339 _env->GetFloatArrayElements(value_ref, (jboolean *)0); 1340 value = value_base + offset; 1341 1342 glUniformMatrix3x2fv( 1343 (GLint)location, 1344 (GLsizei)count, 1345 (GLboolean)transpose, 1346 (GLfloat *)value 1347 ); 1348 1349exit: 1350 if (value_base) { 1351 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base, 1352 JNI_ABORT); 1353 } 1354 if (_exception) { 1355 jniThrowException(_env, _exceptionType, _exceptionMessage); 1356 } 1357} 1358 1359/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1360static void 1361android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2 1362 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 1363 jint _exception = 0; 1364 const char * _exceptionType = NULL; 1365 const char * _exceptionMessage = NULL; 1366 jfloatArray _array = (jfloatArray) 0; 1367 jint _bufferOffset = (jint) 0; 1368 jint _remaining; 1369 GLfloat *value = (GLfloat *) 0; 1370 1371 if (!value_buf) { 1372 _exception = 1; 1373 _exceptionType = "java/lang/IllegalArgumentException"; 1374 _exceptionMessage = "value == null"; 1375 goto exit; 1376 } 1377 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1378 if (value == NULL) { 1379 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 1380 value = (GLfloat *) (_valueBase + _bufferOffset); 1381 } 1382 glUniformMatrix3x2fv( 1383 (GLint)location, 1384 (GLsizei)count, 1385 (GLboolean)transpose, 1386 (GLfloat *)value 1387 ); 1388 1389exit: 1390 if (_array) { 1391 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT); 1392 } 1393 if (_exception) { 1394 jniThrowException(_env, _exceptionType, _exceptionMessage); 1395 } 1396} 1397 1398/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1399static void 1400android_glUniformMatrix2x4fv__IIZ_3FI 1401 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 1402 jint _exception = 0; 1403 const char * _exceptionType = NULL; 1404 const char * _exceptionMessage = NULL; 1405 GLfloat *value_base = (GLfloat *) 0; 1406 jint _remaining; 1407 GLfloat *value = (GLfloat *) 0; 1408 1409 if (!value_ref) { 1410 _exception = 1; 1411 _exceptionType = "java/lang/IllegalArgumentException"; 1412 _exceptionMessage = "value == null"; 1413 goto exit; 1414 } 1415 if (offset < 0) { 1416 _exception = 1; 1417 _exceptionType = "java/lang/IllegalArgumentException"; 1418 _exceptionMessage = "offset < 0"; 1419 goto exit; 1420 } 1421 _remaining = _env->GetArrayLength(value_ref) - offset; 1422 value_base = (GLfloat *) 1423 _env->GetFloatArrayElements(value_ref, (jboolean *)0); 1424 value = value_base + offset; 1425 1426 glUniformMatrix2x4fv( 1427 (GLint)location, 1428 (GLsizei)count, 1429 (GLboolean)transpose, 1430 (GLfloat *)value 1431 ); 1432 1433exit: 1434 if (value_base) { 1435 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base, 1436 JNI_ABORT); 1437 } 1438 if (_exception) { 1439 jniThrowException(_env, _exceptionType, _exceptionMessage); 1440 } 1441} 1442 1443/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1444static void 1445android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2 1446 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 1447 jint _exception = 0; 1448 const char * _exceptionType = NULL; 1449 const char * _exceptionMessage = NULL; 1450 jfloatArray _array = (jfloatArray) 0; 1451 jint _bufferOffset = (jint) 0; 1452 jint _remaining; 1453 GLfloat *value = (GLfloat *) 0; 1454 1455 if (!value_buf) { 1456 _exception = 1; 1457 _exceptionType = "java/lang/IllegalArgumentException"; 1458 _exceptionMessage = "value == null"; 1459 goto exit; 1460 } 1461 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1462 if (value == NULL) { 1463 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 1464 value = (GLfloat *) (_valueBase + _bufferOffset); 1465 } 1466 glUniformMatrix2x4fv( 1467 (GLint)location, 1468 (GLsizei)count, 1469 (GLboolean)transpose, 1470 (GLfloat *)value 1471 ); 1472 1473exit: 1474 if (_array) { 1475 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT); 1476 } 1477 if (_exception) { 1478 jniThrowException(_env, _exceptionType, _exceptionMessage); 1479 } 1480} 1481 1482/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1483static void 1484android_glUniformMatrix4x2fv__IIZ_3FI 1485 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 1486 jint _exception = 0; 1487 const char * _exceptionType = NULL; 1488 const char * _exceptionMessage = NULL; 1489 GLfloat *value_base = (GLfloat *) 0; 1490 jint _remaining; 1491 GLfloat *value = (GLfloat *) 0; 1492 1493 if (!value_ref) { 1494 _exception = 1; 1495 _exceptionType = "java/lang/IllegalArgumentException"; 1496 _exceptionMessage = "value == null"; 1497 goto exit; 1498 } 1499 if (offset < 0) { 1500 _exception = 1; 1501 _exceptionType = "java/lang/IllegalArgumentException"; 1502 _exceptionMessage = "offset < 0"; 1503 goto exit; 1504 } 1505 _remaining = _env->GetArrayLength(value_ref) - offset; 1506 value_base = (GLfloat *) 1507 _env->GetFloatArrayElements(value_ref, (jboolean *)0); 1508 value = value_base + offset; 1509 1510 glUniformMatrix4x2fv( 1511 (GLint)location, 1512 (GLsizei)count, 1513 (GLboolean)transpose, 1514 (GLfloat *)value 1515 ); 1516 1517exit: 1518 if (value_base) { 1519 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base, 1520 JNI_ABORT); 1521 } 1522 if (_exception) { 1523 jniThrowException(_env, _exceptionType, _exceptionMessage); 1524 } 1525} 1526 1527/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1528static void 1529android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2 1530 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 1531 jint _exception = 0; 1532 const char * _exceptionType = NULL; 1533 const char * _exceptionMessage = NULL; 1534 jfloatArray _array = (jfloatArray) 0; 1535 jint _bufferOffset = (jint) 0; 1536 jint _remaining; 1537 GLfloat *value = (GLfloat *) 0; 1538 1539 if (!value_buf) { 1540 _exception = 1; 1541 _exceptionType = "java/lang/IllegalArgumentException"; 1542 _exceptionMessage = "value == null"; 1543 goto exit; 1544 } 1545 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1546 if (value == NULL) { 1547 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 1548 value = (GLfloat *) (_valueBase + _bufferOffset); 1549 } 1550 glUniformMatrix4x2fv( 1551 (GLint)location, 1552 (GLsizei)count, 1553 (GLboolean)transpose, 1554 (GLfloat *)value 1555 ); 1556 1557exit: 1558 if (_array) { 1559 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT); 1560 } 1561 if (_exception) { 1562 jniThrowException(_env, _exceptionType, _exceptionMessage); 1563 } 1564} 1565 1566/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1567static void 1568android_glUniformMatrix3x4fv__IIZ_3FI 1569 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 1570 jint _exception = 0; 1571 const char * _exceptionType = NULL; 1572 const char * _exceptionMessage = NULL; 1573 GLfloat *value_base = (GLfloat *) 0; 1574 jint _remaining; 1575 GLfloat *value = (GLfloat *) 0; 1576 1577 if (!value_ref) { 1578 _exception = 1; 1579 _exceptionType = "java/lang/IllegalArgumentException"; 1580 _exceptionMessage = "value == null"; 1581 goto exit; 1582 } 1583 if (offset < 0) { 1584 _exception = 1; 1585 _exceptionType = "java/lang/IllegalArgumentException"; 1586 _exceptionMessage = "offset < 0"; 1587 goto exit; 1588 } 1589 _remaining = _env->GetArrayLength(value_ref) - offset; 1590 value_base = (GLfloat *) 1591 _env->GetFloatArrayElements(value_ref, (jboolean *)0); 1592 value = value_base + offset; 1593 1594 glUniformMatrix3x4fv( 1595 (GLint)location, 1596 (GLsizei)count, 1597 (GLboolean)transpose, 1598 (GLfloat *)value 1599 ); 1600 1601exit: 1602 if (value_base) { 1603 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base, 1604 JNI_ABORT); 1605 } 1606 if (_exception) { 1607 jniThrowException(_env, _exceptionType, _exceptionMessage); 1608 } 1609} 1610 1611/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1612static void 1613android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2 1614 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 1615 jint _exception = 0; 1616 const char * _exceptionType = NULL; 1617 const char * _exceptionMessage = NULL; 1618 jfloatArray _array = (jfloatArray) 0; 1619 jint _bufferOffset = (jint) 0; 1620 jint _remaining; 1621 GLfloat *value = (GLfloat *) 0; 1622 1623 if (!value_buf) { 1624 _exception = 1; 1625 _exceptionType = "java/lang/IllegalArgumentException"; 1626 _exceptionMessage = "value == null"; 1627 goto exit; 1628 } 1629 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1630 if (value == NULL) { 1631 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 1632 value = (GLfloat *) (_valueBase + _bufferOffset); 1633 } 1634 glUniformMatrix3x4fv( 1635 (GLint)location, 1636 (GLsizei)count, 1637 (GLboolean)transpose, 1638 (GLfloat *)value 1639 ); 1640 1641exit: 1642 if (_array) { 1643 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT); 1644 } 1645 if (_exception) { 1646 jniThrowException(_env, _exceptionType, _exceptionMessage); 1647 } 1648} 1649 1650/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1651static void 1652android_glUniformMatrix4x3fv__IIZ_3FI 1653 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 1654 jint _exception = 0; 1655 const char * _exceptionType = NULL; 1656 const char * _exceptionMessage = NULL; 1657 GLfloat *value_base = (GLfloat *) 0; 1658 jint _remaining; 1659 GLfloat *value = (GLfloat *) 0; 1660 1661 if (!value_ref) { 1662 _exception = 1; 1663 _exceptionType = "java/lang/IllegalArgumentException"; 1664 _exceptionMessage = "value == null"; 1665 goto exit; 1666 } 1667 if (offset < 0) { 1668 _exception = 1; 1669 _exceptionType = "java/lang/IllegalArgumentException"; 1670 _exceptionMessage = "offset < 0"; 1671 goto exit; 1672 } 1673 _remaining = _env->GetArrayLength(value_ref) - offset; 1674 value_base = (GLfloat *) 1675 _env->GetFloatArrayElements(value_ref, (jboolean *)0); 1676 value = value_base + offset; 1677 1678 glUniformMatrix4x3fv( 1679 (GLint)location, 1680 (GLsizei)count, 1681 (GLboolean)transpose, 1682 (GLfloat *)value 1683 ); 1684 1685exit: 1686 if (value_base) { 1687 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base, 1688 JNI_ABORT); 1689 } 1690 if (_exception) { 1691 jniThrowException(_env, _exceptionType, _exceptionMessage); 1692 } 1693} 1694 1695/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1696static void 1697android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2 1698 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) { 1699 jint _exception = 0; 1700 const char * _exceptionType = NULL; 1701 const char * _exceptionMessage = NULL; 1702 jfloatArray _array = (jfloatArray) 0; 1703 jint _bufferOffset = (jint) 0; 1704 jint _remaining; 1705 GLfloat *value = (GLfloat *) 0; 1706 1707 if (!value_buf) { 1708 _exception = 1; 1709 _exceptionType = "java/lang/IllegalArgumentException"; 1710 _exceptionMessage = "value == null"; 1711 goto exit; 1712 } 1713 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1714 if (value == NULL) { 1715 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 1716 value = (GLfloat *) (_valueBase + _bufferOffset); 1717 } 1718 glUniformMatrix4x3fv( 1719 (GLint)location, 1720 (GLsizei)count, 1721 (GLboolean)transpose, 1722 (GLfloat *)value 1723 ); 1724 1725exit: 1726 if (_array) { 1727 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT); 1728 } 1729 if (_exception) { 1730 jniThrowException(_env, _exceptionType, _exceptionMessage); 1731 } 1732} 1733 1734/* void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) */ 1735static void 1736android_glBlitFramebuffer__IIIIIIIIII 1737 (JNIEnv *_env, jobject _this, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { 1738 glBlitFramebuffer( 1739 (GLint)srcX0, 1740 (GLint)srcY0, 1741 (GLint)srcX1, 1742 (GLint)srcY1, 1743 (GLint)dstX0, 1744 (GLint)dstY0, 1745 (GLint)dstX1, 1746 (GLint)dstY1, 1747 (GLbitfield)mask, 1748 (GLenum)filter 1749 ); 1750} 1751 1752/* void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) */ 1753static void 1754android_glRenderbufferStorageMultisample__IIIII 1755 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height) { 1756 glRenderbufferStorageMultisample( 1757 (GLenum)target, 1758 (GLsizei)samples, 1759 (GLenum)internalformat, 1760 (GLsizei)width, 1761 (GLsizei)height 1762 ); 1763} 1764 1765/* void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) */ 1766static void 1767android_glFramebufferTextureLayer__IIIII 1768 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level, jint layer) { 1769 glFramebufferTextureLayer( 1770 (GLenum)target, 1771 (GLenum)attachment, 1772 (GLuint)texture, 1773 (GLint)level, 1774 (GLint)layer 1775 ); 1776} 1777 1778/* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */ 1779static jobject 1780android_glMapBufferRange__IIII 1781 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) { 1782 GLvoid* _p = glMapBufferRange((GLenum)target, 1783 (GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access); 1784 jobject _buf = (jobject)0; 1785 if (_p) { 1786 _buf = _env->NewDirectByteBuffer(_p, length); 1787 } 1788 return _buf; 1789} 1790 1791/* void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length ) */ 1792static void 1793android_glFlushMappedBufferRange__III 1794 (JNIEnv *_env, jobject _this, jint target, jint offset, jint length) { 1795 glFlushMappedBufferRange( 1796 (GLenum)target, 1797 (GLintptr)offset, 1798 (GLsizeiptr)length 1799 ); 1800} 1801 1802/* void glBindVertexArray ( GLuint array ) */ 1803static void 1804android_glBindVertexArray__I 1805 (JNIEnv *_env, jobject _this, jint array) { 1806 glBindVertexArray( 1807 (GLuint)array 1808 ); 1809} 1810 1811/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */ 1812static void 1813android_glDeleteVertexArrays__I_3II 1814 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) { 1815 jint _exception = 0; 1816 const char * _exceptionType = NULL; 1817 const char * _exceptionMessage = NULL; 1818 GLuint *arrays_base = (GLuint *) 0; 1819 jint _remaining; 1820 GLuint *arrays = (GLuint *) 0; 1821 1822 if (!arrays_ref) { 1823 _exception = 1; 1824 _exceptionType = "java/lang/IllegalArgumentException"; 1825 _exceptionMessage = "arrays == null"; 1826 goto exit; 1827 } 1828 if (offset < 0) { 1829 _exception = 1; 1830 _exceptionType = "java/lang/IllegalArgumentException"; 1831 _exceptionMessage = "offset < 0"; 1832 goto exit; 1833 } 1834 _remaining = _env->GetArrayLength(arrays_ref) - offset; 1835 arrays_base = (GLuint *) 1836 _env->GetIntArrayElements(arrays_ref, (jboolean *)0); 1837 arrays = arrays_base + offset; 1838 1839 glDeleteVertexArrays( 1840 (GLsizei)n, 1841 (GLuint *)arrays 1842 ); 1843 1844exit: 1845 if (arrays_base) { 1846 _env->ReleaseIntArrayElements(arrays_ref, (jint*)arrays_base, 1847 JNI_ABORT); 1848 } 1849 if (_exception) { 1850 jniThrowException(_env, _exceptionType, _exceptionMessage); 1851 } 1852} 1853 1854/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */ 1855static void 1856android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2 1857 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) { 1858 jint _exception = 0; 1859 const char * _exceptionType = NULL; 1860 const char * _exceptionMessage = NULL; 1861 jintArray _array = (jintArray) 0; 1862 jint _bufferOffset = (jint) 0; 1863 jint _remaining; 1864 GLuint *arrays = (GLuint *) 0; 1865 1866 if (!arrays_buf) { 1867 _exception = 1; 1868 _exceptionType = "java/lang/IllegalArgumentException"; 1869 _exceptionMessage = "arrays == null"; 1870 goto exit; 1871 } 1872 arrays = (GLuint *)getPointer(_env, arrays_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1873 if (arrays == NULL) { 1874 char * _arraysBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1875 arrays = (GLuint *) (_arraysBase + _bufferOffset); 1876 } 1877 glDeleteVertexArrays( 1878 (GLsizei)n, 1879 (GLuint *)arrays 1880 ); 1881 1882exit: 1883 if (_array) { 1884 _env->ReleaseIntArrayElements(_array, (jint*)arrays, JNI_ABORT); 1885 } 1886 if (_exception) { 1887 jniThrowException(_env, _exceptionType, _exceptionMessage); 1888 } 1889} 1890 1891/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */ 1892static void 1893android_glGenVertexArrays__I_3II 1894 (JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) { 1895 jint _exception = 0; 1896 const char * _exceptionType = NULL; 1897 const char * _exceptionMessage = NULL; 1898 GLuint *arrays_base = (GLuint *) 0; 1899 jint _remaining; 1900 GLuint *arrays = (GLuint *) 0; 1901 1902 if (!arrays_ref) { 1903 _exception = 1; 1904 _exceptionType = "java/lang/IllegalArgumentException"; 1905 _exceptionMessage = "arrays == 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(arrays_ref) - offset; 1915 arrays_base = (GLuint *) 1916 _env->GetIntArrayElements(arrays_ref, (jboolean *)0); 1917 arrays = arrays_base + offset; 1918 1919 glGenVertexArrays( 1920 (GLsizei)n, 1921 (GLuint *)arrays 1922 ); 1923 1924exit: 1925 if (arrays_base) { 1926 _env->ReleaseIntArrayElements(arrays_ref, (jint*)arrays_base, 1927 _exception ? JNI_ABORT: 0); 1928 } 1929 if (_exception) { 1930 jniThrowException(_env, _exceptionType, _exceptionMessage); 1931 } 1932} 1933 1934/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */ 1935static void 1936android_glGenVertexArrays__ILjava_nio_IntBuffer_2 1937 (JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) { 1938 jint _exception = 0; 1939 const char * _exceptionType = NULL; 1940 const char * _exceptionMessage = NULL; 1941 jintArray _array = (jintArray) 0; 1942 jint _bufferOffset = (jint) 0; 1943 jint _remaining; 1944 GLuint *arrays = (GLuint *) 0; 1945 1946 if (!arrays_buf) { 1947 _exception = 1; 1948 _exceptionType = "java/lang/IllegalArgumentException"; 1949 _exceptionMessage = "arrays == null"; 1950 goto exit; 1951 } 1952 arrays = (GLuint *)getPointer(_env, arrays_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 1953 if (arrays == NULL) { 1954 char * _arraysBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 1955 arrays = (GLuint *) (_arraysBase + _bufferOffset); 1956 } 1957 glGenVertexArrays( 1958 (GLsizei)n, 1959 (GLuint *)arrays 1960 ); 1961 1962exit: 1963 if (_array) { 1964 _env->ReleaseIntArrayElements(_array, (jint*)arrays, _exception ? JNI_ABORT : 0); 1965 } 1966 if (_exception) { 1967 jniThrowException(_env, _exceptionType, _exceptionMessage); 1968 } 1969} 1970 1971/* GLboolean glIsVertexArray ( GLuint array ) */ 1972static jboolean 1973android_glIsVertexArray__I 1974 (JNIEnv *_env, jobject _this, jint array) { 1975 GLboolean _returnValue; 1976 _returnValue = glIsVertexArray( 1977 (GLuint)array 1978 ); 1979 return (jboolean)_returnValue; 1980} 1981 1982/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */ 1983static void 1984android_glGetIntegeri_v__II_3II 1985 (JNIEnv *_env, jobject _this, jint target, jint index, jintArray data_ref, jint offset) { 1986 jint _exception = 0; 1987 const char * _exceptionType = NULL; 1988 const char * _exceptionMessage = NULL; 1989 GLint *data_base = (GLint *) 0; 1990 jint _remaining; 1991 GLint *data = (GLint *) 0; 1992 1993 if (!data_ref) { 1994 _exception = 1; 1995 _exceptionType = "java/lang/IllegalArgumentException"; 1996 _exceptionMessage = "data == null"; 1997 goto exit; 1998 } 1999 if (offset < 0) { 2000 _exception = 1; 2001 _exceptionType = "java/lang/IllegalArgumentException"; 2002 _exceptionMessage = "offset < 0"; 2003 goto exit; 2004 } 2005 _remaining = _env->GetArrayLength(data_ref) - offset; 2006 data_base = (GLint *) 2007 _env->GetIntArrayElements(data_ref, (jboolean *)0); 2008 data = data_base + offset; 2009 2010 glGetIntegeri_v( 2011 (GLenum)target, 2012 (GLuint)index, 2013 (GLint *)data 2014 ); 2015 2016exit: 2017 if (data_base) { 2018 _env->ReleaseIntArrayElements(data_ref, (jint*)data_base, 2019 _exception ? JNI_ABORT: 0); 2020 } 2021 if (_exception) { 2022 jniThrowException(_env, _exceptionType, _exceptionMessage); 2023 } 2024} 2025 2026/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */ 2027static void 2028android_glGetIntegeri_v__IILjava_nio_IntBuffer_2 2029 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) { 2030 jint _exception = 0; 2031 const char * _exceptionType = NULL; 2032 const char * _exceptionMessage = NULL; 2033 jintArray _array = (jintArray) 0; 2034 jint _bufferOffset = (jint) 0; 2035 jint _remaining; 2036 GLint *data = (GLint *) 0; 2037 2038 if (!data_buf) { 2039 _exception = 1; 2040 _exceptionType = "java/lang/IllegalArgumentException"; 2041 _exceptionMessage = "data == null"; 2042 goto exit; 2043 } 2044 data = (GLint *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2045 if (data == NULL) { 2046 char * _dataBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2047 data = (GLint *) (_dataBase + _bufferOffset); 2048 } 2049 glGetIntegeri_v( 2050 (GLenum)target, 2051 (GLuint)index, 2052 (GLint *)data 2053 ); 2054 2055exit: 2056 if (_array) { 2057 _env->ReleaseIntArrayElements(_array, (jint*)data, _exception ? JNI_ABORT : 0); 2058 } 2059 if (_exception) { 2060 jniThrowException(_env, _exceptionType, _exceptionMessage); 2061 } 2062} 2063 2064/* void glBeginTransformFeedback ( GLenum primitiveMode ) */ 2065static void 2066android_glBeginTransformFeedback__I 2067 (JNIEnv *_env, jobject _this, jint primitiveMode) { 2068 glBeginTransformFeedback( 2069 (GLenum)primitiveMode 2070 ); 2071} 2072 2073/* void glEndTransformFeedback ( void ) */ 2074static void 2075android_glEndTransformFeedback__ 2076 (JNIEnv *_env, jobject _this) { 2077 glEndTransformFeedback(); 2078} 2079 2080/* void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) */ 2081static void 2082android_glBindBufferRange__IIIII 2083 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer, jint offset, jint size) { 2084 glBindBufferRange( 2085 (GLenum)target, 2086 (GLuint)index, 2087 (GLuint)buffer, 2088 (GLintptr)offset, 2089 (GLsizeiptr)size 2090 ); 2091} 2092 2093/* void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer ) */ 2094static void 2095android_glBindBufferBase__III 2096 (JNIEnv *_env, jobject _this, jint target, jint index, jint buffer) { 2097 glBindBufferBase( 2098 (GLenum)target, 2099 (GLuint)index, 2100 (GLuint)buffer 2101 ); 2102} 2103 2104/* void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) */ 2105static 2106void 2107android_glTransformFeedbackVaryings 2108 (JNIEnv *_env, jobject _this, jint program, jobjectArray varyings_ref, jint bufferMode) { 2109 jint _exception = 0; 2110 const char* _exceptionType = NULL; 2111 const char* _exceptionMessage = NULL; 2112 jint _count = 0, _i; 2113 const char** _varyings = NULL; 2114 const char* _varying = NULL; 2115 2116 if (!varyings_ref) { 2117 _exception = 1; 2118 _exceptionType = "java/lang/IllegalArgumentException"; 2119 _exceptionMessage = "varyings == null"; 2120 goto exit; 2121 } 2122 2123 _count = _env->GetArrayLength(varyings_ref); 2124 _varyings = (const char**)calloc(_count, sizeof(const char*)); 2125 for (_i = 0; _i < _count; _i++) { 2126 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i); 2127 if (!_varying) { 2128 _exception = 1; 2129 _exceptionType = "java/lang/IllegalArgumentException"; 2130 _exceptionMessage = "null varyings element"; 2131 goto exit; 2132 } 2133 _varyings[_i] = _env->GetStringUTFChars(_varying, 0); 2134 } 2135 2136 glTransformFeedbackVaryings(program, _count, _varyings, bufferMode); 2137 2138exit: 2139 for (_i = _count - 1; _i >= 0; _i--) { 2140 if (_varyings[_i]) { 2141 jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i); 2142 if (_varying) { 2143 _env->ReleaseStringUTFChars(_varying, _varyings[_i]); 2144 } 2145 } 2146 } 2147 free(_varyings); 2148 if (_exception) { 2149 jniThrowException(_env, _exceptionType, _exceptionMessage); 2150 } 2151} 2152 2153/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ 2154static void 2155android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI 2156 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) { 2157 jint _exception = 0; 2158 const char * _exceptionType; 2159 const char * _exceptionMessage; 2160 GLsizei *length_base = (GLsizei *) 0; 2161 jint _lengthRemaining; 2162 GLsizei *length = (GLsizei *) 0; 2163 GLint *size_base = (GLint *) 0; 2164 jint _sizeRemaining; 2165 GLint *size = (GLint *) 0; 2166 GLenum *type_base = (GLenum *) 0; 2167 jint _typeRemaining; 2168 GLenum *type = (GLenum *) 0; 2169 char *name_base = (char *) 0; 2170 jint _nameRemaining; 2171 char *name = (char *) 0; 2172 2173 if (length_ref) { 2174 if (lengthOffset < 0) { 2175 _exception = 1; 2176 _exceptionType = "java/lang/IllegalArgumentException"; 2177 _exceptionMessage = "lengthOffset < 0"; 2178 goto exit; 2179 } 2180 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 2181 length_base = (GLsizei *) 2182 _env->GetIntArrayElements(length_ref, (jboolean *)0); 2183 length = length_base + lengthOffset; 2184 } 2185 2186 if (!size_ref) { 2187 _exception = 1; 2188 _exceptionType = "java/lang/IllegalArgumentException"; 2189 _exceptionMessage = "size == null"; 2190 goto exit; 2191 } 2192 if (sizeOffset < 0) { 2193 _exception = 1; 2194 _exceptionType = "java/lang/IllegalArgumentException"; 2195 _exceptionMessage = "sizeOffset < 0"; 2196 goto exit; 2197 } 2198 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; 2199 size_base = (GLint *) 2200 _env->GetIntArrayElements(size_ref, (jboolean *)0); 2201 size = size_base + sizeOffset; 2202 2203 if (!type_ref) { 2204 _exception = 1; 2205 _exceptionType = "java/lang/IllegalArgumentException"; 2206 _exceptionMessage = "type == null"; 2207 goto exit; 2208 } 2209 if (typeOffset < 0) { 2210 _exception = 1; 2211 _exceptionType = "java/lang/IllegalArgumentException"; 2212 _exceptionMessage = "typeOffset < 0"; 2213 goto exit; 2214 } 2215 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; 2216 type_base = (GLenum *) 2217 _env->GetIntArrayElements(type_ref, (jboolean *)0); 2218 type = type_base + typeOffset; 2219 2220 if (!name_ref) { 2221 _exception = 1; 2222 _exceptionType = "java/lang/IllegalArgumentException"; 2223 _exceptionMessage = "name == null"; 2224 goto exit; 2225 } 2226 if (nameOffset < 0) { 2227 _exception = 1; 2228 _exceptionType = "java/lang/IllegalArgumentException"; 2229 _exceptionMessage = "nameOffset < 0"; 2230 goto exit; 2231 } 2232 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; 2233 name_base = (char *) 2234 _env->GetByteArrayElements(name_ref, (jboolean *)0); 2235 name = name_base + nameOffset; 2236 2237 glGetTransformFeedbackVarying( 2238 (GLuint)program, 2239 (GLuint)index, 2240 (GLsizei)bufsize, 2241 (GLsizei *)length, 2242 (GLint *)size, 2243 (GLenum *)type, 2244 (char *)name 2245 ); 2246 2247exit: 2248 if (name_base) { 2249 _env->ReleaseByteArrayElements(name_ref, (jbyte*)name_base, 2250 _exception ? JNI_ABORT: 0); 2251 } 2252 if (type_base) { 2253 _env->ReleaseIntArrayElements(type_ref, (jint*)type_base, 2254 _exception ? JNI_ABORT: 0); 2255 } 2256 if (size_base) { 2257 _env->ReleaseIntArrayElements(size_ref, (jint*)size_base, 2258 _exception ? JNI_ABORT: 0); 2259 } 2260 if (length_base) { 2261 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base, 2262 _exception ? JNI_ABORT: 0); 2263 } 2264 if (_exception) { 2265 jniThrowException(_env, _exceptionType, _exceptionMessage); 2266 } 2267} 2268 2269/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ 2270static void 2271android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B 2272 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) { 2273 jniThrowException(_env, "java/lang/UnsupportedOperationException", "deprecated"); 2274} 2275 2276/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ 2277static void 2278android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 2279 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jobject name_buf) { 2280 jintArray _lengthArray = (jintArray) 0; 2281 jint _lengthBufferOffset = (jint) 0; 2282 jintArray _sizeArray = (jintArray) 0; 2283 jint _sizeBufferOffset = (jint) 0; 2284 jintArray _typeArray = (jintArray) 0; 2285 jint _typeBufferOffset = (jint) 0; 2286 jbyteArray _nameArray = (jbyteArray)0; 2287 jint _nameBufferOffset = (jint)0; 2288 jint _lengthRemaining; 2289 GLsizei *length = (GLsizei *) 0; 2290 jint _sizeRemaining; 2291 GLint *size = (GLint *) 0; 2292 jint _typeRemaining; 2293 GLenum *type = (GLenum *) 0; 2294 jint _nameRemaining; 2295 GLchar* name = (GLchar*)0; 2296 2297 2298 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset); 2299 size = (GLint *)getPointer(_env, size_buf, (jarray*)&_sizeArray, &_sizeRemaining, &_sizeBufferOffset); 2300 type = (GLenum *)getPointer(_env, type_buf, (jarray*)&_typeArray, &_typeRemaining, &_typeBufferOffset); 2301 name = (GLchar*)getPointer(_env, name_buf, (jarray*)&_nameArray, &_nameRemaining, &_nameBufferOffset); 2302 if (length == NULL) { 2303 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0); 2304 length = (GLsizei *) (_lengthBase + _lengthBufferOffset); 2305 } 2306 if (size == NULL) { 2307 char * _sizeBase = (char *)_env->GetIntArrayElements(_sizeArray, (jboolean *) 0); 2308 size = (GLint *) (_sizeBase + _sizeBufferOffset); 2309 } 2310 if (type == NULL) { 2311 char * _typeBase = (char *)_env->GetIntArrayElements(_typeArray, (jboolean *) 0); 2312 type = (GLenum *) (_typeBase + _typeBufferOffset); 2313 } 2314 if (name == NULL) { 2315 char* _nameBase = (char *)_env->GetByteArrayElements(_nameArray, (jboolean*)0); 2316 name = (GLchar *) (_nameBase + _nameBufferOffset); 2317 } 2318 glGetTransformFeedbackVarying( 2319 (GLuint)program, 2320 (GLuint)index, 2321 (GLsizei)bufsize, 2322 (GLsizei *)length, 2323 (GLint *)size, 2324 (GLenum *)type, 2325 (GLchar*)name 2326 ); 2327 if (_typeArray) { 2328 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _typeArray, (jint*)type, JNI_TRUE); 2329 } 2330 if (_sizeArray) { 2331 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _sizeArray, (jint*)size, JNI_TRUE); 2332 } 2333 if (_lengthArray) { 2334 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _lengthArray, (jint*)length, JNI_TRUE); 2335 } 2336 if (_nameArray) { 2337 releaseArrayPointer<jbyteArray, jbyte*, ByteArrayReleaser>(_env, _nameArray, (jbyte*)name, JNI_TRUE); 2338 } 2339} 2340 2341/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ 2342static jstring 2343android_glGetTransformFeedbackVarying1 2344 (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) { 2345 jint _exception = 0; 2346 const char * _exceptionType; 2347 const char * _exceptionMessage; 2348 GLint *size_base = (GLint *) 0; 2349 jint _sizeRemaining; 2350 GLint *size = (GLint *) 0; 2351 GLenum *type_base = (GLenum *) 0; 2352 jint _typeRemaining; 2353 GLenum *type = (GLenum *) 0; 2354 2355 jstring result = 0; 2356 2357 GLint len = 0; 2358 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len); 2359 if (!len) { 2360 return _env->NewStringUTF(""); 2361 } 2362 char* buf = (char*) malloc(len); 2363 2364 if (buf == NULL) { 2365 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory"); 2366 return NULL; 2367 } 2368 if (!size_ref) { 2369 _exception = 1; 2370 _exceptionType = "java/lang/IllegalArgumentException"; 2371 _exceptionMessage = "size == null"; 2372 goto exit; 2373 } 2374 if (sizeOffset < 0) { 2375 _exception = 1; 2376 _exceptionType = "java/lang/IllegalArgumentException"; 2377 _exceptionMessage = "sizeOffset < 0"; 2378 goto exit; 2379 } 2380 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; 2381 size_base = (GLint *) 2382 _env->GetIntArrayElements(size_ref, (jboolean *)0); 2383 size = size_base + sizeOffset; 2384 2385 if (!type_ref) { 2386 _exception = 1; 2387 _exceptionType = "java/lang/IllegalArgumentException"; 2388 _exceptionMessage = "type == null"; 2389 goto exit; 2390 } 2391 if (typeOffset < 0) { 2392 _exception = 1; 2393 _exceptionType = "java/lang/IllegalArgumentException"; 2394 _exceptionMessage = "typeOffset < 0"; 2395 goto exit; 2396 } 2397 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; 2398 type_base = (GLenum *) 2399 _env->GetIntArrayElements(type_ref, (jboolean *)0); 2400 type = type_base + typeOffset; 2401 2402 glGetTransformFeedbackVarying( 2403 (GLuint)program, 2404 (GLuint)index, 2405 (GLsizei)len, 2406 NULL, 2407 (GLint *)size, 2408 (GLenum *)type, 2409 (char *)buf 2410 ); 2411exit: 2412 if (type_base) { 2413 _env->ReleaseIntArrayElements(type_ref, (jint*)type_base, 2414 _exception ? JNI_ABORT: 0); 2415 } 2416 if (size_base) { 2417 _env->ReleaseIntArrayElements(size_ref, (jint*)size_base, 2418 _exception ? JNI_ABORT: 0); 2419 } 2420 if (_exception != 1) { 2421 result = _env->NewStringUTF(buf); 2422 } 2423 if (buf) { 2424 free(buf); 2425 } 2426 if (_exception) { 2427 jniThrowException(_env, _exceptionType, _exceptionMessage); 2428 } 2429 if (result == 0) { 2430 result = _env->NewStringUTF(""); 2431 } 2432 2433 return result; 2434} 2435 2436/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ 2437static jstring 2438android_glGetTransformFeedbackVarying2 2439 (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) { 2440 jintArray _sizeArray = (jintArray) 0; 2441 jint _sizeBufferOffset = (jint) 0; 2442 jintArray _typeArray = (jintArray) 0; 2443 jint _typeBufferOffset = (jint) 0; 2444 jint _lengthRemaining; 2445 GLsizei *length = (GLsizei *) 0; 2446 jint _sizeRemaining; 2447 GLint *size = (GLint *) 0; 2448 jint _typeRemaining; 2449 GLenum *type = (GLenum *) 0; 2450 2451 jstring result = 0; 2452 2453 GLint len = 0; 2454 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len); 2455 if (!len) { 2456 return _env->NewStringUTF(""); 2457 } 2458 char* buf = (char*) malloc(len); 2459 2460 if (buf == NULL) { 2461 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory"); 2462 return NULL; 2463 } 2464 2465 size = (GLint *)getPointer(_env, size_buf, (jarray*)&_sizeArray, &_sizeRemaining, &_sizeBufferOffset); 2466 type = (GLenum *)getPointer(_env, type_buf, (jarray*)&_typeArray, &_typeRemaining, &_typeBufferOffset); 2467 if (size == NULL) { 2468 char * _sizeBase = (char *)_env->GetIntArrayElements(_sizeArray, (jboolean *) 0); 2469 size = (GLint *) (_sizeBase + _sizeBufferOffset); 2470 } 2471 if (type == NULL) { 2472 char * _typeBase = (char *)_env->GetIntArrayElements(_typeArray, (jboolean *) 0); 2473 type = (GLenum *) (_typeBase + _typeBufferOffset); 2474 } 2475 glGetTransformFeedbackVarying( 2476 (GLuint)program, 2477 (GLuint)index, 2478 (GLsizei)len, 2479 NULL, 2480 (GLint *)size, 2481 (GLenum *)type, 2482 (char *)buf 2483 ); 2484 2485 if (_typeArray) { 2486 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _typeArray, (jint*)type, JNI_TRUE); 2487 } 2488 if (_sizeArray) { 2489 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _sizeArray, (jint*)size, JNI_TRUE); 2490 } 2491 result = _env->NewStringUTF(buf); 2492 if (buf) { 2493 free(buf); 2494 } 2495 return result; 2496} 2497/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */ 2498static void 2499android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I 2500 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) { 2501 jint _exception = 0; 2502 const char * _exceptionType = NULL; 2503 const char * _exceptionMessage = NULL; 2504 jarray _array = (jarray) 0; 2505 jint _bufferOffset = (jint) 0; 2506 jint _remaining; 2507 GLvoid *pointer = (GLvoid *) 0; 2508 2509 if (pointer_buf) { 2510 pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf); 2511 if ( ! pointer ) { 2512 return; 2513 } 2514 } 2515 glVertexAttribIPointerBounds( 2516 (GLuint)index, 2517 (GLint)size, 2518 (GLenum)type, 2519 (GLsizei)stride, 2520 (GLvoid *)pointer, 2521 (GLsizei)remaining 2522 ); 2523 if (_exception) { 2524 jniThrowException(_env, _exceptionType, _exceptionMessage); 2525 } 2526} 2527 2528/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset ) */ 2529static void 2530android_glVertexAttribIPointer__IIIII 2531 (JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jint offset) { 2532 glVertexAttribIPointer( 2533 (GLuint)index, 2534 (GLint)size, 2535 (GLenum)type, 2536 (GLsizei)stride, 2537 reinterpret_cast<GLvoid *>(offset) 2538 ); 2539} 2540 2541/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */ 2542static void 2543android_glGetVertexAttribIiv__II_3II 2544 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) { 2545 jint _exception = 0; 2546 const char * _exceptionType = NULL; 2547 const char * _exceptionMessage = NULL; 2548 GLint *params_base = (GLint *) 0; 2549 jint _remaining; 2550 GLint *params = (GLint *) 0; 2551 2552 if (!params_ref) { 2553 _exception = 1; 2554 _exceptionType = "java/lang/IllegalArgumentException"; 2555 _exceptionMessage = "params == null"; 2556 goto exit; 2557 } 2558 if (offset < 0) { 2559 _exception = 1; 2560 _exceptionType = "java/lang/IllegalArgumentException"; 2561 _exceptionMessage = "offset < 0"; 2562 goto exit; 2563 } 2564 _remaining = _env->GetArrayLength(params_ref) - offset; 2565 params_base = (GLint *) 2566 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2567 params = params_base + offset; 2568 2569 glGetVertexAttribIiv( 2570 (GLuint)index, 2571 (GLenum)pname, 2572 (GLint *)params 2573 ); 2574 2575exit: 2576 if (params_base) { 2577 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2578 _exception ? JNI_ABORT: 0); 2579 } 2580 if (_exception) { 2581 jniThrowException(_env, _exceptionType, _exceptionMessage); 2582 } 2583} 2584 2585/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */ 2586static void 2587android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2 2588 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) { 2589 jint _exception = 0; 2590 const char * _exceptionType = NULL; 2591 const char * _exceptionMessage = NULL; 2592 jintArray _array = (jintArray) 0; 2593 jint _bufferOffset = (jint) 0; 2594 jint _remaining; 2595 GLint *params = (GLint *) 0; 2596 2597 if (!params_buf) { 2598 _exception = 1; 2599 _exceptionType = "java/lang/IllegalArgumentException"; 2600 _exceptionMessage = "params == null"; 2601 goto exit; 2602 } 2603 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2604 if (params == NULL) { 2605 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2606 params = (GLint *) (_paramsBase + _bufferOffset); 2607 } 2608 glGetVertexAttribIiv( 2609 (GLuint)index, 2610 (GLenum)pname, 2611 (GLint *)params 2612 ); 2613 2614exit: 2615 if (_array) { 2616 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 2617 } 2618 if (_exception) { 2619 jniThrowException(_env, _exceptionType, _exceptionMessage); 2620 } 2621} 2622 2623/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */ 2624static void 2625android_glGetVertexAttribIuiv__II_3II 2626 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) { 2627 jint _exception = 0; 2628 const char * _exceptionType = NULL; 2629 const char * _exceptionMessage = NULL; 2630 GLuint *params_base = (GLuint *) 0; 2631 jint _remaining; 2632 GLuint *params = (GLuint *) 0; 2633 2634 if (!params_ref) { 2635 _exception = 1; 2636 _exceptionType = "java/lang/IllegalArgumentException"; 2637 _exceptionMessage = "params == null"; 2638 goto exit; 2639 } 2640 if (offset < 0) { 2641 _exception = 1; 2642 _exceptionType = "java/lang/IllegalArgumentException"; 2643 _exceptionMessage = "offset < 0"; 2644 goto exit; 2645 } 2646 _remaining = _env->GetArrayLength(params_ref) - offset; 2647 params_base = (GLuint *) 2648 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2649 params = params_base + offset; 2650 2651 glGetVertexAttribIuiv( 2652 (GLuint)index, 2653 (GLenum)pname, 2654 (GLuint *)params 2655 ); 2656 2657exit: 2658 if (params_base) { 2659 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2660 _exception ? JNI_ABORT: 0); 2661 } 2662 if (_exception) { 2663 jniThrowException(_env, _exceptionType, _exceptionMessage); 2664 } 2665} 2666 2667/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */ 2668static void 2669android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2 2670 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) { 2671 jint _exception = 0; 2672 const char * _exceptionType = NULL; 2673 const char * _exceptionMessage = NULL; 2674 jintArray _array = (jintArray) 0; 2675 jint _bufferOffset = (jint) 0; 2676 jint _remaining; 2677 GLuint *params = (GLuint *) 0; 2678 2679 if (!params_buf) { 2680 _exception = 1; 2681 _exceptionType = "java/lang/IllegalArgumentException"; 2682 _exceptionMessage = "params == null"; 2683 goto exit; 2684 } 2685 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2686 if (params == NULL) { 2687 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2688 params = (GLuint *) (_paramsBase + _bufferOffset); 2689 } 2690 glGetVertexAttribIuiv( 2691 (GLuint)index, 2692 (GLenum)pname, 2693 (GLuint *)params 2694 ); 2695 2696exit: 2697 if (_array) { 2698 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 2699 } 2700 if (_exception) { 2701 jniThrowException(_env, _exceptionType, _exceptionMessage); 2702 } 2703} 2704 2705/* void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w ) */ 2706static void 2707android_glVertexAttribI4i__IIIII 2708 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) { 2709 glVertexAttribI4i( 2710 (GLuint)index, 2711 (GLint)x, 2712 (GLint)y, 2713 (GLint)z, 2714 (GLint)w 2715 ); 2716} 2717 2718/* void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) */ 2719static void 2720android_glVertexAttribI4ui__IIIII 2721 (JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) { 2722 glVertexAttribI4ui( 2723 (GLuint)index, 2724 (GLuint)x, 2725 (GLuint)y, 2726 (GLuint)z, 2727 (GLuint)w 2728 ); 2729} 2730 2731/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */ 2732static void 2733android_glVertexAttribI4iv__I_3II 2734 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) { 2735 jint _exception = 0; 2736 const char * _exceptionType = NULL; 2737 const char * _exceptionMessage = NULL; 2738 GLint *v_base = (GLint *) 0; 2739 jint _remaining; 2740 GLint *v = (GLint *) 0; 2741 2742 if (!v_ref) { 2743 _exception = 1; 2744 _exceptionType = "java/lang/IllegalArgumentException"; 2745 _exceptionMessage = "v == null"; 2746 goto exit; 2747 } 2748 if (offset < 0) { 2749 _exception = 1; 2750 _exceptionType = "java/lang/IllegalArgumentException"; 2751 _exceptionMessage = "offset < 0"; 2752 goto exit; 2753 } 2754 _remaining = _env->GetArrayLength(v_ref) - offset; 2755 v_base = (GLint *) 2756 _env->GetIntArrayElements(v_ref, (jboolean *)0); 2757 v = v_base + offset; 2758 2759 glVertexAttribI4iv( 2760 (GLuint)index, 2761 (GLint *)v 2762 ); 2763 2764exit: 2765 if (v_base) { 2766 _env->ReleaseIntArrayElements(v_ref, (jint*)v_base, 2767 JNI_ABORT); 2768 } 2769 if (_exception) { 2770 jniThrowException(_env, _exceptionType, _exceptionMessage); 2771 } 2772} 2773 2774/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */ 2775static void 2776android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2 2777 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) { 2778 jint _exception = 0; 2779 const char * _exceptionType = NULL; 2780 const char * _exceptionMessage = NULL; 2781 jintArray _array = (jintArray) 0; 2782 jint _bufferOffset = (jint) 0; 2783 jint _remaining; 2784 GLint *v = (GLint *) 0; 2785 2786 if (!v_buf) { 2787 _exception = 1; 2788 _exceptionType = "java/lang/IllegalArgumentException"; 2789 _exceptionMessage = "v == null"; 2790 goto exit; 2791 } 2792 v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2793 if (v == NULL) { 2794 char * _vBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2795 v = (GLint *) (_vBase + _bufferOffset); 2796 } 2797 glVertexAttribI4iv( 2798 (GLuint)index, 2799 (GLint *)v 2800 ); 2801 2802exit: 2803 if (_array) { 2804 _env->ReleaseIntArrayElements(_array, (jint*)v, JNI_ABORT); 2805 } 2806 if (_exception) { 2807 jniThrowException(_env, _exceptionType, _exceptionMessage); 2808 } 2809} 2810 2811/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */ 2812static void 2813android_glVertexAttribI4uiv__I_3II 2814 (JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) { 2815 jint _exception = 0; 2816 const char * _exceptionType = NULL; 2817 const char * _exceptionMessage = NULL; 2818 GLuint *v_base = (GLuint *) 0; 2819 jint _remaining; 2820 GLuint *v = (GLuint *) 0; 2821 2822 if (!v_ref) { 2823 _exception = 1; 2824 _exceptionType = "java/lang/IllegalArgumentException"; 2825 _exceptionMessage = "v == null"; 2826 goto exit; 2827 } 2828 if (offset < 0) { 2829 _exception = 1; 2830 _exceptionType = "java/lang/IllegalArgumentException"; 2831 _exceptionMessage = "offset < 0"; 2832 goto exit; 2833 } 2834 _remaining = _env->GetArrayLength(v_ref) - offset; 2835 v_base = (GLuint *) 2836 _env->GetIntArrayElements(v_ref, (jboolean *)0); 2837 v = v_base + offset; 2838 2839 glVertexAttribI4uiv( 2840 (GLuint)index, 2841 (GLuint *)v 2842 ); 2843 2844exit: 2845 if (v_base) { 2846 _env->ReleaseIntArrayElements(v_ref, (jint*)v_base, 2847 JNI_ABORT); 2848 } 2849 if (_exception) { 2850 jniThrowException(_env, _exceptionType, _exceptionMessage); 2851 } 2852} 2853 2854/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */ 2855static void 2856android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2 2857 (JNIEnv *_env, jobject _this, jint index, jobject v_buf) { 2858 jint _exception = 0; 2859 const char * _exceptionType = NULL; 2860 const char * _exceptionMessage = NULL; 2861 jintArray _array = (jintArray) 0; 2862 jint _bufferOffset = (jint) 0; 2863 jint _remaining; 2864 GLuint *v = (GLuint *) 0; 2865 2866 if (!v_buf) { 2867 _exception = 1; 2868 _exceptionType = "java/lang/IllegalArgumentException"; 2869 _exceptionMessage = "v == null"; 2870 goto exit; 2871 } 2872 v = (GLuint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2873 if (v == NULL) { 2874 char * _vBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2875 v = (GLuint *) (_vBase + _bufferOffset); 2876 } 2877 glVertexAttribI4uiv( 2878 (GLuint)index, 2879 (GLuint *)v 2880 ); 2881 2882exit: 2883 if (_array) { 2884 _env->ReleaseIntArrayElements(_array, (jint*)v, JNI_ABORT); 2885 } 2886 if (_exception) { 2887 jniThrowException(_env, _exceptionType, _exceptionMessage); 2888 } 2889} 2890 2891/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */ 2892static void 2893android_glGetUniformuiv__II_3II 2894 (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) { 2895 jint _exception = 0; 2896 const char * _exceptionType = NULL; 2897 const char * _exceptionMessage = NULL; 2898 GLuint *params_base = (GLuint *) 0; 2899 jint _remaining; 2900 GLuint *params = (GLuint *) 0; 2901 2902 if (!params_ref) { 2903 _exception = 1; 2904 _exceptionType = "java/lang/IllegalArgumentException"; 2905 _exceptionMessage = "params == null"; 2906 goto exit; 2907 } 2908 if (offset < 0) { 2909 _exception = 1; 2910 _exceptionType = "java/lang/IllegalArgumentException"; 2911 _exceptionMessage = "offset < 0"; 2912 goto exit; 2913 } 2914 _remaining = _env->GetArrayLength(params_ref) - offset; 2915 params_base = (GLuint *) 2916 _env->GetIntArrayElements(params_ref, (jboolean *)0); 2917 params = params_base + offset; 2918 2919 glGetUniformuiv( 2920 (GLuint)program, 2921 (GLint)location, 2922 (GLuint *)params 2923 ); 2924 2925exit: 2926 if (params_base) { 2927 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 2928 _exception ? JNI_ABORT: 0); 2929 } 2930 if (_exception) { 2931 jniThrowException(_env, _exceptionType, _exceptionMessage); 2932 } 2933} 2934 2935/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */ 2936static void 2937android_glGetUniformuiv__IILjava_nio_IntBuffer_2 2938 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) { 2939 jint _exception = 0; 2940 const char * _exceptionType = NULL; 2941 const char * _exceptionMessage = NULL; 2942 jintArray _array = (jintArray) 0; 2943 jint _bufferOffset = (jint) 0; 2944 jint _remaining; 2945 GLuint *params = (GLuint *) 0; 2946 2947 if (!params_buf) { 2948 _exception = 1; 2949 _exceptionType = "java/lang/IllegalArgumentException"; 2950 _exceptionMessage = "params == null"; 2951 goto exit; 2952 } 2953 params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 2954 if (params == NULL) { 2955 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 2956 params = (GLuint *) (_paramsBase + _bufferOffset); 2957 } 2958 glGetUniformuiv( 2959 (GLuint)program, 2960 (GLint)location, 2961 (GLuint *)params 2962 ); 2963 2964exit: 2965 if (_array) { 2966 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 2967 } 2968 if (_exception) { 2969 jniThrowException(_env, _exceptionType, _exceptionMessage); 2970 } 2971} 2972 2973/* GLint glGetFragDataLocation ( GLuint program, const GLchar *name ) */ 2974static jint 2975android_glGetFragDataLocation__ILjava_lang_String_2 2976 (JNIEnv *_env, jobject _this, jint program, jstring name) { 2977 jint _exception = 0; 2978 const char * _exceptionType = NULL; 2979 const char * _exceptionMessage = NULL; 2980 GLint _returnValue = 0; 2981 const char* _nativename = 0; 2982 2983 if (!name) { 2984 _exception = 1; 2985 _exceptionType = "java/lang/IllegalArgumentException"; 2986 _exceptionMessage = "name == null"; 2987 goto exit; 2988 } 2989 _nativename = _env->GetStringUTFChars(name, 0); 2990 2991 _returnValue = glGetFragDataLocation( 2992 (GLuint)program, 2993 (GLchar *)_nativename 2994 ); 2995 2996exit: 2997 if (_nativename) { 2998 _env->ReleaseStringUTFChars(name, _nativename); 2999 } 3000 3001 if (_exception) { 3002 jniThrowException(_env, _exceptionType, _exceptionMessage); 3003 } 3004 return (jint)_returnValue; 3005} 3006 3007/* void glUniform1ui ( GLint location, GLuint v0 ) */ 3008static void 3009android_glUniform1ui__II 3010 (JNIEnv *_env, jobject _this, jint location, jint v0) { 3011 glUniform1ui( 3012 (GLint)location, 3013 (GLuint)v0 3014 ); 3015} 3016 3017/* void glUniform2ui ( GLint location, GLuint v0, GLuint v1 ) */ 3018static void 3019android_glUniform2ui__III 3020 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1) { 3021 glUniform2ui( 3022 (GLint)location, 3023 (GLuint)v0, 3024 (GLuint)v1 3025 ); 3026} 3027 3028/* void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 ) */ 3029static void 3030android_glUniform3ui__IIII 3031 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2) { 3032 glUniform3ui( 3033 (GLint)location, 3034 (GLuint)v0, 3035 (GLuint)v1, 3036 (GLuint)v2 3037 ); 3038} 3039 3040/* void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */ 3041static void 3042android_glUniform4ui__IIIII 3043 (JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2, jint v3) { 3044 glUniform4ui( 3045 (GLint)location, 3046 (GLuint)v0, 3047 (GLuint)v1, 3048 (GLuint)v2, 3049 (GLuint)v3 3050 ); 3051} 3052 3053/* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3054static void 3055android_glUniform1uiv__II_3II 3056 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) { 3057 jint _exception = 0; 3058 const char * _exceptionType = NULL; 3059 const char * _exceptionMessage = NULL; 3060 GLuint *value_base = (GLuint *) 0; 3061 jint _remaining; 3062 GLuint *value = (GLuint *) 0; 3063 3064 if (!value_ref) { 3065 _exception = 1; 3066 _exceptionType = "java/lang/IllegalArgumentException"; 3067 _exceptionMessage = "value == null"; 3068 goto exit; 3069 } 3070 if (offset < 0) { 3071 _exception = 1; 3072 _exceptionType = "java/lang/IllegalArgumentException"; 3073 _exceptionMessage = "offset < 0"; 3074 goto exit; 3075 } 3076 _remaining = _env->GetArrayLength(value_ref) - offset; 3077 value_base = (GLuint *) 3078 _env->GetIntArrayElements(value_ref, (jboolean *)0); 3079 value = value_base + offset; 3080 3081 glUniform1uiv( 3082 (GLint)location, 3083 (GLsizei)count, 3084 (GLuint *)value 3085 ); 3086 3087exit: 3088 if (value_base) { 3089 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base, 3090 JNI_ABORT); 3091 } 3092 if (_exception) { 3093 jniThrowException(_env, _exceptionType, _exceptionMessage); 3094 } 3095} 3096 3097/* void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3098static void 3099android_glUniform1uiv__IILjava_nio_IntBuffer_2 3100 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) { 3101 jint _exception = 0; 3102 const char * _exceptionType = NULL; 3103 const char * _exceptionMessage = NULL; 3104 jintArray _array = (jintArray) 0; 3105 jint _bufferOffset = (jint) 0; 3106 jint _remaining; 3107 GLuint *value = (GLuint *) 0; 3108 3109 if (!value_buf) { 3110 _exception = 1; 3111 _exceptionType = "java/lang/IllegalArgumentException"; 3112 _exceptionMessage = "value == null"; 3113 goto exit; 3114 } 3115 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3116 if (value == NULL) { 3117 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3118 value = (GLuint *) (_valueBase + _bufferOffset); 3119 } 3120 glUniform1uiv( 3121 (GLint)location, 3122 (GLsizei)count, 3123 (GLuint *)value 3124 ); 3125 3126exit: 3127 if (_array) { 3128 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT); 3129 } 3130 if (_exception) { 3131 jniThrowException(_env, _exceptionType, _exceptionMessage); 3132 } 3133} 3134 3135/* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3136static void 3137android_glUniform2uiv__II_3II 3138 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) { 3139 jint _exception = 0; 3140 const char * _exceptionType = NULL; 3141 const char * _exceptionMessage = NULL; 3142 GLuint *value_base = (GLuint *) 0; 3143 jint _remaining; 3144 GLuint *value = (GLuint *) 0; 3145 3146 if (!value_ref) { 3147 _exception = 1; 3148 _exceptionType = "java/lang/IllegalArgumentException"; 3149 _exceptionMessage = "value == null"; 3150 goto exit; 3151 } 3152 if (offset < 0) { 3153 _exception = 1; 3154 _exceptionType = "java/lang/IllegalArgumentException"; 3155 _exceptionMessage = "offset < 0"; 3156 goto exit; 3157 } 3158 _remaining = _env->GetArrayLength(value_ref) - offset; 3159 value_base = (GLuint *) 3160 _env->GetIntArrayElements(value_ref, (jboolean *)0); 3161 value = value_base + offset; 3162 3163 glUniform2uiv( 3164 (GLint)location, 3165 (GLsizei)count, 3166 (GLuint *)value 3167 ); 3168 3169exit: 3170 if (value_base) { 3171 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base, 3172 JNI_ABORT); 3173 } 3174 if (_exception) { 3175 jniThrowException(_env, _exceptionType, _exceptionMessage); 3176 } 3177} 3178 3179/* void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3180static void 3181android_glUniform2uiv__IILjava_nio_IntBuffer_2 3182 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) { 3183 jint _exception = 0; 3184 const char * _exceptionType = NULL; 3185 const char * _exceptionMessage = NULL; 3186 jintArray _array = (jintArray) 0; 3187 jint _bufferOffset = (jint) 0; 3188 jint _remaining; 3189 GLuint *value = (GLuint *) 0; 3190 3191 if (!value_buf) { 3192 _exception = 1; 3193 _exceptionType = "java/lang/IllegalArgumentException"; 3194 _exceptionMessage = "value == null"; 3195 goto exit; 3196 } 3197 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3198 if (value == NULL) { 3199 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3200 value = (GLuint *) (_valueBase + _bufferOffset); 3201 } 3202 glUniform2uiv( 3203 (GLint)location, 3204 (GLsizei)count, 3205 (GLuint *)value 3206 ); 3207 3208exit: 3209 if (_array) { 3210 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT); 3211 } 3212 if (_exception) { 3213 jniThrowException(_env, _exceptionType, _exceptionMessage); 3214 } 3215} 3216 3217/* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3218static void 3219android_glUniform3uiv__II_3II 3220 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) { 3221 jint _exception = 0; 3222 const char * _exceptionType = NULL; 3223 const char * _exceptionMessage = NULL; 3224 GLuint *value_base = (GLuint *) 0; 3225 jint _remaining; 3226 GLuint *value = (GLuint *) 0; 3227 3228 if (!value_ref) { 3229 _exception = 1; 3230 _exceptionType = "java/lang/IllegalArgumentException"; 3231 _exceptionMessage = "value == null"; 3232 goto exit; 3233 } 3234 if (offset < 0) { 3235 _exception = 1; 3236 _exceptionType = "java/lang/IllegalArgumentException"; 3237 _exceptionMessage = "offset < 0"; 3238 goto exit; 3239 } 3240 _remaining = _env->GetArrayLength(value_ref) - offset; 3241 value_base = (GLuint *) 3242 _env->GetIntArrayElements(value_ref, (jboolean *)0); 3243 value = value_base + offset; 3244 3245 glUniform3uiv( 3246 (GLint)location, 3247 (GLsizei)count, 3248 (GLuint *)value 3249 ); 3250 3251exit: 3252 if (value_base) { 3253 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base, 3254 JNI_ABORT); 3255 } 3256 if (_exception) { 3257 jniThrowException(_env, _exceptionType, _exceptionMessage); 3258 } 3259} 3260 3261/* void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3262static void 3263android_glUniform3uiv__IILjava_nio_IntBuffer_2 3264 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) { 3265 jint _exception = 0; 3266 const char * _exceptionType = NULL; 3267 const char * _exceptionMessage = NULL; 3268 jintArray _array = (jintArray) 0; 3269 jint _bufferOffset = (jint) 0; 3270 jint _remaining; 3271 GLuint *value = (GLuint *) 0; 3272 3273 if (!value_buf) { 3274 _exception = 1; 3275 _exceptionType = "java/lang/IllegalArgumentException"; 3276 _exceptionMessage = "value == null"; 3277 goto exit; 3278 } 3279 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3280 if (value == NULL) { 3281 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3282 value = (GLuint *) (_valueBase + _bufferOffset); 3283 } 3284 glUniform3uiv( 3285 (GLint)location, 3286 (GLsizei)count, 3287 (GLuint *)value 3288 ); 3289 3290exit: 3291 if (_array) { 3292 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT); 3293 } 3294 if (_exception) { 3295 jniThrowException(_env, _exceptionType, _exceptionMessage); 3296 } 3297} 3298 3299/* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3300static void 3301android_glUniform4uiv__II_3II 3302 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray value_ref, jint offset) { 3303 jint _exception = 0; 3304 const char * _exceptionType = NULL; 3305 const char * _exceptionMessage = NULL; 3306 GLuint *value_base = (GLuint *) 0; 3307 jint _remaining; 3308 GLuint *value = (GLuint *) 0; 3309 3310 if (!value_ref) { 3311 _exception = 1; 3312 _exceptionType = "java/lang/IllegalArgumentException"; 3313 _exceptionMessage = "value == null"; 3314 goto exit; 3315 } 3316 if (offset < 0) { 3317 _exception = 1; 3318 _exceptionType = "java/lang/IllegalArgumentException"; 3319 _exceptionMessage = "offset < 0"; 3320 goto exit; 3321 } 3322 _remaining = _env->GetArrayLength(value_ref) - offset; 3323 value_base = (GLuint *) 3324 _env->GetIntArrayElements(value_ref, (jboolean *)0); 3325 value = value_base + offset; 3326 3327 glUniform4uiv( 3328 (GLint)location, 3329 (GLsizei)count, 3330 (GLuint *)value 3331 ); 3332 3333exit: 3334 if (value_base) { 3335 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base, 3336 JNI_ABORT); 3337 } 3338 if (_exception) { 3339 jniThrowException(_env, _exceptionType, _exceptionMessage); 3340 } 3341} 3342 3343/* void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) */ 3344static void 3345android_glUniform4uiv__IILjava_nio_IntBuffer_2 3346 (JNIEnv *_env, jobject _this, jint location, jint count, jobject value_buf) { 3347 jint _exception = 0; 3348 const char * _exceptionType = NULL; 3349 const char * _exceptionMessage = NULL; 3350 jintArray _array = (jintArray) 0; 3351 jint _bufferOffset = (jint) 0; 3352 jint _remaining; 3353 GLuint *value = (GLuint *) 0; 3354 3355 if (!value_buf) { 3356 _exception = 1; 3357 _exceptionType = "java/lang/IllegalArgumentException"; 3358 _exceptionMessage = "value == null"; 3359 goto exit; 3360 } 3361 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3362 if (value == NULL) { 3363 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3364 value = (GLuint *) (_valueBase + _bufferOffset); 3365 } 3366 glUniform4uiv( 3367 (GLint)location, 3368 (GLsizei)count, 3369 (GLuint *)value 3370 ); 3371 3372exit: 3373 if (_array) { 3374 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT); 3375 } 3376 if (_exception) { 3377 jniThrowException(_env, _exceptionType, _exceptionMessage); 3378 } 3379} 3380 3381/* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */ 3382static void 3383android_glClearBufferiv__II_3II 3384 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) { 3385 jint _exception = 0; 3386 const char * _exceptionType = NULL; 3387 const char * _exceptionMessage = NULL; 3388 GLint *value_base = (GLint *) 0; 3389 jint _remaining; 3390 GLint *value = (GLint *) 0; 3391 3392 if (!value_ref) { 3393 _exception = 1; 3394 _exceptionType = "java/lang/IllegalArgumentException"; 3395 _exceptionMessage = "value == null"; 3396 goto exit; 3397 } 3398 if (offset < 0) { 3399 _exception = 1; 3400 _exceptionType = "java/lang/IllegalArgumentException"; 3401 _exceptionMessage = "offset < 0"; 3402 goto exit; 3403 } 3404 _remaining = _env->GetArrayLength(value_ref) - offset; 3405 value_base = (GLint *) 3406 _env->GetIntArrayElements(value_ref, (jboolean *)0); 3407 value = value_base + offset; 3408 3409 glClearBufferiv( 3410 (GLenum)buffer, 3411 (GLint)drawbuffer, 3412 (GLint *)value 3413 ); 3414 3415exit: 3416 if (value_base) { 3417 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base, 3418 JNI_ABORT); 3419 } 3420 if (_exception) { 3421 jniThrowException(_env, _exceptionType, _exceptionMessage); 3422 } 3423} 3424 3425/* void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) */ 3426static void 3427android_glClearBufferiv__IILjava_nio_IntBuffer_2 3428 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) { 3429 jint _exception = 0; 3430 const char * _exceptionType = NULL; 3431 const char * _exceptionMessage = NULL; 3432 jintArray _array = (jintArray) 0; 3433 jint _bufferOffset = (jint) 0; 3434 jint _remaining; 3435 GLint *value = (GLint *) 0; 3436 3437 if (!value_buf) { 3438 _exception = 1; 3439 _exceptionType = "java/lang/IllegalArgumentException"; 3440 _exceptionMessage = "value == null"; 3441 goto exit; 3442 } 3443 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3444 if (value == NULL) { 3445 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3446 value = (GLint *) (_valueBase + _bufferOffset); 3447 } 3448 glClearBufferiv( 3449 (GLenum)buffer, 3450 (GLint)drawbuffer, 3451 (GLint *)value 3452 ); 3453 3454exit: 3455 if (_array) { 3456 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT); 3457 } 3458 if (_exception) { 3459 jniThrowException(_env, _exceptionType, _exceptionMessage); 3460 } 3461} 3462 3463/* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */ 3464static void 3465android_glClearBufferuiv__II_3II 3466 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jintArray value_ref, jint offset) { 3467 jint _exception = 0; 3468 const char * _exceptionType = NULL; 3469 const char * _exceptionMessage = NULL; 3470 GLuint *value_base = (GLuint *) 0; 3471 jint _remaining; 3472 GLuint *value = (GLuint *) 0; 3473 3474 if (!value_ref) { 3475 _exception = 1; 3476 _exceptionType = "java/lang/IllegalArgumentException"; 3477 _exceptionMessage = "value == null"; 3478 goto exit; 3479 } 3480 if (offset < 0) { 3481 _exception = 1; 3482 _exceptionType = "java/lang/IllegalArgumentException"; 3483 _exceptionMessage = "offset < 0"; 3484 goto exit; 3485 } 3486 _remaining = _env->GetArrayLength(value_ref) - offset; 3487 value_base = (GLuint *) 3488 _env->GetIntArrayElements(value_ref, (jboolean *)0); 3489 value = value_base + offset; 3490 3491 glClearBufferuiv( 3492 (GLenum)buffer, 3493 (GLint)drawbuffer, 3494 (GLuint *)value 3495 ); 3496 3497exit: 3498 if (value_base) { 3499 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base, 3500 JNI_ABORT); 3501 } 3502 if (_exception) { 3503 jniThrowException(_env, _exceptionType, _exceptionMessage); 3504 } 3505} 3506 3507/* void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) */ 3508static void 3509android_glClearBufferuiv__IILjava_nio_IntBuffer_2 3510 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) { 3511 jint _exception = 0; 3512 const char * _exceptionType = NULL; 3513 const char * _exceptionMessage = NULL; 3514 jintArray _array = (jintArray) 0; 3515 jint _bufferOffset = (jint) 0; 3516 jint _remaining; 3517 GLuint *value = (GLuint *) 0; 3518 3519 if (!value_buf) { 3520 _exception = 1; 3521 _exceptionType = "java/lang/IllegalArgumentException"; 3522 _exceptionMessage = "value == null"; 3523 goto exit; 3524 } 3525 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3526 if (value == NULL) { 3527 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 3528 value = (GLuint *) (_valueBase + _bufferOffset); 3529 } 3530 glClearBufferuiv( 3531 (GLenum)buffer, 3532 (GLint)drawbuffer, 3533 (GLuint *)value 3534 ); 3535 3536exit: 3537 if (_array) { 3538 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT); 3539 } 3540 if (_exception) { 3541 jniThrowException(_env, _exceptionType, _exceptionMessage); 3542 } 3543} 3544 3545/* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */ 3546static void 3547android_glClearBufferfv__II_3FI 3548 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloatArray value_ref, jint offset) { 3549 jint _exception = 0; 3550 const char * _exceptionType = NULL; 3551 const char * _exceptionMessage = NULL; 3552 GLfloat *value_base = (GLfloat *) 0; 3553 jint _remaining; 3554 GLfloat *value = (GLfloat *) 0; 3555 3556 if (!value_ref) { 3557 _exception = 1; 3558 _exceptionType = "java/lang/IllegalArgumentException"; 3559 _exceptionMessage = "value == null"; 3560 goto exit; 3561 } 3562 if (offset < 0) { 3563 _exception = 1; 3564 _exceptionType = "java/lang/IllegalArgumentException"; 3565 _exceptionMessage = "offset < 0"; 3566 goto exit; 3567 } 3568 _remaining = _env->GetArrayLength(value_ref) - offset; 3569 value_base = (GLfloat *) 3570 _env->GetFloatArrayElements(value_ref, (jboolean *)0); 3571 value = value_base + offset; 3572 3573 glClearBufferfv( 3574 (GLenum)buffer, 3575 (GLint)drawbuffer, 3576 (GLfloat *)value 3577 ); 3578 3579exit: 3580 if (value_base) { 3581 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base, 3582 JNI_ABORT); 3583 } 3584 if (_exception) { 3585 jniThrowException(_env, _exceptionType, _exceptionMessage); 3586 } 3587} 3588 3589/* void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) */ 3590static void 3591android_glClearBufferfv__IILjava_nio_FloatBuffer_2 3592 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jobject value_buf) { 3593 jint _exception = 0; 3594 const char * _exceptionType = NULL; 3595 const char * _exceptionMessage = NULL; 3596 jfloatArray _array = (jfloatArray) 0; 3597 jint _bufferOffset = (jint) 0; 3598 jint _remaining; 3599 GLfloat *value = (GLfloat *) 0; 3600 3601 if (!value_buf) { 3602 _exception = 1; 3603 _exceptionType = "java/lang/IllegalArgumentException"; 3604 _exceptionMessage = "value == null"; 3605 goto exit; 3606 } 3607 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 3608 if (value == NULL) { 3609 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 3610 value = (GLfloat *) (_valueBase + _bufferOffset); 3611 } 3612 glClearBufferfv( 3613 (GLenum)buffer, 3614 (GLint)drawbuffer, 3615 (GLfloat *)value 3616 ); 3617 3618exit: 3619 if (_array) { 3620 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT); 3621 } 3622 if (_exception) { 3623 jniThrowException(_env, _exceptionType, _exceptionMessage); 3624 } 3625} 3626 3627/* void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) */ 3628static void 3629android_glClearBufferfi__IIFI 3630 (JNIEnv *_env, jobject _this, jint buffer, jint drawbuffer, jfloat depth, jint stencil) { 3631 glClearBufferfi( 3632 (GLenum)buffer, 3633 (GLint)drawbuffer, 3634 (GLfloat)depth, 3635 (GLint)stencil 3636 ); 3637} 3638 3639/* const GLubyte * glGetStringi ( GLenum name, GLuint index ) */ 3640static jstring 3641android_glGetStringi__II 3642 (JNIEnv *_env, jobject _this, jint name, jint index) { 3643 const GLubyte* _chars = glGetStringi((GLenum)name, (GLuint)index); 3644 return _env->NewStringUTF((const char*)_chars); 3645} 3646 3647/* void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) */ 3648static void 3649android_glCopyBufferSubData__IIIII 3650 (JNIEnv *_env, jobject _this, jint readTarget, jint writeTarget, jint readOffset, jint writeOffset, jint size) { 3651 glCopyBufferSubData( 3652 (GLenum)readTarget, 3653 (GLenum)writeTarget, 3654 (GLintptr)readOffset, 3655 (GLintptr)writeOffset, 3656 (GLsizeiptr)size 3657 ); 3658} 3659 3660/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */ 3661static 3662void 3663android_glGetUniformIndices_array 3664 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jintArray uniformIndices_ref, jint uniformIndicesOffset) { 3665 jint _exception = 0; 3666 const char* _exceptionType = NULL; 3667 const char* _exceptionMessage = NULL; 3668 jint _count = 0; 3669 jint _i; 3670 const char** _names = NULL; 3671 GLuint* _indices_base = NULL; 3672 GLuint* _indices = NULL; 3673 3674 if (!uniformNames_ref) { 3675 _exception = 1; 3676 _exceptionType = "java/lang/IllegalArgumentException"; 3677 _exceptionMessage = "uniformNames == null"; 3678 goto exit; 3679 } 3680 _count = _env->GetArrayLength(uniformNames_ref); 3681 _names = (const char**)calloc(_count, sizeof(const char*)); 3682 for (_i = 0; _i < _count; _i++) { 3683 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); 3684 if (!_name) { 3685 _exception = 1; 3686 _exceptionType = "java/lang/IllegalArgumentException"; 3687 _exceptionMessage = "null uniformNames element"; 3688 goto exit; 3689 } 3690 _names[_i] = _env->GetStringUTFChars(_name, 0); 3691 } 3692 3693 if (!uniformIndices_ref) { 3694 _exception = 1; 3695 _exceptionType = "java/lang/IllegalArgumentException"; 3696 _exceptionMessage = "uniformIndices == null"; 3697 goto exit; 3698 } 3699 if (uniformIndicesOffset < 0) { 3700 _exception = 1; 3701 _exceptionType = "java/lang/IllegalArgumentException"; 3702 _exceptionMessage = "uniformIndicesOffset < 0"; 3703 goto exit; 3704 } 3705 if (_env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset < _count) { 3706 _exception = 1; 3707 _exceptionType = "java/lang/IllegalArgumentException"; 3708 _exceptionMessage = "not enough space in uniformIndices"; 3709 goto exit; 3710 } 3711 _indices_base = (GLuint*)_env->GetIntArrayElements( 3712 uniformIndices_ref, 0); 3713 _indices = _indices_base + uniformIndicesOffset; 3714 3715 glGetUniformIndices(program, _count, _names, _indices); 3716 3717exit: 3718 if (_indices_base) { 3719 _env->ReleaseIntArrayElements(uniformIndices_ref, (jint*)_indices_base, 3720 _exception ? JNI_ABORT : 0); 3721 } 3722 for (_i = _count - 1; _i >= 0; _i--) { 3723 if (_names[_i]) { 3724 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); 3725 if (_name) { 3726 _env->ReleaseStringUTFChars(_name, _names[_i]); 3727 } 3728 } 3729 } 3730 free(_names); 3731 if (_exception) { 3732 jniThrowException(_env, _exceptionType, _exceptionMessage); 3733 } 3734} 3735 3736/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */ 3737static 3738void 3739android_glGetUniformIndices_buffer 3740 (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jobject uniformIndices_buf) { 3741 jint _exception = 0; 3742 const char* _exceptionType = NULL; 3743 const char* _exceptionMessage = NULL; 3744 jint _count = 0; 3745 jint _i; 3746 const char** _names = NULL; 3747 jintArray _uniformIndicesArray = (jintArray)0; 3748 jint _uniformIndicesRemaining; 3749 jint _uniformIndicesOffset = 0; 3750 GLuint* _indices = NULL; 3751 char* _indicesBase = NULL; 3752 3753 if (!uniformNames_ref) { 3754 _exception = 1; 3755 _exceptionType = "java/lang/IllegalArgumentException"; 3756 _exceptionMessage = "uniformNames == null"; 3757 goto exit; 3758 } 3759 if (!uniformIndices_buf) { 3760 _exception = 1; 3761 _exceptionType = "java/lang/IllegalArgumentException"; 3762 _exceptionMessage = "uniformIndices == null"; 3763 goto exit; 3764 } 3765 3766 _count = _env->GetArrayLength(uniformNames_ref); 3767 _names = (const char**)calloc(_count, sizeof(const char*)); 3768 for (_i = 0; _i < _count; _i++) { 3769 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); 3770 if (!_name) { 3771 _exception = 1; 3772 _exceptionType = "java/lang/IllegalArgumentException"; 3773 _exceptionMessage = "null uniformNames element"; 3774 goto exit; 3775 } 3776 _names[_i] = _env->GetStringUTFChars(_name, 0); 3777 } 3778 3779 _indices = (GLuint*)getPointer(_env, uniformIndices_buf, 3780 (jarray*)&_uniformIndicesArray, &_uniformIndicesRemaining, 3781 &_uniformIndicesOffset); 3782 if (!_indices) { 3783 _indicesBase = (char*)_env->GetIntArrayElements( 3784 _uniformIndicesArray, 0); 3785 _indices = (GLuint*)(_indicesBase + _uniformIndicesOffset); 3786 } 3787 if (_uniformIndicesRemaining < _count) { 3788 _exception = 1; 3789 _exceptionType = "java/lang/IllegalArgumentException"; 3790 _exceptionMessage = "not enough space in uniformIndices"; 3791 goto exit; 3792 } 3793 3794 glGetUniformIndices(program, _count, _names, _indices); 3795 3796exit: 3797 if (_uniformIndicesArray) { 3798 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>( 3799 _env, _uniformIndicesArray, (jint*)_indicesBase, JNI_TRUE); 3800 } 3801 for (_i = _count - 1; _i >= 0; _i--) { 3802 if (_names[_i]) { 3803 jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); 3804 if (_name) { 3805 _env->ReleaseStringUTFChars(_name, _names[_i]); 3806 } 3807 } 3808 } 3809 free(_names); 3810 if (_exception) { 3811 jniThrowException(_env, _exceptionType, _exceptionMessage); 3812 } 3813} 3814/* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */ 3815static void 3816android_glGetActiveUniformsiv__II_3III_3II 3817 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jintArray uniformIndices_ref, jint uniformIndicesOffset, jint pname, jintArray params_ref, jint paramsOffset) { 3818 jint _exception = 0; 3819 const char * _exceptionType = NULL; 3820 const char * _exceptionMessage = NULL; 3821 GLuint *uniformIndices_base = (GLuint *) 0; 3822 jint _uniformIndicesRemaining; 3823 GLuint *uniformIndices = (GLuint *) 0; 3824 GLint *params_base = (GLint *) 0; 3825 jint _paramsRemaining; 3826 GLint *params = (GLint *) 0; 3827 3828 if (!uniformIndices_ref) { 3829 _exception = 1; 3830 _exceptionType = "java/lang/IllegalArgumentException"; 3831 _exceptionMessage = "uniformIndices == null"; 3832 goto exit; 3833 } 3834 if (uniformIndicesOffset < 0) { 3835 _exception = 1; 3836 _exceptionType = "java/lang/IllegalArgumentException"; 3837 _exceptionMessage = "uniformIndicesOffset < 0"; 3838 goto exit; 3839 } 3840 _uniformIndicesRemaining = _env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset; 3841 uniformIndices_base = (GLuint *) 3842 _env->GetIntArrayElements(uniformIndices_ref, (jboolean *)0); 3843 uniformIndices = uniformIndices_base + uniformIndicesOffset; 3844 3845 if (!params_ref) { 3846 _exception = 1; 3847 _exceptionType = "java/lang/IllegalArgumentException"; 3848 _exceptionMessage = "params == null"; 3849 goto exit; 3850 } 3851 if (paramsOffset < 0) { 3852 _exception = 1; 3853 _exceptionType = "java/lang/IllegalArgumentException"; 3854 _exceptionMessage = "paramsOffset < 0"; 3855 goto exit; 3856 } 3857 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset; 3858 params_base = (GLint *) 3859 _env->GetIntArrayElements(params_ref, (jboolean *)0); 3860 params = params_base + paramsOffset; 3861 3862 glGetActiveUniformsiv( 3863 (GLuint)program, 3864 (GLsizei)uniformCount, 3865 (GLuint *)uniformIndices, 3866 (GLenum)pname, 3867 (GLint *)params 3868 ); 3869 3870exit: 3871 if (params_base) { 3872 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 3873 _exception ? JNI_ABORT: 0); 3874 } 3875 if (uniformIndices_base) { 3876 _env->ReleaseIntArrayElements(uniformIndices_ref, (jint*)uniformIndices_base, 3877 JNI_ABORT); 3878 } 3879 if (_exception) { 3880 jniThrowException(_env, _exceptionType, _exceptionMessage); 3881 } 3882} 3883 3884/* void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) */ 3885static void 3886android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2 3887 (JNIEnv *_env, jobject _this, jint program, jint uniformCount, jobject uniformIndices_buf, jint pname, jobject params_buf) { 3888 jint _exception = 0; 3889 const char * _exceptionType = NULL; 3890 const char * _exceptionMessage = NULL; 3891 jintArray _uniformIndicesArray = (jintArray) 0; 3892 jint _uniformIndicesBufferOffset = (jint) 0; 3893 jintArray _paramsArray = (jintArray) 0; 3894 jint _paramsBufferOffset = (jint) 0; 3895 jint _uniformIndicesRemaining; 3896 GLuint *uniformIndices = (GLuint *) 0; 3897 jint _paramsRemaining; 3898 GLint *params = (GLint *) 0; 3899 3900 if (!uniformIndices_buf) { 3901 _exception = 1; 3902 _exceptionType = "java/lang/IllegalArgumentException"; 3903 _exceptionMessage = "uniformIndices == null"; 3904 goto exit; 3905 } 3906 uniformIndices = (GLuint *)getPointer(_env, uniformIndices_buf, (jarray*)&_uniformIndicesArray, &_uniformIndicesRemaining, &_uniformIndicesBufferOffset); 3907 if (!params_buf) { 3908 _exception = 1; 3909 _exceptionType = "java/lang/IllegalArgumentException"; 3910 _exceptionMessage = "params == null"; 3911 goto exit; 3912 } 3913 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_paramsArray, &_paramsRemaining, &_paramsBufferOffset); 3914 if (uniformIndices == NULL) { 3915 char * _uniformIndicesBase = (char *)_env->GetIntArrayElements(_uniformIndicesArray, (jboolean *) 0); 3916 uniformIndices = (GLuint *) (_uniformIndicesBase + _uniformIndicesBufferOffset); 3917 } 3918 if (params == NULL) { 3919 char * _paramsBase = (char *)_env->GetIntArrayElements(_paramsArray, (jboolean *) 0); 3920 params = (GLint *) (_paramsBase + _paramsBufferOffset); 3921 } 3922 glGetActiveUniformsiv( 3923 (GLuint)program, 3924 (GLsizei)uniformCount, 3925 (GLuint *)uniformIndices, 3926 (GLenum)pname, 3927 (GLint *)params 3928 ); 3929 3930exit: 3931 if (_paramsArray) { 3932 _env->ReleaseIntArrayElements(_paramsArray, (jint*)params, _exception ? JNI_ABORT : 0); 3933 } 3934 if (_uniformIndicesArray) { 3935 _env->ReleaseIntArrayElements(_uniformIndicesArray, (jint*)uniformIndices, JNI_ABORT); 3936 } 3937 if (_exception) { 3938 jniThrowException(_env, _exceptionType, _exceptionMessage); 3939 } 3940} 3941 3942/* GLuint glGetUniformBlockIndex ( GLuint program, const GLchar *uniformBlockName ) */ 3943static jint 3944android_glGetUniformBlockIndex__ILjava_lang_String_2 3945 (JNIEnv *_env, jobject _this, jint program, jstring uniformBlockName) { 3946 jint _exception = 0; 3947 const char * _exceptionType = NULL; 3948 const char * _exceptionMessage = NULL; 3949 GLuint _returnValue = 0; 3950 const char* _nativeuniformBlockName = 0; 3951 3952 if (!uniformBlockName) { 3953 _exception = 1; 3954 _exceptionType = "java/lang/IllegalArgumentException"; 3955 _exceptionMessage = "uniformBlockName == null"; 3956 goto exit; 3957 } 3958 _nativeuniformBlockName = _env->GetStringUTFChars(uniformBlockName, 0); 3959 3960 _returnValue = glGetUniformBlockIndex( 3961 (GLuint)program, 3962 (GLchar *)_nativeuniformBlockName 3963 ); 3964 3965exit: 3966 if (_nativeuniformBlockName) { 3967 _env->ReleaseStringUTFChars(uniformBlockName, _nativeuniformBlockName); 3968 } 3969 3970 if (_exception) { 3971 jniThrowException(_env, _exceptionType, _exceptionMessage); 3972 } 3973 return (jint)_returnValue; 3974} 3975 3976/* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */ 3977static void 3978android_glGetActiveUniformBlockiv__III_3II 3979 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jintArray params_ref, jint offset) { 3980 jint _exception = 0; 3981 const char * _exceptionType = NULL; 3982 const char * _exceptionMessage = NULL; 3983 GLint *params_base = (GLint *) 0; 3984 jint _remaining; 3985 GLint *params = (GLint *) 0; 3986 3987 if (!params_ref) { 3988 _exception = 1; 3989 _exceptionType = "java/lang/IllegalArgumentException"; 3990 _exceptionMessage = "params == null"; 3991 goto exit; 3992 } 3993 if (offset < 0) { 3994 _exception = 1; 3995 _exceptionType = "java/lang/IllegalArgumentException"; 3996 _exceptionMessage = "offset < 0"; 3997 goto exit; 3998 } 3999 _remaining = _env->GetArrayLength(params_ref) - offset; 4000 params_base = (GLint *) 4001 _env->GetIntArrayElements(params_ref, (jboolean *)0); 4002 params = params_base + offset; 4003 4004 glGetActiveUniformBlockiv( 4005 (GLuint)program, 4006 (GLuint)uniformBlockIndex, 4007 (GLenum)pname, 4008 (GLint *)params 4009 ); 4010 4011exit: 4012 if (params_base) { 4013 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 4014 _exception ? JNI_ABORT: 0); 4015 } 4016 if (_exception) { 4017 jniThrowException(_env, _exceptionType, _exceptionMessage); 4018 } 4019} 4020 4021/* void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) */ 4022static void 4023android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2 4024 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint pname, jobject params_buf) { 4025 jint _exception = 0; 4026 const char * _exceptionType = NULL; 4027 const char * _exceptionMessage = NULL; 4028 jintArray _array = (jintArray) 0; 4029 jint _bufferOffset = (jint) 0; 4030 jint _remaining; 4031 GLint *params = (GLint *) 0; 4032 4033 if (!params_buf) { 4034 _exception = 1; 4035 _exceptionType = "java/lang/IllegalArgumentException"; 4036 _exceptionMessage = "params == null"; 4037 goto exit; 4038 } 4039 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 4040 if (params == NULL) { 4041 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 4042 params = (GLint *) (_paramsBase + _bufferOffset); 4043 } 4044 glGetActiveUniformBlockiv( 4045 (GLuint)program, 4046 (GLuint)uniformBlockIndex, 4047 (GLenum)pname, 4048 (GLint *)params 4049 ); 4050 4051exit: 4052 if (_array) { 4053 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 4054 } 4055 if (_exception) { 4056 jniThrowException(_env, _exceptionType, _exceptionMessage); 4057 } 4058} 4059 4060/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */ 4061static void 4062android_glGetActiveUniformBlockName_III_3II_3BI 4063 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, int bufSize, jintArray length_ref, jint lengthOffset, jbyteArray name_ref, jint nameOffset) { 4064 jint _exception = 0; 4065 const char* _exceptionType; 4066 const char* _exceptionMessage; 4067 GLsizei* _length_base = (GLsizei*)0; 4068 jint _lengthRemaining; 4069 GLsizei* _length = (GLsizei*)0; 4070 GLchar* _name_base = (GLchar*)0; 4071 jint _nameRemaining; 4072 GLchar* _name = (GLchar*)0; 4073 4074 if (length_ref) { 4075 if (lengthOffset < 0) { 4076 _exception = 1; 4077 _exceptionType = "java/lang/IllegalArgumentException"; 4078 _exceptionMessage = "lengthOffset < 0"; 4079 goto exit; 4080 } 4081 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 4082 _length_base = (GLsizei*)_env->GetIntArrayElements( 4083 length_ref, (jboolean*)0); 4084 _length = _length_base + lengthOffset; 4085 } 4086 4087 if (!name_ref) { 4088 _exception = 1; 4089 _exceptionType = "java/lang/IllegalArgumentException"; 4090 _exceptionMessage = "uniformBlockName == null"; 4091 goto exit; 4092 } 4093 if (nameOffset < 0) { 4094 _exception = 1; 4095 _exceptionType = "java/lang/IllegalArgumentException"; 4096 _exceptionMessage = "uniformBlockNameOffset < 0"; 4097 goto exit; 4098 } 4099 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; 4100 _name_base = (GLchar*)_env->GetByteArrayElements( 4101 name_ref, (jboolean*)0); 4102 _name = _name_base + nameOffset; 4103 4104 glGetActiveUniformBlockName( 4105 (GLuint)program, 4106 (GLuint)uniformBlockIndex, 4107 (GLsizei)bufSize, 4108 (GLsizei*)_length, 4109 (GLchar*)_name 4110 ); 4111 4112exit: 4113 if (_name_base) { 4114 _env->ReleaseByteArrayElements(name_ref, (jbyte*)_name_base, 4115 _exception ? JNI_ABORT: 0); 4116 } 4117 if (_length_base) { 4118 _env->ReleaseIntArrayElements(length_ref, (jint*)_length_base, 4119 _exception ? JNI_ABORT: 0); 4120 } 4121 if (_exception) { 4122 jniThrowException(_env, _exceptionType, _exceptionMessage); 4123 } 4124} 4125 4126/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */ 4127static void 4128android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 4129 (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, jobject length_buf, jobject uniformBlockName_buf) { 4130 jint _exception = 0; 4131 const char* _exceptionType; 4132 const char* _exceptionMessage; 4133 jarray _lengthArray = (jarray)0; 4134 jint _lengthBufferOffset = (jint)0; 4135 GLsizei* _length = (GLsizei*)0; 4136 jint _lengthRemaining; 4137 jarray _nameArray = (jarray)0; 4138 jint _nameBufferOffset = (jint)0; 4139 GLchar* _name = (GLchar*)0; 4140 jint _nameRemaining; 4141 4142 _length = (GLsizei*)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset); 4143 if (_length == NULL) { 4144 GLsizei* _lengthBase = (GLsizei*)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean*)0); 4145 _length = (GLsizei*)(_lengthBase + _lengthBufferOffset); 4146 } 4147 4148 _name = (GLchar*)getPointer(_env, uniformBlockName_buf, &_nameArray, &_nameRemaining, &_nameBufferOffset); 4149 if (_name == NULL) { 4150 GLchar* _nameBase = (GLchar*)_env->GetPrimitiveArrayCritical(_nameArray, (jboolean*)0); 4151 _name = (GLchar*)(_nameBase + _nameBufferOffset); 4152 } 4153 4154 glGetActiveUniformBlockName( 4155 (GLuint)program, 4156 (GLuint)uniformBlockIndex, 4157 (GLsizei)_nameRemaining, 4158 _length, _name 4159 ); 4160 if (_nameArray) { 4161 releasePointer(_env, _nameArray, _name, JNI_TRUE); 4162 } 4163 if (_lengthArray) { 4164 releasePointer(_env, _lengthArray, _length, JNI_TRUE); 4165 } 4166} 4167 4168/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */ 4169static jstring 4170android_glGetActiveUniformBlockName_II 4171 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex) { 4172 GLint len = 0; 4173 glGetActiveUniformBlockiv((GLuint)program, (GLuint)uniformBlockIndex, 4174 GL_UNIFORM_BLOCK_NAME_LENGTH, &len); 4175 GLchar* name = (GLchar*)malloc(len); 4176 glGetActiveUniformBlockName((GLuint)program, (GLuint)uniformBlockIndex, 4177 len, NULL, name); 4178 jstring result = _env->NewStringUTF(name); 4179 free(name); 4180 return result; 4181} 4182/* void glUniformBlockBinding ( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) */ 4183static void 4184android_glUniformBlockBinding__III 4185 (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex, jint uniformBlockBinding) { 4186 glUniformBlockBinding( 4187 (GLuint)program, 4188 (GLuint)uniformBlockIndex, 4189 (GLuint)uniformBlockBinding 4190 ); 4191} 4192 4193/* void glDrawArraysInstanced ( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) */ 4194static void 4195android_glDrawArraysInstanced__IIII 4196 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count, jint instanceCount) { 4197 glDrawArraysInstanced( 4198 (GLenum)mode, 4199 (GLint)first, 4200 (GLsizei)count, 4201 (GLsizei)instanceCount 4202 ); 4203} 4204 4205/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */ 4206static void 4207android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I 4208 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount) { 4209 jarray _array = (jarray) 0; 4210 jint _bufferOffset = (jint) 0; 4211 jint _remaining; 4212 GLvoid *indices = (GLvoid *) 0; 4213 4214 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset); 4215 if (indices == NULL) { 4216 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 4217 indices = (GLvoid *) (_indicesBase + _bufferOffset); 4218 } 4219 glDrawElementsInstanced( 4220 (GLenum)mode, 4221 (GLsizei)count, 4222 (GLenum)type, 4223 (GLvoid *)indices, 4224 (GLsizei)instanceCount 4225 ); 4226 if (_array) { 4227 releasePointer(_env, _array, indices, JNI_FALSE); 4228 } 4229} 4230 4231/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */ 4232static void 4233android_glDrawElementsInstanced__IIIII 4234 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount) { 4235 glDrawElementsInstanced( 4236 (GLenum)mode, 4237 (GLsizei)count, 4238 (GLenum)type, 4239 (GLvoid *)static_cast<uintptr_t>(indicesOffset), 4240 (GLsizei)instanceCount 4241 ); 4242} 4243/* GLsync glFenceSync ( GLenum condition, GLbitfield flags ) */ 4244static jlong 4245android_glFenceSync__II 4246 (JNIEnv *_env, jobject _this, jint condition, jint flags) { 4247 GLsync _returnValue; 4248 _returnValue = glFenceSync( 4249 (GLenum)condition, 4250 (GLbitfield)flags 4251 ); 4252 return (jlong)_returnValue; 4253} 4254 4255/* GLboolean glIsSync ( GLsync sync ) */ 4256static jboolean 4257android_glIsSync__J 4258 (JNIEnv *_env, jobject _this, jlong sync) { 4259 GLboolean _returnValue; 4260 _returnValue = glIsSync( 4261 (GLsync)sync 4262 ); 4263 return (jboolean)_returnValue; 4264} 4265 4266/* void glDeleteSync ( GLsync sync ) */ 4267static void 4268android_glDeleteSync__J 4269 (JNIEnv *_env, jobject _this, jlong sync) { 4270 glDeleteSync( 4271 (GLsync)sync 4272 ); 4273} 4274 4275/* GLenum glClientWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */ 4276static jint 4277android_glClientWaitSync__JIJ 4278 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) { 4279 GLenum _returnValue; 4280 _returnValue = glClientWaitSync( 4281 (GLsync)sync, 4282 (GLbitfield)flags, 4283 (GLuint64)timeout 4284 ); 4285 return (jint)_returnValue; 4286} 4287 4288/* void glWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) */ 4289static void 4290android_glWaitSync__JIJ 4291 (JNIEnv *_env, jobject _this, jlong sync, jint flags, jlong timeout) { 4292 glWaitSync( 4293 (GLsync)sync, 4294 (GLbitfield)flags, 4295 (GLuint64)timeout 4296 ); 4297} 4298 4299/* void glGetInteger64v ( GLenum pname, GLint64 *params ) */ 4300static void 4301android_glGetInteger64v__I_3JI 4302 (JNIEnv *_env, jobject _this, jint pname, jlongArray params_ref, jint offset) { 4303 jint _exception = 0; 4304 const char * _exceptionType = NULL; 4305 const char * _exceptionMessage = NULL; 4306 GLint64 *params_base = (GLint64 *) 0; 4307 jint _remaining; 4308 GLint64 *params = (GLint64 *) 0; 4309 4310 if (!params_ref) { 4311 _exception = 1; 4312 _exceptionType = "java/lang/IllegalArgumentException"; 4313 _exceptionMessage = "params == null"; 4314 goto exit; 4315 } 4316 if (offset < 0) { 4317 _exception = 1; 4318 _exceptionType = "java/lang/IllegalArgumentException"; 4319 _exceptionMessage = "offset < 0"; 4320 goto exit; 4321 } 4322 _remaining = _env->GetArrayLength(params_ref) - offset; 4323 params_base = (GLint64 *) 4324 _env->GetLongArrayElements(params_ref, (jboolean *)0); 4325 params = params_base + offset; 4326 4327 glGetInteger64v( 4328 (GLenum)pname, 4329 (GLint64 *)params 4330 ); 4331 4332exit: 4333 if (params_base) { 4334 _env->ReleaseLongArrayElements(params_ref, (jlong*)params_base, 4335 _exception ? JNI_ABORT: 0); 4336 } 4337 if (_exception) { 4338 jniThrowException(_env, _exceptionType, _exceptionMessage); 4339 } 4340} 4341 4342/* void glGetInteger64v ( GLenum pname, GLint64 *params ) */ 4343static void 4344android_glGetInteger64v__ILjava_nio_LongBuffer_2 4345 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 4346 jint _exception = 0; 4347 const char * _exceptionType = NULL; 4348 const char * _exceptionMessage = NULL; 4349 jlongArray _array = (jlongArray) 0; 4350 jint _bufferOffset = (jint) 0; 4351 jint _remaining; 4352 GLint64 *params = (GLint64 *) 0; 4353 4354 if (!params_buf) { 4355 _exception = 1; 4356 _exceptionType = "java/lang/IllegalArgumentException"; 4357 _exceptionMessage = "params == null"; 4358 goto exit; 4359 } 4360 params = (GLint64 *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 4361 if (params == NULL) { 4362 char * _paramsBase = (char *)_env->GetLongArrayElements(_array, (jboolean *) 0); 4363 params = (GLint64 *) (_paramsBase + _bufferOffset); 4364 } 4365 glGetInteger64v( 4366 (GLenum)pname, 4367 (GLint64 *)params 4368 ); 4369 4370exit: 4371 if (_array) { 4372 _env->ReleaseLongArrayElements(_array, (jlong*)params, _exception ? JNI_ABORT : 0); 4373 } 4374 if (_exception) { 4375 jniThrowException(_env, _exceptionType, _exceptionMessage); 4376 } 4377} 4378 4379/* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */ 4380static void 4381android_glGetSynciv__JII_3II_3II 4382 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray values_ref, jint valuesOffset) { 4383 jint _exception = 0; 4384 const char * _exceptionType = NULL; 4385 const char * _exceptionMessage = NULL; 4386 GLsizei *length_base = (GLsizei *) 0; 4387 jint _lengthRemaining; 4388 GLsizei *length = (GLsizei *) 0; 4389 GLint *values_base = (GLint *) 0; 4390 jint _valuesRemaining; 4391 GLint *values = (GLint *) 0; 4392 4393 if (length_ref) { 4394 if (lengthOffset < 0) { 4395 _exception = 1; 4396 _exceptionType = "java/lang/IllegalArgumentException"; 4397 _exceptionMessage = "lengthOffset < 0"; 4398 goto exit; 4399 } 4400 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 4401 length_base = (GLsizei *) 4402 _env->GetIntArrayElements(length_ref, (jboolean *)0); 4403 length = length_base + lengthOffset; 4404 } 4405 4406 if (!values_ref) { 4407 _exception = 1; 4408 _exceptionType = "java/lang/IllegalArgumentException"; 4409 _exceptionMessage = "values == null"; 4410 goto exit; 4411 } 4412 if (valuesOffset < 0) { 4413 _exception = 1; 4414 _exceptionType = "java/lang/IllegalArgumentException"; 4415 _exceptionMessage = "valuesOffset < 0"; 4416 goto exit; 4417 } 4418 _valuesRemaining = _env->GetArrayLength(values_ref) - valuesOffset; 4419 values_base = (GLint *) 4420 _env->GetIntArrayElements(values_ref, (jboolean *)0); 4421 values = values_base + valuesOffset; 4422 4423 glGetSynciv( 4424 (GLsync)sync, 4425 (GLenum)pname, 4426 (GLsizei)bufSize, 4427 (GLsizei *)length, 4428 (GLint *)values 4429 ); 4430 4431exit: 4432 if (values_base) { 4433 _env->ReleaseIntArrayElements(values_ref, (jint*)values_base, 4434 _exception ? JNI_ABORT: 0); 4435 } 4436 if (length_base) { 4437 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base, 4438 _exception ? JNI_ABORT: 0); 4439 } 4440 if (_exception) { 4441 jniThrowException(_env, _exceptionType, _exceptionMessage); 4442 } 4443} 4444 4445/* void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) */ 4446static void 4447android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 4448 (JNIEnv *_env, jobject _this, jlong sync, jint pname, jint bufSize, jobject length_buf, jobject values_buf) { 4449 jint _exception = 0; 4450 const char * _exceptionType = NULL; 4451 const char * _exceptionMessage = NULL; 4452 jintArray _lengthArray = (jintArray) 0; 4453 jint _lengthBufferOffset = (jint) 0; 4454 jintArray _valuesArray = (jintArray) 0; 4455 jint _valuesBufferOffset = (jint) 0; 4456 jint _lengthRemaining; 4457 GLsizei *length = (GLsizei *) 0; 4458 jint _valuesRemaining; 4459 GLint *values = (GLint *) 0; 4460 4461 if (length_buf) { 4462 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset); 4463 } 4464 if (!values_buf) { 4465 _exception = 1; 4466 _exceptionType = "java/lang/IllegalArgumentException"; 4467 _exceptionMessage = "values == null"; 4468 goto exit; 4469 } 4470 values = (GLint *)getPointer(_env, values_buf, (jarray*)&_valuesArray, &_valuesRemaining, &_valuesBufferOffset); 4471 if (length_buf && length == NULL) { 4472 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0); 4473 length = (GLsizei *) (_lengthBase + _lengthBufferOffset); 4474 } 4475 if (values == NULL) { 4476 char * _valuesBase = (char *)_env->GetIntArrayElements(_valuesArray, (jboolean *) 0); 4477 values = (GLint *) (_valuesBase + _valuesBufferOffset); 4478 } 4479 glGetSynciv( 4480 (GLsync)sync, 4481 (GLenum)pname, 4482 (GLsizei)bufSize, 4483 (GLsizei *)length, 4484 (GLint *)values 4485 ); 4486 4487exit: 4488 if (_valuesArray) { 4489 _env->ReleaseIntArrayElements(_valuesArray, (jint*)values, _exception ? JNI_ABORT : 0); 4490 } 4491 if (_lengthArray) { 4492 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, _exception ? JNI_ABORT : 0); 4493 } 4494 if (_exception) { 4495 jniThrowException(_env, _exceptionType, _exceptionMessage); 4496 } 4497} 4498 4499/* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */ 4500static void 4501android_glGetInteger64i_v__II_3JI 4502 (JNIEnv *_env, jobject _this, jint target, jint index, jlongArray data_ref, jint offset) { 4503 jint _exception = 0; 4504 const char * _exceptionType = NULL; 4505 const char * _exceptionMessage = NULL; 4506 GLint64 *data_base = (GLint64 *) 0; 4507 jint _remaining; 4508 GLint64 *data = (GLint64 *) 0; 4509 4510 if (!data_ref) { 4511 _exception = 1; 4512 _exceptionType = "java/lang/IllegalArgumentException"; 4513 _exceptionMessage = "data == null"; 4514 goto exit; 4515 } 4516 if (offset < 0) { 4517 _exception = 1; 4518 _exceptionType = "java/lang/IllegalArgumentException"; 4519 _exceptionMessage = "offset < 0"; 4520 goto exit; 4521 } 4522 _remaining = _env->GetArrayLength(data_ref) - offset; 4523 data_base = (GLint64 *) 4524 _env->GetLongArrayElements(data_ref, (jboolean *)0); 4525 data = data_base + offset; 4526 4527 glGetInteger64i_v( 4528 (GLenum)target, 4529 (GLuint)index, 4530 (GLint64 *)data 4531 ); 4532 4533exit: 4534 if (data_base) { 4535 _env->ReleaseLongArrayElements(data_ref, (jlong*)data_base, 4536 _exception ? JNI_ABORT: 0); 4537 } 4538 if (_exception) { 4539 jniThrowException(_env, _exceptionType, _exceptionMessage); 4540 } 4541} 4542 4543/* void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) */ 4544static void 4545android_glGetInteger64i_v__IILjava_nio_LongBuffer_2 4546 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) { 4547 jint _exception = 0; 4548 const char * _exceptionType = NULL; 4549 const char * _exceptionMessage = NULL; 4550 jlongArray _array = (jlongArray) 0; 4551 jint _bufferOffset = (jint) 0; 4552 jint _remaining; 4553 GLint64 *data = (GLint64 *) 0; 4554 4555 if (!data_buf) { 4556 _exception = 1; 4557 _exceptionType = "java/lang/IllegalArgumentException"; 4558 _exceptionMessage = "data == null"; 4559 goto exit; 4560 } 4561 data = (GLint64 *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 4562 if (data == NULL) { 4563 char * _dataBase = (char *)_env->GetLongArrayElements(_array, (jboolean *) 0); 4564 data = (GLint64 *) (_dataBase + _bufferOffset); 4565 } 4566 glGetInteger64i_v( 4567 (GLenum)target, 4568 (GLuint)index, 4569 (GLint64 *)data 4570 ); 4571 4572exit: 4573 if (_array) { 4574 _env->ReleaseLongArrayElements(_array, (jlong*)data, _exception ? JNI_ABORT : 0); 4575 } 4576 if (_exception) { 4577 jniThrowException(_env, _exceptionType, _exceptionMessage); 4578 } 4579} 4580 4581/* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */ 4582static void 4583android_glGetBufferParameteri64v__II_3JI 4584 (JNIEnv *_env, jobject _this, jint target, jint pname, jlongArray params_ref, jint offset) { 4585 jint _exception = 0; 4586 const char * _exceptionType = NULL; 4587 const char * _exceptionMessage = NULL; 4588 GLint64 *params_base = (GLint64 *) 0; 4589 jint _remaining; 4590 GLint64 *params = (GLint64 *) 0; 4591 4592 if (!params_ref) { 4593 _exception = 1; 4594 _exceptionType = "java/lang/IllegalArgumentException"; 4595 _exceptionMessage = "params == null"; 4596 goto exit; 4597 } 4598 if (offset < 0) { 4599 _exception = 1; 4600 _exceptionType = "java/lang/IllegalArgumentException"; 4601 _exceptionMessage = "offset < 0"; 4602 goto exit; 4603 } 4604 _remaining = _env->GetArrayLength(params_ref) - offset; 4605 params_base = (GLint64 *) 4606 _env->GetLongArrayElements(params_ref, (jboolean *)0); 4607 params = params_base + offset; 4608 4609 glGetBufferParameteri64v( 4610 (GLenum)target, 4611 (GLenum)pname, 4612 (GLint64 *)params 4613 ); 4614 4615exit: 4616 if (params_base) { 4617 _env->ReleaseLongArrayElements(params_ref, (jlong*)params_base, 4618 _exception ? JNI_ABORT: 0); 4619 } 4620 if (_exception) { 4621 jniThrowException(_env, _exceptionType, _exceptionMessage); 4622 } 4623} 4624 4625/* void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) */ 4626static void 4627android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2 4628 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 4629 jint _exception = 0; 4630 const char * _exceptionType = NULL; 4631 const char * _exceptionMessage = NULL; 4632 jlongArray _array = (jlongArray) 0; 4633 jint _bufferOffset = (jint) 0; 4634 jint _remaining; 4635 GLint64 *params = (GLint64 *) 0; 4636 4637 if (!params_buf) { 4638 _exception = 1; 4639 _exceptionType = "java/lang/IllegalArgumentException"; 4640 _exceptionMessage = "params == null"; 4641 goto exit; 4642 } 4643 params = (GLint64 *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 4644 if (params == NULL) { 4645 char * _paramsBase = (char *)_env->GetLongArrayElements(_array, (jboolean *) 0); 4646 params = (GLint64 *) (_paramsBase + _bufferOffset); 4647 } 4648 glGetBufferParameteri64v( 4649 (GLenum)target, 4650 (GLenum)pname, 4651 (GLint64 *)params 4652 ); 4653 4654exit: 4655 if (_array) { 4656 _env->ReleaseLongArrayElements(_array, (jlong*)params, _exception ? JNI_ABORT : 0); 4657 } 4658 if (_exception) { 4659 jniThrowException(_env, _exceptionType, _exceptionMessage); 4660 } 4661} 4662 4663/* void glGenSamplers ( GLsizei count, GLuint *samplers ) */ 4664static void 4665android_glGenSamplers__I_3II 4666 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) { 4667 jint _exception = 0; 4668 const char * _exceptionType = NULL; 4669 const char * _exceptionMessage = NULL; 4670 GLuint *samplers_base = (GLuint *) 0; 4671 jint _remaining; 4672 GLuint *samplers = (GLuint *) 0; 4673 4674 if (!samplers_ref) { 4675 _exception = 1; 4676 _exceptionType = "java/lang/IllegalArgumentException"; 4677 _exceptionMessage = "samplers == null"; 4678 goto exit; 4679 } 4680 if (offset < 0) { 4681 _exception = 1; 4682 _exceptionType = "java/lang/IllegalArgumentException"; 4683 _exceptionMessage = "offset < 0"; 4684 goto exit; 4685 } 4686 _remaining = _env->GetArrayLength(samplers_ref) - offset; 4687 samplers_base = (GLuint *) 4688 _env->GetIntArrayElements(samplers_ref, (jboolean *)0); 4689 samplers = samplers_base + offset; 4690 4691 glGenSamplers( 4692 (GLsizei)count, 4693 (GLuint *)samplers 4694 ); 4695 4696exit: 4697 if (samplers_base) { 4698 _env->ReleaseIntArrayElements(samplers_ref, (jint*)samplers_base, 4699 _exception ? JNI_ABORT: 0); 4700 } 4701 if (_exception) { 4702 jniThrowException(_env, _exceptionType, _exceptionMessage); 4703 } 4704} 4705 4706/* void glGenSamplers ( GLsizei count, GLuint *samplers ) */ 4707static void 4708android_glGenSamplers__ILjava_nio_IntBuffer_2 4709 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) { 4710 jint _exception = 0; 4711 const char * _exceptionType = NULL; 4712 const char * _exceptionMessage = NULL; 4713 jintArray _array = (jintArray) 0; 4714 jint _bufferOffset = (jint) 0; 4715 jint _remaining; 4716 GLuint *samplers = (GLuint *) 0; 4717 4718 if (!samplers_buf) { 4719 _exception = 1; 4720 _exceptionType = "java/lang/IllegalArgumentException"; 4721 _exceptionMessage = "samplers == null"; 4722 goto exit; 4723 } 4724 samplers = (GLuint *)getPointer(_env, samplers_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 4725 if (samplers == NULL) { 4726 char * _samplersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 4727 samplers = (GLuint *) (_samplersBase + _bufferOffset); 4728 } 4729 glGenSamplers( 4730 (GLsizei)count, 4731 (GLuint *)samplers 4732 ); 4733 4734exit: 4735 if (_array) { 4736 _env->ReleaseIntArrayElements(_array, (jint*)samplers, _exception ? JNI_ABORT : 0); 4737 } 4738 if (_exception) { 4739 jniThrowException(_env, _exceptionType, _exceptionMessage); 4740 } 4741} 4742 4743/* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */ 4744static void 4745android_glDeleteSamplers__I_3II 4746 (JNIEnv *_env, jobject _this, jint count, jintArray samplers_ref, jint offset) { 4747 jint _exception = 0; 4748 const char * _exceptionType = NULL; 4749 const char * _exceptionMessage = NULL; 4750 GLuint *samplers_base = (GLuint *) 0; 4751 jint _remaining; 4752 GLuint *samplers = (GLuint *) 0; 4753 4754 if (!samplers_ref) { 4755 _exception = 1; 4756 _exceptionType = "java/lang/IllegalArgumentException"; 4757 _exceptionMessage = "samplers == null"; 4758 goto exit; 4759 } 4760 if (offset < 0) { 4761 _exception = 1; 4762 _exceptionType = "java/lang/IllegalArgumentException"; 4763 _exceptionMessage = "offset < 0"; 4764 goto exit; 4765 } 4766 _remaining = _env->GetArrayLength(samplers_ref) - offset; 4767 samplers_base = (GLuint *) 4768 _env->GetIntArrayElements(samplers_ref, (jboolean *)0); 4769 samplers = samplers_base + offset; 4770 4771 glDeleteSamplers( 4772 (GLsizei)count, 4773 (GLuint *)samplers 4774 ); 4775 4776exit: 4777 if (samplers_base) { 4778 _env->ReleaseIntArrayElements(samplers_ref, (jint*)samplers_base, 4779 JNI_ABORT); 4780 } 4781 if (_exception) { 4782 jniThrowException(_env, _exceptionType, _exceptionMessage); 4783 } 4784} 4785 4786/* void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) */ 4787static void 4788android_glDeleteSamplers__ILjava_nio_IntBuffer_2 4789 (JNIEnv *_env, jobject _this, jint count, jobject samplers_buf) { 4790 jint _exception = 0; 4791 const char * _exceptionType = NULL; 4792 const char * _exceptionMessage = NULL; 4793 jintArray _array = (jintArray) 0; 4794 jint _bufferOffset = (jint) 0; 4795 jint _remaining; 4796 GLuint *samplers = (GLuint *) 0; 4797 4798 if (!samplers_buf) { 4799 _exception = 1; 4800 _exceptionType = "java/lang/IllegalArgumentException"; 4801 _exceptionMessage = "samplers == null"; 4802 goto exit; 4803 } 4804 samplers = (GLuint *)getPointer(_env, samplers_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 4805 if (samplers == NULL) { 4806 char * _samplersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 4807 samplers = (GLuint *) (_samplersBase + _bufferOffset); 4808 } 4809 glDeleteSamplers( 4810 (GLsizei)count, 4811 (GLuint *)samplers 4812 ); 4813 4814exit: 4815 if (_array) { 4816 _env->ReleaseIntArrayElements(_array, (jint*)samplers, JNI_ABORT); 4817 } 4818 if (_exception) { 4819 jniThrowException(_env, _exceptionType, _exceptionMessage); 4820 } 4821} 4822 4823/* GLboolean glIsSampler ( GLuint sampler ) */ 4824static jboolean 4825android_glIsSampler__I 4826 (JNIEnv *_env, jobject _this, jint sampler) { 4827 GLboolean _returnValue; 4828 _returnValue = glIsSampler( 4829 (GLuint)sampler 4830 ); 4831 return (jboolean)_returnValue; 4832} 4833 4834/* void glBindSampler ( GLuint unit, GLuint sampler ) */ 4835static void 4836android_glBindSampler__II 4837 (JNIEnv *_env, jobject _this, jint unit, jint sampler) { 4838 glBindSampler( 4839 (GLuint)unit, 4840 (GLuint)sampler 4841 ); 4842} 4843 4844/* void glSamplerParameteri ( GLuint sampler, GLenum pname, GLint param ) */ 4845static void 4846android_glSamplerParameteri__III 4847 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jint param) { 4848 glSamplerParameteri( 4849 (GLuint)sampler, 4850 (GLenum)pname, 4851 (GLint)param 4852 ); 4853} 4854 4855/* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */ 4856static void 4857android_glSamplerParameteriv__II_3II 4858 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) { 4859 jint _exception = 0; 4860 const char * _exceptionType = NULL; 4861 const char * _exceptionMessage = NULL; 4862 GLint *param_base = (GLint *) 0; 4863 jint _remaining; 4864 GLint *param = (GLint *) 0; 4865 4866 if (!param_ref) { 4867 _exception = 1; 4868 _exceptionType = "java/lang/IllegalArgumentException"; 4869 _exceptionMessage = "param == null"; 4870 goto exit; 4871 } 4872 if (offset < 0) { 4873 _exception = 1; 4874 _exceptionType = "java/lang/IllegalArgumentException"; 4875 _exceptionMessage = "offset < 0"; 4876 goto exit; 4877 } 4878 _remaining = _env->GetArrayLength(param_ref) - offset; 4879 param_base = (GLint *) 4880 _env->GetIntArrayElements(param_ref, (jboolean *)0); 4881 param = param_base + offset; 4882 4883 glSamplerParameteriv( 4884 (GLuint)sampler, 4885 (GLenum)pname, 4886 (GLint *)param 4887 ); 4888 4889exit: 4890 if (param_base) { 4891 _env->ReleaseIntArrayElements(param_ref, (jint*)param_base, 4892 JNI_ABORT); 4893 } 4894 if (_exception) { 4895 jniThrowException(_env, _exceptionType, _exceptionMessage); 4896 } 4897} 4898 4899/* void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) */ 4900static void 4901android_glSamplerParameteriv__IILjava_nio_IntBuffer_2 4902 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) { 4903 jint _exception = 0; 4904 const char * _exceptionType = NULL; 4905 const char * _exceptionMessage = NULL; 4906 jintArray _array = (jintArray) 0; 4907 jint _bufferOffset = (jint) 0; 4908 jint _remaining; 4909 GLint *param = (GLint *) 0; 4910 4911 if (!param_buf) { 4912 _exception = 1; 4913 _exceptionType = "java/lang/IllegalArgumentException"; 4914 _exceptionMessage = "param == null"; 4915 goto exit; 4916 } 4917 param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 4918 if (param == NULL) { 4919 char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 4920 param = (GLint *) (_paramBase + _bufferOffset); 4921 } 4922 glSamplerParameteriv( 4923 (GLuint)sampler, 4924 (GLenum)pname, 4925 (GLint *)param 4926 ); 4927 4928exit: 4929 if (_array) { 4930 _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT); 4931 } 4932 if (_exception) { 4933 jniThrowException(_env, _exceptionType, _exceptionMessage); 4934 } 4935} 4936 4937/* void glSamplerParameterf ( GLuint sampler, GLenum pname, GLfloat param ) */ 4938static void 4939android_glSamplerParameterf__IIF 4940 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloat param) { 4941 glSamplerParameterf( 4942 (GLuint)sampler, 4943 (GLenum)pname, 4944 (GLfloat)param 4945 ); 4946} 4947 4948/* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */ 4949static void 4950android_glSamplerParameterfv__II_3FI 4951 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray param_ref, jint offset) { 4952 jint _exception = 0; 4953 const char * _exceptionType = NULL; 4954 const char * _exceptionMessage = NULL; 4955 GLfloat *param_base = (GLfloat *) 0; 4956 jint _remaining; 4957 GLfloat *param = (GLfloat *) 0; 4958 4959 if (!param_ref) { 4960 _exception = 1; 4961 _exceptionType = "java/lang/IllegalArgumentException"; 4962 _exceptionMessage = "param == null"; 4963 goto exit; 4964 } 4965 if (offset < 0) { 4966 _exception = 1; 4967 _exceptionType = "java/lang/IllegalArgumentException"; 4968 _exceptionMessage = "offset < 0"; 4969 goto exit; 4970 } 4971 _remaining = _env->GetArrayLength(param_ref) - offset; 4972 param_base = (GLfloat *) 4973 _env->GetFloatArrayElements(param_ref, (jboolean *)0); 4974 param = param_base + offset; 4975 4976 glSamplerParameterfv( 4977 (GLuint)sampler, 4978 (GLenum)pname, 4979 (GLfloat *)param 4980 ); 4981 4982exit: 4983 if (param_base) { 4984 _env->ReleaseFloatArrayElements(param_ref, (jfloat*)param_base, 4985 JNI_ABORT); 4986 } 4987 if (_exception) { 4988 jniThrowException(_env, _exceptionType, _exceptionMessage); 4989 } 4990} 4991 4992/* void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) */ 4993static void 4994android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2 4995 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) { 4996 jint _exception = 0; 4997 const char * _exceptionType = NULL; 4998 const char * _exceptionMessage = NULL; 4999 jfloatArray _array = (jfloatArray) 0; 5000 jint _bufferOffset = (jint) 0; 5001 jint _remaining; 5002 GLfloat *param = (GLfloat *) 0; 5003 5004 if (!param_buf) { 5005 _exception = 1; 5006 _exceptionType = "java/lang/IllegalArgumentException"; 5007 _exceptionMessage = "param == null"; 5008 goto exit; 5009 } 5010 param = (GLfloat *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5011 if (param == NULL) { 5012 char * _paramBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 5013 param = (GLfloat *) (_paramBase + _bufferOffset); 5014 } 5015 glSamplerParameterfv( 5016 (GLuint)sampler, 5017 (GLenum)pname, 5018 (GLfloat *)param 5019 ); 5020 5021exit: 5022 if (_array) { 5023 _env->ReleaseFloatArrayElements(_array, (jfloat*)param, JNI_ABORT); 5024 } 5025 if (_exception) { 5026 jniThrowException(_env, _exceptionType, _exceptionMessage); 5027 } 5028} 5029 5030/* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */ 5031static void 5032android_glGetSamplerParameteriv__II_3II 5033 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) { 5034 jint _exception = 0; 5035 const char * _exceptionType = NULL; 5036 const char * _exceptionMessage = NULL; 5037 GLint *params_base = (GLint *) 0; 5038 jint _remaining; 5039 GLint *params = (GLint *) 0; 5040 5041 if (!params_ref) { 5042 _exception = 1; 5043 _exceptionType = "java/lang/IllegalArgumentException"; 5044 _exceptionMessage = "params == null"; 5045 goto exit; 5046 } 5047 if (offset < 0) { 5048 _exception = 1; 5049 _exceptionType = "java/lang/IllegalArgumentException"; 5050 _exceptionMessage = "offset < 0"; 5051 goto exit; 5052 } 5053 _remaining = _env->GetArrayLength(params_ref) - offset; 5054 params_base = (GLint *) 5055 _env->GetIntArrayElements(params_ref, (jboolean *)0); 5056 params = params_base + offset; 5057 5058 glGetSamplerParameteriv( 5059 (GLuint)sampler, 5060 (GLenum)pname, 5061 (GLint *)params 5062 ); 5063 5064exit: 5065 if (params_base) { 5066 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 5067 _exception ? JNI_ABORT: 0); 5068 } 5069 if (_exception) { 5070 jniThrowException(_env, _exceptionType, _exceptionMessage); 5071 } 5072} 5073 5074/* void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) */ 5075static void 5076android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2 5077 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) { 5078 jint _exception = 0; 5079 const char * _exceptionType = NULL; 5080 const char * _exceptionMessage = NULL; 5081 jintArray _array = (jintArray) 0; 5082 jint _bufferOffset = (jint) 0; 5083 jint _remaining; 5084 GLint *params = (GLint *) 0; 5085 5086 if (!params_buf) { 5087 _exception = 1; 5088 _exceptionType = "java/lang/IllegalArgumentException"; 5089 _exceptionMessage = "params == null"; 5090 goto exit; 5091 } 5092 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5093 if (params == NULL) { 5094 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 5095 params = (GLint *) (_paramsBase + _bufferOffset); 5096 } 5097 glGetSamplerParameteriv( 5098 (GLuint)sampler, 5099 (GLenum)pname, 5100 (GLint *)params 5101 ); 5102 5103exit: 5104 if (_array) { 5105 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 5106 } 5107 if (_exception) { 5108 jniThrowException(_env, _exceptionType, _exceptionMessage); 5109 } 5110} 5111 5112/* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */ 5113static void 5114android_glGetSamplerParameterfv__II_3FI 5115 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jfloatArray params_ref, jint offset) { 5116 jint _exception = 0; 5117 const char * _exceptionType = NULL; 5118 const char * _exceptionMessage = NULL; 5119 GLfloat *params_base = (GLfloat *) 0; 5120 jint _remaining; 5121 GLfloat *params = (GLfloat *) 0; 5122 5123 if (!params_ref) { 5124 _exception = 1; 5125 _exceptionType = "java/lang/IllegalArgumentException"; 5126 _exceptionMessage = "params == null"; 5127 goto exit; 5128 } 5129 if (offset < 0) { 5130 _exception = 1; 5131 _exceptionType = "java/lang/IllegalArgumentException"; 5132 _exceptionMessage = "offset < 0"; 5133 goto exit; 5134 } 5135 _remaining = _env->GetArrayLength(params_ref) - offset; 5136 params_base = (GLfloat *) 5137 _env->GetFloatArrayElements(params_ref, (jboolean *)0); 5138 params = params_base + offset; 5139 5140 glGetSamplerParameterfv( 5141 (GLuint)sampler, 5142 (GLenum)pname, 5143 (GLfloat *)params 5144 ); 5145 5146exit: 5147 if (params_base) { 5148 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base, 5149 _exception ? JNI_ABORT: 0); 5150 } 5151 if (_exception) { 5152 jniThrowException(_env, _exceptionType, _exceptionMessage); 5153 } 5154} 5155 5156/* void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) */ 5157static void 5158android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2 5159 (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) { 5160 jint _exception = 0; 5161 const char * _exceptionType = NULL; 5162 const char * _exceptionMessage = NULL; 5163 jfloatArray _array = (jfloatArray) 0; 5164 jint _bufferOffset = (jint) 0; 5165 jint _remaining; 5166 GLfloat *params = (GLfloat *) 0; 5167 5168 if (!params_buf) { 5169 _exception = 1; 5170 _exceptionType = "java/lang/IllegalArgumentException"; 5171 _exceptionMessage = "params == null"; 5172 goto exit; 5173 } 5174 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5175 if (params == NULL) { 5176 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); 5177 params = (GLfloat *) (_paramsBase + _bufferOffset); 5178 } 5179 glGetSamplerParameterfv( 5180 (GLuint)sampler, 5181 (GLenum)pname, 5182 (GLfloat *)params 5183 ); 5184 5185exit: 5186 if (_array) { 5187 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0); 5188 } 5189 if (_exception) { 5190 jniThrowException(_env, _exceptionType, _exceptionMessage); 5191 } 5192} 5193 5194/* void glVertexAttribDivisor ( GLuint index, GLuint divisor ) */ 5195static void 5196android_glVertexAttribDivisor__II 5197 (JNIEnv *_env, jobject _this, jint index, jint divisor) { 5198 glVertexAttribDivisor( 5199 (GLuint)index, 5200 (GLuint)divisor 5201 ); 5202} 5203 5204/* void glBindTransformFeedback ( GLenum target, GLuint id ) */ 5205static void 5206android_glBindTransformFeedback__II 5207 (JNIEnv *_env, jobject _this, jint target, jint id) { 5208 glBindTransformFeedback( 5209 (GLenum)target, 5210 (GLuint)id 5211 ); 5212} 5213 5214/* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */ 5215static void 5216android_glDeleteTransformFeedbacks__I_3II 5217 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) { 5218 jint _exception = 0; 5219 const char * _exceptionType = NULL; 5220 const char * _exceptionMessage = NULL; 5221 GLuint *ids_base = (GLuint *) 0; 5222 jint _remaining; 5223 GLuint *ids = (GLuint *) 0; 5224 5225 if (!ids_ref) { 5226 _exception = 1; 5227 _exceptionType = "java/lang/IllegalArgumentException"; 5228 _exceptionMessage = "ids == null"; 5229 goto exit; 5230 } 5231 if (offset < 0) { 5232 _exception = 1; 5233 _exceptionType = "java/lang/IllegalArgumentException"; 5234 _exceptionMessage = "offset < 0"; 5235 goto exit; 5236 } 5237 _remaining = _env->GetArrayLength(ids_ref) - offset; 5238 ids_base = (GLuint *) 5239 _env->GetIntArrayElements(ids_ref, (jboolean *)0); 5240 ids = ids_base + offset; 5241 5242 glDeleteTransformFeedbacks( 5243 (GLsizei)n, 5244 (GLuint *)ids 5245 ); 5246 5247exit: 5248 if (ids_base) { 5249 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base, 5250 JNI_ABORT); 5251 } 5252 if (_exception) { 5253 jniThrowException(_env, _exceptionType, _exceptionMessage); 5254 } 5255} 5256 5257/* void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) */ 5258static void 5259android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2 5260 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) { 5261 jint _exception = 0; 5262 const char * _exceptionType = NULL; 5263 const char * _exceptionMessage = NULL; 5264 jintArray _array = (jintArray) 0; 5265 jint _bufferOffset = (jint) 0; 5266 jint _remaining; 5267 GLuint *ids = (GLuint *) 0; 5268 5269 if (!ids_buf) { 5270 _exception = 1; 5271 _exceptionType = "java/lang/IllegalArgumentException"; 5272 _exceptionMessage = "ids == null"; 5273 goto exit; 5274 } 5275 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5276 if (ids == NULL) { 5277 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 5278 ids = (GLuint *) (_idsBase + _bufferOffset); 5279 } 5280 glDeleteTransformFeedbacks( 5281 (GLsizei)n, 5282 (GLuint *)ids 5283 ); 5284 5285exit: 5286 if (_array) { 5287 _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT); 5288 } 5289 if (_exception) { 5290 jniThrowException(_env, _exceptionType, _exceptionMessage); 5291 } 5292} 5293 5294/* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */ 5295static void 5296android_glGenTransformFeedbacks__I_3II 5297 (JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) { 5298 jint _exception = 0; 5299 const char * _exceptionType = NULL; 5300 const char * _exceptionMessage = NULL; 5301 GLuint *ids_base = (GLuint *) 0; 5302 jint _remaining; 5303 GLuint *ids = (GLuint *) 0; 5304 5305 if (!ids_ref) { 5306 _exception = 1; 5307 _exceptionType = "java/lang/IllegalArgumentException"; 5308 _exceptionMessage = "ids == null"; 5309 goto exit; 5310 } 5311 if (offset < 0) { 5312 _exception = 1; 5313 _exceptionType = "java/lang/IllegalArgumentException"; 5314 _exceptionMessage = "offset < 0"; 5315 goto exit; 5316 } 5317 _remaining = _env->GetArrayLength(ids_ref) - offset; 5318 ids_base = (GLuint *) 5319 _env->GetIntArrayElements(ids_ref, (jboolean *)0); 5320 ids = ids_base + offset; 5321 5322 glGenTransformFeedbacks( 5323 (GLsizei)n, 5324 (GLuint *)ids 5325 ); 5326 5327exit: 5328 if (ids_base) { 5329 _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base, 5330 _exception ? JNI_ABORT: 0); 5331 } 5332 if (_exception) { 5333 jniThrowException(_env, _exceptionType, _exceptionMessage); 5334 } 5335} 5336 5337/* void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) */ 5338static void 5339android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2 5340 (JNIEnv *_env, jobject _this, jint n, jobject ids_buf) { 5341 jint _exception = 0; 5342 const char * _exceptionType = NULL; 5343 const char * _exceptionMessage = NULL; 5344 jintArray _array = (jintArray) 0; 5345 jint _bufferOffset = (jint) 0; 5346 jint _remaining; 5347 GLuint *ids = (GLuint *) 0; 5348 5349 if (!ids_buf) { 5350 _exception = 1; 5351 _exceptionType = "java/lang/IllegalArgumentException"; 5352 _exceptionMessage = "ids == null"; 5353 goto exit; 5354 } 5355 ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5356 if (ids == NULL) { 5357 char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 5358 ids = (GLuint *) (_idsBase + _bufferOffset); 5359 } 5360 glGenTransformFeedbacks( 5361 (GLsizei)n, 5362 (GLuint *)ids 5363 ); 5364 5365exit: 5366 if (_array) { 5367 _env->ReleaseIntArrayElements(_array, (jint*)ids, _exception ? JNI_ABORT : 0); 5368 } 5369 if (_exception) { 5370 jniThrowException(_env, _exceptionType, _exceptionMessage); 5371 } 5372} 5373 5374/* GLboolean glIsTransformFeedback ( GLuint id ) */ 5375static jboolean 5376android_glIsTransformFeedback__I 5377 (JNIEnv *_env, jobject _this, jint id) { 5378 GLboolean _returnValue; 5379 _returnValue = glIsTransformFeedback( 5380 (GLuint)id 5381 ); 5382 return (jboolean)_returnValue; 5383} 5384 5385/* void glPauseTransformFeedback ( void ) */ 5386static void 5387android_glPauseTransformFeedback__ 5388 (JNIEnv *_env, jobject _this) { 5389 glPauseTransformFeedback(); 5390} 5391 5392/* void glResumeTransformFeedback ( void ) */ 5393static void 5394android_glResumeTransformFeedback__ 5395 (JNIEnv *_env, jobject _this) { 5396 glResumeTransformFeedback(); 5397} 5398 5399/* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */ 5400static void 5401android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2 5402 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray binaryFormat_ref, jint binaryFormatOffset, jobject binary_buf) { 5403 jint _exception = 0; 5404 const char * _exceptionType = NULL; 5405 const char * _exceptionMessage = NULL; 5406 jarray _array = (jarray) 0; 5407 jint _bufferOffset = (jint) 0; 5408 GLsizei *length_base = (GLsizei *) 0; 5409 jint _lengthRemaining; 5410 GLsizei *length = (GLsizei *) 0; 5411 GLenum *binaryFormat_base = (GLenum *) 0; 5412 jint _binaryFormatRemaining; 5413 GLenum *binaryFormat = (GLenum *) 0; 5414 jint _binaryRemaining; 5415 GLvoid *binary = (GLvoid *) 0; 5416 5417 if (length_ref) { 5418 if (lengthOffset < 0) { 5419 _exception = 1; 5420 _exceptionType = "java/lang/IllegalArgumentException"; 5421 _exceptionMessage = "lengthOffset < 0"; 5422 goto exit; 5423 } 5424 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 5425 length_base = (GLsizei *) 5426 _env->GetIntArrayElements(length_ref, (jboolean *)0); 5427 length = length_base + lengthOffset; 5428 } 5429 5430 if (!binaryFormat_ref) { 5431 _exception = 1; 5432 _exceptionType = "java/lang/IllegalArgumentException"; 5433 _exceptionMessage = "binaryFormat == null"; 5434 goto exit; 5435 } 5436 if (binaryFormatOffset < 0) { 5437 _exception = 1; 5438 _exceptionType = "java/lang/IllegalArgumentException"; 5439 _exceptionMessage = "binaryFormatOffset < 0"; 5440 goto exit; 5441 } 5442 _binaryFormatRemaining = _env->GetArrayLength(binaryFormat_ref) - binaryFormatOffset; 5443 binaryFormat_base = (GLenum *) 5444 _env->GetIntArrayElements(binaryFormat_ref, (jboolean *)0); 5445 binaryFormat = binaryFormat_base + binaryFormatOffset; 5446 5447 if (!binary_buf) { 5448 _exception = 1; 5449 _exceptionType = "java/lang/IllegalArgumentException"; 5450 _exceptionMessage = "binary == null"; 5451 goto exit; 5452 } 5453 binary = (GLvoid *)getPointer(_env, binary_buf, (jarray*)&_array, &_binaryRemaining, &_bufferOffset); 5454 if (binary == NULL) { 5455 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 5456 binary = (GLvoid *) (_binaryBase + _bufferOffset); 5457 } 5458 glGetProgramBinary( 5459 (GLuint)program, 5460 (GLsizei)bufSize, 5461 (GLsizei *)length, 5462 (GLenum *)binaryFormat, 5463 (GLvoid *)binary 5464 ); 5465 5466exit: 5467 if (_array) { 5468 releasePointer(_env, _array, binary, _exception ? JNI_FALSE : JNI_TRUE); 5469 } 5470 if (binaryFormat_base) { 5471 _env->ReleaseIntArrayElements(binaryFormat_ref, (jint*)binaryFormat_base, 5472 _exception ? JNI_ABORT: 0); 5473 } 5474 if (length_base) { 5475 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base, 5476 _exception ? JNI_ABORT: 0); 5477 } 5478 if (_exception) { 5479 jniThrowException(_env, _exceptionType, _exceptionMessage); 5480 } 5481} 5482 5483/* void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) */ 5484static void 5485android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2 5486 (JNIEnv *_env, jobject _this, jint program, jint bufSize, jobject length_buf, jobject binaryFormat_buf, jobject binary_buf) { 5487 jint _exception = 0; 5488 const char * _exceptionType = NULL; 5489 const char * _exceptionMessage = NULL; 5490 jintArray _lengthArray = (jintArray) 0; 5491 jint _lengthBufferOffset = (jint) 0; 5492 jintArray _binaryFormatArray = (jintArray) 0; 5493 jint _binaryFormatBufferOffset = (jint) 0; 5494 jintArray _binaryArray = (jintArray) 0; 5495 jint _binaryBufferOffset = (jint) 0; 5496 jint _lengthRemaining; 5497 GLsizei *length = (GLsizei *) 0; 5498 jint _binaryFormatRemaining; 5499 GLenum *binaryFormat = (GLenum *) 0; 5500 jint _binaryRemaining; 5501 GLvoid *binary = (GLvoid *) 0; 5502 5503 if (length_buf) { 5504 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset); 5505 } 5506 if (!binaryFormat_buf) { 5507 _exception = 1; 5508 _exceptionType = "java/lang/IllegalArgumentException"; 5509 _exceptionMessage = "binaryFormat == null"; 5510 goto exit; 5511 } 5512 binaryFormat = (GLenum *)getPointer(_env, binaryFormat_buf, (jarray*)&_binaryFormatArray, &_binaryFormatRemaining, &_binaryFormatBufferOffset); 5513 if (!binary_buf) { 5514 _exception = 1; 5515 _exceptionType = "java/lang/IllegalArgumentException"; 5516 _exceptionMessage = "binary == null"; 5517 goto exit; 5518 } 5519 binary = (GLvoid *)getPointer(_env, binary_buf, (jarray*)&_binaryArray, &_binaryRemaining, &_binaryBufferOffset); 5520 if (length_buf && length == NULL) { 5521 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0); 5522 length = (GLsizei *) (_lengthBase + _lengthBufferOffset); 5523 } 5524 if (binaryFormat == NULL) { 5525 char * _binaryFormatBase = (char *)_env->GetIntArrayElements(_binaryFormatArray, (jboolean *) 0); 5526 binaryFormat = (GLenum *) (_binaryFormatBase + _binaryFormatBufferOffset); 5527 } 5528 if (binary == NULL) { 5529 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_binaryArray, (jboolean *) 0); 5530 binary = (GLvoid *) (_binaryBase + _binaryBufferOffset); 5531 } 5532 glGetProgramBinary( 5533 (GLuint)program, 5534 (GLsizei)bufSize, 5535 (GLsizei *)length, 5536 (GLenum *)binaryFormat, 5537 (GLvoid *)binary 5538 ); 5539 5540exit: 5541 if (_binaryArray) { 5542 releasePointer(_env, _binaryArray, binary, _exception ? JNI_FALSE : JNI_TRUE); 5543 } 5544 if (_binaryFormatArray) { 5545 _env->ReleaseIntArrayElements(_binaryFormatArray, (jint*)binaryFormat, _exception ? JNI_ABORT : 0); 5546 } 5547 if (_lengthArray) { 5548 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, _exception ? JNI_ABORT : 0); 5549 } 5550 if (_exception) { 5551 jniThrowException(_env, _exceptionType, _exceptionMessage); 5552 } 5553} 5554 5555/* void glProgramBinary ( GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length ) */ 5556static void 5557android_glProgramBinary__IILjava_nio_Buffer_2I 5558 (JNIEnv *_env, jobject _this, jint program, jint binaryFormat, jobject binary_buf, jint length) { 5559 jint _exception = 0; 5560 const char * _exceptionType = NULL; 5561 const char * _exceptionMessage = NULL; 5562 jarray _array = (jarray) 0; 5563 jint _bufferOffset = (jint) 0; 5564 jint _remaining; 5565 GLvoid *binary = (GLvoid *) 0; 5566 5567 if (!binary_buf) { 5568 _exception = 1; 5569 _exceptionType = "java/lang/IllegalArgumentException"; 5570 _exceptionMessage = "binary == null"; 5571 goto exit; 5572 } 5573 binary = (GLvoid *)getPointer(_env, binary_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5574 if (binary == NULL) { 5575 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 5576 binary = (GLvoid *) (_binaryBase + _bufferOffset); 5577 } 5578 glProgramBinary( 5579 (GLuint)program, 5580 (GLenum)binaryFormat, 5581 (GLvoid *)binary, 5582 (GLsizei)length 5583 ); 5584 5585exit: 5586 if (_array) { 5587 releasePointer(_env, _array, binary, JNI_FALSE); 5588 } 5589 if (_exception) { 5590 jniThrowException(_env, _exceptionType, _exceptionMessage); 5591 } 5592} 5593 5594/* void glProgramParameteri ( GLuint program, GLenum pname, GLint value ) */ 5595static void 5596android_glProgramParameteri__III 5597 (JNIEnv *_env, jobject _this, jint program, jint pname, jint value) { 5598 glProgramParameteri( 5599 (GLuint)program, 5600 (GLenum)pname, 5601 (GLint)value 5602 ); 5603} 5604 5605/* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */ 5606static void 5607android_glInvalidateFramebuffer__II_3II 5608 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset) { 5609 jint _exception = 0; 5610 const char * _exceptionType = NULL; 5611 const char * _exceptionMessage = NULL; 5612 GLenum *attachments_base = (GLenum *) 0; 5613 jint _remaining; 5614 GLenum *attachments = (GLenum *) 0; 5615 5616 if (!attachments_ref) { 5617 _exception = 1; 5618 _exceptionType = "java/lang/IllegalArgumentException"; 5619 _exceptionMessage = "attachments == null"; 5620 goto exit; 5621 } 5622 if (offset < 0) { 5623 _exception = 1; 5624 _exceptionType = "java/lang/IllegalArgumentException"; 5625 _exceptionMessage = "offset < 0"; 5626 goto exit; 5627 } 5628 _remaining = _env->GetArrayLength(attachments_ref) - offset; 5629 attachments_base = (GLenum *) 5630 _env->GetIntArrayElements(attachments_ref, (jboolean *)0); 5631 attachments = attachments_base + offset; 5632 5633 glInvalidateFramebuffer( 5634 (GLenum)target, 5635 (GLsizei)numAttachments, 5636 (GLenum *)attachments 5637 ); 5638 5639exit: 5640 if (attachments_base) { 5641 _env->ReleaseIntArrayElements(attachments_ref, (jint*)attachments_base, 5642 JNI_ABORT); 5643 } 5644 if (_exception) { 5645 jniThrowException(_env, _exceptionType, _exceptionMessage); 5646 } 5647} 5648 5649/* void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) */ 5650static void 5651android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2 5652 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf) { 5653 jint _exception = 0; 5654 const char * _exceptionType = NULL; 5655 const char * _exceptionMessage = NULL; 5656 jintArray _array = (jintArray) 0; 5657 jint _bufferOffset = (jint) 0; 5658 jint _remaining; 5659 GLenum *attachments = (GLenum *) 0; 5660 5661 if (!attachments_buf) { 5662 _exception = 1; 5663 _exceptionType = "java/lang/IllegalArgumentException"; 5664 _exceptionMessage = "attachments == null"; 5665 goto exit; 5666 } 5667 attachments = (GLenum *)getPointer(_env, attachments_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5668 if (attachments == NULL) { 5669 char * _attachmentsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 5670 attachments = (GLenum *) (_attachmentsBase + _bufferOffset); 5671 } 5672 glInvalidateFramebuffer( 5673 (GLenum)target, 5674 (GLsizei)numAttachments, 5675 (GLenum *)attachments 5676 ); 5677 5678exit: 5679 if (_array) { 5680 _env->ReleaseIntArrayElements(_array, (jint*)attachments, JNI_ABORT); 5681 } 5682 if (_exception) { 5683 jniThrowException(_env, _exceptionType, _exceptionMessage); 5684 } 5685} 5686 5687/* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */ 5688static void 5689android_glInvalidateSubFramebuffer__II_3IIIIII 5690 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jintArray attachments_ref, jint offset, jint x, jint y, jint width, jint height) { 5691 jint _exception = 0; 5692 const char * _exceptionType = NULL; 5693 const char * _exceptionMessage = NULL; 5694 GLenum *attachments_base = (GLenum *) 0; 5695 jint _remaining; 5696 GLenum *attachments = (GLenum *) 0; 5697 5698 if (!attachments_ref) { 5699 _exception = 1; 5700 _exceptionType = "java/lang/IllegalArgumentException"; 5701 _exceptionMessage = "attachments == null"; 5702 goto exit; 5703 } 5704 if (offset < 0) { 5705 _exception = 1; 5706 _exceptionType = "java/lang/IllegalArgumentException"; 5707 _exceptionMessage = "offset < 0"; 5708 goto exit; 5709 } 5710 _remaining = _env->GetArrayLength(attachments_ref) - offset; 5711 attachments_base = (GLenum *) 5712 _env->GetIntArrayElements(attachments_ref, (jboolean *)0); 5713 attachments = attachments_base + offset; 5714 5715 glInvalidateSubFramebuffer( 5716 (GLenum)target, 5717 (GLsizei)numAttachments, 5718 (GLenum *)attachments, 5719 (GLint)x, 5720 (GLint)y, 5721 (GLsizei)width, 5722 (GLsizei)height 5723 ); 5724 5725exit: 5726 if (attachments_base) { 5727 _env->ReleaseIntArrayElements(attachments_ref, (jint*)attachments_base, 5728 JNI_ABORT); 5729 } 5730 if (_exception) { 5731 jniThrowException(_env, _exceptionType, _exceptionMessage); 5732 } 5733} 5734 5735/* void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) */ 5736static void 5737android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII 5738 (JNIEnv *_env, jobject _this, jint target, jint numAttachments, jobject attachments_buf, jint x, jint y, jint width, jint height) { 5739 jint _exception = 0; 5740 const char * _exceptionType = NULL; 5741 const char * _exceptionMessage = NULL; 5742 jintArray _array = (jintArray) 0; 5743 jint _bufferOffset = (jint) 0; 5744 jint _remaining; 5745 GLenum *attachments = (GLenum *) 0; 5746 5747 if (!attachments_buf) { 5748 _exception = 1; 5749 _exceptionType = "java/lang/IllegalArgumentException"; 5750 _exceptionMessage = "attachments == null"; 5751 goto exit; 5752 } 5753 attachments = (GLenum *)getPointer(_env, attachments_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5754 if (attachments == NULL) { 5755 char * _attachmentsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 5756 attachments = (GLenum *) (_attachmentsBase + _bufferOffset); 5757 } 5758 glInvalidateSubFramebuffer( 5759 (GLenum)target, 5760 (GLsizei)numAttachments, 5761 (GLenum *)attachments, 5762 (GLint)x, 5763 (GLint)y, 5764 (GLsizei)width, 5765 (GLsizei)height 5766 ); 5767 5768exit: 5769 if (_array) { 5770 _env->ReleaseIntArrayElements(_array, (jint*)attachments, JNI_ABORT); 5771 } 5772 if (_exception) { 5773 jniThrowException(_env, _exceptionType, _exceptionMessage); 5774 } 5775} 5776 5777/* void glTexStorage2D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) */ 5778static void 5779android_glTexStorage2D__IIIII 5780 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height) { 5781 glTexStorage2D( 5782 (GLenum)target, 5783 (GLsizei)levels, 5784 (GLenum)internalformat, 5785 (GLsizei)width, 5786 (GLsizei)height 5787 ); 5788} 5789 5790/* void glTexStorage3D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) */ 5791static void 5792android_glTexStorage3D__IIIIII 5793 (JNIEnv *_env, jobject _this, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { 5794 glTexStorage3D( 5795 (GLenum)target, 5796 (GLsizei)levels, 5797 (GLenum)internalformat, 5798 (GLsizei)width, 5799 (GLsizei)height, 5800 (GLsizei)depth 5801 ); 5802} 5803 5804/* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */ 5805static void 5806android_glGetInternalformativ__IIII_3II 5807 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jintArray params_ref, jint offset) { 5808 jint _exception = 0; 5809 const char * _exceptionType = NULL; 5810 const char * _exceptionMessage = NULL; 5811 GLint *params_base = (GLint *) 0; 5812 jint _remaining; 5813 GLint *params = (GLint *) 0; 5814 5815 if (!params_ref) { 5816 _exception = 1; 5817 _exceptionType = "java/lang/IllegalArgumentException"; 5818 _exceptionMessage = "params == null"; 5819 goto exit; 5820 } 5821 if (offset < 0) { 5822 _exception = 1; 5823 _exceptionType = "java/lang/IllegalArgumentException"; 5824 _exceptionMessage = "offset < 0"; 5825 goto exit; 5826 } 5827 _remaining = _env->GetArrayLength(params_ref) - offset; 5828 params_base = (GLint *) 5829 _env->GetIntArrayElements(params_ref, (jboolean *)0); 5830 params = params_base + offset; 5831 5832 glGetInternalformativ( 5833 (GLenum)target, 5834 (GLenum)internalformat, 5835 (GLenum)pname, 5836 (GLsizei)bufSize, 5837 (GLint *)params 5838 ); 5839 5840exit: 5841 if (params_base) { 5842 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, 5843 _exception ? JNI_ABORT: 0); 5844 } 5845 if (_exception) { 5846 jniThrowException(_env, _exceptionType, _exceptionMessage); 5847 } 5848} 5849 5850/* void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) */ 5851static void 5852android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2 5853 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint pname, jint bufSize, jobject params_buf) { 5854 jint _exception = 0; 5855 const char * _exceptionType = NULL; 5856 const char * _exceptionMessage = NULL; 5857 jintArray _array = (jintArray) 0; 5858 jint _bufferOffset = (jint) 0; 5859 jint _remaining; 5860 GLint *params = (GLint *) 0; 5861 5862 if (!params_buf) { 5863 _exception = 1; 5864 _exceptionType = "java/lang/IllegalArgumentException"; 5865 _exceptionMessage = "params == null"; 5866 goto exit; 5867 } 5868 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); 5869 if (params == NULL) { 5870 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); 5871 params = (GLint *) (_paramsBase + _bufferOffset); 5872 } 5873 glGetInternalformativ( 5874 (GLenum)target, 5875 (GLenum)internalformat, 5876 (GLenum)pname, 5877 (GLsizei)bufSize, 5878 (GLint *)params 5879 ); 5880 5881exit: 5882 if (_array) { 5883 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); 5884 } 5885 if (_exception) { 5886 jniThrowException(_env, _exceptionType, _exceptionMessage); 5887 } 5888} 5889 5890/* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint offset ) */ 5891static void 5892android_glReadPixels__IIIIIII 5893 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jint offset) { 5894 glReadPixels( 5895 (GLint)x, 5896 (GLint)y, 5897 (GLsizei)width, 5898 (GLsizei)height, 5899 (GLenum)format, 5900 (GLenum)type, 5901 reinterpret_cast<GLvoid *>(offset) 5902 ); 5903} 5904 5905static const char *classPathName = "android/opengl/GLES30"; 5906 5907static const JNINativeMethod methods[] = { 5908{"_nativeClassInit", "()V", (void*)nativeClassInit }, 5909{"glReadBuffer", "(I)V", (void *) android_glReadBuffer__I }, 5910{"glDrawRangeElements", "(IIIIILjava/nio/Buffer;)V", (void *) android_glDrawRangeElements__IIIIILjava_nio_Buffer_2 }, 5911{"glDrawRangeElements", "(IIIIII)V", (void *) android_glDrawRangeElements__IIIIII }, 5912{"glTexImage3D", "(IIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2 }, 5913{"glTexImage3D", "(IIIIIIIIII)V", (void *) android_glTexImage3D__IIIIIIIIII }, 5914{"glTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 }, 5915{"glTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glTexSubImage3D__IIIIIIIIIII }, 5916{"glCopyTexSubImage3D", "(IIIIIIIII)V", (void *) android_glCopyTexSubImage3D__IIIIIIIII }, 5917{"glCompressedTexImage3D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2 }, 5918{"glCompressedTexImage3D", "(IIIIIIIII)V", (void *) android_glCompressedTexImage3D__IIIIIIIII }, 5919{"glCompressedTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2 }, 5920{"glCompressedTexSubImage3D", "(IIIIIIIIIII)V", (void *) android_glCompressedTexSubImage3D__IIIIIIIIIII }, 5921{"glGenQueries", "(I[II)V", (void *) android_glGenQueries__I_3II }, 5922{"glGenQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenQueries__ILjava_nio_IntBuffer_2 }, 5923{"glDeleteQueries", "(I[II)V", (void *) android_glDeleteQueries__I_3II }, 5924{"glDeleteQueries", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteQueries__ILjava_nio_IntBuffer_2 }, 5925{"glIsQuery", "(I)Z", (void *) android_glIsQuery__I }, 5926{"glBeginQuery", "(II)V", (void *) android_glBeginQuery__II }, 5927{"glEndQuery", "(I)V", (void *) android_glEndQuery__I }, 5928{"glGetQueryiv", "(II[II)V", (void *) android_glGetQueryiv__II_3II }, 5929{"glGetQueryiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryiv__IILjava_nio_IntBuffer_2 }, 5930{"glGetQueryObjectuiv", "(II[II)V", (void *) android_glGetQueryObjectuiv__II_3II }, 5931{"glGetQueryObjectuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2 }, 5932{"glUnmapBuffer", "(I)Z", (void *) android_glUnmapBuffer__I }, 5933{"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II }, 5934{"glDrawBuffers", "(I[II)V", (void *) android_glDrawBuffers__I_3II }, 5935{"glDrawBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDrawBuffers__ILjava_nio_IntBuffer_2 }, 5936{"glUniformMatrix2x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x3fv__IIZ_3FI }, 5937{"glUniformMatrix2x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2 }, 5938{"glUniformMatrix3x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x2fv__IIZ_3FI }, 5939{"glUniformMatrix3x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2 }, 5940{"glUniformMatrix2x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2x4fv__IIZ_3FI }, 5941{"glUniformMatrix2x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2 }, 5942{"glUniformMatrix4x2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x2fv__IIZ_3FI }, 5943{"glUniformMatrix4x2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2 }, 5944{"glUniformMatrix3x4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3x4fv__IIZ_3FI }, 5945{"glUniformMatrix3x4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2 }, 5946{"glUniformMatrix4x3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4x3fv__IIZ_3FI }, 5947{"glUniformMatrix4x3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2 }, 5948{"glBlitFramebuffer", "(IIIIIIIIII)V", (void *) android_glBlitFramebuffer__IIIIIIIIII }, 5949{"glRenderbufferStorageMultisample", "(IIIII)V", (void *) android_glRenderbufferStorageMultisample__IIIII }, 5950{"glFramebufferTextureLayer", "(IIIII)V", (void *) android_glFramebufferTextureLayer__IIIII }, 5951{"glMapBufferRange", "(IIII)Ljava/nio/Buffer;", (void *) android_glMapBufferRange__IIII }, 5952{"glFlushMappedBufferRange", "(III)V", (void *) android_glFlushMappedBufferRange__III }, 5953{"glBindVertexArray", "(I)V", (void *) android_glBindVertexArray__I }, 5954{"glDeleteVertexArrays", "(I[II)V", (void *) android_glDeleteVertexArrays__I_3II }, 5955{"glDeleteVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2 }, 5956{"glGenVertexArrays", "(I[II)V", (void *) android_glGenVertexArrays__I_3II }, 5957{"glGenVertexArrays", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenVertexArrays__ILjava_nio_IntBuffer_2 }, 5958{"glIsVertexArray", "(I)Z", (void *) android_glIsVertexArray__I }, 5959{"glGetIntegeri_v", "(II[II)V", (void *) android_glGetIntegeri_v__II_3II }, 5960{"glGetIntegeri_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetIntegeri_v__IILjava_nio_IntBuffer_2 }, 5961{"glBeginTransformFeedback", "(I)V", (void *) android_glBeginTransformFeedback__I }, 5962{"glEndTransformFeedback", "()V", (void *) android_glEndTransformFeedback__ }, 5963{"glBindBufferRange", "(IIIII)V", (void *) android_glBindBufferRange__IIIII }, 5964{"glBindBufferBase", "(III)V", (void *) android_glBindBufferBase__III }, 5965{"glTransformFeedbackVaryings", "(I[Ljava/lang/String;I)V", (void *) android_glTransformFeedbackVaryings }, 5966{"glGetTransformFeedbackVarying", "(III[II[II[II[BI)V", (void *) android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI }, 5967{"glGetTransformFeedbackVarying", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B }, 5968{"glGetTransformFeedbackVarying", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)V", (void *) android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 }, 5969{"glGetTransformFeedbackVarying", "(II[II[II)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying1 }, 5970{"glGetTransformFeedbackVarying", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying2 }, 5971{"glVertexAttribIPointerBounds", "(IIIILjava/nio/Buffer;I)V", (void *) android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I }, 5972{"glVertexAttribIPointer", "(IIIII)V", (void *) android_glVertexAttribIPointer__IIIII }, 5973{"glGetVertexAttribIiv", "(II[II)V", (void *) android_glGetVertexAttribIiv__II_3II }, 5974{"glGetVertexAttribIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2 }, 5975{"glGetVertexAttribIuiv", "(II[II)V", (void *) android_glGetVertexAttribIuiv__II_3II }, 5976{"glGetVertexAttribIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2 }, 5977{"glVertexAttribI4i", "(IIIII)V", (void *) android_glVertexAttribI4i__IIIII }, 5978{"glVertexAttribI4ui", "(IIIII)V", (void *) android_glVertexAttribI4ui__IIIII }, 5979{"glVertexAttribI4iv", "(I[II)V", (void *) android_glVertexAttribI4iv__I_3II }, 5980{"glVertexAttribI4iv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2 }, 5981{"glVertexAttribI4uiv", "(I[II)V", (void *) android_glVertexAttribI4uiv__I_3II }, 5982{"glVertexAttribI4uiv", "(ILjava/nio/IntBuffer;)V", (void *) android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2 }, 5983{"glGetUniformuiv", "(II[II)V", (void *) android_glGetUniformuiv__II_3II }, 5984{"glGetUniformuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformuiv__IILjava_nio_IntBuffer_2 }, 5985{"glGetFragDataLocation", "(ILjava/lang/String;)I", (void *) android_glGetFragDataLocation__ILjava_lang_String_2 }, 5986{"glUniform1ui", "(II)V", (void *) android_glUniform1ui__II }, 5987{"glUniform2ui", "(III)V", (void *) android_glUniform2ui__III }, 5988{"glUniform3ui", "(IIII)V", (void *) android_glUniform3ui__IIII }, 5989{"glUniform4ui", "(IIIII)V", (void *) android_glUniform4ui__IIIII }, 5990{"glUniform1uiv", "(II[II)V", (void *) android_glUniform1uiv__II_3II }, 5991{"glUniform1uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1uiv__IILjava_nio_IntBuffer_2 }, 5992{"glUniform2uiv", "(II[II)V", (void *) android_glUniform2uiv__II_3II }, 5993{"glUniform2uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2uiv__IILjava_nio_IntBuffer_2 }, 5994{"glUniform3uiv", "(II[II)V", (void *) android_glUniform3uiv__II_3II }, 5995{"glUniform3uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3uiv__IILjava_nio_IntBuffer_2 }, 5996{"glUniform4uiv", "(II[II)V", (void *) android_glUniform4uiv__II_3II }, 5997{"glUniform4uiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4uiv__IILjava_nio_IntBuffer_2 }, 5998{"glClearBufferiv", "(II[II)V", (void *) android_glClearBufferiv__II_3II }, 5999{"glClearBufferiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferiv__IILjava_nio_IntBuffer_2 }, 6000{"glClearBufferuiv", "(II[II)V", (void *) android_glClearBufferuiv__II_3II }, 6001{"glClearBufferuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glClearBufferuiv__IILjava_nio_IntBuffer_2 }, 6002{"glClearBufferfv", "(II[FI)V", (void *) android_glClearBufferfv__II_3FI }, 6003{"glClearBufferfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glClearBufferfv__IILjava_nio_FloatBuffer_2 }, 6004{"glClearBufferfi", "(IIFI)V", (void *) android_glClearBufferfi__IIFI }, 6005{"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II }, 6006{"glCopyBufferSubData", "(IIIII)V", (void *) android_glCopyBufferSubData__IIIII }, 6007{"glGetUniformIndices", "(I[Ljava/lang/String;[II)V", (void *) android_glGetUniformIndices_array }, 6008{"glGetUniformIndices", "(I[Ljava/lang/String;Ljava/nio/IntBuffer;)V", (void *) android_glGetUniformIndices_buffer }, 6009{"glGetActiveUniformsiv", "(II[III[II)V", (void *) android_glGetActiveUniformsiv__II_3III_3II }, 6010{"glGetActiveUniformsiv", "(IILjava/nio/IntBuffer;ILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformsiv__IILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2 }, 6011{"glGetUniformBlockIndex", "(ILjava/lang/String;)I", (void *) android_glGetUniformBlockIndex__ILjava_lang_String_2 }, 6012{"glGetActiveUniformBlockiv", "(III[II)V", (void *) android_glGetActiveUniformBlockiv__III_3II }, 6013{"glGetActiveUniformBlockiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetActiveUniformBlockiv__IIILjava_nio_IntBuffer_2 }, 6014{"glGetActiveUniformBlockName", "(III[II[BI)V", (void *) android_glGetActiveUniformBlockName_III_3II_3BI }, 6015{"glGetActiveUniformBlockName", "(IILjava/nio/Buffer;Ljava/nio/Buffer;)V", (void *) android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 }, 6016{"glGetActiveUniformBlockName", "(II)Ljava/lang/String;", (void *) android_glGetActiveUniformBlockName_II }, 6017{"glUniformBlockBinding", "(III)V", (void *) android_glUniformBlockBinding__III }, 6018{"glDrawArraysInstanced", "(IIII)V", (void *) android_glDrawArraysInstanced__IIII }, 6019{"glDrawElementsInstanced", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I }, 6020{"glDrawElementsInstanced", "(IIIII)V", (void *) android_glDrawElementsInstanced__IIIII }, 6021{"glFenceSync", "(II)J", (void *) android_glFenceSync__II }, 6022{"glIsSync", "(J)Z", (void *) android_glIsSync__J }, 6023{"glDeleteSync", "(J)V", (void *) android_glDeleteSync__J }, 6024{"glClientWaitSync", "(JIJ)I", (void *) android_glClientWaitSync__JIJ }, 6025{"glWaitSync", "(JIJ)V", (void *) android_glWaitSync__JIJ }, 6026{"glGetInteger64v", "(I[JI)V", (void *) android_glGetInteger64v__I_3JI }, 6027{"glGetInteger64v", "(ILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64v__ILjava_nio_LongBuffer_2 }, 6028{"glGetSynciv", "(JII[II[II)V", (void *) android_glGetSynciv__JII_3II_3II }, 6029{"glGetSynciv", "(JIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetSynciv__JIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 }, 6030{"glGetInteger64i_v", "(II[JI)V", (void *) android_glGetInteger64i_v__II_3JI }, 6031{"glGetInteger64i_v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetInteger64i_v__IILjava_nio_LongBuffer_2 }, 6032{"glGetBufferParameteri64v", "(II[JI)V", (void *) android_glGetBufferParameteri64v__II_3JI }, 6033{"glGetBufferParameteri64v", "(IILjava/nio/LongBuffer;)V", (void *) android_glGetBufferParameteri64v__IILjava_nio_LongBuffer_2 }, 6034{"glGenSamplers", "(I[II)V", (void *) android_glGenSamplers__I_3II }, 6035{"glGenSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenSamplers__ILjava_nio_IntBuffer_2 }, 6036{"glDeleteSamplers", "(I[II)V", (void *) android_glDeleteSamplers__I_3II }, 6037{"glDeleteSamplers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteSamplers__ILjava_nio_IntBuffer_2 }, 6038{"glIsSampler", "(I)Z", (void *) android_glIsSampler__I }, 6039{"glBindSampler", "(II)V", (void *) android_glBindSampler__II }, 6040{"glSamplerParameteri", "(III)V", (void *) android_glSamplerParameteri__III }, 6041{"glSamplerParameteriv", "(II[II)V", (void *) android_glSamplerParameteriv__II_3II }, 6042{"glSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameteriv__IILjava_nio_IntBuffer_2 }, 6043{"glSamplerParameterf", "(IIF)V", (void *) android_glSamplerParameterf__IIF }, 6044{"glSamplerParameterfv", "(II[FI)V", (void *) android_glSamplerParameterfv__II_3FI }, 6045{"glSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glSamplerParameterfv__IILjava_nio_FloatBuffer_2 }, 6046{"glGetSamplerParameteriv", "(II[II)V", (void *) android_glGetSamplerParameteriv__II_3II }, 6047{"glGetSamplerParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameteriv__IILjava_nio_IntBuffer_2 }, 6048{"glGetSamplerParameterfv", "(II[FI)V", (void *) android_glGetSamplerParameterfv__II_3FI }, 6049{"glGetSamplerParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetSamplerParameterfv__IILjava_nio_FloatBuffer_2 }, 6050{"glVertexAttribDivisor", "(II)V", (void *) android_glVertexAttribDivisor__II }, 6051{"glBindTransformFeedback", "(II)V", (void *) android_glBindTransformFeedback__II }, 6052{"glDeleteTransformFeedbacks", "(I[II)V", (void *) android_glDeleteTransformFeedbacks__I_3II }, 6053{"glDeleteTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTransformFeedbacks__ILjava_nio_IntBuffer_2 }, 6054{"glGenTransformFeedbacks", "(I[II)V", (void *) android_glGenTransformFeedbacks__I_3II }, 6055{"glGenTransformFeedbacks", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTransformFeedbacks__ILjava_nio_IntBuffer_2 }, 6056{"glIsTransformFeedback", "(I)Z", (void *) android_glIsTransformFeedback__I }, 6057{"glPauseTransformFeedback", "()V", (void *) android_glPauseTransformFeedback__ }, 6058{"glResumeTransformFeedback", "()V", (void *) android_glResumeTransformFeedback__ }, 6059{"glGetProgramBinary", "(II[II[IILjava/nio/Buffer;)V", (void *) android_glGetProgramBinary__II_3II_3IILjava_nio_Buffer_2 }, 6060{"glGetProgramBinary", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/Buffer;)V", (void *) android_glGetProgramBinary__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_Buffer_2 }, 6061{"glProgramBinary", "(IILjava/nio/Buffer;I)V", (void *) android_glProgramBinary__IILjava_nio_Buffer_2I }, 6062{"glProgramParameteri", "(III)V", (void *) android_glProgramParameteri__III }, 6063{"glInvalidateFramebuffer", "(II[II)V", (void *) android_glInvalidateFramebuffer__II_3II }, 6064{"glInvalidateFramebuffer", "(IILjava/nio/IntBuffer;)V", (void *) android_glInvalidateFramebuffer__IILjava_nio_IntBuffer_2 }, 6065{"glInvalidateSubFramebuffer", "(II[IIIIII)V", (void *) android_glInvalidateSubFramebuffer__II_3IIIIII }, 6066{"glInvalidateSubFramebuffer", "(IILjava/nio/IntBuffer;IIII)V", (void *) android_glInvalidateSubFramebuffer__IILjava_nio_IntBuffer_2IIII }, 6067{"glTexStorage2D", "(IIIII)V", (void *) android_glTexStorage2D__IIIII }, 6068{"glTexStorage3D", "(IIIIII)V", (void *) android_glTexStorage3D__IIIIII }, 6069{"glGetInternalformativ", "(IIII[II)V", (void *) android_glGetInternalformativ__IIII_3II }, 6070{"glGetInternalformativ", "(IIIILjava/nio/IntBuffer;)V", (void *) android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2 }, 6071{"glReadPixels", "(IIIIIII)V", (void *) android_glReadPixels__IIIIIII }, 6072}; 6073 6074int register_android_opengl_jni_GLES30(JNIEnv *_env) 6075{ 6076 int err; 6077 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); 6078 return err; 6079} 6080