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