Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | // This source file is automatically generated |
| 18 | |
| 19 | #pragma GCC diagnostic ignored "-Wunused-variable" |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 20 | #pragma GCC diagnostic ignored "-Wunused-function" |
| 21 | |
| 22 | #include <stdint.h> |
| 23 | #include <GLES3/gl32.h> |
| 24 | #include <jni.h> |
Steven Moreland | 2279b25 | 2017-07-19 09:50:45 -0700 | [diff] [blame] | 25 | #include <nativehelper/JNIHelp.h> |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 26 | #include <android_runtime/AndroidRuntime.h> |
| 27 | #include <utils/misc.h> |
| 28 | #include <assert.h> |
| 29 | |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 30 | |
| 31 | /* special calls implemented in Android's GLES wrapper used to more |
| 32 | * efficiently bound-check passed arrays */ |
| 33 | extern "C" { |
| 34 | #ifdef GL_VERSION_ES_CM_1_1 |
| 35 | GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, |
| 36 | const GLvoid *ptr, GLsizei count); |
| 37 | GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, |
| 38 | const GLvoid *pointer, GLsizei count); |
| 39 | GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, |
| 40 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 41 | GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, |
| 42 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 43 | GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, |
| 44 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 45 | GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, |
| 46 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 47 | GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, |
| 48 | GLsizei stride, const GLvoid *pointer, GLsizei count); |
| 49 | #endif |
| 50 | #ifdef GL_ES_VERSION_2_0 |
| 51 | static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type, |
| 52 | GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) { |
| 53 | glVertexAttribPointer(indx, size, type, normalized, stride, pointer); |
| 54 | } |
| 55 | #endif |
| 56 | #ifdef GL_ES_VERSION_3_0 |
| 57 | static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type, |
| 58 | GLsizei stride, const GLvoid *pointer, GLsizei count) { |
| 59 | glVertexAttribIPointer(indx, size, type, stride, pointer); |
| 60 | } |
| 61 | #endif |
| 62 | } |
| 63 | |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 64 | static void |
| 65 | nativeClassInit(JNIEnv *_env, jclass glImplClass) |
| 66 | { |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | static void * |
| 70 | getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) |
| 71 | { |
| 72 | jint position; |
| 73 | jint limit; |
| 74 | jint elementSizeShift; |
| 75 | jlong pointer; |
| 76 | |
Orion Hodson | 02440d3 | 2019-02-28 15:15:34 +0000 | [diff] [blame] | 77 | pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift); |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 78 | *remaining = (limit - position) << elementSizeShift; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 79 | if (pointer != 0L) { |
Orion Hodson | 02440d3 | 2019-02-28 15:15:34 +0000 | [diff] [blame] | 80 | *array = nullptr; |
| 81 | pointer += position << elementSizeShift; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 82 | return reinterpret_cast<void*>(pointer); |
| 83 | } |
| 84 | |
Orion Hodson | 02440d3 | 2019-02-28 15:15:34 +0000 | [diff] [blame] | 85 | *array = jniGetNioBufferBaseArray(_env, buffer); |
| 86 | *offset = jniGetNioBufferBaseArrayOffset(_env, buffer); |
| 87 | return nullptr; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | class ByteArrayGetter { |
| 91 | public: |
| 92 | static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) { |
| 93 | return _env->GetByteArrayElements(array, is_copy); |
| 94 | } |
| 95 | }; |
| 96 | class BooleanArrayGetter { |
| 97 | public: |
| 98 | static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) { |
| 99 | return _env->GetBooleanArrayElements(array, is_copy); |
| 100 | } |
| 101 | }; |
| 102 | class CharArrayGetter { |
| 103 | public: |
| 104 | static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) { |
| 105 | return _env->GetCharArrayElements(array, is_copy); |
| 106 | } |
| 107 | }; |
| 108 | class ShortArrayGetter { |
| 109 | public: |
| 110 | static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) { |
| 111 | return _env->GetShortArrayElements(array, is_copy); |
| 112 | } |
| 113 | }; |
| 114 | class IntArrayGetter { |
| 115 | public: |
| 116 | static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) { |
| 117 | return _env->GetIntArrayElements(array, is_copy); |
| 118 | } |
| 119 | }; |
| 120 | class LongArrayGetter { |
| 121 | public: |
| 122 | static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) { |
| 123 | return _env->GetLongArrayElements(array, is_copy); |
| 124 | } |
| 125 | }; |
| 126 | class FloatArrayGetter { |
| 127 | public: |
| 128 | static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) { |
| 129 | return _env->GetFloatArrayElements(array, is_copy); |
| 130 | } |
| 131 | }; |
| 132 | class DoubleArrayGetter { |
| 133 | public: |
| 134 | static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) { |
| 135 | return _env->GetDoubleArrayElements(array, is_copy); |
| 136 | } |
| 137 | }; |
| 138 | |
| 139 | template<typename JTYPEARRAY, typename ARRAYGETTER> |
| 140 | static void* |
| 141 | getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) { |
| 142 | return ARRAYGETTER::Get(_env, array, is_copy); |
| 143 | } |
| 144 | |
| 145 | class ByteArrayReleaser { |
| 146 | public: |
| 147 | static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) { |
| 148 | _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 149 | } |
| 150 | }; |
| 151 | class BooleanArrayReleaser { |
| 152 | public: |
| 153 | static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) { |
| 154 | _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 155 | } |
| 156 | }; |
| 157 | class CharArrayReleaser { |
| 158 | public: |
| 159 | static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) { |
| 160 | _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 161 | } |
| 162 | }; |
| 163 | class ShortArrayReleaser { |
| 164 | public: |
| 165 | static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) { |
| 166 | _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 167 | } |
| 168 | }; |
| 169 | class IntArrayReleaser { |
| 170 | public: |
| 171 | static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) { |
| 172 | _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 173 | } |
| 174 | }; |
| 175 | class LongArrayReleaser { |
| 176 | public: |
| 177 | static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) { |
| 178 | _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 179 | } |
| 180 | }; |
| 181 | class FloatArrayReleaser { |
| 182 | public: |
| 183 | static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) { |
| 184 | _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 185 | } |
| 186 | }; |
| 187 | class DoubleArrayReleaser { |
| 188 | public: |
| 189 | static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) { |
| 190 | _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT); |
| 191 | } |
| 192 | }; |
| 193 | |
| 194 | template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER> |
| 195 | static void |
| 196 | releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) { |
| 197 | ARRAYRELEASER::Release(_env, array, data, commit); |
| 198 | } |
| 199 | |
| 200 | static void |
| 201 | releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) |
| 202 | { |
| 203 | _env->ReleasePrimitiveArrayCritical(array, data, |
| 204 | commit ? 0 : JNI_ABORT); |
| 205 | } |
| 206 | |
| 207 | static void * |
| 208 | getDirectBufferPointer(JNIEnv *_env, jobject buffer) { |
Orion Hodson | 02440d3 | 2019-02-28 15:15:34 +0000 | [diff] [blame] | 209 | jint position; |
| 210 | jint limit; |
| 211 | jint elementSizeShift; |
| 212 | jlong pointer; |
| 213 | pointer = jniGetNioBufferFields(_env, buffer, &position, &limit, &elementSizeShift); |
| 214 | if (pointer == 0) { |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 215 | jniThrowException(_env, "java/lang/IllegalArgumentException", |
| 216 | "Must use a native order direct Buffer"); |
Orion Hodson | 02440d3 | 2019-02-28 15:15:34 +0000 | [diff] [blame] | 217 | return nullptr; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 218 | } |
Orion Hodson | 02440d3 | 2019-02-28 15:15:34 +0000 | [diff] [blame] | 219 | pointer += position << elementSizeShift; |
| 220 | return reinterpret_cast<void*>(pointer); |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | // -------------------------------------------------------------------------- |
| 224 | |
| 225 | /* |
| 226 | * returns the number of values glGet returns for a given pname. |
| 227 | * |
| 228 | * The code below is written such that pnames requiring only one values |
| 229 | * are the default (and are not explicitely tested for). This makes the |
| 230 | * checking code much shorter/readable/efficient. |
| 231 | * |
| 232 | * This means that unknown pnames (e.g.: extensions) will default to 1. If |
| 233 | * that unknown pname needs more than 1 value, then the validation check |
| 234 | * is incomplete and the app may crash if it passed the wrong number params. |
| 235 | */ |
| 236 | static int getNeededCount(GLint pname) { |
| 237 | int needed = 1; |
Romain Guy | dc43a6c | 2017-02-17 19:54:25 -0800 | [diff] [blame] | 238 | #ifdef GL_ES_VERSION_3_0 |
| 239 | // GLES 3.x pnames |
| 240 | switch (pname) { |
| 241 | case GL_MAX_VIEWPORT_DIMS: |
| 242 | needed = 2; |
| 243 | break; |
| 244 | |
| 245 | case GL_PROGRAM_BINARY_FORMATS: |
| 246 | glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &needed); |
| 247 | break; |
| 248 | } |
| 249 | #endif |
| 250 | |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 251 | #ifdef GL_ES_VERSION_2_0 |
| 252 | // GLES 2.x pnames |
| 253 | switch (pname) { |
| 254 | case GL_ALIASED_LINE_WIDTH_RANGE: |
| 255 | case GL_ALIASED_POINT_SIZE_RANGE: |
| 256 | needed = 2; |
| 257 | break; |
| 258 | |
| 259 | case GL_BLEND_COLOR: |
| 260 | case GL_COLOR_CLEAR_VALUE: |
| 261 | case GL_COLOR_WRITEMASK: |
| 262 | case GL_SCISSOR_BOX: |
| 263 | case GL_VIEWPORT: |
| 264 | needed = 4; |
| 265 | break; |
| 266 | |
| 267 | case GL_COMPRESSED_TEXTURE_FORMATS: |
| 268 | glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); |
| 269 | break; |
| 270 | |
| 271 | case GL_SHADER_BINARY_FORMATS: |
| 272 | glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed); |
| 273 | break; |
| 274 | } |
| 275 | #endif |
| 276 | |
| 277 | #ifdef GL_VERSION_ES_CM_1_1 |
| 278 | // GLES 1.x pnames |
| 279 | switch (pname) { |
| 280 | case GL_ALIASED_LINE_WIDTH_RANGE: |
| 281 | case GL_ALIASED_POINT_SIZE_RANGE: |
| 282 | case GL_DEPTH_RANGE: |
| 283 | case GL_SMOOTH_LINE_WIDTH_RANGE: |
| 284 | case GL_SMOOTH_POINT_SIZE_RANGE: |
| 285 | needed = 2; |
| 286 | break; |
| 287 | |
| 288 | case GL_CURRENT_NORMAL: |
| 289 | case GL_POINT_DISTANCE_ATTENUATION: |
| 290 | needed = 3; |
| 291 | break; |
| 292 | |
| 293 | case GL_COLOR_CLEAR_VALUE: |
| 294 | case GL_COLOR_WRITEMASK: |
| 295 | case GL_CURRENT_COLOR: |
| 296 | case GL_CURRENT_TEXTURE_COORDS: |
| 297 | case GL_FOG_COLOR: |
| 298 | case GL_LIGHT_MODEL_AMBIENT: |
| 299 | case GL_SCISSOR_BOX: |
| 300 | case GL_VIEWPORT: |
| 301 | needed = 4; |
| 302 | break; |
| 303 | |
| 304 | case GL_MODELVIEW_MATRIX: |
| 305 | case GL_PROJECTION_MATRIX: |
| 306 | case GL_TEXTURE_MATRIX: |
| 307 | needed = 16; |
| 308 | break; |
| 309 | |
| 310 | case GL_COMPRESSED_TEXTURE_FORMATS: |
| 311 | glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); |
| 312 | break; |
| 313 | } |
| 314 | #endif |
| 315 | return needed; |
| 316 | } |
| 317 | |
| 318 | template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY, |
| 319 | typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)> |
| 320 | static void |
| 321 | get |
| 322 | (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) { |
| 323 | jint _exception = 0; |
| 324 | const char * _exceptionType; |
| 325 | const char * _exceptionMessage; |
| 326 | CTYPE *params_base = (CTYPE *) 0; |
| 327 | jint _remaining; |
| 328 | CTYPE *params = (CTYPE *) 0; |
| 329 | int _needed = 0; |
| 330 | |
| 331 | if (!params_ref) { |
| 332 | _exception = 1; |
| 333 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 334 | _exceptionMessage = "params == null"; |
| 335 | goto exit; |
| 336 | } |
| 337 | if (offset < 0) { |
| 338 | _exception = 1; |
| 339 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 340 | _exceptionMessage = "offset < 0"; |
| 341 | goto exit; |
| 342 | } |
| 343 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 344 | _needed = getNeededCount(pname); |
| 345 | // if we didn't find this pname, we just assume the user passed |
| 346 | // an array of the right size -- this might happen with extensions |
| 347 | // or if we forget an enum here. |
| 348 | if (_remaining < _needed) { |
| 349 | _exception = 1; |
| 350 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 351 | _exceptionMessage = "length - offset < needed"; |
| 352 | goto exit; |
| 353 | } |
| 354 | params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>( |
| 355 | _env, params_ref, (jboolean *)0); |
| 356 | params = params_base + offset; |
| 357 | |
| 358 | GET( |
| 359 | (GLenum)pname, |
| 360 | (CTYPE *)params |
| 361 | ); |
| 362 | |
| 363 | exit: |
| 364 | if (params_base) { |
| 365 | releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>( |
| 366 | _env, params_ref, params_base, !_exception); |
| 367 | } |
| 368 | if (_exception) { |
| 369 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | |
| 374 | template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY, |
| 375 | typename ARRAYRELEASER, void GET(GLenum, CTYPE*)> |
| 376 | static void |
| 377 | getarray |
| 378 | (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { |
| 379 | jint _exception = 0; |
| 380 | const char * _exceptionType; |
| 381 | const char * _exceptionMessage; |
| 382 | JTYPEARRAY _array = (JTYPEARRAY) 0; |
| 383 | jint _bufferOffset = (jint) 0; |
| 384 | jint _remaining; |
| 385 | CTYPE *params = (CTYPE *) 0; |
| 386 | int _needed = 0; |
| 387 | |
| 388 | params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 389 | _remaining /= sizeof(CTYPE); // convert from bytes to item count |
| 390 | _needed = getNeededCount(pname); |
| 391 | // if we didn't find this pname, we just assume the user passed |
| 392 | // an array of the right size -- this might happen with extensions |
| 393 | // or if we forget an enum here. |
| 394 | if (_needed>0 && _remaining < _needed) { |
| 395 | _exception = 1; |
| 396 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 397 | _exceptionMessage = "remaining() < needed"; |
| 398 | goto exit; |
| 399 | } |
| 400 | if (params == NULL) { |
| 401 | char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>( |
| 402 | _env, _array, (jboolean *) 0); |
| 403 | params = (CTYPE *) (_paramsBase + _bufferOffset); |
| 404 | } |
| 405 | GET( |
| 406 | (GLenum)pname, |
| 407 | (CTYPE *)params |
| 408 | ); |
| 409 | |
| 410 | exit: |
| 411 | if (_array) { |
| 412 | releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>( |
| 413 | _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE); |
| 414 | } |
| 415 | if (_exception) { |
| 416 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | // -------------------------------------------------------------------------- |
| 421 | /* void glBlendBarrier ( void ) */ |
| 422 | static void |
| 423 | android_glBlendBarrier__ |
| 424 | (JNIEnv *_env, jobject _this) { |
| 425 | glBlendBarrier(); |
| 426 | } |
| 427 | |
| 428 | /* void glCopyImageSubData ( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth ) */ |
| 429 | static void |
| 430 | android_glCopyImageSubData__IIIIIIIIIIIIIII |
| 431 | (JNIEnv *_env, jobject _this, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint srcWidth, jint srcHeight, jint srcDepth) { |
| 432 | glCopyImageSubData( |
| 433 | (GLuint)srcName, |
| 434 | (GLenum)srcTarget, |
| 435 | (GLint)srcLevel, |
| 436 | (GLint)srcX, |
| 437 | (GLint)srcY, |
| 438 | (GLint)srcZ, |
| 439 | (GLuint)dstName, |
| 440 | (GLenum)dstTarget, |
| 441 | (GLint)dstLevel, |
| 442 | (GLint)dstX, |
| 443 | (GLint)dstY, |
| 444 | (GLint)dstZ, |
| 445 | (GLsizei)srcWidth, |
| 446 | (GLsizei)srcHeight, |
| 447 | (GLsizei)srcDepth |
| 448 | ); |
| 449 | } |
| 450 | |
| 451 | /* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */ |
| 452 | static void |
| 453 | android_glDebugMessageControl__IIII_3IIZ |
| 454 | (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jintArray ids_ref, jint offset, jboolean enabled) { |
| 455 | jint _exception = 0; |
| 456 | const char * _exceptionType = NULL; |
| 457 | const char * _exceptionMessage = NULL; |
| 458 | GLuint *ids_base = (GLuint *) 0; |
| 459 | jint _remaining; |
| 460 | GLuint *ids = (GLuint *) 0; |
| 461 | |
| 462 | if (!ids_ref) { |
| 463 | _exception = 1; |
| 464 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 465 | _exceptionMessage = "ids == null"; |
| 466 | goto exit; |
| 467 | } |
| 468 | if (offset < 0) { |
| 469 | _exception = 1; |
| 470 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 471 | _exceptionMessage = "offset < 0"; |
| 472 | goto exit; |
| 473 | } |
| 474 | _remaining = _env->GetArrayLength(ids_ref) - offset; |
| 475 | if (_remaining < count) { |
| 476 | _exception = 1; |
| 477 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 478 | _exceptionMessage = "length - offset < count < needed"; |
| 479 | goto exit; |
| 480 | } |
| 481 | ids_base = (GLuint *) |
| 482 | _env->GetIntArrayElements(ids_ref, (jboolean *)0); |
| 483 | ids = ids_base + offset; |
| 484 | |
| 485 | glDebugMessageControl( |
| 486 | (GLenum)source, |
| 487 | (GLenum)type, |
| 488 | (GLenum)severity, |
| 489 | (GLsizei)count, |
| 490 | (GLuint *)ids, |
| 491 | (GLboolean)enabled |
| 492 | ); |
| 493 | |
| 494 | exit: |
| 495 | if (ids_base) { |
| 496 | _env->ReleaseIntArrayElements(ids_ref, (jint*)ids_base, |
| 497 | JNI_ABORT); |
| 498 | } |
| 499 | if (_exception) { |
| 500 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | /* void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled ) */ |
| 505 | static void |
| 506 | android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z |
| 507 | (JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) { |
| 508 | jint _exception = 0; |
| 509 | const char * _exceptionType = NULL; |
| 510 | const char * _exceptionMessage = NULL; |
| 511 | jintArray _array = (jintArray) 0; |
| 512 | jint _bufferOffset = (jint) 0; |
| 513 | jint _remaining; |
| 514 | GLuint *ids = (GLuint *) 0; |
| 515 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 516 | if (!ids_buf) { |
| 517 | _exception = 1; |
| 518 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 519 | _exceptionMessage = "ids == null"; |
| 520 | goto exit; |
| 521 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 522 | ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 523 | if (_remaining < count) { |
| 524 | _exception = 1; |
| 525 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 526 | _exceptionMessage = "remaining() < count < needed"; |
| 527 | goto exit; |
| 528 | } |
| 529 | if (ids == NULL) { |
| 530 | char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 531 | ids = (GLuint *) (_idsBase + _bufferOffset); |
| 532 | } |
| 533 | glDebugMessageControl( |
| 534 | (GLenum)source, |
| 535 | (GLenum)type, |
| 536 | (GLenum)severity, |
| 537 | (GLsizei)count, |
| 538 | (GLuint *)ids, |
| 539 | (GLboolean)enabled |
| 540 | ); |
| 541 | |
| 542 | exit: |
| 543 | if (_array) { |
| 544 | _env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT); |
| 545 | } |
| 546 | if (_exception) { |
| 547 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | /* void glDebugMessageInsert ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */ |
| 552 | static void |
| 553 | android_glDebugMessageInsert__IIIIILjava_lang_String_2 |
| 554 | (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jint length, jstring buf) { |
| 555 | jint _exception = 0; |
| 556 | const char * _exceptionType = NULL; |
| 557 | const char * _exceptionMessage = NULL; |
| 558 | const char* _nativebuf = 0; |
| 559 | |
| 560 | if (!buf) { |
| 561 | _exception = 1; |
| 562 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 563 | _exceptionMessage = "buf == null"; |
| 564 | goto exit; |
| 565 | } |
| 566 | _nativebuf = _env->GetStringUTFChars(buf, 0); |
| 567 | |
| 568 | glDebugMessageInsert( |
| 569 | (GLenum)source, |
| 570 | (GLenum)type, |
| 571 | (GLuint)id, |
| 572 | (GLenum)severity, |
| 573 | (GLsizei)length, |
| 574 | (GLchar *)_nativebuf |
| 575 | ); |
| 576 | |
| 577 | exit: |
| 578 | if (_nativebuf) { |
| 579 | _env->ReleaseStringUTFChars(buf, _nativebuf); |
| 580 | } |
| 581 | |
| 582 | if (_exception) { |
| 583 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 584 | } |
| 585 | } |
| 586 | |
| 587 | /* void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam ) */ |
| 588 | static void |
| 589 | android_glDebugMessageCallback(JNIEnv *_env, jobject _this, jobject callback) { |
| 590 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 591 | } |
| 592 | /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */ |
| 593 | static jint |
| 594 | android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI |
| 595 | (JNIEnv *_env, jobject _this, jint count, jint bufSize, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset, jintArray lengths_ref, jint lengthsOffset, jbyteArray messageLog_ref, jint messageLogOffset) { |
| 596 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 597 | return 0; |
| 598 | } |
| 599 | |
| 600 | /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */ |
| 601 | static uint |
| 602 | android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 |
| 603 | (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) { |
| 604 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 605 | return 0; |
| 606 | } |
| 607 | |
| 608 | /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */ |
| 609 | static jobjectArray |
| 610 | android_glGetDebugMessageLog__I_3II_3II_3II_3II |
| 611 | (JNIEnv *_env, jobject _this, jint count, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset) { |
| 612 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 613 | return 0; |
| 614 | } |
| 615 | |
| 616 | /* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */ |
| 617 | static jobjectArray |
| 618 | android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 |
| 619 | (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) { |
| 620 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 621 | return 0; |
| 622 | } |
| 623 | /* void glPushDebugGroup ( GLenum source, GLuint id, GLsizei length, const GLchar *message ) */ |
| 624 | static void |
| 625 | android_glPushDebugGroup__IIILjava_lang_String_2 |
| 626 | (JNIEnv *_env, jobject _this, jint source, jint id, jint length, jstring message) { |
| 627 | jint _exception = 0; |
| 628 | const char * _exceptionType = NULL; |
| 629 | const char * _exceptionMessage = NULL; |
| 630 | const char* _nativemessage = 0; |
| 631 | jsize _stringlen = 0; |
| 632 | |
| 633 | if (!message) { |
| 634 | _exception = 1; |
| 635 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 636 | _exceptionMessage = "message == null"; |
| 637 | goto exit; |
| 638 | } |
| 639 | _nativemessage = _env->GetStringUTFChars(message, 0); |
| 640 | _stringlen = _env->GetStringUTFLength(message); |
| 641 | if (length > _stringlen) { |
| 642 | _exception = 1; |
| 643 | _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; |
| 644 | _exceptionMessage = "length of message is shorter than length argument"; |
| 645 | goto exit; |
| 646 | } |
| 647 | |
| 648 | glPushDebugGroup( |
| 649 | (GLenum)source, |
| 650 | (GLuint)id, |
| 651 | (GLsizei)length, |
| 652 | (GLchar *)_nativemessage |
| 653 | ); |
| 654 | |
| 655 | exit: |
| 656 | if (_nativemessage) { |
| 657 | _env->ReleaseStringUTFChars(message, _nativemessage); |
| 658 | } |
| 659 | |
| 660 | if (_exception) { |
| 661 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | /* void glPopDebugGroup ( void ) */ |
| 666 | static void |
| 667 | android_glPopDebugGroup__ |
| 668 | (JNIEnv *_env, jobject _this) { |
| 669 | glPopDebugGroup(); |
| 670 | } |
| 671 | |
| 672 | /* void glObjectLabel ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */ |
| 673 | static void |
| 674 | android_glObjectLabel__IIILjava_lang_String_2 |
| 675 | (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) { |
| 676 | jint _exception = 0; |
| 677 | const char * _exceptionType = NULL; |
| 678 | const char * _exceptionMessage = NULL; |
| 679 | const char* _nativelabel = 0; |
| 680 | jsize _stringlen = 0; |
| 681 | |
| 682 | if (label) { |
| 683 | _nativelabel = _env->GetStringUTFChars(label, 0); |
| 684 | _stringlen = _env->GetStringUTFLength(label); |
| 685 | if (length > _stringlen) { |
| 686 | _exception = 1; |
| 687 | _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; |
| 688 | _exceptionMessage = "length of label is shorter than length argument"; |
| 689 | goto exit; |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | glObjectLabel( |
| 694 | (GLenum)identifier, |
| 695 | (GLuint)name, |
| 696 | (GLsizei)length, |
| 697 | (GLchar *)_nativelabel |
| 698 | ); |
| 699 | |
| 700 | exit: |
| 701 | if (_nativelabel) { |
| 702 | _env->ReleaseStringUTFChars(label, _nativelabel); |
| 703 | } |
| 704 | |
| 705 | if (_exception) { |
| 706 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | /* void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */ |
| 711 | static jstring |
| 712 | android_glGetObjectLabel(JNIEnv *_env, jobject _this, jint identifier, jint name) { |
| 713 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 714 | return NULL; |
| 715 | } |
| 716 | |
| 717 | /* void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label ) */ |
| 718 | static void |
| 719 | android_glObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr, jstring label) { |
| 720 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 721 | } |
| 722 | |
| 723 | /* void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */ |
| 724 | static jstring |
| 725 | android_glGetObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr) { |
| 726 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 727 | return NULL; |
| 728 | } |
| 729 | |
| 730 | /* void glGetPointerv ( GLenum pname, void **params ) */ |
| 731 | static jlong |
| 732 | android_glGetPointerv(JNIEnv *_env, jobject _this, jint pname) { |
| 733 | jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented"); |
| 734 | return NULL; |
| 735 | } |
| 736 | |
| 737 | /* void glEnablei ( GLenum target, GLuint index ) */ |
| 738 | static void |
| 739 | android_glEnablei__II |
| 740 | (JNIEnv *_env, jobject _this, jint target, jint index) { |
| 741 | glEnablei( |
| 742 | (GLenum)target, |
| 743 | (GLuint)index |
| 744 | ); |
| 745 | } |
| 746 | |
| 747 | /* void glDisablei ( GLenum target, GLuint index ) */ |
| 748 | static void |
| 749 | android_glDisablei__II |
| 750 | (JNIEnv *_env, jobject _this, jint target, jint index) { |
| 751 | glDisablei( |
| 752 | (GLenum)target, |
| 753 | (GLuint)index |
| 754 | ); |
| 755 | } |
| 756 | |
| 757 | /* void glBlendEquationi ( GLuint buf, GLenum mode ) */ |
| 758 | static void |
| 759 | android_glBlendEquationi__II |
| 760 | (JNIEnv *_env, jobject _this, jint buf, jint mode) { |
| 761 | glBlendEquationi( |
| 762 | (GLuint)buf, |
| 763 | (GLenum)mode |
| 764 | ); |
| 765 | } |
| 766 | |
| 767 | /* void glBlendEquationSeparatei ( GLuint buf, GLenum modeRGB, GLenum modeAlpha ) */ |
| 768 | static void |
| 769 | android_glBlendEquationSeparatei__III |
| 770 | (JNIEnv *_env, jobject _this, jint buf, jint modeRGB, jint modeAlpha) { |
| 771 | glBlendEquationSeparatei( |
| 772 | (GLuint)buf, |
| 773 | (GLenum)modeRGB, |
| 774 | (GLenum)modeAlpha |
| 775 | ); |
| 776 | } |
| 777 | |
| 778 | /* void glBlendFunci ( GLuint buf, GLenum src, GLenum dst ) */ |
| 779 | static void |
| 780 | android_glBlendFunci__III |
| 781 | (JNIEnv *_env, jobject _this, jint buf, jint src, jint dst) { |
| 782 | glBlendFunci( |
| 783 | (GLuint)buf, |
| 784 | (GLenum)src, |
| 785 | (GLenum)dst |
| 786 | ); |
| 787 | } |
| 788 | |
| 789 | /* void glBlendFuncSeparatei ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */ |
| 790 | static void |
| 791 | android_glBlendFuncSeparatei__IIIII |
| 792 | (JNIEnv *_env, jobject _this, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { |
| 793 | glBlendFuncSeparatei( |
| 794 | (GLuint)buf, |
| 795 | (GLenum)srcRGB, |
| 796 | (GLenum)dstRGB, |
| 797 | (GLenum)srcAlpha, |
| 798 | (GLenum)dstAlpha |
| 799 | ); |
| 800 | } |
| 801 | |
| 802 | /* void glColorMaski ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) */ |
| 803 | static void |
| 804 | android_glColorMaski__IZZZZ |
| 805 | (JNIEnv *_env, jobject _this, jint index, jboolean r, jboolean g, jboolean b, jboolean a) { |
| 806 | glColorMaski( |
| 807 | (GLuint)index, |
| 808 | (GLboolean)r, |
| 809 | (GLboolean)g, |
| 810 | (GLboolean)b, |
| 811 | (GLboolean)a |
| 812 | ); |
| 813 | } |
| 814 | |
| 815 | /* GLboolean glIsEnabledi ( GLenum target, GLuint index ) */ |
| 816 | static jboolean |
| 817 | android_glIsEnabledi__II |
| 818 | (JNIEnv *_env, jobject _this, jint target, jint index) { |
| 819 | GLboolean _returnValue; |
| 820 | _returnValue = glIsEnabledi( |
| 821 | (GLenum)target, |
| 822 | (GLuint)index |
| 823 | ); |
| 824 | return (jboolean)_returnValue; |
| 825 | } |
| 826 | |
| 827 | /* void glDrawElementsBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */ |
| 828 | static void |
| 829 | android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I |
| 830 | (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint basevertex) { |
| 831 | jint _exception = 0; |
| 832 | const char * _exceptionType = NULL; |
| 833 | const char * _exceptionMessage = NULL; |
| 834 | jarray _array = (jarray) 0; |
| 835 | jint _bufferOffset = (jint) 0; |
| 836 | jint _remaining; |
| 837 | void *indices = (void *) 0; |
| 838 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 839 | if (!indices_buf) { |
| 840 | _exception = 1; |
| 841 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 842 | _exceptionMessage = "indices == null"; |
| 843 | goto exit; |
| 844 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 845 | indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 846 | if (_remaining < count-basevertex) { |
| 847 | _exception = 1; |
| 848 | _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; |
| 849 | _exceptionMessage = "remaining() < count-basevertex < needed"; |
| 850 | goto exit; |
| 851 | } |
| 852 | if (indices == NULL) { |
| 853 | char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); |
| 854 | indices = (void *) (_indicesBase + _bufferOffset); |
| 855 | } |
| 856 | glDrawElementsBaseVertex( |
| 857 | (GLenum)mode, |
| 858 | (GLsizei)count, |
| 859 | (GLenum)type, |
| 860 | (void *)indices, |
| 861 | (GLint)basevertex |
| 862 | ); |
| 863 | |
| 864 | exit: |
| 865 | if (_array) { |
| 866 | releasePointer(_env, _array, indices, JNI_FALSE); |
| 867 | } |
| 868 | if (_exception) { |
| 869 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 870 | } |
| 871 | } |
| 872 | |
| 873 | /* void glDrawRangeElementsBaseVertex ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex ) */ |
| 874 | static void |
| 875 | android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I |
| 876 | (JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf, jint basevertex) { |
| 877 | jint _exception = 0; |
| 878 | const char * _exceptionType = NULL; |
| 879 | const char * _exceptionMessage = NULL; |
| 880 | jarray _array = (jarray) 0; |
| 881 | jint _bufferOffset = (jint) 0; |
| 882 | jint _remaining; |
| 883 | void *indices = (void *) 0; |
| 884 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 885 | if (!indices_buf) { |
| 886 | _exception = 1; |
| 887 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 888 | _exceptionMessage = "indices == null"; |
| 889 | goto exit; |
| 890 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 891 | indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 892 | if (_remaining < count-basevertex) { |
| 893 | _exception = 1; |
| 894 | _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; |
| 895 | _exceptionMessage = "remaining() < count-basevertex < needed"; |
| 896 | goto exit; |
| 897 | } |
| 898 | if (indices == NULL) { |
| 899 | char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); |
| 900 | indices = (void *) (_indicesBase + _bufferOffset); |
| 901 | } |
| 902 | glDrawRangeElementsBaseVertex( |
| 903 | (GLenum)mode, |
| 904 | (GLuint)start, |
| 905 | (GLuint)end, |
| 906 | (GLsizei)count, |
| 907 | (GLenum)type, |
| 908 | (void *)indices, |
| 909 | (GLint)basevertex |
| 910 | ); |
| 911 | |
| 912 | exit: |
| 913 | if (_array) { |
| 914 | releasePointer(_env, _array, indices, JNI_FALSE); |
| 915 | } |
| 916 | if (_exception) { |
| 917 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 918 | } |
| 919 | } |
| 920 | |
| 921 | /* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */ |
| 922 | static void |
| 923 | android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II |
| 924 | (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount, jint basevertex) { |
| 925 | jint _exception = 0; |
| 926 | const char * _exceptionType = NULL; |
| 927 | const char * _exceptionMessage = NULL; |
| 928 | jarray _array = (jarray) 0; |
| 929 | jint _bufferOffset = (jint) 0; |
| 930 | jint _remaining; |
| 931 | void *indices = (void *) 0; |
| 932 | |
| 933 | indices = (void *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset); |
| 934 | if (_remaining < count-basevertex) { |
| 935 | _exception = 1; |
| 936 | _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; |
| 937 | _exceptionMessage = "remaining() < count-basevertex < needed"; |
| 938 | goto exit; |
| 939 | } |
| 940 | if (indices == NULL) { |
| 941 | char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); |
| 942 | indices = (void *) (_indicesBase + _bufferOffset); |
| 943 | } |
| 944 | glDrawElementsInstancedBaseVertex( |
| 945 | (GLenum)mode, |
| 946 | (GLsizei)count, |
| 947 | (GLenum)type, |
| 948 | (void *)indices, |
| 949 | (GLsizei)instanceCount, |
| 950 | (GLint) basevertex |
| 951 | ); |
| 952 | |
| 953 | exit: |
| 954 | if (_array) { |
| 955 | releasePointer(_env, _array, indices, JNI_FALSE); |
| 956 | } |
| 957 | } |
| 958 | |
| 959 | /* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */ |
| 960 | static void |
| 961 | android_glDrawElementsInstancedBaseVertex__IIIIII |
| 962 | (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount, jint basevertex) { |
| 963 | glDrawElementsInstancedBaseVertex( |
| 964 | (GLenum)mode, |
| 965 | (GLsizei)count, |
| 966 | (GLenum)type, |
| 967 | (void *)static_cast<uintptr_t>(indicesOffset), |
| 968 | (GLsizei)instanceCount, |
| 969 | (GLint)basevertex |
| 970 | ); |
| 971 | } |
| 972 | /* void glFramebufferTexture ( GLenum target, GLenum attachment, GLuint texture, GLint level ) */ |
| 973 | static void |
| 974 | android_glFramebufferTexture__IIII |
| 975 | (JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level) { |
| 976 | glFramebufferTexture( |
| 977 | (GLenum)target, |
| 978 | (GLenum)attachment, |
| 979 | (GLuint)texture, |
| 980 | (GLint)level |
| 981 | ); |
| 982 | } |
| 983 | |
| 984 | /* void glPrimitiveBoundingBox ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ) */ |
| 985 | static void |
| 986 | android_glPrimitiveBoundingBox__FFFFFFFF |
| 987 | (JNIEnv *_env, jobject _this, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) { |
| 988 | glPrimitiveBoundingBox( |
| 989 | (GLfloat)minX, |
| 990 | (GLfloat)minY, |
| 991 | (GLfloat)minZ, |
| 992 | (GLfloat)minW, |
| 993 | (GLfloat)maxX, |
| 994 | (GLfloat)maxY, |
| 995 | (GLfloat)maxZ, |
| 996 | (GLfloat)maxW |
| 997 | ); |
| 998 | } |
| 999 | |
| 1000 | /* GLenum glGetGraphicsResetStatus ( void ) */ |
| 1001 | static jint |
| 1002 | android_glGetGraphicsResetStatus__ |
| 1003 | (JNIEnv *_env, jobject _this) { |
| 1004 | GLenum _returnValue; |
| 1005 | _returnValue = glGetGraphicsResetStatus(); |
| 1006 | return (jint)_returnValue; |
| 1007 | } |
| 1008 | |
| 1009 | /* void glReadnPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data ) */ |
| 1010 | static void |
| 1011 | android_glReadnPixels__IIIIIIILjava_nio_Buffer_2 |
| 1012 | (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jobject data_buf) { |
| 1013 | jint _exception = 0; |
| 1014 | const char * _exceptionType = NULL; |
| 1015 | const char * _exceptionMessage = NULL; |
| 1016 | jarray _array = (jarray) 0; |
| 1017 | jint _bufferOffset = (jint) 0; |
| 1018 | jint _remaining; |
| 1019 | void *data = (void *) 0; |
| 1020 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1021 | if (!data_buf) { |
| 1022 | _exception = 1; |
| 1023 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1024 | _exceptionMessage = "data == null"; |
| 1025 | goto exit; |
| 1026 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1027 | data = (void *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1028 | if (_remaining < bufSize) { |
| 1029 | _exception = 1; |
| 1030 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1031 | _exceptionMessage = "remaining() < bufSize < needed"; |
| 1032 | goto exit; |
| 1033 | } |
| 1034 | if (data == NULL) { |
| 1035 | char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); |
| 1036 | data = (void *) (_dataBase + _bufferOffset); |
| 1037 | } |
| 1038 | glReadnPixels( |
| 1039 | (GLint)x, |
| 1040 | (GLint)y, |
| 1041 | (GLsizei)width, |
| 1042 | (GLsizei)height, |
| 1043 | (GLenum)format, |
| 1044 | (GLenum)type, |
| 1045 | (GLsizei)bufSize, |
| 1046 | (void *)data |
| 1047 | ); |
| 1048 | |
| 1049 | exit: |
| 1050 | if (_array) { |
| 1051 | releasePointer(_env, _array, data, _exception ? JNI_FALSE : JNI_TRUE); |
| 1052 | } |
| 1053 | if (_exception) { |
| 1054 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1055 | } |
| 1056 | } |
| 1057 | |
| 1058 | /* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */ |
| 1059 | static void |
| 1060 | android_glGetnUniformfv__III_3FI |
| 1061 | (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jfloatArray params_ref, jint offset) { |
| 1062 | jint _exception = 0; |
| 1063 | const char * _exceptionType = NULL; |
| 1064 | const char * _exceptionMessage = NULL; |
| 1065 | GLfloat *params_base = (GLfloat *) 0; |
| 1066 | jint _remaining; |
| 1067 | GLfloat *params = (GLfloat *) 0; |
| 1068 | |
| 1069 | if (!params_ref) { |
| 1070 | _exception = 1; |
| 1071 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1072 | _exceptionMessage = "params == null"; |
| 1073 | goto exit; |
| 1074 | } |
| 1075 | if (offset < 0) { |
| 1076 | _exception = 1; |
| 1077 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1078 | _exceptionMessage = "offset < 0"; |
| 1079 | goto exit; |
| 1080 | } |
| 1081 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1082 | if (_remaining < bufSize) { |
| 1083 | _exception = 1; |
| 1084 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1085 | _exceptionMessage = "length - offset < bufSize < needed"; |
| 1086 | goto exit; |
| 1087 | } |
| 1088 | params_base = (GLfloat *) |
| 1089 | _env->GetFloatArrayElements(params_ref, (jboolean *)0); |
| 1090 | params = params_base + offset; |
| 1091 | |
| 1092 | glGetnUniformfv( |
| 1093 | (GLuint)program, |
| 1094 | (GLint)location, |
| 1095 | (GLsizei)bufSize, |
| 1096 | (GLfloat *)params |
| 1097 | ); |
| 1098 | |
| 1099 | exit: |
| 1100 | if (params_base) { |
| 1101 | _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base, |
| 1102 | _exception ? JNI_ABORT: 0); |
| 1103 | } |
| 1104 | if (_exception) { |
| 1105 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1106 | } |
| 1107 | } |
| 1108 | |
| 1109 | /* void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ) */ |
| 1110 | static void |
| 1111 | android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2 |
| 1112 | (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) { |
| 1113 | jint _exception = 0; |
| 1114 | const char * _exceptionType = NULL; |
| 1115 | const char * _exceptionMessage = NULL; |
| 1116 | jfloatArray _array = (jfloatArray) 0; |
| 1117 | jint _bufferOffset = (jint) 0; |
| 1118 | jint _remaining; |
| 1119 | GLfloat *params = (GLfloat *) 0; |
| 1120 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1121 | if (!params_buf) { |
| 1122 | _exception = 1; |
| 1123 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1124 | _exceptionMessage = "params == null"; |
| 1125 | goto exit; |
| 1126 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1127 | params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1128 | if (_remaining < bufSize) { |
| 1129 | _exception = 1; |
| 1130 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1131 | _exceptionMessage = "remaining() < bufSize < needed"; |
| 1132 | goto exit; |
| 1133 | } |
| 1134 | if (params == NULL) { |
| 1135 | char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0); |
| 1136 | params = (GLfloat *) (_paramsBase + _bufferOffset); |
| 1137 | } |
| 1138 | glGetnUniformfv( |
| 1139 | (GLuint)program, |
| 1140 | (GLint)location, |
| 1141 | (GLsizei)bufSize, |
| 1142 | (GLfloat *)params |
| 1143 | ); |
| 1144 | |
| 1145 | exit: |
| 1146 | if (_array) { |
| 1147 | _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0); |
| 1148 | } |
| 1149 | if (_exception) { |
| 1150 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1151 | } |
| 1152 | } |
| 1153 | |
| 1154 | /* void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */ |
| 1155 | static void |
| 1156 | android_glGetnUniformiv__III_3II |
| 1157 | (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) { |
| 1158 | jint _exception = 0; |
| 1159 | const char * _exceptionType = NULL; |
| 1160 | const char * _exceptionMessage = NULL; |
| 1161 | GLint *params_base = (GLint *) 0; |
| 1162 | jint _remaining; |
| 1163 | GLint *params = (GLint *) 0; |
| 1164 | |
| 1165 | if (!params_ref) { |
| 1166 | _exception = 1; |
| 1167 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1168 | _exceptionMessage = "params == null"; |
| 1169 | goto exit; |
| 1170 | } |
| 1171 | if (offset < 0) { |
| 1172 | _exception = 1; |
| 1173 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1174 | _exceptionMessage = "offset < 0"; |
| 1175 | goto exit; |
| 1176 | } |
| 1177 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1178 | if (_remaining < bufSize) { |
| 1179 | _exception = 1; |
| 1180 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1181 | _exceptionMessage = "length - offset < bufSize < needed"; |
| 1182 | goto exit; |
| 1183 | } |
| 1184 | params_base = (GLint *) |
| 1185 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1186 | params = params_base + offset; |
| 1187 | |
| 1188 | glGetnUniformiv( |
| 1189 | (GLuint)program, |
| 1190 | (GLint)location, |
| 1191 | (GLsizei)bufSize, |
| 1192 | (GLint *)params |
| 1193 | ); |
| 1194 | |
| 1195 | exit: |
| 1196 | if (params_base) { |
| 1197 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1198 | _exception ? JNI_ABORT: 0); |
| 1199 | } |
| 1200 | if (_exception) { |
| 1201 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1202 | } |
| 1203 | } |
| 1204 | |
| 1205 | /* void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params ) */ |
| 1206 | static void |
| 1207 | android_glGetnUniformiv__IIILjava_nio_IntBuffer_2 |
| 1208 | (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) { |
| 1209 | jint _exception = 0; |
| 1210 | const char * _exceptionType = NULL; |
| 1211 | const char * _exceptionMessage = NULL; |
| 1212 | jintArray _array = (jintArray) 0; |
| 1213 | jint _bufferOffset = (jint) 0; |
| 1214 | jint _remaining; |
| 1215 | GLint *params = (GLint *) 0; |
| 1216 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1217 | if (!params_buf) { |
| 1218 | _exception = 1; |
| 1219 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1220 | _exceptionMessage = "params == null"; |
| 1221 | goto exit; |
| 1222 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1223 | params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1224 | if (_remaining < bufSize) { |
| 1225 | _exception = 1; |
| 1226 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1227 | _exceptionMessage = "remaining() < bufSize < needed"; |
| 1228 | goto exit; |
| 1229 | } |
| 1230 | if (params == NULL) { |
| 1231 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1232 | params = (GLint *) (_paramsBase + _bufferOffset); |
| 1233 | } |
| 1234 | glGetnUniformiv( |
| 1235 | (GLuint)program, |
| 1236 | (GLint)location, |
| 1237 | (GLsizei)bufSize, |
| 1238 | (GLint *)params |
| 1239 | ); |
| 1240 | |
| 1241 | exit: |
| 1242 | if (_array) { |
| 1243 | _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); |
| 1244 | } |
| 1245 | if (_exception) { |
| 1246 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1247 | } |
| 1248 | } |
| 1249 | |
| 1250 | /* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */ |
| 1251 | static void |
| 1252 | android_glGetnUniformuiv__III_3II |
| 1253 | (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jintArray params_ref, jint offset) { |
| 1254 | jint _exception = 0; |
| 1255 | const char * _exceptionType = NULL; |
| 1256 | const char * _exceptionMessage = NULL; |
| 1257 | GLuint *params_base = (GLuint *) 0; |
| 1258 | jint _remaining; |
| 1259 | GLuint *params = (GLuint *) 0; |
| 1260 | |
| 1261 | if (!params_ref) { |
| 1262 | _exception = 1; |
| 1263 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1264 | _exceptionMessage = "params == null"; |
| 1265 | goto exit; |
| 1266 | } |
| 1267 | if (offset < 0) { |
| 1268 | _exception = 1; |
| 1269 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1270 | _exceptionMessage = "offset < 0"; |
| 1271 | goto exit; |
| 1272 | } |
| 1273 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1274 | if (_remaining < bufSize) { |
| 1275 | _exception = 1; |
| 1276 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1277 | _exceptionMessage = "length - offset < bufSize < needed"; |
| 1278 | goto exit; |
| 1279 | } |
| 1280 | params_base = (GLuint *) |
| 1281 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1282 | params = params_base + offset; |
| 1283 | |
| 1284 | glGetnUniformuiv( |
| 1285 | (GLuint)program, |
| 1286 | (GLint)location, |
| 1287 | (GLsizei)bufSize, |
| 1288 | (GLuint *)params |
| 1289 | ); |
| 1290 | |
| 1291 | exit: |
| 1292 | if (params_base) { |
| 1293 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1294 | _exception ? JNI_ABORT: 0); |
| 1295 | } |
| 1296 | if (_exception) { |
| 1297 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1298 | } |
| 1299 | } |
| 1300 | |
| 1301 | /* void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params ) */ |
| 1302 | static void |
| 1303 | android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2 |
| 1304 | (JNIEnv *_env, jobject _this, jint program, jint location, jint bufSize, jobject params_buf) { |
| 1305 | jint _exception = 0; |
| 1306 | const char * _exceptionType = NULL; |
| 1307 | const char * _exceptionMessage = NULL; |
| 1308 | jintArray _array = (jintArray) 0; |
| 1309 | jint _bufferOffset = (jint) 0; |
| 1310 | jint _remaining; |
| 1311 | GLuint *params = (GLuint *) 0; |
| 1312 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1313 | if (!params_buf) { |
| 1314 | _exception = 1; |
| 1315 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1316 | _exceptionMessage = "params == null"; |
| 1317 | goto exit; |
| 1318 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1319 | params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1320 | if (_remaining < bufSize) { |
| 1321 | _exception = 1; |
| 1322 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1323 | _exceptionMessage = "remaining() < bufSize < needed"; |
| 1324 | goto exit; |
| 1325 | } |
| 1326 | if (params == NULL) { |
| 1327 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1328 | params = (GLuint *) (_paramsBase + _bufferOffset); |
| 1329 | } |
| 1330 | glGetnUniformuiv( |
| 1331 | (GLuint)program, |
| 1332 | (GLint)location, |
| 1333 | (GLsizei)bufSize, |
| 1334 | (GLuint *)params |
| 1335 | ); |
| 1336 | |
| 1337 | exit: |
| 1338 | if (_array) { |
| 1339 | _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); |
| 1340 | } |
| 1341 | if (_exception) { |
| 1342 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1343 | } |
| 1344 | } |
| 1345 | |
| 1346 | /* void glMinSampleShading ( GLfloat value ) */ |
| 1347 | static void |
| 1348 | android_glMinSampleShading__F |
| 1349 | (JNIEnv *_env, jobject _this, jfloat value) { |
| 1350 | glMinSampleShading( |
| 1351 | (GLfloat)value |
| 1352 | ); |
| 1353 | } |
| 1354 | |
| 1355 | /* void glPatchParameteri ( GLenum pname, GLint value ) */ |
| 1356 | static void |
| 1357 | android_glPatchParameteri__II |
| 1358 | (JNIEnv *_env, jobject _this, jint pname, jint value) { |
| 1359 | glPatchParameteri( |
| 1360 | (GLenum)pname, |
| 1361 | (GLint)value |
| 1362 | ); |
| 1363 | } |
| 1364 | |
| 1365 | /* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */ |
| 1366 | static void |
| 1367 | android_glTexParameterIiv__II_3II |
| 1368 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 1369 | jint _exception = 0; |
| 1370 | const char * _exceptionType = NULL; |
| 1371 | const char * _exceptionMessage = NULL; |
| 1372 | GLint *params_base = (GLint *) 0; |
| 1373 | jint _remaining; |
| 1374 | GLint *params = (GLint *) 0; |
| 1375 | |
| 1376 | if (!params_ref) { |
| 1377 | _exception = 1; |
| 1378 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1379 | _exceptionMessage = "params == null"; |
| 1380 | goto exit; |
| 1381 | } |
| 1382 | if (offset < 0) { |
| 1383 | _exception = 1; |
| 1384 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1385 | _exceptionMessage = "offset < 0"; |
| 1386 | goto exit; |
| 1387 | } |
| 1388 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1389 | params_base = (GLint *) |
| 1390 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1391 | params = params_base + offset; |
| 1392 | |
| 1393 | glTexParameterIiv( |
| 1394 | (GLenum)target, |
| 1395 | (GLenum)pname, |
| 1396 | (GLint *)params |
| 1397 | ); |
| 1398 | |
| 1399 | exit: |
| 1400 | if (params_base) { |
| 1401 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1402 | JNI_ABORT); |
| 1403 | } |
| 1404 | if (_exception) { |
| 1405 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1406 | } |
| 1407 | } |
| 1408 | |
| 1409 | /* void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params ) */ |
| 1410 | static void |
| 1411 | android_glTexParameterIiv__IILjava_nio_IntBuffer_2 |
| 1412 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1413 | jint _exception = 0; |
| 1414 | const char * _exceptionType = NULL; |
| 1415 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1416 | jintArray _array = (jintArray) 0; |
| 1417 | jint _bufferOffset = (jint) 0; |
| 1418 | jint _remaining; |
| 1419 | GLint *params = (GLint *) 0; |
| 1420 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1421 | if (!params_buf) { |
| 1422 | _exception = 1; |
| 1423 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1424 | _exceptionMessage = "params == null"; |
| 1425 | goto exit; |
| 1426 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1427 | params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1428 | if (params == NULL) { |
| 1429 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1430 | params = (GLint *) (_paramsBase + _bufferOffset); |
| 1431 | } |
| 1432 | glTexParameterIiv( |
| 1433 | (GLenum)target, |
| 1434 | (GLenum)pname, |
| 1435 | (GLint *)params |
| 1436 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1437 | |
| 1438 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1439 | if (_array) { |
| 1440 | _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); |
| 1441 | } |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1442 | if (_exception) { |
| 1443 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1444 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1445 | } |
| 1446 | |
| 1447 | /* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */ |
| 1448 | static void |
| 1449 | android_glTexParameterIuiv__II_3II |
| 1450 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 1451 | jint _exception = 0; |
| 1452 | const char * _exceptionType = NULL; |
| 1453 | const char * _exceptionMessage = NULL; |
| 1454 | GLuint *params_base = (GLuint *) 0; |
| 1455 | jint _remaining; |
| 1456 | GLuint *params = (GLuint *) 0; |
| 1457 | |
| 1458 | if (!params_ref) { |
| 1459 | _exception = 1; |
| 1460 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1461 | _exceptionMessage = "params == null"; |
| 1462 | goto exit; |
| 1463 | } |
| 1464 | if (offset < 0) { |
| 1465 | _exception = 1; |
| 1466 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1467 | _exceptionMessage = "offset < 0"; |
| 1468 | goto exit; |
| 1469 | } |
| 1470 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1471 | params_base = (GLuint *) |
| 1472 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1473 | params = params_base + offset; |
| 1474 | |
| 1475 | glTexParameterIuiv( |
| 1476 | (GLenum)target, |
| 1477 | (GLenum)pname, |
| 1478 | (GLuint *)params |
| 1479 | ); |
| 1480 | |
| 1481 | exit: |
| 1482 | if (params_base) { |
| 1483 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1484 | JNI_ABORT); |
| 1485 | } |
| 1486 | if (_exception) { |
| 1487 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1488 | } |
| 1489 | } |
| 1490 | |
| 1491 | /* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */ |
| 1492 | static void |
| 1493 | android_glTexParameterIuiv__IILjava_nio_IntBuffer_2 |
| 1494 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1495 | jint _exception = 0; |
| 1496 | const char * _exceptionType = NULL; |
| 1497 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1498 | jintArray _array = (jintArray) 0; |
| 1499 | jint _bufferOffset = (jint) 0; |
| 1500 | jint _remaining; |
| 1501 | GLuint *params = (GLuint *) 0; |
| 1502 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1503 | if (!params_buf) { |
| 1504 | _exception = 1; |
| 1505 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1506 | _exceptionMessage = "params == null"; |
| 1507 | goto exit; |
| 1508 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1509 | params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1510 | if (params == NULL) { |
| 1511 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1512 | params = (GLuint *) (_paramsBase + _bufferOffset); |
| 1513 | } |
| 1514 | glTexParameterIuiv( |
| 1515 | (GLenum)target, |
| 1516 | (GLenum)pname, |
| 1517 | (GLuint *)params |
| 1518 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1519 | |
| 1520 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1521 | if (_array) { |
| 1522 | _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT); |
| 1523 | } |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1524 | if (_exception) { |
| 1525 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1526 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1527 | } |
| 1528 | |
| 1529 | /* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */ |
| 1530 | static void |
| 1531 | android_glGetTexParameterIiv__II_3II |
| 1532 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 1533 | jint _exception = 0; |
| 1534 | const char * _exceptionType = NULL; |
| 1535 | const char * _exceptionMessage = NULL; |
| 1536 | GLint *params_base = (GLint *) 0; |
| 1537 | jint _remaining; |
| 1538 | GLint *params = (GLint *) 0; |
| 1539 | |
| 1540 | if (!params_ref) { |
| 1541 | _exception = 1; |
| 1542 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1543 | _exceptionMessage = "params == null"; |
| 1544 | goto exit; |
| 1545 | } |
| 1546 | if (offset < 0) { |
| 1547 | _exception = 1; |
| 1548 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1549 | _exceptionMessage = "offset < 0"; |
| 1550 | goto exit; |
| 1551 | } |
| 1552 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1553 | params_base = (GLint *) |
| 1554 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1555 | params = params_base + offset; |
| 1556 | |
| 1557 | glGetTexParameterIiv( |
| 1558 | (GLenum)target, |
| 1559 | (GLenum)pname, |
| 1560 | (GLint *)params |
| 1561 | ); |
| 1562 | |
| 1563 | exit: |
| 1564 | if (params_base) { |
| 1565 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1566 | _exception ? JNI_ABORT: 0); |
| 1567 | } |
| 1568 | if (_exception) { |
| 1569 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1570 | } |
| 1571 | } |
| 1572 | |
| 1573 | /* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */ |
| 1574 | static void |
| 1575 | android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2 |
| 1576 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1577 | jint _exception = 0; |
| 1578 | const char * _exceptionType = NULL; |
| 1579 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1580 | jintArray _array = (jintArray) 0; |
| 1581 | jint _bufferOffset = (jint) 0; |
| 1582 | jint _remaining; |
| 1583 | GLint *params = (GLint *) 0; |
| 1584 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1585 | if (!params_buf) { |
| 1586 | _exception = 1; |
| 1587 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1588 | _exceptionMessage = "params == null"; |
| 1589 | goto exit; |
| 1590 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1591 | params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1592 | if (params == NULL) { |
| 1593 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1594 | params = (GLint *) (_paramsBase + _bufferOffset); |
| 1595 | } |
| 1596 | glGetTexParameterIiv( |
| 1597 | (GLenum)target, |
| 1598 | (GLenum)pname, |
| 1599 | (GLint *)params |
| 1600 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1601 | |
| 1602 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1603 | if (_array) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1604 | _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); |
| 1605 | } |
| 1606 | if (_exception) { |
| 1607 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1608 | } |
| 1609 | } |
| 1610 | |
| 1611 | /* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */ |
| 1612 | static void |
| 1613 | android_glGetTexParameterIuiv__II_3II |
| 1614 | (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { |
| 1615 | jint _exception = 0; |
| 1616 | const char * _exceptionType = NULL; |
| 1617 | const char * _exceptionMessage = NULL; |
| 1618 | GLuint *params_base = (GLuint *) 0; |
| 1619 | jint _remaining; |
| 1620 | GLuint *params = (GLuint *) 0; |
| 1621 | |
| 1622 | if (!params_ref) { |
| 1623 | _exception = 1; |
| 1624 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1625 | _exceptionMessage = "params == null"; |
| 1626 | goto exit; |
| 1627 | } |
| 1628 | if (offset < 0) { |
| 1629 | _exception = 1; |
| 1630 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1631 | _exceptionMessage = "offset < 0"; |
| 1632 | goto exit; |
| 1633 | } |
| 1634 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1635 | params_base = (GLuint *) |
| 1636 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1637 | params = params_base + offset; |
| 1638 | |
| 1639 | glGetTexParameterIuiv( |
| 1640 | (GLenum)target, |
| 1641 | (GLenum)pname, |
| 1642 | (GLuint *)params |
| 1643 | ); |
| 1644 | |
| 1645 | exit: |
| 1646 | if (params_base) { |
| 1647 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1648 | _exception ? JNI_ABORT: 0); |
| 1649 | } |
| 1650 | if (_exception) { |
| 1651 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1652 | } |
| 1653 | } |
| 1654 | |
| 1655 | /* void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params ) */ |
| 1656 | static void |
| 1657 | android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2 |
| 1658 | (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1659 | jint _exception = 0; |
| 1660 | const char * _exceptionType = NULL; |
| 1661 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1662 | jintArray _array = (jintArray) 0; |
| 1663 | jint _bufferOffset = (jint) 0; |
| 1664 | jint _remaining; |
| 1665 | GLuint *params = (GLuint *) 0; |
| 1666 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1667 | if (!params_buf) { |
| 1668 | _exception = 1; |
| 1669 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1670 | _exceptionMessage = "params == null"; |
| 1671 | goto exit; |
| 1672 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1673 | params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1674 | if (params == NULL) { |
| 1675 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1676 | params = (GLuint *) (_paramsBase + _bufferOffset); |
| 1677 | } |
| 1678 | glGetTexParameterIuiv( |
| 1679 | (GLenum)target, |
| 1680 | (GLenum)pname, |
| 1681 | (GLuint *)params |
| 1682 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1683 | |
| 1684 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1685 | if (_array) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1686 | _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); |
| 1687 | } |
| 1688 | if (_exception) { |
| 1689 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1690 | } |
| 1691 | } |
| 1692 | |
| 1693 | /* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */ |
| 1694 | static void |
| 1695 | android_glSamplerParameterIiv__II_3II |
| 1696 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) { |
| 1697 | jint _exception = 0; |
| 1698 | const char * _exceptionType = NULL; |
| 1699 | const char * _exceptionMessage = NULL; |
| 1700 | GLint *param_base = (GLint *) 0; |
| 1701 | jint _remaining; |
| 1702 | GLint *param = (GLint *) 0; |
| 1703 | |
| 1704 | if (!param_ref) { |
| 1705 | _exception = 1; |
| 1706 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1707 | _exceptionMessage = "param == null"; |
| 1708 | goto exit; |
| 1709 | } |
| 1710 | if (offset < 0) { |
| 1711 | _exception = 1; |
| 1712 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1713 | _exceptionMessage = "offset < 0"; |
| 1714 | goto exit; |
| 1715 | } |
| 1716 | _remaining = _env->GetArrayLength(param_ref) - offset; |
| 1717 | param_base = (GLint *) |
| 1718 | _env->GetIntArrayElements(param_ref, (jboolean *)0); |
| 1719 | param = param_base + offset; |
| 1720 | |
| 1721 | glSamplerParameterIiv( |
| 1722 | (GLuint)sampler, |
| 1723 | (GLenum)pname, |
| 1724 | (GLint *)param |
| 1725 | ); |
| 1726 | |
| 1727 | exit: |
| 1728 | if (param_base) { |
| 1729 | _env->ReleaseIntArrayElements(param_ref, (jint*)param_base, |
| 1730 | JNI_ABORT); |
| 1731 | } |
| 1732 | if (_exception) { |
| 1733 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1734 | } |
| 1735 | } |
| 1736 | |
| 1737 | /* void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param ) */ |
| 1738 | static void |
| 1739 | android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2 |
| 1740 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1741 | jint _exception = 0; |
| 1742 | const char * _exceptionType = NULL; |
| 1743 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1744 | jintArray _array = (jintArray) 0; |
| 1745 | jint _bufferOffset = (jint) 0; |
| 1746 | jint _remaining; |
| 1747 | GLint *param = (GLint *) 0; |
| 1748 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1749 | if (!param_buf) { |
| 1750 | _exception = 1; |
| 1751 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1752 | _exceptionMessage = "param == null"; |
| 1753 | goto exit; |
| 1754 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1755 | param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1756 | if (param == NULL) { |
| 1757 | char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1758 | param = (GLint *) (_paramBase + _bufferOffset); |
| 1759 | } |
| 1760 | glSamplerParameterIiv( |
| 1761 | (GLuint)sampler, |
| 1762 | (GLenum)pname, |
| 1763 | (GLint *)param |
| 1764 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1765 | |
| 1766 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1767 | if (_array) { |
| 1768 | _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT); |
| 1769 | } |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1770 | if (_exception) { |
| 1771 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1772 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1773 | } |
| 1774 | |
| 1775 | /* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */ |
| 1776 | static void |
| 1777 | android_glSamplerParameterIuiv__II_3II |
| 1778 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray param_ref, jint offset) { |
| 1779 | jint _exception = 0; |
| 1780 | const char * _exceptionType = NULL; |
| 1781 | const char * _exceptionMessage = NULL; |
| 1782 | GLuint *param_base = (GLuint *) 0; |
| 1783 | jint _remaining; |
| 1784 | GLuint *param = (GLuint *) 0; |
| 1785 | |
| 1786 | if (!param_ref) { |
| 1787 | _exception = 1; |
| 1788 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1789 | _exceptionMessage = "param == null"; |
| 1790 | goto exit; |
| 1791 | } |
| 1792 | if (offset < 0) { |
| 1793 | _exception = 1; |
| 1794 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1795 | _exceptionMessage = "offset < 0"; |
| 1796 | goto exit; |
| 1797 | } |
| 1798 | _remaining = _env->GetArrayLength(param_ref) - offset; |
| 1799 | param_base = (GLuint *) |
| 1800 | _env->GetIntArrayElements(param_ref, (jboolean *)0); |
| 1801 | param = param_base + offset; |
| 1802 | |
| 1803 | glSamplerParameterIuiv( |
| 1804 | (GLuint)sampler, |
| 1805 | (GLenum)pname, |
| 1806 | (GLuint *)param |
| 1807 | ); |
| 1808 | |
| 1809 | exit: |
| 1810 | if (param_base) { |
| 1811 | _env->ReleaseIntArrayElements(param_ref, (jint*)param_base, |
| 1812 | JNI_ABORT); |
| 1813 | } |
| 1814 | if (_exception) { |
| 1815 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1816 | } |
| 1817 | } |
| 1818 | |
| 1819 | /* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */ |
| 1820 | static void |
| 1821 | android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2 |
| 1822 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1823 | jint _exception = 0; |
| 1824 | const char * _exceptionType = NULL; |
| 1825 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1826 | jintArray _array = (jintArray) 0; |
| 1827 | jint _bufferOffset = (jint) 0; |
| 1828 | jint _remaining; |
| 1829 | GLuint *param = (GLuint *) 0; |
| 1830 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1831 | if (!param_buf) { |
| 1832 | _exception = 1; |
| 1833 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1834 | _exceptionMessage = "param == null"; |
| 1835 | goto exit; |
| 1836 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1837 | param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1838 | if (param == NULL) { |
| 1839 | char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1840 | param = (GLuint *) (_paramBase + _bufferOffset); |
| 1841 | } |
| 1842 | glSamplerParameterIuiv( |
| 1843 | (GLuint)sampler, |
| 1844 | (GLenum)pname, |
| 1845 | (GLuint *)param |
| 1846 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1847 | |
| 1848 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1849 | if (_array) { |
| 1850 | _env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT); |
| 1851 | } |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1852 | if (_exception) { |
| 1853 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1854 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1855 | } |
| 1856 | |
| 1857 | /* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */ |
| 1858 | static void |
| 1859 | android_glGetSamplerParameterIiv__II_3II |
| 1860 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) { |
| 1861 | jint _exception = 0; |
| 1862 | const char * _exceptionType = NULL; |
| 1863 | const char * _exceptionMessage = NULL; |
| 1864 | GLint *params_base = (GLint *) 0; |
| 1865 | jint _remaining; |
| 1866 | GLint *params = (GLint *) 0; |
| 1867 | |
| 1868 | if (!params_ref) { |
| 1869 | _exception = 1; |
| 1870 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1871 | _exceptionMessage = "params == null"; |
| 1872 | goto exit; |
| 1873 | } |
| 1874 | if (offset < 0) { |
| 1875 | _exception = 1; |
| 1876 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1877 | _exceptionMessage = "offset < 0"; |
| 1878 | goto exit; |
| 1879 | } |
| 1880 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1881 | params_base = (GLint *) |
| 1882 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1883 | params = params_base + offset; |
| 1884 | |
| 1885 | glGetSamplerParameterIiv( |
| 1886 | (GLuint)sampler, |
| 1887 | (GLenum)pname, |
| 1888 | (GLint *)params |
| 1889 | ); |
| 1890 | |
| 1891 | exit: |
| 1892 | if (params_base) { |
| 1893 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1894 | _exception ? JNI_ABORT: 0); |
| 1895 | } |
| 1896 | if (_exception) { |
| 1897 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1898 | } |
| 1899 | } |
| 1900 | |
| 1901 | /* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */ |
| 1902 | static void |
| 1903 | android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2 |
| 1904 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1905 | jint _exception = 0; |
| 1906 | const char * _exceptionType = NULL; |
| 1907 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1908 | jintArray _array = (jintArray) 0; |
| 1909 | jint _bufferOffset = (jint) 0; |
| 1910 | jint _remaining; |
| 1911 | GLint *params = (GLint *) 0; |
| 1912 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1913 | if (!params_buf) { |
| 1914 | _exception = 1; |
| 1915 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1916 | _exceptionMessage = "params == null"; |
| 1917 | goto exit; |
| 1918 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1919 | params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 1920 | if (params == NULL) { |
| 1921 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 1922 | params = (GLint *) (_paramsBase + _bufferOffset); |
| 1923 | } |
| 1924 | glGetSamplerParameterIiv( |
| 1925 | (GLuint)sampler, |
| 1926 | (GLenum)pname, |
| 1927 | (GLint *)params |
| 1928 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1929 | |
| 1930 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1931 | if (_array) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1932 | _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); |
| 1933 | } |
| 1934 | if (_exception) { |
| 1935 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1936 | } |
| 1937 | } |
| 1938 | |
| 1939 | /* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */ |
| 1940 | static void |
| 1941 | android_glGetSamplerParameterIuiv__II_3II |
| 1942 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jintArray params_ref, jint offset) { |
| 1943 | jint _exception = 0; |
| 1944 | const char * _exceptionType = NULL; |
| 1945 | const char * _exceptionMessage = NULL; |
| 1946 | GLuint *params_base = (GLuint *) 0; |
| 1947 | jint _remaining; |
| 1948 | GLuint *params = (GLuint *) 0; |
| 1949 | |
| 1950 | if (!params_ref) { |
| 1951 | _exception = 1; |
| 1952 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1953 | _exceptionMessage = "params == null"; |
| 1954 | goto exit; |
| 1955 | } |
| 1956 | if (offset < 0) { |
| 1957 | _exception = 1; |
| 1958 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1959 | _exceptionMessage = "offset < 0"; |
| 1960 | goto exit; |
| 1961 | } |
| 1962 | _remaining = _env->GetArrayLength(params_ref) - offset; |
| 1963 | params_base = (GLuint *) |
| 1964 | _env->GetIntArrayElements(params_ref, (jboolean *)0); |
| 1965 | params = params_base + offset; |
| 1966 | |
| 1967 | glGetSamplerParameterIuiv( |
| 1968 | (GLuint)sampler, |
| 1969 | (GLenum)pname, |
| 1970 | (GLuint *)params |
| 1971 | ); |
| 1972 | |
| 1973 | exit: |
| 1974 | if (params_base) { |
| 1975 | _env->ReleaseIntArrayElements(params_ref, (jint*)params_base, |
| 1976 | _exception ? JNI_ABORT: 0); |
| 1977 | } |
| 1978 | if (_exception) { |
| 1979 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
| 1980 | } |
| 1981 | } |
| 1982 | |
| 1983 | /* void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params ) */ |
| 1984 | static void |
| 1985 | android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2 |
| 1986 | (JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1987 | jint _exception = 0; |
| 1988 | const char * _exceptionType = NULL; |
| 1989 | const char * _exceptionMessage = NULL; |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 1990 | jintArray _array = (jintArray) 0; |
| 1991 | jint _bufferOffset = (jint) 0; |
| 1992 | jint _remaining; |
| 1993 | GLuint *params = (GLuint *) 0; |
| 1994 | |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 1995 | if (!params_buf) { |
| 1996 | _exception = 1; |
| 1997 | _exceptionType = "java/lang/IllegalArgumentException"; |
| 1998 | _exceptionMessage = "params == null"; |
| 1999 | goto exit; |
| 2000 | } |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 2001 | params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset); |
| 2002 | if (params == NULL) { |
| 2003 | char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0); |
| 2004 | params = (GLuint *) (_paramsBase + _bufferOffset); |
| 2005 | } |
| 2006 | glGetSamplerParameterIuiv( |
| 2007 | (GLuint)sampler, |
| 2008 | (GLenum)pname, |
| 2009 | (GLuint *)params |
| 2010 | ); |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 2011 | |
| 2012 | exit: |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 2013 | if (_array) { |
Romain Guy | 84cac20 | 2016-12-05 12:26:02 -0800 | [diff] [blame] | 2014 | _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0); |
| 2015 | } |
| 2016 | if (_exception) { |
| 2017 | jniThrowException(_env, _exceptionType, _exceptionMessage); |
Pablo Ceballos | 38c1a7e | 2015-10-30 10:34:30 -0700 | [diff] [blame] | 2018 | } |
| 2019 | } |
| 2020 | |
| 2021 | /* void glTexBuffer ( GLenum target, GLenum internalformat, GLuint buffer ) */ |
| 2022 | static void |
| 2023 | android_glTexBuffer__III |
| 2024 | (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer) { |
| 2025 | glTexBuffer( |
| 2026 | (GLenum)target, |
| 2027 | (GLenum)internalformat, |
| 2028 | (GLuint)buffer |
| 2029 | ); |
| 2030 | } |
| 2031 | |
| 2032 | /* void glTexBufferRange ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size ) */ |
| 2033 | static void |
| 2034 | android_glTexBufferRange__IIIII |
| 2035 | (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint buffer, jint offset, jint size) { |
| 2036 | glTexBufferRange( |
| 2037 | (GLenum)target, |
| 2038 | (GLenum)internalformat, |
| 2039 | (GLuint)buffer, |
| 2040 | (GLintptr)offset, |
| 2041 | (GLsizeiptr)size |
| 2042 | ); |
| 2043 | } |
| 2044 | |
| 2045 | /* void glTexStorage3DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations ) */ |
| 2046 | static void |
| 2047 | android_glTexStorage3DMultisample__IIIIIIZ |
| 2048 | (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) { |
| 2049 | glTexStorage3DMultisample( |
| 2050 | (GLenum)target, |
| 2051 | (GLsizei)samples, |
| 2052 | (GLenum)internalformat, |
| 2053 | (GLsizei)width, |
| 2054 | (GLsizei)height, |
| 2055 | (GLsizei)depth, |
| 2056 | (GLboolean)fixedsamplelocations |
| 2057 | ); |
| 2058 | } |
| 2059 | |
| 2060 | static const char *classPathName = "android/opengl/GLES32"; |
| 2061 | |
| 2062 | static const JNINativeMethod methods[] = { |
| 2063 | {"_nativeClassInit", "()V", (void*)nativeClassInit }, |
| 2064 | {"glBlendBarrier", "()V", (void *) android_glBlendBarrier__ }, |
| 2065 | {"glCopyImageSubData", "(IIIIIIIIIIIIIII)V", (void *) android_glCopyImageSubData__IIIIIIIIIIIIIII }, |
| 2066 | {"glDebugMessageControl", "(IIII[IIZ)V", (void *) android_glDebugMessageControl__IIII_3IIZ }, |
| 2067 | {"glDebugMessageControl", "(IIIILjava/nio/IntBuffer;Z)V", (void *) android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z }, |
| 2068 | {"glDebugMessageInsert", "(IIIIILjava/lang/String;)V", (void *) android_glDebugMessageInsert__IIIIILjava_lang_String_2 }, |
| 2069 | {"glDebugMessageCallback", "(Landroid/opengl/GLES32$DebugProc;)V", (void *) android_glDebugMessageCallback }, |
| 2070 | {"glGetDebugMessageLog", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI }, |
| 2071 | {"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)I", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 }, |
| 2072 | {"glGetDebugMessageLog", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__I_3II_3II_3II_3II }, |
| 2073 | {"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 }, |
| 2074 | {"glPushDebugGroup", "(IIILjava/lang/String;)V", (void *) android_glPushDebugGroup__IIILjava_lang_String_2 }, |
| 2075 | {"glPopDebugGroup", "()V", (void *) android_glPopDebugGroup__ }, |
| 2076 | {"glObjectLabel", "(IIILjava/lang/String;)V", (void *) android_glObjectLabel__IIILjava_lang_String_2 }, |
| 2077 | {"glGetObjectLabel", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabel }, |
| 2078 | {"glObjectPtrLabel", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabel }, |
| 2079 | {"glGetObjectPtrLabel", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabel }, |
| 2080 | {"glGetPointerv", "(I)J", (void *) android_glGetPointerv }, |
| 2081 | {"glEnablei", "(II)V", (void *) android_glEnablei__II }, |
| 2082 | {"glDisablei", "(II)V", (void *) android_glDisablei__II }, |
| 2083 | {"glBlendEquationi", "(II)V", (void *) android_glBlendEquationi__II }, |
| 2084 | {"glBlendEquationSeparatei", "(III)V", (void *) android_glBlendEquationSeparatei__III }, |
| 2085 | {"glBlendFunci", "(III)V", (void *) android_glBlendFunci__III }, |
| 2086 | {"glBlendFuncSeparatei", "(IIIII)V", (void *) android_glBlendFuncSeparatei__IIIII }, |
| 2087 | {"glColorMaski", "(IZZZZ)V", (void *) android_glColorMaski__IZZZZ }, |
| 2088 | {"glIsEnabledi", "(II)Z", (void *) android_glIsEnabledi__II }, |
| 2089 | {"glDrawElementsBaseVertex", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I }, |
| 2090 | {"glDrawRangeElementsBaseVertex", "(IIIIILjava/nio/Buffer;I)V", (void *) android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I }, |
| 2091 | {"glDrawElementsInstancedBaseVertex", "(IIILjava/nio/Buffer;II)V", (void *) android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II }, |
| 2092 | {"glDrawElementsInstancedBaseVertex", "(IIIIII)V", (void *) android_glDrawElementsInstancedBaseVertex__IIIIII }, |
| 2093 | {"glFramebufferTexture", "(IIII)V", (void *) android_glFramebufferTexture__IIII }, |
| 2094 | {"glPrimitiveBoundingBox", "(FFFFFFFF)V", (void *) android_glPrimitiveBoundingBox__FFFFFFFF }, |
| 2095 | {"glGetGraphicsResetStatus", "()I", (void *) android_glGetGraphicsResetStatus__ }, |
| 2096 | {"glReadnPixels", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glReadnPixels__IIIIIIILjava_nio_Buffer_2 }, |
| 2097 | {"glGetnUniformfv", "(III[FI)V", (void *) android_glGetnUniformfv__III_3FI }, |
| 2098 | {"glGetnUniformfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2 }, |
| 2099 | {"glGetnUniformiv", "(III[II)V", (void *) android_glGetnUniformiv__III_3II }, |
| 2100 | {"glGetnUniformiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformiv__IIILjava_nio_IntBuffer_2 }, |
| 2101 | {"glGetnUniformuiv", "(III[II)V", (void *) android_glGetnUniformuiv__III_3II }, |
| 2102 | {"glGetnUniformuiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2 }, |
| 2103 | {"glMinSampleShading", "(F)V", (void *) android_glMinSampleShading__F }, |
| 2104 | {"glPatchParameteri", "(II)V", (void *) android_glPatchParameteri__II }, |
| 2105 | {"glTexParameterIiv", "(II[II)V", (void *) android_glTexParameterIiv__II_3II }, |
| 2106 | {"glTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIiv__IILjava_nio_IntBuffer_2 }, |
| 2107 | {"glTexParameterIuiv", "(II[II)V", (void *) android_glTexParameterIuiv__II_3II }, |
| 2108 | {"glTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameterIuiv__IILjava_nio_IntBuffer_2 }, |
| 2109 | {"glGetTexParameterIiv", "(II[II)V", (void *) android_glGetTexParameterIiv__II_3II }, |
| 2110 | {"glGetTexParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2 }, |
| 2111 | {"glGetTexParameterIuiv", "(II[II)V", (void *) android_glGetTexParameterIuiv__II_3II }, |
| 2112 | {"glGetTexParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2 }, |
| 2113 | {"glSamplerParameterIiv", "(II[II)V", (void *) android_glSamplerParameterIiv__II_3II }, |
| 2114 | {"glSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2 }, |
| 2115 | {"glSamplerParameterIuiv", "(II[II)V", (void *) android_glSamplerParameterIuiv__II_3II }, |
| 2116 | {"glSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2 }, |
| 2117 | {"glGetSamplerParameterIiv", "(II[II)V", (void *) android_glGetSamplerParameterIiv__II_3II }, |
| 2118 | {"glGetSamplerParameterIiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2 }, |
| 2119 | {"glGetSamplerParameterIuiv", "(II[II)V", (void *) android_glGetSamplerParameterIuiv__II_3II }, |
| 2120 | {"glGetSamplerParameterIuiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2 }, |
| 2121 | {"glTexBuffer", "(III)V", (void *) android_glTexBuffer__III }, |
| 2122 | {"glTexBufferRange", "(IIIII)V", (void *) android_glTexBufferRange__IIIII }, |
| 2123 | {"glTexStorage3DMultisample", "(IIIIIIZ)V", (void *) android_glTexStorage3DMultisample__IIIIIIZ }, |
| 2124 | }; |
| 2125 | |
| 2126 | int register_android_opengl_jni_GLES32(JNIEnv *_env) |
| 2127 | { |
| 2128 | int err; |
| 2129 | err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods)); |
| 2130 | return err; |
| 2131 | } |