android_opengl_GLES31.cpp revision bfe6333c3cf529600f41f14e3b8c5846e632c9a2
1/* 2 * Copyright 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17// This source file is automatically generated 18 19#pragma GCC diagnostic ignored "-Wunused-variable" 20#pragma GCC diagnostic ignored "-Wunused-but-set-variable" 21#pragma GCC diagnostic ignored "-Wunused-function" 22 23#include <stdint.h> 24#include <GLES3/gl31.h> 25#include <jni.h> 26#include <JNIHelp.h> 27#include <android_runtime/AndroidRuntime.h> 28#include <utils/misc.h> 29#include <assert.h> 30 31static int initialized = 0; 32 33static jclass nioAccessClass; 34static jclass bufferClass; 35static jmethodID getBasePointerID; 36static jmethodID getBaseArrayID; 37static jmethodID getBaseArrayOffsetID; 38static jfieldID positionID; 39static jfieldID limitID; 40static jfieldID elementSizeShiftID; 41 42 43/* special calls implemented in Android's GLES wrapper used to more 44 * efficiently bound-check passed arrays */ 45extern "C" { 46#ifdef GL_VERSION_ES_CM_1_1 47GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, 48 const GLvoid *ptr, GLsizei count); 49GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, 50 const GLvoid *pointer, GLsizei count); 51GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, 52 GLsizei stride, const GLvoid *pointer, GLsizei count); 53GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, 54 GLsizei stride, const GLvoid *pointer, GLsizei count); 55GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, 56 GLsizei stride, const GLvoid *pointer, GLsizei count); 57GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, 58 GLsizei stride, const GLvoid *pointer, GLsizei count); 59GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, 60 GLsizei stride, const GLvoid *pointer, GLsizei count); 61#endif 62#ifdef GL_ES_VERSION_2_0 63static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type, 64 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) { 65 glVertexAttribPointer(indx, size, type, normalized, stride, pointer); 66} 67#endif 68#ifdef GL_ES_VERSION_3_0 69static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type, 70 GLsizei stride, const GLvoid *pointer, GLsizei count) { 71 glVertexAttribIPointer(indx, size, type, stride, pointer); 72} 73#endif 74} 75 76/* Cache method IDs each time the class is loaded. */ 77 78static void 79nativeClassInit(JNIEnv *_env, jclass glImplClass) 80{ 81 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); 82 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); 83 84 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); 85 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); 86 87 getBasePointerID = _env->GetStaticMethodID(nioAccessClass, 88 "getBasePointer", "(Ljava/nio/Buffer;)J"); 89 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, 90 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); 91 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, 92 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); 93 94 positionID = _env->GetFieldID(bufferClass, "position", "I"); 95 limitID = _env->GetFieldID(bufferClass, "limit", "I"); 96 elementSizeShiftID = 97 _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); 98} 99 100static void * 101getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) 102{ 103 jint position; 104 jint limit; 105 jint elementSizeShift; 106 jlong pointer; 107 108 position = _env->GetIntField(buffer, positionID); 109 limit = _env->GetIntField(buffer, limitID); 110 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); 111 *remaining = (limit - position) << elementSizeShift; 112 pointer = _env->CallStaticLongMethod(nioAccessClass, 113 getBasePointerID, buffer); 114 if (pointer != 0L) { 115 *array = NULL; 116 return reinterpret_cast<void*>(pointer); 117 } 118 119 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, 120 getBaseArrayID, buffer); 121 *offset = _env->CallStaticIntMethod(nioAccessClass, 122 getBaseArrayOffsetID, buffer); 123 124 return NULL; 125} 126 127static void 128releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) 129{ 130 _env->ReleasePrimitiveArrayCritical(array, data, 131 commit ? 0 : JNI_ABORT); 132} 133 134static void * 135getDirectBufferPointer(JNIEnv *_env, jobject buffer) { 136 char* buf = (char*) _env->GetDirectBufferAddress(buffer); 137 if (buf) { 138 jint position = _env->GetIntField(buffer, positionID); 139 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); 140 buf += position << elementSizeShift; 141 } else { 142 jniThrowException(_env, "java/lang/IllegalArgumentException", 143 "Must use a native order direct Buffer"); 144 } 145 return (void*) buf; 146} 147 148// -------------------------------------------------------------------------- 149 150/* 151 * returns the number of values glGet returns for a given pname. 152 * 153 * The code below is written such that pnames requiring only one values 154 * are the default (and are not explicitely tested for). This makes the 155 * checking code much shorter/readable/efficient. 156 * 157 * This means that unknown pnames (e.g.: extensions) will default to 1. If 158 * that unknown pname needs more than 1 value, then the validation check 159 * is incomplete and the app may crash if it passed the wrong number params. 160 */ 161static int getNeededCount(GLint pname) { 162 int needed = 1; 163#ifdef GL_ES_VERSION_2_0 164 // GLES 2.x pnames 165 switch (pname) { 166 case GL_ALIASED_LINE_WIDTH_RANGE: 167 case GL_ALIASED_POINT_SIZE_RANGE: 168 needed = 2; 169 break; 170 171 case GL_BLEND_COLOR: 172 case GL_COLOR_CLEAR_VALUE: 173 case GL_COLOR_WRITEMASK: 174 case GL_SCISSOR_BOX: 175 case GL_VIEWPORT: 176 needed = 4; 177 break; 178 179 case GL_COMPRESSED_TEXTURE_FORMATS: 180 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); 181 break; 182 183 case GL_SHADER_BINARY_FORMATS: 184 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed); 185 break; 186 } 187#endif 188 189#ifdef GL_VERSION_ES_CM_1_1 190 // GLES 1.x pnames 191 switch (pname) { 192 case GL_ALIASED_LINE_WIDTH_RANGE: 193 case GL_ALIASED_POINT_SIZE_RANGE: 194 case GL_DEPTH_RANGE: 195 case GL_SMOOTH_LINE_WIDTH_RANGE: 196 case GL_SMOOTH_POINT_SIZE_RANGE: 197 needed = 2; 198 break; 199 200 case GL_CURRENT_NORMAL: 201 case GL_POINT_DISTANCE_ATTENUATION: 202 needed = 3; 203 break; 204 205 case GL_COLOR_CLEAR_VALUE: 206 case GL_COLOR_WRITEMASK: 207 case GL_CURRENT_COLOR: 208 case GL_CURRENT_TEXTURE_COORDS: 209 case GL_FOG_COLOR: 210 case GL_LIGHT_MODEL_AMBIENT: 211 case GL_SCISSOR_BOX: 212 case GL_VIEWPORT: 213 needed = 4; 214 break; 215 216 case GL_MODELVIEW_MATRIX: 217 case GL_PROJECTION_MATRIX: 218 case GL_TEXTURE_MATRIX: 219 needed = 16; 220 break; 221 222 case GL_COMPRESSED_TEXTURE_FORMATS: 223 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); 224 break; 225 } 226#endif 227 return needed; 228} 229 230template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)> 231static void 232get 233 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) { 234 jint _exception = 0; 235 const char * _exceptionType; 236 const char * _exceptionMessage; 237 CTYPE *params_base = (CTYPE *) 0; 238 jint _remaining; 239 CTYPE *params = (CTYPE *) 0; 240 int _needed = 0; 241 242 if (!params_ref) { 243 _exception = 1; 244 _exceptionType = "java/lang/IllegalArgumentException"; 245 _exceptionMessage = "params == null"; 246 goto exit; 247 } 248 if (offset < 0) { 249 _exception = 1; 250 _exceptionType = "java/lang/IllegalArgumentException"; 251 _exceptionMessage = "offset < 0"; 252 goto exit; 253 } 254 _remaining = _env->GetArrayLength(params_ref) - offset; 255 _needed = getNeededCount(pname); 256 // if we didn't find this pname, we just assume the user passed 257 // an array of the right size -- this might happen with extensions 258 // or if we forget an enum here. 259 if (_remaining < _needed) { 260 _exception = 1; 261 _exceptionType = "java/lang/IllegalArgumentException"; 262 _exceptionMessage = "length - offset < needed"; 263 goto exit; 264 } 265 params_base = (CTYPE *) 266 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 267 params = params_base + offset; 268 269 GET( 270 (GLenum)pname, 271 (CTYPE *)params 272 ); 273 274exit: 275 if (params_base) { 276 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 277 _exception ? JNI_ABORT: 0); 278 } 279 if (_exception) { 280 jniThrowException(_env, _exceptionType, _exceptionMessage); 281 } 282} 283 284 285template <typename CTYPE, void GET(GLenum, CTYPE*)> 286static void 287getarray 288 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { 289 jint _exception = 0; 290 const char * _exceptionType; 291 const char * _exceptionMessage; 292 jarray _array = (jarray) 0; 293 jint _bufferOffset = (jint) 0; 294 jint _remaining; 295 CTYPE *params = (CTYPE *) 0; 296 int _needed = 0; 297 298 params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset); 299 _remaining /= sizeof(CTYPE); // convert from bytes to item count 300 _needed = getNeededCount(pname); 301 // if we didn't find this pname, we just assume the user passed 302 // an array of the right size -- this might happen with extensions 303 // or if we forget an enum here. 304 if (_needed>0 && _remaining < _needed) { 305 _exception = 1; 306 _exceptionType = "java/lang/IllegalArgumentException"; 307 _exceptionMessage = "remaining() < needed"; 308 goto exit; 309 } 310 if (params == NULL) { 311 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 312 params = (CTYPE *) (_paramsBase + _bufferOffset); 313 } 314 GET( 315 (GLenum)pname, 316 (CTYPE *)params 317 ); 318 319exit: 320 if (_array) { 321 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); 322 } 323 if (_exception) { 324 jniThrowException(_env, _exceptionType, _exceptionMessage); 325 } 326} 327 328// -------------------------------------------------------------------------- 329/* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */ 330static void 331android_glDispatchCompute__III 332 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) { 333 glDispatchCompute( 334 (GLuint)num_groups_x, 335 (GLuint)num_groups_y, 336 (GLuint)num_groups_z 337 ); 338} 339 340/* void glDispatchComputeIndirect ( GLintptr indirect ) */ 341static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) { 342 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values. 343 // Here we only need to check for successful 64-bit to 32-bit conversion. 344 // - jlong is a int64_t (jni.h) 345 // - GLintptr is a long (khrplatform.h) 346 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) { 347 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large"); 348 return; 349 } 350 glDispatchComputeIndirect((GLintptr)indirect); 351} 352 353/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */ 354static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) { 355 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer. 356 // GL checks for too-large values. Here we only need to check for successful signed 64-bit 357 // to unsigned 32-bit conversion. 358 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) { 359 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large"); 360 return; 361 } 362 glDrawArraysIndirect(mode, (const void*)indirect); 363} 364 365/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */ 366static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) { 367 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer. 368 // GL checks for too-large values. Here we only need to check for successful signed 64-bit 369 // to unsigned 32-bit conversion. 370 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) { 371 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large"); 372 return; 373 } 374 glDrawElementsIndirect(mode, type, (const void*)indirect); 375} 376 377/* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */ 378static void 379android_glFramebufferParameteri__III 380 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) { 381 glFramebufferParameteri( 382 (GLenum)target, 383 (GLenum)pname, 384 (GLint)param 385 ); 386} 387 388/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 389static void 390android_glGetFramebufferParameteriv__II_3II 391 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { 392 jint _exception = 0; 393 const char * _exceptionType = NULL; 394 const char * _exceptionMessage = NULL; 395 GLint *params_base = (GLint *) 0; 396 jint _remaining; 397 GLint *params = (GLint *) 0; 398 399 if (!params_ref) { 400 _exception = 1; 401 _exceptionType = "java/lang/IllegalArgumentException"; 402 _exceptionMessage = "params == null"; 403 goto exit; 404 } 405 if (offset < 0) { 406 _exception = 1; 407 _exceptionType = "java/lang/IllegalArgumentException"; 408 _exceptionMessage = "offset < 0"; 409 goto exit; 410 } 411 _remaining = _env->GetArrayLength(params_ref) - offset; 412 params_base = (GLint *) 413 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 414 params = params_base + offset; 415 416 glGetFramebufferParameteriv( 417 (GLenum)target, 418 (GLenum)pname, 419 (GLint *)params 420 ); 421 422exit: 423 if (params_base) { 424 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 425 _exception ? JNI_ABORT: 0); 426 } 427 if (_exception) { 428 jniThrowException(_env, _exceptionType, _exceptionMessage); 429 } 430} 431 432/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ 433static void 434android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 435 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { 436 jarray _array = (jarray) 0; 437 jint _bufferOffset = (jint) 0; 438 jint _remaining; 439 GLint *params = (GLint *) 0; 440 441 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset); 442 if (params == NULL) { 443 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 444 params = (GLint *) (_paramsBase + _bufferOffset); 445 } 446 glGetFramebufferParameteriv( 447 (GLenum)target, 448 (GLenum)pname, 449 (GLint *)params 450 ); 451 if (_array) { 452 releasePointer(_env, _array, params, JNI_TRUE); 453 } 454} 455 456/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */ 457static void 458android_glGetProgramInterfaceiv__III_3II 459 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) { 460 jint _exception = 0; 461 const char * _exceptionType = NULL; 462 const char * _exceptionMessage = NULL; 463 GLint *params_base = (GLint *) 0; 464 jint _remaining; 465 GLint *params = (GLint *) 0; 466 467 if (!params_ref) { 468 _exception = 1; 469 _exceptionType = "java/lang/IllegalArgumentException"; 470 _exceptionMessage = "params == null"; 471 goto exit; 472 } 473 if (offset < 0) { 474 _exception = 1; 475 _exceptionType = "java/lang/IllegalArgumentException"; 476 _exceptionMessage = "offset < 0"; 477 goto exit; 478 } 479 _remaining = _env->GetArrayLength(params_ref) - offset; 480 params_base = (GLint *) 481 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 482 params = params_base + offset; 483 484 glGetProgramInterfaceiv( 485 (GLuint)program, 486 (GLenum)programInterface, 487 (GLenum)pname, 488 (GLint *)params 489 ); 490 491exit: 492 if (params_base) { 493 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 494 _exception ? JNI_ABORT: 0); 495 } 496 if (_exception) { 497 jniThrowException(_env, _exceptionType, _exceptionMessage); 498 } 499} 500 501/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */ 502static void 503android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 504 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) { 505 jarray _array = (jarray) 0; 506 jint _bufferOffset = (jint) 0; 507 jint _remaining; 508 GLint *params = (GLint *) 0; 509 510 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset); 511 if (params == NULL) { 512 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 513 params = (GLint *) (_paramsBase + _bufferOffset); 514 } 515 glGetProgramInterfaceiv( 516 (GLuint)program, 517 (GLenum)programInterface, 518 (GLenum)pname, 519 (GLint *)params 520 ); 521 if (_array) { 522 releasePointer(_env, _array, params, JNI_TRUE); 523 } 524} 525 526/* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */ 527static jint 528android_glGetProgramResourceIndex__IILjava_lang_String_2 529 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) { 530 jint _exception = 0; 531 const char * _exceptionType = NULL; 532 const char * _exceptionMessage = NULL; 533 GLuint _returnValue = 0; 534 const char* _nativename = 0; 535 536 if (!name) { 537 _exception = 1; 538 _exceptionType = "java/lang/IllegalArgumentException"; 539 _exceptionMessage = "name == null"; 540 goto exit; 541 } 542 _nativename = _env->GetStringUTFChars(name, 0); 543 544 _returnValue = glGetProgramResourceIndex( 545 (GLuint)program, 546 (GLenum)programInterface, 547 (GLchar *)_nativename 548 ); 549 550exit: 551 if (_nativename) { 552 _env->ReleaseStringUTFChars(name, _nativename); 553 } 554 555 if (_exception) { 556 jniThrowException(_env, _exceptionType, _exceptionMessage); 557 } 558 return (jint)_returnValue; 559} 560 561/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */ 562static jstring 563android_glGetProgramResourceName 564 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) { 565 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); 566 return NULL; 567} 568 569/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */ 570static void 571android_glGetProgramResourceiv__IIII_3III_3II_3II 572 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jintArray props_ref, jint propsOffset, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray params_ref, jint paramsOffset) { 573 jint _exception = 0; 574 const char * _exceptionType = NULL; 575 const char * _exceptionMessage = NULL; 576 GLenum *props_base = (GLenum *) 0; 577 jint _propsRemaining; 578 GLenum *props = (GLenum *) 0; 579 GLsizei *length_base = (GLsizei *) 0; 580 jint _lengthRemaining; 581 GLsizei *length = (GLsizei *) 0; 582 GLint *params_base = (GLint *) 0; 583 jint _paramsRemaining; 584 GLint *params = (GLint *) 0; 585 586 if (!props_ref) { 587 _exception = 1; 588 _exceptionType = "java/lang/IllegalArgumentException"; 589 _exceptionMessage = "props == null"; 590 goto exit; 591 } 592 if (propsOffset < 0) { 593 _exception = 1; 594 _exceptionType = "java/lang/IllegalArgumentException"; 595 _exceptionMessage = "propsOffset < 0"; 596 goto exit; 597 } 598 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset; 599 props_base = (GLenum *) 600 _env->GetPrimitiveArrayCritical(props_ref, (jboolean *)0); 601 props = props_base + propsOffset; 602 603 if (!length_ref) { 604 _exception = 1; 605 _exceptionType = "java/lang/IllegalArgumentException"; 606 _exceptionMessage = "length == null"; 607 goto exit; 608 } 609 if (lengthOffset < 0) { 610 _exception = 1; 611 _exceptionType = "java/lang/IllegalArgumentException"; 612 _exceptionMessage = "lengthOffset < 0"; 613 goto exit; 614 } 615 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; 616 length_base = (GLsizei *) 617 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0); 618 length = length_base + lengthOffset; 619 620 if (!params_ref) { 621 _exception = 1; 622 _exceptionType = "java/lang/IllegalArgumentException"; 623 _exceptionMessage = "params == null"; 624 goto exit; 625 } 626 if (paramsOffset < 0) { 627 _exception = 1; 628 _exceptionType = "java/lang/IllegalArgumentException"; 629 _exceptionMessage = "paramsOffset < 0"; 630 goto exit; 631 } 632 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset; 633 params_base = (GLint *) 634 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 635 params = params_base + paramsOffset; 636 637 glGetProgramResourceiv( 638 (GLuint)program, 639 (GLenum)programInterface, 640 (GLuint)index, 641 (GLsizei)propCount, 642 (GLenum *)props, 643 (GLsizei)bufSize, 644 (GLsizei *)length, 645 (GLint *)params 646 ); 647 648exit: 649 if (params_base) { 650 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 651 _exception ? JNI_ABORT: 0); 652 } 653 if (length_base) { 654 _env->ReleasePrimitiveArrayCritical(length_ref, length_base, 655 _exception ? JNI_ABORT: 0); 656 } 657 if (props_base) { 658 _env->ReleasePrimitiveArrayCritical(props_ref, props_base, 659 JNI_ABORT); 660 } 661 if (_exception) { 662 jniThrowException(_env, _exceptionType, _exceptionMessage); 663 } 664} 665 666/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */ 667static void 668android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 669 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jobject props_buf, jint bufSize, jobject length_buf, jobject params_buf) { 670 jarray _propsArray = (jarray) 0; 671 jint _propsBufferOffset = (jint) 0; 672 jarray _lengthArray = (jarray) 0; 673 jint _lengthBufferOffset = (jint) 0; 674 jarray _paramsArray = (jarray) 0; 675 jint _paramsBufferOffset = (jint) 0; 676 jint _propsRemaining; 677 GLenum *props = (GLenum *) 0; 678 jint _lengthRemaining; 679 GLsizei *length = (GLsizei *) 0; 680 jint _paramsRemaining; 681 GLint *params = (GLint *) 0; 682 683 props = (GLenum *)getPointer(_env, props_buf, &_propsArray, &_propsRemaining, &_propsBufferOffset); 684 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset); 685 params = (GLint *)getPointer(_env, params_buf, &_paramsArray, &_paramsRemaining, &_paramsBufferOffset); 686 if (props == NULL) { 687 char * _propsBase = (char *)_env->GetPrimitiveArrayCritical(_propsArray, (jboolean *) 0); 688 props = (GLenum *) (_propsBase + _propsBufferOffset); 689 } 690 if (length == NULL) { 691 char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0); 692 length = (GLsizei *) (_lengthBase + _lengthBufferOffset); 693 } 694 if (params == NULL) { 695 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_paramsArray, (jboolean *) 0); 696 params = (GLint *) (_paramsBase + _paramsBufferOffset); 697 } 698 glGetProgramResourceiv( 699 (GLuint)program, 700 (GLenum)programInterface, 701 (GLuint)index, 702 (GLsizei)propCount, 703 (GLenum *)props, 704 (GLsizei)bufSize, 705 (GLsizei *)length, 706 (GLint *)params 707 ); 708 if (_paramsArray) { 709 releasePointer(_env, _paramsArray, params, JNI_TRUE); 710 } 711 if (_lengthArray) { 712 releasePointer(_env, _lengthArray, length, JNI_TRUE); 713 } 714 if (_propsArray) { 715 releasePointer(_env, _propsArray, props, JNI_FALSE); 716 } 717} 718 719/* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */ 720static jint 721android_glGetProgramResourceLocation__IILjava_lang_String_2 722 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) { 723 jint _exception = 0; 724 const char * _exceptionType = NULL; 725 const char * _exceptionMessage = NULL; 726 GLint _returnValue = 0; 727 const char* _nativename = 0; 728 729 if (!name) { 730 _exception = 1; 731 _exceptionType = "java/lang/IllegalArgumentException"; 732 _exceptionMessage = "name == null"; 733 goto exit; 734 } 735 _nativename = _env->GetStringUTFChars(name, 0); 736 737 _returnValue = glGetProgramResourceLocation( 738 (GLuint)program, 739 (GLenum)programInterface, 740 (GLchar *)_nativename 741 ); 742 743exit: 744 if (_nativename) { 745 _env->ReleaseStringUTFChars(name, _nativename); 746 } 747 748 if (_exception) { 749 jniThrowException(_env, _exceptionType, _exceptionMessage); 750 } 751 return (jint)_returnValue; 752} 753 754/* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */ 755static void 756android_glUseProgramStages__III 757 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) { 758 glUseProgramStages( 759 (GLuint)pipeline, 760 (GLbitfield)stages, 761 (GLuint)program 762 ); 763} 764 765/* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */ 766static void 767android_glActiveShaderProgram__II 768 (JNIEnv *_env, jobject _this, jint pipeline, jint program) { 769 glActiveShaderProgram( 770 (GLuint)pipeline, 771 (GLuint)program 772 ); 773} 774 775/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */ 776static jint 777android_glCreateShaderProgramv 778 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) { 779 780 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); 781 return 0; 782} 783/* void glBindProgramPipeline ( GLuint pipeline ) */ 784static void 785android_glBindProgramPipeline__I 786 (JNIEnv *_env, jobject _this, jint pipeline) { 787 glBindProgramPipeline( 788 (GLuint)pipeline 789 ); 790} 791 792/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */ 793static void 794android_glDeleteProgramPipelines__I_3II 795 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) { 796 jint _exception = 0; 797 const char * _exceptionType = NULL; 798 const char * _exceptionMessage = NULL; 799 GLuint *pipelines_base = (GLuint *) 0; 800 jint _remaining; 801 GLuint *pipelines = (GLuint *) 0; 802 803 if (!pipelines_ref) { 804 _exception = 1; 805 _exceptionType = "java/lang/IllegalArgumentException"; 806 _exceptionMessage = "pipelines == null"; 807 goto exit; 808 } 809 if (offset < 0) { 810 _exception = 1; 811 _exceptionType = "java/lang/IllegalArgumentException"; 812 _exceptionMessage = "offset < 0"; 813 goto exit; 814 } 815 _remaining = _env->GetArrayLength(pipelines_ref) - offset; 816 pipelines_base = (GLuint *) 817 _env->GetPrimitiveArrayCritical(pipelines_ref, (jboolean *)0); 818 pipelines = pipelines_base + offset; 819 820 glDeleteProgramPipelines( 821 (GLsizei)n, 822 (GLuint *)pipelines 823 ); 824 825exit: 826 if (pipelines_base) { 827 _env->ReleasePrimitiveArrayCritical(pipelines_ref, pipelines_base, 828 JNI_ABORT); 829 } 830 if (_exception) { 831 jniThrowException(_env, _exceptionType, _exceptionMessage); 832 } 833} 834 835/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */ 836static void 837android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 838 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) { 839 jarray _array = (jarray) 0; 840 jint _bufferOffset = (jint) 0; 841 jint _remaining; 842 GLuint *pipelines = (GLuint *) 0; 843 844 pipelines = (GLuint *)getPointer(_env, pipelines_buf, &_array, &_remaining, &_bufferOffset); 845 if (pipelines == NULL) { 846 char * _pipelinesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 847 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset); 848 } 849 glDeleteProgramPipelines( 850 (GLsizei)n, 851 (GLuint *)pipelines 852 ); 853 if (_array) { 854 releasePointer(_env, _array, pipelines, JNI_FALSE); 855 } 856} 857 858/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */ 859static void 860android_glGenProgramPipelines__I_3II 861 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) { 862 jint _exception = 0; 863 const char * _exceptionType = NULL; 864 const char * _exceptionMessage = NULL; 865 GLuint *pipelines_base = (GLuint *) 0; 866 jint _remaining; 867 GLuint *pipelines = (GLuint *) 0; 868 869 if (!pipelines_ref) { 870 _exception = 1; 871 _exceptionType = "java/lang/IllegalArgumentException"; 872 _exceptionMessage = "pipelines == null"; 873 goto exit; 874 } 875 if (offset < 0) { 876 _exception = 1; 877 _exceptionType = "java/lang/IllegalArgumentException"; 878 _exceptionMessage = "offset < 0"; 879 goto exit; 880 } 881 _remaining = _env->GetArrayLength(pipelines_ref) - offset; 882 pipelines_base = (GLuint *) 883 _env->GetPrimitiveArrayCritical(pipelines_ref, (jboolean *)0); 884 pipelines = pipelines_base + offset; 885 886 glGenProgramPipelines( 887 (GLsizei)n, 888 (GLuint *)pipelines 889 ); 890 891exit: 892 if (pipelines_base) { 893 _env->ReleasePrimitiveArrayCritical(pipelines_ref, pipelines_base, 894 _exception ? JNI_ABORT: 0); 895 } 896 if (_exception) { 897 jniThrowException(_env, _exceptionType, _exceptionMessage); 898 } 899} 900 901/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */ 902static void 903android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 904 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) { 905 jarray _array = (jarray) 0; 906 jint _bufferOffset = (jint) 0; 907 jint _remaining; 908 GLuint *pipelines = (GLuint *) 0; 909 910 pipelines = (GLuint *)getPointer(_env, pipelines_buf, &_array, &_remaining, &_bufferOffset); 911 if (pipelines == NULL) { 912 char * _pipelinesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 913 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset); 914 } 915 glGenProgramPipelines( 916 (GLsizei)n, 917 (GLuint *)pipelines 918 ); 919 if (_array) { 920 releasePointer(_env, _array, pipelines, JNI_TRUE); 921 } 922} 923 924/* GLboolean glIsProgramPipeline ( GLuint pipeline ) */ 925static jboolean 926android_glIsProgramPipeline__I 927 (JNIEnv *_env, jobject _this, jint pipeline) { 928 GLboolean _returnValue; 929 _returnValue = glIsProgramPipeline( 930 (GLuint)pipeline 931 ); 932 return (jboolean)_returnValue; 933} 934 935/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */ 936static void 937android_glGetProgramPipelineiv__II_3II 938 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) { 939 jint _exception = 0; 940 const char * _exceptionType = NULL; 941 const char * _exceptionMessage = NULL; 942 GLint *params_base = (GLint *) 0; 943 jint _remaining; 944 GLint *params = (GLint *) 0; 945 946 if (!params_ref) { 947 _exception = 1; 948 _exceptionType = "java/lang/IllegalArgumentException"; 949 _exceptionMessage = "params == null"; 950 goto exit; 951 } 952 if (offset < 0) { 953 _exception = 1; 954 _exceptionType = "java/lang/IllegalArgumentException"; 955 _exceptionMessage = "offset < 0"; 956 goto exit; 957 } 958 _remaining = _env->GetArrayLength(params_ref) - offset; 959 params_base = (GLint *) 960 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 961 params = params_base + offset; 962 963 glGetProgramPipelineiv( 964 (GLuint)pipeline, 965 (GLenum)pname, 966 (GLint *)params 967 ); 968 969exit: 970 if (params_base) { 971 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 972 _exception ? JNI_ABORT: 0); 973 } 974 if (_exception) { 975 jniThrowException(_env, _exceptionType, _exceptionMessage); 976 } 977} 978 979/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */ 980static void 981android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 982 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) { 983 jarray _array = (jarray) 0; 984 jint _bufferOffset = (jint) 0; 985 jint _remaining; 986 GLint *params = (GLint *) 0; 987 988 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset); 989 if (params == NULL) { 990 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 991 params = (GLint *) (_paramsBase + _bufferOffset); 992 } 993 glGetProgramPipelineiv( 994 (GLuint)pipeline, 995 (GLenum)pname, 996 (GLint *)params 997 ); 998 if (_array) { 999 releasePointer(_env, _array, params, JNI_TRUE); 1000 } 1001} 1002 1003/* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */ 1004static void 1005android_glProgramUniform1i__III 1006 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) { 1007 glProgramUniform1i( 1008 (GLuint)program, 1009 (GLint)location, 1010 (GLint)v0 1011 ); 1012} 1013 1014/* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */ 1015static void 1016android_glProgramUniform2i__IIII 1017 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) { 1018 glProgramUniform2i( 1019 (GLuint)program, 1020 (GLint)location, 1021 (GLint)v0, 1022 (GLint)v1 1023 ); 1024} 1025 1026/* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */ 1027static void 1028android_glProgramUniform3i__IIIII 1029 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) { 1030 glProgramUniform3i( 1031 (GLuint)program, 1032 (GLint)location, 1033 (GLint)v0, 1034 (GLint)v1, 1035 (GLint)v2 1036 ); 1037} 1038 1039/* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */ 1040static void 1041android_glProgramUniform4i__IIIIII 1042 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) { 1043 glProgramUniform4i( 1044 (GLuint)program, 1045 (GLint)location, 1046 (GLint)v0, 1047 (GLint)v1, 1048 (GLint)v2, 1049 (GLint)v3 1050 ); 1051} 1052 1053/* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */ 1054static void 1055android_glProgramUniform1ui__III 1056 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) { 1057 glProgramUniform1ui( 1058 (GLuint)program, 1059 (GLint)location, 1060 (GLuint)v0 1061 ); 1062} 1063 1064/* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */ 1065static void 1066android_glProgramUniform2ui__IIII 1067 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) { 1068 glProgramUniform2ui( 1069 (GLuint)program, 1070 (GLint)location, 1071 (GLuint)v0, 1072 (GLuint)v1 1073 ); 1074} 1075 1076/* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */ 1077static void 1078android_glProgramUniform3ui__IIIII 1079 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) { 1080 glProgramUniform3ui( 1081 (GLuint)program, 1082 (GLint)location, 1083 (GLuint)v0, 1084 (GLuint)v1, 1085 (GLuint)v2 1086 ); 1087} 1088 1089/* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */ 1090static void 1091android_glProgramUniform4ui__IIIIII 1092 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) { 1093 glProgramUniform4ui( 1094 (GLuint)program, 1095 (GLint)location, 1096 (GLuint)v0, 1097 (GLuint)v1, 1098 (GLuint)v2, 1099 (GLuint)v3 1100 ); 1101} 1102 1103/* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */ 1104static void 1105android_glProgramUniform1f__IIF 1106 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) { 1107 glProgramUniform1f( 1108 (GLuint)program, 1109 (GLint)location, 1110 (GLfloat)v0 1111 ); 1112} 1113 1114/* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */ 1115static void 1116android_glProgramUniform2f__IIFF 1117 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) { 1118 glProgramUniform2f( 1119 (GLuint)program, 1120 (GLint)location, 1121 (GLfloat)v0, 1122 (GLfloat)v1 1123 ); 1124} 1125 1126/* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */ 1127static void 1128android_glProgramUniform3f__IIFFF 1129 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) { 1130 glProgramUniform3f( 1131 (GLuint)program, 1132 (GLint)location, 1133 (GLfloat)v0, 1134 (GLfloat)v1, 1135 (GLfloat)v2 1136 ); 1137} 1138 1139/* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */ 1140static void 1141android_glProgramUniform4f__IIFFFF 1142 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) { 1143 glProgramUniform4f( 1144 (GLuint)program, 1145 (GLint)location, 1146 (GLfloat)v0, 1147 (GLfloat)v1, 1148 (GLfloat)v2, 1149 (GLfloat)v3 1150 ); 1151} 1152 1153/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1154static void 1155android_glProgramUniform1iv__III_3II 1156 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1157 jint _exception = 0; 1158 const char * _exceptionType = NULL; 1159 const char * _exceptionMessage = NULL; 1160 GLint *value_base = (GLint *) 0; 1161 jint _remaining; 1162 GLint *value = (GLint *) 0; 1163 1164 if (!value_ref) { 1165 _exception = 1; 1166 _exceptionType = "java/lang/IllegalArgumentException"; 1167 _exceptionMessage = "value == null"; 1168 goto exit; 1169 } 1170 if (offset < 0) { 1171 _exception = 1; 1172 _exceptionType = "java/lang/IllegalArgumentException"; 1173 _exceptionMessage = "offset < 0"; 1174 goto exit; 1175 } 1176 _remaining = _env->GetArrayLength(value_ref) - offset; 1177 value_base = (GLint *) 1178 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1179 value = value_base + offset; 1180 1181 glProgramUniform1iv( 1182 (GLuint)program, 1183 (GLint)location, 1184 (GLsizei)count, 1185 (GLint *)value 1186 ); 1187 1188exit: 1189 if (value_base) { 1190 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1191 JNI_ABORT); 1192 } 1193 if (_exception) { 1194 jniThrowException(_env, _exceptionType, _exceptionMessage); 1195 } 1196} 1197 1198/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1199static void 1200android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 1201 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1202 jarray _array = (jarray) 0; 1203 jint _bufferOffset = (jint) 0; 1204 jint _remaining; 1205 GLint *value = (GLint *) 0; 1206 1207 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1208 if (value == NULL) { 1209 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1210 value = (GLint *) (_valueBase + _bufferOffset); 1211 } 1212 glProgramUniform1iv( 1213 (GLuint)program, 1214 (GLint)location, 1215 (GLsizei)count, 1216 (GLint *)value 1217 ); 1218 if (_array) { 1219 releasePointer(_env, _array, value, JNI_FALSE); 1220 } 1221} 1222 1223/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1224static void 1225android_glProgramUniform2iv__III_3II 1226 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1227 jint _exception = 0; 1228 const char * _exceptionType = NULL; 1229 const char * _exceptionMessage = NULL; 1230 GLint *value_base = (GLint *) 0; 1231 jint _remaining; 1232 GLint *value = (GLint *) 0; 1233 1234 if (!value_ref) { 1235 _exception = 1; 1236 _exceptionType = "java/lang/IllegalArgumentException"; 1237 _exceptionMessage = "value == null"; 1238 goto exit; 1239 } 1240 if (offset < 0) { 1241 _exception = 1; 1242 _exceptionType = "java/lang/IllegalArgumentException"; 1243 _exceptionMessage = "offset < 0"; 1244 goto exit; 1245 } 1246 _remaining = _env->GetArrayLength(value_ref) - offset; 1247 value_base = (GLint *) 1248 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1249 value = value_base + offset; 1250 1251 glProgramUniform2iv( 1252 (GLuint)program, 1253 (GLint)location, 1254 (GLsizei)count, 1255 (GLint *)value 1256 ); 1257 1258exit: 1259 if (value_base) { 1260 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1261 JNI_ABORT); 1262 } 1263 if (_exception) { 1264 jniThrowException(_env, _exceptionType, _exceptionMessage); 1265 } 1266} 1267 1268/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1269static void 1270android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 1271 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1272 jarray _array = (jarray) 0; 1273 jint _bufferOffset = (jint) 0; 1274 jint _remaining; 1275 GLint *value = (GLint *) 0; 1276 1277 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1278 if (value == NULL) { 1279 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1280 value = (GLint *) (_valueBase + _bufferOffset); 1281 } 1282 glProgramUniform2iv( 1283 (GLuint)program, 1284 (GLint)location, 1285 (GLsizei)count, 1286 (GLint *)value 1287 ); 1288 if (_array) { 1289 releasePointer(_env, _array, value, JNI_FALSE); 1290 } 1291} 1292 1293/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1294static void 1295android_glProgramUniform3iv__III_3II 1296 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1297 jint _exception = 0; 1298 const char * _exceptionType = NULL; 1299 const char * _exceptionMessage = NULL; 1300 GLint *value_base = (GLint *) 0; 1301 jint _remaining; 1302 GLint *value = (GLint *) 0; 1303 1304 if (!value_ref) { 1305 _exception = 1; 1306 _exceptionType = "java/lang/IllegalArgumentException"; 1307 _exceptionMessage = "value == null"; 1308 goto exit; 1309 } 1310 if (offset < 0) { 1311 _exception = 1; 1312 _exceptionType = "java/lang/IllegalArgumentException"; 1313 _exceptionMessage = "offset < 0"; 1314 goto exit; 1315 } 1316 _remaining = _env->GetArrayLength(value_ref) - offset; 1317 value_base = (GLint *) 1318 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1319 value = value_base + offset; 1320 1321 glProgramUniform3iv( 1322 (GLuint)program, 1323 (GLint)location, 1324 (GLsizei)count, 1325 (GLint *)value 1326 ); 1327 1328exit: 1329 if (value_base) { 1330 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1331 JNI_ABORT); 1332 } 1333 if (_exception) { 1334 jniThrowException(_env, _exceptionType, _exceptionMessage); 1335 } 1336} 1337 1338/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1339static void 1340android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 1341 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1342 jarray _array = (jarray) 0; 1343 jint _bufferOffset = (jint) 0; 1344 jint _remaining; 1345 GLint *value = (GLint *) 0; 1346 1347 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1348 if (value == NULL) { 1349 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1350 value = (GLint *) (_valueBase + _bufferOffset); 1351 } 1352 glProgramUniform3iv( 1353 (GLuint)program, 1354 (GLint)location, 1355 (GLsizei)count, 1356 (GLint *)value 1357 ); 1358 if (_array) { 1359 releasePointer(_env, _array, value, JNI_FALSE); 1360 } 1361} 1362 1363/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1364static void 1365android_glProgramUniform4iv__III_3II 1366 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1367 jint _exception = 0; 1368 const char * _exceptionType = NULL; 1369 const char * _exceptionMessage = NULL; 1370 GLint *value_base = (GLint *) 0; 1371 jint _remaining; 1372 GLint *value = (GLint *) 0; 1373 1374 if (!value_ref) { 1375 _exception = 1; 1376 _exceptionType = "java/lang/IllegalArgumentException"; 1377 _exceptionMessage = "value == null"; 1378 goto exit; 1379 } 1380 if (offset < 0) { 1381 _exception = 1; 1382 _exceptionType = "java/lang/IllegalArgumentException"; 1383 _exceptionMessage = "offset < 0"; 1384 goto exit; 1385 } 1386 _remaining = _env->GetArrayLength(value_ref) - offset; 1387 value_base = (GLint *) 1388 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1389 value = value_base + offset; 1390 1391 glProgramUniform4iv( 1392 (GLuint)program, 1393 (GLint)location, 1394 (GLsizei)count, 1395 (GLint *)value 1396 ); 1397 1398exit: 1399 if (value_base) { 1400 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1401 JNI_ABORT); 1402 } 1403 if (_exception) { 1404 jniThrowException(_env, _exceptionType, _exceptionMessage); 1405 } 1406} 1407 1408/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */ 1409static void 1410android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 1411 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1412 jarray _array = (jarray) 0; 1413 jint _bufferOffset = (jint) 0; 1414 jint _remaining; 1415 GLint *value = (GLint *) 0; 1416 1417 value = (GLint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1418 if (value == NULL) { 1419 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1420 value = (GLint *) (_valueBase + _bufferOffset); 1421 } 1422 glProgramUniform4iv( 1423 (GLuint)program, 1424 (GLint)location, 1425 (GLsizei)count, 1426 (GLint *)value 1427 ); 1428 if (_array) { 1429 releasePointer(_env, _array, value, JNI_FALSE); 1430 } 1431} 1432 1433/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1434static void 1435android_glProgramUniform1uiv__III_3II 1436 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1437 jint _exception = 0; 1438 const char * _exceptionType = NULL; 1439 const char * _exceptionMessage = NULL; 1440 GLuint *value_base = (GLuint *) 0; 1441 jint _remaining; 1442 GLuint *value = (GLuint *) 0; 1443 1444 if (!value_ref) { 1445 _exception = 1; 1446 _exceptionType = "java/lang/IllegalArgumentException"; 1447 _exceptionMessage = "value == null"; 1448 goto exit; 1449 } 1450 if (offset < 0) { 1451 _exception = 1; 1452 _exceptionType = "java/lang/IllegalArgumentException"; 1453 _exceptionMessage = "offset < 0"; 1454 goto exit; 1455 } 1456 _remaining = _env->GetArrayLength(value_ref) - offset; 1457 value_base = (GLuint *) 1458 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1459 value = value_base + offset; 1460 1461 glProgramUniform1uiv( 1462 (GLuint)program, 1463 (GLint)location, 1464 (GLsizei)count, 1465 (GLuint *)value 1466 ); 1467 1468exit: 1469 if (value_base) { 1470 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1471 JNI_ABORT); 1472 } 1473 if (_exception) { 1474 jniThrowException(_env, _exceptionType, _exceptionMessage); 1475 } 1476} 1477 1478/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1479static void 1480android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 1481 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1482 jarray _array = (jarray) 0; 1483 jint _bufferOffset = (jint) 0; 1484 jint _remaining; 1485 GLuint *value = (GLuint *) 0; 1486 1487 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1488 if (value == NULL) { 1489 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1490 value = (GLuint *) (_valueBase + _bufferOffset); 1491 } 1492 glProgramUniform1uiv( 1493 (GLuint)program, 1494 (GLint)location, 1495 (GLsizei)count, 1496 (GLuint *)value 1497 ); 1498 if (_array) { 1499 releasePointer(_env, _array, value, JNI_FALSE); 1500 } 1501} 1502 1503/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1504static void 1505android_glProgramUniform2uiv__III_3II 1506 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1507 jint _exception = 0; 1508 const char * _exceptionType = NULL; 1509 const char * _exceptionMessage = NULL; 1510 GLuint *value_base = (GLuint *) 0; 1511 jint _remaining; 1512 GLuint *value = (GLuint *) 0; 1513 1514 if (!value_ref) { 1515 _exception = 1; 1516 _exceptionType = "java/lang/IllegalArgumentException"; 1517 _exceptionMessage = "value == null"; 1518 goto exit; 1519 } 1520 if (offset < 0) { 1521 _exception = 1; 1522 _exceptionType = "java/lang/IllegalArgumentException"; 1523 _exceptionMessage = "offset < 0"; 1524 goto exit; 1525 } 1526 _remaining = _env->GetArrayLength(value_ref) - offset; 1527 value_base = (GLuint *) 1528 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1529 value = value_base + offset; 1530 1531 glProgramUniform2uiv( 1532 (GLuint)program, 1533 (GLint)location, 1534 (GLsizei)count, 1535 (GLuint *)value 1536 ); 1537 1538exit: 1539 if (value_base) { 1540 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1541 JNI_ABORT); 1542 } 1543 if (_exception) { 1544 jniThrowException(_env, _exceptionType, _exceptionMessage); 1545 } 1546} 1547 1548/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1549static void 1550android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 1551 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1552 jarray _array = (jarray) 0; 1553 jint _bufferOffset = (jint) 0; 1554 jint _remaining; 1555 GLuint *value = (GLuint *) 0; 1556 1557 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1558 if (value == NULL) { 1559 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1560 value = (GLuint *) (_valueBase + _bufferOffset); 1561 } 1562 glProgramUniform2uiv( 1563 (GLuint)program, 1564 (GLint)location, 1565 (GLsizei)count, 1566 (GLuint *)value 1567 ); 1568 if (_array) { 1569 releasePointer(_env, _array, value, JNI_FALSE); 1570 } 1571} 1572 1573/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1574static void 1575android_glProgramUniform3uiv__III_3II 1576 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1577 jint _exception = 0; 1578 const char * _exceptionType = NULL; 1579 const char * _exceptionMessage = NULL; 1580 GLuint *value_base = (GLuint *) 0; 1581 jint _remaining; 1582 GLuint *value = (GLuint *) 0; 1583 1584 if (!value_ref) { 1585 _exception = 1; 1586 _exceptionType = "java/lang/IllegalArgumentException"; 1587 _exceptionMessage = "value == null"; 1588 goto exit; 1589 } 1590 if (offset < 0) { 1591 _exception = 1; 1592 _exceptionType = "java/lang/IllegalArgumentException"; 1593 _exceptionMessage = "offset < 0"; 1594 goto exit; 1595 } 1596 _remaining = _env->GetArrayLength(value_ref) - offset; 1597 value_base = (GLuint *) 1598 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1599 value = value_base + offset; 1600 1601 glProgramUniform3uiv( 1602 (GLuint)program, 1603 (GLint)location, 1604 (GLsizei)count, 1605 (GLuint *)value 1606 ); 1607 1608exit: 1609 if (value_base) { 1610 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1611 JNI_ABORT); 1612 } 1613 if (_exception) { 1614 jniThrowException(_env, _exceptionType, _exceptionMessage); 1615 } 1616} 1617 1618/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1619static void 1620android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 1621 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1622 jarray _array = (jarray) 0; 1623 jint _bufferOffset = (jint) 0; 1624 jint _remaining; 1625 GLuint *value = (GLuint *) 0; 1626 1627 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1628 if (value == NULL) { 1629 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1630 value = (GLuint *) (_valueBase + _bufferOffset); 1631 } 1632 glProgramUniform3uiv( 1633 (GLuint)program, 1634 (GLint)location, 1635 (GLsizei)count, 1636 (GLuint *)value 1637 ); 1638 if (_array) { 1639 releasePointer(_env, _array, value, JNI_FALSE); 1640 } 1641} 1642 1643/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1644static void 1645android_glProgramUniform4uiv__III_3II 1646 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) { 1647 jint _exception = 0; 1648 const char * _exceptionType = NULL; 1649 const char * _exceptionMessage = NULL; 1650 GLuint *value_base = (GLuint *) 0; 1651 jint _remaining; 1652 GLuint *value = (GLuint *) 0; 1653 1654 if (!value_ref) { 1655 _exception = 1; 1656 _exceptionType = "java/lang/IllegalArgumentException"; 1657 _exceptionMessage = "value == null"; 1658 goto exit; 1659 } 1660 if (offset < 0) { 1661 _exception = 1; 1662 _exceptionType = "java/lang/IllegalArgumentException"; 1663 _exceptionMessage = "offset < 0"; 1664 goto exit; 1665 } 1666 _remaining = _env->GetArrayLength(value_ref) - offset; 1667 value_base = (GLuint *) 1668 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1669 value = value_base + offset; 1670 1671 glProgramUniform4uiv( 1672 (GLuint)program, 1673 (GLint)location, 1674 (GLsizei)count, 1675 (GLuint *)value 1676 ); 1677 1678exit: 1679 if (value_base) { 1680 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1681 JNI_ABORT); 1682 } 1683 if (_exception) { 1684 jniThrowException(_env, _exceptionType, _exceptionMessage); 1685 } 1686} 1687 1688/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */ 1689static void 1690android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 1691 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1692 jarray _array = (jarray) 0; 1693 jint _bufferOffset = (jint) 0; 1694 jint _remaining; 1695 GLuint *value = (GLuint *) 0; 1696 1697 value = (GLuint *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1698 if (value == NULL) { 1699 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1700 value = (GLuint *) (_valueBase + _bufferOffset); 1701 } 1702 glProgramUniform4uiv( 1703 (GLuint)program, 1704 (GLint)location, 1705 (GLsizei)count, 1706 (GLuint *)value 1707 ); 1708 if (_array) { 1709 releasePointer(_env, _array, value, JNI_FALSE); 1710 } 1711} 1712 1713/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1714static void 1715android_glProgramUniform1fv__III_3FI 1716 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) { 1717 jint _exception = 0; 1718 const char * _exceptionType = NULL; 1719 const char * _exceptionMessage = NULL; 1720 GLfloat *value_base = (GLfloat *) 0; 1721 jint _remaining; 1722 GLfloat *value = (GLfloat *) 0; 1723 1724 if (!value_ref) { 1725 _exception = 1; 1726 _exceptionType = "java/lang/IllegalArgumentException"; 1727 _exceptionMessage = "value == null"; 1728 goto exit; 1729 } 1730 if (offset < 0) { 1731 _exception = 1; 1732 _exceptionType = "java/lang/IllegalArgumentException"; 1733 _exceptionMessage = "offset < 0"; 1734 goto exit; 1735 } 1736 _remaining = _env->GetArrayLength(value_ref) - offset; 1737 value_base = (GLfloat *) 1738 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1739 value = value_base + offset; 1740 1741 glProgramUniform1fv( 1742 (GLuint)program, 1743 (GLint)location, 1744 (GLsizei)count, 1745 (GLfloat *)value 1746 ); 1747 1748exit: 1749 if (value_base) { 1750 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1751 JNI_ABORT); 1752 } 1753 if (_exception) { 1754 jniThrowException(_env, _exceptionType, _exceptionMessage); 1755 } 1756} 1757 1758/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1759static void 1760android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 1761 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1762 jarray _array = (jarray) 0; 1763 jint _bufferOffset = (jint) 0; 1764 jint _remaining; 1765 GLfloat *value = (GLfloat *) 0; 1766 1767 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1768 if (value == NULL) { 1769 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1770 value = (GLfloat *) (_valueBase + _bufferOffset); 1771 } 1772 glProgramUniform1fv( 1773 (GLuint)program, 1774 (GLint)location, 1775 (GLsizei)count, 1776 (GLfloat *)value 1777 ); 1778 if (_array) { 1779 releasePointer(_env, _array, value, JNI_FALSE); 1780 } 1781} 1782 1783/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1784static void 1785android_glProgramUniform2fv__III_3FI 1786 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) { 1787 jint _exception = 0; 1788 const char * _exceptionType = NULL; 1789 const char * _exceptionMessage = NULL; 1790 GLfloat *value_base = (GLfloat *) 0; 1791 jint _remaining; 1792 GLfloat *value = (GLfloat *) 0; 1793 1794 if (!value_ref) { 1795 _exception = 1; 1796 _exceptionType = "java/lang/IllegalArgumentException"; 1797 _exceptionMessage = "value == null"; 1798 goto exit; 1799 } 1800 if (offset < 0) { 1801 _exception = 1; 1802 _exceptionType = "java/lang/IllegalArgumentException"; 1803 _exceptionMessage = "offset < 0"; 1804 goto exit; 1805 } 1806 _remaining = _env->GetArrayLength(value_ref) - offset; 1807 value_base = (GLfloat *) 1808 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1809 value = value_base + offset; 1810 1811 glProgramUniform2fv( 1812 (GLuint)program, 1813 (GLint)location, 1814 (GLsizei)count, 1815 (GLfloat *)value 1816 ); 1817 1818exit: 1819 if (value_base) { 1820 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1821 JNI_ABORT); 1822 } 1823 if (_exception) { 1824 jniThrowException(_env, _exceptionType, _exceptionMessage); 1825 } 1826} 1827 1828/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1829static void 1830android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 1831 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1832 jarray _array = (jarray) 0; 1833 jint _bufferOffset = (jint) 0; 1834 jint _remaining; 1835 GLfloat *value = (GLfloat *) 0; 1836 1837 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1838 if (value == NULL) { 1839 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1840 value = (GLfloat *) (_valueBase + _bufferOffset); 1841 } 1842 glProgramUniform2fv( 1843 (GLuint)program, 1844 (GLint)location, 1845 (GLsizei)count, 1846 (GLfloat *)value 1847 ); 1848 if (_array) { 1849 releasePointer(_env, _array, value, JNI_FALSE); 1850 } 1851} 1852 1853/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1854static void 1855android_glProgramUniform3fv__III_3FI 1856 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) { 1857 jint _exception = 0; 1858 const char * _exceptionType = NULL; 1859 const char * _exceptionMessage = NULL; 1860 GLfloat *value_base = (GLfloat *) 0; 1861 jint _remaining; 1862 GLfloat *value = (GLfloat *) 0; 1863 1864 if (!value_ref) { 1865 _exception = 1; 1866 _exceptionType = "java/lang/IllegalArgumentException"; 1867 _exceptionMessage = "value == null"; 1868 goto exit; 1869 } 1870 if (offset < 0) { 1871 _exception = 1; 1872 _exceptionType = "java/lang/IllegalArgumentException"; 1873 _exceptionMessage = "offset < 0"; 1874 goto exit; 1875 } 1876 _remaining = _env->GetArrayLength(value_ref) - offset; 1877 value_base = (GLfloat *) 1878 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1879 value = value_base + offset; 1880 1881 glProgramUniform3fv( 1882 (GLuint)program, 1883 (GLint)location, 1884 (GLsizei)count, 1885 (GLfloat *)value 1886 ); 1887 1888exit: 1889 if (value_base) { 1890 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1891 JNI_ABORT); 1892 } 1893 if (_exception) { 1894 jniThrowException(_env, _exceptionType, _exceptionMessage); 1895 } 1896} 1897 1898/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1899static void 1900android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 1901 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1902 jarray _array = (jarray) 0; 1903 jint _bufferOffset = (jint) 0; 1904 jint _remaining; 1905 GLfloat *value = (GLfloat *) 0; 1906 1907 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1908 if (value == NULL) { 1909 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1910 value = (GLfloat *) (_valueBase + _bufferOffset); 1911 } 1912 glProgramUniform3fv( 1913 (GLuint)program, 1914 (GLint)location, 1915 (GLsizei)count, 1916 (GLfloat *)value 1917 ); 1918 if (_array) { 1919 releasePointer(_env, _array, value, JNI_FALSE); 1920 } 1921} 1922 1923/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1924static void 1925android_glProgramUniform4fv__III_3FI 1926 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) { 1927 jint _exception = 0; 1928 const char * _exceptionType = NULL; 1929 const char * _exceptionMessage = NULL; 1930 GLfloat *value_base = (GLfloat *) 0; 1931 jint _remaining; 1932 GLfloat *value = (GLfloat *) 0; 1933 1934 if (!value_ref) { 1935 _exception = 1; 1936 _exceptionType = "java/lang/IllegalArgumentException"; 1937 _exceptionMessage = "value == null"; 1938 goto exit; 1939 } 1940 if (offset < 0) { 1941 _exception = 1; 1942 _exceptionType = "java/lang/IllegalArgumentException"; 1943 _exceptionMessage = "offset < 0"; 1944 goto exit; 1945 } 1946 _remaining = _env->GetArrayLength(value_ref) - offset; 1947 value_base = (GLfloat *) 1948 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 1949 value = value_base + offset; 1950 1951 glProgramUniform4fv( 1952 (GLuint)program, 1953 (GLint)location, 1954 (GLsizei)count, 1955 (GLfloat *)value 1956 ); 1957 1958exit: 1959 if (value_base) { 1960 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 1961 JNI_ABORT); 1962 } 1963 if (_exception) { 1964 jniThrowException(_env, _exceptionType, _exceptionMessage); 1965 } 1966} 1967 1968/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */ 1969static void 1970android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 1971 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) { 1972 jarray _array = (jarray) 0; 1973 jint _bufferOffset = (jint) 0; 1974 jint _remaining; 1975 GLfloat *value = (GLfloat *) 0; 1976 1977 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 1978 if (value == NULL) { 1979 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 1980 value = (GLfloat *) (_valueBase + _bufferOffset); 1981 } 1982 glProgramUniform4fv( 1983 (GLuint)program, 1984 (GLint)location, 1985 (GLsizei)count, 1986 (GLfloat *)value 1987 ); 1988 if (_array) { 1989 releasePointer(_env, _array, value, JNI_FALSE); 1990 } 1991} 1992 1993/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 1994static void 1995android_glProgramUniformMatrix2fv__IIIZ_3FI 1996 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 1997 jint _exception = 0; 1998 const char * _exceptionType = NULL; 1999 const char * _exceptionMessage = NULL; 2000 GLfloat *value_base = (GLfloat *) 0; 2001 jint _remaining; 2002 GLfloat *value = (GLfloat *) 0; 2003 2004 if (!value_ref) { 2005 _exception = 1; 2006 _exceptionType = "java/lang/IllegalArgumentException"; 2007 _exceptionMessage = "value == null"; 2008 goto exit; 2009 } 2010 if (offset < 0) { 2011 _exception = 1; 2012 _exceptionType = "java/lang/IllegalArgumentException"; 2013 _exceptionMessage = "offset < 0"; 2014 goto exit; 2015 } 2016 _remaining = _env->GetArrayLength(value_ref) - offset; 2017 value_base = (GLfloat *) 2018 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2019 value = value_base + offset; 2020 2021 glProgramUniformMatrix2fv( 2022 (GLuint)program, 2023 (GLint)location, 2024 (GLsizei)count, 2025 (GLboolean)transpose, 2026 (GLfloat *)value 2027 ); 2028 2029exit: 2030 if (value_base) { 2031 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2032 JNI_ABORT); 2033 } 2034 if (_exception) { 2035 jniThrowException(_env, _exceptionType, _exceptionMessage); 2036 } 2037} 2038 2039/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2040static void 2041android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 2042 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2043 jarray _array = (jarray) 0; 2044 jint _bufferOffset = (jint) 0; 2045 jint _remaining; 2046 GLfloat *value = (GLfloat *) 0; 2047 2048 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2049 if (value == NULL) { 2050 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2051 value = (GLfloat *) (_valueBase + _bufferOffset); 2052 } 2053 glProgramUniformMatrix2fv( 2054 (GLuint)program, 2055 (GLint)location, 2056 (GLsizei)count, 2057 (GLboolean)transpose, 2058 (GLfloat *)value 2059 ); 2060 if (_array) { 2061 releasePointer(_env, _array, value, JNI_FALSE); 2062 } 2063} 2064 2065/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2066static void 2067android_glProgramUniformMatrix3fv__IIIZ_3FI 2068 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2069 jint _exception = 0; 2070 const char * _exceptionType = NULL; 2071 const char * _exceptionMessage = NULL; 2072 GLfloat *value_base = (GLfloat *) 0; 2073 jint _remaining; 2074 GLfloat *value = (GLfloat *) 0; 2075 2076 if (!value_ref) { 2077 _exception = 1; 2078 _exceptionType = "java/lang/IllegalArgumentException"; 2079 _exceptionMessage = "value == null"; 2080 goto exit; 2081 } 2082 if (offset < 0) { 2083 _exception = 1; 2084 _exceptionType = "java/lang/IllegalArgumentException"; 2085 _exceptionMessage = "offset < 0"; 2086 goto exit; 2087 } 2088 _remaining = _env->GetArrayLength(value_ref) - offset; 2089 value_base = (GLfloat *) 2090 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2091 value = value_base + offset; 2092 2093 glProgramUniformMatrix3fv( 2094 (GLuint)program, 2095 (GLint)location, 2096 (GLsizei)count, 2097 (GLboolean)transpose, 2098 (GLfloat *)value 2099 ); 2100 2101exit: 2102 if (value_base) { 2103 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2104 JNI_ABORT); 2105 } 2106 if (_exception) { 2107 jniThrowException(_env, _exceptionType, _exceptionMessage); 2108 } 2109} 2110 2111/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2112static void 2113android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 2114 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2115 jarray _array = (jarray) 0; 2116 jint _bufferOffset = (jint) 0; 2117 jint _remaining; 2118 GLfloat *value = (GLfloat *) 0; 2119 2120 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2121 if (value == NULL) { 2122 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2123 value = (GLfloat *) (_valueBase + _bufferOffset); 2124 } 2125 glProgramUniformMatrix3fv( 2126 (GLuint)program, 2127 (GLint)location, 2128 (GLsizei)count, 2129 (GLboolean)transpose, 2130 (GLfloat *)value 2131 ); 2132 if (_array) { 2133 releasePointer(_env, _array, value, JNI_FALSE); 2134 } 2135} 2136 2137/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2138static void 2139android_glProgramUniformMatrix4fv__IIIZ_3FI 2140 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2141 jint _exception = 0; 2142 const char * _exceptionType = NULL; 2143 const char * _exceptionMessage = NULL; 2144 GLfloat *value_base = (GLfloat *) 0; 2145 jint _remaining; 2146 GLfloat *value = (GLfloat *) 0; 2147 2148 if (!value_ref) { 2149 _exception = 1; 2150 _exceptionType = "java/lang/IllegalArgumentException"; 2151 _exceptionMessage = "value == null"; 2152 goto exit; 2153 } 2154 if (offset < 0) { 2155 _exception = 1; 2156 _exceptionType = "java/lang/IllegalArgumentException"; 2157 _exceptionMessage = "offset < 0"; 2158 goto exit; 2159 } 2160 _remaining = _env->GetArrayLength(value_ref) - offset; 2161 value_base = (GLfloat *) 2162 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2163 value = value_base + offset; 2164 2165 glProgramUniformMatrix4fv( 2166 (GLuint)program, 2167 (GLint)location, 2168 (GLsizei)count, 2169 (GLboolean)transpose, 2170 (GLfloat *)value 2171 ); 2172 2173exit: 2174 if (value_base) { 2175 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2176 JNI_ABORT); 2177 } 2178 if (_exception) { 2179 jniThrowException(_env, _exceptionType, _exceptionMessage); 2180 } 2181} 2182 2183/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2184static void 2185android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 2186 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2187 jarray _array = (jarray) 0; 2188 jint _bufferOffset = (jint) 0; 2189 jint _remaining; 2190 GLfloat *value = (GLfloat *) 0; 2191 2192 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2193 if (value == NULL) { 2194 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2195 value = (GLfloat *) (_valueBase + _bufferOffset); 2196 } 2197 glProgramUniformMatrix4fv( 2198 (GLuint)program, 2199 (GLint)location, 2200 (GLsizei)count, 2201 (GLboolean)transpose, 2202 (GLfloat *)value 2203 ); 2204 if (_array) { 2205 releasePointer(_env, _array, value, JNI_FALSE); 2206 } 2207} 2208 2209/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2210static void 2211android_glProgramUniformMatrix2x3fv__IIIZ_3FI 2212 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2213 jint _exception = 0; 2214 const char * _exceptionType = NULL; 2215 const char * _exceptionMessage = NULL; 2216 GLfloat *value_base = (GLfloat *) 0; 2217 jint _remaining; 2218 GLfloat *value = (GLfloat *) 0; 2219 2220 if (!value_ref) { 2221 _exception = 1; 2222 _exceptionType = "java/lang/IllegalArgumentException"; 2223 _exceptionMessage = "value == null"; 2224 goto exit; 2225 } 2226 if (offset < 0) { 2227 _exception = 1; 2228 _exceptionType = "java/lang/IllegalArgumentException"; 2229 _exceptionMessage = "offset < 0"; 2230 goto exit; 2231 } 2232 _remaining = _env->GetArrayLength(value_ref) - offset; 2233 value_base = (GLfloat *) 2234 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2235 value = value_base + offset; 2236 2237 glProgramUniformMatrix2x3fv( 2238 (GLuint)program, 2239 (GLint)location, 2240 (GLsizei)count, 2241 (GLboolean)transpose, 2242 (GLfloat *)value 2243 ); 2244 2245exit: 2246 if (value_base) { 2247 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2248 JNI_ABORT); 2249 } 2250 if (_exception) { 2251 jniThrowException(_env, _exceptionType, _exceptionMessage); 2252 } 2253} 2254 2255/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2256static void 2257android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 2258 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2259 jarray _array = (jarray) 0; 2260 jint _bufferOffset = (jint) 0; 2261 jint _remaining; 2262 GLfloat *value = (GLfloat *) 0; 2263 2264 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2265 if (value == NULL) { 2266 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2267 value = (GLfloat *) (_valueBase + _bufferOffset); 2268 } 2269 glProgramUniformMatrix2x3fv( 2270 (GLuint)program, 2271 (GLint)location, 2272 (GLsizei)count, 2273 (GLboolean)transpose, 2274 (GLfloat *)value 2275 ); 2276 if (_array) { 2277 releasePointer(_env, _array, value, JNI_FALSE); 2278 } 2279} 2280 2281/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2282static void 2283android_glProgramUniformMatrix3x2fv__IIIZ_3FI 2284 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2285 jint _exception = 0; 2286 const char * _exceptionType = NULL; 2287 const char * _exceptionMessage = NULL; 2288 GLfloat *value_base = (GLfloat *) 0; 2289 jint _remaining; 2290 GLfloat *value = (GLfloat *) 0; 2291 2292 if (!value_ref) { 2293 _exception = 1; 2294 _exceptionType = "java/lang/IllegalArgumentException"; 2295 _exceptionMessage = "value == null"; 2296 goto exit; 2297 } 2298 if (offset < 0) { 2299 _exception = 1; 2300 _exceptionType = "java/lang/IllegalArgumentException"; 2301 _exceptionMessage = "offset < 0"; 2302 goto exit; 2303 } 2304 _remaining = _env->GetArrayLength(value_ref) - offset; 2305 value_base = (GLfloat *) 2306 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2307 value = value_base + offset; 2308 2309 glProgramUniformMatrix3x2fv( 2310 (GLuint)program, 2311 (GLint)location, 2312 (GLsizei)count, 2313 (GLboolean)transpose, 2314 (GLfloat *)value 2315 ); 2316 2317exit: 2318 if (value_base) { 2319 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2320 JNI_ABORT); 2321 } 2322 if (_exception) { 2323 jniThrowException(_env, _exceptionType, _exceptionMessage); 2324 } 2325} 2326 2327/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2328static void 2329android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 2330 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2331 jarray _array = (jarray) 0; 2332 jint _bufferOffset = (jint) 0; 2333 jint _remaining; 2334 GLfloat *value = (GLfloat *) 0; 2335 2336 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2337 if (value == NULL) { 2338 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2339 value = (GLfloat *) (_valueBase + _bufferOffset); 2340 } 2341 glProgramUniformMatrix3x2fv( 2342 (GLuint)program, 2343 (GLint)location, 2344 (GLsizei)count, 2345 (GLboolean)transpose, 2346 (GLfloat *)value 2347 ); 2348 if (_array) { 2349 releasePointer(_env, _array, value, JNI_FALSE); 2350 } 2351} 2352 2353/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2354static void 2355android_glProgramUniformMatrix2x4fv__IIIZ_3FI 2356 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2357 jint _exception = 0; 2358 const char * _exceptionType = NULL; 2359 const char * _exceptionMessage = NULL; 2360 GLfloat *value_base = (GLfloat *) 0; 2361 jint _remaining; 2362 GLfloat *value = (GLfloat *) 0; 2363 2364 if (!value_ref) { 2365 _exception = 1; 2366 _exceptionType = "java/lang/IllegalArgumentException"; 2367 _exceptionMessage = "value == null"; 2368 goto exit; 2369 } 2370 if (offset < 0) { 2371 _exception = 1; 2372 _exceptionType = "java/lang/IllegalArgumentException"; 2373 _exceptionMessage = "offset < 0"; 2374 goto exit; 2375 } 2376 _remaining = _env->GetArrayLength(value_ref) - offset; 2377 value_base = (GLfloat *) 2378 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2379 value = value_base + offset; 2380 2381 glProgramUniformMatrix2x4fv( 2382 (GLuint)program, 2383 (GLint)location, 2384 (GLsizei)count, 2385 (GLboolean)transpose, 2386 (GLfloat *)value 2387 ); 2388 2389exit: 2390 if (value_base) { 2391 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2392 JNI_ABORT); 2393 } 2394 if (_exception) { 2395 jniThrowException(_env, _exceptionType, _exceptionMessage); 2396 } 2397} 2398 2399/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2400static void 2401android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 2402 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2403 jarray _array = (jarray) 0; 2404 jint _bufferOffset = (jint) 0; 2405 jint _remaining; 2406 GLfloat *value = (GLfloat *) 0; 2407 2408 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2409 if (value == NULL) { 2410 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2411 value = (GLfloat *) (_valueBase + _bufferOffset); 2412 } 2413 glProgramUniformMatrix2x4fv( 2414 (GLuint)program, 2415 (GLint)location, 2416 (GLsizei)count, 2417 (GLboolean)transpose, 2418 (GLfloat *)value 2419 ); 2420 if (_array) { 2421 releasePointer(_env, _array, value, JNI_FALSE); 2422 } 2423} 2424 2425/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2426static void 2427android_glProgramUniformMatrix4x2fv__IIIZ_3FI 2428 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2429 jint _exception = 0; 2430 const char * _exceptionType = NULL; 2431 const char * _exceptionMessage = NULL; 2432 GLfloat *value_base = (GLfloat *) 0; 2433 jint _remaining; 2434 GLfloat *value = (GLfloat *) 0; 2435 2436 if (!value_ref) { 2437 _exception = 1; 2438 _exceptionType = "java/lang/IllegalArgumentException"; 2439 _exceptionMessage = "value == null"; 2440 goto exit; 2441 } 2442 if (offset < 0) { 2443 _exception = 1; 2444 _exceptionType = "java/lang/IllegalArgumentException"; 2445 _exceptionMessage = "offset < 0"; 2446 goto exit; 2447 } 2448 _remaining = _env->GetArrayLength(value_ref) - offset; 2449 value_base = (GLfloat *) 2450 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2451 value = value_base + offset; 2452 2453 glProgramUniformMatrix4x2fv( 2454 (GLuint)program, 2455 (GLint)location, 2456 (GLsizei)count, 2457 (GLboolean)transpose, 2458 (GLfloat *)value 2459 ); 2460 2461exit: 2462 if (value_base) { 2463 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2464 JNI_ABORT); 2465 } 2466 if (_exception) { 2467 jniThrowException(_env, _exceptionType, _exceptionMessage); 2468 } 2469} 2470 2471/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2472static void 2473android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 2474 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2475 jarray _array = (jarray) 0; 2476 jint _bufferOffset = (jint) 0; 2477 jint _remaining; 2478 GLfloat *value = (GLfloat *) 0; 2479 2480 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2481 if (value == NULL) { 2482 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2483 value = (GLfloat *) (_valueBase + _bufferOffset); 2484 } 2485 glProgramUniformMatrix4x2fv( 2486 (GLuint)program, 2487 (GLint)location, 2488 (GLsizei)count, 2489 (GLboolean)transpose, 2490 (GLfloat *)value 2491 ); 2492 if (_array) { 2493 releasePointer(_env, _array, value, JNI_FALSE); 2494 } 2495} 2496 2497/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2498static void 2499android_glProgramUniformMatrix3x4fv__IIIZ_3FI 2500 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2501 jint _exception = 0; 2502 const char * _exceptionType = NULL; 2503 const char * _exceptionMessage = NULL; 2504 GLfloat *value_base = (GLfloat *) 0; 2505 jint _remaining; 2506 GLfloat *value = (GLfloat *) 0; 2507 2508 if (!value_ref) { 2509 _exception = 1; 2510 _exceptionType = "java/lang/IllegalArgumentException"; 2511 _exceptionMessage = "value == null"; 2512 goto exit; 2513 } 2514 if (offset < 0) { 2515 _exception = 1; 2516 _exceptionType = "java/lang/IllegalArgumentException"; 2517 _exceptionMessage = "offset < 0"; 2518 goto exit; 2519 } 2520 _remaining = _env->GetArrayLength(value_ref) - offset; 2521 value_base = (GLfloat *) 2522 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2523 value = value_base + offset; 2524 2525 glProgramUniformMatrix3x4fv( 2526 (GLuint)program, 2527 (GLint)location, 2528 (GLsizei)count, 2529 (GLboolean)transpose, 2530 (GLfloat *)value 2531 ); 2532 2533exit: 2534 if (value_base) { 2535 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2536 JNI_ABORT); 2537 } 2538 if (_exception) { 2539 jniThrowException(_env, _exceptionType, _exceptionMessage); 2540 } 2541} 2542 2543/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2544static void 2545android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 2546 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2547 jarray _array = (jarray) 0; 2548 jint _bufferOffset = (jint) 0; 2549 jint _remaining; 2550 GLfloat *value = (GLfloat *) 0; 2551 2552 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2553 if (value == NULL) { 2554 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2555 value = (GLfloat *) (_valueBase + _bufferOffset); 2556 } 2557 glProgramUniformMatrix3x4fv( 2558 (GLuint)program, 2559 (GLint)location, 2560 (GLsizei)count, 2561 (GLboolean)transpose, 2562 (GLfloat *)value 2563 ); 2564 if (_array) { 2565 releasePointer(_env, _array, value, JNI_FALSE); 2566 } 2567} 2568 2569/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2570static void 2571android_glProgramUniformMatrix4x3fv__IIIZ_3FI 2572 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { 2573 jint _exception = 0; 2574 const char * _exceptionType = NULL; 2575 const char * _exceptionMessage = NULL; 2576 GLfloat *value_base = (GLfloat *) 0; 2577 jint _remaining; 2578 GLfloat *value = (GLfloat *) 0; 2579 2580 if (!value_ref) { 2581 _exception = 1; 2582 _exceptionType = "java/lang/IllegalArgumentException"; 2583 _exceptionMessage = "value == null"; 2584 goto exit; 2585 } 2586 if (offset < 0) { 2587 _exception = 1; 2588 _exceptionType = "java/lang/IllegalArgumentException"; 2589 _exceptionMessage = "offset < 0"; 2590 goto exit; 2591 } 2592 _remaining = _env->GetArrayLength(value_ref) - offset; 2593 value_base = (GLfloat *) 2594 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0); 2595 value = value_base + offset; 2596 2597 glProgramUniformMatrix4x3fv( 2598 (GLuint)program, 2599 (GLint)location, 2600 (GLsizei)count, 2601 (GLboolean)transpose, 2602 (GLfloat *)value 2603 ); 2604 2605exit: 2606 if (value_base) { 2607 _env->ReleasePrimitiveArrayCritical(value_ref, value_base, 2608 JNI_ABORT); 2609 } 2610 if (_exception) { 2611 jniThrowException(_env, _exceptionType, _exceptionMessage); 2612 } 2613} 2614 2615/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ 2616static void 2617android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 2618 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) { 2619 jarray _array = (jarray) 0; 2620 jint _bufferOffset = (jint) 0; 2621 jint _remaining; 2622 GLfloat *value = (GLfloat *) 0; 2623 2624 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset); 2625 if (value == NULL) { 2626 char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2627 value = (GLfloat *) (_valueBase + _bufferOffset); 2628 } 2629 glProgramUniformMatrix4x3fv( 2630 (GLuint)program, 2631 (GLint)location, 2632 (GLsizei)count, 2633 (GLboolean)transpose, 2634 (GLfloat *)value 2635 ); 2636 if (_array) { 2637 releasePointer(_env, _array, value, JNI_FALSE); 2638 } 2639} 2640 2641/* void glValidateProgramPipeline ( GLuint pipeline ) */ 2642static void 2643android_glValidateProgramPipeline__I 2644 (JNIEnv *_env, jobject _this, jint pipeline) { 2645 glValidateProgramPipeline( 2646 (GLuint)pipeline 2647 ); 2648} 2649 2650#include <stdlib.h> 2651 2652/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */ 2653static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) { 2654 GLint infoLen = 0; 2655 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen); 2656 if (!infoLen) { 2657 return _env->NewStringUTF(""); 2658 } 2659 char* buf = (char*) malloc(infoLen); 2660 if (buf == NULL) { 2661 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory"); 2662 return NULL; 2663 } 2664 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf); 2665 jstring result = _env->NewStringUTF(buf); 2666 free(buf); 2667 return result; 2668} 2669/* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */ 2670static void 2671android_glBindImageTexture__IIIZIII 2672 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) { 2673 glBindImageTexture( 2674 (GLuint)unit, 2675 (GLuint)texture, 2676 (GLint)level, 2677 (GLboolean)layered, 2678 (GLint)layer, 2679 (GLenum)access, 2680 (GLenum)format 2681 ); 2682} 2683 2684/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */ 2685static void 2686android_glGetBooleani_v__II_3ZI 2687 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) { 2688 jint _exception = 0; 2689 const char * _exceptionType = NULL; 2690 const char * _exceptionMessage = NULL; 2691 GLboolean *data_base = (GLboolean *) 0; 2692 jint _remaining; 2693 GLboolean *data = (GLboolean *) 0; 2694 2695 if (!data_ref) { 2696 _exception = 1; 2697 _exceptionType = "java/lang/IllegalArgumentException"; 2698 _exceptionMessage = "data == null"; 2699 goto exit; 2700 } 2701 if (offset < 0) { 2702 _exception = 1; 2703 _exceptionType = "java/lang/IllegalArgumentException"; 2704 _exceptionMessage = "offset < 0"; 2705 goto exit; 2706 } 2707 _remaining = _env->GetArrayLength(data_ref) - offset; 2708 data_base = (GLboolean *) 2709 _env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0); 2710 data = data_base + offset; 2711 2712 glGetBooleani_v( 2713 (GLenum)target, 2714 (GLuint)index, 2715 (GLboolean *)data 2716 ); 2717 2718exit: 2719 if (data_base) { 2720 _env->ReleasePrimitiveArrayCritical(data_ref, data_base, 2721 _exception ? JNI_ABORT: 0); 2722 } 2723 if (_exception) { 2724 jniThrowException(_env, _exceptionType, _exceptionMessage); 2725 } 2726} 2727 2728/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */ 2729static void 2730android_glGetBooleani_v__IILjava_nio_IntBuffer_2 2731 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) { 2732 jarray _array = (jarray) 0; 2733 jint _bufferOffset = (jint) 0; 2734 jint _remaining; 2735 GLboolean *data = (GLboolean *) 0; 2736 2737 data = (GLboolean *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset); 2738 if (data == NULL) { 2739 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2740 data = (GLboolean *) (_dataBase + _bufferOffset); 2741 } 2742 glGetBooleani_v( 2743 (GLenum)target, 2744 (GLuint)index, 2745 (GLboolean *)data 2746 ); 2747 if (_array) { 2748 releasePointer(_env, _array, data, JNI_TRUE); 2749 } 2750} 2751 2752/* void glMemoryBarrier ( GLbitfield barriers ) */ 2753static void 2754android_glMemoryBarrier__I 2755 (JNIEnv *_env, jobject _this, jint barriers) { 2756 glMemoryBarrier( 2757 (GLbitfield)barriers 2758 ); 2759} 2760 2761/* void glMemoryBarrierByRegion ( GLbitfield barriers ) */ 2762static void 2763android_glMemoryBarrierByRegion__I 2764 (JNIEnv *_env, jobject _this, jint barriers) { 2765 glMemoryBarrierByRegion( 2766 (GLbitfield)barriers 2767 ); 2768} 2769 2770/* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */ 2771static void 2772android_glTexStorage2DMultisample__IIIIIZ 2773 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) { 2774 glTexStorage2DMultisample( 2775 (GLenum)target, 2776 (GLsizei)samples, 2777 (GLenum)internalformat, 2778 (GLsizei)width, 2779 (GLsizei)height, 2780 (GLboolean)fixedsamplelocations 2781 ); 2782} 2783 2784/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */ 2785static void 2786android_glGetMultisamplefv__II_3FI 2787 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) { 2788 jint _exception = 0; 2789 const char * _exceptionType = NULL; 2790 const char * _exceptionMessage = NULL; 2791 GLfloat *val_base = (GLfloat *) 0; 2792 jint _remaining; 2793 GLfloat *val = (GLfloat *) 0; 2794 2795 if (!val_ref) { 2796 _exception = 1; 2797 _exceptionType = "java/lang/IllegalArgumentException"; 2798 _exceptionMessage = "val == null"; 2799 goto exit; 2800 } 2801 if (offset < 0) { 2802 _exception = 1; 2803 _exceptionType = "java/lang/IllegalArgumentException"; 2804 _exceptionMessage = "offset < 0"; 2805 goto exit; 2806 } 2807 _remaining = _env->GetArrayLength(val_ref) - offset; 2808 val_base = (GLfloat *) 2809 _env->GetPrimitiveArrayCritical(val_ref, (jboolean *)0); 2810 val = val_base + offset; 2811 2812 glGetMultisamplefv( 2813 (GLenum)pname, 2814 (GLuint)index, 2815 (GLfloat *)val 2816 ); 2817 2818exit: 2819 if (val_base) { 2820 _env->ReleasePrimitiveArrayCritical(val_ref, val_base, 2821 _exception ? JNI_ABORT: 0); 2822 } 2823 if (_exception) { 2824 jniThrowException(_env, _exceptionType, _exceptionMessage); 2825 } 2826} 2827 2828/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */ 2829static void 2830android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 2831 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) { 2832 jarray _array = (jarray) 0; 2833 jint _bufferOffset = (jint) 0; 2834 jint _remaining; 2835 GLfloat *val = (GLfloat *) 0; 2836 2837 val = (GLfloat *)getPointer(_env, val_buf, &_array, &_remaining, &_bufferOffset); 2838 if (val == NULL) { 2839 char * _valBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2840 val = (GLfloat *) (_valBase + _bufferOffset); 2841 } 2842 glGetMultisamplefv( 2843 (GLenum)pname, 2844 (GLuint)index, 2845 (GLfloat *)val 2846 ); 2847 if (_array) { 2848 releasePointer(_env, _array, val, JNI_TRUE); 2849 } 2850} 2851 2852/* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */ 2853static void 2854android_glSampleMaski__II 2855 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) { 2856 glSampleMaski( 2857 (GLuint)maskNumber, 2858 (GLbitfield)mask 2859 ); 2860} 2861 2862/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */ 2863static void 2864android_glGetTexLevelParameteriv__III_3II 2865 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) { 2866 jint _exception = 0; 2867 const char * _exceptionType = NULL; 2868 const char * _exceptionMessage = NULL; 2869 GLint *params_base = (GLint *) 0; 2870 jint _remaining; 2871 GLint *params = (GLint *) 0; 2872 2873 if (!params_ref) { 2874 _exception = 1; 2875 _exceptionType = "java/lang/IllegalArgumentException"; 2876 _exceptionMessage = "params == null"; 2877 goto exit; 2878 } 2879 if (offset < 0) { 2880 _exception = 1; 2881 _exceptionType = "java/lang/IllegalArgumentException"; 2882 _exceptionMessage = "offset < 0"; 2883 goto exit; 2884 } 2885 _remaining = _env->GetArrayLength(params_ref) - offset; 2886 params_base = (GLint *) 2887 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 2888 params = params_base + offset; 2889 2890 glGetTexLevelParameteriv( 2891 (GLenum)target, 2892 (GLint)level, 2893 (GLenum)pname, 2894 (GLint *)params 2895 ); 2896 2897exit: 2898 if (params_base) { 2899 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 2900 _exception ? JNI_ABORT: 0); 2901 } 2902 if (_exception) { 2903 jniThrowException(_env, _exceptionType, _exceptionMessage); 2904 } 2905} 2906 2907/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */ 2908static void 2909android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 2910 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) { 2911 jarray _array = (jarray) 0; 2912 jint _bufferOffset = (jint) 0; 2913 jint _remaining; 2914 GLint *params = (GLint *) 0; 2915 2916 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset); 2917 if (params == NULL) { 2918 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2919 params = (GLint *) (_paramsBase + _bufferOffset); 2920 } 2921 glGetTexLevelParameteriv( 2922 (GLenum)target, 2923 (GLint)level, 2924 (GLenum)pname, 2925 (GLint *)params 2926 ); 2927 if (_array) { 2928 releasePointer(_env, _array, params, JNI_TRUE); 2929 } 2930} 2931 2932/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */ 2933static void 2934android_glGetTexLevelParameterfv__III_3FI 2935 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) { 2936 jint _exception = 0; 2937 const char * _exceptionType = NULL; 2938 const char * _exceptionMessage = NULL; 2939 GLfloat *params_base = (GLfloat *) 0; 2940 jint _remaining; 2941 GLfloat *params = (GLfloat *) 0; 2942 2943 if (!params_ref) { 2944 _exception = 1; 2945 _exceptionType = "java/lang/IllegalArgumentException"; 2946 _exceptionMessage = "params == null"; 2947 goto exit; 2948 } 2949 if (offset < 0) { 2950 _exception = 1; 2951 _exceptionType = "java/lang/IllegalArgumentException"; 2952 _exceptionMessage = "offset < 0"; 2953 goto exit; 2954 } 2955 _remaining = _env->GetArrayLength(params_ref) - offset; 2956 params_base = (GLfloat *) 2957 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); 2958 params = params_base + offset; 2959 2960 glGetTexLevelParameterfv( 2961 (GLenum)target, 2962 (GLint)level, 2963 (GLenum)pname, 2964 (GLfloat *)params 2965 ); 2966 2967exit: 2968 if (params_base) { 2969 _env->ReleasePrimitiveArrayCritical(params_ref, params_base, 2970 _exception ? JNI_ABORT: 0); 2971 } 2972 if (_exception) { 2973 jniThrowException(_env, _exceptionType, _exceptionMessage); 2974 } 2975} 2976 2977/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */ 2978static void 2979android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 2980 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) { 2981 jarray _array = (jarray) 0; 2982 jint _bufferOffset = (jint) 0; 2983 jint _remaining; 2984 GLfloat *params = (GLfloat *) 0; 2985 2986 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset); 2987 if (params == NULL) { 2988 char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); 2989 params = (GLfloat *) (_paramsBase + _bufferOffset); 2990 } 2991 glGetTexLevelParameterfv( 2992 (GLenum)target, 2993 (GLint)level, 2994 (GLenum)pname, 2995 (GLfloat *)params 2996 ); 2997 if (_array) { 2998 releasePointer(_env, _array, params, JNI_TRUE); 2999 } 3000} 3001 3002/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */ 3003static void 3004android_glBindVertexBuffer__IIJI 3005 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) { 3006 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) { 3007 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large"); 3008 return; 3009 } 3010 glBindVertexBuffer( 3011 (GLuint)bindingindex, 3012 (GLuint)buffer, 3013 (GLintptr)offset, 3014 (GLsizei)stride 3015 ); 3016} 3017/* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */ 3018static void 3019android_glVertexAttribFormat__IIIZI 3020 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) { 3021 glVertexAttribFormat( 3022 (GLuint)attribindex, 3023 (GLint)size, 3024 (GLenum)type, 3025 (GLboolean)normalized, 3026 (GLuint)relativeoffset 3027 ); 3028} 3029 3030/* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */ 3031static void 3032android_glVertexAttribIFormat__IIII 3033 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) { 3034 glVertexAttribIFormat( 3035 (GLuint)attribindex, 3036 (GLint)size, 3037 (GLenum)type, 3038 (GLuint)relativeoffset 3039 ); 3040} 3041 3042/* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */ 3043static void 3044android_glVertexAttribBinding__II 3045 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) { 3046 glVertexAttribBinding( 3047 (GLuint)attribindex, 3048 (GLuint)bindingindex 3049 ); 3050} 3051 3052/* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */ 3053static void 3054android_glVertexBindingDivisor__II 3055 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) { 3056 glVertexBindingDivisor( 3057 (GLuint)bindingindex, 3058 (GLuint)divisor 3059 ); 3060} 3061 3062static const char *classPathName = "android/opengl/GLES31"; 3063 3064static JNINativeMethod methods[] = { 3065{"_nativeClassInit", "()V", (void*)nativeClassInit }, 3066{"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III }, 3067{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect }, 3068{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect }, 3069{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect }, 3070{"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III }, 3071{"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II }, 3072{"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 }, 3073{"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II }, 3074{"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 }, 3075{"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 }, 3076{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName }, 3077{"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II }, 3078{"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 }, 3079{"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 }, 3080{"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III }, 3081{"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II }, 3082{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv }, 3083{"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I }, 3084{"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II }, 3085{"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 }, 3086{"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II }, 3087{"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 }, 3088{"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I }, 3089{"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II }, 3090{"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 }, 3091{"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III }, 3092{"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII }, 3093{"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII }, 3094{"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII }, 3095{"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III }, 3096{"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII }, 3097{"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII }, 3098{"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII }, 3099{"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF }, 3100{"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF }, 3101{"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF }, 3102{"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF }, 3103{"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II }, 3104{"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 }, 3105{"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II }, 3106{"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 }, 3107{"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II }, 3108{"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 }, 3109{"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II }, 3110{"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 }, 3111{"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II }, 3112{"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 }, 3113{"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II }, 3114{"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 }, 3115{"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II }, 3116{"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 }, 3117{"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II }, 3118{"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 }, 3119{"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI }, 3120{"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 }, 3121{"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI }, 3122{"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 }, 3123{"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI }, 3124{"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 }, 3125{"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI }, 3126{"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 }, 3127{"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI }, 3128{"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 }, 3129{"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI }, 3130{"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 }, 3131{"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI }, 3132{"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 }, 3133{"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI }, 3134{"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 }, 3135{"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI }, 3136{"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 }, 3137{"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI }, 3138{"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 }, 3139{"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI }, 3140{"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 }, 3141{"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI }, 3142{"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 }, 3143{"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI }, 3144{"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 }, 3145{"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I }, 3146{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog }, 3147{"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII }, 3148{"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI }, 3149{"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 }, 3150{"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I }, 3151{"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I }, 3152{"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ }, 3153{"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI }, 3154{"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 }, 3155{"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II }, 3156{"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II }, 3157{"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 }, 3158{"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI }, 3159{"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 }, 3160{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI }, 3161{"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI }, 3162{"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII }, 3163{"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II }, 3164{"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II }, 3165}; 3166 3167int register_android_opengl_jni_GLES31(JNIEnv *_env) 3168{ 3169 int err; 3170 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); 3171 return err; 3172} 3173