regenerate GLES java bindings
- added most missing validation checks
- glGet* validation reimplement from khronos documentation
Bug: 7402895
Change-Id: I90528727e20480b5902d19bcb2dfbc6dc8b1367b
diff --git a/core/jni/android_opengl_GLES11Ext.cpp b/core/jni/android_opengl_GLES11Ext.cpp
index 073bbb2..c91baa2 100644
--- a/core/jni/android_opengl_GLES11Ext.cpp
+++ b/core/jni/android_opengl_GLES11Ext.cpp
@@ -17,23 +17,14 @@
// This source file is automatically generated
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
#include "jni.h"
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>
#include <utils/misc.h>
-
#include <assert.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-/* special calls implemented in Android's GLES wrapper used to more
- * efficiently bound-check passed arrays */
-extern "C" {
-GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-}
static int initialized = 0;
@@ -46,6 +37,34 @@
static jfieldID limitID;
static jfieldID elementSizeShiftID;
+
+/* special calls implemented in Android's GLES wrapper used to more
+ * efficiently bound-check passed arrays */
+extern "C" {
+#ifdef GL_VERSION_ES_CM_1_1
+GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr, GLsizei count);
+GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
+ const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *pointer, GLsizei count);
+#endif
+#ifdef GL_ES_VERSION_2_0
+static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
+ GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
+}
+#endif
+}
+
/* Cache method IDs each time the class is loaded. */
static void
@@ -70,7 +89,6 @@
_env->GetFieldID(bufferClass, "_elementSizeShift", "I");
}
-
static void *
getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
@@ -94,15 +112,15 @@
getBaseArrayID, buffer);
*offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
+
return NULL;
}
-
static void
releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
{
_env->ReleasePrimitiveArrayCritical(array, data,
- commit ? 0 : JNI_ABORT);
+ commit ? 0 : JNI_ABORT);
}
static void *
@@ -118,6 +136,186 @@
}
return (void*) buf;
}
+
+// --------------------------------------------------------------------------
+
+/*
+ * returns the number of values glGet returns for a given pname.
+ *
+ * The code below is written such that pnames requiring only one values
+ * are the default (and are not explicitely tested for). This makes the
+ * checking code much shorter/readable/efficient.
+ *
+ * This means that unknown pnames (e.g.: extensions) will default to 1. If
+ * that unknown pname needs more than 1 value, then the validation check
+ * is incomplete and the app may crash if it passed the wrong number params.
+ */
+static int getNeededCount(GLint pname) {
+ int needed = 1;
+#ifdef GL_ES_VERSION_2_0
+ // GLES 2.x pnames
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_ALIASED_POINT_SIZE_RANGE:
+ needed = 2;
+ break;
+
+ case GL_BLEND_COLOR:
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ needed = 4;
+ break;
+
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+ break;
+
+ case GL_SHADER_BINARY_FORMATS:
+ glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
+ break;
+ }
+#endif
+
+#ifdef GL_VERSION_ES_CM_1_1
+ // GLES 1.x pnames
+ switch (pname) {
+ case GL_ALIASED_LINE_WIDTH_RANGE:
+ case GL_ALIASED_POINT_SIZE_RANGE:
+ case GL_DEPTH_RANGE:
+ case GL_SMOOTH_LINE_WIDTH_RANGE:
+ case GL_SMOOTH_POINT_SIZE_RANGE:
+ needed = 2;
+ break;
+
+ case GL_CURRENT_NORMAL:
+ case GL_POINT_DISTANCE_ATTENUATION:
+ needed = 3;
+ break;
+
+ case GL_COLOR_CLEAR_VALUE:
+ case GL_COLOR_WRITEMASK:
+ case GL_CURRENT_COLOR:
+ case GL_CURRENT_TEXTURE_COORDS:
+ case GL_FOG_COLOR:
+ case GL_LIGHT_MODEL_AMBIENT:
+ case GL_SCISSOR_BOX:
+ case GL_VIEWPORT:
+ needed = 4;
+ break;
+
+ case GL_MODELVIEW_MATRIX:
+ case GL_PROJECTION_MATRIX:
+ case GL_TEXTURE_MATRIX:
+ needed = 16;
+ break;
+
+ case GL_COMPRESSED_TEXTURE_FORMATS:
+ glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
+ break;
+ }
+#endif
+ return needed;
+}
+
+template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
+static void
+get
+ (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ CTYPE *params_base = (CTYPE *) 0;
+ jint _remaining;
+ CTYPE *params = (CTYPE *) 0;
+ int _needed = 0;
+
+ if (!params_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(params_ref) - offset;
+ _needed = getNeededCount(pname);
+ // if we didn't find this pname, we just assume the user passed
+ // an array of the right size -- this might happen with extensions
+ // or if we forget an enum here.
+ if (_remaining < _needed) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
+ goto exit;
+ }
+ params_base = (CTYPE *)
+ _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
+ params = params_base + offset;
+
+ GET(
+ (GLenum)pname,
+ (CTYPE *)params
+ );
+
+exit:
+ if (params_base) {
+ _env->ReleasePrimitiveArrayCritical(params_ref, params_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
+
+template <typename CTYPE, void GET(GLenum, CTYPE*)>
+static void
+getarray
+ (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
+ jint _remaining;
+ CTYPE *params = (CTYPE *) 0;
+ int _needed = 0;
+
+ params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ _needed = getNeededCount(pname);
+ // if we didn't find this pname, we just assume the user passed
+ // an array of the right size -- this might happen with extensions
+ // or if we forget an enum here.
+ if (_needed>0 && _remaining < _needed) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
+ goto exit;
+ }
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (CTYPE *) (_paramsBase + _bufferOffset);
+ }
+ GET(
+ (GLenum)pname,
+ (CTYPE *)params
+ );
+
+exit:
+ if (_array) {
+ releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+}
+
// --------------------------------------------------------------------------
/* void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) */
static void
@@ -194,8 +392,8 @@
android_glDrawTexsvOES___3SI
(JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLshort *coords_base = (GLshort *) 0;
jint _remaining;
GLshort *coords = (GLshort *) 0;
@@ -242,8 +440,8 @@
android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -278,8 +476,8 @@
android_glDrawTexivOES___3II
(JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLint *coords_base = (GLint *) 0;
jint _remaining;
GLint *coords = (GLint *) 0;
@@ -326,8 +524,8 @@
android_glDrawTexivOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -362,8 +560,8 @@
android_glDrawTexxvOES___3II
(JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *coords_base = (GLfixed *) 0;
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
@@ -410,8 +608,8 @@
android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -459,8 +657,8 @@
android_glDrawTexfvOES___3FI
(JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfloat *coords_base = (GLfloat *) 0;
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
@@ -507,8 +705,8 @@
android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -620,8 +818,8 @@
android_glClipPlanexOES__I_3II
(JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *equation_base = (GLfixed *) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
@@ -718,8 +916,8 @@
android_glFogxvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -798,8 +996,8 @@
android_glGetClipPlanexOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *eqn_base = (GLfixed *) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
@@ -847,8 +1045,8 @@
android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -884,8 +1082,8 @@
android_glGetFixedvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -950,8 +1148,8 @@
android_glGetLightxvOES__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1018,8 +1216,8 @@
android_glGetMaterialxvOES__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1086,8 +1284,8 @@
android_glGetTexEnvxvOES__II_3II
(JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1154,8 +1352,8 @@
android_glGetTexParameterxvOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1232,8 +1430,8 @@
android_glLightModelxvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1309,8 +1507,8 @@
android_glLightxvOES__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1386,8 +1584,8 @@
android_glLoadMatrixxOES___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
@@ -1461,8 +1659,8 @@
android_glMaterialxvOES__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1529,8 +1727,8 @@
android_glMultMatrixxOES___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
@@ -1641,8 +1839,8 @@
android_glPointParameterxvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1770,8 +1968,8 @@
android_glTexEnvxvOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1849,8 +2047,8 @@
android_glTexParameterxvOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1949,8 +2147,8 @@
android_glDeleteRenderbuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
@@ -1998,8 +2196,8 @@
android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2035,8 +2233,8 @@
android_glGenRenderbuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
@@ -2084,8 +2282,8 @@
android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2133,8 +2331,8 @@
android_glGetRenderbufferParameterivOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2183,8 +2381,8 @@
android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2242,8 +2440,8 @@
android_glDeleteFramebuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
@@ -2291,8 +2489,8 @@
android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2328,8 +2526,8 @@
android_glGenFramebuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
@@ -2377,8 +2575,8 @@
android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2450,8 +2648,8 @@
android_glGetFramebufferAttachmentParameterivOES__III_3II
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2501,8 +2699,8 @@
android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2651,8 +2849,8 @@
android_glClipPlanefOES__I_3FI
(JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfloat *equation_base = (GLfloat *) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
@@ -2717,8 +2915,8 @@
android_glGetClipPlanefOES__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfloat *eqn_base = (GLfloat *) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
@@ -2766,8 +2964,8 @@
android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2823,8 +3021,8 @@
android_glTexGenfvOES__II_3FI
(JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -2902,8 +3100,8 @@
android_glTexGenivOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2981,8 +3179,8 @@
android_glTexGenxvOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -3049,8 +3247,8 @@
android_glGetTexGenfvOES__II_3FI
(JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -3117,8 +3315,8 @@
android_glGetTexGenivOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -3185,8 +3383,8 @@
android_glGetTexGenxvOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
- const char * _exceptionType;
- const char * _exceptionMessage;
+ const char * _exceptionType = NULL;
+ const char * _exceptionMessage = NULL;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;