blob: 5751add0bdead88bedea34592a28851d923336bc [file] [log] [blame]
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001/*
2 * Copyright 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// This source file is automatically generated
18
Andreas Gampebfe63332014-11-12 14:12:45 -080019#pragma GCC diagnostic ignored "-Wunused-variable"
20#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
21#pragma GCC diagnostic ignored "-Wunused-function"
22
Jesse Hall7ab63ac2014-05-19 15:13:41 -070023#include <stdint.h>
24#include <GLES3/gl31.h>
Jesse Hall9626f822014-05-19 20:57:49 -070025#include <jni.h>
26#include <JNIHelp.h>
Jesse Hall7ab63ac2014-05-19 15:13:41 -070027#include <android_runtime/AndroidRuntime.h>
28#include <utils/misc.h>
29#include <assert.h>
30
31static int initialized = 0;
32
33static jclass nioAccessClass;
34static jclass bufferClass;
35static jmethodID getBasePointerID;
36static jmethodID getBaseArrayID;
37static jmethodID getBaseArrayOffsetID;
38static jfieldID positionID;
39static jfieldID limitID;
40static jfieldID elementSizeShiftID;
41
42
43/* special calls implemented in Android's GLES wrapper used to more
44 * efficiently bound-check passed arrays */
45extern "C" {
46#ifdef GL_VERSION_ES_CM_1_1
47GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
48 const GLvoid *ptr, GLsizei count);
49GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
50 const GLvoid *pointer, GLsizei count);
51GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
52 GLsizei stride, const GLvoid *pointer, GLsizei count);
53GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
61#endif
62#ifdef GL_ES_VERSION_2_0
63static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
64 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
65 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
66}
67#endif
68#ifdef GL_ES_VERSION_3_0
69static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
70 GLsizei stride, const GLvoid *pointer, GLsizei count) {
71 glVertexAttribIPointer(indx, size, type, stride, pointer);
72}
73#endif
74}
75
76/* Cache method IDs each time the class is loaded. */
77
78static void
79nativeClassInit(JNIEnv *_env, jclass glImplClass)
80{
81 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
82 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
83
84 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
85 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
86
87 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
88 "getBasePointer", "(Ljava/nio/Buffer;)J");
89 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
90 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
91 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
93
94 positionID = _env->GetFieldID(bufferClass, "position", "I");
95 limitID = _env->GetFieldID(bufferClass, "limit", "I");
96 elementSizeShiftID =
97 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
98}
99
100static void *
101getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
102{
103 jint position;
104 jint limit;
105 jint elementSizeShift;
106 jlong pointer;
107
108 position = _env->GetIntField(buffer, positionID);
109 limit = _env->GetIntField(buffer, limitID);
110 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
111 *remaining = (limit - position) << elementSizeShift;
112 pointer = _env->CallStaticLongMethod(nioAccessClass,
113 getBasePointerID, buffer);
114 if (pointer != 0L) {
115 *array = NULL;
116 return reinterpret_cast<void*>(pointer);
117 }
118
119 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
120 getBaseArrayID, buffer);
121 *offset = _env->CallStaticIntMethod(nioAccessClass,
122 getBaseArrayOffsetID, buffer);
123
124 return NULL;
125}
126
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700127class ByteArrayGetter {
128public:
129 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
130 return _env->GetByteArrayElements(array, is_copy);
131 }
132};
133class BooleanArrayGetter {
134public:
135 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
136 return _env->GetBooleanArrayElements(array, is_copy);
137 }
138};
139class CharArrayGetter {
140public:
141 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
142 return _env->GetCharArrayElements(array, is_copy);
143 }
144};
145class ShortArrayGetter {
146public:
147 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
148 return _env->GetShortArrayElements(array, is_copy);
149 }
150};
151class IntArrayGetter {
152public:
153 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
154 return _env->GetIntArrayElements(array, is_copy);
155 }
156};
157class LongArrayGetter {
158public:
159 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
160 return _env->GetLongArrayElements(array, is_copy);
161 }
162};
163class FloatArrayGetter {
164public:
165 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
166 return _env->GetFloatArrayElements(array, is_copy);
167 }
168};
169class DoubleArrayGetter {
170public:
171 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
172 return _env->GetDoubleArrayElements(array, is_copy);
173 }
174};
175
176template<typename JTYPEARRAY, typename ARRAYGETTER>
177static void*
178getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
179 return ARRAYGETTER::Get(_env, array, is_copy);
180}
181
182class ByteArrayReleaser {
183public:
184 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
185 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
186 }
187};
188class BooleanArrayReleaser {
189public:
190 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
191 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
192 }
193};
194class CharArrayReleaser {
195public:
196 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
197 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
198 }
199};
200class ShortArrayReleaser {
201public:
202 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
203 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
204 }
205};
206class IntArrayReleaser {
207public:
208 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
209 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
210 }
211};
212class LongArrayReleaser {
213public:
214 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
215 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
216 }
217};
218class FloatArrayReleaser {
219public:
220 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
221 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
222 }
223};
224class DoubleArrayReleaser {
225public:
226 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
227 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
228 }
229};
230
231template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
232static void
233releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
234 ARRAYRELEASER::Release(_env, array, data, commit);
235}
236
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700237static void
238releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
239{
240 _env->ReleasePrimitiveArrayCritical(array, data,
241 commit ? 0 : JNI_ABORT);
242}
243
244static void *
245getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
246 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
247 if (buf) {
248 jint position = _env->GetIntField(buffer, positionID);
249 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
250 buf += position << elementSizeShift;
251 } else {
252 jniThrowException(_env, "java/lang/IllegalArgumentException",
253 "Must use a native order direct Buffer");
254 }
255 return (void*) buf;
256}
257
258// --------------------------------------------------------------------------
259
260/*
261 * returns the number of values glGet returns for a given pname.
262 *
263 * The code below is written such that pnames requiring only one values
264 * are the default (and are not explicitely tested for). This makes the
265 * checking code much shorter/readable/efficient.
266 *
267 * This means that unknown pnames (e.g.: extensions) will default to 1. If
268 * that unknown pname needs more than 1 value, then the validation check
269 * is incomplete and the app may crash if it passed the wrong number params.
270 */
271static int getNeededCount(GLint pname) {
272 int needed = 1;
273#ifdef GL_ES_VERSION_2_0
274 // GLES 2.x pnames
275 switch (pname) {
276 case GL_ALIASED_LINE_WIDTH_RANGE:
277 case GL_ALIASED_POINT_SIZE_RANGE:
278 needed = 2;
279 break;
280
281 case GL_BLEND_COLOR:
282 case GL_COLOR_CLEAR_VALUE:
283 case GL_COLOR_WRITEMASK:
284 case GL_SCISSOR_BOX:
285 case GL_VIEWPORT:
286 needed = 4;
287 break;
288
289 case GL_COMPRESSED_TEXTURE_FORMATS:
290 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
291 break;
292
293 case GL_SHADER_BINARY_FORMATS:
294 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
295 break;
296 }
297#endif
298
299#ifdef GL_VERSION_ES_CM_1_1
300 // GLES 1.x pnames
301 switch (pname) {
302 case GL_ALIASED_LINE_WIDTH_RANGE:
303 case GL_ALIASED_POINT_SIZE_RANGE:
304 case GL_DEPTH_RANGE:
305 case GL_SMOOTH_LINE_WIDTH_RANGE:
306 case GL_SMOOTH_POINT_SIZE_RANGE:
307 needed = 2;
308 break;
309
310 case GL_CURRENT_NORMAL:
311 case GL_POINT_DISTANCE_ATTENUATION:
312 needed = 3;
313 break;
314
315 case GL_COLOR_CLEAR_VALUE:
316 case GL_COLOR_WRITEMASK:
317 case GL_CURRENT_COLOR:
318 case GL_CURRENT_TEXTURE_COORDS:
319 case GL_FOG_COLOR:
320 case GL_LIGHT_MODEL_AMBIENT:
321 case GL_SCISSOR_BOX:
322 case GL_VIEWPORT:
323 needed = 4;
324 break;
325
326 case GL_MODELVIEW_MATRIX:
327 case GL_PROJECTION_MATRIX:
328 case GL_TEXTURE_MATRIX:
329 needed = 16;
330 break;
331
332 case GL_COMPRESSED_TEXTURE_FORMATS:
333 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
334 break;
335 }
336#endif
337 return needed;
338}
339
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700340template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
341 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700342static void
343get
344 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
345 jint _exception = 0;
346 const char * _exceptionType;
347 const char * _exceptionMessage;
348 CTYPE *params_base = (CTYPE *) 0;
349 jint _remaining;
350 CTYPE *params = (CTYPE *) 0;
351 int _needed = 0;
352
353 if (!params_ref) {
354 _exception = 1;
355 _exceptionType = "java/lang/IllegalArgumentException";
356 _exceptionMessage = "params == null";
357 goto exit;
358 }
359 if (offset < 0) {
360 _exception = 1;
361 _exceptionType = "java/lang/IllegalArgumentException";
362 _exceptionMessage = "offset < 0";
363 goto exit;
364 }
365 _remaining = _env->GetArrayLength(params_ref) - offset;
366 _needed = getNeededCount(pname);
367 // if we didn't find this pname, we just assume the user passed
368 // an array of the right size -- this might happen with extensions
369 // or if we forget an enum here.
370 if (_remaining < _needed) {
371 _exception = 1;
372 _exceptionType = "java/lang/IllegalArgumentException";
373 _exceptionMessage = "length - offset < needed";
374 goto exit;
375 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700376 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
377 _env, params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700378 params = params_base + offset;
379
380 GET(
381 (GLenum)pname,
382 (CTYPE *)params
383 );
384
385exit:
386 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700387 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
388 _env, params_ref, params_base, !_exception);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700389 }
390 if (_exception) {
391 jniThrowException(_env, _exceptionType, _exceptionMessage);
392 }
393}
394
395
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700396template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
397 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700398static void
399getarray
400 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
401 jint _exception = 0;
402 const char * _exceptionType;
403 const char * _exceptionMessage;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700404 JTYPEARRAY _array = (JTYPEARRAY) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700405 jint _bufferOffset = (jint) 0;
406 jint _remaining;
407 CTYPE *params = (CTYPE *) 0;
408 int _needed = 0;
409
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700410 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700411 _remaining /= sizeof(CTYPE); // convert from bytes to item count
412 _needed = getNeededCount(pname);
413 // if we didn't find this pname, we just assume the user passed
414 // an array of the right size -- this might happen with extensions
415 // or if we forget an enum here.
416 if (_needed>0 && _remaining < _needed) {
417 _exception = 1;
418 _exceptionType = "java/lang/IllegalArgumentException";
419 _exceptionMessage = "remaining() < needed";
420 goto exit;
421 }
422 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700423 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
424 _env, _array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700425 params = (CTYPE *) (_paramsBase + _bufferOffset);
426 }
427 GET(
428 (GLenum)pname,
429 (CTYPE *)params
430 );
431
432exit:
433 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700434 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
435 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700436 }
437 if (_exception) {
438 jniThrowException(_env, _exceptionType, _exceptionMessage);
439 }
440}
441
442// --------------------------------------------------------------------------
443/* void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ) */
444static void
445android_glDispatchCompute__III
446 (JNIEnv *_env, jobject _this, jint num_groups_x, jint num_groups_y, jint num_groups_z) {
447 glDispatchCompute(
448 (GLuint)num_groups_x,
449 (GLuint)num_groups_y,
450 (GLuint)num_groups_z
451 );
452}
453
454/* void glDispatchComputeIndirect ( GLintptr indirect ) */
455static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
456 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
457 // Here we only need to check for successful 64-bit to 32-bit conversion.
458 // - jlong is a int64_t (jni.h)
459 // - GLintptr is a long (khrplatform.h)
460 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
461 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
462 return;
463 }
464 glDispatchComputeIndirect((GLintptr)indirect);
465}
466
467/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
468static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
469 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
470 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
471 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800472 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700473 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
474 return;
475 }
476 glDrawArraysIndirect(mode, (const void*)indirect);
477}
478
479/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
480static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
481 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
482 // GL checks for too-large values. Here we only need to check for successful signed 64-bit
483 // to unsigned 32-bit conversion.
Andreas Gampebfe63332014-11-12 14:12:45 -0800484 if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700485 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
486 return;
487 }
488 glDrawElementsIndirect(mode, type, (const void*)indirect);
489}
490
491/* void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param ) */
492static void
493android_glFramebufferParameteri__III
494 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
495 glFramebufferParameteri(
496 (GLenum)target,
497 (GLenum)pname,
498 (GLint)param
499 );
500}
501
502/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
503static void
504android_glGetFramebufferParameteriv__II_3II
505 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
506 jint _exception = 0;
507 const char * _exceptionType = NULL;
508 const char * _exceptionMessage = NULL;
509 GLint *params_base = (GLint *) 0;
510 jint _remaining;
511 GLint *params = (GLint *) 0;
512
513 if (!params_ref) {
514 _exception = 1;
515 _exceptionType = "java/lang/IllegalArgumentException";
516 _exceptionMessage = "params == null";
517 goto exit;
518 }
519 if (offset < 0) {
520 _exception = 1;
521 _exceptionType = "java/lang/IllegalArgumentException";
522 _exceptionMessage = "offset < 0";
523 goto exit;
524 }
525 _remaining = _env->GetArrayLength(params_ref) - offset;
526 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700527 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700528 params = params_base + offset;
529
530 glGetFramebufferParameteriv(
531 (GLenum)target,
532 (GLenum)pname,
533 (GLint *)params
534 );
535
536exit:
537 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700538 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700539 _exception ? JNI_ABORT: 0);
540 }
541 if (_exception) {
542 jniThrowException(_env, _exceptionType, _exceptionMessage);
543 }
544}
545
546/* void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
547static void
548android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2
549 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700550 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700551 jint _bufferOffset = (jint) 0;
552 jint _remaining;
553 GLint *params = (GLint *) 0;
554
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700555 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700556 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700557 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700558 params = (GLint *) (_paramsBase + _bufferOffset);
559 }
560 glGetFramebufferParameteriv(
561 (GLenum)target,
562 (GLenum)pname,
563 (GLint *)params
564 );
565 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700566 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700567 }
568}
569
570/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
571static void
572android_glGetProgramInterfaceiv__III_3II
573 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jintArray params_ref, jint offset) {
574 jint _exception = 0;
575 const char * _exceptionType = NULL;
576 const char * _exceptionMessage = NULL;
577 GLint *params_base = (GLint *) 0;
578 jint _remaining;
579 GLint *params = (GLint *) 0;
580
581 if (!params_ref) {
582 _exception = 1;
583 _exceptionType = "java/lang/IllegalArgumentException";
584 _exceptionMessage = "params == null";
585 goto exit;
586 }
587 if (offset < 0) {
588 _exception = 1;
589 _exceptionType = "java/lang/IllegalArgumentException";
590 _exceptionMessage = "offset < 0";
591 goto exit;
592 }
593 _remaining = _env->GetArrayLength(params_ref) - offset;
594 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700595 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700596 params = params_base + offset;
597
598 glGetProgramInterfaceiv(
599 (GLuint)program,
600 (GLenum)programInterface,
601 (GLenum)pname,
602 (GLint *)params
603 );
604
605exit:
606 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700607 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700608 _exception ? JNI_ABORT: 0);
609 }
610 if (_exception) {
611 jniThrowException(_env, _exceptionType, _exceptionMessage);
612 }
613}
614
615/* void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params ) */
616static void
617android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2
618 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700619 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700620 jint _bufferOffset = (jint) 0;
621 jint _remaining;
622 GLint *params = (GLint *) 0;
623
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700624 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700625 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700626 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700627 params = (GLint *) (_paramsBase + _bufferOffset);
628 }
629 glGetProgramInterfaceiv(
630 (GLuint)program,
631 (GLenum)programInterface,
632 (GLenum)pname,
633 (GLint *)params
634 );
635 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700636 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700637 }
638}
639
640/* GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name ) */
641static jint
642android_glGetProgramResourceIndex__IILjava_lang_String_2
643 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
644 jint _exception = 0;
645 const char * _exceptionType = NULL;
646 const char * _exceptionMessage = NULL;
647 GLuint _returnValue = 0;
648 const char* _nativename = 0;
649
650 if (!name) {
651 _exception = 1;
652 _exceptionType = "java/lang/IllegalArgumentException";
653 _exceptionMessage = "name == null";
654 goto exit;
655 }
656 _nativename = _env->GetStringUTFChars(name, 0);
657
658 _returnValue = glGetProgramResourceIndex(
659 (GLuint)program,
660 (GLenum)programInterface,
661 (GLchar *)_nativename
662 );
663
664exit:
665 if (_nativename) {
666 _env->ReleaseStringUTFChars(name, _nativename);
667 }
668
669 if (_exception) {
670 jniThrowException(_env, _exceptionType, _exceptionMessage);
671 }
672 return (jint)_returnValue;
673}
674
675/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
676static jstring
677android_glGetProgramResourceName
678 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
679 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
680 return NULL;
681}
682
683/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
684static void
685android_glGetProgramResourceiv__IIII_3III_3II_3II
686 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jintArray props_ref, jint propsOffset, jint bufSize, jintArray length_ref, jint lengthOffset, jintArray params_ref, jint paramsOffset) {
687 jint _exception = 0;
688 const char * _exceptionType = NULL;
689 const char * _exceptionMessage = NULL;
690 GLenum *props_base = (GLenum *) 0;
691 jint _propsRemaining;
692 GLenum *props = (GLenum *) 0;
693 GLsizei *length_base = (GLsizei *) 0;
694 jint _lengthRemaining;
695 GLsizei *length = (GLsizei *) 0;
696 GLint *params_base = (GLint *) 0;
697 jint _paramsRemaining;
698 GLint *params = (GLint *) 0;
699
700 if (!props_ref) {
701 _exception = 1;
702 _exceptionType = "java/lang/IllegalArgumentException";
703 _exceptionMessage = "props == null";
704 goto exit;
705 }
706 if (propsOffset < 0) {
707 _exception = 1;
708 _exceptionType = "java/lang/IllegalArgumentException";
709 _exceptionMessage = "propsOffset < 0";
710 goto exit;
711 }
712 _propsRemaining = _env->GetArrayLength(props_ref) - propsOffset;
713 props_base = (GLenum *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700714 _env->GetIntArrayElements(props_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700715 props = props_base + propsOffset;
716
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700717 if (length_ref) {
718 if (lengthOffset < 0) {
719 _exception = 1;
720 _exceptionType = "java/lang/IllegalArgumentException";
721 _exceptionMessage = "lengthOffset < 0";
722 goto exit;
723 }
724 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
725 length_base = (GLsizei *)
726 _env->GetIntArrayElements(length_ref, (jboolean *)0);
727 length = length_base + lengthOffset;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700728 }
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700729
730 if (!params_ref) {
731 _exception = 1;
732 _exceptionType = "java/lang/IllegalArgumentException";
733 _exceptionMessage = "params == null";
734 goto exit;
735 }
736 if (paramsOffset < 0) {
737 _exception = 1;
738 _exceptionType = "java/lang/IllegalArgumentException";
739 _exceptionMessage = "paramsOffset < 0";
740 goto exit;
741 }
742 _paramsRemaining = _env->GetArrayLength(params_ref) - paramsOffset;
743 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700744 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700745 params = params_base + paramsOffset;
746
747 glGetProgramResourceiv(
748 (GLuint)program,
749 (GLenum)programInterface,
750 (GLuint)index,
751 (GLsizei)propCount,
752 (GLenum *)props,
753 (GLsizei)bufSize,
754 (GLsizei *)length,
755 (GLint *)params
756 );
757
758exit:
759 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700760 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700761 _exception ? JNI_ABORT: 0);
762 }
763 if (length_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700764 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700765 _exception ? JNI_ABORT: 0);
766 }
767 if (props_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700768 _env->ReleaseIntArrayElements(props_ref, (jint*)props_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700769 JNI_ABORT);
770 }
771 if (_exception) {
772 jniThrowException(_env, _exceptionType, _exceptionMessage);
773 }
774}
775
776/* void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params ) */
777static void
778android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
779 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index, jint propCount, jobject props_buf, jint bufSize, jobject length_buf, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700780 jintArray _propsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700781 jint _propsBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700782 jintArray _lengthArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700783 jint _lengthBufferOffset = (jint) 0;
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700784 jintArray _paramsArray = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700785 jint _paramsBufferOffset = (jint) 0;
786 jint _propsRemaining;
787 GLenum *props = (GLenum *) 0;
788 jint _lengthRemaining;
789 GLsizei *length = (GLsizei *) 0;
790 jint _paramsRemaining;
791 GLint *params = (GLint *) 0;
792
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700793 props = (GLenum *)getPointer(_env, props_buf, (jarray*)&_propsArray, &_propsRemaining, &_propsBufferOffset);
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700794 if (length_buf) {
795 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
796 }
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700797 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_paramsArray, &_paramsRemaining, &_paramsBufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700798 if (props == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700799 char * _propsBase = (char *)_env->GetIntArrayElements(_propsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700800 props = (GLenum *) (_propsBase + _propsBufferOffset);
801 }
Pablo Ceballos6aff9062015-10-01 18:35:39 -0700802 if (length_buf && length == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700803 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700804 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
805 }
806 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700807 char * _paramsBase = (char *)_env->GetIntArrayElements(_paramsArray, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700808 params = (GLint *) (_paramsBase + _paramsBufferOffset);
809 }
810 glGetProgramResourceiv(
811 (GLuint)program,
812 (GLenum)programInterface,
813 (GLuint)index,
814 (GLsizei)propCount,
815 (GLenum *)props,
816 (GLsizei)bufSize,
817 (GLsizei *)length,
818 (GLint *)params
819 );
820 if (_paramsArray) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700821 _env->ReleaseIntArrayElements(_paramsArray, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700822 }
823 if (_lengthArray) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700824 _env->ReleaseIntArrayElements(_lengthArray, (jint*)length, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700825 }
826 if (_propsArray) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700827 _env->ReleaseIntArrayElements(_propsArray, (jint*)props, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700828 }
829}
830
831/* GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name ) */
832static jint
833android_glGetProgramResourceLocation__IILjava_lang_String_2
834 (JNIEnv *_env, jobject _this, jint program, jint programInterface, jstring name) {
835 jint _exception = 0;
836 const char * _exceptionType = NULL;
837 const char * _exceptionMessage = NULL;
838 GLint _returnValue = 0;
839 const char* _nativename = 0;
840
841 if (!name) {
842 _exception = 1;
843 _exceptionType = "java/lang/IllegalArgumentException";
844 _exceptionMessage = "name == null";
845 goto exit;
846 }
847 _nativename = _env->GetStringUTFChars(name, 0);
848
849 _returnValue = glGetProgramResourceLocation(
850 (GLuint)program,
851 (GLenum)programInterface,
852 (GLchar *)_nativename
853 );
854
855exit:
856 if (_nativename) {
857 _env->ReleaseStringUTFChars(name, _nativename);
858 }
859
860 if (_exception) {
861 jniThrowException(_env, _exceptionType, _exceptionMessage);
862 }
863 return (jint)_returnValue;
864}
865
866/* void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program ) */
867static void
868android_glUseProgramStages__III
869 (JNIEnv *_env, jobject _this, jint pipeline, jint stages, jint program) {
870 glUseProgramStages(
871 (GLuint)pipeline,
872 (GLbitfield)stages,
873 (GLuint)program
874 );
875}
876
877/* void glActiveShaderProgram ( GLuint pipeline, GLuint program ) */
878static void
879android_glActiveShaderProgram__II
880 (JNIEnv *_env, jobject _this, jint pipeline, jint program) {
881 glActiveShaderProgram(
882 (GLuint)pipeline,
883 (GLuint)program
884 );
885}
886
887/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
888static jint
889android_glCreateShaderProgramv
890 (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
891
892 jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
893 return 0;
894}
895/* void glBindProgramPipeline ( GLuint pipeline ) */
896static void
897android_glBindProgramPipeline__I
898 (JNIEnv *_env, jobject _this, jint pipeline) {
899 glBindProgramPipeline(
900 (GLuint)pipeline
901 );
902}
903
904/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
905static void
906android_glDeleteProgramPipelines__I_3II
907 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
908 jint _exception = 0;
909 const char * _exceptionType = NULL;
910 const char * _exceptionMessage = NULL;
911 GLuint *pipelines_base = (GLuint *) 0;
912 jint _remaining;
913 GLuint *pipelines = (GLuint *) 0;
914
915 if (!pipelines_ref) {
916 _exception = 1;
917 _exceptionType = "java/lang/IllegalArgumentException";
918 _exceptionMessage = "pipelines == null";
919 goto exit;
920 }
921 if (offset < 0) {
922 _exception = 1;
923 _exceptionType = "java/lang/IllegalArgumentException";
924 _exceptionMessage = "offset < 0";
925 goto exit;
926 }
927 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
928 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700929 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700930 pipelines = pipelines_base + offset;
931
932 glDeleteProgramPipelines(
933 (GLsizei)n,
934 (GLuint *)pipelines
935 );
936
937exit:
938 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700939 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700940 JNI_ABORT);
941 }
942 if (_exception) {
943 jniThrowException(_env, _exceptionType, _exceptionMessage);
944 }
945}
946
947/* void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines ) */
948static void
949android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2
950 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700951 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700952 jint _bufferOffset = (jint) 0;
953 jint _remaining;
954 GLuint *pipelines = (GLuint *) 0;
955
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700956 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700957 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700958 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700959 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
960 }
961 glDeleteProgramPipelines(
962 (GLsizei)n,
963 (GLuint *)pipelines
964 );
965 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700966 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700967 }
968}
969
970/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
971static void
972android_glGenProgramPipelines__I_3II
973 (JNIEnv *_env, jobject _this, jint n, jintArray pipelines_ref, jint offset) {
974 jint _exception = 0;
975 const char * _exceptionType = NULL;
976 const char * _exceptionMessage = NULL;
977 GLuint *pipelines_base = (GLuint *) 0;
978 jint _remaining;
979 GLuint *pipelines = (GLuint *) 0;
980
981 if (!pipelines_ref) {
982 _exception = 1;
983 _exceptionType = "java/lang/IllegalArgumentException";
984 _exceptionMessage = "pipelines == null";
985 goto exit;
986 }
987 if (offset < 0) {
988 _exception = 1;
989 _exceptionType = "java/lang/IllegalArgumentException";
990 _exceptionMessage = "offset < 0";
991 goto exit;
992 }
993 _remaining = _env->GetArrayLength(pipelines_ref) - offset;
994 pipelines_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -0700995 _env->GetIntArrayElements(pipelines_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -0700996 pipelines = pipelines_base + offset;
997
998 glGenProgramPipelines(
999 (GLsizei)n,
1000 (GLuint *)pipelines
1001 );
1002
1003exit:
1004 if (pipelines_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001005 _env->ReleaseIntArrayElements(pipelines_ref, (jint*)pipelines_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001006 _exception ? JNI_ABORT: 0);
1007 }
1008 if (_exception) {
1009 jniThrowException(_env, _exceptionType, _exceptionMessage);
1010 }
1011}
1012
1013/* void glGenProgramPipelines ( GLsizei n, GLuint *pipelines ) */
1014static void
1015android_glGenProgramPipelines__ILjava_nio_IntBuffer_2
1016 (JNIEnv *_env, jobject _this, jint n, jobject pipelines_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001017 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001018 jint _bufferOffset = (jint) 0;
1019 jint _remaining;
1020 GLuint *pipelines = (GLuint *) 0;
1021
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001022 pipelines = (GLuint *)getPointer(_env, pipelines_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001023 if (pipelines == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001024 char * _pipelinesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001025 pipelines = (GLuint *) (_pipelinesBase + _bufferOffset);
1026 }
1027 glGenProgramPipelines(
1028 (GLsizei)n,
1029 (GLuint *)pipelines
1030 );
1031 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001032 _env->ReleaseIntArrayElements(_array, (jint*)pipelines, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001033 }
1034}
1035
1036/* GLboolean glIsProgramPipeline ( GLuint pipeline ) */
1037static jboolean
1038android_glIsProgramPipeline__I
1039 (JNIEnv *_env, jobject _this, jint pipeline) {
1040 GLboolean _returnValue;
1041 _returnValue = glIsProgramPipeline(
1042 (GLuint)pipeline
1043 );
1044 return (jboolean)_returnValue;
1045}
1046
1047/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1048static void
1049android_glGetProgramPipelineiv__II_3II
1050 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jintArray params_ref, jint offset) {
1051 jint _exception = 0;
1052 const char * _exceptionType = NULL;
1053 const char * _exceptionMessage = NULL;
1054 GLint *params_base = (GLint *) 0;
1055 jint _remaining;
1056 GLint *params = (GLint *) 0;
1057
1058 if (!params_ref) {
1059 _exception = 1;
1060 _exceptionType = "java/lang/IllegalArgumentException";
1061 _exceptionMessage = "params == null";
1062 goto exit;
1063 }
1064 if (offset < 0) {
1065 _exception = 1;
1066 _exceptionType = "java/lang/IllegalArgumentException";
1067 _exceptionMessage = "offset < 0";
1068 goto exit;
1069 }
1070 _remaining = _env->GetArrayLength(params_ref) - offset;
1071 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001072 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001073 params = params_base + offset;
1074
1075 glGetProgramPipelineiv(
1076 (GLuint)pipeline,
1077 (GLenum)pname,
1078 (GLint *)params
1079 );
1080
1081exit:
1082 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001083 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001084 _exception ? JNI_ABORT: 0);
1085 }
1086 if (_exception) {
1087 jniThrowException(_env, _exceptionType, _exceptionMessage);
1088 }
1089}
1090
1091/* void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params ) */
1092static void
1093android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2
1094 (JNIEnv *_env, jobject _this, jint pipeline, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001095 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001096 jint _bufferOffset = (jint) 0;
1097 jint _remaining;
1098 GLint *params = (GLint *) 0;
1099
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001100 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001101 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001102 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001103 params = (GLint *) (_paramsBase + _bufferOffset);
1104 }
1105 glGetProgramPipelineiv(
1106 (GLuint)pipeline,
1107 (GLenum)pname,
1108 (GLint *)params
1109 );
1110 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001111 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001112 }
1113}
1114
1115/* void glProgramUniform1i ( GLuint program, GLint location, GLint v0 ) */
1116static void
1117android_glProgramUniform1i__III
1118 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1119 glProgramUniform1i(
1120 (GLuint)program,
1121 (GLint)location,
1122 (GLint)v0
1123 );
1124}
1125
1126/* void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 ) */
1127static void
1128android_glProgramUniform2i__IIII
1129 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1130 glProgramUniform2i(
1131 (GLuint)program,
1132 (GLint)location,
1133 (GLint)v0,
1134 (GLint)v1
1135 );
1136}
1137
1138/* void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) */
1139static void
1140android_glProgramUniform3i__IIIII
1141 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1142 glProgramUniform3i(
1143 (GLuint)program,
1144 (GLint)location,
1145 (GLint)v0,
1146 (GLint)v1,
1147 (GLint)v2
1148 );
1149}
1150
1151/* void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) */
1152static void
1153android_glProgramUniform4i__IIIIII
1154 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1155 glProgramUniform4i(
1156 (GLuint)program,
1157 (GLint)location,
1158 (GLint)v0,
1159 (GLint)v1,
1160 (GLint)v2,
1161 (GLint)v3
1162 );
1163}
1164
1165/* void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 ) */
1166static void
1167android_glProgramUniform1ui__III
1168 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0) {
1169 glProgramUniform1ui(
1170 (GLuint)program,
1171 (GLint)location,
1172 (GLuint)v0
1173 );
1174}
1175
1176/* void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 ) */
1177static void
1178android_glProgramUniform2ui__IIII
1179 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1) {
1180 glProgramUniform2ui(
1181 (GLuint)program,
1182 (GLint)location,
1183 (GLuint)v0,
1184 (GLuint)v1
1185 );
1186}
1187
1188/* void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
1189static void
1190android_glProgramUniform3ui__IIIII
1191 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2) {
1192 glProgramUniform3ui(
1193 (GLuint)program,
1194 (GLint)location,
1195 (GLuint)v0,
1196 (GLuint)v1,
1197 (GLuint)v2
1198 );
1199}
1200
1201/* void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
1202static void
1203android_glProgramUniform4ui__IIIIII
1204 (JNIEnv *_env, jobject _this, jint program, jint location, jint v0, jint v1, jint v2, jint v3) {
1205 glProgramUniform4ui(
1206 (GLuint)program,
1207 (GLint)location,
1208 (GLuint)v0,
1209 (GLuint)v1,
1210 (GLuint)v2,
1211 (GLuint)v3
1212 );
1213}
1214
1215/* void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 ) */
1216static void
1217android_glProgramUniform1f__IIF
1218 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0) {
1219 glProgramUniform1f(
1220 (GLuint)program,
1221 (GLint)location,
1222 (GLfloat)v0
1223 );
1224}
1225
1226/* void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) */
1227static void
1228android_glProgramUniform2f__IIFF
1229 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1) {
1230 glProgramUniform2f(
1231 (GLuint)program,
1232 (GLint)location,
1233 (GLfloat)v0,
1234 (GLfloat)v1
1235 );
1236}
1237
1238/* void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) */
1239static void
1240android_glProgramUniform3f__IIFFF
1241 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) {
1242 glProgramUniform3f(
1243 (GLuint)program,
1244 (GLint)location,
1245 (GLfloat)v0,
1246 (GLfloat)v1,
1247 (GLfloat)v2
1248 );
1249}
1250
1251/* void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) */
1252static void
1253android_glProgramUniform4f__IIFFFF
1254 (JNIEnv *_env, jobject _this, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) {
1255 glProgramUniform4f(
1256 (GLuint)program,
1257 (GLint)location,
1258 (GLfloat)v0,
1259 (GLfloat)v1,
1260 (GLfloat)v2,
1261 (GLfloat)v3
1262 );
1263}
1264
1265/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1266static void
1267android_glProgramUniform1iv__III_3II
1268 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1269 jint _exception = 0;
1270 const char * _exceptionType = NULL;
1271 const char * _exceptionMessage = NULL;
1272 GLint *value_base = (GLint *) 0;
1273 jint _remaining;
1274 GLint *value = (GLint *) 0;
1275
1276 if (!value_ref) {
1277 _exception = 1;
1278 _exceptionType = "java/lang/IllegalArgumentException";
1279 _exceptionMessage = "value == null";
1280 goto exit;
1281 }
1282 if (offset < 0) {
1283 _exception = 1;
1284 _exceptionType = "java/lang/IllegalArgumentException";
1285 _exceptionMessage = "offset < 0";
1286 goto exit;
1287 }
1288 _remaining = _env->GetArrayLength(value_ref) - offset;
1289 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001290 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001291 value = value_base + offset;
1292
1293 glProgramUniform1iv(
1294 (GLuint)program,
1295 (GLint)location,
1296 (GLsizei)count,
1297 (GLint *)value
1298 );
1299
1300exit:
1301 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001302 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001303 JNI_ABORT);
1304 }
1305 if (_exception) {
1306 jniThrowException(_env, _exceptionType, _exceptionMessage);
1307 }
1308}
1309
1310/* void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1311static void
1312android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2
1313 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001314 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001315 jint _bufferOffset = (jint) 0;
1316 jint _remaining;
1317 GLint *value = (GLint *) 0;
1318
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001319 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001320 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001321 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001322 value = (GLint *) (_valueBase + _bufferOffset);
1323 }
1324 glProgramUniform1iv(
1325 (GLuint)program,
1326 (GLint)location,
1327 (GLsizei)count,
1328 (GLint *)value
1329 );
1330 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001331 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001332 }
1333}
1334
1335/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1336static void
1337android_glProgramUniform2iv__III_3II
1338 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1339 jint _exception = 0;
1340 const char * _exceptionType = NULL;
1341 const char * _exceptionMessage = NULL;
1342 GLint *value_base = (GLint *) 0;
1343 jint _remaining;
1344 GLint *value = (GLint *) 0;
1345
1346 if (!value_ref) {
1347 _exception = 1;
1348 _exceptionType = "java/lang/IllegalArgumentException";
1349 _exceptionMessage = "value == null";
1350 goto exit;
1351 }
1352 if (offset < 0) {
1353 _exception = 1;
1354 _exceptionType = "java/lang/IllegalArgumentException";
1355 _exceptionMessage = "offset < 0";
1356 goto exit;
1357 }
1358 _remaining = _env->GetArrayLength(value_ref) - offset;
1359 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001360 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001361 value = value_base + offset;
1362
1363 glProgramUniform2iv(
1364 (GLuint)program,
1365 (GLint)location,
1366 (GLsizei)count,
1367 (GLint *)value
1368 );
1369
1370exit:
1371 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001372 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001373 JNI_ABORT);
1374 }
1375 if (_exception) {
1376 jniThrowException(_env, _exceptionType, _exceptionMessage);
1377 }
1378}
1379
1380/* void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1381static void
1382android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2
1383 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001384 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001385 jint _bufferOffset = (jint) 0;
1386 jint _remaining;
1387 GLint *value = (GLint *) 0;
1388
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001389 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001390 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001391 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001392 value = (GLint *) (_valueBase + _bufferOffset);
1393 }
1394 glProgramUniform2iv(
1395 (GLuint)program,
1396 (GLint)location,
1397 (GLsizei)count,
1398 (GLint *)value
1399 );
1400 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001401 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001402 }
1403}
1404
1405/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1406static void
1407android_glProgramUniform3iv__III_3II
1408 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1409 jint _exception = 0;
1410 const char * _exceptionType = NULL;
1411 const char * _exceptionMessage = NULL;
1412 GLint *value_base = (GLint *) 0;
1413 jint _remaining;
1414 GLint *value = (GLint *) 0;
1415
1416 if (!value_ref) {
1417 _exception = 1;
1418 _exceptionType = "java/lang/IllegalArgumentException";
1419 _exceptionMessage = "value == null";
1420 goto exit;
1421 }
1422 if (offset < 0) {
1423 _exception = 1;
1424 _exceptionType = "java/lang/IllegalArgumentException";
1425 _exceptionMessage = "offset < 0";
1426 goto exit;
1427 }
1428 _remaining = _env->GetArrayLength(value_ref) - offset;
1429 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001430 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001431 value = value_base + offset;
1432
1433 glProgramUniform3iv(
1434 (GLuint)program,
1435 (GLint)location,
1436 (GLsizei)count,
1437 (GLint *)value
1438 );
1439
1440exit:
1441 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001442 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001443 JNI_ABORT);
1444 }
1445 if (_exception) {
1446 jniThrowException(_env, _exceptionType, _exceptionMessage);
1447 }
1448}
1449
1450/* void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1451static void
1452android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2
1453 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001454 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001455 jint _bufferOffset = (jint) 0;
1456 jint _remaining;
1457 GLint *value = (GLint *) 0;
1458
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001459 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001460 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001461 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001462 value = (GLint *) (_valueBase + _bufferOffset);
1463 }
1464 glProgramUniform3iv(
1465 (GLuint)program,
1466 (GLint)location,
1467 (GLsizei)count,
1468 (GLint *)value
1469 );
1470 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001471 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001472 }
1473}
1474
1475/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1476static void
1477android_glProgramUniform4iv__III_3II
1478 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1479 jint _exception = 0;
1480 const char * _exceptionType = NULL;
1481 const char * _exceptionMessage = NULL;
1482 GLint *value_base = (GLint *) 0;
1483 jint _remaining;
1484 GLint *value = (GLint *) 0;
1485
1486 if (!value_ref) {
1487 _exception = 1;
1488 _exceptionType = "java/lang/IllegalArgumentException";
1489 _exceptionMessage = "value == null";
1490 goto exit;
1491 }
1492 if (offset < 0) {
1493 _exception = 1;
1494 _exceptionType = "java/lang/IllegalArgumentException";
1495 _exceptionMessage = "offset < 0";
1496 goto exit;
1497 }
1498 _remaining = _env->GetArrayLength(value_ref) - offset;
1499 value_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001500 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001501 value = value_base + offset;
1502
1503 glProgramUniform4iv(
1504 (GLuint)program,
1505 (GLint)location,
1506 (GLsizei)count,
1507 (GLint *)value
1508 );
1509
1510exit:
1511 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001512 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001513 JNI_ABORT);
1514 }
1515 if (_exception) {
1516 jniThrowException(_env, _exceptionType, _exceptionMessage);
1517 }
1518}
1519
1520/* void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value ) */
1521static void
1522android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2
1523 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001524 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001525 jint _bufferOffset = (jint) 0;
1526 jint _remaining;
1527 GLint *value = (GLint *) 0;
1528
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001529 value = (GLint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001530 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001531 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001532 value = (GLint *) (_valueBase + _bufferOffset);
1533 }
1534 glProgramUniform4iv(
1535 (GLuint)program,
1536 (GLint)location,
1537 (GLsizei)count,
1538 (GLint *)value
1539 );
1540 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001541 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001542 }
1543}
1544
1545/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1546static void
1547android_glProgramUniform1uiv__III_3II
1548 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1549 jint _exception = 0;
1550 const char * _exceptionType = NULL;
1551 const char * _exceptionMessage = NULL;
1552 GLuint *value_base = (GLuint *) 0;
1553 jint _remaining;
1554 GLuint *value = (GLuint *) 0;
1555
1556 if (!value_ref) {
1557 _exception = 1;
1558 _exceptionType = "java/lang/IllegalArgumentException";
1559 _exceptionMessage = "value == null";
1560 goto exit;
1561 }
1562 if (offset < 0) {
1563 _exception = 1;
1564 _exceptionType = "java/lang/IllegalArgumentException";
1565 _exceptionMessage = "offset < 0";
1566 goto exit;
1567 }
1568 _remaining = _env->GetArrayLength(value_ref) - offset;
1569 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001570 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001571 value = value_base + offset;
1572
1573 glProgramUniform1uiv(
1574 (GLuint)program,
1575 (GLint)location,
1576 (GLsizei)count,
1577 (GLuint *)value
1578 );
1579
1580exit:
1581 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001582 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001583 JNI_ABORT);
1584 }
1585 if (_exception) {
1586 jniThrowException(_env, _exceptionType, _exceptionMessage);
1587 }
1588}
1589
1590/* void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1591static void
1592android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2
1593 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001594 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001595 jint _bufferOffset = (jint) 0;
1596 jint _remaining;
1597 GLuint *value = (GLuint *) 0;
1598
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001599 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001600 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001601 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001602 value = (GLuint *) (_valueBase + _bufferOffset);
1603 }
1604 glProgramUniform1uiv(
1605 (GLuint)program,
1606 (GLint)location,
1607 (GLsizei)count,
1608 (GLuint *)value
1609 );
1610 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001611 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001612 }
1613}
1614
1615/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1616static void
1617android_glProgramUniform2uiv__III_3II
1618 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1619 jint _exception = 0;
1620 const char * _exceptionType = NULL;
1621 const char * _exceptionMessage = NULL;
1622 GLuint *value_base = (GLuint *) 0;
1623 jint _remaining;
1624 GLuint *value = (GLuint *) 0;
1625
1626 if (!value_ref) {
1627 _exception = 1;
1628 _exceptionType = "java/lang/IllegalArgumentException";
1629 _exceptionMessage = "value == null";
1630 goto exit;
1631 }
1632 if (offset < 0) {
1633 _exception = 1;
1634 _exceptionType = "java/lang/IllegalArgumentException";
1635 _exceptionMessage = "offset < 0";
1636 goto exit;
1637 }
1638 _remaining = _env->GetArrayLength(value_ref) - offset;
1639 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001640 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001641 value = value_base + offset;
1642
1643 glProgramUniform2uiv(
1644 (GLuint)program,
1645 (GLint)location,
1646 (GLsizei)count,
1647 (GLuint *)value
1648 );
1649
1650exit:
1651 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001652 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001653 JNI_ABORT);
1654 }
1655 if (_exception) {
1656 jniThrowException(_env, _exceptionType, _exceptionMessage);
1657 }
1658}
1659
1660/* void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1661static void
1662android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2
1663 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001664 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001665 jint _bufferOffset = (jint) 0;
1666 jint _remaining;
1667 GLuint *value = (GLuint *) 0;
1668
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001669 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001670 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001671 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001672 value = (GLuint *) (_valueBase + _bufferOffset);
1673 }
1674 glProgramUniform2uiv(
1675 (GLuint)program,
1676 (GLint)location,
1677 (GLsizei)count,
1678 (GLuint *)value
1679 );
1680 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001681 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001682 }
1683}
1684
1685/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1686static void
1687android_glProgramUniform3uiv__III_3II
1688 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1689 jint _exception = 0;
1690 const char * _exceptionType = NULL;
1691 const char * _exceptionMessage = NULL;
1692 GLuint *value_base = (GLuint *) 0;
1693 jint _remaining;
1694 GLuint *value = (GLuint *) 0;
1695
1696 if (!value_ref) {
1697 _exception = 1;
1698 _exceptionType = "java/lang/IllegalArgumentException";
1699 _exceptionMessage = "value == null";
1700 goto exit;
1701 }
1702 if (offset < 0) {
1703 _exception = 1;
1704 _exceptionType = "java/lang/IllegalArgumentException";
1705 _exceptionMessage = "offset < 0";
1706 goto exit;
1707 }
1708 _remaining = _env->GetArrayLength(value_ref) - offset;
1709 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001710 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001711 value = value_base + offset;
1712
1713 glProgramUniform3uiv(
1714 (GLuint)program,
1715 (GLint)location,
1716 (GLsizei)count,
1717 (GLuint *)value
1718 );
1719
1720exit:
1721 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001722 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001723 JNI_ABORT);
1724 }
1725 if (_exception) {
1726 jniThrowException(_env, _exceptionType, _exceptionMessage);
1727 }
1728}
1729
1730/* void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1731static void
1732android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2
1733 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001734 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001735 jint _bufferOffset = (jint) 0;
1736 jint _remaining;
1737 GLuint *value = (GLuint *) 0;
1738
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001739 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001740 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001741 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001742 value = (GLuint *) (_valueBase + _bufferOffset);
1743 }
1744 glProgramUniform3uiv(
1745 (GLuint)program,
1746 (GLint)location,
1747 (GLsizei)count,
1748 (GLuint *)value
1749 );
1750 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001751 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001752 }
1753}
1754
1755/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1756static void
1757android_glProgramUniform4uiv__III_3II
1758 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jintArray value_ref, jint offset) {
1759 jint _exception = 0;
1760 const char * _exceptionType = NULL;
1761 const char * _exceptionMessage = NULL;
1762 GLuint *value_base = (GLuint *) 0;
1763 jint _remaining;
1764 GLuint *value = (GLuint *) 0;
1765
1766 if (!value_ref) {
1767 _exception = 1;
1768 _exceptionType = "java/lang/IllegalArgumentException";
1769 _exceptionMessage = "value == null";
1770 goto exit;
1771 }
1772 if (offset < 0) {
1773 _exception = 1;
1774 _exceptionType = "java/lang/IllegalArgumentException";
1775 _exceptionMessage = "offset < 0";
1776 goto exit;
1777 }
1778 _remaining = _env->GetArrayLength(value_ref) - offset;
1779 value_base = (GLuint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001780 _env->GetIntArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001781 value = value_base + offset;
1782
1783 glProgramUniform4uiv(
1784 (GLuint)program,
1785 (GLint)location,
1786 (GLsizei)count,
1787 (GLuint *)value
1788 );
1789
1790exit:
1791 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001792 _env->ReleaseIntArrayElements(value_ref, (jint*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001793 JNI_ABORT);
1794 }
1795 if (_exception) {
1796 jniThrowException(_env, _exceptionType, _exceptionMessage);
1797 }
1798}
1799
1800/* void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value ) */
1801static void
1802android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2
1803 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001804 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001805 jint _bufferOffset = (jint) 0;
1806 jint _remaining;
1807 GLuint *value = (GLuint *) 0;
1808
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001809 value = (GLuint *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001810 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001811 char * _valueBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001812 value = (GLuint *) (_valueBase + _bufferOffset);
1813 }
1814 glProgramUniform4uiv(
1815 (GLuint)program,
1816 (GLint)location,
1817 (GLsizei)count,
1818 (GLuint *)value
1819 );
1820 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001821 _env->ReleaseIntArrayElements(_array, (jint*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001822 }
1823}
1824
1825/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1826static void
1827android_glProgramUniform1fv__III_3FI
1828 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1829 jint _exception = 0;
1830 const char * _exceptionType = NULL;
1831 const char * _exceptionMessage = NULL;
1832 GLfloat *value_base = (GLfloat *) 0;
1833 jint _remaining;
1834 GLfloat *value = (GLfloat *) 0;
1835
1836 if (!value_ref) {
1837 _exception = 1;
1838 _exceptionType = "java/lang/IllegalArgumentException";
1839 _exceptionMessage = "value == null";
1840 goto exit;
1841 }
1842 if (offset < 0) {
1843 _exception = 1;
1844 _exceptionType = "java/lang/IllegalArgumentException";
1845 _exceptionMessage = "offset < 0";
1846 goto exit;
1847 }
1848 _remaining = _env->GetArrayLength(value_ref) - offset;
1849 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001850 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001851 value = value_base + offset;
1852
1853 glProgramUniform1fv(
1854 (GLuint)program,
1855 (GLint)location,
1856 (GLsizei)count,
1857 (GLfloat *)value
1858 );
1859
1860exit:
1861 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001862 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001863 JNI_ABORT);
1864 }
1865 if (_exception) {
1866 jniThrowException(_env, _exceptionType, _exceptionMessage);
1867 }
1868}
1869
1870/* void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1871static void
1872android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2
1873 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001874 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001875 jint _bufferOffset = (jint) 0;
1876 jint _remaining;
1877 GLfloat *value = (GLfloat *) 0;
1878
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001879 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001880 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001881 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001882 value = (GLfloat *) (_valueBase + _bufferOffset);
1883 }
1884 glProgramUniform1fv(
1885 (GLuint)program,
1886 (GLint)location,
1887 (GLsizei)count,
1888 (GLfloat *)value
1889 );
1890 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001891 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001892 }
1893}
1894
1895/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1896static void
1897android_glProgramUniform2fv__III_3FI
1898 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1899 jint _exception = 0;
1900 const char * _exceptionType = NULL;
1901 const char * _exceptionMessage = NULL;
1902 GLfloat *value_base = (GLfloat *) 0;
1903 jint _remaining;
1904 GLfloat *value = (GLfloat *) 0;
1905
1906 if (!value_ref) {
1907 _exception = 1;
1908 _exceptionType = "java/lang/IllegalArgumentException";
1909 _exceptionMessage = "value == null";
1910 goto exit;
1911 }
1912 if (offset < 0) {
1913 _exception = 1;
1914 _exceptionType = "java/lang/IllegalArgumentException";
1915 _exceptionMessage = "offset < 0";
1916 goto exit;
1917 }
1918 _remaining = _env->GetArrayLength(value_ref) - offset;
1919 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001920 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001921 value = value_base + offset;
1922
1923 glProgramUniform2fv(
1924 (GLuint)program,
1925 (GLint)location,
1926 (GLsizei)count,
1927 (GLfloat *)value
1928 );
1929
1930exit:
1931 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001932 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001933 JNI_ABORT);
1934 }
1935 if (_exception) {
1936 jniThrowException(_env, _exceptionType, _exceptionMessage);
1937 }
1938}
1939
1940/* void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1941static void
1942android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2
1943 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001944 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001945 jint _bufferOffset = (jint) 0;
1946 jint _remaining;
1947 GLfloat *value = (GLfloat *) 0;
1948
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001949 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001950 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001951 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001952 value = (GLfloat *) (_valueBase + _bufferOffset);
1953 }
1954 glProgramUniform2fv(
1955 (GLuint)program,
1956 (GLint)location,
1957 (GLsizei)count,
1958 (GLfloat *)value
1959 );
1960 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001961 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001962 }
1963}
1964
1965/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
1966static void
1967android_glProgramUniform3fv__III_3FI
1968 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
1969 jint _exception = 0;
1970 const char * _exceptionType = NULL;
1971 const char * _exceptionMessage = NULL;
1972 GLfloat *value_base = (GLfloat *) 0;
1973 jint _remaining;
1974 GLfloat *value = (GLfloat *) 0;
1975
1976 if (!value_ref) {
1977 _exception = 1;
1978 _exceptionType = "java/lang/IllegalArgumentException";
1979 _exceptionMessage = "value == null";
1980 goto exit;
1981 }
1982 if (offset < 0) {
1983 _exception = 1;
1984 _exceptionType = "java/lang/IllegalArgumentException";
1985 _exceptionMessage = "offset < 0";
1986 goto exit;
1987 }
1988 _remaining = _env->GetArrayLength(value_ref) - offset;
1989 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07001990 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07001991 value = value_base + offset;
1992
1993 glProgramUniform3fv(
1994 (GLuint)program,
1995 (GLint)location,
1996 (GLsizei)count,
1997 (GLfloat *)value
1998 );
1999
2000exit:
2001 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002002 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002003 JNI_ABORT);
2004 }
2005 if (_exception) {
2006 jniThrowException(_env, _exceptionType, _exceptionMessage);
2007 }
2008}
2009
2010/* void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2011static void
2012android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2
2013 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002014 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002015 jint _bufferOffset = (jint) 0;
2016 jint _remaining;
2017 GLfloat *value = (GLfloat *) 0;
2018
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002019 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002020 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002021 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002022 value = (GLfloat *) (_valueBase + _bufferOffset);
2023 }
2024 glProgramUniform3fv(
2025 (GLuint)program,
2026 (GLint)location,
2027 (GLsizei)count,
2028 (GLfloat *)value
2029 );
2030 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002031 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002032 }
2033}
2034
2035/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2036static void
2037android_glProgramUniform4fv__III_3FI
2038 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jfloatArray value_ref, jint offset) {
2039 jint _exception = 0;
2040 const char * _exceptionType = NULL;
2041 const char * _exceptionMessage = NULL;
2042 GLfloat *value_base = (GLfloat *) 0;
2043 jint _remaining;
2044 GLfloat *value = (GLfloat *) 0;
2045
2046 if (!value_ref) {
2047 _exception = 1;
2048 _exceptionType = "java/lang/IllegalArgumentException";
2049 _exceptionMessage = "value == null";
2050 goto exit;
2051 }
2052 if (offset < 0) {
2053 _exception = 1;
2054 _exceptionType = "java/lang/IllegalArgumentException";
2055 _exceptionMessage = "offset < 0";
2056 goto exit;
2057 }
2058 _remaining = _env->GetArrayLength(value_ref) - offset;
2059 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002060 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002061 value = value_base + offset;
2062
2063 glProgramUniform4fv(
2064 (GLuint)program,
2065 (GLint)location,
2066 (GLsizei)count,
2067 (GLfloat *)value
2068 );
2069
2070exit:
2071 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002072 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002073 JNI_ABORT);
2074 }
2075 if (_exception) {
2076 jniThrowException(_env, _exceptionType, _exceptionMessage);
2077 }
2078}
2079
2080/* void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value ) */
2081static void
2082android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2
2083 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002084 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002085 jint _bufferOffset = (jint) 0;
2086 jint _remaining;
2087 GLfloat *value = (GLfloat *) 0;
2088
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002089 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002090 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002091 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002092 value = (GLfloat *) (_valueBase + _bufferOffset);
2093 }
2094 glProgramUniform4fv(
2095 (GLuint)program,
2096 (GLint)location,
2097 (GLsizei)count,
2098 (GLfloat *)value
2099 );
2100 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002101 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002102 }
2103}
2104
2105/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2106static void
2107android_glProgramUniformMatrix2fv__IIIZ_3FI
2108 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2109 jint _exception = 0;
2110 const char * _exceptionType = NULL;
2111 const char * _exceptionMessage = NULL;
2112 GLfloat *value_base = (GLfloat *) 0;
2113 jint _remaining;
2114 GLfloat *value = (GLfloat *) 0;
2115
2116 if (!value_ref) {
2117 _exception = 1;
2118 _exceptionType = "java/lang/IllegalArgumentException";
2119 _exceptionMessage = "value == null";
2120 goto exit;
2121 }
2122 if (offset < 0) {
2123 _exception = 1;
2124 _exceptionType = "java/lang/IllegalArgumentException";
2125 _exceptionMessage = "offset < 0";
2126 goto exit;
2127 }
2128 _remaining = _env->GetArrayLength(value_ref) - offset;
2129 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002130 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002131 value = value_base + offset;
2132
2133 glProgramUniformMatrix2fv(
2134 (GLuint)program,
2135 (GLint)location,
2136 (GLsizei)count,
2137 (GLboolean)transpose,
2138 (GLfloat *)value
2139 );
2140
2141exit:
2142 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002143 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002144 JNI_ABORT);
2145 }
2146 if (_exception) {
2147 jniThrowException(_env, _exceptionType, _exceptionMessage);
2148 }
2149}
2150
2151/* void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2152static void
2153android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2
2154 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002155 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002156 jint _bufferOffset = (jint) 0;
2157 jint _remaining;
2158 GLfloat *value = (GLfloat *) 0;
2159
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002160 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002161 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002162 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002163 value = (GLfloat *) (_valueBase + _bufferOffset);
2164 }
2165 glProgramUniformMatrix2fv(
2166 (GLuint)program,
2167 (GLint)location,
2168 (GLsizei)count,
2169 (GLboolean)transpose,
2170 (GLfloat *)value
2171 );
2172 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002173 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002174 }
2175}
2176
2177/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2178static void
2179android_glProgramUniformMatrix3fv__IIIZ_3FI
2180 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2181 jint _exception = 0;
2182 const char * _exceptionType = NULL;
2183 const char * _exceptionMessage = NULL;
2184 GLfloat *value_base = (GLfloat *) 0;
2185 jint _remaining;
2186 GLfloat *value = (GLfloat *) 0;
2187
2188 if (!value_ref) {
2189 _exception = 1;
2190 _exceptionType = "java/lang/IllegalArgumentException";
2191 _exceptionMessage = "value == null";
2192 goto exit;
2193 }
2194 if (offset < 0) {
2195 _exception = 1;
2196 _exceptionType = "java/lang/IllegalArgumentException";
2197 _exceptionMessage = "offset < 0";
2198 goto exit;
2199 }
2200 _remaining = _env->GetArrayLength(value_ref) - offset;
2201 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002202 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002203 value = value_base + offset;
2204
2205 glProgramUniformMatrix3fv(
2206 (GLuint)program,
2207 (GLint)location,
2208 (GLsizei)count,
2209 (GLboolean)transpose,
2210 (GLfloat *)value
2211 );
2212
2213exit:
2214 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002215 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002216 JNI_ABORT);
2217 }
2218 if (_exception) {
2219 jniThrowException(_env, _exceptionType, _exceptionMessage);
2220 }
2221}
2222
2223/* void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2224static void
2225android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2
2226 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002227 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002228 jint _bufferOffset = (jint) 0;
2229 jint _remaining;
2230 GLfloat *value = (GLfloat *) 0;
2231
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002232 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002233 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002234 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002235 value = (GLfloat *) (_valueBase + _bufferOffset);
2236 }
2237 glProgramUniformMatrix3fv(
2238 (GLuint)program,
2239 (GLint)location,
2240 (GLsizei)count,
2241 (GLboolean)transpose,
2242 (GLfloat *)value
2243 );
2244 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002245 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002246 }
2247}
2248
2249/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2250static void
2251android_glProgramUniformMatrix4fv__IIIZ_3FI
2252 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2253 jint _exception = 0;
2254 const char * _exceptionType = NULL;
2255 const char * _exceptionMessage = NULL;
2256 GLfloat *value_base = (GLfloat *) 0;
2257 jint _remaining;
2258 GLfloat *value = (GLfloat *) 0;
2259
2260 if (!value_ref) {
2261 _exception = 1;
2262 _exceptionType = "java/lang/IllegalArgumentException";
2263 _exceptionMessage = "value == null";
2264 goto exit;
2265 }
2266 if (offset < 0) {
2267 _exception = 1;
2268 _exceptionType = "java/lang/IllegalArgumentException";
2269 _exceptionMessage = "offset < 0";
2270 goto exit;
2271 }
2272 _remaining = _env->GetArrayLength(value_ref) - offset;
2273 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002274 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002275 value = value_base + offset;
2276
2277 glProgramUniformMatrix4fv(
2278 (GLuint)program,
2279 (GLint)location,
2280 (GLsizei)count,
2281 (GLboolean)transpose,
2282 (GLfloat *)value
2283 );
2284
2285exit:
2286 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002287 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002288 JNI_ABORT);
2289 }
2290 if (_exception) {
2291 jniThrowException(_env, _exceptionType, _exceptionMessage);
2292 }
2293}
2294
2295/* void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2296static void
2297android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2
2298 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002299 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002300 jint _bufferOffset = (jint) 0;
2301 jint _remaining;
2302 GLfloat *value = (GLfloat *) 0;
2303
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002304 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002305 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002306 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002307 value = (GLfloat *) (_valueBase + _bufferOffset);
2308 }
2309 glProgramUniformMatrix4fv(
2310 (GLuint)program,
2311 (GLint)location,
2312 (GLsizei)count,
2313 (GLboolean)transpose,
2314 (GLfloat *)value
2315 );
2316 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002317 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002318 }
2319}
2320
2321/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2322static void
2323android_glProgramUniformMatrix2x3fv__IIIZ_3FI
2324 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2325 jint _exception = 0;
2326 const char * _exceptionType = NULL;
2327 const char * _exceptionMessage = NULL;
2328 GLfloat *value_base = (GLfloat *) 0;
2329 jint _remaining;
2330 GLfloat *value = (GLfloat *) 0;
2331
2332 if (!value_ref) {
2333 _exception = 1;
2334 _exceptionType = "java/lang/IllegalArgumentException";
2335 _exceptionMessage = "value == null";
2336 goto exit;
2337 }
2338 if (offset < 0) {
2339 _exception = 1;
2340 _exceptionType = "java/lang/IllegalArgumentException";
2341 _exceptionMessage = "offset < 0";
2342 goto exit;
2343 }
2344 _remaining = _env->GetArrayLength(value_ref) - offset;
2345 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002346 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002347 value = value_base + offset;
2348
2349 glProgramUniformMatrix2x3fv(
2350 (GLuint)program,
2351 (GLint)location,
2352 (GLsizei)count,
2353 (GLboolean)transpose,
2354 (GLfloat *)value
2355 );
2356
2357exit:
2358 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002359 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002360 JNI_ABORT);
2361 }
2362 if (_exception) {
2363 jniThrowException(_env, _exceptionType, _exceptionMessage);
2364 }
2365}
2366
2367/* void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2368static void
2369android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2
2370 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002371 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002372 jint _bufferOffset = (jint) 0;
2373 jint _remaining;
2374 GLfloat *value = (GLfloat *) 0;
2375
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002376 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002377 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002378 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002379 value = (GLfloat *) (_valueBase + _bufferOffset);
2380 }
2381 glProgramUniformMatrix2x3fv(
2382 (GLuint)program,
2383 (GLint)location,
2384 (GLsizei)count,
2385 (GLboolean)transpose,
2386 (GLfloat *)value
2387 );
2388 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002389 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002390 }
2391}
2392
2393/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2394static void
2395android_glProgramUniformMatrix3x2fv__IIIZ_3FI
2396 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2397 jint _exception = 0;
2398 const char * _exceptionType = NULL;
2399 const char * _exceptionMessage = NULL;
2400 GLfloat *value_base = (GLfloat *) 0;
2401 jint _remaining;
2402 GLfloat *value = (GLfloat *) 0;
2403
2404 if (!value_ref) {
2405 _exception = 1;
2406 _exceptionType = "java/lang/IllegalArgumentException";
2407 _exceptionMessage = "value == null";
2408 goto exit;
2409 }
2410 if (offset < 0) {
2411 _exception = 1;
2412 _exceptionType = "java/lang/IllegalArgumentException";
2413 _exceptionMessage = "offset < 0";
2414 goto exit;
2415 }
2416 _remaining = _env->GetArrayLength(value_ref) - offset;
2417 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002418 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002419 value = value_base + offset;
2420
2421 glProgramUniformMatrix3x2fv(
2422 (GLuint)program,
2423 (GLint)location,
2424 (GLsizei)count,
2425 (GLboolean)transpose,
2426 (GLfloat *)value
2427 );
2428
2429exit:
2430 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002431 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002432 JNI_ABORT);
2433 }
2434 if (_exception) {
2435 jniThrowException(_env, _exceptionType, _exceptionMessage);
2436 }
2437}
2438
2439/* void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2440static void
2441android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2
2442 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002443 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002444 jint _bufferOffset = (jint) 0;
2445 jint _remaining;
2446 GLfloat *value = (GLfloat *) 0;
2447
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002448 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002449 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002450 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002451 value = (GLfloat *) (_valueBase + _bufferOffset);
2452 }
2453 glProgramUniformMatrix3x2fv(
2454 (GLuint)program,
2455 (GLint)location,
2456 (GLsizei)count,
2457 (GLboolean)transpose,
2458 (GLfloat *)value
2459 );
2460 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002461 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002462 }
2463}
2464
2465/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2466static void
2467android_glProgramUniformMatrix2x4fv__IIIZ_3FI
2468 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2469 jint _exception = 0;
2470 const char * _exceptionType = NULL;
2471 const char * _exceptionMessage = NULL;
2472 GLfloat *value_base = (GLfloat *) 0;
2473 jint _remaining;
2474 GLfloat *value = (GLfloat *) 0;
2475
2476 if (!value_ref) {
2477 _exception = 1;
2478 _exceptionType = "java/lang/IllegalArgumentException";
2479 _exceptionMessage = "value == null";
2480 goto exit;
2481 }
2482 if (offset < 0) {
2483 _exception = 1;
2484 _exceptionType = "java/lang/IllegalArgumentException";
2485 _exceptionMessage = "offset < 0";
2486 goto exit;
2487 }
2488 _remaining = _env->GetArrayLength(value_ref) - offset;
2489 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002490 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002491 value = value_base + offset;
2492
2493 glProgramUniformMatrix2x4fv(
2494 (GLuint)program,
2495 (GLint)location,
2496 (GLsizei)count,
2497 (GLboolean)transpose,
2498 (GLfloat *)value
2499 );
2500
2501exit:
2502 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002503 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002504 JNI_ABORT);
2505 }
2506 if (_exception) {
2507 jniThrowException(_env, _exceptionType, _exceptionMessage);
2508 }
2509}
2510
2511/* void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2512static void
2513android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2
2514 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002515 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002516 jint _bufferOffset = (jint) 0;
2517 jint _remaining;
2518 GLfloat *value = (GLfloat *) 0;
2519
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002520 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002521 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002522 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002523 value = (GLfloat *) (_valueBase + _bufferOffset);
2524 }
2525 glProgramUniformMatrix2x4fv(
2526 (GLuint)program,
2527 (GLint)location,
2528 (GLsizei)count,
2529 (GLboolean)transpose,
2530 (GLfloat *)value
2531 );
2532 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002533 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002534 }
2535}
2536
2537/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2538static void
2539android_glProgramUniformMatrix4x2fv__IIIZ_3FI
2540 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2541 jint _exception = 0;
2542 const char * _exceptionType = NULL;
2543 const char * _exceptionMessage = NULL;
2544 GLfloat *value_base = (GLfloat *) 0;
2545 jint _remaining;
2546 GLfloat *value = (GLfloat *) 0;
2547
2548 if (!value_ref) {
2549 _exception = 1;
2550 _exceptionType = "java/lang/IllegalArgumentException";
2551 _exceptionMessage = "value == null";
2552 goto exit;
2553 }
2554 if (offset < 0) {
2555 _exception = 1;
2556 _exceptionType = "java/lang/IllegalArgumentException";
2557 _exceptionMessage = "offset < 0";
2558 goto exit;
2559 }
2560 _remaining = _env->GetArrayLength(value_ref) - offset;
2561 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002562 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002563 value = value_base + offset;
2564
2565 glProgramUniformMatrix4x2fv(
2566 (GLuint)program,
2567 (GLint)location,
2568 (GLsizei)count,
2569 (GLboolean)transpose,
2570 (GLfloat *)value
2571 );
2572
2573exit:
2574 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002575 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002576 JNI_ABORT);
2577 }
2578 if (_exception) {
2579 jniThrowException(_env, _exceptionType, _exceptionMessage);
2580 }
2581}
2582
2583/* void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2584static void
2585android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2
2586 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002587 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002588 jint _bufferOffset = (jint) 0;
2589 jint _remaining;
2590 GLfloat *value = (GLfloat *) 0;
2591
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002592 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002593 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002594 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002595 value = (GLfloat *) (_valueBase + _bufferOffset);
2596 }
2597 glProgramUniformMatrix4x2fv(
2598 (GLuint)program,
2599 (GLint)location,
2600 (GLsizei)count,
2601 (GLboolean)transpose,
2602 (GLfloat *)value
2603 );
2604 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002605 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002606 }
2607}
2608
2609/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2610static void
2611android_glProgramUniformMatrix3x4fv__IIIZ_3FI
2612 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2613 jint _exception = 0;
2614 const char * _exceptionType = NULL;
2615 const char * _exceptionMessage = NULL;
2616 GLfloat *value_base = (GLfloat *) 0;
2617 jint _remaining;
2618 GLfloat *value = (GLfloat *) 0;
2619
2620 if (!value_ref) {
2621 _exception = 1;
2622 _exceptionType = "java/lang/IllegalArgumentException";
2623 _exceptionMessage = "value == null";
2624 goto exit;
2625 }
2626 if (offset < 0) {
2627 _exception = 1;
2628 _exceptionType = "java/lang/IllegalArgumentException";
2629 _exceptionMessage = "offset < 0";
2630 goto exit;
2631 }
2632 _remaining = _env->GetArrayLength(value_ref) - offset;
2633 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002634 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002635 value = value_base + offset;
2636
2637 glProgramUniformMatrix3x4fv(
2638 (GLuint)program,
2639 (GLint)location,
2640 (GLsizei)count,
2641 (GLboolean)transpose,
2642 (GLfloat *)value
2643 );
2644
2645exit:
2646 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002647 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002648 JNI_ABORT);
2649 }
2650 if (_exception) {
2651 jniThrowException(_env, _exceptionType, _exceptionMessage);
2652 }
2653}
2654
2655/* void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2656static void
2657android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2
2658 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002659 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002660 jint _bufferOffset = (jint) 0;
2661 jint _remaining;
2662 GLfloat *value = (GLfloat *) 0;
2663
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002664 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002665 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002666 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002667 value = (GLfloat *) (_valueBase + _bufferOffset);
2668 }
2669 glProgramUniformMatrix3x4fv(
2670 (GLuint)program,
2671 (GLint)location,
2672 (GLsizei)count,
2673 (GLboolean)transpose,
2674 (GLfloat *)value
2675 );
2676 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002677 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002678 }
2679}
2680
2681/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2682static void
2683android_glProgramUniformMatrix4x3fv__IIIZ_3FI
2684 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
2685 jint _exception = 0;
2686 const char * _exceptionType = NULL;
2687 const char * _exceptionMessage = NULL;
2688 GLfloat *value_base = (GLfloat *) 0;
2689 jint _remaining;
2690 GLfloat *value = (GLfloat *) 0;
2691
2692 if (!value_ref) {
2693 _exception = 1;
2694 _exceptionType = "java/lang/IllegalArgumentException";
2695 _exceptionMessage = "value == null";
2696 goto exit;
2697 }
2698 if (offset < 0) {
2699 _exception = 1;
2700 _exceptionType = "java/lang/IllegalArgumentException";
2701 _exceptionMessage = "offset < 0";
2702 goto exit;
2703 }
2704 _remaining = _env->GetArrayLength(value_ref) - offset;
2705 value_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002706 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002707 value = value_base + offset;
2708
2709 glProgramUniformMatrix4x3fv(
2710 (GLuint)program,
2711 (GLint)location,
2712 (GLsizei)count,
2713 (GLboolean)transpose,
2714 (GLfloat *)value
2715 );
2716
2717exit:
2718 if (value_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002719 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002720 JNI_ABORT);
2721 }
2722 if (_exception) {
2723 jniThrowException(_env, _exceptionType, _exceptionMessage);
2724 }
2725}
2726
2727/* void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
2728static void
2729android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2
2730 (JNIEnv *_env, jobject _this, jint program, jint location, jint count, jboolean transpose, jobject value_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002731 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002732 jint _bufferOffset = (jint) 0;
2733 jint _remaining;
2734 GLfloat *value = (GLfloat *) 0;
2735
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002736 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002737 if (value == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002738 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002739 value = (GLfloat *) (_valueBase + _bufferOffset);
2740 }
2741 glProgramUniformMatrix4x3fv(
2742 (GLuint)program,
2743 (GLint)location,
2744 (GLsizei)count,
2745 (GLboolean)transpose,
2746 (GLfloat *)value
2747 );
2748 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002749 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002750 }
2751}
2752
2753/* void glValidateProgramPipeline ( GLuint pipeline ) */
2754static void
2755android_glValidateProgramPipeline__I
2756 (JNIEnv *_env, jobject _this, jint pipeline) {
2757 glValidateProgramPipeline(
2758 (GLuint)pipeline
2759 );
2760}
2761
2762#include <stdlib.h>
2763
2764/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
2765static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
2766 GLint infoLen = 0;
2767 glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
2768 if (!infoLen) {
2769 return _env->NewStringUTF("");
2770 }
2771 char* buf = (char*) malloc(infoLen);
2772 if (buf == NULL) {
2773 jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
2774 return NULL;
2775 }
2776 glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
2777 jstring result = _env->NewStringUTF(buf);
2778 free(buf);
2779 return result;
2780}
2781/* void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format ) */
2782static void
2783android_glBindImageTexture__IIIZIII
2784 (JNIEnv *_env, jobject _this, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) {
2785 glBindImageTexture(
2786 (GLuint)unit,
2787 (GLuint)texture,
2788 (GLint)level,
2789 (GLboolean)layered,
2790 (GLint)layer,
2791 (GLenum)access,
2792 (GLenum)format
2793 );
2794}
2795
2796/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
2797static void
2798android_glGetBooleani_v__II_3ZI
2799 (JNIEnv *_env, jobject _this, jint target, jint index, jbooleanArray data_ref, jint offset) {
2800 jint _exception = 0;
2801 const char * _exceptionType = NULL;
2802 const char * _exceptionMessage = NULL;
2803 GLboolean *data_base = (GLboolean *) 0;
2804 jint _remaining;
2805 GLboolean *data = (GLboolean *) 0;
2806
2807 if (!data_ref) {
2808 _exception = 1;
2809 _exceptionType = "java/lang/IllegalArgumentException";
2810 _exceptionMessage = "data == null";
2811 goto exit;
2812 }
2813 if (offset < 0) {
2814 _exception = 1;
2815 _exceptionType = "java/lang/IllegalArgumentException";
2816 _exceptionMessage = "offset < 0";
2817 goto exit;
2818 }
2819 _remaining = _env->GetArrayLength(data_ref) - offset;
2820 data_base = (GLboolean *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002821 _env->GetBooleanArrayElements(data_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002822 data = data_base + offset;
2823
2824 glGetBooleani_v(
2825 (GLenum)target,
2826 (GLuint)index,
2827 (GLboolean *)data
2828 );
2829
2830exit:
2831 if (data_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002832 _env->ReleaseBooleanArrayElements(data_ref, (jboolean*)data_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002833 _exception ? JNI_ABORT: 0);
2834 }
2835 if (_exception) {
2836 jniThrowException(_env, _exceptionType, _exceptionMessage);
2837 }
2838}
2839
2840/* void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data ) */
2841static void
2842android_glGetBooleani_v__IILjava_nio_IntBuffer_2
2843 (JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002844 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002845 jint _bufferOffset = (jint) 0;
2846 jint _remaining;
2847 GLboolean *data = (GLboolean *) 0;
2848
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002849 data = (GLboolean *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002850 if (data == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002851 char * _dataBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002852 data = (GLboolean *) (_dataBase + _bufferOffset);
2853 }
2854 glGetBooleani_v(
2855 (GLenum)target,
2856 (GLuint)index,
2857 (GLboolean *)data
2858 );
2859 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002860 _env->ReleaseIntArrayElements(_array, (jint*)data, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002861 }
2862}
2863
2864/* void glMemoryBarrier ( GLbitfield barriers ) */
2865static void
2866android_glMemoryBarrier__I
2867 (JNIEnv *_env, jobject _this, jint barriers) {
2868 glMemoryBarrier(
2869 (GLbitfield)barriers
2870 );
2871}
2872
2873/* void glMemoryBarrierByRegion ( GLbitfield barriers ) */
2874static void
2875android_glMemoryBarrierByRegion__I
2876 (JNIEnv *_env, jobject _this, jint barriers) {
2877 glMemoryBarrierByRegion(
2878 (GLbitfield)barriers
2879 );
2880}
2881
2882/* void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations ) */
2883static void
2884android_glTexStorage2DMultisample__IIIIIZ
2885 (JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) {
2886 glTexStorage2DMultisample(
2887 (GLenum)target,
2888 (GLsizei)samples,
2889 (GLenum)internalformat,
2890 (GLsizei)width,
2891 (GLsizei)height,
2892 (GLboolean)fixedsamplelocations
2893 );
2894}
2895
2896/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
2897static void
2898android_glGetMultisamplefv__II_3FI
2899 (JNIEnv *_env, jobject _this, jint pname, jint index, jfloatArray val_ref, jint offset) {
2900 jint _exception = 0;
2901 const char * _exceptionType = NULL;
2902 const char * _exceptionMessage = NULL;
2903 GLfloat *val_base = (GLfloat *) 0;
2904 jint _remaining;
2905 GLfloat *val = (GLfloat *) 0;
2906
2907 if (!val_ref) {
2908 _exception = 1;
2909 _exceptionType = "java/lang/IllegalArgumentException";
2910 _exceptionMessage = "val == null";
2911 goto exit;
2912 }
2913 if (offset < 0) {
2914 _exception = 1;
2915 _exceptionType = "java/lang/IllegalArgumentException";
2916 _exceptionMessage = "offset < 0";
2917 goto exit;
2918 }
2919 _remaining = _env->GetArrayLength(val_ref) - offset;
2920 val_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002921 _env->GetFloatArrayElements(val_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002922 val = val_base + offset;
2923
2924 glGetMultisamplefv(
2925 (GLenum)pname,
2926 (GLuint)index,
2927 (GLfloat *)val
2928 );
2929
2930exit:
2931 if (val_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002932 _env->ReleaseFloatArrayElements(val_ref, (jfloat*)val_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002933 _exception ? JNI_ABORT: 0);
2934 }
2935 if (_exception) {
2936 jniThrowException(_env, _exceptionType, _exceptionMessage);
2937 }
2938}
2939
2940/* void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val ) */
2941static void
2942android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2
2943 (JNIEnv *_env, jobject _this, jint pname, jint index, jobject val_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002944 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002945 jint _bufferOffset = (jint) 0;
2946 jint _remaining;
2947 GLfloat *val = (GLfloat *) 0;
2948
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002949 val = (GLfloat *)getPointer(_env, val_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002950 if (val == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002951 char * _valBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002952 val = (GLfloat *) (_valBase + _bufferOffset);
2953 }
2954 glGetMultisamplefv(
2955 (GLenum)pname,
2956 (GLuint)index,
2957 (GLfloat *)val
2958 );
2959 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002960 _env->ReleaseFloatArrayElements(_array, (jfloat*)val, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07002961 }
2962}
2963
2964/* void glSampleMaski ( GLuint maskNumber, GLbitfield mask ) */
2965static void
2966android_glSampleMaski__II
2967 (JNIEnv *_env, jobject _this, jint maskNumber, jint mask) {
2968 glSampleMaski(
2969 (GLuint)maskNumber,
2970 (GLbitfield)mask
2971 );
2972}
2973
2974/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
2975static void
2976android_glGetTexLevelParameteriv__III_3II
2977 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jintArray params_ref, jint offset) {
2978 jint _exception = 0;
2979 const char * _exceptionType = NULL;
2980 const char * _exceptionMessage = NULL;
2981 GLint *params_base = (GLint *) 0;
2982 jint _remaining;
2983 GLint *params = (GLint *) 0;
2984
2985 if (!params_ref) {
2986 _exception = 1;
2987 _exceptionType = "java/lang/IllegalArgumentException";
2988 _exceptionMessage = "params == null";
2989 goto exit;
2990 }
2991 if (offset < 0) {
2992 _exception = 1;
2993 _exceptionType = "java/lang/IllegalArgumentException";
2994 _exceptionMessage = "offset < 0";
2995 goto exit;
2996 }
2997 _remaining = _env->GetArrayLength(params_ref) - offset;
2998 params_base = (GLint *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07002999 _env->GetIntArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003000 params = params_base + offset;
3001
3002 glGetTexLevelParameteriv(
3003 (GLenum)target,
3004 (GLint)level,
3005 (GLenum)pname,
3006 (GLint *)params
3007 );
3008
3009exit:
3010 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003011 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003012 _exception ? JNI_ABORT: 0);
3013 }
3014 if (_exception) {
3015 jniThrowException(_env, _exceptionType, _exceptionMessage);
3016 }
3017}
3018
3019/* void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) */
3020static void
3021android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2
3022 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003023 jintArray _array = (jintArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003024 jint _bufferOffset = (jint) 0;
3025 jint _remaining;
3026 GLint *params = (GLint *) 0;
3027
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003028 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003029 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003030 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003031 params = (GLint *) (_paramsBase + _bufferOffset);
3032 }
3033 glGetTexLevelParameteriv(
3034 (GLenum)target,
3035 (GLint)level,
3036 (GLenum)pname,
3037 (GLint *)params
3038 );
3039 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003040 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003041 }
3042}
3043
3044/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3045static void
3046android_glGetTexLevelParameterfv__III_3FI
3047 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jfloatArray params_ref, jint offset) {
3048 jint _exception = 0;
3049 const char * _exceptionType = NULL;
3050 const char * _exceptionMessage = NULL;
3051 GLfloat *params_base = (GLfloat *) 0;
3052 jint _remaining;
3053 GLfloat *params = (GLfloat *) 0;
3054
3055 if (!params_ref) {
3056 _exception = 1;
3057 _exceptionType = "java/lang/IllegalArgumentException";
3058 _exceptionMessage = "params == null";
3059 goto exit;
3060 }
3061 if (offset < 0) {
3062 _exception = 1;
3063 _exceptionType = "java/lang/IllegalArgumentException";
3064 _exceptionMessage = "offset < 0";
3065 goto exit;
3066 }
3067 _remaining = _env->GetArrayLength(params_ref) - offset;
3068 params_base = (GLfloat *)
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003069 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003070 params = params_base + offset;
3071
3072 glGetTexLevelParameterfv(
3073 (GLenum)target,
3074 (GLint)level,
3075 (GLenum)pname,
3076 (GLfloat *)params
3077 );
3078
3079exit:
3080 if (params_base) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003081 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003082 _exception ? JNI_ABORT: 0);
3083 }
3084 if (_exception) {
3085 jniThrowException(_env, _exceptionType, _exceptionMessage);
3086 }
3087}
3088
3089/* void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) */
3090static void
3091android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2
3092 (JNIEnv *_env, jobject _this, jint target, jint level, jint pname, jobject params_buf) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003093 jfloatArray _array = (jfloatArray) 0;
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003094 jint _bufferOffset = (jint) 0;
3095 jint _remaining;
3096 GLfloat *params = (GLfloat *) 0;
3097
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003098 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003099 if (params == NULL) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003100 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003101 params = (GLfloat *) (_paramsBase + _bufferOffset);
3102 }
3103 glGetTexLevelParameterfv(
3104 (GLenum)target,
3105 (GLint)level,
3106 (GLenum)pname,
3107 (GLfloat *)params
3108 );
3109 if (_array) {
Hiroshi Yamauchi3b1d46e2015-05-13 13:10:33 -07003110 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, 0);
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003111 }
3112}
3113
3114/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
3115static void
3116android_glBindVertexBuffer__IIJI
3117 (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
3118 if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
3119 jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
3120 return;
3121 }
3122 glBindVertexBuffer(
3123 (GLuint)bindingindex,
3124 (GLuint)buffer,
3125 (GLintptr)offset,
3126 (GLsizei)stride
3127 );
3128}
3129/* void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset ) */
3130static void
3131android_glVertexAttribFormat__IIIZI
3132 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) {
3133 glVertexAttribFormat(
3134 (GLuint)attribindex,
3135 (GLint)size,
3136 (GLenum)type,
3137 (GLboolean)normalized,
3138 (GLuint)relativeoffset
3139 );
3140}
3141
3142/* void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset ) */
3143static void
3144android_glVertexAttribIFormat__IIII
3145 (JNIEnv *_env, jobject _this, jint attribindex, jint size, jint type, jint relativeoffset) {
3146 glVertexAttribIFormat(
3147 (GLuint)attribindex,
3148 (GLint)size,
3149 (GLenum)type,
3150 (GLuint)relativeoffset
3151 );
3152}
3153
3154/* void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex ) */
3155static void
3156android_glVertexAttribBinding__II
3157 (JNIEnv *_env, jobject _this, jint attribindex, jint bindingindex) {
3158 glVertexAttribBinding(
3159 (GLuint)attribindex,
3160 (GLuint)bindingindex
3161 );
3162}
3163
3164/* void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor ) */
3165static void
3166android_glVertexBindingDivisor__II
3167 (JNIEnv *_env, jobject _this, jint bindingindex, jint divisor) {
3168 glVertexBindingDivisor(
3169 (GLuint)bindingindex,
3170 (GLuint)divisor
3171 );
3172}
3173
3174static const char *classPathName = "android/opengl/GLES31";
3175
Daniel Micay76f6a862015-09-19 17:31:01 -04003176static const JNINativeMethod methods[] = {
Jesse Hall7ab63ac2014-05-19 15:13:41 -07003177{"_nativeClassInit", "()V", (void*)nativeClassInit },
3178{"glDispatchCompute", "(III)V", (void *) android_glDispatchCompute__III },
3179{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
3180{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
3181{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
3182{"glFramebufferParameteri", "(III)V", (void *) android_glFramebufferParameteri__III },
3183{"glGetFramebufferParameteriv", "(II[II)V", (void *) android_glGetFramebufferParameteriv__II_3II },
3184{"glGetFramebufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferParameteriv__IILjava_nio_IntBuffer_2 },
3185{"glGetProgramInterfaceiv", "(III[II)V", (void *) android_glGetProgramInterfaceiv__III_3II },
3186{"glGetProgramInterfaceiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetProgramInterfaceiv__IIILjava_nio_IntBuffer_2 },
3187{"glGetProgramResourceIndex", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceIndex__IILjava_lang_String_2 },
3188{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
3189{"glGetProgramResourceiv", "(IIII[III[II[II)V", (void *) android_glGetProgramResourceiv__IIII_3III_3II_3II },
3190{"glGetProgramResourceiv", "(IIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetProgramResourceiv__IIIILjava_nio_IntBuffer_2ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
3191{"glGetProgramResourceLocation", "(IILjava/lang/String;)I", (void *) android_glGetProgramResourceLocation__IILjava_lang_String_2 },
3192{"glUseProgramStages", "(III)V", (void *) android_glUseProgramStages__III },
3193{"glActiveShaderProgram", "(II)V", (void *) android_glActiveShaderProgram__II },
3194{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
3195{"glBindProgramPipeline", "(I)V", (void *) android_glBindProgramPipeline__I },
3196{"glDeleteProgramPipelines", "(I[II)V", (void *) android_glDeleteProgramPipelines__I_3II },
3197{"glDeleteProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteProgramPipelines__ILjava_nio_IntBuffer_2 },
3198{"glGenProgramPipelines", "(I[II)V", (void *) android_glGenProgramPipelines__I_3II },
3199{"glGenProgramPipelines", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenProgramPipelines__ILjava_nio_IntBuffer_2 },
3200{"glIsProgramPipeline", "(I)Z", (void *) android_glIsProgramPipeline__I },
3201{"glGetProgramPipelineiv", "(II[II)V", (void *) android_glGetProgramPipelineiv__II_3II },
3202{"glGetProgramPipelineiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramPipelineiv__IILjava_nio_IntBuffer_2 },
3203{"glProgramUniform1i", "(III)V", (void *) android_glProgramUniform1i__III },
3204{"glProgramUniform2i", "(IIII)V", (void *) android_glProgramUniform2i__IIII },
3205{"glProgramUniform3i", "(IIIII)V", (void *) android_glProgramUniform3i__IIIII },
3206{"glProgramUniform4i", "(IIIIII)V", (void *) android_glProgramUniform4i__IIIIII },
3207{"glProgramUniform1ui", "(III)V", (void *) android_glProgramUniform1ui__III },
3208{"glProgramUniform2ui", "(IIII)V", (void *) android_glProgramUniform2ui__IIII },
3209{"glProgramUniform3ui", "(IIIII)V", (void *) android_glProgramUniform3ui__IIIII },
3210{"glProgramUniform4ui", "(IIIIII)V", (void *) android_glProgramUniform4ui__IIIIII },
3211{"glProgramUniform1f", "(IIF)V", (void *) android_glProgramUniform1f__IIF },
3212{"glProgramUniform2f", "(IIFF)V", (void *) android_glProgramUniform2f__IIFF },
3213{"glProgramUniform3f", "(IIFFF)V", (void *) android_glProgramUniform3f__IIFFF },
3214{"glProgramUniform4f", "(IIFFFF)V", (void *) android_glProgramUniform4f__IIFFFF },
3215{"glProgramUniform1iv", "(III[II)V", (void *) android_glProgramUniform1iv__III_3II },
3216{"glProgramUniform1iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1iv__IIILjava_nio_IntBuffer_2 },
3217{"glProgramUniform2iv", "(III[II)V", (void *) android_glProgramUniform2iv__III_3II },
3218{"glProgramUniform2iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2iv__IIILjava_nio_IntBuffer_2 },
3219{"glProgramUniform3iv", "(III[II)V", (void *) android_glProgramUniform3iv__III_3II },
3220{"glProgramUniform3iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3iv__IIILjava_nio_IntBuffer_2 },
3221{"glProgramUniform4iv", "(III[II)V", (void *) android_glProgramUniform4iv__III_3II },
3222{"glProgramUniform4iv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4iv__IIILjava_nio_IntBuffer_2 },
3223{"glProgramUniform1uiv", "(III[II)V", (void *) android_glProgramUniform1uiv__III_3II },
3224{"glProgramUniform1uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform1uiv__IIILjava_nio_IntBuffer_2 },
3225{"glProgramUniform2uiv", "(III[II)V", (void *) android_glProgramUniform2uiv__III_3II },
3226{"glProgramUniform2uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform2uiv__IIILjava_nio_IntBuffer_2 },
3227{"glProgramUniform3uiv", "(III[II)V", (void *) android_glProgramUniform3uiv__III_3II },
3228{"glProgramUniform3uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform3uiv__IIILjava_nio_IntBuffer_2 },
3229{"glProgramUniform4uiv", "(III[II)V", (void *) android_glProgramUniform4uiv__III_3II },
3230{"glProgramUniform4uiv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glProgramUniform4uiv__IIILjava_nio_IntBuffer_2 },
3231{"glProgramUniform1fv", "(III[FI)V", (void *) android_glProgramUniform1fv__III_3FI },
3232{"glProgramUniform1fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform1fv__IIILjava_nio_FloatBuffer_2 },
3233{"glProgramUniform2fv", "(III[FI)V", (void *) android_glProgramUniform2fv__III_3FI },
3234{"glProgramUniform2fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform2fv__IIILjava_nio_FloatBuffer_2 },
3235{"glProgramUniform3fv", "(III[FI)V", (void *) android_glProgramUniform3fv__III_3FI },
3236{"glProgramUniform3fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform3fv__IIILjava_nio_FloatBuffer_2 },
3237{"glProgramUniform4fv", "(III[FI)V", (void *) android_glProgramUniform4fv__III_3FI },
3238{"glProgramUniform4fv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glProgramUniform4fv__IIILjava_nio_FloatBuffer_2 },
3239{"glProgramUniformMatrix2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2fv__IIIZ_3FI },
3240{"glProgramUniformMatrix2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2fv__IIIZLjava_nio_FloatBuffer_2 },
3241{"glProgramUniformMatrix3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3fv__IIIZ_3FI },
3242{"glProgramUniformMatrix3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3fv__IIIZLjava_nio_FloatBuffer_2 },
3243{"glProgramUniformMatrix4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4fv__IIIZ_3FI },
3244{"glProgramUniformMatrix4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4fv__IIIZLjava_nio_FloatBuffer_2 },
3245{"glProgramUniformMatrix2x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZ_3FI },
3246{"glProgramUniformMatrix2x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x3fv__IIIZLjava_nio_FloatBuffer_2 },
3247{"glProgramUniformMatrix3x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZ_3FI },
3248{"glProgramUniformMatrix3x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x2fv__IIIZLjava_nio_FloatBuffer_2 },
3249{"glProgramUniformMatrix2x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZ_3FI },
3250{"glProgramUniformMatrix2x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix2x4fv__IIIZLjava_nio_FloatBuffer_2 },
3251{"glProgramUniformMatrix4x2fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZ_3FI },
3252{"glProgramUniformMatrix4x2fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x2fv__IIIZLjava_nio_FloatBuffer_2 },
3253{"glProgramUniformMatrix3x4fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZ_3FI },
3254{"glProgramUniformMatrix3x4fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix3x4fv__IIIZLjava_nio_FloatBuffer_2 },
3255{"glProgramUniformMatrix4x3fv", "(IIIZ[FI)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZ_3FI },
3256{"glProgramUniformMatrix4x3fv", "(IIIZLjava/nio/FloatBuffer;)V", (void *) android_glProgramUniformMatrix4x3fv__IIIZLjava_nio_FloatBuffer_2 },
3257{"glValidateProgramPipeline", "(I)V", (void *) android_glValidateProgramPipeline__I },
3258{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
3259{"glBindImageTexture", "(IIIZIII)V", (void *) android_glBindImageTexture__IIIZIII },
3260{"glGetBooleani_v", "(II[ZI)V", (void *) android_glGetBooleani_v__II_3ZI },
3261{"glGetBooleani_v", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBooleani_v__IILjava_nio_IntBuffer_2 },
3262{"glMemoryBarrier", "(I)V", (void *) android_glMemoryBarrier__I },
3263{"glMemoryBarrierByRegion", "(I)V", (void *) android_glMemoryBarrierByRegion__I },
3264{"glTexStorage2DMultisample", "(IIIIIZ)V", (void *) android_glTexStorage2DMultisample__IIIIIZ },
3265{"glGetMultisamplefv", "(II[FI)V", (void *) android_glGetMultisamplefv__II_3FI },
3266{"glGetMultisamplefv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetMultisamplefv__IILjava_nio_FloatBuffer_2 },
3267{"glSampleMaski", "(II)V", (void *) android_glSampleMaski__II },
3268{"glGetTexLevelParameteriv", "(III[II)V", (void *) android_glGetTexLevelParameteriv__III_3II },
3269{"glGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetTexLevelParameteriv__IIILjava_nio_IntBuffer_2 },
3270{"glGetTexLevelParameterfv", "(III[FI)V", (void *) android_glGetTexLevelParameterfv__III_3FI },
3271{"glGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;)V", (void *) android_glGetTexLevelParameterfv__IIILjava_nio_FloatBuffer_2 },
3272{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
3273{"glVertexAttribFormat", "(IIIZI)V", (void *) android_glVertexAttribFormat__IIIZI },
3274{"glVertexAttribIFormat", "(IIII)V", (void *) android_glVertexAttribIFormat__IIII },
3275{"glVertexAttribBinding", "(II)V", (void *) android_glVertexAttribBinding__II },
3276{"glVertexBindingDivisor", "(II)V", (void *) android_glVertexBindingDivisor__II },
3277};
3278
3279int register_android_opengl_jni_GLES31(JNIEnv *_env)
3280{
3281 int err;
3282 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
3283 return err;
3284}