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 #include <android_runtime/AndroidRuntime.h>
21 #include <utils/misc.h>
24 #include <GLES2/gl2.h>
25 #include <GLES2/gl2ext.h>
27 static int initialized = 0;
29 static jclass nioAccessClass;
30 static jclass bufferClass;
31 static jclass OOMEClass;
32 static jclass UOEClass;
33 static jclass IAEClass;
34 static jclass AIOOBEClass;
35 static jmethodID getBasePointerID;
36 static jmethodID getBaseArrayID;
37 static jmethodID getBaseArrayOffsetID;
38 static jfieldID positionID;
39 static jfieldID limitID;
40 static jfieldID elementSizeShiftID;
42 /* Cache method IDs each time the class is loaded. */
45 nativeClassInitBuffer(JNIEnv *_env)
47 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
48 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
50 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
51 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
53 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
54 "getBasePointer", "(Ljava/nio/Buffer;)J");
55 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
56 "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
57 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
58 "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
60 positionID = _env->GetFieldID(bufferClass, "position", "I");
61 limitID = _env->GetFieldID(bufferClass, "limit", "I");
63 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
68 nativeClassInit(JNIEnv *_env, jclass glImplClass)
70 nativeClassInitBuffer(_env);
72 jclass IAEClassLocal =
73 _env->FindClass("java/lang/IllegalArgumentException");
74 jclass OOMEClassLocal =
75 _env->FindClass("java/lang/OutOfMemoryError");
76 jclass UOEClassLocal =
77 _env->FindClass("java/lang/UnsupportedOperationException");
78 jclass AIOOBEClassLocal =
79 _env->FindClass("java/lang/ArrayIndexOutOfBoundsException");
81 IAEClass = (jclass) _env->NewGlobalRef(IAEClassLocal);
82 OOMEClass = (jclass) _env->NewGlobalRef(OOMEClassLocal);
83 UOEClass = (jclass) _env->NewGlobalRef(UOEClassLocal);
84 AIOOBEClass = (jclass) _env->NewGlobalRef(AIOOBEClassLocal);
88 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
92 jint elementSizeShift;
97 position = _env->GetIntField(buffer, positionID);
98 limit = _env->GetIntField(buffer, limitID);
99 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
100 *remaining = (limit - position) << elementSizeShift;
101 pointer = _env->CallStaticLongMethod(nioAccessClass,
102 getBasePointerID, buffer);
105 return (void *) (jint) pointer;
108 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
109 getBaseArrayID, buffer);
110 offset = _env->CallStaticIntMethod(nioAccessClass,
111 getBaseArrayOffsetID, buffer);
112 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
114 return (void *) ((char *) data + offset);
119 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
121 _env->ReleasePrimitiveArrayCritical(array, data,
122 commit ? 0 : JNI_ABORT);
126 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
127 char* buf = (char*) _env->GetDirectBufferAddress(buffer);
129 jint position = _env->GetIntField(buffer, positionID);
130 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
131 buf += position << elementSizeShift;
133 _env->ThrowNew(IAEClass, "Must use a native order direct Buffer");
139 getNumCompressedTextureFormats() {
140 int numCompressedTextureFormats = 0;
141 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats);
142 return numCompressedTextureFormats;
145 static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
146 GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
147 glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
150 // --------------------------------------------------------------------------
152 /* void glActiveTexture ( GLenum texture ) */
154 android_glActiveTexture__I
155 (JNIEnv *_env, jobject _this, jint texture) {
161 /* void glAttachShader ( GLuint program, GLuint shader ) */
163 android_glAttachShader__II
164 (JNIEnv *_env, jobject _this, jint program, jint shader) {
171 /* void glBindAttribLocation ( GLuint program, GLuint index, const char *name ) */
173 android_glBindAttribLocation__IILjava_lang_String_2
174 (JNIEnv *_env, jobject _this, jint program, jint index, jstring name) {
175 const char* _nativename = 0;
178 _env->ThrowNew(IAEClass, "name == null");
181 _nativename = _env->GetStringUTFChars(name, 0);
183 glBindAttribLocation(
191 _env->ReleaseStringUTFChars(name, _nativename);
196 /* void glBindBuffer ( GLenum target, GLuint buffer ) */
198 android_glBindBuffer__II
199 (JNIEnv *_env, jobject _this, jint target, jint buffer) {
206 /* void glBindFramebuffer ( GLenum target, GLuint framebuffer ) */
208 android_glBindFramebuffer__II
209 (JNIEnv *_env, jobject _this, jint target, jint framebuffer) {
216 /* void glBindRenderbuffer ( GLenum target, GLuint renderbuffer ) */
218 android_glBindRenderbuffer__II
219 (JNIEnv *_env, jobject _this, jint target, jint renderbuffer) {
226 /* void glBindTexture ( GLenum target, GLuint texture ) */
228 android_glBindTexture__II
229 (JNIEnv *_env, jobject _this, jint target, jint texture) {
236 /* void glBlendColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */
238 android_glBlendColor__FFFF
239 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
248 /* void glBlendEquation ( GLenum mode ) */
250 android_glBlendEquation__I
251 (JNIEnv *_env, jobject _this, jint mode) {
252 _env->ThrowNew(UOEClass,
256 /* void glBlendEquationSeparate ( GLenum modeRGB, GLenum modeAlpha ) */
258 android_glBlendEquationSeparate__II
259 (JNIEnv *_env, jobject _this, jint modeRGB, jint modeAlpha) {
260 _env->ThrowNew(UOEClass,
261 "glBlendEquationSeparate");
264 /* void glBlendFunc ( GLenum sfactor, GLenum dfactor ) */
266 android_glBlendFunc__II
267 (JNIEnv *_env, jobject _this, jint sfactor, jint dfactor) {
274 /* void glBlendFuncSeparate ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) */
276 android_glBlendFuncSeparate__IIII
277 (JNIEnv *_env, jobject _this, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) {
278 _env->ThrowNew(UOEClass,
279 "glBlendFuncSeparate");
282 /* void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) */
284 android_glBufferData__IILjava_nio_Buffer_2I
285 (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
286 jarray _array = (jarray) 0;
288 GLvoid *data = (GLvoid *) 0;
291 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
292 if (_remaining < size) {
293 _env->ThrowNew(IAEClass, "remaining() < size");
306 releasePointer(_env, _array, data, JNI_FALSE);
310 /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
312 android_glBufferSubData__IIILjava_nio_Buffer_2
313 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
314 jarray _array = (jarray) 0;
316 GLvoid *data = (GLvoid *) 0;
318 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
319 if (_remaining < size) {
320 _env->ThrowNew(IAEClass, "remaining() < size");
332 releasePointer(_env, _array, data, JNI_FALSE);
336 /* GLenum glCheckFramebufferStatus ( GLenum target ) */
338 android_glCheckFramebufferStatus__I
339 (JNIEnv *_env, jobject _this, jint target) {
341 _returnValue = glCheckFramebufferStatus(
347 /* void glClear ( GLbitfield mask ) */
350 (JNIEnv *_env, jobject _this, jint mask) {
356 /* void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) */
358 android_glClearColor__FFFF
359 (JNIEnv *_env, jobject _this, jfloat red, jfloat green, jfloat blue, jfloat alpha) {
368 /* void glClearDepthf ( GLclampf depth ) */
370 android_glClearDepthf__F
371 (JNIEnv *_env, jobject _this, jfloat depth) {
377 /* void glClearStencil ( GLint s ) */
379 android_glClearStencil__I
380 (JNIEnv *_env, jobject _this, jint s) {
386 /* void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) */
388 android_glColorMask__ZZZZ
389 (JNIEnv *_env, jobject _this, jboolean red, jboolean green, jboolean blue, jboolean alpha) {
398 /* void glCompileShader ( GLuint shader ) */
400 android_glCompileShader__I
401 (JNIEnv *_env, jobject _this, jint shader) {
407 /* void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) */
409 android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
410 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
411 jarray _array = (jarray) 0;
413 GLvoid *data = (GLvoid *) 0;
415 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
416 glCompressedTexImage2D(
419 (GLenum)internalformat,
427 releasePointer(_env, _array, data, JNI_FALSE);
431 /* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */
433 android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
434 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
435 jarray _array = (jarray) 0;
437 GLvoid *data = (GLvoid *) 0;
439 data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
440 glCompressedTexSubImage2D(
452 releasePointer(_env, _array, data, JNI_FALSE);
456 /* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */
458 android_glCopyTexImage2D__IIIIIIII
459 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) {
463 (GLenum)internalformat,
472 /* void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
474 android_glCopyTexSubImage2D__IIIIIIII
475 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) {
488 /* GLuint glCreateProgram ( void ) */
490 android_glCreateProgram__
491 (JNIEnv *_env, jobject _this) {
493 _returnValue = glCreateProgram();
497 /* GLuint glCreateShader ( GLenum type ) */
499 android_glCreateShader__I
500 (JNIEnv *_env, jobject _this, jint type) {
502 _returnValue = glCreateShader(
508 /* void glCullFace ( GLenum mode ) */
510 android_glCullFace__I
511 (JNIEnv *_env, jobject _this, jint mode) {
517 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
519 android_glDeleteBuffers__I_3II
520 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
521 GLuint *buffers_base = (GLuint *) 0;
523 GLuint *buffers = (GLuint *) 0;
526 _env->ThrowNew(IAEClass, "buffers == null");
530 _env->ThrowNew(IAEClass, "offset < 0");
533 _remaining = _env->GetArrayLength(buffers_ref) - offset;
534 if (_remaining < n) {
535 _env->ThrowNew(IAEClass, "length - offset < n");
538 buffers_base = (GLuint *)
539 _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
540 buffers = buffers_base + offset;
549 _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
554 /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
556 android_glDeleteBuffers__ILjava_nio_IntBuffer_2
557 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
558 jarray _array = (jarray) 0;
560 GLuint *buffers = (GLuint *) 0;
562 buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
563 if (_remaining < n) {
564 _env->ThrowNew(IAEClass, "remaining() < n");
574 releasePointer(_env, _array, buffers, JNI_FALSE);
578 /* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */
580 android_glDeleteFramebuffers__I_3II
581 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
582 GLuint *framebuffers_base = (GLuint *) 0;
584 GLuint *framebuffers = (GLuint *) 0;
586 if (!framebuffers_ref) {
587 _env->ThrowNew(IAEClass, "framebuffers == null");
591 _env->ThrowNew(IAEClass, "offset < 0");
594 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
595 framebuffers_base = (GLuint *)
596 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
597 framebuffers = framebuffers_base + offset;
599 glDeleteFramebuffers(
601 (GLuint *)framebuffers
605 if (framebuffers_base) {
606 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
611 /* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */
613 android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2
614 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
615 jarray _array = (jarray) 0;
617 GLuint *framebuffers = (GLuint *) 0;
619 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
620 glDeleteFramebuffers(
622 (GLuint *)framebuffers
625 releasePointer(_env, _array, framebuffers, JNI_FALSE);
629 /* void glDeleteProgram ( GLuint program ) */
631 android_glDeleteProgram__I
632 (JNIEnv *_env, jobject _this, jint program) {
638 /* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */
640 android_glDeleteRenderbuffers__I_3II
641 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
642 GLuint *renderbuffers_base = (GLuint *) 0;
644 GLuint *renderbuffers = (GLuint *) 0;
646 if (!renderbuffers_ref) {
647 _env->ThrowNew(IAEClass, "renderbuffers == null");
651 _env->ThrowNew(IAEClass, "offset < 0");
654 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
655 renderbuffers_base = (GLuint *)
656 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
657 renderbuffers = renderbuffers_base + offset;
659 glDeleteRenderbuffers(
661 (GLuint *)renderbuffers
665 if (renderbuffers_base) {
666 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
671 /* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */
673 android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2
674 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
675 jarray _array = (jarray) 0;
677 GLuint *renderbuffers = (GLuint *) 0;
679 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
680 glDeleteRenderbuffers(
682 (GLuint *)renderbuffers
685 releasePointer(_env, _array, renderbuffers, JNI_FALSE);
689 /* void glDeleteShader ( GLuint shader ) */
691 android_glDeleteShader__I
692 (JNIEnv *_env, jobject _this, jint shader) {
698 /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
700 android_glDeleteTextures__I_3II
701 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
702 GLuint *textures_base = (GLuint *) 0;
704 GLuint *textures = (GLuint *) 0;
707 _env->ThrowNew(IAEClass, "textures == null");
711 _env->ThrowNew(IAEClass, "offset < 0");
714 _remaining = _env->GetArrayLength(textures_ref) - offset;
715 if (_remaining < n) {
716 _env->ThrowNew(IAEClass, "length - offset < n");
719 textures_base = (GLuint *)
720 _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0);
721 textures = textures_base + offset;
730 _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
735 /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
737 android_glDeleteTextures__ILjava_nio_IntBuffer_2
738 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
739 jarray _array = (jarray) 0;
741 GLuint *textures = (GLuint *) 0;
743 textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
744 if (_remaining < n) {
745 _env->ThrowNew(IAEClass, "remaining() < n");
755 releasePointer(_env, _array, textures, JNI_FALSE);
759 /* void glDepthFunc ( GLenum func ) */
761 android_glDepthFunc__I
762 (JNIEnv *_env, jobject _this, jint func) {
768 /* void glDepthMask ( GLboolean flag ) */
770 android_glDepthMask__Z
771 (JNIEnv *_env, jobject _this, jboolean flag) {
777 /* void glDepthRangef ( GLclampf zNear, GLclampf zFar ) */
779 android_glDepthRangef__FF
780 (JNIEnv *_env, jobject _this, jfloat zNear, jfloat zFar) {
787 /* void glDetachShader ( GLuint program, GLuint shader ) */
789 android_glDetachShader__II
790 (JNIEnv *_env, jobject _this, jint program, jint shader) {
797 /* void glDisable ( GLenum cap ) */
800 (JNIEnv *_env, jobject _this, jint cap) {
806 /* void glDisableVertexAttribArray ( GLuint index ) */
808 android_glDisableVertexAttribArray__I
809 (JNIEnv *_env, jobject _this, jint index) {
810 glDisableVertexAttribArray(
815 /* void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) */
817 android_glDrawArrays__III
818 (JNIEnv *_env, jobject _this, jint mode, jint first, jint count) {
826 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
828 android_glDrawElements__IIII
829 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
834 (const GLvoid *)offset
838 /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
840 android_glDrawElements__IIILjava_nio_Buffer_2
841 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) {
842 jarray _array = (jarray) 0;
844 GLvoid *indices = (GLvoid *) 0;
846 indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
847 if (_remaining < count) {
848 _env->ThrowNew(AIOOBEClass, "remaining() < count");
860 releasePointer(_env, _array, indices, JNI_FALSE);
864 /* void glEnable ( GLenum cap ) */
867 (JNIEnv *_env, jobject _this, jint cap) {
873 /* void glEnableVertexAttribArray ( GLuint index ) */
875 android_glEnableVertexAttribArray__I
876 (JNIEnv *_env, jobject _this, jint index) {
877 glEnableVertexAttribArray(
882 /* void glFinish ( void ) */
885 (JNIEnv *_env, jobject _this) {
889 /* void glFlush ( void ) */
892 (JNIEnv *_env, jobject _this) {
896 /* void glFramebufferRenderbuffer ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) */
898 android_glFramebufferRenderbuffer__IIII
899 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) {
900 glFramebufferRenderbuffer(
903 (GLenum)renderbuffertarget,
908 /* void glFramebufferTexture2D ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) */
910 android_glFramebufferTexture2D__IIIII
911 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint textarget, jint texture, jint level) {
912 glFramebufferTexture2D(
921 /* void glFrontFace ( GLenum mode ) */
923 android_glFrontFace__I
924 (JNIEnv *_env, jobject _this, jint mode) {
930 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
932 android_glGenBuffers__I_3II
933 (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
935 GLuint *buffers_base = (GLuint *) 0;
937 GLuint *buffers = (GLuint *) 0;
941 _env->ThrowNew(IAEClass, "buffers == null");
946 _env->ThrowNew(IAEClass, "offset < 0");
949 _remaining = _env->GetArrayLength(buffers_ref) - offset;
950 if (_remaining < n) {
952 _env->ThrowNew(IAEClass, "length - offset < n");
955 buffers_base = (GLuint *)
956 _env->GetPrimitiveArrayCritical(buffers_ref, (jboolean *)0);
957 buffers = buffers_base + offset;
966 _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
967 _exception ? JNI_ABORT: 0);
971 /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
973 android_glGenBuffers__ILjava_nio_IntBuffer_2
974 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
976 jarray _array = (jarray) 0;
978 GLuint *buffers = (GLuint *) 0;
980 buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
981 if (_remaining < n) {
983 _env->ThrowNew(IAEClass, "remaining() < n");
993 releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE);
997 /* void glGenerateMipmap ( GLenum target ) */
999 android_glGenerateMipmap__I
1000 (JNIEnv *_env, jobject _this, jint target) {
1006 /* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */
1008 android_glGenFramebuffers__I_3II
1009 (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
1010 jint _exception = 0;
1011 GLuint *framebuffers_base = (GLuint *) 0;
1013 GLuint *framebuffers = (GLuint *) 0;
1015 if (!framebuffers_ref) {
1017 _env->ThrowNew(IAEClass, "framebuffers == null");
1022 _env->ThrowNew(IAEClass, "offset < 0");
1025 _remaining = _env->GetArrayLength(framebuffers_ref) - offset;
1026 framebuffers_base = (GLuint *)
1027 _env->GetPrimitiveArrayCritical(framebuffers_ref, (jboolean *)0);
1028 framebuffers = framebuffers_base + offset;
1032 (GLuint *)framebuffers
1036 if (framebuffers_base) {
1037 _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
1038 _exception ? JNI_ABORT: 0);
1042 /* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */
1044 android_glGenFramebuffers__ILjava_nio_IntBuffer_2
1045 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
1046 jint _exception = 0;
1047 jarray _array = (jarray) 0;
1049 GLuint *framebuffers = (GLuint *) 0;
1051 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
1054 (GLuint *)framebuffers
1057 releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
1061 /* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */
1063 android_glGenRenderbuffers__I_3II
1064 (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
1065 jint _exception = 0;
1066 GLuint *renderbuffers_base = (GLuint *) 0;
1068 GLuint *renderbuffers = (GLuint *) 0;
1070 if (!renderbuffers_ref) {
1072 _env->ThrowNew(IAEClass, "renderbuffers == null");
1077 _env->ThrowNew(IAEClass, "offset < 0");
1080 _remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
1081 renderbuffers_base = (GLuint *)
1082 _env->GetPrimitiveArrayCritical(renderbuffers_ref, (jboolean *)0);
1083 renderbuffers = renderbuffers_base + offset;
1087 (GLuint *)renderbuffers
1091 if (renderbuffers_base) {
1092 _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
1093 _exception ? JNI_ABORT: 0);
1097 /* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */
1099 android_glGenRenderbuffers__ILjava_nio_IntBuffer_2
1100 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
1101 jint _exception = 0;
1102 jarray _array = (jarray) 0;
1104 GLuint *renderbuffers = (GLuint *) 0;
1106 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
1109 (GLuint *)renderbuffers
1112 releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
1116 /* void glGenTextures ( GLsizei n, GLuint *textures ) */
1118 android_glGenTextures__I_3II
1119 (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
1120 jint _exception = 0;
1121 GLuint *textures_base = (GLuint *) 0;
1123 GLuint *textures = (GLuint *) 0;
1125 if (!textures_ref) {
1127 _env->ThrowNew(IAEClass, "textures == null");
1132 _env->ThrowNew(IAEClass, "offset < 0");
1135 _remaining = _env->GetArrayLength(textures_ref) - offset;
1136 if (_remaining < n) {
1138 _env->ThrowNew(IAEClass, "length - offset < n");
1141 textures_base = (GLuint *)
1142 _env->GetPrimitiveArrayCritical(textures_ref, (jboolean *)0);
1143 textures = textures_base + offset;
1151 if (textures_base) {
1152 _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
1153 _exception ? JNI_ABORT: 0);
1157 /* void glGenTextures ( GLsizei n, GLuint *textures ) */
1159 android_glGenTextures__ILjava_nio_IntBuffer_2
1160 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
1161 jint _exception = 0;
1162 jarray _array = (jarray) 0;
1164 GLuint *textures = (GLuint *) 0;
1166 textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
1167 if (_remaining < n) {
1169 _env->ThrowNew(IAEClass, "remaining() < n");
1179 releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE);
1183 /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
1185 android_glGetActiveAttrib__III_3II_3II_3II_3BI
1186 (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) {
1187 jint _exception = 0;
1188 GLsizei *length_base = (GLsizei *) 0;
1189 jint _lengthRemaining;
1190 GLsizei *length = (GLsizei *) 0;
1191 GLint *size_base = (GLint *) 0;
1192 jint _sizeRemaining;
1193 GLint *size = (GLint *) 0;
1194 GLenum *type_base = (GLenum *) 0;
1195 jint _typeRemaining;
1196 GLenum *type = (GLenum *) 0;
1197 char *name_base = (char *) 0;
1198 jint _nameRemaining;
1199 char *name = (char *) 0;
1203 _env->ThrowNew(IAEClass, "length == null");
1206 if (lengthOffset < 0) {
1208 _env->ThrowNew(IAEClass, "lengthOffset < 0");
1211 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
1212 length_base = (GLsizei *)
1213 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
1214 length = length_base + lengthOffset;
1218 _env->ThrowNew(IAEClass, "size == null");
1221 if (sizeOffset < 0) {
1223 _env->ThrowNew(IAEClass, "sizeOffset < 0");
1226 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1227 size_base = (GLint *)
1228 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1229 size = size_base + sizeOffset;
1233 _env->ThrowNew(IAEClass, "type == null");
1236 if (typeOffset < 0) {
1238 _env->ThrowNew(IAEClass, "typeOffset < 0");
1241 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
1242 type_base = (GLenum *)
1243 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
1244 type = type_base + typeOffset;
1248 _env->ThrowNew(IAEClass, "name == null");
1251 if (nameOffset < 0) {
1253 _env->ThrowNew(IAEClass, "nameOffset < 0");
1256 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
1257 name_base = (char *)
1258 _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0);
1259 name = name_base + nameOffset;
1273 _env->ReleasePrimitiveArrayCritical(name_ref, name_base,
1274 _exception ? JNI_ABORT: 0);
1277 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
1278 _exception ? JNI_ABORT: 0);
1281 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
1282 _exception ? JNI_ABORT: 0);
1285 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
1286 _exception ? JNI_ABORT: 0);
1290 /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
1292 android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
1293 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
1294 jint _exception = 0;
1295 jarray _lengthArray = (jarray) 0;
1296 jarray _sizeArray = (jarray) 0;
1297 jarray _typeArray = (jarray) 0;
1298 jint _lengthRemaining;
1299 GLsizei *length = (GLsizei *) 0;
1300 jint _sizeRemaining;
1301 GLint *size = (GLint *) 0;
1302 jint _typeRemaining;
1303 GLenum *type = (GLenum *) 0;
1305 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining);
1306 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining);
1307 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining);
1318 releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE);
1321 releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE);
1324 releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE);
1328 /* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
1330 android_glGetActiveUniform__III_3II_3II_3II_3BI
1331 (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) {
1332 jint _exception = 0;
1333 GLsizei *length_base = (GLsizei *) 0;
1334 jint _lengthRemaining;
1335 GLsizei *length = (GLsizei *) 0;
1336 GLint *size_base = (GLint *) 0;
1337 jint _sizeRemaining;
1338 GLint *size = (GLint *) 0;
1339 GLenum *type_base = (GLenum *) 0;
1340 jint _typeRemaining;
1341 GLenum *type = (GLenum *) 0;
1342 char *name_base = (char *) 0;
1343 jint _nameRemaining;
1344 char *name = (char *) 0;
1348 _env->ThrowNew(IAEClass, "length == null");
1351 if (lengthOffset < 0) {
1353 _env->ThrowNew(IAEClass, "lengthOffset < 0");
1356 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
1357 length_base = (GLsizei *)
1358 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
1359 length = length_base + lengthOffset;
1363 _env->ThrowNew(IAEClass, "size == null");
1366 if (sizeOffset < 0) {
1368 _env->ThrowNew(IAEClass, "sizeOffset < 0");
1371 _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
1372 size_base = (GLint *)
1373 _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
1374 size = size_base + sizeOffset;
1378 _env->ThrowNew(IAEClass, "type == null");
1381 if (typeOffset < 0) {
1383 _env->ThrowNew(IAEClass, "typeOffset < 0");
1386 _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
1387 type_base = (GLenum *)
1388 _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
1389 type = type_base + typeOffset;
1393 _env->ThrowNew(IAEClass, "name == null");
1396 if (nameOffset < 0) {
1398 _env->ThrowNew(IAEClass, "nameOffset < 0");
1401 _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
1402 name_base = (char *)
1403 _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0);
1404 name = name_base + nameOffset;
1418 _env->ReleasePrimitiveArrayCritical(name_ref, name_base,
1419 _exception ? JNI_ABORT: 0);
1422 _env->ReleasePrimitiveArrayCritical(type_ref, type_base,
1423 _exception ? JNI_ABORT: 0);
1426 _env->ReleasePrimitiveArrayCritical(size_ref, size_base,
1427 _exception ? JNI_ABORT: 0);
1430 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
1431 _exception ? JNI_ABORT: 0);
1435 /* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
1437 android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
1438 (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
1439 jint _exception = 0;
1440 jarray _lengthArray = (jarray) 0;
1441 jarray _sizeArray = (jarray) 0;
1442 jarray _typeArray = (jarray) 0;
1443 jint _lengthRemaining;
1444 GLsizei *length = (GLsizei *) 0;
1445 jint _sizeRemaining;
1446 GLint *size = (GLint *) 0;
1447 jint _typeRemaining;
1448 GLenum *type = (GLenum *) 0;
1450 length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining);
1451 size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining);
1452 type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining);
1463 releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE);
1466 releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE);
1469 releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE);
1473 /* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */
1475 android_glGetAttachedShaders__II_3II_3II
1476 (JNIEnv *_env, jobject _this, jint program, jint maxcount, jintArray count_ref, jint countOffset, jintArray shaders_ref, jint shadersOffset) {
1477 jint _exception = 0;
1478 GLsizei *count_base = (GLsizei *) 0;
1479 jint _countRemaining;
1480 GLsizei *count = (GLsizei *) 0;
1481 GLuint *shaders_base = (GLuint *) 0;
1482 jint _shadersRemaining;
1483 GLuint *shaders = (GLuint *) 0;
1487 _env->ThrowNew(IAEClass, "count == null");
1490 if (countOffset < 0) {
1492 _env->ThrowNew(IAEClass, "countOffset < 0");
1495 _countRemaining = _env->GetArrayLength(count_ref) - countOffset;
1496 count_base = (GLsizei *)
1497 _env->GetPrimitiveArrayCritical(count_ref, (jboolean *)0);
1498 count = count_base + countOffset;
1502 _env->ThrowNew(IAEClass, "shaders == null");
1505 if (shadersOffset < 0) {
1507 _env->ThrowNew(IAEClass, "shadersOffset < 0");
1510 _shadersRemaining = _env->GetArrayLength(shaders_ref) - shadersOffset;
1511 shaders_base = (GLuint *)
1512 _env->GetPrimitiveArrayCritical(shaders_ref, (jboolean *)0);
1513 shaders = shaders_base + shadersOffset;
1515 glGetAttachedShaders(
1524 _env->ReleasePrimitiveArrayCritical(shaders_ref, shaders_base,
1525 _exception ? JNI_ABORT: 0);
1528 _env->ReleasePrimitiveArrayCritical(count_ref, count_base,
1529 _exception ? JNI_ABORT: 0);
1533 /* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */
1535 android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
1536 (JNIEnv *_env, jobject _this, jint program, jint maxcount, jobject count_buf, jobject shaders_buf) {
1537 jint _exception = 0;
1538 jarray _countArray = (jarray) 0;
1539 jarray _shadersArray = (jarray) 0;
1540 jint _countRemaining;
1541 GLsizei *count = (GLsizei *) 0;
1542 jint _shadersRemaining;
1543 GLuint *shaders = (GLuint *) 0;
1545 count = (GLsizei *)getPointer(_env, count_buf, &_countArray, &_countRemaining);
1546 shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining);
1547 glGetAttachedShaders(
1554 releasePointer(_env, _countArray, shaders, _exception ? JNI_FALSE : JNI_TRUE);
1556 if (_shadersArray) {
1557 releasePointer(_env, _shadersArray, count, _exception ? JNI_FALSE : JNI_TRUE);
1561 /* int glGetAttribLocation ( GLuint program, const char *name ) */
1563 android_glGetAttribLocation__ILjava_lang_String_2
1564 (JNIEnv *_env, jobject _this, jint program, jstring name) {
1565 int _returnValue = 0;
1566 const char* _nativename = 0;
1569 _env->ThrowNew(IAEClass, "name == null");
1572 _nativename = _env->GetStringUTFChars(name, 0);
1574 _returnValue = glGetAttribLocation(
1581 _env->ReleaseStringUTFChars(name, _nativename);
1584 return _returnValue;
1587 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
1589 android_glGetBooleanv__I_3ZI
1590 (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
1591 jint _exception = 0;
1592 GLboolean *params_base = (GLboolean *) 0;
1594 GLboolean *params = (GLboolean *) 0;
1598 _env->ThrowNew(IAEClass, "params == null");
1603 _env->ThrowNew(IAEClass, "offset < 0");
1606 _remaining = _env->GetArrayLength(params_ref) - offset;
1607 params_base = (GLboolean *)
1608 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1609 params = params_base + offset;
1618 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1619 _exception ? JNI_ABORT: 0);
1623 /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
1625 android_glGetBooleanv__ILjava_nio_IntBuffer_2
1626 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1627 jint _exception = 0;
1628 jarray _array = (jarray) 0;
1630 GLboolean *params = (GLboolean *) 0;
1632 params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining);
1638 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
1642 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
1644 android_glGetBufferParameteriv__II_3II
1645 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
1646 _env->ThrowNew(UOEClass,
1647 "glGetBufferParameteriv");
1650 /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
1652 android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
1653 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
1654 _env->ThrowNew(UOEClass,
1655 "glGetBufferParameteriv");
1658 /* GLenum glGetError ( void ) */
1660 android_glGetError__
1661 (JNIEnv *_env, jobject _this) {
1662 GLenum _returnValue;
1663 _returnValue = glGetError();
1664 return _returnValue;
1667 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
1669 android_glGetFloatv__I_3FI
1670 (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
1671 jint _exception = 0;
1672 GLfloat *params_base = (GLfloat *) 0;
1674 GLfloat *params = (GLfloat *) 0;
1678 _env->ThrowNew(IAEClass, "params == null");
1683 _env->ThrowNew(IAEClass, "offset < 0");
1686 _remaining = _env->GetArrayLength(params_ref) - offset;
1687 params_base = (GLfloat *)
1688 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1689 params = params_base + offset;
1698 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1699 _exception ? JNI_ABORT: 0);
1703 /* void glGetFloatv ( GLenum pname, GLfloat *params ) */
1705 android_glGetFloatv__ILjava_nio_FloatBuffer_2
1706 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
1707 jint _exception = 0;
1708 jarray _array = (jarray) 0;
1710 GLfloat *params = (GLfloat *) 0;
1712 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
1718 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
1722 /* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
1724 android_glGetFramebufferAttachmentParameteriv__III_3II
1725 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
1726 jint _exception = 0;
1727 GLint *params_base = (GLint *) 0;
1729 GLint *params = (GLint *) 0;
1733 _env->ThrowNew(IAEClass, "params == null");
1738 _env->ThrowNew(IAEClass, "offset < 0");
1741 _remaining = _env->GetArrayLength(params_ref) - offset;
1742 params_base = (GLint *)
1743 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
1744 params = params_base + offset;
1746 glGetFramebufferAttachmentParameteriv(
1755 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
1756 _exception ? JNI_ABORT: 0);
1760 /* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
1762 android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2
1763 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
1764 jint _exception = 0;
1765 jarray _array = (jarray) 0;
1767 GLint *params = (GLint *) 0;
1769 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
1770 glGetFramebufferAttachmentParameteriv(
1777 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
1781 /* void glGetIntegerv ( GLenum pname, GLint *params ) */
1783 android_glGetIntegerv__I_3II
1784 (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
1785 jint _exception = 0;
1786 GLint *params_base = (GLint *) 0;
1788 GLint *params = (GLint *) 0;
1792 _env->ThrowNew(IAEClass, "params == null");
1797 _env->ThrowNew(IAEClass, "offset < 0");
1800 _remaining = _env->GetArrayLength(params_ref) - offset;
1803 #if defined(GL_ALPHA_BITS)
1805 #endif // defined(GL_ALPHA_BITS)
1806 #if defined(GL_ALPHA_TEST_FUNC)
1807 case GL_ALPHA_TEST_FUNC:
1808 #endif // defined(GL_ALPHA_TEST_FUNC)
1809 #if defined(GL_ALPHA_TEST_REF)
1810 case GL_ALPHA_TEST_REF:
1811 #endif // defined(GL_ALPHA_TEST_REF)
1812 #if defined(GL_BLEND_DST)
1814 #endif // defined(GL_BLEND_DST)
1815 #if defined(GL_BLUE_BITS)
1817 #endif // defined(GL_BLUE_BITS)
1818 #if defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1819 case GL_COLOR_ARRAY_BUFFER_BINDING:
1820 #endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING)
1821 #if defined(GL_COLOR_ARRAY_SIZE)
1822 case GL_COLOR_ARRAY_SIZE:
1823 #endif // defined(GL_COLOR_ARRAY_SIZE)
1824 #if defined(GL_COLOR_ARRAY_STRIDE)
1825 case GL_COLOR_ARRAY_STRIDE:
1826 #endif // defined(GL_COLOR_ARRAY_STRIDE)
1827 #if defined(GL_COLOR_ARRAY_TYPE)
1828 case GL_COLOR_ARRAY_TYPE:
1829 #endif // defined(GL_COLOR_ARRAY_TYPE)
1830 #if defined(GL_CULL_FACE)
1832 #endif // defined(GL_CULL_FACE)
1833 #if defined(GL_DEPTH_BITS)
1835 #endif // defined(GL_DEPTH_BITS)
1836 #if defined(GL_DEPTH_CLEAR_VALUE)
1837 case GL_DEPTH_CLEAR_VALUE:
1838 #endif // defined(GL_DEPTH_CLEAR_VALUE)
1839 #if defined(GL_DEPTH_FUNC)
1841 #endif // defined(GL_DEPTH_FUNC)
1842 #if defined(GL_DEPTH_WRITEMASK)
1843 case GL_DEPTH_WRITEMASK:
1844 #endif // defined(GL_DEPTH_WRITEMASK)
1845 #if defined(GL_FOG_DENSITY)
1846 case GL_FOG_DENSITY:
1847 #endif // defined(GL_FOG_DENSITY)
1848 #if defined(GL_FOG_END)
1850 #endif // defined(GL_FOG_END)
1851 #if defined(GL_FOG_MODE)
1853 #endif // defined(GL_FOG_MODE)
1854 #if defined(GL_FOG_START)
1856 #endif // defined(GL_FOG_START)
1857 #if defined(GL_FRONT_FACE)
1859 #endif // defined(GL_FRONT_FACE)
1860 #if defined(GL_GREEN_BITS)
1862 #endif // defined(GL_GREEN_BITS)
1863 #if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1864 case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
1865 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
1866 #if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1867 case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
1868 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
1869 #if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1870 case GL_LIGHT_MODEL_COLOR_CONTROL:
1871 #endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
1872 #if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1873 case GL_LIGHT_MODEL_LOCAL_VIEWER:
1874 #endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
1875 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
1876 case GL_LIGHT_MODEL_TWO_SIDE:
1877 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
1878 #if defined(GL_LINE_SMOOTH_HINT)
1879 case GL_LINE_SMOOTH_HINT:
1880 #endif // defined(GL_LINE_SMOOTH_HINT)
1881 #if defined(GL_LINE_WIDTH)
1883 #endif // defined(GL_LINE_WIDTH)
1884 #if defined(GL_LOGIC_OP_MODE)
1885 case GL_LOGIC_OP_MODE:
1886 #endif // defined(GL_LOGIC_OP_MODE)
1887 #if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1888 case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES:
1889 #endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
1890 #if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1891 case GL_MATRIX_INDEX_ARRAY_SIZE_OES:
1892 #endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
1893 #if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1894 case GL_MATRIX_INDEX_ARRAY_STRIDE_OES:
1895 #endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
1896 #if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1897 case GL_MATRIX_INDEX_ARRAY_TYPE_OES:
1898 #endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
1899 #if defined(GL_MATRIX_MODE)
1900 case GL_MATRIX_MODE:
1901 #endif // defined(GL_MATRIX_MODE)
1902 #if defined(GL_MAX_CLIP_PLANES)
1903 case GL_MAX_CLIP_PLANES:
1904 #endif // defined(GL_MAX_CLIP_PLANES)
1905 #if defined(GL_MAX_ELEMENTS_INDICES)
1906 case GL_MAX_ELEMENTS_INDICES:
1907 #endif // defined(GL_MAX_ELEMENTS_INDICES)
1908 #if defined(GL_MAX_ELEMENTS_VERTICES)
1909 case GL_MAX_ELEMENTS_VERTICES:
1910 #endif // defined(GL_MAX_ELEMENTS_VERTICES)
1911 #if defined(GL_MAX_LIGHTS)
1913 #endif // defined(GL_MAX_LIGHTS)
1914 #if defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1915 case GL_MAX_MODELVIEW_STACK_DEPTH:
1916 #endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH)
1917 #if defined(GL_MAX_PALETTE_MATRICES_OES)
1918 case GL_MAX_PALETTE_MATRICES_OES:
1919 #endif // defined(GL_MAX_PALETTE_MATRICES_OES)
1920 #if defined(GL_MAX_PROJECTION_STACK_DEPTH)
1921 case GL_MAX_PROJECTION_STACK_DEPTH:
1922 #endif // defined(GL_MAX_PROJECTION_STACK_DEPTH)
1923 #if defined(GL_MAX_TEXTURE_SIZE)
1924 case GL_MAX_TEXTURE_SIZE:
1925 #endif // defined(GL_MAX_TEXTURE_SIZE)
1926 #if defined(GL_MAX_TEXTURE_STACK_DEPTH)
1927 case GL_MAX_TEXTURE_STACK_DEPTH:
1928 #endif // defined(GL_MAX_TEXTURE_STACK_DEPTH)
1929 #if defined(GL_MAX_TEXTURE_UNITS)
1930 case GL_MAX_TEXTURE_UNITS:
1931 #endif // defined(GL_MAX_TEXTURE_UNITS)
1932 #if defined(GL_MAX_VERTEX_UNITS_OES)
1933 case GL_MAX_VERTEX_UNITS_OES:
1934 #endif // defined(GL_MAX_VERTEX_UNITS_OES)
1935 #if defined(GL_MODELVIEW_STACK_DEPTH)
1936 case GL_MODELVIEW_STACK_DEPTH:
1937 #endif // defined(GL_MODELVIEW_STACK_DEPTH)
1938 #if defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1939 case GL_NORMAL_ARRAY_BUFFER_BINDING:
1940 #endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
1941 #if defined(GL_NORMAL_ARRAY_STRIDE)
1942 case GL_NORMAL_ARRAY_STRIDE:
1943 #endif // defined(GL_NORMAL_ARRAY_STRIDE)
1944 #if defined(GL_NORMAL_ARRAY_TYPE)
1945 case GL_NORMAL_ARRAY_TYPE:
1946 #endif // defined(GL_NORMAL_ARRAY_TYPE)
1947 #if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1948 case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
1949 #endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
1950 #if defined(GL_PACK_ALIGNMENT)
1951 case GL_PACK_ALIGNMENT:
1952 #endif // defined(GL_PACK_ALIGNMENT)
1953 #if defined(GL_PERSPECTIVE_CORRECTION_HINT)
1954 case GL_PERSPECTIVE_CORRECTION_HINT:
1955 #endif // defined(GL_PERSPECTIVE_CORRECTION_HINT)
1956 #if defined(GL_POINT_SIZE)
1958 #endif // defined(GL_POINT_SIZE)
1959 #if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1960 case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
1961 #endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
1962 #if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1963 case GL_POINT_SIZE_ARRAY_STRIDE_OES:
1964 #endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
1965 #if defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1966 case GL_POINT_SIZE_ARRAY_TYPE_OES:
1967 #endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
1968 #if defined(GL_POINT_SMOOTH_HINT)
1969 case GL_POINT_SMOOTH_HINT:
1970 #endif // defined(GL_POINT_SMOOTH_HINT)
1971 #if defined(GL_POLYGON_OFFSET_FACTOR)
1972 case GL_POLYGON_OFFSET_FACTOR:
1973 #endif // defined(GL_POLYGON_OFFSET_FACTOR)
1974 #if defined(GL_POLYGON_OFFSET_UNITS)
1975 case GL_POLYGON_OFFSET_UNITS:
1976 #endif // defined(GL_POLYGON_OFFSET_UNITS)
1977 #if defined(GL_PROJECTION_STACK_DEPTH)
1978 case GL_PROJECTION_STACK_DEPTH:
1979 #endif // defined(GL_PROJECTION_STACK_DEPTH)
1980 #if defined(GL_RED_BITS)
1982 #endif // defined(GL_RED_BITS)
1983 #if defined(GL_SHADE_MODEL)
1984 case GL_SHADE_MODEL:
1985 #endif // defined(GL_SHADE_MODEL)
1986 #if defined(GL_STENCIL_BITS)
1987 case GL_STENCIL_BITS:
1988 #endif // defined(GL_STENCIL_BITS)
1989 #if defined(GL_STENCIL_CLEAR_VALUE)
1990 case GL_STENCIL_CLEAR_VALUE:
1991 #endif // defined(GL_STENCIL_CLEAR_VALUE)
1992 #if defined(GL_STENCIL_FAIL)
1993 case GL_STENCIL_FAIL:
1994 #endif // defined(GL_STENCIL_FAIL)
1995 #if defined(GL_STENCIL_FUNC)
1996 case GL_STENCIL_FUNC:
1997 #endif // defined(GL_STENCIL_FUNC)
1998 #if defined(GL_STENCIL_PASS_DEPTH_FAIL)
1999 case GL_STENCIL_PASS_DEPTH_FAIL:
2000 #endif // defined(GL_STENCIL_PASS_DEPTH_FAIL)
2001 #if defined(GL_STENCIL_PASS_DEPTH_PASS)
2002 case GL_STENCIL_PASS_DEPTH_PASS:
2003 #endif // defined(GL_STENCIL_PASS_DEPTH_PASS)
2004 #if defined(GL_STENCIL_REF)
2005 case GL_STENCIL_REF:
2006 #endif // defined(GL_STENCIL_REF)
2007 #if defined(GL_STENCIL_VALUE_MASK)
2008 case GL_STENCIL_VALUE_MASK:
2009 #endif // defined(GL_STENCIL_VALUE_MASK)
2010 #if defined(GL_STENCIL_WRITEMASK)
2011 case GL_STENCIL_WRITEMASK:
2012 #endif // defined(GL_STENCIL_WRITEMASK)
2013 #if defined(GL_SUBPIXEL_BITS)
2014 case GL_SUBPIXEL_BITS:
2015 #endif // defined(GL_SUBPIXEL_BITS)
2016 #if defined(GL_TEXTURE_BINDING_2D)
2017 case GL_TEXTURE_BINDING_2D:
2018 #endif // defined(GL_TEXTURE_BINDING_2D)
2019 #if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
2020 case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING:
2021 #endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
2022 #if defined(GL_TEXTURE_COORD_ARRAY_SIZE)
2023 case GL_TEXTURE_COORD_ARRAY_SIZE:
2024 #endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE)
2025 #if defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
2026 case GL_TEXTURE_COORD_ARRAY_STRIDE:
2027 #endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
2028 #if defined(GL_TEXTURE_COORD_ARRAY_TYPE)
2029 case GL_TEXTURE_COORD_ARRAY_TYPE:
2030 #endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE)
2031 #if defined(GL_TEXTURE_STACK_DEPTH)
2032 case GL_TEXTURE_STACK_DEPTH:
2033 #endif // defined(GL_TEXTURE_STACK_DEPTH)
2034 #if defined(GL_UNPACK_ALIGNMENT)
2035 case GL_UNPACK_ALIGNMENT:
2036 #endif // defined(GL_UNPACK_ALIGNMENT)
2037 #if defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
2038 case GL_VERTEX_ARRAY_BUFFER_BINDING:
2039 #endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
2040 #if defined(GL_VERTEX_ARRAY_SIZE)
2041 case GL_VERTEX_ARRAY_SIZE:
2042 #endif // defined(GL_VERTEX_ARRAY_SIZE)
2043 #if defined(GL_VERTEX_ARRAY_STRIDE)
2044 case GL_VERTEX_ARRAY_STRIDE:
2045 #endif // defined(GL_VERTEX_ARRAY_STRIDE)
2046 #if defined(GL_VERTEX_ARRAY_TYPE)
2047 case GL_VERTEX_ARRAY_TYPE:
2048 #endif // defined(GL_VERTEX_ARRAY_TYPE)
2049 #if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
2050 case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES:
2051 #endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
2052 #if defined(GL_WEIGHT_ARRAY_SIZE_OES)
2053 case GL_WEIGHT_ARRAY_SIZE_OES:
2054 #endif // defined(GL_WEIGHT_ARRAY_SIZE_OES)
2055 #if defined(GL_WEIGHT_ARRAY_STRIDE_OES)
2056 case GL_WEIGHT_ARRAY_STRIDE_OES:
2057 #endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES)
2058 #if defined(GL_WEIGHT_ARRAY_TYPE_OES)
2059 case GL_WEIGHT_ARRAY_TYPE_OES:
2060 #endif // defined(GL_WEIGHT_ARRAY_TYPE_OES)
2063 #if defined(GL_ALIASED_POINT_SIZE_RANGE)
2064 case GL_ALIASED_POINT_SIZE_RANGE:
2065 #endif // defined(GL_ALIASED_POINT_SIZE_RANGE)
2066 #if defined(GL_ALIASED_LINE_WIDTH_RANGE)
2067 case GL_ALIASED_LINE_WIDTH_RANGE:
2068 #endif // defined(GL_ALIASED_LINE_WIDTH_RANGE)
2069 #if defined(GL_DEPTH_RANGE)
2070 case GL_DEPTH_RANGE:
2071 #endif // defined(GL_DEPTH_RANGE)
2072 #if defined(GL_MAX_VIEWPORT_DIMS)
2073 case GL_MAX_VIEWPORT_DIMS:
2074 #endif // defined(GL_MAX_VIEWPORT_DIMS)
2075 #if defined(GL_SMOOTH_LINE_WIDTH_RANGE)
2076 case GL_SMOOTH_LINE_WIDTH_RANGE:
2077 #endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE)
2078 #if defined(GL_SMOOTH_POINT_SIZE_RANGE)
2079 case GL_SMOOTH_POINT_SIZE_RANGE:
2080 #endif // defined(GL_SMOOTH_POINT_SIZE_RANGE)
2083 #if defined(GL_COLOR_CLEAR_VALUE)
2084 case GL_COLOR_CLEAR_VALUE:
2085 #endif // defined(GL_COLOR_CLEAR_VALUE)
2086 #if defined(GL_COLOR_WRITEMASK)
2087 case GL_COLOR_WRITEMASK:
2088 #endif // defined(GL_COLOR_WRITEMASK)
2089 #if defined(GL_FOG_COLOR)
2091 #endif // defined(GL_FOG_COLOR)
2092 #if defined(GL_LIGHT_MODEL_AMBIENT)
2093 case GL_LIGHT_MODEL_AMBIENT:
2094 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
2095 #if defined(GL_SCISSOR_BOX)
2096 case GL_SCISSOR_BOX:
2097 #endif // defined(GL_SCISSOR_BOX)
2098 #if defined(GL_VIEWPORT)
2100 #endif // defined(GL_VIEWPORT)
2103 #if defined(GL_MODELVIEW_MATRIX)
2104 case GL_MODELVIEW_MATRIX:
2105 #endif // defined(GL_MODELVIEW_MATRIX)
2106 #if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
2107 case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES:
2108 #endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
2109 #if defined(GL_PROJECTION_MATRIX)
2110 case GL_PROJECTION_MATRIX:
2111 #endif // defined(GL_PROJECTION_MATRIX)
2112 #if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
2113 case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES:
2114 #endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
2115 #if defined(GL_TEXTURE_MATRIX)
2116 case GL_TEXTURE_MATRIX:
2117 #endif // defined(GL_TEXTURE_MATRIX)
2118 #if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
2119 case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES:
2120 #endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
2123 #if defined(GL_COMPRESSED_TEXTURE_FORMATS)
2124 case GL_COMPRESSED_TEXTURE_FORMATS:
2125 #endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
2126 _needed = getNumCompressedTextureFormats();
2132 if (_remaining < _needed) {
2134 _env->ThrowNew(IAEClass, "length - offset < needed");
2137 params_base = (GLint *)
2138 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2139 params = params_base + offset;
2148 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2149 _exception ? JNI_ABORT: 0);
2153 /* void glGetIntegerv ( GLenum pname, GLint *params ) */
2155 android_glGetIntegerv__ILjava_nio_IntBuffer_2
2156 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
2157 jint _exception = 0;
2158 jarray _array = (jarray) 0;
2160 GLint *params = (GLint *) 0;
2162 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2165 #if defined(GL_ALPHA_BITS)
2167 #endif // defined(GL_ALPHA_BITS)
2168 #if defined(GL_ALPHA_TEST_FUNC)
2169 case GL_ALPHA_TEST_FUNC:
2170 #endif // defined(GL_ALPHA_TEST_FUNC)
2171 #if defined(GL_ALPHA_TEST_REF)
2172 case GL_ALPHA_TEST_REF:
2173 #endif // defined(GL_ALPHA_TEST_REF)
2174 #if defined(GL_BLEND_DST)
2176 #endif // defined(GL_BLEND_DST)
2177 #if defined(GL_BLUE_BITS)
2179 #endif // defined(GL_BLUE_BITS)
2180 #if defined(GL_COLOR_ARRAY_BUFFER_BINDING)
2181 case GL_COLOR_ARRAY_BUFFER_BINDING:
2182 #endif // defined(GL_COLOR_ARRAY_BUFFER_BINDING)
2183 #if defined(GL_COLOR_ARRAY_SIZE)
2184 case GL_COLOR_ARRAY_SIZE:
2185 #endif // defined(GL_COLOR_ARRAY_SIZE)
2186 #if defined(GL_COLOR_ARRAY_STRIDE)
2187 case GL_COLOR_ARRAY_STRIDE:
2188 #endif // defined(GL_COLOR_ARRAY_STRIDE)
2189 #if defined(GL_COLOR_ARRAY_TYPE)
2190 case GL_COLOR_ARRAY_TYPE:
2191 #endif // defined(GL_COLOR_ARRAY_TYPE)
2192 #if defined(GL_CULL_FACE)
2194 #endif // defined(GL_CULL_FACE)
2195 #if defined(GL_DEPTH_BITS)
2197 #endif // defined(GL_DEPTH_BITS)
2198 #if defined(GL_DEPTH_CLEAR_VALUE)
2199 case GL_DEPTH_CLEAR_VALUE:
2200 #endif // defined(GL_DEPTH_CLEAR_VALUE)
2201 #if defined(GL_DEPTH_FUNC)
2203 #endif // defined(GL_DEPTH_FUNC)
2204 #if defined(GL_DEPTH_WRITEMASK)
2205 case GL_DEPTH_WRITEMASK:
2206 #endif // defined(GL_DEPTH_WRITEMASK)
2207 #if defined(GL_FOG_DENSITY)
2208 case GL_FOG_DENSITY:
2209 #endif // defined(GL_FOG_DENSITY)
2210 #if defined(GL_FOG_END)
2212 #endif // defined(GL_FOG_END)
2213 #if defined(GL_FOG_MODE)
2215 #endif // defined(GL_FOG_MODE)
2216 #if defined(GL_FOG_START)
2218 #endif // defined(GL_FOG_START)
2219 #if defined(GL_FRONT_FACE)
2221 #endif // defined(GL_FRONT_FACE)
2222 #if defined(GL_GREEN_BITS)
2224 #endif // defined(GL_GREEN_BITS)
2225 #if defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
2226 case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
2227 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
2228 #if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
2229 case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
2230 #endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
2231 #if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
2232 case GL_LIGHT_MODEL_COLOR_CONTROL:
2233 #endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
2234 #if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
2235 case GL_LIGHT_MODEL_LOCAL_VIEWER:
2236 #endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
2237 #if defined(GL_LIGHT_MODEL_TWO_SIDE)
2238 case GL_LIGHT_MODEL_TWO_SIDE:
2239 #endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
2240 #if defined(GL_LINE_SMOOTH_HINT)
2241 case GL_LINE_SMOOTH_HINT:
2242 #endif // defined(GL_LINE_SMOOTH_HINT)
2243 #if defined(GL_LINE_WIDTH)
2245 #endif // defined(GL_LINE_WIDTH)
2246 #if defined(GL_LOGIC_OP_MODE)
2247 case GL_LOGIC_OP_MODE:
2248 #endif // defined(GL_LOGIC_OP_MODE)
2249 #if defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
2250 case GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES:
2251 #endif // defined(GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
2252 #if defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
2253 case GL_MATRIX_INDEX_ARRAY_SIZE_OES:
2254 #endif // defined(GL_MATRIX_INDEX_ARRAY_SIZE_OES)
2255 #if defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
2256 case GL_MATRIX_INDEX_ARRAY_STRIDE_OES:
2257 #endif // defined(GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
2258 #if defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
2259 case GL_MATRIX_INDEX_ARRAY_TYPE_OES:
2260 #endif // defined(GL_MATRIX_INDEX_ARRAY_TYPE_OES)
2261 #if defined(GL_MATRIX_MODE)
2262 case GL_MATRIX_MODE:
2263 #endif // defined(GL_MATRIX_MODE)
2264 #if defined(GL_MAX_CLIP_PLANES)
2265 case GL_MAX_CLIP_PLANES:
2266 #endif // defined(GL_MAX_CLIP_PLANES)
2267 #if defined(GL_MAX_ELEMENTS_INDICES)
2268 case GL_MAX_ELEMENTS_INDICES:
2269 #endif // defined(GL_MAX_ELEMENTS_INDICES)
2270 #if defined(GL_MAX_ELEMENTS_VERTICES)
2271 case GL_MAX_ELEMENTS_VERTICES:
2272 #endif // defined(GL_MAX_ELEMENTS_VERTICES)
2273 #if defined(GL_MAX_LIGHTS)
2275 #endif // defined(GL_MAX_LIGHTS)
2276 #if defined(GL_MAX_MODELVIEW_STACK_DEPTH)
2277 case GL_MAX_MODELVIEW_STACK_DEPTH:
2278 #endif // defined(GL_MAX_MODELVIEW_STACK_DEPTH)
2279 #if defined(GL_MAX_PALETTE_MATRICES_OES)
2280 case GL_MAX_PALETTE_MATRICES_OES:
2281 #endif // defined(GL_MAX_PALETTE_MATRICES_OES)
2282 #if defined(GL_MAX_PROJECTION_STACK_DEPTH)
2283 case GL_MAX_PROJECTION_STACK_DEPTH:
2284 #endif // defined(GL_MAX_PROJECTION_STACK_DEPTH)
2285 #if defined(GL_MAX_TEXTURE_SIZE)
2286 case GL_MAX_TEXTURE_SIZE:
2287 #endif // defined(GL_MAX_TEXTURE_SIZE)
2288 #if defined(GL_MAX_TEXTURE_STACK_DEPTH)
2289 case GL_MAX_TEXTURE_STACK_DEPTH:
2290 #endif // defined(GL_MAX_TEXTURE_STACK_DEPTH)
2291 #if defined(GL_MAX_TEXTURE_UNITS)
2292 case GL_MAX_TEXTURE_UNITS:
2293 #endif // defined(GL_MAX_TEXTURE_UNITS)
2294 #if defined(GL_MAX_VERTEX_UNITS_OES)
2295 case GL_MAX_VERTEX_UNITS_OES:
2296 #endif // defined(GL_MAX_VERTEX_UNITS_OES)
2297 #if defined(GL_MODELVIEW_STACK_DEPTH)
2298 case GL_MODELVIEW_STACK_DEPTH:
2299 #endif // defined(GL_MODELVIEW_STACK_DEPTH)
2300 #if defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
2301 case GL_NORMAL_ARRAY_BUFFER_BINDING:
2302 #endif // defined(GL_NORMAL_ARRAY_BUFFER_BINDING)
2303 #if defined(GL_NORMAL_ARRAY_STRIDE)
2304 case GL_NORMAL_ARRAY_STRIDE:
2305 #endif // defined(GL_NORMAL_ARRAY_STRIDE)
2306 #if defined(GL_NORMAL_ARRAY_TYPE)
2307 case GL_NORMAL_ARRAY_TYPE:
2308 #endif // defined(GL_NORMAL_ARRAY_TYPE)
2309 #if defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
2310 case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
2311 #endif // defined(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
2312 #if defined(GL_PACK_ALIGNMENT)
2313 case GL_PACK_ALIGNMENT:
2314 #endif // defined(GL_PACK_ALIGNMENT)
2315 #if defined(GL_PERSPECTIVE_CORRECTION_HINT)
2316 case GL_PERSPECTIVE_CORRECTION_HINT:
2317 #endif // defined(GL_PERSPECTIVE_CORRECTION_HINT)
2318 #if defined(GL_POINT_SIZE)
2320 #endif // defined(GL_POINT_SIZE)
2321 #if defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
2322 case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
2323 #endif // defined(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
2324 #if defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
2325 case GL_POINT_SIZE_ARRAY_STRIDE_OES:
2326 #endif // defined(GL_POINT_SIZE_ARRAY_STRIDE_OES)
2327 #if defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
2328 case GL_POINT_SIZE_ARRAY_TYPE_OES:
2329 #endif // defined(GL_POINT_SIZE_ARRAY_TYPE_OES)
2330 #if defined(GL_POINT_SMOOTH_HINT)
2331 case GL_POINT_SMOOTH_HINT:
2332 #endif // defined(GL_POINT_SMOOTH_HINT)
2333 #if defined(GL_POLYGON_OFFSET_FACTOR)
2334 case GL_POLYGON_OFFSET_FACTOR:
2335 #endif // defined(GL_POLYGON_OFFSET_FACTOR)
2336 #if defined(GL_POLYGON_OFFSET_UNITS)
2337 case GL_POLYGON_OFFSET_UNITS:
2338 #endif // defined(GL_POLYGON_OFFSET_UNITS)
2339 #if defined(GL_PROJECTION_STACK_DEPTH)
2340 case GL_PROJECTION_STACK_DEPTH:
2341 #endif // defined(GL_PROJECTION_STACK_DEPTH)
2342 #if defined(GL_RED_BITS)
2344 #endif // defined(GL_RED_BITS)
2345 #if defined(GL_SHADE_MODEL)
2346 case GL_SHADE_MODEL:
2347 #endif // defined(GL_SHADE_MODEL)
2348 #if defined(GL_STENCIL_BITS)
2349 case GL_STENCIL_BITS:
2350 #endif // defined(GL_STENCIL_BITS)
2351 #if defined(GL_STENCIL_CLEAR_VALUE)
2352 case GL_STENCIL_CLEAR_VALUE:
2353 #endif // defined(GL_STENCIL_CLEAR_VALUE)
2354 #if defined(GL_STENCIL_FAIL)
2355 case GL_STENCIL_FAIL:
2356 #endif // defined(GL_STENCIL_FAIL)
2357 #if defined(GL_STENCIL_FUNC)
2358 case GL_STENCIL_FUNC:
2359 #endif // defined(GL_STENCIL_FUNC)
2360 #if defined(GL_STENCIL_PASS_DEPTH_FAIL)
2361 case GL_STENCIL_PASS_DEPTH_FAIL:
2362 #endif // defined(GL_STENCIL_PASS_DEPTH_FAIL)
2363 #if defined(GL_STENCIL_PASS_DEPTH_PASS)
2364 case GL_STENCIL_PASS_DEPTH_PASS:
2365 #endif // defined(GL_STENCIL_PASS_DEPTH_PASS)
2366 #if defined(GL_STENCIL_REF)
2367 case GL_STENCIL_REF:
2368 #endif // defined(GL_STENCIL_REF)
2369 #if defined(GL_STENCIL_VALUE_MASK)
2370 case GL_STENCIL_VALUE_MASK:
2371 #endif // defined(GL_STENCIL_VALUE_MASK)
2372 #if defined(GL_STENCIL_WRITEMASK)
2373 case GL_STENCIL_WRITEMASK:
2374 #endif // defined(GL_STENCIL_WRITEMASK)
2375 #if defined(GL_SUBPIXEL_BITS)
2376 case GL_SUBPIXEL_BITS:
2377 #endif // defined(GL_SUBPIXEL_BITS)
2378 #if defined(GL_TEXTURE_BINDING_2D)
2379 case GL_TEXTURE_BINDING_2D:
2380 #endif // defined(GL_TEXTURE_BINDING_2D)
2381 #if defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
2382 case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING:
2383 #endif // defined(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
2384 #if defined(GL_TEXTURE_COORD_ARRAY_SIZE)
2385 case GL_TEXTURE_COORD_ARRAY_SIZE:
2386 #endif // defined(GL_TEXTURE_COORD_ARRAY_SIZE)
2387 #if defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
2388 case GL_TEXTURE_COORD_ARRAY_STRIDE:
2389 #endif // defined(GL_TEXTURE_COORD_ARRAY_STRIDE)
2390 #if defined(GL_TEXTURE_COORD_ARRAY_TYPE)
2391 case GL_TEXTURE_COORD_ARRAY_TYPE:
2392 #endif // defined(GL_TEXTURE_COORD_ARRAY_TYPE)
2393 #if defined(GL_TEXTURE_STACK_DEPTH)
2394 case GL_TEXTURE_STACK_DEPTH:
2395 #endif // defined(GL_TEXTURE_STACK_DEPTH)
2396 #if defined(GL_UNPACK_ALIGNMENT)
2397 case GL_UNPACK_ALIGNMENT:
2398 #endif // defined(GL_UNPACK_ALIGNMENT)
2399 #if defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
2400 case GL_VERTEX_ARRAY_BUFFER_BINDING:
2401 #endif // defined(GL_VERTEX_ARRAY_BUFFER_BINDING)
2402 #if defined(GL_VERTEX_ARRAY_SIZE)
2403 case GL_VERTEX_ARRAY_SIZE:
2404 #endif // defined(GL_VERTEX_ARRAY_SIZE)
2405 #if defined(GL_VERTEX_ARRAY_STRIDE)
2406 case GL_VERTEX_ARRAY_STRIDE:
2407 #endif // defined(GL_VERTEX_ARRAY_STRIDE)
2408 #if defined(GL_VERTEX_ARRAY_TYPE)
2409 case GL_VERTEX_ARRAY_TYPE:
2410 #endif // defined(GL_VERTEX_ARRAY_TYPE)
2411 #if defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
2412 case GL_WEIGHT_ARRAY_BUFFER_BINDING_OES:
2413 #endif // defined(GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
2414 #if defined(GL_WEIGHT_ARRAY_SIZE_OES)
2415 case GL_WEIGHT_ARRAY_SIZE_OES:
2416 #endif // defined(GL_WEIGHT_ARRAY_SIZE_OES)
2417 #if defined(GL_WEIGHT_ARRAY_STRIDE_OES)
2418 case GL_WEIGHT_ARRAY_STRIDE_OES:
2419 #endif // defined(GL_WEIGHT_ARRAY_STRIDE_OES)
2420 #if defined(GL_WEIGHT_ARRAY_TYPE_OES)
2421 case GL_WEIGHT_ARRAY_TYPE_OES:
2422 #endif // defined(GL_WEIGHT_ARRAY_TYPE_OES)
2425 #if defined(GL_ALIASED_POINT_SIZE_RANGE)
2426 case GL_ALIASED_POINT_SIZE_RANGE:
2427 #endif // defined(GL_ALIASED_POINT_SIZE_RANGE)
2428 #if defined(GL_ALIASED_LINE_WIDTH_RANGE)
2429 case GL_ALIASED_LINE_WIDTH_RANGE:
2430 #endif // defined(GL_ALIASED_LINE_WIDTH_RANGE)
2431 #if defined(GL_DEPTH_RANGE)
2432 case GL_DEPTH_RANGE:
2433 #endif // defined(GL_DEPTH_RANGE)
2434 #if defined(GL_MAX_VIEWPORT_DIMS)
2435 case GL_MAX_VIEWPORT_DIMS:
2436 #endif // defined(GL_MAX_VIEWPORT_DIMS)
2437 #if defined(GL_SMOOTH_LINE_WIDTH_RANGE)
2438 case GL_SMOOTH_LINE_WIDTH_RANGE:
2439 #endif // defined(GL_SMOOTH_LINE_WIDTH_RANGE)
2440 #if defined(GL_SMOOTH_POINT_SIZE_RANGE)
2441 case GL_SMOOTH_POINT_SIZE_RANGE:
2442 #endif // defined(GL_SMOOTH_POINT_SIZE_RANGE)
2445 #if defined(GL_COLOR_CLEAR_VALUE)
2446 case GL_COLOR_CLEAR_VALUE:
2447 #endif // defined(GL_COLOR_CLEAR_VALUE)
2448 #if defined(GL_COLOR_WRITEMASK)
2449 case GL_COLOR_WRITEMASK:
2450 #endif // defined(GL_COLOR_WRITEMASK)
2451 #if defined(GL_FOG_COLOR)
2453 #endif // defined(GL_FOG_COLOR)
2454 #if defined(GL_LIGHT_MODEL_AMBIENT)
2455 case GL_LIGHT_MODEL_AMBIENT:
2456 #endif // defined(GL_LIGHT_MODEL_AMBIENT)
2457 #if defined(GL_SCISSOR_BOX)
2458 case GL_SCISSOR_BOX:
2459 #endif // defined(GL_SCISSOR_BOX)
2460 #if defined(GL_VIEWPORT)
2462 #endif // defined(GL_VIEWPORT)
2465 #if defined(GL_MODELVIEW_MATRIX)
2466 case GL_MODELVIEW_MATRIX:
2467 #endif // defined(GL_MODELVIEW_MATRIX)
2468 #if defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
2469 case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES:
2470 #endif // defined(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
2471 #if defined(GL_PROJECTION_MATRIX)
2472 case GL_PROJECTION_MATRIX:
2473 #endif // defined(GL_PROJECTION_MATRIX)
2474 #if defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
2475 case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES:
2476 #endif // defined(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
2477 #if defined(GL_TEXTURE_MATRIX)
2478 case GL_TEXTURE_MATRIX:
2479 #endif // defined(GL_TEXTURE_MATRIX)
2480 #if defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
2481 case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES:
2482 #endif // defined(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
2485 #if defined(GL_COMPRESSED_TEXTURE_FORMATS)
2486 case GL_COMPRESSED_TEXTURE_FORMATS:
2487 #endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
2488 _needed = getNumCompressedTextureFormats();
2494 if (_remaining < _needed) {
2496 _env->ThrowNew(IAEClass, "remaining() < needed");
2506 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2510 /* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */
2512 android_glGetProgramiv__II_3II
2513 (JNIEnv *_env, jobject _this, jint program, jint pname, jintArray params_ref, jint offset) {
2514 jint _exception = 0;
2515 GLint *params_base = (GLint *) 0;
2517 GLint *params = (GLint *) 0;
2521 _env->ThrowNew(IAEClass, "params == null");
2526 _env->ThrowNew(IAEClass, "offset < 0");
2529 _remaining = _env->GetArrayLength(params_ref) - offset;
2530 params_base = (GLint *)
2531 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2532 params = params_base + offset;
2542 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2543 _exception ? JNI_ABORT: 0);
2547 /* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */
2549 android_glGetProgramiv__IILjava_nio_IntBuffer_2
2550 (JNIEnv *_env, jobject _this, jint program, jint pname, jobject params_buf) {
2551 jint _exception = 0;
2552 jarray _array = (jarray) 0;
2554 GLint *params = (GLint *) 0;
2556 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2563 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2569 /* void glGetProgramInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
2572 android_glGetProgramInfoLog (JNIEnv *_env, jobject _this, jint shader) {
2574 jstring _result = 0;
2576 glGetProgramiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
2578 char* buf = (char*) malloc(infoLen);
2580 _env->ThrowNew(IAEClass, "out of memory");
2583 glGetProgramInfoLog(shader, infoLen, NULL, buf);
2584 _result = _env->NewStringUTF(buf);
2586 _result = _env->NewStringUTF("");
2594 /* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
2596 android_glGetRenderbufferParameteriv__II_3II
2597 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
2598 jint _exception = 0;
2599 GLint *params_base = (GLint *) 0;
2601 GLint *params = (GLint *) 0;
2605 _env->ThrowNew(IAEClass, "params == null");
2610 _env->ThrowNew(IAEClass, "offset < 0");
2613 _remaining = _env->GetArrayLength(params_ref) - offset;
2614 params_base = (GLint *)
2615 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2616 params = params_base + offset;
2618 glGetRenderbufferParameteriv(
2626 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2627 _exception ? JNI_ABORT: 0);
2631 /* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
2633 android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2
2634 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
2635 jint _exception = 0;
2636 jarray _array = (jarray) 0;
2638 GLint *params = (GLint *) 0;
2640 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2641 glGetRenderbufferParameteriv(
2647 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2651 /* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */
2653 android_glGetShaderiv__II_3II
2654 (JNIEnv *_env, jobject _this, jint shader, jint pname, jintArray params_ref, jint offset) {
2655 jint _exception = 0;
2656 GLint *params_base = (GLint *) 0;
2658 GLint *params = (GLint *) 0;
2662 _env->ThrowNew(IAEClass, "params == null");
2667 _env->ThrowNew(IAEClass, "offset < 0");
2670 _remaining = _env->GetArrayLength(params_ref) - offset;
2671 params_base = (GLint *)
2672 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2673 params = params_base + offset;
2683 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2684 _exception ? JNI_ABORT: 0);
2688 /* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */
2690 android_glGetShaderiv__IILjava_nio_IntBuffer_2
2691 (JNIEnv *_env, jobject _this, jint shader, jint pname, jobject params_buf) {
2692 jint _exception = 0;
2693 jarray _array = (jarray) 0;
2695 GLint *params = (GLint *) 0;
2697 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
2704 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2710 /* void glGetShaderInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
2713 android_glGetShaderInfoLog (JNIEnv *_env, jobject _this, jint shader) {
2715 jstring _result = 0;
2717 glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
2719 char* buf = (char*) malloc(infoLen);
2721 _env->ThrowNew(IAEClass, "out of memory");
2724 glGetShaderInfoLog(shader, infoLen, NULL, buf);
2725 _result = _env->NewStringUTF(buf);
2727 _result = _env->NewStringUTF("");
2735 /* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */
2737 android_glGetShaderPrecisionFormat__II_3II_3II
2738 (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jintArray range_ref, jint rangeOffset, jintArray precision_ref, jint precisionOffset) {
2739 jint _exception = 0;
2740 GLint *range_base = (GLint *) 0;
2741 jint _rangeRemaining;
2742 GLint *range = (GLint *) 0;
2743 GLint *precision_base = (GLint *) 0;
2744 jint _precisionRemaining;
2745 GLint *precision = (GLint *) 0;
2749 _env->ThrowNew(IAEClass, "range == null");
2752 if (rangeOffset < 0) {
2754 _env->ThrowNew(IAEClass, "rangeOffset < 0");
2757 _rangeRemaining = _env->GetArrayLength(range_ref) - rangeOffset;
2758 range_base = (GLint *)
2759 _env->GetPrimitiveArrayCritical(range_ref, (jboolean *)0);
2760 range = range_base + rangeOffset;
2762 if (!precision_ref) {
2764 _env->ThrowNew(IAEClass, "precision == null");
2767 if (precisionOffset < 0) {
2769 _env->ThrowNew(IAEClass, "precisionOffset < 0");
2772 _precisionRemaining = _env->GetArrayLength(precision_ref) - precisionOffset;
2773 precision_base = (GLint *)
2774 _env->GetPrimitiveArrayCritical(precision_ref, (jboolean *)0);
2775 precision = precision_base + precisionOffset;
2777 glGetShaderPrecisionFormat(
2779 (GLenum)precisiontype,
2785 if (precision_base) {
2786 _env->ReleasePrimitiveArrayCritical(precision_ref, precision_base,
2787 _exception ? JNI_ABORT: 0);
2790 _env->ReleasePrimitiveArrayCritical(range_ref, range_base,
2791 _exception ? JNI_ABORT: 0);
2795 /* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */
2797 android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
2798 (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jobject range_buf, jobject precision_buf) {
2799 jint _exception = 0;
2800 jarray _rangeArray = (jarray) 0;
2801 jarray _precisionArray = (jarray) 0;
2802 jint _rangeRemaining;
2803 GLint *range = (GLint *) 0;
2804 jint _precisionRemaining;
2805 GLint *precision = (GLint *) 0;
2807 range = (GLint *)getPointer(_env, range_buf, &_rangeArray, &_rangeRemaining);
2808 precision = (GLint *)getPointer(_env, precision_buf, &_precisionArray, &_precisionRemaining);
2809 glGetShaderPrecisionFormat(
2811 (GLenum)precisiontype,
2816 releasePointer(_env, _rangeArray, precision, _exception ? JNI_FALSE : JNI_TRUE);
2818 if (_precisionArray) {
2819 releasePointer(_env, _precisionArray, range, _exception ? JNI_FALSE : JNI_TRUE);
2823 /* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */
2825 android_glGetShaderSource__II_3II_3BI
2826 (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jintArray length_ref, jint lengthOffset, jbyteArray source_ref, jint sourceOffset) {
2827 jint _exception = 0;
2828 GLsizei *length_base = (GLsizei *) 0;
2829 jint _lengthRemaining;
2830 GLsizei *length = (GLsizei *) 0;
2831 char *source_base = (char *) 0;
2832 jint _sourceRemaining;
2833 char *source = (char *) 0;
2837 _env->ThrowNew(IAEClass, "length == null");
2840 if (lengthOffset < 0) {
2842 _env->ThrowNew(IAEClass, "lengthOffset < 0");
2845 _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
2846 length_base = (GLsizei *)
2847 _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
2848 length = length_base + lengthOffset;
2852 _env->ThrowNew(IAEClass, "source == null");
2855 if (sourceOffset < 0) {
2857 _env->ThrowNew(IAEClass, "sourceOffset < 0");
2860 _sourceRemaining = _env->GetArrayLength(source_ref) - sourceOffset;
2861 source_base = (char *)
2862 _env->GetPrimitiveArrayCritical(source_ref, (jboolean *)0);
2863 source = source_base + sourceOffset;
2874 _env->ReleasePrimitiveArrayCritical(source_ref, source_base,
2875 _exception ? JNI_ABORT: 0);
2878 _env->ReleasePrimitiveArrayCritical(length_ref, length_base,
2879 _exception ? JNI_ABORT: 0);
2883 /* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */
2885 android_glGetShaderSource__IILjava_nio_IntBuffer_2B
2886 (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jobject length_buf, jbyte source) {
2887 jint _exception = 0;
2888 jarray _array = (jarray) 0;
2890 GLsizei *length = (GLsizei *) 0;
2892 length = (GLsizei *)getPointer(_env, length_buf, &_array, &_remaining);
2900 releasePointer(_env, _array, length, _exception ? JNI_FALSE : JNI_TRUE);
2906 /* const GLubyte * glGetString ( GLenum name ) */
2910 (JNIEnv *_env, jobject _this, jint name) {
2911 const char * chars = (const char *)glGetString((GLenum)name);
2912 jstring output = _env->NewStringUTF(chars);
2915 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
2917 android_glGetTexParameterfv__II_3FI
2918 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
2919 jint _exception = 0;
2920 GLfloat *params_base = (GLfloat *) 0;
2922 GLfloat *params = (GLfloat *) 0;
2926 _env->ThrowNew(IAEClass, "params == null");
2931 _env->ThrowNew(IAEClass, "offset < 0");
2934 _remaining = _env->GetArrayLength(params_ref) - offset;
2935 if (_remaining < 1) {
2937 _env->ThrowNew(IAEClass, "length - offset < 1");
2940 params_base = (GLfloat *)
2941 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
2942 params = params_base + offset;
2944 glGetTexParameterfv(
2952 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
2953 _exception ? JNI_ABORT: 0);
2957 /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
2959 android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
2960 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
2961 jint _exception = 0;
2962 jarray _array = (jarray) 0;
2964 GLfloat *params = (GLfloat *) 0;
2966 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
2967 if (_remaining < 1) {
2969 _env->ThrowNew(IAEClass, "remaining() < 1");
2972 glGetTexParameterfv(
2980 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
2984 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
2986 android_glGetTexParameteriv__II_3II
2987 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
2988 jint _exception = 0;
2989 GLint *params_base = (GLint *) 0;
2991 GLint *params = (GLint *) 0;
2995 _env->ThrowNew(IAEClass, "params == null");
3000 _env->ThrowNew(IAEClass, "offset < 0");
3003 _remaining = _env->GetArrayLength(params_ref) - offset;
3004 if (_remaining < 1) {
3006 _env->ThrowNew(IAEClass, "length - offset < 1");
3009 params_base = (GLint *)
3010 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3011 params = params_base + offset;
3013 glGetTexParameteriv(
3021 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3022 _exception ? JNI_ABORT: 0);
3026 /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
3028 android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
3029 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3030 jint _exception = 0;
3031 jarray _array = (jarray) 0;
3033 GLint *params = (GLint *) 0;
3035 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
3036 if (_remaining < 1) {
3038 _env->ThrowNew(IAEClass, "remaining() < 1");
3041 glGetTexParameteriv(
3049 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3053 /* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */
3055 android_glGetUniformfv__II_3FI
3056 (JNIEnv *_env, jobject _this, jint program, jint location, jfloatArray params_ref, jint offset) {
3057 jint _exception = 0;
3058 GLfloat *params_base = (GLfloat *) 0;
3060 GLfloat *params = (GLfloat *) 0;
3064 _env->ThrowNew(IAEClass, "params == null");
3069 _env->ThrowNew(IAEClass, "offset < 0");
3072 _remaining = _env->GetArrayLength(params_ref) - offset;
3073 params_base = (GLfloat *)
3074 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3075 params = params_base + offset;
3085 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3086 _exception ? JNI_ABORT: 0);
3090 /* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */
3092 android_glGetUniformfv__IILjava_nio_FloatBuffer_2
3093 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
3094 jint _exception = 0;
3095 jarray _array = (jarray) 0;
3097 GLfloat *params = (GLfloat *) 0;
3099 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
3106 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3110 /* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */
3112 android_glGetUniformiv__II_3II
3113 (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
3114 jint _exception = 0;
3115 GLint *params_base = (GLint *) 0;
3117 GLint *params = (GLint *) 0;
3121 _env->ThrowNew(IAEClass, "params == null");
3126 _env->ThrowNew(IAEClass, "offset < 0");
3129 _remaining = _env->GetArrayLength(params_ref) - offset;
3130 params_base = (GLint *)
3131 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3132 params = params_base + offset;
3142 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3143 _exception ? JNI_ABORT: 0);
3147 /* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */
3149 android_glGetUniformiv__IILjava_nio_IntBuffer_2
3150 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
3151 jint _exception = 0;
3152 jarray _array = (jarray) 0;
3154 GLint *params = (GLint *) 0;
3156 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
3163 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3167 /* int glGetUniformLocation ( GLuint program, const char *name ) */
3169 android_glGetUniformLocation__ILjava_lang_String_2
3170 (JNIEnv *_env, jobject _this, jint program, jstring name) {
3171 int _returnValue = 0;
3172 const char* _nativename = 0;
3175 _env->ThrowNew(IAEClass, "name == null");
3178 _nativename = _env->GetStringUTFChars(name, 0);
3180 _returnValue = glGetUniformLocation(
3187 _env->ReleaseStringUTFChars(name, _nativename);
3190 return _returnValue;
3193 /* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */
3195 android_glGetVertexAttribfv__II_3FI
3196 (JNIEnv *_env, jobject _this, jint index, jint pname, jfloatArray params_ref, jint offset) {
3197 jint _exception = 0;
3198 GLfloat *params_base = (GLfloat *) 0;
3200 GLfloat *params = (GLfloat *) 0;
3204 _env->ThrowNew(IAEClass, "params == null");
3209 _env->ThrowNew(IAEClass, "offset < 0");
3212 _remaining = _env->GetArrayLength(params_ref) - offset;
3213 params_base = (GLfloat *)
3214 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3215 params = params_base + offset;
3217 glGetVertexAttribfv(
3225 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3226 _exception ? JNI_ABORT: 0);
3230 /* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */
3232 android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2
3233 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
3234 jint _exception = 0;
3235 jarray _array = (jarray) 0;
3237 GLfloat *params = (GLfloat *) 0;
3239 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
3240 glGetVertexAttribfv(
3246 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3250 /* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */
3252 android_glGetVertexAttribiv__II_3II
3253 (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
3254 jint _exception = 0;
3255 GLint *params_base = (GLint *) 0;
3257 GLint *params = (GLint *) 0;
3261 _env->ThrowNew(IAEClass, "params == null");
3266 _env->ThrowNew(IAEClass, "offset < 0");
3269 _remaining = _env->GetArrayLength(params_ref) - offset;
3270 params_base = (GLint *)
3271 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3272 params = params_base + offset;
3274 glGetVertexAttribiv(
3282 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3283 _exception ? JNI_ABORT: 0);
3287 /* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */
3289 android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2
3290 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
3291 jint _exception = 0;
3292 jarray _array = (jarray) 0;
3294 GLint *params = (GLint *) 0;
3296 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
3297 glGetVertexAttribiv(
3303 releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
3307 /* void glHint ( GLenum target, GLenum mode ) */
3310 (JNIEnv *_env, jobject _this, jint target, jint mode) {
3317 /* GLboolean glIsBuffer ( GLuint buffer ) */
3319 android_glIsBuffer__I
3320 (JNIEnv *_env, jobject _this, jint buffer) {
3321 GLboolean _returnValue;
3322 _returnValue = glIsBuffer(
3325 return _returnValue;
3328 /* GLboolean glIsEnabled ( GLenum cap ) */
3330 android_glIsEnabled__I
3331 (JNIEnv *_env, jobject _this, jint cap) {
3332 GLboolean _returnValue;
3333 _returnValue = glIsEnabled(
3336 return _returnValue;
3339 /* GLboolean glIsFramebuffer ( GLuint framebuffer ) */
3341 android_glIsFramebuffer__I
3342 (JNIEnv *_env, jobject _this, jint framebuffer) {
3343 GLboolean _returnValue;
3344 _returnValue = glIsFramebuffer(
3347 return _returnValue;
3350 /* GLboolean glIsProgram ( GLuint program ) */
3352 android_glIsProgram__I
3353 (JNIEnv *_env, jobject _this, jint program) {
3354 GLboolean _returnValue;
3355 _returnValue = glIsProgram(
3358 return _returnValue;
3361 /* GLboolean glIsRenderbuffer ( GLuint renderbuffer ) */
3363 android_glIsRenderbuffer__I
3364 (JNIEnv *_env, jobject _this, jint renderbuffer) {
3365 GLboolean _returnValue;
3366 _returnValue = glIsRenderbuffer(
3367 (GLuint)renderbuffer
3369 return _returnValue;
3372 /* GLboolean glIsShader ( GLuint shader ) */
3374 android_glIsShader__I
3375 (JNIEnv *_env, jobject _this, jint shader) {
3376 GLboolean _returnValue;
3377 _returnValue = glIsShader(
3380 return _returnValue;
3383 /* GLboolean glIsTexture ( GLuint texture ) */
3385 android_glIsTexture__I
3386 (JNIEnv *_env, jobject _this, jint texture) {
3387 GLboolean _returnValue;
3388 _returnValue = glIsTexture(
3391 return _returnValue;
3394 /* void glLineWidth ( GLfloat width ) */
3396 android_glLineWidth__F
3397 (JNIEnv *_env, jobject _this, jfloat width) {
3403 /* void glLinkProgram ( GLuint program ) */
3405 android_glLinkProgram__I
3406 (JNIEnv *_env, jobject _this, jint program) {
3412 /* void glPixelStorei ( GLenum pname, GLint param ) */
3414 android_glPixelStorei__II
3415 (JNIEnv *_env, jobject _this, jint pname, jint param) {
3422 /* void glPolygonOffset ( GLfloat factor, GLfloat units ) */
3424 android_glPolygonOffset__FF
3425 (JNIEnv *_env, jobject _this, jfloat factor, jfloat units) {
3432 /* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) */
3434 android_glReadPixels__IIIIIILjava_nio_Buffer_2
3435 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
3436 jint _exception = 0;
3437 jarray _array = (jarray) 0;
3439 GLvoid *pixels = (GLvoid *) 0;
3441 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
3452 releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
3456 /* void glReleaseShaderCompiler ( void ) */
3458 android_glReleaseShaderCompiler__
3459 (JNIEnv *_env, jobject _this) {
3460 glReleaseShaderCompiler();
3463 /* void glRenderbufferStorage ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
3465 android_glRenderbufferStorage__IIII
3466 (JNIEnv *_env, jobject _this, jint target, jint internalformat, jint width, jint height) {
3467 glRenderbufferStorage(
3469 (GLenum)internalformat,
3475 /* void glSampleCoverage ( GLclampf value, GLboolean invert ) */
3477 android_glSampleCoverage__FZ
3478 (JNIEnv *_env, jobject _this, jfloat value, jboolean invert) {
3485 /* void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) */
3487 android_glScissor__IIII
3488 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
3497 /* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */
3499 android_glShaderBinary__I_3IIILjava_nio_Buffer_2I
3500 (JNIEnv *_env, jobject _this, jint n, jintArray shaders_ref, jint offset, jint binaryformat, jobject binary_buf, jint length) {
3501 jarray _array = (jarray) 0;
3502 GLuint *shaders_base = (GLuint *) 0;
3503 jint _shadersRemaining;
3504 GLuint *shaders = (GLuint *) 0;
3505 jint _binaryRemaining;
3506 GLvoid *binary = (GLvoid *) 0;
3509 _env->ThrowNew(IAEClass, "shaders == null");
3513 _env->ThrowNew(IAEClass, "offset < 0");
3516 _shadersRemaining = _env->GetArrayLength(shaders_ref) - offset;
3517 shaders_base = (GLuint *)
3518 _env->GetPrimitiveArrayCritical(shaders_ref, (jboolean *)0);
3519 shaders = shaders_base + offset;
3521 binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining);
3525 (GLenum)binaryformat,
3532 releasePointer(_env, _array, binary, JNI_FALSE);
3535 _env->ReleasePrimitiveArrayCritical(shaders_ref, shaders_base,
3540 /* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */
3542 android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I
3543 (JNIEnv *_env, jobject _this, jint n, jobject shaders_buf, jint binaryformat, jobject binary_buf, jint length) {
3544 jarray _shadersArray = (jarray) 0;
3545 jarray _binaryArray = (jarray) 0;
3546 jint _shadersRemaining;
3547 GLuint *shaders = (GLuint *) 0;
3548 jint _binaryRemaining;
3549 GLvoid *binary = (GLvoid *) 0;
3551 shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining);
3552 binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining);
3556 (GLenum)binaryformat,
3560 if (_shadersArray) {
3561 releasePointer(_env, _shadersArray, binary, JNI_FALSE);
3564 releasePointer(_env, _binaryArray, shaders, JNI_FALSE);
3569 /* void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint * length ) */
3572 android_glShaderSource
3573 (JNIEnv *_env, jobject _this, jint shader, jstring string) {
3576 _env->ThrowNew(IAEClass, "string == null");
3580 const char* nativeString = _env->GetStringUTFChars(string, 0);
3581 const char* strings[] = {nativeString};
3582 glShaderSource(shader, 1, strings, 0);
3583 _env->ReleaseStringUTFChars(string, nativeString);
3585 /* void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) */
3587 android_glStencilFunc__III
3588 (JNIEnv *_env, jobject _this, jint func, jint ref, jint mask) {
3596 /* void glStencilFuncSeparate ( GLenum face, GLenum func, GLint ref, GLuint mask ) */
3598 android_glStencilFuncSeparate__IIII
3599 (JNIEnv *_env, jobject _this, jint face, jint func, jint ref, jint mask) {
3600 glStencilFuncSeparate(
3608 /* void glStencilMask ( GLuint mask ) */
3610 android_glStencilMask__I
3611 (JNIEnv *_env, jobject _this, jint mask) {
3617 /* void glStencilMaskSeparate ( GLenum face, GLuint mask ) */
3619 android_glStencilMaskSeparate__II
3620 (JNIEnv *_env, jobject _this, jint face, jint mask) {
3621 glStencilMaskSeparate(
3627 /* void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) */
3629 android_glStencilOp__III
3630 (JNIEnv *_env, jobject _this, jint fail, jint zfail, jint zpass) {
3638 /* void glStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass ) */
3640 android_glStencilOpSeparate__IIII
3641 (JNIEnv *_env, jobject _this, jint face, jint fail, jint zfail, jint zpass) {
3642 glStencilOpSeparate(
3650 /* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
3652 android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
3653 (JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
3654 jarray _array = (jarray) 0;
3656 GLvoid *pixels = (GLvoid *) 0;
3659 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
3664 (GLint)internalformat,
3673 releasePointer(_env, _array, pixels, JNI_FALSE);
3677 /* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
3679 android_glTexParameterf__IIF
3680 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloat param) {
3688 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3690 android_glTexParameterfv__II_3FI
3691 (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
3692 GLfloat *params_base = (GLfloat *) 0;
3694 GLfloat *params = (GLfloat *) 0;
3697 _env->ThrowNew(IAEClass, "params == null");
3701 _env->ThrowNew(IAEClass, "offset < 0");
3704 _remaining = _env->GetArrayLength(params_ref) - offset;
3705 if (_remaining < 1) {
3706 _env->ThrowNew(IAEClass, "length - offset < 1");
3709 params_base = (GLfloat *)
3710 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3711 params = params_base + offset;
3721 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3726 /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
3728 android_glTexParameterfv__IILjava_nio_FloatBuffer_2
3729 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3730 jarray _array = (jarray) 0;
3732 GLfloat *params = (GLfloat *) 0;
3734 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
3735 if (_remaining < 1) {
3736 _env->ThrowNew(IAEClass, "remaining() < 1");
3747 releasePointer(_env, _array, params, JNI_FALSE);
3751 /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
3753 android_glTexParameteri__III
3754 (JNIEnv *_env, jobject _this, jint target, jint pname, jint param) {
3762 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
3764 android_glTexParameteriv__II_3II
3765 (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
3766 GLint *params_base = (GLint *) 0;
3768 GLint *params = (GLint *) 0;
3771 _env->ThrowNew(IAEClass, "params == null");
3775 _env->ThrowNew(IAEClass, "offset < 0");
3778 _remaining = _env->GetArrayLength(params_ref) - offset;
3779 if (_remaining < 1) {
3780 _env->ThrowNew(IAEClass, "length - offset < 1");
3783 params_base = (GLint *)
3784 _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
3785 params = params_base + offset;
3795 _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
3800 /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
3802 android_glTexParameteriv__IILjava_nio_IntBuffer_2
3803 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
3804 jarray _array = (jarray) 0;
3806 GLint *params = (GLint *) 0;
3808 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
3809 if (_remaining < 1) {
3810 _env->ThrowNew(IAEClass, "remaining() < 1");
3821 releasePointer(_env, _array, params, JNI_FALSE);
3825 /* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */
3827 android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
3828 (JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
3829 jarray _array = (jarray) 0;
3831 GLvoid *pixels = (GLvoid *) 0;
3834 pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
3848 releasePointer(_env, _array, pixels, JNI_FALSE);
3852 /* void glUniform1f ( GLint location, GLfloat x ) */
3854 android_glUniform1f__IF
3855 (JNIEnv *_env, jobject _this, jint location, jfloat x) {
3862 /* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */
3864 android_glUniform1fv__II_3FI
3865 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
3866 GLfloat *v_base = (GLfloat *) 0;
3868 GLfloat *v = (GLfloat *) 0;
3871 _env->ThrowNew(IAEClass, "v == null");
3875 _env->ThrowNew(IAEClass, "offset < 0");
3878 _remaining = _env->GetArrayLength(v_ref) - offset;
3879 v_base = (GLfloat *)
3880 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
3881 v = v_base + offset;
3891 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
3896 /* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */
3898 android_glUniform1fv__IILjava_nio_FloatBuffer_2
3899 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
3900 jarray _array = (jarray) 0;
3902 GLfloat *v = (GLfloat *) 0;
3904 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
3911 releasePointer(_env, _array, v, JNI_FALSE);
3915 /* void glUniform1i ( GLint location, GLint x ) */
3917 android_glUniform1i__II
3918 (JNIEnv *_env, jobject _this, jint location, jint x) {
3925 /* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */
3927 android_glUniform1iv__II_3II
3928 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
3929 GLint *v_base = (GLint *) 0;
3931 GLint *v = (GLint *) 0;
3934 _env->ThrowNew(IAEClass, "v == null");
3938 _env->ThrowNew(IAEClass, "offset < 0");
3941 _remaining = _env->GetArrayLength(v_ref) - offset;
3943 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
3944 v = v_base + offset;
3954 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
3959 /* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */
3961 android_glUniform1iv__IILjava_nio_IntBuffer_2
3962 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
3963 jarray _array = (jarray) 0;
3965 GLint *v = (GLint *) 0;
3967 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
3974 releasePointer(_env, _array, v, JNI_FALSE);
3978 /* void glUniform2f ( GLint location, GLfloat x, GLfloat y ) */
3980 android_glUniform2f__IFF
3981 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y) {
3989 /* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */
3991 android_glUniform2fv__II_3FI
3992 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
3993 GLfloat *v_base = (GLfloat *) 0;
3995 GLfloat *v = (GLfloat *) 0;
3998 _env->ThrowNew(IAEClass, "v == null");
4002 _env->ThrowNew(IAEClass, "offset < 0");
4005 _remaining = _env->GetArrayLength(v_ref) - offset;
4006 v_base = (GLfloat *)
4007 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
4008 v = v_base + offset;
4018 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
4023 /* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */
4025 android_glUniform2fv__IILjava_nio_FloatBuffer_2
4026 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4027 jarray _array = (jarray) 0;
4029 GLfloat *v = (GLfloat *) 0;
4031 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
4038 releasePointer(_env, _array, v, JNI_FALSE);
4042 /* void glUniform2i ( GLint location, GLint x, GLint y ) */
4044 android_glUniform2i__III
4045 (JNIEnv *_env, jobject _this, jint location, jint x, jint y) {
4053 /* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */
4055 android_glUniform2iv__II_3II
4056 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
4057 GLint *v_base = (GLint *) 0;
4059 GLint *v = (GLint *) 0;
4062 _env->ThrowNew(IAEClass, "v == null");
4066 _env->ThrowNew(IAEClass, "offset < 0");
4069 _remaining = _env->GetArrayLength(v_ref) - offset;
4071 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
4072 v = v_base + offset;
4082 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
4087 /* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */
4089 android_glUniform2iv__IILjava_nio_IntBuffer_2
4090 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4091 jarray _array = (jarray) 0;
4093 GLint *v = (GLint *) 0;
4095 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
4102 releasePointer(_env, _array, v, JNI_FALSE);
4106 /* void glUniform3f ( GLint location, GLfloat x, GLfloat y, GLfloat z ) */
4108 android_glUniform3f__IFFF
4109 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y, jfloat z) {
4118 /* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */
4120 android_glUniform3fv__II_3FI
4121 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
4122 GLfloat *v_base = (GLfloat *) 0;
4124 GLfloat *v = (GLfloat *) 0;
4127 _env->ThrowNew(IAEClass, "v == null");
4131 _env->ThrowNew(IAEClass, "offset < 0");
4134 _remaining = _env->GetArrayLength(v_ref) - offset;
4135 v_base = (GLfloat *)
4136 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
4137 v = v_base + offset;
4147 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
4152 /* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */
4154 android_glUniform3fv__IILjava_nio_FloatBuffer_2
4155 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4156 jarray _array = (jarray) 0;
4158 GLfloat *v = (GLfloat *) 0;
4160 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
4167 releasePointer(_env, _array, v, JNI_FALSE);
4171 /* void glUniform3i ( GLint location, GLint x, GLint y, GLint z ) */
4173 android_glUniform3i__IIII
4174 (JNIEnv *_env, jobject _this, jint location, jint x, jint y, jint z) {
4183 /* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */
4185 android_glUniform3iv__II_3II
4186 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
4187 GLint *v_base = (GLint *) 0;
4189 GLint *v = (GLint *) 0;
4192 _env->ThrowNew(IAEClass, "v == null");
4196 _env->ThrowNew(IAEClass, "offset < 0");
4199 _remaining = _env->GetArrayLength(v_ref) - offset;
4201 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
4202 v = v_base + offset;
4212 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
4217 /* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */
4219 android_glUniform3iv__IILjava_nio_IntBuffer_2
4220 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4221 jarray _array = (jarray) 0;
4223 GLint *v = (GLint *) 0;
4225 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
4232 releasePointer(_env, _array, v, JNI_FALSE);
4236 /* void glUniform4f ( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) */
4238 android_glUniform4f__IFFFF
4239 (JNIEnv *_env, jobject _this, jint location, jfloat x, jfloat y, jfloat z, jfloat w) {
4249 /* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */
4251 android_glUniform4fv__II_3FI
4252 (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
4253 GLfloat *v_base = (GLfloat *) 0;
4255 GLfloat *v = (GLfloat *) 0;
4258 _env->ThrowNew(IAEClass, "v == null");
4262 _env->ThrowNew(IAEClass, "offset < 0");
4265 _remaining = _env->GetArrayLength(v_ref) - offset;
4266 v_base = (GLfloat *)
4267 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
4268 v = v_base + offset;
4278 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
4283 /* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */
4285 android_glUniform4fv__IILjava_nio_FloatBuffer_2
4286 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4287 jarray _array = (jarray) 0;
4289 GLfloat *v = (GLfloat *) 0;
4291 v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
4298 releasePointer(_env, _array, v, JNI_FALSE);
4302 /* void glUniform4i ( GLint location, GLint x, GLint y, GLint z, GLint w ) */
4304 android_glUniform4i__IIIII
4305 (JNIEnv *_env, jobject _this, jint location, jint x, jint y, jint z, jint w) {
4315 /* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */
4317 android_glUniform4iv__II_3II
4318 (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
4319 GLint *v_base = (GLint *) 0;
4321 GLint *v = (GLint *) 0;
4324 _env->ThrowNew(IAEClass, "v == null");
4328 _env->ThrowNew(IAEClass, "offset < 0");
4331 _remaining = _env->GetArrayLength(v_ref) - offset;
4333 _env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
4334 v = v_base + offset;
4344 _env->ReleasePrimitiveArrayCritical(v_ref, v_base,
4349 /* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */
4351 android_glUniform4iv__IILjava_nio_IntBuffer_2
4352 (JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
4353 jarray _array = (jarray) 0;
4355 GLint *v = (GLint *) 0;
4357 v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
4364 releasePointer(_env, _array, v, JNI_FALSE);
4368 /* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
4370 android_glUniformMatrix2fv__IIZ_3FI
4371 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
4372 GLfloat *value_base = (GLfloat *) 0;
4374 GLfloat *value = (GLfloat *) 0;
4377 _env->ThrowNew(IAEClass, "value == null");
4381 _env->ThrowNew(IAEClass, "offset < 0");
4384 _remaining = _env->GetArrayLength(value_ref) - offset;
4385 value_base = (GLfloat *)
4386 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
4387 value = value_base + offset;
4392 (GLboolean)transpose,
4398 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
4403 /* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
4405 android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2
4406 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
4407 jarray _array = (jarray) 0;
4409 GLfloat *value = (GLfloat *) 0;
4411 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining);
4415 (GLboolean)transpose,
4419 releasePointer(_env, _array, value, JNI_FALSE);
4423 /* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
4425 android_glUniformMatrix3fv__IIZ_3FI
4426 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
4427 GLfloat *value_base = (GLfloat *) 0;
4429 GLfloat *value = (GLfloat *) 0;
4432 _env->ThrowNew(IAEClass, "value == null");
4436 _env->ThrowNew(IAEClass, "offset < 0");
4439 _remaining = _env->GetArrayLength(value_ref) - offset;
4440 value_base = (GLfloat *)
4441 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
4442 value = value_base + offset;
4447 (GLboolean)transpose,
4453 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
4458 /* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
4460 android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2
4461 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
4462 jarray _array = (jarray) 0;
4464 GLfloat *value = (GLfloat *) 0;
4466 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining);
4470 (GLboolean)transpose,
4474 releasePointer(_env, _array, value, JNI_FALSE);
4478 /* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
4480 android_glUniformMatrix4fv__IIZ_3FI
4481 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
4482 GLfloat *value_base = (GLfloat *) 0;
4484 GLfloat *value = (GLfloat *) 0;
4487 _env->ThrowNew(IAEClass, "value == null");
4491 _env->ThrowNew(IAEClass, "offset < 0");
4494 _remaining = _env->GetArrayLength(value_ref) - offset;
4495 value_base = (GLfloat *)
4496 _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
4497 value = value_base + offset;
4502 (GLboolean)transpose,
4508 _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
4513 /* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
4515 android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2
4516 (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
4517 jarray _array = (jarray) 0;
4519 GLfloat *value = (GLfloat *) 0;
4521 value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining);
4525 (GLboolean)transpose,
4529 releasePointer(_env, _array, value, JNI_FALSE);
4533 /* void glUseProgram ( GLuint program ) */
4535 android_glUseProgram__I
4536 (JNIEnv *_env, jobject _this, jint program) {
4542 /* void glValidateProgram ( GLuint program ) */
4544 android_glValidateProgram__I
4545 (JNIEnv *_env, jobject _this, jint program) {
4551 /* void glVertexAttrib1f ( GLuint indx, GLfloat x ) */
4553 android_glVertexAttrib1f__IF
4554 (JNIEnv *_env, jobject _this, jint indx, jfloat x) {
4561 /* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */
4563 android_glVertexAttrib1fv__I_3FI
4564 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
4565 GLfloat *values_base = (GLfloat *) 0;
4567 GLfloat *values = (GLfloat *) 0;
4570 _env->ThrowNew(IAEClass, "values == null");
4574 _env->ThrowNew(IAEClass, "offset < 0");
4577 _remaining = _env->GetArrayLength(values_ref) - offset;
4578 values_base = (GLfloat *)
4579 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
4580 values = values_base + offset;
4589 _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
4594 /* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */
4596 android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2
4597 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
4598 jarray _array = (jarray) 0;
4600 GLfloat *values = (GLfloat *) 0;
4602 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
4608 releasePointer(_env, _array, values, JNI_FALSE);
4612 /* void glVertexAttrib2f ( GLuint indx, GLfloat x, GLfloat y ) */
4614 android_glVertexAttrib2f__IFF
4615 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y) {
4623 /* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */
4625 android_glVertexAttrib2fv__I_3FI
4626 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
4627 GLfloat *values_base = (GLfloat *) 0;
4629 GLfloat *values = (GLfloat *) 0;
4632 _env->ThrowNew(IAEClass, "values == null");
4636 _env->ThrowNew(IAEClass, "offset < 0");
4639 _remaining = _env->GetArrayLength(values_ref) - offset;
4640 values_base = (GLfloat *)
4641 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
4642 values = values_base + offset;
4651 _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
4656 /* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */
4658 android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2
4659 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
4660 jarray _array = (jarray) 0;
4662 GLfloat *values = (GLfloat *) 0;
4664 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
4670 releasePointer(_env, _array, values, JNI_FALSE);
4674 /* void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z ) */
4676 android_glVertexAttrib3f__IFFF
4677 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y, jfloat z) {
4686 /* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */
4688 android_glVertexAttrib3fv__I_3FI
4689 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
4690 GLfloat *values_base = (GLfloat *) 0;
4692 GLfloat *values = (GLfloat *) 0;
4695 _env->ThrowNew(IAEClass, "values == null");
4699 _env->ThrowNew(IAEClass, "offset < 0");
4702 _remaining = _env->GetArrayLength(values_ref) - offset;
4703 values_base = (GLfloat *)
4704 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
4705 values = values_base + offset;
4714 _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
4719 /* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */
4721 android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2
4722 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
4723 jarray _array = (jarray) 0;
4725 GLfloat *values = (GLfloat *) 0;
4727 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
4733 releasePointer(_env, _array, values, JNI_FALSE);
4737 /* void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) */
4739 android_glVertexAttrib4f__IFFFF
4740 (JNIEnv *_env, jobject _this, jint indx, jfloat x, jfloat y, jfloat z, jfloat w) {
4750 /* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */
4752 android_glVertexAttrib4fv__I_3FI
4753 (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
4754 GLfloat *values_base = (GLfloat *) 0;
4756 GLfloat *values = (GLfloat *) 0;
4759 _env->ThrowNew(IAEClass, "values == null");
4763 _env->ThrowNew(IAEClass, "offset < 0");
4766 _remaining = _env->GetArrayLength(values_ref) - offset;
4767 values_base = (GLfloat *)
4768 _env->GetPrimitiveArrayCritical(values_ref, (jboolean *)0);
4769 values = values_base + offset;
4778 _env->ReleasePrimitiveArrayCritical(values_ref, values_base,
4783 /* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */
4785 android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2
4786 (JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
4787 jarray _array = (jarray) 0;
4789 GLfloat *values = (GLfloat *) 0;
4791 values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
4797 releasePointer(_env, _array, values, JNI_FALSE);
4801 /* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset ) */
4803 android_glVertexAttribPointer__IIIZII
4804 (JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jint offset) {
4805 glVertexAttribPointer(
4809 (GLboolean)normalized,
4811 (const GLvoid *)offset
4815 /* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) */
4817 android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
4818 (JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jobject ptr_buf, jint remaining) {
4819 jarray _array = (jarray) 0;
4821 GLvoid *ptr = (GLvoid *) 0;
4824 ptr = (GLvoid *) getDirectBufferPointer(_env, ptr_buf);
4829 glVertexAttribPointerBounds(
4833 (GLboolean)normalized,
4840 /* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */
4842 android_glViewport__IIII
4843 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height) {
4852 static const char *classPathName = "android/opengl/GLES20";
4854 static JNINativeMethod methods[] = {
4855 {"_nativeClassInit", "()V", (void*)nativeClassInit },
4856 {"glActiveTexture", "(I)V", (void *) android_glActiveTexture__I },
4857 {"glAttachShader", "(II)V", (void *) android_glAttachShader__II },
4858 {"glBindAttribLocation", "(IILjava/lang/String;)V", (void *) android_glBindAttribLocation__IILjava_lang_String_2 },
4859 {"glBindBuffer", "(II)V", (void *) android_glBindBuffer__II },
4860 {"glBindFramebuffer", "(II)V", (void *) android_glBindFramebuffer__II },
4861 {"glBindRenderbuffer", "(II)V", (void *) android_glBindRenderbuffer__II },
4862 {"glBindTexture", "(II)V", (void *) android_glBindTexture__II },
4863 {"glBlendColor", "(FFFF)V", (void *) android_glBlendColor__FFFF },
4864 {"glBlendEquation", "(I)V", (void *) android_glBlendEquation__I },
4865 {"glBlendEquationSeparate", "(II)V", (void *) android_glBlendEquationSeparate__II },
4866 {"glBlendFunc", "(II)V", (void *) android_glBlendFunc__II },
4867 {"glBlendFuncSeparate", "(IIII)V", (void *) android_glBlendFuncSeparate__IIII },
4868 {"glBufferData", "(IILjava/nio/Buffer;I)V", (void *) android_glBufferData__IILjava_nio_Buffer_2I },
4869 {"glBufferSubData", "(IIILjava/nio/Buffer;)V", (void *) android_glBufferSubData__IIILjava_nio_Buffer_2 },
4870 {"glCheckFramebufferStatus", "(I)I", (void *) android_glCheckFramebufferStatus__I },
4871 {"glClear", "(I)V", (void *) android_glClear__I },
4872 {"glClearColor", "(FFFF)V", (void *) android_glClearColor__FFFF },
4873 {"glClearDepthf", "(F)V", (void *) android_glClearDepthf__F },
4874 {"glClearStencil", "(I)V", (void *) android_glClearStencil__I },
4875 {"glColorMask", "(ZZZZ)V", (void *) android_glColorMask__ZZZZ },
4876 {"glCompileShader", "(I)V", (void *) android_glCompileShader__I },
4877 {"glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2 },
4878 {"glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
4879 {"glCopyTexImage2D", "(IIIIIIII)V", (void *) android_glCopyTexImage2D__IIIIIIII },
4880 {"glCopyTexSubImage2D", "(IIIIIIII)V", (void *) android_glCopyTexSubImage2D__IIIIIIII },
4881 {"glCreateProgram", "()I", (void *) android_glCreateProgram__ },
4882 {"glCreateShader", "(I)I", (void *) android_glCreateShader__I },
4883 {"glCullFace", "(I)V", (void *) android_glCullFace__I },
4884 {"glDeleteBuffers", "(I[II)V", (void *) android_glDeleteBuffers__I_3II },
4885 {"glDeleteBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteBuffers__ILjava_nio_IntBuffer_2 },
4886 {"glDeleteFramebuffers", "(I[II)V", (void *) android_glDeleteFramebuffers__I_3II },
4887 {"glDeleteFramebuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2 },
4888 {"glDeleteProgram", "(I)V", (void *) android_glDeleteProgram__I },
4889 {"glDeleteRenderbuffers", "(I[II)V", (void *) android_glDeleteRenderbuffers__I_3II },
4890 {"glDeleteRenderbuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2 },
4891 {"glDeleteShader", "(I)V", (void *) android_glDeleteShader__I },
4892 {"glDeleteTextures", "(I[II)V", (void *) android_glDeleteTextures__I_3II },
4893 {"glDeleteTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glDeleteTextures__ILjava_nio_IntBuffer_2 },
4894 {"glDepthFunc", "(I)V", (void *) android_glDepthFunc__I },
4895 {"glDepthMask", "(Z)V", (void *) android_glDepthMask__Z },
4896 {"glDepthRangef", "(FF)V", (void *) android_glDepthRangef__FF },
4897 {"glDetachShader", "(II)V", (void *) android_glDetachShader__II },
4898 {"glDisable", "(I)V", (void *) android_glDisable__I },
4899 {"glDisableVertexAttribArray", "(I)V", (void *) android_glDisableVertexAttribArray__I },
4900 {"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
4901 {"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
4902 {"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
4903 {"glEnable", "(I)V", (void *) android_glEnable__I },
4904 {"glEnableVertexAttribArray", "(I)V", (void *) android_glEnableVertexAttribArray__I },
4905 {"glFinish", "()V", (void *) android_glFinish__ },
4906 {"glFlush", "()V", (void *) android_glFlush__ },
4907 {"glFramebufferRenderbuffer", "(IIII)V", (void *) android_glFramebufferRenderbuffer__IIII },
4908 {"glFramebufferTexture2D", "(IIIII)V", (void *) android_glFramebufferTexture2D__IIIII },
4909 {"glFrontFace", "(I)V", (void *) android_glFrontFace__I },
4910 {"glGenBuffers", "(I[II)V", (void *) android_glGenBuffers__I_3II },
4911 {"glGenBuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenBuffers__ILjava_nio_IntBuffer_2 },
4912 {"glGenerateMipmap", "(I)V", (void *) android_glGenerateMipmap__I },
4913 {"glGenFramebuffers", "(I[II)V", (void *) android_glGenFramebuffers__I_3II },
4914 {"glGenFramebuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenFramebuffers__ILjava_nio_IntBuffer_2 },
4915 {"glGenRenderbuffers", "(I[II)V", (void *) android_glGenRenderbuffers__I_3II },
4916 {"glGenRenderbuffers", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenRenderbuffers__ILjava_nio_IntBuffer_2 },
4917 {"glGenTextures", "(I[II)V", (void *) android_glGenTextures__I_3II },
4918 {"glGenTextures", "(ILjava/nio/IntBuffer;)V", (void *) android_glGenTextures__ILjava_nio_IntBuffer_2 },
4919 {"glGetActiveAttrib", "(III[II[II[II[BI)V", (void *) android_glGetActiveAttrib__III_3II_3II_3II_3BI },
4920 {"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 },
4921 {"glGetActiveUniform", "(III[II[II[II[BI)V", (void *) android_glGetActiveUniform__III_3II_3II_3II_3BI },
4922 {"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 },
4923 {"glGetAttachedShaders", "(II[II[II)V", (void *) android_glGetAttachedShaders__II_3II_3II },
4924 {"glGetAttachedShaders", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
4925 {"glGetAttribLocation", "(ILjava/lang/String;)I", (void *) android_glGetAttribLocation__ILjava_lang_String_2 },
4926 {"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI },
4927 {"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 },
4928 {"glGetBufferParameteriv", "(II[II)V", (void *) android_glGetBufferParameteriv__II_3II },
4929 {"glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 },
4930 {"glGetError", "()I", (void *) android_glGetError__ },
4931 {"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI },
4932 {"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 },
4933 {"glGetFramebufferAttachmentParameteriv", "(III[II)V", (void *) android_glGetFramebufferAttachmentParameteriv__III_3II },
4934 {"glGetFramebufferAttachmentParameteriv", "(IIILjava/nio/IntBuffer;)V", (void *) android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2 },
4935 {"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II },
4936 {"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 },
4937 {"glGetProgramiv", "(II[II)V", (void *) android_glGetProgramiv__II_3II },
4938 {"glGetProgramiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetProgramiv__IILjava_nio_IntBuffer_2 },
4939 {"glGetProgramInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramInfoLog },
4940 {"glGetRenderbufferParameteriv", "(II[II)V", (void *) android_glGetRenderbufferParameteriv__II_3II },
4941 {"glGetRenderbufferParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2 },
4942 {"glGetShaderiv", "(II[II)V", (void *) android_glGetShaderiv__II_3II },
4943 {"glGetShaderiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetShaderiv__IILjava_nio_IntBuffer_2 },
4944 {"glGetShaderInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetShaderInfoLog },
4945 {"glGetShaderPrecisionFormat", "(II[II[II)V", (void *) android_glGetShaderPrecisionFormat__II_3II_3II },
4946 {"glGetShaderPrecisionFormat", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V", (void *) android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
4947 {"glGetShaderSource", "(II[II[BI)V", (void *) android_glGetShaderSource__II_3II_3BI },
4948 {"glGetShaderSource", "(IILjava/nio/IntBuffer;B)V", (void *) android_glGetShaderSource__IILjava_nio_IntBuffer_2B },
4949 {"glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
4950 {"glGetTexParameterfv", "(II[FI)V", (void *) android_glGetTexParameterfv__II_3FI },
4951 {"glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 },
4952 {"glGetTexParameteriv", "(II[II)V", (void *) android_glGetTexParameteriv__II_3II },
4953 {"glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 },
4954 {"glGetUniformfv", "(II[FI)V", (void *) android_glGetUniformfv__II_3FI },
4955 {"glGetUniformfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetUniformfv__IILjava_nio_FloatBuffer_2 },
4956 {"glGetUniformiv", "(II[II)V", (void *) android_glGetUniformiv__II_3II },
4957 {"glGetUniformiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetUniformiv__IILjava_nio_IntBuffer_2 },
4958 {"glGetUniformLocation", "(ILjava/lang/String;)I", (void *) android_glGetUniformLocation__ILjava_lang_String_2 },
4959 {"glGetVertexAttribfv", "(II[FI)V", (void *) android_glGetVertexAttribfv__II_3FI },
4960 {"glGetVertexAttribfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2 },
4961 {"glGetVertexAttribiv", "(II[II)V", (void *) android_glGetVertexAttribiv__II_3II },
4962 {"glGetVertexAttribiv", "(IILjava/nio/IntBuffer;)V", (void *) android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2 },
4963 {"glHint", "(II)V", (void *) android_glHint__II },
4964 {"glIsBuffer", "(I)Z", (void *) android_glIsBuffer__I },
4965 {"glIsEnabled", "(I)Z", (void *) android_glIsEnabled__I },
4966 {"glIsFramebuffer", "(I)Z", (void *) android_glIsFramebuffer__I },
4967 {"glIsProgram", "(I)Z", (void *) android_glIsProgram__I },
4968 {"glIsRenderbuffer", "(I)Z", (void *) android_glIsRenderbuffer__I },
4969 {"glIsShader", "(I)Z", (void *) android_glIsShader__I },
4970 {"glIsTexture", "(I)Z", (void *) android_glIsTexture__I },
4971 {"glLineWidth", "(F)V", (void *) android_glLineWidth__F },
4972 {"glLinkProgram", "(I)V", (void *) android_glLinkProgram__I },
4973 {"glPixelStorei", "(II)V", (void *) android_glPixelStorei__II },
4974 {"glPolygonOffset", "(FF)V", (void *) android_glPolygonOffset__FF },
4975 {"glReadPixels", "(IIIIIILjava/nio/Buffer;)V", (void *) android_glReadPixels__IIIIIILjava_nio_Buffer_2 },
4976 {"glReleaseShaderCompiler", "()V", (void *) android_glReleaseShaderCompiler__ },
4977 {"glRenderbufferStorage", "(IIII)V", (void *) android_glRenderbufferStorage__IIII },
4978 {"glSampleCoverage", "(FZ)V", (void *) android_glSampleCoverage__FZ },
4979 {"glScissor", "(IIII)V", (void *) android_glScissor__IIII },
4980 {"glShaderBinary", "(I[IIILjava/nio/Buffer;I)V", (void *) android_glShaderBinary__I_3IIILjava_nio_Buffer_2I },
4981 {"glShaderBinary", "(ILjava/nio/IntBuffer;ILjava/nio/Buffer;I)V", (void *) android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I },
4982 {"glShaderSource", "(ILjava/lang/String;)V", (void *) android_glShaderSource },
4983 {"glStencilFunc", "(III)V", (void *) android_glStencilFunc__III },
4984 {"glStencilFuncSeparate", "(IIII)V", (void *) android_glStencilFuncSeparate__IIII },
4985 {"glStencilMask", "(I)V", (void *) android_glStencilMask__I },
4986 {"glStencilMaskSeparate", "(II)V", (void *) android_glStencilMaskSeparate__II },
4987 {"glStencilOp", "(III)V", (void *) android_glStencilOp__III },
4988 {"glStencilOpSeparate", "(IIII)V", (void *) android_glStencilOpSeparate__IIII },
4989 {"glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2 },
4990 {"glTexParameterf", "(IIF)V", (void *) android_glTexParameterf__IIF },
4991 {"glTexParameterfv", "(II[FI)V", (void *) android_glTexParameterfv__II_3FI },
4992 {"glTexParameterfv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glTexParameterfv__IILjava_nio_FloatBuffer_2 },
4993 {"glTexParameteri", "(III)V", (void *) android_glTexParameteri__III },
4994 {"glTexParameteriv", "(II[II)V", (void *) android_glTexParameteriv__II_3II },
4995 {"glTexParameteriv", "(IILjava/nio/IntBuffer;)V", (void *) android_glTexParameteriv__IILjava_nio_IntBuffer_2 },
4996 {"glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V", (void *) android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2 },
4997 {"glUniform1f", "(IF)V", (void *) android_glUniform1f__IF },
4998 {"glUniform1fv", "(II[FI)V", (void *) android_glUniform1fv__II_3FI },
4999 {"glUniform1fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform1fv__IILjava_nio_FloatBuffer_2 },
5000 {"glUniform1i", "(II)V", (void *) android_glUniform1i__II },
5001 {"glUniform1iv", "(II[II)V", (void *) android_glUniform1iv__II_3II },
5002 {"glUniform1iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform1iv__IILjava_nio_IntBuffer_2 },
5003 {"glUniform2f", "(IFF)V", (void *) android_glUniform2f__IFF },
5004 {"glUniform2fv", "(II[FI)V", (void *) android_glUniform2fv__II_3FI },
5005 {"glUniform2fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform2fv__IILjava_nio_FloatBuffer_2 },
5006 {"glUniform2i", "(III)V", (void *) android_glUniform2i__III },
5007 {"glUniform2iv", "(II[II)V", (void *) android_glUniform2iv__II_3II },
5008 {"glUniform2iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform2iv__IILjava_nio_IntBuffer_2 },
5009 {"glUniform3f", "(IFFF)V", (void *) android_glUniform3f__IFFF },
5010 {"glUniform3fv", "(II[FI)V", (void *) android_glUniform3fv__II_3FI },
5011 {"glUniform3fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform3fv__IILjava_nio_FloatBuffer_2 },
5012 {"glUniform3i", "(IIII)V", (void *) android_glUniform3i__IIII },
5013 {"glUniform3iv", "(II[II)V", (void *) android_glUniform3iv__II_3II },
5014 {"glUniform3iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform3iv__IILjava_nio_IntBuffer_2 },
5015 {"glUniform4f", "(IFFFF)V", (void *) android_glUniform4f__IFFFF },
5016 {"glUniform4fv", "(II[FI)V", (void *) android_glUniform4fv__II_3FI },
5017 {"glUniform4fv", "(IILjava/nio/FloatBuffer;)V", (void *) android_glUniform4fv__IILjava_nio_FloatBuffer_2 },
5018 {"glUniform4i", "(IIIII)V", (void *) android_glUniform4i__IIIII },
5019 {"glUniform4iv", "(II[II)V", (void *) android_glUniform4iv__II_3II },
5020 {"glUniform4iv", "(IILjava/nio/IntBuffer;)V", (void *) android_glUniform4iv__IILjava_nio_IntBuffer_2 },
5021 {"glUniformMatrix2fv", "(IIZ[FI)V", (void *) android_glUniformMatrix2fv__IIZ_3FI },
5022 {"glUniformMatrix2fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2 },
5023 {"glUniformMatrix3fv", "(IIZ[FI)V", (void *) android_glUniformMatrix3fv__IIZ_3FI },
5024 {"glUniformMatrix3fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2 },
5025 {"glUniformMatrix4fv", "(IIZ[FI)V", (void *) android_glUniformMatrix4fv__IIZ_3FI },
5026 {"glUniformMatrix4fv", "(IIZLjava/nio/FloatBuffer;)V", (void *) android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2 },
5027 {"glUseProgram", "(I)V", (void *) android_glUseProgram__I },
5028 {"glValidateProgram", "(I)V", (void *) android_glValidateProgram__I },
5029 {"glVertexAttrib1f", "(IF)V", (void *) android_glVertexAttrib1f__IF },
5030 {"glVertexAttrib1fv", "(I[FI)V", (void *) android_glVertexAttrib1fv__I_3FI },
5031 {"glVertexAttrib1fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2 },
5032 {"glVertexAttrib2f", "(IFF)V", (void *) android_glVertexAttrib2f__IFF },
5033 {"glVertexAttrib2fv", "(I[FI)V", (void *) android_glVertexAttrib2fv__I_3FI },
5034 {"glVertexAttrib2fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2 },
5035 {"glVertexAttrib3f", "(IFFF)V", (void *) android_glVertexAttrib3f__IFFF },
5036 {"glVertexAttrib3fv", "(I[FI)V", (void *) android_glVertexAttrib3fv__I_3FI },
5037 {"glVertexAttrib3fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2 },
5038 {"glVertexAttrib4f", "(IFFFF)V", (void *) android_glVertexAttrib4f__IFFFF },
5039 {"glVertexAttrib4fv", "(I[FI)V", (void *) android_glVertexAttrib4fv__I_3FI },
5040 {"glVertexAttrib4fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 },
5041 {"glVertexAttribPointer", "(IIIZII)V", (void *) android_glVertexAttribPointer__IIIZII },
5042 {"glVertexAttribPointerBounds", "(IIIZILjava/nio/Buffer;I)V", (void *) android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I },
5043 {"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
5046 int register_android_opengl_jni_GLES20(JNIEnv *_env)
5049 err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));