3 ** Copyright 2009, The Android Open Source Project
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
9 ** http://www.apache.org/licenses/LICENSE-2.0
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
18 // This source file is automatically generated
20 #pragma GCC diagnostic ignored "-Wunused-variable"
21 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
22 #pragma GCC diagnostic ignored "-Wunused-function"
24 #include <GLES2/gl2.h>
25 #include <GLES2/gl2ext.h>
29 #include <android_runtime/AndroidRuntime.h>
30 #include <utils/misc.h>
33 static int initialized = 0;
35 static jclass nioAccessClass;
36 static jclass bufferClass;
37 static jmethodID getBasePointerID;
38 static jmethodID getBaseArrayID;
39 static jmethodID getBaseArrayOffsetID;
40 static jfieldID positionID;
41 static jfieldID limitID;
42 static jfieldID elementSizeShiftID;
45 /* special calls implemented in Android's GLES wrapper used to more
46 * efficiently bound-check passed arrays */
48 #ifdef GL_VERSION_ES_CM_1_1
49 GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
50 const GLvoid *ptr, GLsizei count);
51 GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
52 const GLvoid *pointer, GLsizei count);
53 GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
54 GLsizei stride, const GLvoid *pointer, GLsizei count);
55 GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
56 GLsizei stride, const GLvoid *pointer, GLsizei count);
57 GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
58 GLsizei stride, const GLvoid *pointer, GLsizei count);
59 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
60 GLsizei stride, const GLvoid *pointer, GLsizei count);
61 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
62 GLsizei stride, const GLvoid *pointer, GLsizei count);
64 #ifdef GL_ES_VERSION_2_0
65 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
66 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
67 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
70 #ifdef GL_ES_VERSION_3_0
71 static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
72 GLsizei stride, const GLvoid *pointer, GLsizei count) {
73 glVertexAttribIPointer(indx, size, type, stride, pointer);
78 /* Cache method IDs each time the class is loaded. */
81 nativeClassInit(JNIEnv *_env, jclass glImplClass)
83 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
84 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
86 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
87 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
89 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
90 "getBasePointer", "(Ljava/nio/Buffer;)J");
91 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
92 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
93 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
94 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
96 positionID = _env->GetFieldID(bufferClass, "position", "I");
97 limitID = _env->GetFieldID(bufferClass, "limit", "I");
99 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
103 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
107 jint elementSizeShift;
110 position = _env->GetIntField(buffer, positionID);
111 limit = _env->GetIntField(buffer, limitID);
112 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
113 *remaining = (limit - position) << elementSizeShift;
114 pointer = _env->CallStaticLongMethod(nioAccessClass,
115 getBasePointerID, buffer);
118 return reinterpret_cast<void*>(pointer);
121 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
122 getBaseArrayID, buffer);
123 *offset = _env->CallStaticIntMethod(nioAccessClass,
124 getBaseArrayOffsetID, buffer);
129 class ByteArrayGetter {
131 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) {
132 return _env->GetByteArrayElements(array, is_copy);
135 class BooleanArrayGetter {
137 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) {
138 return _env->GetBooleanArrayElements(array, is_copy);
141 class CharArrayGetter {
143 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) {
144 return _env->GetCharArrayElements(array, is_copy);
147 class ShortArrayGetter {
149 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) {
150 return _env->GetShortArrayElements(array, is_copy);
153 class IntArrayGetter {
155 static void* Get(JNIEnv* _env, jintArray array, jboolean* is_copy) {
156 return _env->GetIntArrayElements(array, is_copy);
159 class LongArrayGetter {
161 static void* Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) {
162 return _env->GetLongArrayElements(array, is_copy);
165 class FloatArrayGetter {
167 static void* Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) {
168 return _env->GetFloatArrayElements(array, is_copy);
171 class DoubleArrayGetter {
173 static void* Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) {
174 return _env->GetDoubleArrayElements(array, is_copy);
178 template<typename JTYPEARRAY, typename ARRAYGETTER>
180 getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) {
181 return ARRAYGETTER::Get(_env, array, is_copy);
184 class ByteArrayReleaser {
186 static void Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) {
187 _env->ReleaseByteArrayElements(array, data, commit ? 0 : JNI_ABORT);
190 class BooleanArrayReleaser {
192 static void Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) {
193 _env->ReleaseBooleanArrayElements(array, data, commit ? 0 : JNI_ABORT);
196 class CharArrayReleaser {
198 static void Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) {
199 _env->ReleaseCharArrayElements(array, data, commit ? 0 : JNI_ABORT);
202 class ShortArrayReleaser {
204 static void Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) {
205 _env->ReleaseShortArrayElements(array, data, commit ? 0 : JNI_ABORT);
208 class IntArrayReleaser {
210 static void Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) {
211 _env->ReleaseIntArrayElements(array, data, commit ? 0 : JNI_ABORT);
214 class LongArrayReleaser {
216 static void Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) {
217 _env->ReleaseLongArrayElements(array, data, commit ? 0 : JNI_ABORT);
220 class FloatArrayReleaser {
222 static void Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) {
223 _env->ReleaseFloatArrayElements(array, data, commit ? 0 : JNI_ABORT);
226 class DoubleArrayReleaser {
228 static void Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) {
229 _env->ReleaseDoubleArrayElements(array, data, commit ? 0 : JNI_ABORT);
233 template<typename JTYPEARRAY, typename NTYPEARRAY, typename ARRAYRELEASER>
235 releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) {
236 ARRAYRELEASER::Release(_env, array, data, commit);
240 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
242 _env->ReleasePrimitiveArrayCritical(array, data,
243 commit ? 0 : JNI_ABORT);
247 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
248 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
250 jint position = _env->GetIntField(buffer, positionID);
251 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
252 buf += position << elementSizeShift;
254 jniThrowException(_env, "java/lang/IllegalArgumentException",
255 "Must use a native order direct Buffer");
260 // --------------------------------------------------------------------------
263 * returns the number of values glGet returns for a given pname.
265 * The code below is written such that pnames requiring only one values
266 * are the default (and are not explicitely tested for). This makes the
267 * checking code much shorter/readable/efficient.
269 * This means that unknown pnames (e.g.: extensions) will default to 1. If
270 * that unknown pname needs more than 1 value, then the validation check
271 * is incomplete and the app may crash if it passed the wrong number params.
273 static int getNeededCount(GLint pname) {
275 #ifdef GL_ES_VERSION_2_0
278 case GL_ALIASED_LINE_WIDTH_RANGE:
279 case GL_ALIASED_POINT_SIZE_RANGE:
284 case GL_COLOR_CLEAR_VALUE:
285 case GL_COLOR_WRITEMASK:
291 case GL_COMPRESSED_TEXTURE_FORMATS:
292 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
295 case GL_SHADER_BINARY_FORMATS:
296 glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
301 #ifdef GL_VERSION_ES_CM_1_1
304 case GL_ALIASED_LINE_WIDTH_RANGE:
305 case GL_ALIASED_POINT_SIZE_RANGE:
307 case GL_SMOOTH_LINE_WIDTH_RANGE:
308 case GL_SMOOTH_POINT_SIZE_RANGE:
312 case GL_CURRENT_NORMAL:
313 case GL_POINT_DISTANCE_ATTENUATION:
317 case GL_COLOR_CLEAR_VALUE:
318 case GL_COLOR_WRITEMASK:
319 case GL_CURRENT_COLOR:
320 case GL_CURRENT_TEXTURE_COORDS:
322 case GL_LIGHT_MODEL_AMBIENT:
328 case GL_MODELVIEW_MATRIX:
329 case GL_PROJECTION_MATRIX:
330 case GL_TEXTURE_MATRIX:
334 case GL_COMPRESSED_TEXTURE_FORMATS:
335 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
342 template <typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
343 typename ARRAYRELEASER, typename CTYPE, void GET(GLenum, CTYPE*)>
346 (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
348 const char * _exceptionType;
349 const char * _exceptionMessage;
350 CTYPE *params_base = (CTYPE *) 0;
352 CTYPE *params = (CTYPE *) 0;
357 _exceptionType = "java/lang/IllegalArgumentException";
358 _exceptionMessage = "params == null";
363 _exceptionType = "java/lang/IllegalArgumentException";
364 _exceptionMessage = "offset < 0";
367 _remaining = _env->GetArrayLength(params_ref) - offset;
368 _needed = getNeededCount(pname);
369 // if we didn't find this pname, we just assume the user passed
370 // an array of the right size -- this might happen with extensions
371 // or if we forget an enum here.
372 if (_remaining < _needed) {
374 _exceptionType = "java/lang/IllegalArgumentException";
375 _exceptionMessage = "length - offset < needed";
378 params_base = (CTYPE *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
379 _env, params_ref, (jboolean *)0);
380 params = params_base + offset;
389 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
390 _env, params_ref, params_base, !_exception);
393 jniThrowException(_env, _exceptionType, _exceptionMessage);
398 template <typename CTYPE, typename JTYPEARRAY, typename ARRAYGETTER, typename NTYPEARRAY,
399 typename ARRAYRELEASER, void GET(GLenum, CTYPE*)>
402 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
404 const char * _exceptionType;
405 const char * _exceptionMessage;
406 JTYPEARRAY _array = (JTYPEARRAY) 0;
407 jint _bufferOffset = (jint) 0;
409 CTYPE *params = (CTYPE *) 0;
412 params = (CTYPE *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
413 _remaining /= sizeof(CTYPE); // convert from bytes to item count
414 _needed = getNeededCount(pname);
415 // if we didn't find this pname, we just assume the user passed
416 // an array of the right size -- this might happen with extensions
417 // or if we forget an enum here.
418 if (_needed>0 && _remaining < _needed) {
420 _exceptionType = "java/lang/IllegalArgumentException";
421 _exceptionMessage = "remaining() < needed";
424 if (params == NULL) {
425 char * _paramsBase = (char *) getArrayPointer<JTYPEARRAY, ARRAYGETTER>(
426 _env, _array, (jboolean *) 0);
427 params = (CTYPE *) (_paramsBase + _bufferOffset);
436 releaseArrayPointer<JTYPEARRAY, NTYPEARRAY, ARRAYRELEASER>(
437 _env, _array, (NTYPEARRAY)params, _exception ? JNI_FALSE : JNI_TRUE);
440 jniThrowException(_env, _exceptionType, _exceptionMessage);
444 // --------------------------------------------------------------------------
445 /* void glActiveTexture ( GLenum texture ) */
447 android_glActiveTexture__I
448 (JNIEnv *_env, jobject _this, jint texture) {
454 /* void glAttachShader ( GLuint program, GLuint shader ) */
456 android_glAttachShader__II
457 (JNIEnv *_env, jobject _this, jint program, jint shader) {
464 /* void glBindAttribLocation ( GLuint program, GLuint index, const char *name ) */
466 android_glBindAttribLocation__IILjava_lang_String_2
467 (JNIEnv *_env, jobject _this, jint program, jint index, jstring name) {
469 const char * _exceptionType = NULL;
470 const char * _exceptionMessage = NULL;
471 const char* _nativename = 0;
475 _exceptionType = "java/lang/IllegalArgumentException";
476 _exceptionMessage = "name == null";
479 _nativename = _env->GetStringUTFChars(name, 0);
481 glBindAttribLocation(
489 _env->ReleaseStringUTFChars(name, _nativename);
493 jniThrowException(_env, _exceptionType, _exceptionMessage);
497 /* void glBindBuffer ( GLenum target, GLuint buffer ) */
499 android_glBindBuffer__II
500 (JNIEnv *_env, jobject _this, jint target, jint buffer) {
507 /* void glBindFramebuffer ( GLenum target, GLuint framebuffer ) */
509 android_glBindFramebuffer__II
510 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
517 /* void glBindRenderbuffer ( GLenum target, GLuint renderbuffer ) */
519 android_glBindRenderbuffer__II
520 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
527 /* void glBindTexture ( GLenum target, GLuint texture ) */
529 android_glBindTexture__II
530 (JNIEnv *_env, jobject _this, jint target, jint texture) {
537 /* void glBlendColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */
539 android_glBlendColor__FFFF
540 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
549 /* void glBlendEquation ( GLenum mode ) */
551 android_glBlendEquation__I
552 (JNIEnv *_env, jobject _this, jint mode) {
558 /* void glBlendEquationSeparate ( GLenum modeRGB, GLenum modeAlpha ) */
560 android_glBlendEquationSeparate__II
561 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
562 glBlendEquationSeparate(
568 /* void glBlendFunc ( GLenum sfactor, GLenum dfactor ) */
570 android_glBlendFunc__II
571 (JNIEnv *_env, jobject _this, jint sfactor, jint dfactor) {
578 /* void glBlendFuncSeparate ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
580 android_glBlendFuncSeparate__IIII
581 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
590 /* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */
592 android_glBufferData__IILjava_nio_Buffer_2I
593 (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
595 const char * _exceptionType = NULL;
596 const char * _exceptionMessage = NULL;
597 jarray _array = (jarray) 0;
598 jint _bufferOffset = (jint) 0;
600 GLvoid *data = (GLvoid *) 0;
603 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
604 if (_remaining < size) {
606 _exceptionType = "java/lang/IllegalArgumentException";
607 _exceptionMessage = "remaining() < size < needed";
611 if (data_buf && data == NULL) {
612 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
613 data = (GLvoid *) (_dataBase + _bufferOffset);
624 releasePointer(_env, _array, data, JNI_FALSE);
627 jniThrowException(_env, _exceptionType, _exceptionMessage);
631 /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
633 android_glBufferSubData__IIILjava_nio_Buffer_2
634 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
636 const char * _exceptionType = NULL;
637 const char * _exceptionMessage = NULL;
638 jarray _array = (jarray) 0;
639 jint _bufferOffset = (jint) 0;
641 GLvoid *data = (GLvoid *) 0;
643 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
644 if (_remaining < size) {
646 _exceptionType = "java/lang/IllegalArgumentException";
647 _exceptionMessage = "remaining() < size < needed";
651 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
652 data = (GLvoid *) (_dataBase + _bufferOffset);
663 releasePointer(_env, _array, data, JNI_FALSE);
666 jniThrowException(_env, _exceptionType, _exceptionMessage);
670 /* GLenum glCheckFramebufferStatus ( GLenum target ) */
672 android_glCheckFramebufferStatus__I
673 (JNIEnv *_env, jobject _this, jint target) {
675 _returnValue = glCheckFramebufferStatus(
678 return (jint)_returnValue;
681 /* void glClear ( GLbitfield mask ) */
684 (JNIEnv *_env, jobject _this, jint mask) {
690 /* void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */
692 android_glClearColor__FFFF
693 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
702 /* void glClearDepthf ( GLclampf depth ) */
704 android_glClearDepthf__F
705 (JNIEnv *_env, jobject _this, jfloat depth) {
711 /* void glClearStencil ( GLint s ) */
713 android_glClearStencil__I
714 (JNIEnv *_env, jobject _this, jint s) {
720 /* void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) */
722 android_glColorMask__ZZZZ
723 (JNIEnv *_env, jobject _this, jboolean red, jboolean green, jboolean blue, jboolean alpha) {
732 /* void glCompileShader ( GLuint shader ) */
734 android_glCompileShader__I
735 (JNIEnv *_env, jobject _this, jint shader) {
741 /* void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) */
743 android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
744 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
745 jarray _array = (jarray) 0;
746 jint _bufferOffset = (jint) 0;
748 GLvoid *data = (GLvoid *) 0;
750 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
752 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
753 data = (GLvoid *) (_dataBase + _bufferOffset);
755 glCompressedTexImage2D(
758 (GLenum)internalformat,
766 releasePointer(_env, _array, data, JNI_FALSE);
770 /* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */
772 android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
773 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
774 jarray _array = (jarray) 0;
775 jint _bufferOffset = (jint) 0;
777 GLvoid *data = (GLvoid *) 0;
779 data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
781 char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
782 data = (GLvoid *) (_dataBase + _bufferOffset);
784 glCompressedTexSubImage2D(
796 releasePointer(_env, _array, data, JNI_FALSE);
800 /* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */
802 android_glCopyTexImage2D__IIIIIIII
803 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) {
807 (GLenum)internalformat,
816 /* void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
818 android_glCopyTexSubImage2D__IIIIIIII
819 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) {
832 /* GLuint glCreateProgram ( void ) */
834 android_glCreateProgram__
835 (JNIEnv *_env, jobject _this) {
837 _returnValue = glCreateProgram();
838 return (jint)_returnValue;
841 /* GLuint glCreateShader ( GLenum type ) */
843 android_glCreateShader__I
844 (JNIEnv *_env, jobject _this, jint type) {
846 _returnValue = glCreateShader(
849 return (jint)_returnValue;
852 /* void glCullFace ( GLenum mode ) */
854 android_glCullFace__I
855 (JNIEnv *_env, jobject _this, jint mode) {
861 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
863 android_glDeleteBuffers__I_3II
864 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
866 const char * _exceptionType = NULL;
867 const char * _exceptionMessage = NULL;
868 GLuint *buffers_base = (GLuint *) 0;
870 GLuint *buffers = (GLuint *) 0;
874 _exceptionType = "java/lang/IllegalArgumentException";
875 _exceptionMessage = "buffers == null";
880 _exceptionType = "java/lang/IllegalArgumentException";
881 _exceptionMessage = "offset < 0";
884 _remaining = _env->GetArrayLength(buffers_ref) - offset;
885 if (_remaining < n) {
887 _exceptionType = "java/lang/IllegalArgumentException";
888 _exceptionMessage = "length - offset < n < needed";
891 buffers_base = (GLuint *)
892 _env->GetIntArrayElements(buffers_ref, (jboolean *)0);
893 buffers = buffers_base + offset;
902 _env->ReleaseIntArrayElements(buffers_ref, (jint*)buffers_base,
906 jniThrowException(_env, _exceptionType, _exceptionMessage);
910 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
912 android_glDeleteBuffers__ILjava_nio_IntBuffer_2
913 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
915 const char * _exceptionType = NULL;
916 const char * _exceptionMessage = NULL;
917 jintArray _array = (jintArray) 0;
918 jint _bufferOffset = (jint) 0;
920 GLuint *buffers = (GLuint *) 0;
922 buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
923 if (_remaining < n) {
925 _exceptionType = "java/lang/IllegalArgumentException";
926 _exceptionMessage = "remaining() < n < needed";
929 if (buffers == NULL) {
930 char * _buffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
931 buffers = (GLuint *) (_buffersBase + _bufferOffset);
940 _env->ReleaseIntArrayElements(_array, (jint*)buffers, JNI_ABORT);
943 jniThrowException(_env, _exceptionType, _exceptionMessage);
947 /* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */
949 android_glDeleteFramebuffers__I_3II
950 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
952 const char * _exceptionType = NULL;
953 const char * _exceptionMessage = NULL;
954 GLuint *framebuffers_base = (GLuint *) 0;
956 GLuint *framebuffers = (GLuint *) 0;
958 if (!framebuffers_ref) {
960 _exceptionType = "java/lang/IllegalArgumentException";
961 _exceptionMessage = "framebuffers == null";
966 _exceptionType = "java/lang/IllegalArgumentException";
967 _exceptionMessage = "offset < 0";
970 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
971 if (_remaining < n) {
973 _exceptionType = "java/lang/IllegalArgumentException";
974 _exceptionMessage = "length - offset < n < needed";
977 framebuffers_base = (GLuint *)
978 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
979 framebuffers = framebuffers_base + offset;
981 glDeleteFramebuffers(
983 (GLuint *)framebuffers
987 if (framebuffers_base) {
988 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
992 jniThrowException(_env, _exceptionType, _exceptionMessage);
996 /* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */
998 android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2
999 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
1000 jint _exception = 0;
1001 const char * _exceptionType = NULL;
1002 const char * _exceptionMessage = NULL;
1003 jintArray _array = (jintArray) 0;
1004 jint _bufferOffset = (jint) 0;
1006 GLuint *framebuffers = (GLuint *) 0;
1008 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1009 if (_remaining < n) {
1011 _exceptionType = "java/lang/IllegalArgumentException";
1012 _exceptionMessage = "remaining() < n < needed";
1015 if (framebuffers == NULL) {
1016 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1017 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
1019 glDeleteFramebuffers(
1021 (GLuint *)framebuffers
1026 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, JNI_ABORT);
1029 jniThrowException(_env, _exceptionType, _exceptionMessage);
1033 /* void glDeleteProgram ( GLuint program ) */
1035 android_glDeleteProgram__I
1036 (JNIEnv *_env, jobject _this, jint program) {
1042 /* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */
1044 android_glDeleteRenderbuffers__I_3II
1045 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
1046 jint _exception = 0;
1047 const char * _exceptionType = NULL;
1048 const char * _exceptionMessage = NULL;
1049 GLuint *renderbuffers_base = (GLuint *) 0;
1051 GLuint *renderbuffers = (GLuint *) 0;
1053 if (!renderbuffers_ref) {
1055 _exceptionType = "java/lang/IllegalArgumentException";
1056 _exceptionMessage = "renderbuffers == null";
1061 _exceptionType = "java/lang/IllegalArgumentException";
1062 _exceptionMessage = "offset < 0";
1065 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1066 if (_remaining < n) {
1068 _exceptionType = "java/lang/IllegalArgumentException";
1069 _exceptionMessage = "length - offset < n < needed";
1072 renderbuffers_base = (GLuint *)
1073 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
1074 renderbuffers = renderbuffers_base + offset;
1076 glDeleteRenderbuffers(
1078 (GLuint *)renderbuffers
1082 if (renderbuffers_base) {
1083 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
1087 jniThrowException(_env, _exceptionType, _exceptionMessage);
1091 /* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */
1093 android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2
1094 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
1095 jint _exception = 0;
1096 const char * _exceptionType = NULL;
1097 const char * _exceptionMessage = NULL;
1098 jintArray _array = (jintArray) 0;
1099 jint _bufferOffset = (jint) 0;
1101 GLuint *renderbuffers = (GLuint *) 0;
1103 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1104 if (_remaining < n) {
1106 _exceptionType = "java/lang/IllegalArgumentException";
1107 _exceptionMessage = "remaining() < n < needed";
1110 if (renderbuffers == NULL) {
1111 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1112 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
1114 glDeleteRenderbuffers(
1116 (GLuint *)renderbuffers
1121 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, JNI_ABORT);
1124 jniThrowException(_env, _exceptionType, _exceptionMessage);
1128 /* void glDeleteShader ( GLuint shader ) */
1130 android_glDeleteShader__I
1131 (JNIEnv *_env, jobject _this, jint shader) {
1137 /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
1139 android_glDeleteTextures__I_3II
1140 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
1141 jint _exception = 0;
1142 const char * _exceptionType = NULL;
1143 const char * _exceptionMessage = NULL;
1144 GLuint *textures_base = (GLuint *) 0;
1146 GLuint *textures = (GLuint *) 0;
1148 if (!textures_ref) {
1150 _exceptionType = "java/lang/IllegalArgumentException";
1151 _exceptionMessage = "textures == null";
1156 _exceptionType = "java/lang/IllegalArgumentException";
1157 _exceptionMessage = "offset < 0";
1160 _remaining = _env->GetArrayLength(textures_ref) - offset;
1161 if (_remaining < n) {
1163 _exceptionType = "java/lang/IllegalArgumentException";
1164 _exceptionMessage = "length - offset < n < needed";
1167 textures_base = (GLuint *)
1168 _env->GetIntArrayElements(textures_ref, (jboolean *)0);
1169 textures = textures_base + offset;
1177 if (textures_base) {
1178 _env->ReleaseIntArrayElements(textures_ref, (jint*)textures_base,
1182 jniThrowException(_env, _exceptionType, _exceptionMessage);
1186 /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
1188 android_glDeleteTextures__ILjava_nio_IntBuffer_2
1189 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
1190 jint _exception = 0;
1191 const char * _exceptionType = NULL;
1192 const char * _exceptionMessage = NULL;
1193 jintArray _array = (jintArray) 0;
1194 jint _bufferOffset = (jint) 0;
1196 GLuint *textures = (GLuint *) 0;
1198 textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1199 if (_remaining < n) {
1201 _exceptionType = "java/lang/IllegalArgumentException";
1202 _exceptionMessage = "remaining() < n < needed";
1205 if (textures == NULL) {
1206 char * _texturesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1207 textures = (GLuint *) (_texturesBase + _bufferOffset);
1216 _env->ReleaseIntArrayElements(_array, (jint*)textures, JNI_ABORT);
1219 jniThrowException(_env, _exceptionType, _exceptionMessage);
1223 /* void glDepthFunc ( GLenum func ) */
1225 android_glDepthFunc__I
1226 (JNIEnv *_env, jobject _this, jint func) {
1232 /* void glDepthMask ( GLboolean flag ) */
1234 android_glDepthMask__Z
1235 (JNIEnv *_env, jobject _this, jboolean flag) {
1241 /* void glDepthRangef ( GLclampf zNear, GLclampf zFar ) */
1243 android_glDepthRangef__FF
1244 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
1251 /* void glDetachShader ( GLuint program, GLuint shader ) */
1253 android_glDetachShader__II
1254 (JNIEnv *_env, jobject _this, jint program, jint shader) {
1261 /* void glDisable ( GLenum cap ) */
1263 android_glDisable__I
1264 (JNIEnv *_env, jobject _this, jint cap) {
1270 /* void glDisableVertexAttribArray ( GLuint index ) */
1272 android_glDisableVertexAttribArray__I
1273 (JNIEnv *_env, jobject _this, jint index) {
1274 glDisableVertexAttribArray(
1279 /* void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) */
1281 android_glDrawArrays__III
1282 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count) {
1290 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
1292 android_glDrawElements__IIII
1293 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
1294 jint _exception = 0;
1295 const char * _exceptionType = NULL;
1296 const char * _exceptionMessage = NULL;
1301 reinterpret_cast<GLvoid *>(offset)
1304 jniThrowException(_env, _exceptionType, _exceptionMessage);
1308 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
1310 android_glDrawElements__IIILjava_nio_Buffer_2
1311 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) {
1312 jint _exception = 0;
1313 const char * _exceptionType = NULL;
1314 const char * _exceptionMessage = NULL;
1315 jarray _array = (jarray) 0;
1316 jint _bufferOffset = (jint) 0;
1318 GLvoid *indices = (GLvoid *) 0;
1320 indices = (GLvoid *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1321 if (_remaining < count) {
1323 _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
1324 _exceptionMessage = "remaining() < count < needed";
1327 if (indices == NULL) {
1328 char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
1329 indices = (GLvoid *) (_indicesBase + _bufferOffset);
1340 releasePointer(_env, _array, indices, JNI_FALSE);
1343 jniThrowException(_env, _exceptionType, _exceptionMessage);
1347 /* void glEnable ( GLenum cap ) */
1350 (JNIEnv *_env, jobject _this, jint cap) {
1356 /* void glEnableVertexAttribArray ( GLuint index ) */
1358 android_glEnableVertexAttribArray__I
1359 (JNIEnv *_env, jobject _this, jint index) {
1360 glEnableVertexAttribArray(
1365 /* void glFinish ( void ) */
1368 (JNIEnv *_env, jobject _this) {
1372 /* void glFlush ( void ) */
1375 (JNIEnv *_env, jobject _this) {
1379 /* void glFramebufferRenderbuffer ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
1381 android_glFramebufferRenderbuffer__IIII
1382 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
1383 glFramebufferRenderbuffer(
1386 (GLenum)renderbuffertarget,
1387 (GLuint)renderbuffer
1391 /* void glFramebufferTexture2D ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
1393 android_glFramebufferTexture2D__IIIII
1394 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
1395 glFramebufferTexture2D(
1404 /* void glFrontFace ( GLenum mode ) */
1406 android_glFrontFace__I
1407 (JNIEnv *_env, jobject _this, jint mode) {
1413 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
1415 android_glGenBuffers__I_3II
1416 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
1417 jint _exception = 0;
1418 const char * _exceptionType = NULL;
1419 const char * _exceptionMessage = NULL;
1420 GLuint *buffers_base = (GLuint *) 0;
1422 GLuint *buffers = (GLuint *) 0;
1426 _exceptionType = "java/lang/IllegalArgumentException";
1427 _exceptionMessage = "buffers == null";
1432 _exceptionType = "java/lang/IllegalArgumentException";
1433 _exceptionMessage = "offset < 0";
1436 _remaining = _env->GetArrayLength(buffers_ref) - offset;
1437 if (_remaining < n) {
1439 _exceptionType = "java/lang/IllegalArgumentException";
1440 _exceptionMessage = "length - offset < n < needed";
1443 buffers_base = (GLuint *)
1444 _env->GetIntArrayElements(buffers_ref, (jboolean *)0);
1445 buffers = buffers_base + offset;
1454 _env->ReleaseIntArrayElements(buffers_ref, (jint*)buffers_base,
1455 _exception ? JNI_ABORT: 0);
1458 jniThrowException(_env, _exceptionType, _exceptionMessage);
1462 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
1464 android_glGenBuffers__ILjava_nio_IntBuffer_2
1465 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
1466 jint _exception = 0;
1467 const char * _exceptionType = NULL;
1468 const char * _exceptionMessage = NULL;
1469 jintArray _array = (jintArray) 0;
1470 jint _bufferOffset = (jint) 0;
1472 GLuint *buffers = (GLuint *) 0;
1474 buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1475 if (_remaining < n) {
1477 _exceptionType = "java/lang/IllegalArgumentException";
1478 _exceptionMessage = "remaining() < n < needed";
1481 if (buffers == NULL) {
1482 char * _buffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1483 buffers = (GLuint *) (_buffersBase + _bufferOffset);
1492 _env->ReleaseIntArrayElements(_array, (jint*)buffers, _exception ? JNI_ABORT : 0);
1495 jniThrowException(_env, _exceptionType, _exceptionMessage);
1499 /* void glGenerateMipmap ( GLenum target ) */
1501 android_glGenerateMipmap__I
1502 (JNIEnv *_env, jobject _this, jint target) {
1508 /* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */
1510 android_glGenFramebuffers__I_3II
1511 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
1512 jint _exception = 0;
1513 const char * _exceptionType = NULL;
1514 const char * _exceptionMessage = NULL;
1515 GLuint *framebuffers_base = (GLuint *) 0;
1517 GLuint *framebuffers = (GLuint *) 0;
1519 if (!framebuffers_ref) {
1521 _exceptionType = "java/lang/IllegalArgumentException";
1522 _exceptionMessage = "framebuffers == null";
1527 _exceptionType = "java/lang/IllegalArgumentException";
1528 _exceptionMessage = "offset < 0";
1531 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
1532 if (_remaining < n) {
1534 _exceptionType = "java/lang/IllegalArgumentException";
1535 _exceptionMessage = "length - offset < n < needed";
1538 framebuffers_base = (GLuint *)
1539 _env->GetIntArrayElements(framebuffers_ref, (jboolean *)0);
1540 framebuffers = framebuffers_base + offset;
1544 (GLuint *)framebuffers
1548 if (framebuffers_base) {
1549 _env->ReleaseIntArrayElements(framebuffers_ref, (jint*)framebuffers_base,
1550 _exception ? JNI_ABORT: 0);
1553 jniThrowException(_env, _exceptionType, _exceptionMessage);
1557 /* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */
1559 android_glGenFramebuffers__ILjava_nio_IntBuffer_2
1560 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
1561 jint _exception = 0;
1562 const char * _exceptionType = NULL;
1563 const char * _exceptionMessage = NULL;
1564 jintArray _array = (jintArray) 0;
1565 jint _bufferOffset = (jint) 0;
1567 GLuint *framebuffers = (GLuint *) 0;
1569 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1570 if (_remaining < n) {
1572 _exceptionType = "java/lang/IllegalArgumentException";
1573 _exceptionMessage = "remaining() < n < needed";
1576 if (framebuffers == NULL) {
1577 char * _framebuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1578 framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
1582 (GLuint *)framebuffers
1587 _env->ReleaseIntArrayElements(_array, (jint*)framebuffers, _exception ? JNI_ABORT : 0);
1590 jniThrowException(_env, _exceptionType, _exceptionMessage);
1594 /* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */
1596 android_glGenRenderbuffers__I_3II
1597 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
1598 jint _exception = 0;
1599 const char * _exceptionType = NULL;
1600 const char * _exceptionMessage = NULL;
1601 GLuint *renderbuffers_base = (GLuint *) 0;
1603 GLuint *renderbuffers = (GLuint *) 0;
1605 if (!renderbuffers_ref) {
1607 _exceptionType = "java/lang/IllegalArgumentException";
1608 _exceptionMessage = "renderbuffers == null";
1613 _exceptionType = "java/lang/IllegalArgumentException";
1614 _exceptionMessage = "offset < 0";
1617 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1618 if (_remaining < n) {
1620 _exceptionType = "java/lang/IllegalArgumentException";
1621 _exceptionMessage = "length - offset < n < needed";
1624 renderbuffers_base = (GLuint *)
1625 _env->GetIntArrayElements(renderbuffers_ref, (jboolean *)0);
1626 renderbuffers = renderbuffers_base + offset;
1630 (GLuint *)renderbuffers
1634 if (renderbuffers_base) {
1635 _env->ReleaseIntArrayElements(renderbuffers_ref, (jint*)renderbuffers_base,
1636 _exception ? JNI_ABORT: 0);
1639 jniThrowException(_env, _exceptionType, _exceptionMessage);
1643 /* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */
1645 android_glGenRenderbuffers__ILjava_nio_IntBuffer_2
1646 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
1647 jint _exception = 0;
1648 const char * _exceptionType = NULL;
1649 const char * _exceptionMessage = NULL;
1650 jintArray _array = (jintArray) 0;
1651 jint _bufferOffset = (jint) 0;
1653 GLuint *renderbuffers = (GLuint *) 0;
1655 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1656 if (_remaining < n) {
1658 _exceptionType = "java/lang/IllegalArgumentException";
1659 _exceptionMessage = "remaining() < n < needed";
1662 if (renderbuffers == NULL) {
1663 char * _renderbuffersBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1664 renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
1668 (GLuint *)renderbuffers
1673 _env->ReleaseIntArrayElements(_array, (jint*)renderbuffers, _exception ? JNI_ABORT : 0);
1676 jniThrowException(_env, _exceptionType, _exceptionMessage);
1680 /* void glGenTextures ( GLsizei n, GLuint *textures ) */
1682 android_glGenTextures__I_3II
1683 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
1684 jint _exception = 0;
1685 const char * _exceptionType = NULL;
1686 const char * _exceptionMessage = NULL;
1687 GLuint *textures_base = (GLuint *) 0;
1689 GLuint *textures = (GLuint *) 0;
1691 if (!textures_ref) {
1693 _exceptionType = "java/lang/IllegalArgumentException";
1694 _exceptionMessage = "textures == null";
1699 _exceptionType = "java/lang/IllegalArgumentException";
1700 _exceptionMessage = "offset < 0";
1703 _remaining = _env->GetArrayLength(textures_ref) - offset;
1704 if (_remaining < n) {
1706 _exceptionType = "java/lang/IllegalArgumentException";
1707 _exceptionMessage = "length - offset < n < needed";
1710 textures_base = (GLuint *)
1711 _env->GetIntArrayElements(textures_ref, (jboolean *)0);
1712 textures = textures_base + offset;
1720 if (textures_base) {
1721 _env->ReleaseIntArrayElements(textures_ref, (jint*)textures_base,
1722 _exception ? JNI_ABORT: 0);
1725 jniThrowException(_env, _exceptionType, _exceptionMessage);
1729 /* void glGenTextures ( GLsizei n, GLuint *textures ) */
1731 android_glGenTextures__ILjava_nio_IntBuffer_2
1732 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
1733 jint _exception = 0;
1734 const char * _exceptionType = NULL;
1735 const char * _exceptionMessage = NULL;
1736 jintArray _array = (jintArray) 0;
1737 jint _bufferOffset = (jint) 0;
1739 GLuint *textures = (GLuint *) 0;
1741 textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
1742 if (_remaining < n) {
1744 _exceptionType = "java/lang/IllegalArgumentException";
1745 _exceptionMessage = "remaining() < n < needed";
1748 if (textures == NULL) {
1749 char * _texturesBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
1750 textures = (GLuint *) (_texturesBase + _bufferOffset);
1759 _env->ReleaseIntArrayElements(_array, (jint*)textures, _exception ? JNI_ABORT : 0);
1762 jniThrowException(_env, _exceptionType, _exceptionMessage);
1766 /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
1768 android_glGetActiveAttrib__III_3II_3II_3II_3BI
1769 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) {
1770 jint _exception = 0;
1771 const char * _exceptionType;
1772 const char * _exceptionMessage;
1773 GLsizei *length_base = (GLsizei *) 0;
1774 jint _lengthRemaining;
1775 GLsizei *length = (GLsizei *) 0;
1776 GLint *size_base = (GLint *) 0;
1777 jint _sizeRemaining;
1778 GLint *size = (GLint *) 0;
1779 GLenum *type_base = (GLenum *) 0;
1780 jint _typeRemaining;
1781 GLenum *type = (GLenum *) 0;
1782 char *name_base = (char *) 0;
1783 jint _nameRemaining;
1784 char *name = (char *) 0;
1787 if (lengthOffset < 0) {
1789 _exceptionType = "java/lang/IllegalArgumentException";
1790 _exceptionMessage = "lengthOffset < 0";
1793 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
1794 length_base = (GLsizei *)
1795 _env->GetIntArrayElements(length_ref, (jboolean *)0);
1796 length = length_base + lengthOffset;
1801 _exceptionType = "java/lang/IllegalArgumentException";
1802 _exceptionMessage = "size == null";
1805 if (sizeOffset < 0) {
1807 _exceptionType = "java/lang/IllegalArgumentException";
1808 _exceptionMessage = "sizeOffset < 0";
1811 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1812 size_base = (GLint *)
1813 _env->GetIntArrayElements(size_ref, (jboolean *)0);
1814 size = size_base + sizeOffset;
1818 _exceptionType = "java/lang/IllegalArgumentException";
1819 _exceptionMessage = "type == null";
1822 if (typeOffset < 0) {
1824 _exceptionType = "java/lang/IllegalArgumentException";
1825 _exceptionMessage = "typeOffset < 0";
1828 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
1829 type_base = (GLenum *)
1830 _env->GetIntArrayElements(type_ref, (jboolean *)0);
1831 type = type_base + typeOffset;
1835 _exceptionType = "java/lang/IllegalArgumentException";
1836 _exceptionMessage = "name == null";
1839 if (nameOffset < 0) {
1841 _exceptionType = "java/lang/IllegalArgumentException";
1842 _exceptionMessage = "nameOffset < 0";
1845 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
1846 name_base = (char *)
1847 _env->GetByteArrayElements(name_ref, (jboolean *)0);
1848 name = name_base + nameOffset;
1862 _env->ReleaseByteArrayElements(name_ref, (jbyte*)name_base,
1863 _exception ? JNI_ABORT: 0);
1866 _env->ReleaseIntArrayElements(type_ref, (jint*)type_base,
1867 _exception ? JNI_ABORT: 0);
1870 _env->ReleaseIntArrayElements(size_ref, (jint*)size_base,
1871 _exception ? JNI_ABORT: 0);
1874 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
1875 _exception ? JNI_ABORT: 0);
1878 jniThrowException(_env, _exceptionType, _exceptionMessage);
1882 /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
1884 android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
1885 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
1886 jintArray _lengthArray = (jintArray) 0;
1887 jint _lengthBufferOffset = (jint) 0;
1888 jintArray _sizeArray = (jintArray) 0;
1889 jint _sizeBufferOffset = (jint) 0;
1890 jintArray _typeArray = (jintArray) 0;
1891 jint _typeBufferOffset = (jint) 0;
1892 jint _lengthRemaining;
1893 GLsizei *length = (GLsizei *) 0;
1894 jint _sizeRemaining;
1895 GLint *size = (GLint *) 0;
1896 jint _typeRemaining;
1897 GLenum *type = (GLenum *) 0;
1899 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
1900 size = (GLint *)getPointer(_env, size_buf, (jarray*)&_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
1901 type = (GLenum *)getPointer(_env, type_buf, (jarray*)&_typeArray, &_typeRemaining, &_typeBufferOffset);
1902 if (length == NULL) {
1903 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
1904 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
1907 char * _sizeBase = (char *)_env->GetIntArrayElements(_sizeArray, (jboolean *) 0);
1908 size = (GLint *) (_sizeBase + _sizeBufferOffset);
1911 char * _typeBase = (char *)_env->GetIntArrayElements(_typeArray, (jboolean *) 0);
1912 type = (GLenum *) (_typeBase + _typeBufferOffset);
1921 reinterpret_cast<char *>(name)
1924 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _typeArray, (jint*)type, JNI_TRUE);
1927 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _sizeArray, (jint*)size, JNI_TRUE);
1930 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _lengthArray, (jint*)length, JNI_TRUE);
1934 /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
1936 android_glGetActiveAttrib1
1937 (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) {
1938 jint _exception = 0;
1939 const char * _exceptionType;
1940 const char * _exceptionMessage;
1941 GLint *size_base = (GLint *) 0;
1942 jint _sizeRemaining;
1943 GLint *size = (GLint *) 0;
1944 GLenum *type_base = (GLenum *) 0;
1945 jint _typeRemaining;
1946 GLenum *type = (GLenum *) 0;
1951 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
1953 return _env->NewStringUTF("");
1955 char* buf = (char*) malloc(len);
1958 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
1963 _exceptionType = "java/lang/IllegalArgumentException";
1964 _exceptionMessage = "size == null";
1967 if (sizeOffset < 0) {
1969 _exceptionType = "java/lang/IllegalArgumentException";
1970 _exceptionMessage = "sizeOffset < 0";
1973 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1974 size_base = (GLint *)
1975 _env->GetIntArrayElements(size_ref, (jboolean *)0);
1976 size = size_base + sizeOffset;
1980 _exceptionType = "java/lang/IllegalArgumentException";
1981 _exceptionMessage = "type == null";
1984 if (typeOffset < 0) {
1986 _exceptionType = "java/lang/IllegalArgumentException";
1987 _exceptionMessage = "typeOffset < 0";
1990 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
1991 type_base = (GLenum *)
1992 _env->GetIntArrayElements(type_ref, (jboolean *)0);
1993 type = type_base + typeOffset;
2006 _env->ReleaseIntArrayElements(type_ref, (jint*)type_base,
2007 _exception ? JNI_ABORT: 0);
2010 _env->ReleaseIntArrayElements(size_ref, (jint*)size_base,
2011 _exception ? JNI_ABORT: 0);
2013 if (_exception != 1) {
2014 result = _env->NewStringUTF(buf);
2020 jniThrowException(_env, _exceptionType, _exceptionMessage);
2023 result = _env->NewStringUTF("");
2029 /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
2031 android_glGetActiveAttrib2
2032 (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) {
2033 jintArray _sizeArray = (jintArray) 0;
2034 jint _sizeBufferOffset = (jint) 0;
2035 jintArray _typeArray = (jintArray) 0;
2036 jint _typeBufferOffset = (jint) 0;
2037 jint _lengthRemaining;
2038 GLsizei *length = (GLsizei *) 0;
2039 jint _sizeRemaining;
2040 GLint *size = (GLint *) 0;
2041 jint _typeRemaining;
2042 GLenum *type = (GLenum *) 0;
2047 glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
2049 return _env->NewStringUTF("");
2051 char* buf = (char*) malloc(len);
2054 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
2058 size = (GLint *)getPointer(_env, size_buf, (jarray*)&_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
2059 type = (GLenum *)getPointer(_env, type_buf, (jarray*)&_typeArray, &_typeRemaining, &_typeBufferOffset);
2061 char * _sizeBase = (char *)_env->GetIntArrayElements(_sizeArray, (jboolean *) 0);
2062 size = (GLint *) (_sizeBase + _sizeBufferOffset);
2065 char * _typeBase = (char *)_env->GetIntArrayElements(_typeArray, (jboolean *) 0);
2066 type = (GLenum *) (_typeBase + _typeBufferOffset);
2079 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _typeArray, (jint*)type, JNI_TRUE);
2082 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _sizeArray, (jint*)size, JNI_TRUE);
2084 result = _env->NewStringUTF(buf);
2090 /* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
2092 android_glGetActiveUniform__III_3II_3II_3II_3BI
2093 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) {
2094 jint _exception = 0;
2095 const char * _exceptionType;
2096 const char * _exceptionMessage;
2097 GLsizei *length_base = (GLsizei *) 0;
2098 jint _lengthRemaining;
2099 GLsizei *length = (GLsizei *) 0;
2100 GLint *size_base = (GLint *) 0;
2101 jint _sizeRemaining;
2102 GLint *size = (GLint *) 0;
2103 GLenum *type_base = (GLenum *) 0;
2104 jint _typeRemaining;
2105 GLenum *type = (GLenum *) 0;
2106 char *name_base = (char *) 0;
2107 jint _nameRemaining;
2108 char *name = (char *) 0;
2111 if (lengthOffset < 0) {
2113 _exceptionType = "java/lang/IllegalArgumentException";
2114 _exceptionMessage = "lengthOffset < 0";
2117 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
2118 length_base = (GLsizei *)
2119 _env->GetIntArrayElements(length_ref, (jboolean *)0);
2120 length = length_base + lengthOffset;
2125 _exceptionType = "java/lang/IllegalArgumentException";
2126 _exceptionMessage = "size == null";
2129 if (sizeOffset < 0) {
2131 _exceptionType = "java/lang/IllegalArgumentException";
2132 _exceptionMessage = "sizeOffset < 0";
2135 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
2136 size_base = (GLint *)
2137 _env->GetIntArrayElements(size_ref, (jboolean *)0);
2138 size = size_base + sizeOffset;
2142 _exceptionType = "java/lang/IllegalArgumentException";
2143 _exceptionMessage = "type == null";
2146 if (typeOffset < 0) {
2148 _exceptionType = "java/lang/IllegalArgumentException";
2149 _exceptionMessage = "typeOffset < 0";
2152 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
2153 type_base = (GLenum *)
2154 _env->GetIntArrayElements(type_ref, (jboolean *)0);
2155 type = type_base + typeOffset;
2159 _exceptionType = "java/lang/IllegalArgumentException";
2160 _exceptionMessage = "name == null";
2163 if (nameOffset < 0) {
2165 _exceptionType = "java/lang/IllegalArgumentException";
2166 _exceptionMessage = "nameOffset < 0";
2169 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
2170 name_base = (char *)
2171 _env->GetByteArrayElements(name_ref, (jboolean *)0);
2172 name = name_base + nameOffset;
2186 _env->ReleaseByteArrayElements(name_ref, (jbyte*)name_base,
2187 _exception ? JNI_ABORT: 0);
2190 _env->ReleaseIntArrayElements(type_ref, (jint*)type_base,
2191 _exception ? JNI_ABORT: 0);
2194 _env->ReleaseIntArrayElements(size_ref, (jint*)size_base,
2195 _exception ? JNI_ABORT: 0);
2198 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
2199 _exception ? JNI_ABORT: 0);
2202 jniThrowException(_env, _exceptionType, _exceptionMessage);
2206 /* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
2208 android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
2209 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
2210 jintArray _lengthArray = (jintArray) 0;
2211 jint _lengthBufferOffset = (jint) 0;
2212 jintArray _sizeArray = (jintArray) 0;
2213 jint _sizeBufferOffset = (jint) 0;
2214 jintArray _typeArray = (jintArray) 0;
2215 jint _typeBufferOffset = (jint) 0;
2216 jint _lengthRemaining;
2217 GLsizei *length = (GLsizei *) 0;
2218 jint _sizeRemaining;
2219 GLint *size = (GLint *) 0;
2220 jint _typeRemaining;
2221 GLenum *type = (GLenum *) 0;
2223 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
2224 size = (GLint *)getPointer(_env, size_buf, (jarray*)&_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
2225 type = (GLenum *)getPointer(_env, type_buf, (jarray*)&_typeArray, &_typeRemaining, &_typeBufferOffset);
2226 if (length == NULL) {
2227 char * _lengthBase = (char *)_env->GetIntArrayElements(_lengthArray, (jboolean *) 0);
2228 length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
2231 char * _sizeBase = (char *)_env->GetIntArrayElements(_sizeArray, (jboolean *) 0);
2232 size = (GLint *) (_sizeBase + _sizeBufferOffset);
2235 char * _typeBase = (char *)_env->GetIntArrayElements(_typeArray, (jboolean *) 0);
2236 type = (GLenum *) (_typeBase + _typeBufferOffset);
2245 reinterpret_cast<char *>(name)
2248 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _typeArray, (jint*)type, JNI_TRUE);
2251 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _sizeArray, (jint*)size, JNI_TRUE);
2254 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _lengthArray, (jint*)length, JNI_TRUE);
2258 /* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
2260 android_glGetActiveUniform1
2261 (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) {
2262 jint _exception = 0;
2263 const char * _exceptionType;
2264 const char * _exceptionMessage;
2266 GLint *size_base = (GLint *) 0;
2267 jint _sizeRemaining;
2268 GLint *size = (GLint *) 0;
2270 GLenum *type_base = (GLenum *) 0;
2271 jint _typeRemaining;
2272 GLenum *type = (GLenum *) 0;
2277 glGetProgramiv((GLuint)program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &len);
2279 return _env->NewStringUTF("");
2281 char* buf = (char*) malloc(len);
2284 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
2290 _exceptionType = "java/lang/IllegalArgumentException";
2291 _exceptionMessage = "size == null";
2294 if (sizeOffset < 0) {
2296 _exceptionType = "java/lang/IllegalArgumentException";
2297 _exceptionMessage = "sizeOffset < 0";
2300 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
2301 size_base = (GLint *)
2302 _env->GetIntArrayElements(size_ref, (jboolean *)0);
2303 size = size_base + sizeOffset;
2307 _exceptionType = "java/lang/IllegalArgumentException";
2308 _exceptionMessage = "type == null";
2311 if (typeOffset < 0) {
2313 _exceptionType = "java/lang/IllegalArgumentException";
2314 _exceptionMessage = "typeOffset < 0";
2317 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
2318 type_base = (GLenum *)
2319 _env->GetIntArrayElements(type_ref, (jboolean *)0);
2320 type = type_base + typeOffset;
2334 _env->ReleaseIntArrayElements(type_ref, (jint*)type_base,
2335 _exception ? JNI_ABORT: 0);
2338 _env->ReleaseIntArrayElements(size_ref, (jint*)size_base,
2339 _exception ? JNI_ABORT: 0);
2341 if (_exception != 1) {
2342 result = _env->NewStringUTF(buf);
2348 jniThrowException(_env, _exceptionType, _exceptionMessage);
2351 result = _env->NewStringUTF("");
2356 /* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
2358 android_glGetActiveUniform2
2359 (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) {
2360 jintArray _sizeArray = (jintArray) 0;
2361 jint _sizeBufferOffset = (jint) 0;
2362 jintArray _typeArray = (jintArray) 0;
2363 jint _typeBufferOffset = (jint) 0;
2364 jint _sizeRemaining;
2365 GLint *size = (GLint *) 0;
2366 jint _typeRemaining;
2367 GLenum *type = (GLenum *) 0;
2371 glGetProgramiv((GLuint)program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &len);
2373 return _env->NewStringUTF("");
2375 char* buf = (char*) malloc(len);
2378 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
2382 size = (GLint *)getPointer(_env, size_buf, (jarray*)&_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
2383 type = (GLenum *)getPointer(_env, type_buf, (jarray*)&_typeArray, &_typeRemaining, &_typeBufferOffset);
2386 char * _sizeBase = (char *)_env->GetIntArrayElements(_sizeArray, (jboolean *) 0);
2387 size = (GLint *) (_sizeBase + _sizeBufferOffset);
2390 char * _typeBase = (char *)_env->GetIntArrayElements(_typeArray, (jboolean *) 0);
2391 type = (GLenum *) (_typeBase + _typeBufferOffset);
2404 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _typeArray, (jint*)type, JNI_TRUE);
2407 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _sizeArray, (jint*)size, JNI_TRUE);
2409 result = _env->NewStringUTF(buf);
2415 /* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */
2417 android_glGetAttachedShaders__II_3II_3II
2418 (JNIEnv *_env, jobject _this, jint program, jint maxcount, jintArray count_ref, jint countOffset, jintArray shaders_ref, jint shadersOffset) {
2419 jint _exception = 0;
2420 const char * _exceptionType = NULL;
2421 const char * _exceptionMessage = NULL;
2422 GLsizei *count_base = (GLsizei *) 0;
2423 jint _countRemaining;
2424 GLsizei *count = (GLsizei *) 0;
2425 GLuint *shaders_base = (GLuint *) 0;
2426 jint _shadersRemaining;
2427 GLuint *shaders = (GLuint *) 0;
2430 if (countOffset < 0) {
2432 _exceptionType = "java/lang/IllegalArgumentException";
2433 _exceptionMessage = "countOffset < 0";
2436 _countRemaining = _env->GetArrayLength(count_ref) - countOffset;
2437 if (_countRemaining < 1) {
2439 _exceptionType = "java/lang/IllegalArgumentException";
2440 _exceptionMessage = "length - countOffset < 1 < needed";
2443 count_base = (GLsizei *)
2444 _env->GetIntArrayElements(count_ref, (jboolean *)0);
2445 count = count_base + countOffset;
2450 _exceptionType = "java/lang/IllegalArgumentException";
2451 _exceptionMessage = "shaders == null";
2454 if (shadersOffset < 0) {
2456 _exceptionType = "java/lang/IllegalArgumentException";
2457 _exceptionMessage = "shadersOffset < 0";
2460 _shadersRemaining = _env->GetArrayLength(shaders_ref) - shadersOffset;
2461 if (_shadersRemaining < maxcount) {
2463 _exceptionType = "java/lang/IllegalArgumentException";
2464 _exceptionMessage = "length - shadersOffset < maxcount < needed";
2467 shaders_base = (GLuint *)
2468 _env->GetIntArrayElements(shaders_ref, (jboolean *)0);
2469 shaders = shaders_base + shadersOffset;
2471 glGetAttachedShaders(
2480 _env->ReleaseIntArrayElements(shaders_ref, (jint*)shaders_base,
2481 _exception ? JNI_ABORT: 0);
2484 _env->ReleaseIntArrayElements(count_ref, (jint*)count_base,
2485 _exception ? JNI_ABORT: 0);
2488 jniThrowException(_env, _exceptionType, _exceptionMessage);
2492 /* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */
2494 android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
2495 (JNIEnv *_env, jobject _this, jint program, jint maxcount, jobject count_buf, jobject shaders_buf) {
2496 jint _exception = 0;
2497 const char * _exceptionType = NULL;
2498 const char * _exceptionMessage = NULL;
2499 jintArray _countArray = (jintArray) 0;
2500 jint _countBufferOffset = (jint) 0;
2501 jintArray _shadersArray = (jintArray) 0;
2502 jint _shadersBufferOffset = (jint) 0;
2503 jint _countRemaining;
2504 GLsizei *count = (GLsizei *) 0;
2505 jint _shadersRemaining;
2506 GLuint *shaders = (GLuint *) 0;
2509 count = (GLsizei *)getPointer(_env, count_buf, (jarray*)&_countArray, &_countRemaining, &_countBufferOffset);
2510 if (_countRemaining < 1) {
2512 _exceptionType = "java/lang/IllegalArgumentException";
2513 _exceptionMessage = "remaining() < 1 < needed";
2517 shaders = (GLuint *)getPointer(_env, shaders_buf, (jarray*)&_shadersArray, &_shadersRemaining, &_shadersBufferOffset);
2518 if (_shadersRemaining < maxcount) {
2520 _exceptionType = "java/lang/IllegalArgumentException";
2521 _exceptionMessage = "remaining() < maxcount < needed";
2524 if (count_buf && count == NULL) {
2525 char * _countBase = (char *)_env->GetIntArrayElements(_countArray, (jboolean *) 0);
2526 count = (GLsizei *) (_countBase + _countBufferOffset);
2528 if (shaders == NULL) {
2529 char * _shadersBase = (char *)_env->GetIntArrayElements(_shadersArray, (jboolean *) 0);
2530 shaders = (GLuint *) (_shadersBase + _shadersBufferOffset);
2532 glGetAttachedShaders(
2540 if (_shadersArray) {
2541 _env->ReleaseIntArrayElements(_shadersArray, (jint*)shaders, _exception ? JNI_ABORT : 0);
2544 _env->ReleaseIntArrayElements(_countArray, (jint*)count, _exception ? JNI_ABORT : 0);
2547 jniThrowException(_env, _exceptionType, _exceptionMessage);
2551 /* GLint glGetAttribLocation ( GLuint program, const char *name ) */
2553 android_glGetAttribLocation__ILjava_lang_String_2
2554 (JNIEnv *_env, jobject _this, jint program, jstring name) {
2555 jint _exception = 0;
2556 const char * _exceptionType = NULL;
2557 const char * _exceptionMessage = NULL;
2558 GLint _returnValue = 0;
2559 const char* _nativename = 0;
2563 _exceptionType = "java/lang/IllegalArgumentException";
2564 _exceptionMessage = "name == null";
2567 _nativename = _env->GetStringUTFChars(name, 0);
2569 _returnValue = glGetAttribLocation(
2576 _env->ReleaseStringUTFChars(name, _nativename);
2580 jniThrowException(_env, _exceptionType, _exceptionMessage);
2582 return (jint)_returnValue;
2585 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
2587 android_glGetBooleanv__I_3ZI
2588 (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
2589 get<jbooleanArray, BooleanArrayGetter, jboolean*, BooleanArrayReleaser, GLboolean, glGetBooleanv>(
2590 _env, _this, pname, params_ref, offset);
2593 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
2595 android_glGetBooleanv__ILjava_nio_IntBuffer_2
2596 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
2597 getarray<GLboolean, jintArray, IntArrayGetter, jint*, IntArrayReleaser, glGetBooleanv>(
2598 _env, _this, pname, params_buf);
2600 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
2602 android_glGetBufferParameteriv__II_3II
2603 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
2604 jint _exception = 0;
2605 const char * _exceptionType = NULL;
2606 const char * _exceptionMessage = NULL;
2607 GLint *params_base = (GLint *) 0;
2609 GLint *params = (GLint *) 0;
2613 _exceptionType = "java/lang/IllegalArgumentException";
2614 _exceptionMessage = "params == null";
2619 _exceptionType = "java/lang/IllegalArgumentException";
2620 _exceptionMessage = "offset < 0";
2623 _remaining = _env->GetArrayLength(params_ref) - offset;
2624 if (_remaining < 1) {
2626 _exceptionType = "java/lang/IllegalArgumentException";
2627 _exceptionMessage = "length - offset < 1 < needed";
2630 params_base = (GLint *)
2631 _env->GetIntArrayElements(params_ref, (jboolean *)0);
2632 params = params_base + offset;
2634 glGetBufferParameteriv(
2642 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2643 _exception ? JNI_ABORT: 0);
2646 jniThrowException(_env, _exceptionType, _exceptionMessage);
2650 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
2652 android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
2653 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
2654 jint _exception = 0;
2655 const char * _exceptionType = NULL;
2656 const char * _exceptionMessage = NULL;
2657 jintArray _array = (jintArray) 0;
2658 jint _bufferOffset = (jint) 0;
2660 GLint *params = (GLint *) 0;
2662 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2663 if (_remaining < 1) {
2665 _exceptionType = "java/lang/IllegalArgumentException";
2666 _exceptionMessage = "remaining() < 1 < needed";
2669 if (params == NULL) {
2670 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2671 params = (GLint *) (_paramsBase + _bufferOffset);
2673 glGetBufferParameteriv(
2681 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
2684 jniThrowException(_env, _exceptionType, _exceptionMessage);
2688 /* GLenum glGetError ( void ) */
2690 android_glGetError__
2691 (JNIEnv *_env, jobject _this) {
2692 GLenum _returnValue;
2693 _returnValue = glGetError();
2694 return (jint)_returnValue;
2697 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
2699 android_glGetFloatv__I_3FI
2700 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
2701 get<jfloatArray, FloatArrayGetter, jfloat*, FloatArrayReleaser, GLfloat, glGetFloatv>(
2702 _env, _this, pname, params_ref, offset);
2705 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
2707 android_glGetFloatv__ILjava_nio_FloatBuffer_2
2708 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
2709 getarray<GLfloat, jfloatArray, FloatArrayGetter, jfloat*, FloatArrayReleaser, glGetFloatv>(
2710 _env, _this, pname, params_buf);
2712 /* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2714 android_glGetFramebufferAttachmentParameteriv__III_3II
2715 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
2716 jint _exception = 0;
2717 const char * _exceptionType = NULL;
2718 const char * _exceptionMessage = NULL;
2719 GLint *params_base = (GLint *) 0;
2721 GLint *params = (GLint *) 0;
2725 _exceptionType = "java/lang/IllegalArgumentException";
2726 _exceptionMessage = "params == null";
2731 _exceptionType = "java/lang/IllegalArgumentException";
2732 _exceptionMessage = "offset < 0";
2735 _remaining = _env->GetArrayLength(params_ref) - offset;
2736 params_base = (GLint *)
2737 _env->GetIntArrayElements(params_ref, (jboolean *)0);
2738 params = params_base + offset;
2740 glGetFramebufferAttachmentParameteriv(
2749 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2750 _exception ? JNI_ABORT: 0);
2753 jniThrowException(_env, _exceptionType, _exceptionMessage);
2757 /* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
2759 android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2
2760 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
2761 jintArray _array = (jintArray) 0;
2762 jint _bufferOffset = (jint) 0;
2764 GLint *params = (GLint *) 0;
2766 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2767 if (params == NULL) {
2768 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2769 params = (GLint *) (_paramsBase + _bufferOffset);
2771 glGetFramebufferAttachmentParameteriv(
2778 _env->ReleaseIntArrayElements(_array, (jint*)params, 0);
2782 /* void glGetIntegerv ( GLenum pname, GLint *params ) */
2784 android_glGetIntegerv__I_3II
2785 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
2786 get<jintArray, IntArrayGetter, jint*, IntArrayReleaser, GLint, glGetIntegerv>(
2787 _env, _this, pname, params_ref, offset);
2790 /* void glGetIntegerv ( GLenum pname, GLint *params ) */
2792 android_glGetIntegerv__ILjava_nio_IntBuffer_2
2793 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
2794 getarray<GLint, jintArray, IntArrayGetter, jint*, IntArrayReleaser, glGetIntegerv>(
2795 _env, _this, pname, params_buf);
2797 /* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */
2799 android_glGetProgramiv__II_3II
2800 (JNIEnv *_env, jobject _this, jint program, jint pname, jintArray params_ref, jint offset) {
2801 jint _exception = 0;
2802 const char * _exceptionType = NULL;
2803 const char * _exceptionMessage = NULL;
2804 GLint *params_base = (GLint *) 0;
2806 GLint *params = (GLint *) 0;
2810 _exceptionType = "java/lang/IllegalArgumentException";
2811 _exceptionMessage = "params == null";
2816 _exceptionType = "java/lang/IllegalArgumentException";
2817 _exceptionMessage = "offset < 0";
2820 _remaining = _env->GetArrayLength(params_ref) - offset;
2821 if (_remaining < 1) {
2823 _exceptionType = "java/lang/IllegalArgumentException";
2824 _exceptionMessage = "length - offset < 1 < needed";
2827 params_base = (GLint *)
2828 _env->GetIntArrayElements(params_ref, (jboolean *)0);
2829 params = params_base + offset;
2839 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2840 _exception ? JNI_ABORT: 0);
2843 jniThrowException(_env, _exceptionType, _exceptionMessage);
2847 /* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */
2849 android_glGetProgramiv__IILjava_nio_IntBuffer_2
2850 (JNIEnv *_env, jobject _this, jint program, jint pname, jobject params_buf) {
2851 jint _exception = 0;
2852 const char * _exceptionType = NULL;
2853 const char * _exceptionMessage = NULL;
2854 jintArray _array = (jintArray) 0;
2855 jint _bufferOffset = (jint) 0;
2857 GLint *params = (GLint *) 0;
2859 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2860 if (_remaining < 1) {
2862 _exceptionType = "java/lang/IllegalArgumentException";
2863 _exceptionMessage = "remaining() < 1 < needed";
2866 if (params == NULL) {
2867 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2868 params = (GLint *) (_paramsBase + _bufferOffset);
2878 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
2881 jniThrowException(_env, _exceptionType, _exceptionMessage);
2887 /* void glGetProgramInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
2888 static jstring android_glGetProgramInfoLog(JNIEnv *_env, jobject, jint shader) {
2890 glGetProgramiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
2892 return _env->NewStringUTF("");
2894 char* buf = (char*) malloc(infoLen);
2896 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
2899 glGetProgramInfoLog(shader, infoLen, NULL, buf);
2900 jstring result = _env->NewStringUTF(buf);
2904 /* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
2906 android_glGetRenderbufferParameteriv__II_3II
2907 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
2908 jint _exception = 0;
2909 const char * _exceptionType = NULL;
2910 const char * _exceptionMessage = NULL;
2911 GLint *params_base = (GLint *) 0;
2913 GLint *params = (GLint *) 0;
2917 _exceptionType = "java/lang/IllegalArgumentException";
2918 _exceptionMessage = "params == null";
2923 _exceptionType = "java/lang/IllegalArgumentException";
2924 _exceptionMessage = "offset < 0";
2927 _remaining = _env->GetArrayLength(params_ref) - offset;
2928 if (_remaining < 1) {
2930 _exceptionType = "java/lang/IllegalArgumentException";
2931 _exceptionMessage = "length - offset < 1 < needed";
2934 params_base = (GLint *)
2935 _env->GetIntArrayElements(params_ref, (jboolean *)0);
2936 params = params_base + offset;
2938 glGetRenderbufferParameteriv(
2946 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
2947 _exception ? JNI_ABORT: 0);
2950 jniThrowException(_env, _exceptionType, _exceptionMessage);
2954 /* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
2956 android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2
2957 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
2958 jint _exception = 0;
2959 const char * _exceptionType = NULL;
2960 const char * _exceptionMessage = NULL;
2961 jintArray _array = (jintArray) 0;
2962 jint _bufferOffset = (jint) 0;
2964 GLint *params = (GLint *) 0;
2966 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
2967 if (_remaining < 1) {
2969 _exceptionType = "java/lang/IllegalArgumentException";
2970 _exceptionMessage = "remaining() < 1 < needed";
2973 if (params == NULL) {
2974 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
2975 params = (GLint *) (_paramsBase + _bufferOffset);
2977 glGetRenderbufferParameteriv(
2985 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
2988 jniThrowException(_env, _exceptionType, _exceptionMessage);
2992 /* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */
2994 android_glGetShaderiv__II_3II
2995 (JNIEnv *_env, jobject _this, jint shader, jint pname, jintArray params_ref, jint offset) {
2996 jint _exception = 0;
2997 const char * _exceptionType = NULL;
2998 const char * _exceptionMessage = NULL;
2999 GLint *params_base = (GLint *) 0;
3001 GLint *params = (GLint *) 0;
3005 _exceptionType = "java/lang/IllegalArgumentException";
3006 _exceptionMessage = "params == null";
3011 _exceptionType = "java/lang/IllegalArgumentException";
3012 _exceptionMessage = "offset < 0";
3015 _remaining = _env->GetArrayLength(params_ref) - offset;
3016 if (_remaining < 1) {
3018 _exceptionType = "java/lang/IllegalArgumentException";
3019 _exceptionMessage = "length - offset < 1 < needed";
3022 params_base = (GLint *)
3023 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3024 params = params_base + offset;
3034 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3035 _exception ? JNI_ABORT: 0);
3038 jniThrowException(_env, _exceptionType, _exceptionMessage);
3042 /* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */
3044 android_glGetShaderiv__IILjava_nio_IntBuffer_2
3045 (JNIEnv *_env, jobject _this, jint shader, jint pname, jobject params_buf) {
3046 jint _exception = 0;
3047 const char * _exceptionType = NULL;
3048 const char * _exceptionMessage = NULL;
3049 jintArray _array = (jintArray) 0;
3050 jint _bufferOffset = (jint) 0;
3052 GLint *params = (GLint *) 0;
3054 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3055 if (_remaining < 1) {
3057 _exceptionType = "java/lang/IllegalArgumentException";
3058 _exceptionMessage = "remaining() < 1 < needed";
3061 if (params == NULL) {
3062 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3063 params = (GLint *) (_paramsBase + _bufferOffset);
3073 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3076 jniThrowException(_env, _exceptionType, _exceptionMessage);
3082 /* void glGetShaderInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
3083 static jstring android_glGetShaderInfoLog(JNIEnv *_env, jobject, jint shader) {
3085 glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
3087 return _env->NewStringUTF("");
3089 char* buf = (char*) malloc(infoLen);
3091 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
3094 glGetShaderInfoLog(shader, infoLen, NULL, buf);
3095 jstring result = _env->NewStringUTF(buf);
3099 /* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */
3101 android_glGetShaderPrecisionFormat__II_3II_3II
3102 (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jintArray range_ref, jint rangeOffset, jintArray precision_ref, jint precisionOffset) {
3103 jint _exception = 0;
3104 const char * _exceptionType = NULL;
3105 const char * _exceptionMessage = NULL;
3106 GLint *range_base = (GLint *) 0;
3107 jint _rangeRemaining;
3108 GLint *range = (GLint *) 0;
3109 GLint *precision_base = (GLint *) 0;
3110 jint _precisionRemaining;
3111 GLint *precision = (GLint *) 0;
3115 _exceptionType = "java/lang/IllegalArgumentException";
3116 _exceptionMessage = "range == null";
3119 if (rangeOffset < 0) {
3121 _exceptionType = "java/lang/IllegalArgumentException";
3122 _exceptionMessage = "rangeOffset < 0";
3125 _rangeRemaining = _env->GetArrayLength(range_ref) - rangeOffset;
3126 if (_rangeRemaining < 1) {
3128 _exceptionType = "java/lang/IllegalArgumentException";
3129 _exceptionMessage = "length - rangeOffset < 1 < needed";
3132 range_base = (GLint *)
3133 _env->GetIntArrayElements(range_ref, (jboolean *)0);
3134 range = range_base + rangeOffset;
3136 if (!precision_ref) {
3138 _exceptionType = "java/lang/IllegalArgumentException";
3139 _exceptionMessage = "precision == null";
3142 if (precisionOffset < 0) {
3144 _exceptionType = "java/lang/IllegalArgumentException";
3145 _exceptionMessage = "precisionOffset < 0";
3148 _precisionRemaining = _env->GetArrayLength(precision_ref) - precisionOffset;
3149 if (_precisionRemaining < 1) {
3151 _exceptionType = "java/lang/IllegalArgumentException";
3152 _exceptionMessage = "length - precisionOffset < 1 < needed";
3155 precision_base = (GLint *)
3156 _env->GetIntArrayElements(precision_ref, (jboolean *)0);
3157 precision = precision_base + precisionOffset;
3159 glGetShaderPrecisionFormat(
3161 (GLenum)precisiontype,
3167 if (precision_base) {
3168 _env->ReleaseIntArrayElements(precision_ref, (jint*)precision_base,
3169 _exception ? JNI_ABORT: 0);
3172 _env->ReleaseIntArrayElements(range_ref, (jint*)range_base,
3173 _exception ? JNI_ABORT: 0);
3176 jniThrowException(_env, _exceptionType, _exceptionMessage);
3180 /* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */
3182 android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
3183 (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jobject range_buf, jobject precision_buf) {
3184 jint _exception = 0;
3185 const char * _exceptionType = NULL;
3186 const char * _exceptionMessage = NULL;
3187 jintArray _rangeArray = (jintArray) 0;
3188 jint _rangeBufferOffset = (jint) 0;
3189 jintArray _precisionArray = (jintArray) 0;
3190 jint _precisionBufferOffset = (jint) 0;
3191 jint _rangeRemaining;
3192 GLint *range = (GLint *) 0;
3193 jint _precisionRemaining;
3194 GLint *precision = (GLint *) 0;
3196 range = (GLint *)getPointer(_env, range_buf, (jarray*)&_rangeArray, &_rangeRemaining, &_rangeBufferOffset);
3197 if (_rangeRemaining < 1) {
3199 _exceptionType = "java/lang/IllegalArgumentException";
3200 _exceptionMessage = "remaining() < 1 < needed";
3203 precision = (GLint *)getPointer(_env, precision_buf, (jarray*)&_precisionArray, &_precisionRemaining, &_precisionBufferOffset);
3204 if (_precisionRemaining < 1) {
3206 _exceptionType = "java/lang/IllegalArgumentException";
3207 _exceptionMessage = "remaining() < 1 < needed";
3210 if (range == NULL) {
3211 char * _rangeBase = (char *)_env->GetIntArrayElements(_rangeArray, (jboolean *) 0);
3212 range = (GLint *) (_rangeBase + _rangeBufferOffset);
3214 if (precision == NULL) {
3215 char * _precisionBase = (char *)_env->GetIntArrayElements(_precisionArray, (jboolean *) 0);
3216 precision = (GLint *) (_precisionBase + _precisionBufferOffset);
3218 glGetShaderPrecisionFormat(
3220 (GLenum)precisiontype,
3226 if (_precisionArray) {
3227 _env->ReleaseIntArrayElements(_precisionArray, (jint*)precision, _exception ? JNI_ABORT : 0);
3230 _env->ReleaseIntArrayElements(_rangeArray, (jint*)range, _exception ? JNI_ABORT : 0);
3233 jniThrowException(_env, _exceptionType, _exceptionMessage);
3237 /* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */
3239 android_glGetShaderSource__II_3II_3BI
3240 (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jintArray length_ref, jint lengthOffset, jbyteArray source_ref, jint sourceOffset) {
3241 jint _exception = 0;
3242 const char * _exceptionType;
3243 const char * _exceptionMessage;
3244 GLsizei *length_base = (GLsizei *) 0;
3245 jint _lengthRemaining;
3246 GLsizei *length = (GLsizei *) 0;
3247 char *source_base = (char *) 0;
3248 jint _sourceRemaining;
3249 char *source = (char *) 0;
3252 if (lengthOffset < 0) {
3254 _exceptionType = "java/lang/IllegalArgumentException";
3255 _exceptionMessage = "lengthOffset < 0";
3258 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
3259 length_base = (GLsizei *)
3260 _env->GetIntArrayElements(length_ref, (jboolean *)0);
3261 length = length_base + lengthOffset;
3266 _exceptionType = "java/lang/IllegalArgumentException";
3267 _exceptionMessage = "source == null";
3270 if (sourceOffset < 0) {
3272 _exceptionType = "java/lang/IllegalArgumentException";
3273 _exceptionMessage = "sourceOffset < 0";
3276 _sourceRemaining = _env->GetArrayLength(source_ref) - sourceOffset;
3277 source_base = (char *)
3278 _env->GetByteArrayElements(source_ref, (jboolean *)0);
3279 source = source_base + sourceOffset;
3290 _env->ReleaseByteArrayElements(source_ref, (jbyte*)source_base,
3291 _exception ? JNI_ABORT: 0);
3294 _env->ReleaseIntArrayElements(length_ref, (jint*)length_base,
3295 _exception ? JNI_ABORT: 0);
3298 jniThrowException(_env, _exceptionType, _exceptionMessage);
3302 /* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */
3304 android_glGetShaderSource__IILjava_nio_IntBuffer_2B
3305 (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jobject length_buf, jbyte source) {
3306 jintArray _array = (jintArray) 0;
3307 jint _bufferOffset = (jint) 0;
3309 GLsizei *length = (GLsizei *) 0;
3311 length = (GLsizei *)getPointer(_env, length_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3312 if (length == NULL) {
3313 char * _lengthBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3314 length = (GLsizei *) (_lengthBase + _bufferOffset);
3320 reinterpret_cast<char *>(source)
3323 releaseArrayPointer<jintArray, jint*, IntArrayReleaser>(_env, _array, (jint*)length, JNI_TRUE);
3327 /* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */
3328 static jstring android_glGetShaderSource(JNIEnv *_env, jobject, jint shader) {
3329 GLint shaderLen = 0;
3330 glGetShaderiv((GLuint)shader, GL_SHADER_SOURCE_LENGTH, &shaderLen);
3332 return _env->NewStringUTF("");
3334 char* buf = (char*) malloc(shaderLen);
3336 jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
3339 glGetShaderSource(shader, shaderLen, NULL, buf);
3340 jstring result = _env->NewStringUTF(buf);
3344 /* const GLubyte * glGetString ( GLenum name ) */
3345 static jstring android_glGetString(JNIEnv* _env, jobject, jint name) {
3346 const char* chars = (const char*) glGetString((GLenum) name);
3347 return _env->NewStringUTF(chars);
3349 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
3351 android_glGetTexParameterfv__II_3FI
3352 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
3353 jint _exception = 0;
3354 const char * _exceptionType = NULL;
3355 const char * _exceptionMessage = NULL;
3356 GLfloat *params_base = (GLfloat *) 0;
3358 GLfloat *params = (GLfloat *) 0;
3362 _exceptionType = "java/lang/IllegalArgumentException";
3363 _exceptionMessage = "params == null";
3368 _exceptionType = "java/lang/IllegalArgumentException";
3369 _exceptionMessage = "offset < 0";
3372 _remaining = _env->GetArrayLength(params_ref) - offset;
3373 if (_remaining < 1) {
3375 _exceptionType = "java/lang/IllegalArgumentException";
3376 _exceptionMessage = "length - offset < 1 < needed";
3379 params_base = (GLfloat *)
3380 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3381 params = params_base + offset;
3383 glGetTexParameterfv(
3391 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3392 _exception ? JNI_ABORT: 0);
3395 jniThrowException(_env, _exceptionType, _exceptionMessage);
3399 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
3401 android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
3402 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3403 jint _exception = 0;
3404 const char * _exceptionType = NULL;
3405 const char * _exceptionMessage = NULL;
3406 jfloatArray _array = (jfloatArray) 0;
3407 jint _bufferOffset = (jint) 0;
3409 GLfloat *params = (GLfloat *) 0;
3411 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3412 if (_remaining < 1) {
3414 _exceptionType = "java/lang/IllegalArgumentException";
3415 _exceptionMessage = "remaining() < 1 < needed";
3418 if (params == NULL) {
3419 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3420 params = (GLfloat *) (_paramsBase + _bufferOffset);
3422 glGetTexParameterfv(
3430 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3433 jniThrowException(_env, _exceptionType, _exceptionMessage);
3437 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3439 android_glGetTexParameteriv__II_3II
3440 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3441 jint _exception = 0;
3442 const char * _exceptionType = NULL;
3443 const char * _exceptionMessage = NULL;
3444 GLint *params_base = (GLint *) 0;
3446 GLint *params = (GLint *) 0;
3450 _exceptionType = "java/lang/IllegalArgumentException";
3451 _exceptionMessage = "params == null";
3456 _exceptionType = "java/lang/IllegalArgumentException";
3457 _exceptionMessage = "offset < 0";
3460 _remaining = _env->GetArrayLength(params_ref) - offset;
3461 if (_remaining < 1) {
3463 _exceptionType = "java/lang/IllegalArgumentException";
3464 _exceptionMessage = "length - offset < 1 < needed";
3467 params_base = (GLint *)
3468 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3469 params = params_base + offset;
3471 glGetTexParameteriv(
3479 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3480 _exception ? JNI_ABORT: 0);
3483 jniThrowException(_env, _exceptionType, _exceptionMessage);
3487 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3489 android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
3490 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3491 jint _exception = 0;
3492 const char * _exceptionType = NULL;
3493 const char * _exceptionMessage = NULL;
3494 jintArray _array = (jintArray) 0;
3495 jint _bufferOffset = (jint) 0;
3497 GLint *params = (GLint *) 0;
3499 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3500 if (_remaining < 1) {
3502 _exceptionType = "java/lang/IllegalArgumentException";
3503 _exceptionMessage = "remaining() < 1 < needed";
3506 if (params == NULL) {
3507 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3508 params = (GLint *) (_paramsBase + _bufferOffset);
3510 glGetTexParameteriv(
3518 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3521 jniThrowException(_env, _exceptionType, _exceptionMessage);
3525 /* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */
3527 android_glGetUniformfv__II_3FI
3528 (JNIEnv *_env, jobject _this, jint program, jint location, jfloatArray params_ref, jint offset) {
3529 jint _exception = 0;
3530 const char * _exceptionType = NULL;
3531 const char * _exceptionMessage = NULL;
3532 GLfloat *params_base = (GLfloat *) 0;
3534 GLfloat *params = (GLfloat *) 0;
3538 _exceptionType = "java/lang/IllegalArgumentException";
3539 _exceptionMessage = "params == null";
3544 _exceptionType = "java/lang/IllegalArgumentException";
3545 _exceptionMessage = "offset < 0";
3548 _remaining = _env->GetArrayLength(params_ref) - offset;
3549 if (_remaining < 1) {
3551 _exceptionType = "java/lang/IllegalArgumentException";
3552 _exceptionMessage = "length - offset < 1 < needed";
3555 params_base = (GLfloat *)
3556 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3557 params = params_base + offset;
3567 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3568 _exception ? JNI_ABORT: 0);
3571 jniThrowException(_env, _exceptionType, _exceptionMessage);
3575 /* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */
3577 android_glGetUniformfv__IILjava_nio_FloatBuffer_2
3578 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
3579 jint _exception = 0;
3580 const char * _exceptionType = NULL;
3581 const char * _exceptionMessage = NULL;
3582 jfloatArray _array = (jfloatArray) 0;
3583 jint _bufferOffset = (jint) 0;
3585 GLfloat *params = (GLfloat *) 0;
3587 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3588 if (_remaining < 1) {
3590 _exceptionType = "java/lang/IllegalArgumentException";
3591 _exceptionMessage = "remaining() < 1 < needed";
3594 if (params == NULL) {
3595 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3596 params = (GLfloat *) (_paramsBase + _bufferOffset);
3606 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3609 jniThrowException(_env, _exceptionType, _exceptionMessage);
3613 /* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */
3615 android_glGetUniformiv__II_3II
3616 (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
3617 jint _exception = 0;
3618 const char * _exceptionType = NULL;
3619 const char * _exceptionMessage = NULL;
3620 GLint *params_base = (GLint *) 0;
3622 GLint *params = (GLint *) 0;
3626 _exceptionType = "java/lang/IllegalArgumentException";
3627 _exceptionMessage = "params == null";
3632 _exceptionType = "java/lang/IllegalArgumentException";
3633 _exceptionMessage = "offset < 0";
3636 _remaining = _env->GetArrayLength(params_ref) - offset;
3637 if (_remaining < 1) {
3639 _exceptionType = "java/lang/IllegalArgumentException";
3640 _exceptionMessage = "length - offset < 1 < needed";
3643 params_base = (GLint *)
3644 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3645 params = params_base + offset;
3655 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3656 _exception ? JNI_ABORT: 0);
3659 jniThrowException(_env, _exceptionType, _exceptionMessage);
3663 /* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */
3665 android_glGetUniformiv__IILjava_nio_IntBuffer_2
3666 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
3667 jint _exception = 0;
3668 const char * _exceptionType = NULL;
3669 const char * _exceptionMessage = NULL;
3670 jintArray _array = (jintArray) 0;
3671 jint _bufferOffset = (jint) 0;
3673 GLint *params = (GLint *) 0;
3675 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3676 if (_remaining < 1) {
3678 _exceptionType = "java/lang/IllegalArgumentException";
3679 _exceptionMessage = "remaining() < 1 < needed";
3682 if (params == NULL) {
3683 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3684 params = (GLint *) (_paramsBase + _bufferOffset);
3694 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3697 jniThrowException(_env, _exceptionType, _exceptionMessage);
3701 /* GLint glGetUniformLocation ( GLuint program, const char *name ) */
3703 android_glGetUniformLocation__ILjava_lang_String_2
3704 (JNIEnv *_env, jobject _this, jint program, jstring name) {
3705 jint _exception = 0;
3706 const char * _exceptionType = NULL;
3707 const char * _exceptionMessage = NULL;
3708 GLint _returnValue = 0;
3709 const char* _nativename = 0;
3713 _exceptionType = "java/lang/IllegalArgumentException";
3714 _exceptionMessage = "name == null";
3717 _nativename = _env->GetStringUTFChars(name, 0);
3719 _returnValue = glGetUniformLocation(
3726 _env->ReleaseStringUTFChars(name, _nativename);
3730 jniThrowException(_env, _exceptionType, _exceptionMessage);
3732 return (jint)_returnValue;
3735 /* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */
3737 android_glGetVertexAttribfv__II_3FI
3738 (JNIEnv *_env, jobject _this, jint index, jint pname, jfloatArray params_ref, jint offset) {
3739 jint _exception = 0;
3740 const char * _exceptionType = NULL;
3741 const char * _exceptionMessage = NULL;
3742 GLfloat *params_base = (GLfloat *) 0;
3744 GLfloat *params = (GLfloat *) 0;
3748 _exceptionType = "java/lang/IllegalArgumentException";
3749 _exceptionMessage = "params == null";
3754 _exceptionType = "java/lang/IllegalArgumentException";
3755 _exceptionMessage = "offset < 0";
3758 _remaining = _env->GetArrayLength(params_ref) - offset;
3761 #if defined(GL_CURRENT_VERTEX_ATTRIB)
3762 case GL_CURRENT_VERTEX_ATTRIB:
3763 #endif // defined(GL_CURRENT_VERTEX_ATTRIB)
3770 if (_remaining < _needed) {
3772 _exceptionType = "java/lang/IllegalArgumentException";
3773 _exceptionMessage = "length - offset < needed";
3776 params_base = (GLfloat *)
3777 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
3778 params = params_base + offset;
3780 glGetVertexAttribfv(
3788 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
3789 _exception ? JNI_ABORT: 0);
3792 jniThrowException(_env, _exceptionType, _exceptionMessage);
3796 /* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */
3798 android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2
3799 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
3800 jint _exception = 0;
3801 const char * _exceptionType = NULL;
3802 const char * _exceptionMessage = NULL;
3803 jfloatArray _array = (jfloatArray) 0;
3804 jint _bufferOffset = (jint) 0;
3806 GLfloat *params = (GLfloat *) 0;
3808 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3811 #if defined(GL_CURRENT_VERTEX_ATTRIB)
3812 case GL_CURRENT_VERTEX_ATTRIB:
3813 #endif // defined(GL_CURRENT_VERTEX_ATTRIB)
3820 if (_remaining < _needed) {
3822 _exceptionType = "java/lang/IllegalArgumentException";
3823 _exceptionMessage = "remaining() < needed";
3826 if (params == NULL) {
3827 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
3828 params = (GLfloat *) (_paramsBase + _bufferOffset);
3830 glGetVertexAttribfv(
3838 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
3841 jniThrowException(_env, _exceptionType, _exceptionMessage);
3845 /* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */
3847 android_glGetVertexAttribiv__II_3II
3848 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
3849 jint _exception = 0;
3850 const char * _exceptionType = NULL;
3851 const char * _exceptionMessage = NULL;
3852 GLint *params_base = (GLint *) 0;
3854 GLint *params = (GLint *) 0;
3858 _exceptionType = "java/lang/IllegalArgumentException";
3859 _exceptionMessage = "params == null";
3864 _exceptionType = "java/lang/IllegalArgumentException";
3865 _exceptionMessage = "offset < 0";
3868 _remaining = _env->GetArrayLength(params_ref) - offset;
3871 #if defined(GL_CURRENT_VERTEX_ATTRIB)
3872 case GL_CURRENT_VERTEX_ATTRIB:
3873 #endif // defined(GL_CURRENT_VERTEX_ATTRIB)
3880 if (_remaining < _needed) {
3882 _exceptionType = "java/lang/IllegalArgumentException";
3883 _exceptionMessage = "length - offset < needed";
3886 params_base = (GLint *)
3887 _env->GetIntArrayElements(params_ref, (jboolean *)0);
3888 params = params_base + offset;
3890 glGetVertexAttribiv(
3898 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
3899 _exception ? JNI_ABORT: 0);
3902 jniThrowException(_env, _exceptionType, _exceptionMessage);
3906 /* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */
3908 android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2
3909 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
3910 jint _exception = 0;
3911 const char * _exceptionType = NULL;
3912 const char * _exceptionMessage = NULL;
3913 jintArray _array = (jintArray) 0;
3914 jint _bufferOffset = (jint) 0;
3916 GLint *params = (GLint *) 0;
3918 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
3921 #if defined(GL_CURRENT_VERTEX_ATTRIB)
3922 case GL_CURRENT_VERTEX_ATTRIB:
3923 #endif // defined(GL_CURRENT_VERTEX_ATTRIB)
3930 if (_remaining < _needed) {
3932 _exceptionType = "java/lang/IllegalArgumentException";
3933 _exceptionMessage = "remaining() < needed";
3936 if (params == NULL) {
3937 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
3938 params = (GLint *) (_paramsBase + _bufferOffset);
3940 glGetVertexAttribiv(
3948 _env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
3951 jniThrowException(_env, _exceptionType, _exceptionMessage);
3955 /* void glHint ( GLenum target, GLenum mode ) */
3958 (JNIEnv *_env, jobject _this, jint target, jint mode) {
3965 /* GLboolean glIsBuffer ( GLuint buffer ) */
3967 android_glIsBuffer__I
3968 (JNIEnv *_env, jobject _this, jint buffer) {
3969 GLboolean _returnValue;
3970 _returnValue = glIsBuffer(
3973 return (jboolean)_returnValue;
3976 /* GLboolean glIsEnabled ( GLenum cap ) */
3978 android_glIsEnabled__I
3979 (JNIEnv *_env, jobject _this, jint cap) {
3980 GLboolean _returnValue;
3981 _returnValue = glIsEnabled(
3984 return (jboolean)_returnValue;
3987 /* GLboolean glIsFramebuffer ( GLuint framebuffer ) */
3989 android_glIsFramebuffer__I
3990 (JNIEnv *_env, jobject _this, jint framebuffer) {
3991 GLboolean _returnValue;
3992 _returnValue = glIsFramebuffer(
3995 return (jboolean)_returnValue;
3998 /* GLboolean glIsProgram ( GLuint program ) */
4000 android_glIsProgram__I
4001 (JNIEnv *_env, jobject _this, jint program) {
4002 GLboolean _returnValue;
4003 _returnValue = glIsProgram(
4006 return (jboolean)_returnValue;
4009 /* GLboolean glIsRenderbuffer ( GLuint renderbuffer ) */
4011 android_glIsRenderbuffer__I
4012 (JNIEnv *_env, jobject _this, jint renderbuffer) {
4013 GLboolean _returnValue;
4014 _returnValue = glIsRenderbuffer(
4015 (GLuint)renderbuffer
4017 return (jboolean)_returnValue;
4020 /* GLboolean glIsShader ( GLuint shader ) */
4022 android_glIsShader__I
4023 (JNIEnv *_env, jobject _this, jint shader) {
4024 GLboolean _returnValue;
4025 _returnValue = glIsShader(
4028 return (jboolean)_returnValue;
4031 /* GLboolean glIsTexture ( GLuint texture ) */
4033 android_glIsTexture__I
4034 (JNIEnv *_env, jobject _this, jint texture) {
4035 GLboolean _returnValue;
4036 _returnValue = glIsTexture(
4039 return (jboolean)_returnValue;
4042 /* void glLineWidth ( GLfloat width ) */
4044 android_glLineWidth__F
4045 (JNIEnv *_env, jobject _this, jfloat width) {
4051 /* void glLinkProgram ( GLuint program ) */
4053 android_glLinkProgram__I
4054 (JNIEnv *_env, jobject _this, jint program) {
4060 /* void glPixelStorei ( GLenum pname, GLint param ) */
4062 android_glPixelStorei__II
4063 (JNIEnv *_env, jobject _this, jint pname, jint param) {
4070 /* void glPolygonOffset ( GLfloat factor, GLfloat units ) */
4072 android_glPolygonOffset__FF
4073 (JNIEnv *_env, jobject _this, jfloat factor, jfloat units) {
4080 /* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) */
4082 android_glReadPixels__IIIIIILjava_nio_Buffer_2
4083 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
4084 jarray _array = (jarray) 0;
4085 jint _bufferOffset = (jint) 0;
4087 GLvoid *pixels = (GLvoid *) 0;
4089 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4090 if (pixels == NULL) {
4091 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4092 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
4104 releasePointer(_env, _array, pixels, JNI_TRUE);
4108 /* void glReleaseShaderCompiler ( void ) */
4110 android_glReleaseShaderCompiler__
4111 (JNIEnv *_env, jobject _this) {
4112 glReleaseShaderCompiler();
4115 /* void glRenderbufferStorage ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
4117 android_glRenderbufferStorage__IIII
4118 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
4119 glRenderbufferStorage(
4121 (GLenum)internalformat,
4127 /* void glSampleCoverage ( GLclampf value, GLboolean invert ) */
4129 android_glSampleCoverage__FZ
4130 (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) {
4137 /* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */
4139 android_glScissor__IIII
4140 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
4149 /* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */
4151 android_glShaderBinary__I_3IIILjava_nio_Buffer_2I
4152 (JNIEnv *_env, jobject _this, jint n, jintArray shaders_ref, jint offset, jint binaryformat, jobject binary_buf, jint length) {
4153 jint _exception = 0;
4154 const char * _exceptionType = NULL;
4155 const char * _exceptionMessage = NULL;
4156 jarray _array = (jarray) 0;
4157 jint _bufferOffset = (jint) 0;
4158 GLuint *shaders_base = (GLuint *) 0;
4159 jint _shadersRemaining;
4160 GLuint *shaders = (GLuint *) 0;
4161 jint _binaryRemaining;
4162 GLvoid *binary = (GLvoid *) 0;
4166 _exceptionType = "java/lang/IllegalArgumentException";
4167 _exceptionMessage = "shaders == null";
4172 _exceptionType = "java/lang/IllegalArgumentException";
4173 _exceptionMessage = "offset < 0";
4176 _shadersRemaining = _env->GetArrayLength(shaders_ref) - offset;
4177 shaders_base = (GLuint *)
4178 _env->GetIntArrayElements(shaders_ref, (jboolean *)0);
4179 shaders = shaders_base + offset;
4181 binary = (GLvoid *)getPointer(_env, binary_buf, (jarray*)&_array, &_binaryRemaining, &_bufferOffset);
4182 if (_binaryRemaining < length) {
4184 _exceptionType = "java/lang/IllegalArgumentException";
4185 _exceptionMessage = "remaining() < length < needed";
4188 if (binary == NULL) {
4189 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4190 binary = (GLvoid *) (_binaryBase + _bufferOffset);
4195 (GLenum)binaryformat,
4202 releasePointer(_env, _array, binary, JNI_FALSE);
4205 _env->ReleaseIntArrayElements(shaders_ref, (jint*)shaders_base,
4209 jniThrowException(_env, _exceptionType, _exceptionMessage);
4213 /* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */
4215 android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I
4216 (JNIEnv *_env, jobject _this, jint n, jobject shaders_buf, jint binaryformat, jobject binary_buf, jint length) {
4217 jint _exception = 0;
4218 const char * _exceptionType = NULL;
4219 const char * _exceptionMessage = NULL;
4220 jintArray _shadersArray = (jintArray) 0;
4221 jint _shadersBufferOffset = (jint) 0;
4222 jintArray _binaryArray = (jintArray) 0;
4223 jint _binaryBufferOffset = (jint) 0;
4224 jint _shadersRemaining;
4225 GLuint *shaders = (GLuint *) 0;
4226 jint _binaryRemaining;
4227 GLvoid *binary = (GLvoid *) 0;
4229 shaders = (GLuint *)getPointer(_env, shaders_buf, (jarray*)&_shadersArray, &_shadersRemaining, &_shadersBufferOffset);
4230 binary = (GLvoid *)getPointer(_env, binary_buf, (jarray*)&_binaryArray, &_binaryRemaining, &_binaryBufferOffset);
4231 if (_binaryRemaining < length) {
4233 _exceptionType = "java/lang/IllegalArgumentException";
4234 _exceptionMessage = "remaining() < length < needed";
4237 if (shaders == NULL) {
4238 char * _shadersBase = (char *)_env->GetIntArrayElements(_shadersArray, (jboolean *) 0);
4239 shaders = (GLuint *) (_shadersBase + _shadersBufferOffset);
4241 if (binary == NULL) {
4242 char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_binaryArray, (jboolean *) 0);
4243 binary = (GLvoid *) (_binaryBase + _binaryBufferOffset);
4248 (GLenum)binaryformat,
4255 releasePointer(_env, _binaryArray, binary, JNI_FALSE);
4257 if (_shadersArray) {
4258 _env->ReleaseIntArrayElements(_shadersArray, (jint*)shaders, JNI_ABORT);
4261 jniThrowException(_env, _exceptionType, _exceptionMessage);
4266 /* void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint * length ) */
4269 android_glShaderSource
4270 (JNIEnv *_env, jobject _this, jint shader, jstring string) {
4273 jniThrowException(_env, "java/lang/IllegalArgumentException", "string == null");
4277 const char* nativeString = _env->GetStringUTFChars(string, 0);
4278 const char* strings[] = {nativeString};
4279 glShaderSource(shader, 1, strings, 0);
4280 _env->ReleaseStringUTFChars(string, nativeString);
4282 /* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */
4284 android_glStencilFunc__III
4285 (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) {
4293 /* void glStencilFuncSeparate ( GLenum face, GLenum func, GLint ref, GLuint mask ) */
4295 android_glStencilFuncSeparate__IIII
4296 (JNIEnv *_env, jobject _this, jint face, jint func, jint ref, jint mask) {
4297 glStencilFuncSeparate(
4305 /* void glStencilMask ( GLuint mask ) */
4307 android_glStencilMask__I
4308 (JNIEnv *_env, jobject _this, jint mask) {
4314 /* void glStencilMaskSeparate ( GLenum face, GLuint mask ) */
4316 android_glStencilMaskSeparate__II
4317 (JNIEnv *_env, jobject _this, jint face, jint mask) {
4318 glStencilMaskSeparate(
4324 /* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */
4326 android_glStencilOp__III
4327 (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) {
4335 /* void glStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass ) */
4337 android_glStencilOpSeparate__IIII
4338 (JNIEnv *_env, jobject _this, jint face, jint fail, jint zfail, jint zpass) {
4339 glStencilOpSeparate(
4347 /* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
4349 android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
4350 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
4351 jarray _array = (jarray) 0;
4352 jint _bufferOffset = (jint) 0;
4354 GLvoid *pixels = (GLvoid *) 0;
4357 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4359 if (pixels_buf && pixels == NULL) {
4360 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4361 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
4366 (GLint)internalformat,
4375 releasePointer(_env, _array, pixels, JNI_FALSE);
4379 /* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
4381 android_glTexParameterf__IIF
4382 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
4390 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
4392 android_glTexParameterfv__II_3FI
4393 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
4394 jint _exception = 0;
4395 const char * _exceptionType = NULL;
4396 const char * _exceptionMessage = NULL;
4397 GLfloat *params_base = (GLfloat *) 0;
4399 GLfloat *params = (GLfloat *) 0;
4403 _exceptionType = "java/lang/IllegalArgumentException";
4404 _exceptionMessage = "params == null";
4409 _exceptionType = "java/lang/IllegalArgumentException";
4410 _exceptionMessage = "offset < 0";
4413 _remaining = _env->GetArrayLength(params_ref) - offset;
4414 if (_remaining < 1) {
4416 _exceptionType = "java/lang/IllegalArgumentException";
4417 _exceptionMessage = "length - offset < 1 < needed";
4420 params_base = (GLfloat *)
4421 _env->GetFloatArrayElements(params_ref, (jboolean *)0);
4422 params = params_base + offset;
4432 _env->ReleaseFloatArrayElements(params_ref, (jfloat*)params_base,
4436 jniThrowException(_env, _exceptionType, _exceptionMessage);
4440 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
4442 android_glTexParameterfv__IILjava_nio_FloatBuffer_2
4443 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
4444 jint _exception = 0;
4445 const char * _exceptionType = NULL;
4446 const char * _exceptionMessage = NULL;
4447 jfloatArray _array = (jfloatArray) 0;
4448 jint _bufferOffset = (jint) 0;
4450 GLfloat *params = (GLfloat *) 0;
4452 params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4453 if (_remaining < 1) {
4455 _exceptionType = "java/lang/IllegalArgumentException";
4456 _exceptionMessage = "remaining() < 1 < needed";
4459 if (params == NULL) {
4460 char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
4461 params = (GLfloat *) (_paramsBase + _bufferOffset);
4471 _env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
4474 jniThrowException(_env, _exceptionType, _exceptionMessage);
4478 /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
4480 android_glTexParameteri__III
4481 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
4489 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
4491 android_glTexParameteriv__II_3II
4492 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
4493 jint _exception = 0;
4494 const char * _exceptionType = NULL;
4495 const char * _exceptionMessage = NULL;
4496 GLint *params_base = (GLint *) 0;
4498 GLint *params = (GLint *) 0;
4502 _exceptionType = "java/lang/IllegalArgumentException";
4503 _exceptionMessage = "params == null";
4508 _exceptionType = "java/lang/IllegalArgumentException";
4509 _exceptionMessage = "offset < 0";
4512 _remaining = _env->GetArrayLength(params_ref) - offset;
4513 if (_remaining < 1) {
4515 _exceptionType = "java/lang/IllegalArgumentException";
4516 _exceptionMessage = "length - offset < 1 < needed";
4519 params_base = (GLint *)
4520 _env->GetIntArrayElements(params_ref, (jboolean *)0);
4521 params = params_base + offset;
4531 _env->ReleaseIntArrayElements(params_ref, (jint*)params_base,
4535 jniThrowException(_env, _exceptionType, _exceptionMessage);
4539 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
4541 android_glTexParameteriv__IILjava_nio_IntBuffer_2
4542 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
4543 jint _exception = 0;
4544 const char * _exceptionType = NULL;
4545 const char * _exceptionMessage = NULL;
4546 jintArray _array = (jintArray) 0;
4547 jint _bufferOffset = (jint) 0;
4549 GLint *params = (GLint *) 0;
4551 params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4552 if (_remaining < 1) {
4554 _exceptionType = "java/lang/IllegalArgumentException";
4555 _exceptionMessage = "remaining() < 1 < needed";
4558 if (params == NULL) {
4559 char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4560 params = (GLint *) (_paramsBase + _bufferOffset);
4570 _env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
4573 jniThrowException(_env, _exceptionType, _exceptionMessage);
4577 /* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */
4579 android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
4580 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
4581 jarray _array = (jarray) 0;
4582 jint _bufferOffset = (jint) 0;
4584 GLvoid *pixels = (GLvoid *) 0;
4587 pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4589 if (pixels_buf && pixels == NULL) {
4590 char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
4591 pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
4605 releasePointer(_env, _array, pixels, JNI_FALSE);
4609 /* void glUniform1f ( GLint location, GLfloat x ) */
4611 android_glUniform1f__IF
4612 (JNIEnv *_env, jobject _this, jint location, jfloat x) {
4619 /* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */
4621 android_glUniform1fv__II_3FI
4622 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
4623 jint _exception = 0;
4624 const char * _exceptionType = NULL;
4625 const char * _exceptionMessage = NULL;
4626 GLfloat *v_base = (GLfloat *) 0;
4628 GLfloat *v = (GLfloat *) 0;
4632 _exceptionType = "java/lang/IllegalArgumentException";
4633 _exceptionMessage = "v == null";
4638 _exceptionType = "java/lang/IllegalArgumentException";
4639 _exceptionMessage = "offset < 0";
4642 _remaining = _env->GetArrayLength(v_ref) - offset;
4643 if (_remaining < count) {
4645 _exceptionType = "java/lang/IllegalArgumentException";
4646 _exceptionMessage = "length - offset < count < needed";
4649 v_base = (GLfloat *)
4650 _env->GetFloatArrayElements(v_ref, (jboolean *)0);
4651 v = v_base + offset;
4661 _env->ReleaseFloatArrayElements(v_ref, (jfloat*)v_base,
4665 jniThrowException(_env, _exceptionType, _exceptionMessage);
4669 /* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */
4671 android_glUniform1fv__IILjava_nio_FloatBuffer_2
4672 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4673 jint _exception = 0;
4674 const char * _exceptionType = NULL;
4675 const char * _exceptionMessage = NULL;
4676 jfloatArray _array = (jfloatArray) 0;
4677 jint _bufferOffset = (jint) 0;
4679 GLfloat *v = (GLfloat *) 0;
4681 v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4682 if (_remaining < count) {
4684 _exceptionType = "java/lang/IllegalArgumentException";
4685 _exceptionMessage = "remaining() < count < needed";
4689 char * _vBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
4690 v = (GLfloat *) (_vBase + _bufferOffset);
4700 _env->ReleaseFloatArrayElements(_array, (jfloat*)v, JNI_ABORT);
4703 jniThrowException(_env, _exceptionType, _exceptionMessage);
4707 /* void glUniform1i ( GLint location, GLint x ) */
4709 android_glUniform1i__II
4710 (JNIEnv *_env, jobject _this, jint location, jint x) {
4717 /* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */
4719 android_glUniform1iv__II_3II
4720 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
4721 jint _exception = 0;
4722 const char * _exceptionType = NULL;
4723 const char * _exceptionMessage = NULL;
4724 GLint *v_base = (GLint *) 0;
4726 GLint *v = (GLint *) 0;
4730 _exceptionType = "java/lang/IllegalArgumentException";
4731 _exceptionMessage = "v == null";
4736 _exceptionType = "java/lang/IllegalArgumentException";
4737 _exceptionMessage = "offset < 0";
4740 _remaining = _env->GetArrayLength(v_ref) - offset;
4741 if (_remaining < count) {
4743 _exceptionType = "java/lang/IllegalArgumentException";
4744 _exceptionMessage = "length - offset < count < needed";
4748 _env->GetIntArrayElements(v_ref, (jboolean *)0);
4749 v = v_base + offset;
4759 _env->ReleaseIntArrayElements(v_ref, (jint*)v_base,
4763 jniThrowException(_env, _exceptionType, _exceptionMessage);
4767 /* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */
4769 android_glUniform1iv__IILjava_nio_IntBuffer_2
4770 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4771 jint _exception = 0;
4772 const char * _exceptionType = NULL;
4773 const char * _exceptionMessage = NULL;
4774 jintArray _array = (jintArray) 0;
4775 jint _bufferOffset = (jint) 0;
4777 GLint *v = (GLint *) 0;
4779 v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4780 if (_remaining < count) {
4782 _exceptionType = "java/lang/IllegalArgumentException";
4783 _exceptionMessage = "remaining() < count < needed";
4787 char * _vBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4788 v = (GLint *) (_vBase + _bufferOffset);
4798 _env->ReleaseIntArrayElements(_array, (jint*)v, JNI_ABORT);
4801 jniThrowException(_env, _exceptionType, _exceptionMessage);
4805 /* void glUniform2f ( GLint location, GLfloat x, GLfloat y ) */
4807 android_glUniform2f__IFF
4808 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y) {
4816 /* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */
4818 android_glUniform2fv__II_3FI
4819 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
4820 jint _exception = 0;
4821 const char * _exceptionType = NULL;
4822 const char * _exceptionMessage = NULL;
4823 GLfloat *v_base = (GLfloat *) 0;
4825 GLfloat *v = (GLfloat *) 0;
4829 _exceptionType = "java/lang/IllegalArgumentException";
4830 _exceptionMessage = "v == null";
4835 _exceptionType = "java/lang/IllegalArgumentException";
4836 _exceptionMessage = "offset < 0";
4839 _remaining = _env->GetArrayLength(v_ref) - offset;
4840 if (_remaining < count*2) {
4842 _exceptionType = "java/lang/IllegalArgumentException";
4843 _exceptionMessage = "length - offset < count*2 < needed";
4846 v_base = (GLfloat *)
4847 _env->GetFloatArrayElements(v_ref, (jboolean *)0);
4848 v = v_base + offset;
4858 _env->ReleaseFloatArrayElements(v_ref, (jfloat*)v_base,
4862 jniThrowException(_env, _exceptionType, _exceptionMessage);
4866 /* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */
4868 android_glUniform2fv__IILjava_nio_FloatBuffer_2
4869 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4870 jint _exception = 0;
4871 const char * _exceptionType = NULL;
4872 const char * _exceptionMessage = NULL;
4873 jfloatArray _array = (jfloatArray) 0;
4874 jint _bufferOffset = (jint) 0;
4876 GLfloat *v = (GLfloat *) 0;
4878 v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4879 if (_remaining < count*2) {
4881 _exceptionType = "java/lang/IllegalArgumentException";
4882 _exceptionMessage = "remaining() < count*2 < needed";
4886 char * _vBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
4887 v = (GLfloat *) (_vBase + _bufferOffset);
4897 _env->ReleaseFloatArrayElements(_array, (jfloat*)v, JNI_ABORT);
4900 jniThrowException(_env, _exceptionType, _exceptionMessage);
4904 /* void glUniform2i ( GLint location, GLint x, GLint y ) */
4906 android_glUniform2i__III
4907 (JNIEnv *_env, jobject _this, jint location, jint x, jint y) {
4915 /* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */
4917 android_glUniform2iv__II_3II
4918 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
4919 jint _exception = 0;
4920 const char * _exceptionType = NULL;
4921 const char * _exceptionMessage = NULL;
4922 GLint *v_base = (GLint *) 0;
4924 GLint *v = (GLint *) 0;
4928 _exceptionType = "java/lang/IllegalArgumentException";
4929 _exceptionMessage = "v == null";
4934 _exceptionType = "java/lang/IllegalArgumentException";
4935 _exceptionMessage = "offset < 0";
4938 _remaining = _env->GetArrayLength(v_ref) - offset;
4939 if (_remaining < count*2) {
4941 _exceptionType = "java/lang/IllegalArgumentException";
4942 _exceptionMessage = "length - offset < count*2 < needed";
4946 _env->GetIntArrayElements(v_ref, (jboolean *)0);
4947 v = v_base + offset;
4957 _env->ReleaseIntArrayElements(v_ref, (jint*)v_base,
4961 jniThrowException(_env, _exceptionType, _exceptionMessage);
4965 /* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */
4967 android_glUniform2iv__IILjava_nio_IntBuffer_2
4968 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4969 jint _exception = 0;
4970 const char * _exceptionType = NULL;
4971 const char * _exceptionMessage = NULL;
4972 jintArray _array = (jintArray) 0;
4973 jint _bufferOffset = (jint) 0;
4975 GLint *v = (GLint *) 0;
4977 v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
4978 if (_remaining < count*2) {
4980 _exceptionType = "java/lang/IllegalArgumentException";
4981 _exceptionMessage = "remaining() < count*2 < needed";
4985 char * _vBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
4986 v = (GLint *) (_vBase + _bufferOffset);
4996 _env->ReleaseIntArrayElements(_array, (jint*)v, JNI_ABORT);
4999 jniThrowException(_env, _exceptionType, _exceptionMessage);
5003 /* void glUniform3f ( GLint location, GLfloat x, GLfloat y, GLfloat z ) */
5005 android_glUniform3f__IFFF
5006 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y, jfloat z) {
5015 /* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */
5017 android_glUniform3fv__II_3FI
5018 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
5019 jint _exception = 0;
5020 const char * _exceptionType = NULL;
5021 const char * _exceptionMessage = NULL;
5022 GLfloat *v_base = (GLfloat *) 0;
5024 GLfloat *v = (GLfloat *) 0;
5028 _exceptionType = "java/lang/IllegalArgumentException";
5029 _exceptionMessage = "v == null";
5034 _exceptionType = "java/lang/IllegalArgumentException";
5035 _exceptionMessage = "offset < 0";
5038 _remaining = _env->GetArrayLength(v_ref) - offset;
5039 if (_remaining < count*3) {
5041 _exceptionType = "java/lang/IllegalArgumentException";
5042 _exceptionMessage = "length - offset < count*3 < needed";
5045 v_base = (GLfloat *)
5046 _env->GetFloatArrayElements(v_ref, (jboolean *)0);
5047 v = v_base + offset;
5057 _env->ReleaseFloatArrayElements(v_ref, (jfloat*)v_base,
5061 jniThrowException(_env, _exceptionType, _exceptionMessage);
5065 /* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */
5067 android_glUniform3fv__IILjava_nio_FloatBuffer_2
5068 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
5069 jint _exception = 0;
5070 const char * _exceptionType = NULL;
5071 const char * _exceptionMessage = NULL;
5072 jfloatArray _array = (jfloatArray) 0;
5073 jint _bufferOffset = (jint) 0;
5075 GLfloat *v = (GLfloat *) 0;
5077 v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5078 if (_remaining < count*3) {
5080 _exceptionType = "java/lang/IllegalArgumentException";
5081 _exceptionMessage = "remaining() < count*3 < needed";
5085 char * _vBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5086 v = (GLfloat *) (_vBase + _bufferOffset);
5096 _env->ReleaseFloatArrayElements(_array, (jfloat*)v, JNI_ABORT);
5099 jniThrowException(_env, _exceptionType, _exceptionMessage);
5103 /* void glUniform3i ( GLint location, GLint x, GLint y, GLint z ) */
5105 android_glUniform3i__IIII
5106 (JNIEnv *_env, jobject _this, jint location, jint x, jint y, jint z) {
5115 /* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */
5117 android_glUniform3iv__II_3II
5118 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
5119 jint _exception = 0;
5120 const char * _exceptionType = NULL;
5121 const char * _exceptionMessage = NULL;
5122 GLint *v_base = (GLint *) 0;
5124 GLint *v = (GLint *) 0;
5128 _exceptionType = "java/lang/IllegalArgumentException";
5129 _exceptionMessage = "v == null";
5134 _exceptionType = "java/lang/IllegalArgumentException";
5135 _exceptionMessage = "offset < 0";
5138 _remaining = _env->GetArrayLength(v_ref) - offset;
5139 if (_remaining < count*3) {
5141 _exceptionType = "java/lang/IllegalArgumentException";
5142 _exceptionMessage = "length - offset < count*3 < needed";
5146 _env->GetIntArrayElements(v_ref, (jboolean *)0);
5147 v = v_base + offset;
5157 _env->ReleaseIntArrayElements(v_ref, (jint*)v_base,
5161 jniThrowException(_env, _exceptionType, _exceptionMessage);
5165 /* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */
5167 android_glUniform3iv__IILjava_nio_IntBuffer_2
5168 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
5169 jint _exception = 0;
5170 const char * _exceptionType = NULL;
5171 const char * _exceptionMessage = NULL;
5172 jintArray _array = (jintArray) 0;
5173 jint _bufferOffset = (jint) 0;
5175 GLint *v = (GLint *) 0;
5177 v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5178 if (_remaining < count*3) {
5180 _exceptionType = "java/lang/IllegalArgumentException";
5181 _exceptionMessage = "remaining() < count*3 < needed";
5185 char * _vBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5186 v = (GLint *) (_vBase + _bufferOffset);
5196 _env->ReleaseIntArrayElements(_array, (jint*)v, JNI_ABORT);
5199 jniThrowException(_env, _exceptionType, _exceptionMessage);
5203 /* void glUniform4f ( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) */
5205 android_glUniform4f__IFFFF
5206 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y, jfloat z, jfloat w) {
5216 /* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */
5218 android_glUniform4fv__II_3FI
5219 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
5220 jint _exception = 0;
5221 const char * _exceptionType = NULL;
5222 const char * _exceptionMessage = NULL;
5223 GLfloat *v_base = (GLfloat *) 0;
5225 GLfloat *v = (GLfloat *) 0;
5229 _exceptionType = "java/lang/IllegalArgumentException";
5230 _exceptionMessage = "v == null";
5235 _exceptionType = "java/lang/IllegalArgumentException";
5236 _exceptionMessage = "offset < 0";
5239 _remaining = _env->GetArrayLength(v_ref) - offset;
5240 if (_remaining < count*4) {
5242 _exceptionType = "java/lang/IllegalArgumentException";
5243 _exceptionMessage = "length - offset < count*4 < needed";
5246 v_base = (GLfloat *)
5247 _env->GetFloatArrayElements(v_ref, (jboolean *)0);
5248 v = v_base + offset;
5258 _env->ReleaseFloatArrayElements(v_ref, (jfloat*)v_base,
5262 jniThrowException(_env, _exceptionType, _exceptionMessage);
5266 /* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */
5268 android_glUniform4fv__IILjava_nio_FloatBuffer_2
5269 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
5270 jint _exception = 0;
5271 const char * _exceptionType = NULL;
5272 const char * _exceptionMessage = NULL;
5273 jfloatArray _array = (jfloatArray) 0;
5274 jint _bufferOffset = (jint) 0;
5276 GLfloat *v = (GLfloat *) 0;
5278 v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5279 if (_remaining < count*4) {
5281 _exceptionType = "java/lang/IllegalArgumentException";
5282 _exceptionMessage = "remaining() < count*4 < needed";
5286 char * _vBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5287 v = (GLfloat *) (_vBase + _bufferOffset);
5297 _env->ReleaseFloatArrayElements(_array, (jfloat*)v, JNI_ABORT);
5300 jniThrowException(_env, _exceptionType, _exceptionMessage);
5304 /* void glUniform4i ( GLint location, GLint x, GLint y, GLint z, GLint w ) */
5306 android_glUniform4i__IIIII
5307 (JNIEnv *_env, jobject _this, jint location, jint x, jint y, jint z, jint w) {
5317 /* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */
5319 android_glUniform4iv__II_3II
5320 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
5321 jint _exception = 0;
5322 const char * _exceptionType = NULL;
5323 const char * _exceptionMessage = NULL;
5324 GLint *v_base = (GLint *) 0;
5326 GLint *v = (GLint *) 0;
5330 _exceptionType = "java/lang/IllegalArgumentException";
5331 _exceptionMessage = "v == null";
5336 _exceptionType = "java/lang/IllegalArgumentException";
5337 _exceptionMessage = "offset < 0";
5340 _remaining = _env->GetArrayLength(v_ref) - offset;
5341 if (_remaining < count*4) {
5343 _exceptionType = "java/lang/IllegalArgumentException";
5344 _exceptionMessage = "length - offset < count*4 < needed";
5348 _env->GetIntArrayElements(v_ref, (jboolean *)0);
5349 v = v_base + offset;
5359 _env->ReleaseIntArrayElements(v_ref, (jint*)v_base,
5363 jniThrowException(_env, _exceptionType, _exceptionMessage);
5367 /* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */
5369 android_glUniform4iv__IILjava_nio_IntBuffer_2
5370 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
5371 jint _exception = 0;
5372 const char * _exceptionType = NULL;
5373 const char * _exceptionMessage = NULL;
5374 jintArray _array = (jintArray) 0;
5375 jint _bufferOffset = (jint) 0;
5377 GLint *v = (GLint *) 0;
5379 v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5380 if (_remaining < count*4) {
5382 _exceptionType = "java/lang/IllegalArgumentException";
5383 _exceptionMessage = "remaining() < count*4 < needed";
5387 char * _vBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
5388 v = (GLint *) (_vBase + _bufferOffset);
5398 _env->ReleaseIntArrayElements(_array, (jint*)v, JNI_ABORT);
5401 jniThrowException(_env, _exceptionType, _exceptionMessage);
5405 /* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
5407 android_glUniformMatrix2fv__IIZ_3FI
5408 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
5409 jint _exception = 0;
5410 const char * _exceptionType = NULL;
5411 const char * _exceptionMessage = NULL;
5412 GLfloat *value_base = (GLfloat *) 0;
5414 GLfloat *value = (GLfloat *) 0;
5418 _exceptionType = "java/lang/IllegalArgumentException";
5419 _exceptionMessage = "value == null";
5424 _exceptionType = "java/lang/IllegalArgumentException";
5425 _exceptionMessage = "offset < 0";
5428 _remaining = _env->GetArrayLength(value_ref) - offset;
5429 if (_remaining < count*4) {
5431 _exceptionType = "java/lang/IllegalArgumentException";
5432 _exceptionMessage = "length - offset < count*4 < needed";
5435 value_base = (GLfloat *)
5436 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
5437 value = value_base + offset;
5442 (GLboolean)transpose,
5448 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
5452 jniThrowException(_env, _exceptionType, _exceptionMessage);
5456 /* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
5458 android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2
5459 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
5460 jint _exception = 0;
5461 const char * _exceptionType = NULL;
5462 const char * _exceptionMessage = NULL;
5463 jfloatArray _array = (jfloatArray) 0;
5464 jint _bufferOffset = (jint) 0;
5466 GLfloat *value = (GLfloat *) 0;
5468 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5469 if (_remaining < count*4) {
5471 _exceptionType = "java/lang/IllegalArgumentException";
5472 _exceptionMessage = "remaining() < count*4 < needed";
5475 if (value == NULL) {
5476 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5477 value = (GLfloat *) (_valueBase + _bufferOffset);
5482 (GLboolean)transpose,
5488 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
5491 jniThrowException(_env, _exceptionType, _exceptionMessage);
5495 /* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
5497 android_glUniformMatrix3fv__IIZ_3FI
5498 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
5499 jint _exception = 0;
5500 const char * _exceptionType = NULL;
5501 const char * _exceptionMessage = NULL;
5502 GLfloat *value_base = (GLfloat *) 0;
5504 GLfloat *value = (GLfloat *) 0;
5508 _exceptionType = "java/lang/IllegalArgumentException";
5509 _exceptionMessage = "value == null";
5514 _exceptionType = "java/lang/IllegalArgumentException";
5515 _exceptionMessage = "offset < 0";
5518 _remaining = _env->GetArrayLength(value_ref) - offset;
5519 if (_remaining < count*9) {
5521 _exceptionType = "java/lang/IllegalArgumentException";
5522 _exceptionMessage = "length - offset < count*9 < needed";
5525 value_base = (GLfloat *)
5526 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
5527 value = value_base + offset;
5532 (GLboolean)transpose,
5538 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
5542 jniThrowException(_env, _exceptionType, _exceptionMessage);
5546 /* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
5548 android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2
5549 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
5550 jint _exception = 0;
5551 const char * _exceptionType = NULL;
5552 const char * _exceptionMessage = NULL;
5553 jfloatArray _array = (jfloatArray) 0;
5554 jint _bufferOffset = (jint) 0;
5556 GLfloat *value = (GLfloat *) 0;
5558 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5559 if (_remaining < count*9) {
5561 _exceptionType = "java/lang/IllegalArgumentException";
5562 _exceptionMessage = "remaining() < count*9 < needed";
5565 if (value == NULL) {
5566 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5567 value = (GLfloat *) (_valueBase + _bufferOffset);
5572 (GLboolean)transpose,
5578 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
5581 jniThrowException(_env, _exceptionType, _exceptionMessage);
5585 /* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
5587 android_glUniformMatrix4fv__IIZ_3FI
5588 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
5589 jint _exception = 0;
5590 const char * _exceptionType = NULL;
5591 const char * _exceptionMessage = NULL;
5592 GLfloat *value_base = (GLfloat *) 0;
5594 GLfloat *value = (GLfloat *) 0;
5598 _exceptionType = "java/lang/IllegalArgumentException";
5599 _exceptionMessage = "value == null";
5604 _exceptionType = "java/lang/IllegalArgumentException";
5605 _exceptionMessage = "offset < 0";
5608 _remaining = _env->GetArrayLength(value_ref) - offset;
5609 if (_remaining < count*16) {
5611 _exceptionType = "java/lang/IllegalArgumentException";
5612 _exceptionMessage = "length - offset < count*16 < needed";
5615 value_base = (GLfloat *)
5616 _env->GetFloatArrayElements(value_ref, (jboolean *)0);
5617 value = value_base + offset;
5622 (GLboolean)transpose,
5628 _env->ReleaseFloatArrayElements(value_ref, (jfloat*)value_base,
5632 jniThrowException(_env, _exceptionType, _exceptionMessage);
5636 /* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
5638 android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2
5639 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
5640 jint _exception = 0;
5641 const char * _exceptionType = NULL;
5642 const char * _exceptionMessage = NULL;
5643 jfloatArray _array = (jfloatArray) 0;
5644 jint _bufferOffset = (jint) 0;
5646 GLfloat *value = (GLfloat *) 0;
5648 value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5649 if (_remaining < count*16) {
5651 _exceptionType = "java/lang/IllegalArgumentException";
5652 _exceptionMessage = "remaining() < count*16 < needed";
5655 if (value == NULL) {
5656 char * _valueBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5657 value = (GLfloat *) (_valueBase + _bufferOffset);
5662 (GLboolean)transpose,
5668 _env->ReleaseFloatArrayElements(_array, (jfloat*)value, JNI_ABORT);
5671 jniThrowException(_env, _exceptionType, _exceptionMessage);
5675 /* void glUseProgram ( GLuint program ) */
5677 android_glUseProgram__I
5678 (JNIEnv *_env, jobject _this, jint program) {
5684 /* void glValidateProgram ( GLuint program ) */
5686 android_glValidateProgram__I
5687 (JNIEnv *_env, jobject _this, jint program) {
5693 /* void glVertexAttrib1f ( GLuint indx, GLfloat x ) */
5695 android_glVertexAttrib1f__IF
5696 (JNIEnv *_env, jobject _this, jint indx, jfloat x) {
5703 /* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */
5705 android_glVertexAttrib1fv__I_3FI
5706 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
5707 jint _exception = 0;
5708 const char * _exceptionType = NULL;
5709 const char * _exceptionMessage = NULL;
5710 GLfloat *values_base = (GLfloat *) 0;
5712 GLfloat *values = (GLfloat *) 0;
5716 _exceptionType = "java/lang/IllegalArgumentException";
5717 _exceptionMessage = "values == null";
5722 _exceptionType = "java/lang/IllegalArgumentException";
5723 _exceptionMessage = "offset < 0";
5726 _remaining = _env->GetArrayLength(values_ref) - offset;
5727 if (_remaining < 1) {
5729 _exceptionType = "java/lang/IllegalArgumentException";
5730 _exceptionMessage = "length - offset < 1 < needed";
5733 values_base = (GLfloat *)
5734 _env->GetFloatArrayElements(values_ref, (jboolean *)0);
5735 values = values_base + offset;
5744 _env->ReleaseFloatArrayElements(values_ref, (jfloat*)values_base,
5748 jniThrowException(_env, _exceptionType, _exceptionMessage);
5752 /* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */
5754 android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2
5755 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
5756 jint _exception = 0;
5757 const char * _exceptionType = NULL;
5758 const char * _exceptionMessage = NULL;
5759 jfloatArray _array = (jfloatArray) 0;
5760 jint _bufferOffset = (jint) 0;
5762 GLfloat *values = (GLfloat *) 0;
5764 values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5765 if (_remaining < 1) {
5767 _exceptionType = "java/lang/IllegalArgumentException";
5768 _exceptionMessage = "remaining() < 1 < needed";
5771 if (values == NULL) {
5772 char * _valuesBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5773 values = (GLfloat *) (_valuesBase + _bufferOffset);
5782 _env->ReleaseFloatArrayElements(_array, (jfloat*)values, JNI_ABORT);
5785 jniThrowException(_env, _exceptionType, _exceptionMessage);
5789 /* void glVertexAttrib2f ( GLuint indx, GLfloat x, GLfloat y ) */
5791 android_glVertexAttrib2f__IFF
5792 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y) {
5800 /* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */
5802 android_glVertexAttrib2fv__I_3FI
5803 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
5804 jint _exception = 0;
5805 const char * _exceptionType = NULL;
5806 const char * _exceptionMessage = NULL;
5807 GLfloat *values_base = (GLfloat *) 0;
5809 GLfloat *values = (GLfloat *) 0;
5813 _exceptionType = "java/lang/IllegalArgumentException";
5814 _exceptionMessage = "values == null";
5819 _exceptionType = "java/lang/IllegalArgumentException";
5820 _exceptionMessage = "offset < 0";
5823 _remaining = _env->GetArrayLength(values_ref) - offset;
5824 if (_remaining < 2) {
5826 _exceptionType = "java/lang/IllegalArgumentException";
5827 _exceptionMessage = "length - offset < 2 < needed";
5830 values_base = (GLfloat *)
5831 _env->GetFloatArrayElements(values_ref, (jboolean *)0);
5832 values = values_base + offset;
5841 _env->ReleaseFloatArrayElements(values_ref, (jfloat*)values_base,
5845 jniThrowException(_env, _exceptionType, _exceptionMessage);
5849 /* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */
5851 android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2
5852 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
5853 jint _exception = 0;
5854 const char * _exceptionType = NULL;
5855 const char * _exceptionMessage = NULL;
5856 jfloatArray _array = (jfloatArray) 0;
5857 jint _bufferOffset = (jint) 0;
5859 GLfloat *values = (GLfloat *) 0;
5861 values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5862 if (_remaining < 2) {
5864 _exceptionType = "java/lang/IllegalArgumentException";
5865 _exceptionMessage = "remaining() < 2 < needed";
5868 if (values == NULL) {
5869 char * _valuesBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5870 values = (GLfloat *) (_valuesBase + _bufferOffset);
5879 _env->ReleaseFloatArrayElements(_array, (jfloat*)values, JNI_ABORT);
5882 jniThrowException(_env, _exceptionType, _exceptionMessage);
5886 /* void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z ) */
5888 android_glVertexAttrib3f__IFFF
5889 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y, jfloat z) {
5898 /* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */
5900 android_glVertexAttrib3fv__I_3FI
5901 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
5902 jint _exception = 0;
5903 const char * _exceptionType = NULL;
5904 const char * _exceptionMessage = NULL;
5905 GLfloat *values_base = (GLfloat *) 0;
5907 GLfloat *values = (GLfloat *) 0;
5911 _exceptionType = "java/lang/IllegalArgumentException";
5912 _exceptionMessage = "values == null";
5917 _exceptionType = "java/lang/IllegalArgumentException";
5918 _exceptionMessage = "offset < 0";
5921 _remaining = _env->GetArrayLength(values_ref) - offset;
5922 if (_remaining < 3) {
5924 _exceptionType = "java/lang/IllegalArgumentException";
5925 _exceptionMessage = "length - offset < 3 < needed";
5928 values_base = (GLfloat *)
5929 _env->GetFloatArrayElements(values_ref, (jboolean *)0);
5930 values = values_base + offset;
5939 _env->ReleaseFloatArrayElements(values_ref, (jfloat*)values_base,
5943 jniThrowException(_env, _exceptionType, _exceptionMessage);
5947 /* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */
5949 android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2
5950 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
5951 jint _exception = 0;
5952 const char * _exceptionType = NULL;
5953 const char * _exceptionMessage = NULL;
5954 jfloatArray _array = (jfloatArray) 0;
5955 jint _bufferOffset = (jint) 0;
5957 GLfloat *values = (GLfloat *) 0;
5959 values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
5960 if (_remaining < 3) {
5962 _exceptionType = "java/lang/IllegalArgumentException";
5963 _exceptionMessage = "remaining() < 3 < needed";
5966 if (values == NULL) {
5967 char * _valuesBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
5968 values = (GLfloat *) (_valuesBase + _bufferOffset);
5977 _env->ReleaseFloatArrayElements(_array, (jfloat*)values, JNI_ABORT);
5980 jniThrowException(_env, _exceptionType, _exceptionMessage);
5984 /* void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) */
5986 android_glVertexAttrib4f__IFFFF
5987 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y, jfloat z, jfloat w) {
5997 /* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */
5999 android_glVertexAttrib4fv__I_3FI
6000 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
6001 jint _exception = 0;
6002 const char * _exceptionType = NULL;
6003 const char * _exceptionMessage = NULL;
6004 GLfloat *values_base = (GLfloat *) 0;
6006 GLfloat *values = (GLfloat *) 0;
6010 _exceptionType = "java/lang/IllegalArgumentException";
6011 _exceptionMessage = "values == null";
6016 _exceptionType = "java/lang/IllegalArgumentException";
6017 _exceptionMessage = "offset < 0";
6020 _remaining = _env->GetArrayLength(values_ref) - offset;
6021 if (_remaining < 4) {
6023 _exceptionType = "java/lang/IllegalArgumentException";
6024 _exceptionMessage = "length - offset < 4 < needed";
6027 values_base = (GLfloat *)
6028 _env->GetFloatArrayElements(values_ref, (jboolean *)0);
6029 values = values_base + offset;
6038 _env->ReleaseFloatArrayElements(values_ref, (jfloat*)values_base,
6042 jniThrowException(_env, _exceptionType, _exceptionMessage);
6046 /* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */
6048 android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2
6049 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
6050 jint _exception = 0;
6051 const char * _exceptionType = NULL;
6052 const char * _exceptionMessage = NULL;
6053 jfloatArray _array = (jfloatArray) 0;
6054 jint _bufferOffset = (jint) 0;
6056 GLfloat *values = (GLfloat *) 0;
6058 values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
6059 if (_remaining < 4) {
6061 _exceptionType = "java/lang/IllegalArgumentException";
6062 _exceptionMessage = "remaining() < 4 < needed";
6065 if (values == NULL) {
6066 char * _valuesBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
6067 values = (GLfloat *) (_valuesBase + _bufferOffset);
6076 _env->ReleaseFloatArrayElements(_array, (jfloat*)values, JNI_ABORT);
6079 jniThrowException(_env, _exceptionType, _exceptionMessage);
6083 /* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset ) */
6085 android_glVertexAttribPointer__IIIZII
6086 (JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jint offset) {
6087 glVertexAttribPointer(
6091 (GLboolean)normalized,
6093 reinterpret_cast<GLvoid *>(offset)
6097 /* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) */
6099 android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
6100 (JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jobject ptr_buf, jint remaining) {
6101 jarray _array = (jarray) 0;
6102 jint _bufferOffset = (jint) 0;
6104 GLvoid *ptr = (GLvoid *) 0;
6107 ptr = (GLvoid *) getDirectBufferPointer(_env, ptr_buf);
6112 glVertexAttribPointerBounds(
6116 (GLboolean)normalized,
6123 /* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */
6125 android_glViewport__IIII
6126 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
6135 static const char *classPathName = "android/opengl/GLES20";
6137 static const JNINativeMethod methods[] = {
6138 {"_nativeClassInit", "()V", (void*)nativeClassInit },
6139 {"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I },
6140 {"glAttachShader", "(II)V", (void *) android_glAttachShader__II },
6141 {"glBindAttribLocation", "(IILjava/lang/String;)V", (void *) android_glBindAttribLocation__IILjava_lang_String_2 },
6142 {"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II },
6143 {"glBindFramebuffer", "(II)V", (void *) android_glBindFramebuffer__II },
6144 {"glBindRenderbuffer", "(II)V", (void *) android_glBindRenderbuffer__II },
6145 {"glBindTexture", "(II)V", (void *) android_glBindTexture__II },
6146 {"glBlendColor", "(FFFF)V", (void *) android_glBlendColor__FFFF },
6147 {"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I },
6148 {"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II },
6149 {"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II },
6150 {"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII },
6151 {"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I },
6152 {"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 },
6153 {"glCheckFramebufferStatus", "(I)I", (void *) android_glCheckFramebufferStatus__I },
6154 {"glClear", "(I)V", (void *) android_glClear__I },
6155 {"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF },
6156 {"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F },
6157 {"glClearStencil", "(I)V", (void *) android_glClearStencil__I },
6158 {"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ },
6159 {"glCompileShader", "(I)V", (void *) android_glCompileShader__I },
6160 {"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 },
6161 {"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6162 {"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII },
6163 {"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII },
6164 {"glCreateProgram", "()I", (void *) android_glCreateProgram__ },
6165 {"glCreateShader", "(I)I", (void *) android_glCreateShader__I },
6166 {"glCullFace", "(I)V", (void *) android_glCullFace__I },
6167 {"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II },
6168 {"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 },
6169 {"glDeleteFramebuffers", "(I[II)V", (void *) android_glDeleteFramebuffers__I_3II },
6170 {"glDeleteFramebuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2 },
6171 {"glDeleteProgram", "(I)V", (void *) android_glDeleteProgram__I },
6172 {"glDeleteRenderbuffers", "(I[II)V", (void *) android_glDeleteRenderbuffers__I_3II },
6173 {"glDeleteRenderbuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2 },
6174 {"glDeleteShader", "(I)V", (void *) android_glDeleteShader__I },
6175 {"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II },
6176 {"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 },
6177 {"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I },
6178 {"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z },
6179 {"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF },
6180 {"glDetachShader", "(II)V", (void *) android_glDetachShader__II },
6181 {"glDisable", "(I)V", (void *) android_glDisable__I },
6182 {"glDisableVertexAttribArray", "(I)V", (void *) android_glDisableVertexAttribArray__I },
6183 {"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
6184 {"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
6185 {"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
6186 {"glEnable", "(I)V", (void *) android_glEnable__I },
6187 {"glEnableVertexAttribArray", "(I)V", (void *) android_glEnableVertexAttribArray__I },
6188 {"glFinish", "()V", (void *) android_glFinish__ },
6189 {"glFlush", "()V", (void *) android_glFlush__ },
6190 {"glFramebufferRenderbuffer", "(IIII)V", (void *) android_glFramebufferRenderbuffer__IIII },
6191 {"glFramebufferTexture2D", "(IIIII)V", (void *) android_glFramebufferTexture2D__IIIII },
6192 {"glFrontFace", "(I)V", (void *) android_glFrontFace__I },
6193 {"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II },
6194 {"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 },
6195 {"glGenerateMipmap", "(I)V", (void *) android_glGenerateMipmap__I },
6196 {"glGenFramebuffers", "(I[II)V", (void *) android_glGenFramebuffers__I_3II },
6197 {"glGenFramebuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffers__ILjava_nio_IntBuffer_2 },
6198 {"glGenRenderbuffers", "(I[II)V", (void *) android_glGenRenderbuffers__I_3II },
6199 {"glGenRenderbuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffers__ILjava_nio_IntBuffer_2 },
6200 {"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II },
6201 {"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 },
6202 {"glGetActiveAttrib", "(III[II[II[II[BI)V", (void *) android_glGetActiveAttrib__III_3II_3II_3II_3BI },
6203 {"glGetActiveAttrib", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B },
6204 {"glGetActiveAttrib", "(II[II[II)Ljava/lang/String;", (void *) android_glGetActiveAttrib1 },
6205 {"glGetActiveAttrib", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetActiveAttrib2 },
6206 {"glGetActiveUniform", "(III[II[II[II[BI)V", (void *) android_glGetActiveUniform__III_3II_3II_3II_3BI },
6207 {"glGetActiveUniform", "(II[II[II)Ljava/lang/String;", (void *) android_glGetActiveUniform1 },
6208 {"glGetActiveUniform", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B },
6209 {"glGetActiveUniform", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetActiveUniform2 },
6210 {"glGetAttachedShaders", "(II[II[II)V", (void *) android_glGetAttachedShaders__II_3II_3II },
6211 {"glGetAttachedShaders", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
6212 {"glGetAttribLocation", "(ILjava/lang/String;)I", (void *) android_glGetAttribLocation__ILjava_lang_String_2 },
6213 {"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI },
6214 {"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 },
6215 {"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II },
6216 {"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 },
6217 {"glGetError", "()I", (void *) android_glGetError__ },
6218 {"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI },
6219 {"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 },
6220 {"glGetFramebufferAttachmentParameteriv", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameteriv__III_3II },
6221 {"glGetFramebufferAttachmentParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2 },
6222 {"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II },
6223 {"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 },
6224 {"glGetProgramiv", "(II[II)V", (void *) android_glGetProgramiv__II_3II },
6225 {"glGetProgramiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramiv__IILjava_nio_IntBuffer_2 },
6226 {"glGetProgramInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramInfoLog },
6227 {"glGetRenderbufferParameteriv", "(II[II)V", (void *) android_glGetRenderbufferParameteriv__II_3II },
6228 {"glGetRenderbufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2 },
6229 {"glGetShaderiv", "(II[II)V", (void *) android_glGetShaderiv__II_3II },
6230 {"glGetShaderiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetShaderiv__IILjava_nio_IntBuffer_2 },
6231 {"glGetShaderInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetShaderInfoLog },
6232 {"glGetShaderPrecisionFormat", "(II[II[II)V", (void *) android_glGetShaderPrecisionFormat__II_3II_3II },
6233 {"glGetShaderPrecisionFormat", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
6234 {"glGetShaderSource", "(II[II[BI)V", (void *) android_glGetShaderSource__II_3II_3BI },
6235 {"glGetShaderSource", "(IILjava/nio/IntBuffer;B)V", (void *) android_glGetShaderSource__IILjava_nio_IntBuffer_2B },
6236 {"glGetShaderSource", "(I)Ljava/lang/String;", (void *) android_glGetShaderSource },
6237 {"glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
6238 {"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI },
6239 {"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 },
6240 {"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II },
6241 {"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 },
6242 {"glGetUniformfv", "(II[FI)V", (void *) android_glGetUniformfv__II_3FI },
6243 {"glGetUniformfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetUniformfv__IILjava_nio_FloatBuffer_2 },
6244 {"glGetUniformiv", "(II[II)V", (void *) android_glGetUniformiv__II_3II },
6245 {"glGetUniformiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformiv__IILjava_nio_IntBuffer_2 },
6246 {"glGetUniformLocation", "(ILjava/lang/String;)I", (void *) android_glGetUniformLocation__ILjava_lang_String_2 },
6247 {"glGetVertexAttribfv", "(II[FI)V", (void *) android_glGetVertexAttribfv__II_3FI },
6248 {"glGetVertexAttribfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2 },
6249 {"glGetVertexAttribiv", "(II[II)V", (void *) android_glGetVertexAttribiv__II_3II },
6250 {"glGetVertexAttribiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2 },
6251 {"glHint", "(II)V", (void *) android_glHint__II },
6252 {"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I },
6253 {"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I },
6254 {"glIsFramebuffer", "(I)Z", (void *) android_glIsFramebuffer__I },
6255 {"glIsProgram", "(I)Z", (void *) android_glIsProgram__I },
6256 {"glIsRenderbuffer", "(I)Z", (void *) android_glIsRenderbuffer__I },
6257 {"glIsShader", "(I)Z", (void *) android_glIsShader__I },
6258 {"glIsTexture", "(I)Z", (void *) android_glIsTexture__I },
6259 {"glLineWidth", "(F)V", (void *) android_glLineWidth__F },
6260 {"glLinkProgram", "(I)V", (void *) android_glLinkProgram__I },
6261 {"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II },
6262 {"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF },
6263 {"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 },
6264 {"glReleaseShaderCompiler", "()V", (void *) android_glReleaseShaderCompiler__ },
6265 {"glRenderbufferStorage", "(IIII)V", (void *) android_glRenderbufferStorage__IIII },
6266 {"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ },
6267 {"glScissor", "(IIII)V", (void *) android_glScissor__IIII },
6268 {"glShaderBinary", "(I[IIILjava/nio/Buffer;I)V", (void *) android_glShaderBinary__I_3IIILjava_nio_Buffer_2I },
6269 {"glShaderBinary", "(ILjava/nio/IntBuffer;ILjava/nio/Buffer;I)V", (void *) android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I },
6270 {"glShaderSource", "(ILjava/lang/String;)V", (void *) android_glShaderSource },
6271 {"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III },
6272 {"glStencilFuncSeparate", "(IIII)V", (void *) android_glStencilFuncSeparate__IIII },
6273 {"glStencilMask", "(I)V", (void *) android_glStencilMask__I },
6274 {"glStencilMaskSeparate", "(II)V", (void *) android_glStencilMaskSeparate__II },
6275 {"glStencilOp", "(III)V", (void *) android_glStencilOp__III },
6276 {"glStencilOpSeparate", "(IIII)V", (void *) android_glStencilOpSeparate__IIII },
6277 {"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 },
6278 {"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF },
6279 {"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI },
6280 {"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 },
6281 {"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III },
6282 {"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II },
6283 {"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 },
6284 {"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
6285 {"glUniform1f", "(IF)V", (void *) android_glUniform1f__IF },
6286 {"glUniform1fv", "(II[FI)V", (void *) android_glUniform1fv__II_3FI },
6287 {"glUniform1fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform1fv__IILjava_nio_FloatBuffer_2 },
6288 {"glUniform1i", "(II)V", (void *) android_glUniform1i__II },
6289 {"glUniform1iv", "(II[II)V", (void *) android_glUniform1iv__II_3II },
6290 {"glUniform1iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1iv__IILjava_nio_IntBuffer_2 },
6291 {"glUniform2f", "(IFF)V", (void *) android_glUniform2f__IFF },
6292 {"glUniform2fv", "(II[FI)V", (void *) android_glUniform2fv__II_3FI },
6293 {"glUniform2fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform2fv__IILjava_nio_FloatBuffer_2 },
6294 {"glUniform2i", "(III)V", (void *) android_glUniform2i__III },
6295 {"glUniform2iv", "(II[II)V", (void *) android_glUniform2iv__II_3II },
6296 {"glUniform2iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2iv__IILjava_nio_IntBuffer_2 },
6297 {"glUniform3f", "(IFFF)V", (void *) android_glUniform3f__IFFF },
6298 {"glUniform3fv", "(II[FI)V", (void *) android_glUniform3fv__II_3FI },
6299 {"glUniform3fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform3fv__IILjava_nio_FloatBuffer_2 },
6300 {"glUniform3i", "(IIII)V", (void *) android_glUniform3i__IIII },
6301 {"glUniform3iv", "(II[II)V", (void *) android_glUniform3iv__II_3II },
6302 {"glUniform3iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3iv__IILjava_nio_IntBuffer_2 },
6303 {"glUniform4f", "(IFFFF)V", (void *) android_glUniform4f__IFFFF },
6304 {"glUniform4fv", "(II[FI)V", (void *) android_glUniform4fv__II_3FI },
6305 {"glUniform4fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform4fv__IILjava_nio_FloatBuffer_2 },
6306 {"glUniform4i", "(IIIII)V", (void *) android_glUniform4i__IIIII },
6307 {"glUniform4iv", "(II[II)V", (void *) android_glUniform4iv__II_3II },
6308 {"glUniform4iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4iv__IILjava_nio_IntBuffer_2 },
6309 {"glUniformMatrix2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2fv__IIZ_3FI },
6310 {"glUniformMatrix2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2 },
6311 {"glUniformMatrix3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3fv__IIZ_3FI },
6312 {"glUniformMatrix3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2 },
6313 {"glUniformMatrix4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4fv__IIZ_3FI },
6314 {"glUniformMatrix4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2 },
6315 {"glUseProgram", "(I)V", (void *) android_glUseProgram__I },
6316 {"glValidateProgram", "(I)V", (void *) android_glValidateProgram__I },
6317 {"glVertexAttrib1f", "(IF)V", (void *) android_glVertexAttrib1f__IF },
6318 {"glVertexAttrib1fv", "(I[FI)V", (void *) android_glVertexAttrib1fv__I_3FI },
6319 {"glVertexAttrib1fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2 },
6320 {"glVertexAttrib2f", "(IFF)V", (void *) android_glVertexAttrib2f__IFF },
6321 {"glVertexAttrib2fv", "(I[FI)V", (void *) android_glVertexAttrib2fv__I_3FI },
6322 {"glVertexAttrib2fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2 },
6323 {"glVertexAttrib3f", "(IFFF)V", (void *) android_glVertexAttrib3f__IFFF },
6324 {"glVertexAttrib3fv", "(I[FI)V", (void *) android_glVertexAttrib3fv__I_3FI },
6325 {"glVertexAttrib3fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2 },
6326 {"glVertexAttrib4f", "(IFFFF)V", (void *) android_glVertexAttrib4f__IFFFF },
6327 {"glVertexAttrib4fv", "(I[FI)V", (void *) android_glVertexAttrib4fv__I_3FI },
6328 {"glVertexAttrib4fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 },
6329 {"glVertexAttribPointer", "(IIIZII)V", (void *) android_glVertexAttribPointer__IIIZII },
6330 {"glVertexAttribPointerBounds", "(IIIZILjava/nio/Buffer;I)V", (void *) android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I },
6331 {"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
6334 int register_android_opengl_jni_GLES20(JNIEnv *_env)
6337 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));