diff options
author | Mathias Agopian <mathias@google.com> | 2012-07-11 16:08:25 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-07-11 16:08:25 -0700 |
commit | f16336790bca9d3e946553f2e5a16e14bb9dbc3e (patch) | |
tree | 927539d26ab47c63364a7834baf137a063ca91c5 /core | |
parent | 73a3c0c4d783e49fd7c660b1249b97fda5e2fc61 (diff) | |
parent | 2545b32ced69100fe70685b95315c6adf411083b (diff) | |
download | frameworks_base-f16336790bca9d3e946553f2e5a16e14bb9dbc3e.zip frameworks_base-f16336790bca9d3e946553f2e5a16e14bb9dbc3e.tar.gz frameworks_base-f16336790bca9d3e946553f2e5a16e14bb9dbc3e.tar.bz2 |
Merge "Fixed exception caused crash in GL bindings"
Diffstat (limited to 'core')
-rw-r--r-- | core/jni/android_opengl_GLES10.cpp | 421 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES10Ext.cpp | 34 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES11.cpp | 596 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES11Ext.cpp | 614 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES20.cpp | 866 | ||||
-rw-r--r-- | core/jni/com_google_android_gles_jni_GLImpl.cpp | 1341 |
6 files changed, 3175 insertions, 697 deletions
diff --git a/core/jni/android_opengl_GLES10.cpp b/core/jni/android_opengl_GLES10.cpp index 6c29d6c..73696ec 100644 --- a/core/jni/android_opengl_GLES10.cpp +++ b/core/jni/android_opengl_GLES10.cpp @@ -404,21 +404,30 @@ android_glCullFace__I static void android_glDeleteTextures__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *textures_base = (GLuint *) 0; jint _remaining; GLuint *textures = (GLuint *) 0; if (!textures_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "textures == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(textures_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } textures_base = (GLuint *) @@ -435,19 +444,27 @@ exit: _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */ static void android_glDeleteTextures__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *textures = (GLuint *) 0; textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteTextures( @@ -459,6 +476,9 @@ exit: if (_array) { releasePointer(_env, _array, textures, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDepthFunc ( GLenum func ) */ @@ -532,13 +552,18 @@ android_glDrawArrays__III static void android_glDrawElements__IIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *indices = (GLvoid *) 0; indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining); if (_remaining < count) { - jniThrowException(_env, "java/lang/ArrayIndexOutOfBoundsException", "remaining() < count"); + _exception = 1; + _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; + _exceptionMessage = "remaining() < count < needed"; goto exit; } glDrawElements( @@ -552,6 +577,9 @@ exit: if (_array) { releasePointer(_env, _array, indices, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glEnable ( GLenum cap ) */ @@ -600,16 +628,23 @@ android_glFogf__IF static void android_glFogfv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -639,7 +674,9 @@ android_glFogfv__I_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -656,12 +693,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFogfv ( GLenum pname, const GLfloat *params ) */ static void android_glFogfv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -693,7 +736,9 @@ android_glFogfv__ILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glFogfv( @@ -705,6 +750,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFogx ( GLenum pname, GLfixed param ) */ @@ -721,16 +769,23 @@ android_glFogx__II static void android_glFogxv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -760,7 +815,9 @@ android_glFogxv__I_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -777,12 +834,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFogxv ( GLenum pname, const GLfixed *params ) */ static void android_glFogxv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -814,7 +877,9 @@ android_glFogxv__ILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glFogxv( @@ -826,6 +891,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFrontFace ( GLenum mode ) */ @@ -870,24 +938,29 @@ static void android_glGenTextures__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *textures_base = (GLuint *) 0; jint _remaining; GLuint *textures = (GLuint *) 0; if (!textures_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "textures == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(textures_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } textures_base = (GLuint *) @@ -904,6 +977,9 @@ exit: _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenTextures ( GLsizei n, GLuint *textures ) */ @@ -911,6 +987,8 @@ static void android_glGenTextures__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *textures = (GLuint *) 0; @@ -918,7 +996,8 @@ android_glGenTextures__ILjava_nio_IntBuffer_2 textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenTextures( @@ -930,6 +1009,9 @@ exit: if (_array) { releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLenum glGetError ( void ) */ @@ -946,18 +1028,22 @@ static void android_glGetIntegerv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1294,7 +1380,8 @@ android_glGetIntegerv__I_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLint *) @@ -1311,6 +1398,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetIntegerv ( GLenum pname, GLint *params ) */ @@ -1318,6 +1408,8 @@ static void android_glGetIntegerv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -1656,7 +1748,8 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetIntegerv( @@ -1668,6 +1761,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* const GLubyte * glGetString ( GLenum name ) */ @@ -1699,16 +1795,23 @@ android_glLightModelf__IF static void android_glLightModelfv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1729,7 +1832,9 @@ android_glLightModelfv__I_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -1746,12 +1851,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightModelfv ( GLenum pname, const GLfloat *params ) */ static void android_glLightModelfv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -1774,7 +1885,9 @@ android_glLightModelfv__ILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightModelfv( @@ -1786,6 +1899,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightModelx ( GLenum pname, GLfixed param ) */ @@ -1802,16 +1918,23 @@ android_glLightModelx__II static void android_glLightModelxv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1832,7 +1955,9 @@ android_glLightModelxv__I_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -1849,12 +1974,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightModelxv ( GLenum pname, const GLfixed *params ) */ static void android_glLightModelxv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -1877,7 +2008,9 @@ android_glLightModelxv__ILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightModelxv( @@ -1889,6 +2022,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */ @@ -1906,16 +2042,23 @@ android_glLightf__IIF static void android_glLightfv__II_3FI (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1962,7 +2105,9 @@ android_glLightfv__II_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -1980,12 +2125,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */ static void android_glLightfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -2034,7 +2185,9 @@ android_glLightfv__IILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightfv( @@ -2047,6 +2200,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */ @@ -2064,16 +2220,23 @@ android_glLightx__III static void android_glLightxv__II_3II (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2120,7 +2283,9 @@ android_glLightxv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -2138,12 +2303,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */ static void android_glLightxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -2192,7 +2363,9 @@ android_glLightxv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightxv( @@ -2205,6 +2378,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLineWidth ( GLfloat width ) */ @@ -2236,16 +2412,23 @@ android_glLoadIdentity__ static void android_glLoadMatrixf___3FI (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *m_base = (GLfloat *) 0; jint _remaining; GLfloat *m = (GLfloat *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2262,6 +2445,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLoadMatrixf ( const GLfloat *m ) */ @@ -2285,16 +2471,23 @@ android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 static void android_glLoadMatrixx___3II (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *m_base = (GLfixed *) 0; jint _remaining; GLfixed *m = (GLfixed *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2311,6 +2504,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLoadMatrixx ( const GLfixed *m ) */ @@ -2354,16 +2550,23 @@ android_glMaterialf__IIF static void android_glMaterialfv__II_3FI (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2396,7 +2599,9 @@ android_glMaterialfv__II_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -2414,12 +2619,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */ static void android_glMaterialfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -2454,7 +2665,9 @@ android_glMaterialfv__IILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glMaterialfv( @@ -2467,6 +2680,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */ @@ -2484,16 +2700,23 @@ android_glMaterialx__III static void android_glMaterialxv__II_3II (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2526,7 +2749,9 @@ android_glMaterialxv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -2544,12 +2769,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */ static void android_glMaterialxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -2584,7 +2815,9 @@ android_glMaterialxv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glMaterialxv( @@ -2597,6 +2830,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMatrixMode ( GLenum mode ) */ @@ -2612,16 +2848,23 @@ android_glMatrixMode__I static void android_glMultMatrixf___3FI (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *m_base = (GLfloat *) 0; jint _remaining; GLfloat *m = (GLfloat *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2638,6 +2881,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMultMatrixf ( const GLfloat *m ) */ @@ -2661,16 +2907,23 @@ android_glMultMatrixf__Ljava_nio_FloatBuffer_2 static void android_glMultMatrixx___3II (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *m_base = (GLfixed *) 0; jint _remaining; GLfixed *m = (GLfixed *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2687,6 +2940,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMultMatrixx ( const GLfixed *m ) */ @@ -2870,7 +3126,6 @@ android_glPushMatrix__ static void android_glReadPixels__IIIIIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLvoid *pixels = (GLvoid *) 0; @@ -2886,7 +3141,7 @@ android_glReadPixels__IIIIIILjava_nio_Buffer_2 (GLvoid *)pixels ); if (_array) { - releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, pixels, JNI_TRUE); } } @@ -3046,16 +3301,23 @@ android_glTexEnvf__IIF static void android_glTexEnvfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3082,7 +3344,9 @@ android_glTexEnvfv__II_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -3100,12 +3364,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */ static void android_glTexEnvfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -3134,7 +3404,9 @@ android_glTexEnvfv__IILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glTexEnvfv( @@ -3147,6 +3419,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */ @@ -3164,16 +3439,23 @@ android_glTexEnvx__III static void android_glTexEnvxv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3200,7 +3482,9 @@ android_glTexEnvxv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -3218,12 +3502,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */ static void android_glTexEnvxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -3252,7 +3542,9 @@ android_glTexEnvxv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glTexEnvxv( @@ -3265,6 +3557,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */ diff --git a/core/jni/android_opengl_GLES10Ext.cpp b/core/jni/android_opengl_GLES10Ext.cpp index 1154cef..16a884a 100644 --- a/core/jni/android_opengl_GLES10Ext.cpp +++ b/core/jni/android_opengl_GLES10Ext.cpp @@ -106,6 +106,8 @@ static jint android_glQueryMatrixxOES___3II_3II (JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLbitfield _returnValue = -1; GLfixed *mantissa_base = (GLfixed *) 0; jint _mantissaRemaining; @@ -116,18 +118,21 @@ android_glQueryMatrixxOES___3II_3II if (!mantissa_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissa == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "mantissa == null"; goto exit; } if (mantissaOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissaOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "mantissaOffset < 0"; goto exit; } _mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset; if (_mantissaRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - mantissaOffset < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - mantissaOffset < 16 < needed"; goto exit; } mantissa_base = (GLfixed *) @@ -136,18 +141,21 @@ android_glQueryMatrixxOES___3II_3II if (!exponent_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "exponent == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "exponent == null"; goto exit; } if (exponentOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "exponentOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "exponentOffset < 0"; goto exit; } _exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset; if (_exponentRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - exponentOffset < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - exponentOffset < 16 < needed"; goto exit; } exponent_base = (GLint *) @@ -168,6 +176,9 @@ exit: _env->ReleasePrimitiveArrayCritical(mantissa_ref, mantissa_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } return _returnValue; } @@ -176,6 +187,8 @@ static jint android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _mantissaArray = (jarray) 0; jarray _exponentArray = (jarray) 0; GLbitfield _returnValue = -1; @@ -187,13 +200,15 @@ android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining); if (_mantissaRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 16 < needed"; goto exit; } exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining); if (_exponentRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 16 < needed"; goto exit; } _returnValue = glQueryMatrixxOES( @@ -208,6 +223,9 @@ exit: if (_exponentArray) { releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } return _returnValue; } diff --git a/core/jni/android_opengl_GLES11.cpp b/core/jni/android_opengl_GLES11.cpp index d038f20..ee7cb12 100644 --- a/core/jni/android_opengl_GLES11.cpp +++ b/core/jni/android_opengl_GLES11.cpp @@ -136,6 +136,9 @@ android_glBindBuffer__II static void android_glBufferData__IILjava_nio_Buffer_2I (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *data = (GLvoid *) 0; @@ -143,7 +146,9 @@ android_glBufferData__IILjava_nio_Buffer_2I if (data_buf) { data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); if (_remaining < size) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < size < needed"; goto exit; } } @@ -158,19 +163,27 @@ exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */ static void android_glBufferSubData__IIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *data = (GLvoid *) 0; data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); if (_remaining < size) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < size < needed"; goto exit; } glBufferSubData( @@ -184,22 +197,32 @@ exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */ static void android_glClipPlanef__I_3FI (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *equation_base = (GLfloat *) 0; jint _remaining; GLfloat *equation = (GLfloat *) 0; if (!equation_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "equation == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(equation_ref) - offset; @@ -217,12 +240,18 @@ exit: _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */ static void android_glClipPlanef__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *equation = (GLfloat *) 0; @@ -235,22 +264,32 @@ android_glClipPlanef__ILjava_nio_FloatBuffer_2 if (_array) { releasePointer(_env, _array, equation, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */ static void android_glClipPlanex__I_3II (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *equation_base = (GLfixed *) 0; jint _remaining; GLfixed *equation = (GLfixed *) 0; if (!equation_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "equation == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(equation_ref) - offset; @@ -268,12 +307,18 @@ exit: _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */ static void android_glClipPlanex__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *equation = (GLfixed *) 0; @@ -286,6 +331,9 @@ android_glClipPlanex__ILjava_nio_IntBuffer_2 if (_array) { releasePointer(_env, _array, equation, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */ @@ -316,21 +364,30 @@ android_glColorPointer__IIII static void android_glDeleteBuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *buffers_base = (GLuint *) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; if (!buffers_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "buffers == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(buffers_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } buffers_base = (GLuint *) @@ -347,19 +404,27 @@ exit: _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */ static void android_glDeleteBuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteBuffers( @@ -371,18 +436,27 @@ exit: if (_array) { releasePointer(_env, _array, buffers, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */ static void android_glDrawElements__IIII (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; glDrawElements( (GLenum)mode, (GLsizei)count, (GLenum)type, (const GLvoid *)offset ); + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ @@ -390,24 +464,29 @@ static void android_glGenBuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *buffers_base = (GLuint *) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; if (!buffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "buffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(buffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } buffers_base = (GLuint *) @@ -424,6 +503,9 @@ exit: _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ @@ -431,6 +513,8 @@ static void android_glGenBuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; @@ -438,7 +522,8 @@ android_glGenBuffers__ILjava_nio_IntBuffer_2 buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenBuffers( @@ -450,6 +535,9 @@ exit: if (_array) { releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ @@ -457,18 +545,22 @@ static void android_glGetBooleanv__I_3ZI (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLboolean *params_base = (GLboolean *) 0; jint _remaining; GLboolean *params = (GLboolean *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -486,13 +578,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ static void android_glGetBooleanv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLboolean *params = (GLboolean *) 0; @@ -503,7 +597,7 @@ android_glGetBooleanv__ILjava_nio_IntBuffer_2 (GLboolean *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -512,24 +606,29 @@ static void android_glGetBufferParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -547,6 +646,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -554,6 +656,8 @@ static void android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -561,7 +665,8 @@ android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetBufferParameteriv( @@ -574,6 +679,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */ @@ -581,18 +689,22 @@ static void android_glGetClipPlanef__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *eqn_base = (GLfloat *) 0; jint _remaining; GLfloat *eqn = (GLfloat *) 0; if (!eqn_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "eqn == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(eqn_ref) - offset; @@ -610,13 +722,15 @@ exit: _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */ static void android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *eqn = (GLfloat *) 0; @@ -627,7 +741,7 @@ android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 (GLfloat *)eqn ); if (_array) { - releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, eqn, JNI_TRUE); } } @@ -636,18 +750,22 @@ static void android_glGetClipPlanex__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *eqn_base = (GLfixed *) 0; jint _remaining; GLfixed *eqn = (GLfixed *) 0; if (!eqn_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "eqn == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(eqn_ref) - offset; @@ -665,13 +783,15 @@ exit: _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */ static void android_glGetClipPlanex__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *eqn = (GLfixed *) 0; @@ -682,7 +802,7 @@ android_glGetClipPlanex__ILjava_nio_IntBuffer_2 (GLfixed *)eqn ); if (_array) { - releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, eqn, JNI_TRUE); } } @@ -691,18 +811,22 @@ static void android_glGetFixedv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -720,13 +844,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFixedv ( GLenum pname, GLfixed *params ) */ static void android_glGetFixedv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -737,7 +863,7 @@ android_glGetFixedv__ILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -746,18 +872,22 @@ static void android_glGetFloatv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -775,13 +905,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFloatv ( GLenum pname, GLfloat *params ) */ static void android_glGetFloatv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -792,7 +924,7 @@ android_glGetFloatv__ILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -801,18 +933,22 @@ static void android_glGetLightfv__II_3FI (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -860,7 +996,8 @@ android_glGetLightfv__II_3FI } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -878,6 +1015,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */ @@ -885,6 +1025,8 @@ static void android_glGetLightfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -934,7 +1076,8 @@ android_glGetLightfv__IILjava_nio_FloatBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetLightfv( @@ -947,6 +1090,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */ @@ -954,18 +1100,22 @@ static void android_glGetLightxv__II_3II (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1013,7 +1163,8 @@ android_glGetLightxv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -1031,6 +1182,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */ @@ -1038,6 +1192,8 @@ static void android_glGetLightxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -1087,7 +1243,8 @@ android_glGetLightxv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetLightxv( @@ -1100,6 +1257,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */ @@ -1107,18 +1267,22 @@ static void android_glGetMaterialfv__II_3FI (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1152,7 +1316,8 @@ android_glGetMaterialfv__II_3FI } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -1170,6 +1335,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */ @@ -1177,6 +1345,8 @@ static void android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -1212,7 +1382,8 @@ android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetMaterialfv( @@ -1225,6 +1396,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */ @@ -1232,18 +1406,22 @@ static void android_glGetMaterialxv__II_3II (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1277,7 +1455,8 @@ android_glGetMaterialxv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -1295,6 +1474,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */ @@ -1302,6 +1484,8 @@ static void android_glGetMaterialxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -1337,7 +1521,8 @@ android_glGetMaterialxv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetMaterialxv( @@ -1350,6 +1535,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnvfv ( GLenum env, GLenum pname, GLfloat *params ) */ @@ -1357,18 +1545,22 @@ static void android_glGetTexEnvfv__II_3FI (JNIEnv *_env, jobject _this, jint env, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1396,7 +1588,8 @@ android_glGetTexEnvfv__II_3FI } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -1414,6 +1607,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnvfv ( GLenum env, GLenum pname, GLfloat *params ) */ @@ -1421,6 +1617,8 @@ static void android_glGetTexEnvfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -1450,7 +1648,8 @@ android_glGetTexEnvfv__IILjava_nio_FloatBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetTexEnvfv( @@ -1463,6 +1662,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */ @@ -1470,18 +1672,22 @@ static void android_glGetTexEnviv__II_3II (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1509,7 +1715,8 @@ android_glGetTexEnviv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLint *) @@ -1527,6 +1734,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */ @@ -1534,6 +1744,8 @@ static void android_glGetTexEnviv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -1563,7 +1775,8 @@ android_glGetTexEnviv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetTexEnviv( @@ -1576,6 +1789,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */ @@ -1583,18 +1799,22 @@ static void android_glGetTexEnvxv__II_3II (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1622,7 +1842,8 @@ android_glGetTexEnvxv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -1640,6 +1861,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */ @@ -1647,6 +1871,8 @@ static void android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -1676,7 +1902,8 @@ android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetTexEnvxv( @@ -1689,6 +1916,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ @@ -1696,24 +1926,29 @@ static void android_glGetTexParameterfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -1731,6 +1966,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ @@ -1738,6 +1976,8 @@ static void android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -1745,7 +1985,8 @@ android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameterfv( @@ -1758,6 +1999,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -1765,24 +2009,29 @@ static void android_glGetTexParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -1800,6 +2049,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -1807,6 +2059,8 @@ static void android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -1814,7 +2068,8 @@ android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameteriv( @@ -1827,6 +2082,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */ @@ -1834,24 +2092,29 @@ static void android_glGetTexParameterxv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfixed *) @@ -1869,6 +2132,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */ @@ -1876,6 +2142,8 @@ static void android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -1883,7 +2151,8 @@ android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameterxv( @@ -1896,6 +2165,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLboolean glIsBuffer ( GLuint buffer ) */ @@ -1956,21 +2228,30 @@ android_glPointParameterf__IF static void android_glPointParameterfv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -1987,19 +2268,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */ static void android_glPointParameterfv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glPointParameterfv( @@ -2011,6 +2300,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointParameterx ( GLenum pname, GLfixed param ) */ @@ -2027,21 +2319,30 @@ android_glPointParameterx__II static void android_glPointParameterxv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfixed *) @@ -2058,19 +2359,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */ static void android_glPointParameterxv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glPointParameterxv( @@ -2082,6 +2391,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */ @@ -2133,16 +2445,23 @@ android_glTexEnvi__III static void android_glTexEnviv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2169,7 +2488,9 @@ android_glTexEnviv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLint *) @@ -2187,12 +2508,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */ static void android_glTexEnviv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -2221,7 +2548,9 @@ android_glTexEnviv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glTexEnviv( @@ -2234,27 +2563,39 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ static void android_glTexParameterfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -2272,19 +2613,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ static void android_glTexParameterfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameterfv( @@ -2297,6 +2646,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */ @@ -2314,21 +2666,30 @@ android_glTexParameteri__III static void android_glTexParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -2346,19 +2707,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */ static void android_glTexParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameteriv( @@ -2371,27 +2740,39 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */ static void android_glTexParameterxv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfixed *) @@ -2409,19 +2790,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */ static void android_glTexParameterxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameterxv( @@ -2434,6 +2823,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */ diff --git a/core/jni/android_opengl_GLES11Ext.cpp b/core/jni/android_opengl_GLES11Ext.cpp index d6dc0fe..a05f809 100644 --- a/core/jni/android_opengl_GLES11Ext.cpp +++ b/core/jni/android_opengl_GLES11Ext.cpp @@ -197,21 +197,30 @@ android_glDrawTexxOES__IIIII static void android_glDrawTexsvOES___3SI (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLshort *coords_base = (GLshort *) 0; jint _remaining; GLshort *coords = (GLshort *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLshort *) @@ -227,19 +236,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexsvOES ( const GLshort *coords ) */ static void android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLshort *coords = (GLshort *) 0; coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexsvOES( @@ -250,27 +267,39 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexivOES ( const GLint *coords ) */ static void android_glDrawTexivOES___3II (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *coords_base = (GLint *) 0; jint _remaining; GLint *coords = (GLint *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLint *) @@ -286,19 +315,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexivOES ( const GLint *coords ) */ static void android_glDrawTexivOES__Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *coords = (GLint *) 0; coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexivOES( @@ -309,27 +346,39 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexxvOES ( const GLfixed *coords ) */ static void android_glDrawTexxvOES___3II (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *coords_base = (GLfixed *) 0; jint _remaining; GLfixed *coords = (GLfixed *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLfixed *) @@ -345,19 +394,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexxvOES ( const GLfixed *coords ) */ static void android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *coords = (GLfixed *) 0; coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexxvOES( @@ -368,6 +425,9 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */ @@ -387,21 +447,30 @@ android_glDrawTexfOES__FFFFF static void android_glDrawTexfvOES___3FI (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *coords_base = (GLfloat *) 0; jint _remaining; GLfloat *coords = (GLfloat *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLfloat *) @@ -417,19 +486,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexfvOES ( const GLfloat *coords ) */ static void android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *coords = (GLfloat *) 0; coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexfvOES( @@ -440,13 +517,15 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */ static void android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLeglImageOES image = (GLeglImageOES) 0; @@ -457,7 +536,7 @@ android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 (GLeglImageOES)image ); if (_array) { - releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, image, JNI_TRUE); } } @@ -465,7 +544,6 @@ android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2 static void android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint target, jobject image_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLeglImageOES image = (GLeglImageOES) 0; @@ -476,7 +554,7 @@ android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2 (GLeglImageOES)image ); if (_array) { - releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, image, JNI_TRUE); } } @@ -515,16 +593,23 @@ android_glClearDepthxOES__I static void android_glClipPlanexOES__I_3II (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *equation_base = (GLfixed *) 0; jint _remaining; GLfixed *equation = (GLfixed *) 0; if (!equation_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "equation == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(equation_ref) - offset; @@ -542,6 +627,9 @@ exit: _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */ @@ -598,16 +686,23 @@ android_glFogxOES__II static void android_glFogxvOES__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -625,6 +720,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFogxvOES ( GLenum pname, const GLfixed *params ) */ @@ -664,24 +762,29 @@ static void android_glGetClipPlanexOES__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *eqn_base = (GLfixed *) 0; jint _remaining; GLfixed *eqn = (GLfixed *) 0; if (!eqn_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "eqn == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(eqn_ref) - offset; if (_remaining < 4) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 4 < needed"; goto exit; } eqn_base = (GLfixed *) @@ -698,6 +801,9 @@ exit: _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */ @@ -705,6 +811,8 @@ static void android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *eqn = (GLfixed *) 0; @@ -712,7 +820,8 @@ android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2 eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining); if (_remaining < 4) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 4 < needed"; goto exit; } glGetClipPlanexOES( @@ -724,6 +833,9 @@ exit: if (_array) { releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */ @@ -731,18 +843,22 @@ static void android_glGetFixedvOES__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -760,13 +876,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */ static void android_glGetFixedvOES__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -777,7 +895,7 @@ android_glGetFixedvOES__ILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -786,18 +904,22 @@ static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -816,13 +938,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */ static void android_glGetLightxvOES__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -834,7 +958,7 @@ android_glGetLightxvOES__IILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -843,18 +967,22 @@ static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -873,13 +1001,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */ static void android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -891,7 +1021,7 @@ android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -900,18 +1030,22 @@ static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -930,13 +1064,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */ static void android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -948,7 +1084,7 @@ android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -957,18 +1093,22 @@ static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -987,13 +1127,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */ static void android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -1005,7 +1147,7 @@ android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -1023,16 +1165,23 @@ android_glLightModelxOES__II static void android_glLightModelxvOES__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1050,6 +1199,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */ @@ -1085,16 +1237,23 @@ android_glLightxOES__III static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1113,6 +1272,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */ @@ -1147,16 +1309,23 @@ android_glLineWidthxOES__I static void android_glLoadMatrixxOES___3II (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *m_base = (GLfixed *) 0; jint _remaining; GLfixed *m = (GLfixed *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -1173,6 +1342,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLoadMatrixxOES ( const GLfixed *m ) */ @@ -1207,16 +1379,23 @@ android_glMaterialxOES__III static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1235,6 +1414,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */ @@ -1260,16 +1442,23 @@ android_glMaterialxvOES__IILjava_nio_IntBuffer_2 static void android_glMultMatrixxOES___3II (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *m_base = (GLfixed *) 0; jint _remaining; GLfixed *m = (GLfixed *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -1286,6 +1475,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMultMatrixxOES ( const GLfixed *m ) */ @@ -1357,16 +1549,23 @@ android_glPointParameterxOES__II static void android_glPointParameterxvOES__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1384,6 +1583,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */ @@ -1471,16 +1673,23 @@ android_glTexEnvxOES__III static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1499,6 +1708,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ @@ -1535,16 +1747,23 @@ android_glTexParameterxOES__III static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1563,6 +1782,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */ @@ -1620,21 +1842,30 @@ android_glBindRenderbufferOES__II static void android_glDeleteRenderbuffersOES__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *renderbuffers_base = (GLuint *) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; if (!renderbuffers_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "renderbuffers == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } renderbuffers_base = (GLuint *) @@ -1651,19 +1882,27 @@ exit: _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */ static void android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteRenderbuffersOES( @@ -1675,6 +1914,9 @@ exit: if (_array) { releasePointer(_env, _array, renderbuffers, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */ @@ -1682,24 +1924,29 @@ static void android_glGenRenderbuffersOES__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *renderbuffers_base = (GLuint *) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; if (!renderbuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "renderbuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } renderbuffers_base = (GLuint *) @@ -1716,6 +1963,9 @@ exit: _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */ @@ -1723,6 +1973,8 @@ static void android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; @@ -1730,7 +1982,8 @@ android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenRenderbuffersOES( @@ -1742,6 +1995,9 @@ exit: if (_array) { releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */ @@ -1761,24 +2017,29 @@ static void 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; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -1796,6 +2057,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */ @@ -1803,6 +2067,8 @@ static void 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; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -1810,7 +2076,8 @@ android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetRenderbufferParameterivOES( @@ -1823,6 +2090,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */ @@ -1850,21 +2120,30 @@ android_glBindFramebufferOES__II static void android_glDeleteFramebuffersOES__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *framebuffers_base = (GLuint *) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; if (!framebuffers_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "framebuffers == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(framebuffers_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } framebuffers_base = (GLuint *) @@ -1881,19 +2160,27 @@ exit: _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */ static void android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteFramebuffersOES( @@ -1905,6 +2192,9 @@ exit: if (_array) { releasePointer(_env, _array, framebuffers, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */ @@ -1912,24 +2202,29 @@ static void android_glGenFramebuffersOES__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *framebuffers_base = (GLuint *) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; if (!framebuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "framebuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(framebuffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } framebuffers_base = (GLuint *) @@ -1946,6 +2241,9 @@ exit: _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */ @@ -1953,6 +2251,8 @@ static void android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; @@ -1960,7 +2260,8 @@ android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenFramebuffersOES( @@ -1972,6 +2273,9 @@ exit: if (_array) { releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLenum glCheckFramebufferStatusOES ( GLenum target ) */ @@ -2015,24 +2319,29 @@ static void 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; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -2051,6 +2360,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ @@ -2058,6 +2370,8 @@ static void 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; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -2065,7 +2379,8 @@ android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetFramebufferAttachmentParameterivOES( @@ -2079,6 +2394,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenerateMipmapOES ( GLenum target ) */ @@ -2194,16 +2512,23 @@ android_glOrthofOES__FFFFFF static void android_glClipPlanefOES__I_3FI (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *equation_base = (GLfloat *) 0; jint _remaining; GLfloat *equation = (GLfloat *) 0; if (!equation_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "equation == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(equation_ref) - offset; @@ -2221,6 +2546,9 @@ exit: _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */ @@ -2246,24 +2574,29 @@ static void android_glGetClipPlanefOES__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *eqn_base = (GLfloat *) 0; jint _remaining; GLfloat *eqn = (GLfloat *) 0; if (!eqn_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "eqn == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(eqn_ref) - offset; if (_remaining < 4) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 4 < needed"; goto exit; } eqn_base = (GLfloat *) @@ -2280,6 +2613,9 @@ exit: _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */ @@ -2287,6 +2623,8 @@ static void android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *eqn = (GLfloat *) 0; @@ -2294,7 +2632,8 @@ android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2 eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining); if (_remaining < 4) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 4 < needed"; goto exit; } glGetClipPlanefOES( @@ -2306,6 +2645,9 @@ exit: if (_array) { releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClearDepthfOES ( GLclampf depth ) */ @@ -2332,16 +2674,23 @@ android_glTexGenfOES__IIF static void 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; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2360,6 +2709,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */ @@ -2396,16 +2748,23 @@ android_glTexGeniOES__III static void 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; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2424,6 +2783,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */ @@ -2460,16 +2822,23 @@ android_glTexGenxOES__III static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2488,6 +2857,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */ @@ -2514,18 +2886,22 @@ static void 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; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2544,13 +2920,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */ static void android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -2562,7 +2940,7 @@ android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -2571,18 +2949,22 @@ static void 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; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2601,13 +2983,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */ static void android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -2619,7 +3003,7 @@ android_glGetTexGenivOES__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -2628,18 +3012,22 @@ static void 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; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2658,13 +3046,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */ static void android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -2676,7 +3066,7 @@ android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } diff --git a/core/jni/android_opengl_GLES20.cpp b/core/jni/android_opengl_GLES20.cpp index a53e4d7..87ff270 100644 --- a/core/jni/android_opengl_GLES20.cpp +++ b/core/jni/android_opengl_GLES20.cpp @@ -150,10 +150,14 @@ android_glAttachShader__II static void android_glBindAttribLocation__IILjava_lang_String_2 (JNIEnv *_env, jobject _this, jint program, jint index, jstring name) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; const char* _nativename = 0; if (!name) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "name == null"; goto exit; } _nativename = _env->GetStringUTFChars(name, 0); @@ -169,6 +173,9 @@ exit: _env->ReleaseStringUTFChars(name, _nativename); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glBindBuffer ( GLenum target, GLuint buffer ) */ @@ -268,6 +275,9 @@ android_glBlendFuncSeparate__IIII static void android_glBufferData__IILjava_nio_Buffer_2I (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *data = (GLvoid *) 0; @@ -275,7 +285,9 @@ android_glBufferData__IILjava_nio_Buffer_2I if (data_buf) { data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); if (_remaining < size) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < size < needed"; goto exit; } } @@ -290,19 +302,27 @@ exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */ static void android_glBufferSubData__IIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *data = (GLvoid *) 0; data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); if (_remaining < size) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < size < needed"; goto exit; } glBufferSubData( @@ -316,6 +336,9 @@ exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLenum glCheckFramebufferStatus ( GLenum target ) */ @@ -503,21 +526,30 @@ android_glCullFace__I static void android_glDeleteBuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *buffers_base = (GLuint *) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; if (!buffers_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "buffers == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(buffers_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } buffers_base = (GLuint *) @@ -534,19 +566,27 @@ exit: _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */ static void android_glDeleteBuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteBuffers( @@ -558,22 +598,32 @@ exit: if (_array) { releasePointer(_env, _array, buffers, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */ static void android_glDeleteFramebuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *framebuffers_base = (GLuint *) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; if (!framebuffers_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "framebuffers == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(framebuffers_ref) - offset; @@ -591,6 +641,9 @@ exit: _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */ @@ -624,16 +677,23 @@ android_glDeleteProgram__I static void android_glDeleteRenderbuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *renderbuffers_base = (GLuint *) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; if (!renderbuffers_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "renderbuffers == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; @@ -651,6 +711,9 @@ exit: _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */ @@ -684,21 +747,30 @@ android_glDeleteShader__I static void android_glDeleteTextures__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *textures_base = (GLuint *) 0; jint _remaining; GLuint *textures = (GLuint *) 0; if (!textures_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "textures == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(textures_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } textures_base = (GLuint *) @@ -715,19 +787,27 @@ exit: _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */ static void android_glDeleteTextures__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *textures = (GLuint *) 0; textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteTextures( @@ -739,6 +819,9 @@ exit: if (_array) { releasePointer(_env, _array, textures, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDepthFunc ( GLenum func ) */ @@ -812,25 +895,36 @@ android_glDrawArrays__III static void android_glDrawElements__IIII (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; glDrawElements( (GLenum)mode, (GLsizei)count, (GLenum)type, (const GLvoid *)offset ); + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */ static void android_glDrawElements__IIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *indices = (GLvoid *) 0; indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining); if (_remaining < count) { - jniThrowException(_env, "java/lang/ArrayIndexOutOfBoundsException", "remaining() < count"); + _exception = 1; + _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; + _exceptionMessage = "remaining() < count < needed"; goto exit; } glDrawElements( @@ -844,6 +938,9 @@ exit: if (_array) { releasePointer(_env, _array, indices, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glEnable ( GLenum cap ) */ @@ -917,24 +1014,29 @@ static void android_glGenBuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *buffers_base = (GLuint *) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; if (!buffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "buffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(buffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } buffers_base = (GLuint *) @@ -951,6 +1053,9 @@ exit: _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ @@ -958,6 +1063,8 @@ static void android_glGenBuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; @@ -965,7 +1072,8 @@ android_glGenBuffers__ILjava_nio_IntBuffer_2 buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenBuffers( @@ -977,6 +1085,9 @@ exit: if (_array) { releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenerateMipmap ( GLenum target ) */ @@ -993,18 +1104,22 @@ static void android_glGenFramebuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *framebuffers_base = (GLuint *) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; if (!framebuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "framebuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(framebuffers_ref) - offset; @@ -1022,13 +1137,15 @@ exit: _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */ static void android_glGenFramebuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; @@ -1039,7 +1156,7 @@ android_glGenFramebuffers__ILjava_nio_IntBuffer_2 (GLuint *)framebuffers ); if (_array) { - releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, framebuffers, JNI_TRUE); } } @@ -1048,18 +1165,22 @@ static void android_glGenRenderbuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *renderbuffers_base = (GLuint *) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; if (!renderbuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "renderbuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; @@ -1077,13 +1198,15 @@ exit: _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */ static void android_glGenRenderbuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; @@ -1094,7 +1217,7 @@ android_glGenRenderbuffers__ILjava_nio_IntBuffer_2 (GLuint *)renderbuffers ); if (_array) { - releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, renderbuffers, JNI_TRUE); } } @@ -1103,24 +1226,29 @@ static void android_glGenTextures__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *textures_base = (GLuint *) 0; jint _remaining; GLuint *textures = (GLuint *) 0; if (!textures_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "textures == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(textures_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } textures_base = (GLuint *) @@ -1137,6 +1265,9 @@ exit: _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenTextures ( GLsizei n, GLuint *textures ) */ @@ -1144,6 +1275,8 @@ static void android_glGenTextures__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *textures = (GLuint *) 0; @@ -1151,7 +1284,8 @@ android_glGenTextures__ILjava_nio_IntBuffer_2 textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenTextures( @@ -1163,6 +1297,9 @@ exit: if (_array) { releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */ @@ -1170,6 +1307,8 @@ static void android_glGetActiveAttrib__III_3II_3II_3II_3BI (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) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLsizei *length_base = (GLsizei *) 0; jint _lengthRemaining; GLsizei *length = (GLsizei *) 0; @@ -1185,12 +1324,14 @@ android_glGetActiveAttrib__III_3II_3II_3II_3BI if (!length_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length == null"; goto exit; } if (lengthOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "lengthOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "lengthOffset < 0"; goto exit; } _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; @@ -1200,12 +1341,14 @@ android_glGetActiveAttrib__III_3II_3II_3II_3BI if (!size_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "size == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "size == null"; goto exit; } if (sizeOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "sizeOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "sizeOffset < 0"; goto exit; } _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; @@ -1215,12 +1358,14 @@ android_glGetActiveAttrib__III_3II_3II_3II_3BI if (!type_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "type == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "type == null"; goto exit; } if (typeOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "typeOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "typeOffset < 0"; goto exit; } _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; @@ -1230,12 +1375,14 @@ android_glGetActiveAttrib__III_3II_3II_3II_3BI if (!name_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "name == null"; goto exit; } if (nameOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "nameOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "nameOffset < 0"; goto exit; } _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; @@ -1270,13 +1417,15 @@ exit: _env->ReleasePrimitiveArrayCritical(length_ref, length_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */ static void android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) { - jint _exception = 0; jarray _lengthArray = (jarray) 0; jarray _sizeArray = (jarray) 0; jarray _typeArray = (jarray) 0; @@ -1300,13 +1449,13 @@ android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_ni (char *)name ); if (_lengthArray) { - releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _lengthArray, type, JNI_TRUE); } if (_sizeArray) { - releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _sizeArray, size, JNI_TRUE); } if (_typeArray) { - releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _typeArray, length, JNI_TRUE); } } @@ -1315,6 +1464,8 @@ static void android_glGetActiveUniform__III_3II_3II_3II_3BI (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) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLsizei *length_base = (GLsizei *) 0; jint _lengthRemaining; GLsizei *length = (GLsizei *) 0; @@ -1330,12 +1481,14 @@ android_glGetActiveUniform__III_3II_3II_3II_3BI if (!length_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length == null"; goto exit; } if (lengthOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "lengthOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "lengthOffset < 0"; goto exit; } _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; @@ -1345,12 +1498,14 @@ android_glGetActiveUniform__III_3II_3II_3II_3BI if (!size_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "size == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "size == null"; goto exit; } if (sizeOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "sizeOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "sizeOffset < 0"; goto exit; } _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; @@ -1360,12 +1515,14 @@ android_glGetActiveUniform__III_3II_3II_3II_3BI if (!type_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "type == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "type == null"; goto exit; } if (typeOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "typeOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "typeOffset < 0"; goto exit; } _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; @@ -1375,12 +1532,14 @@ android_glGetActiveUniform__III_3II_3II_3II_3BI if (!name_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "name == null"; goto exit; } if (nameOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "nameOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "nameOffset < 0"; goto exit; } _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; @@ -1415,13 +1574,15 @@ exit: _env->ReleasePrimitiveArrayCritical(length_ref, length_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */ static void android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) { - jint _exception = 0; jarray _lengthArray = (jarray) 0; jarray _sizeArray = (jarray) 0; jarray _typeArray = (jarray) 0; @@ -1445,13 +1606,13 @@ android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_n (char *)name ); if (_lengthArray) { - releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _lengthArray, type, JNI_TRUE); } if (_sizeArray) { - releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _sizeArray, size, JNI_TRUE); } if (_typeArray) { - releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _typeArray, length, JNI_TRUE); } } @@ -1460,6 +1621,8 @@ static void android_glGetAttachedShaders__II_3II_3II (JNIEnv *_env, jobject _this, jint program, jint maxcount, jintArray count_ref, jint countOffset, jintArray shaders_ref, jint shadersOffset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLsizei *count_base = (GLsizei *) 0; jint _countRemaining; GLsizei *count = (GLsizei *) 0; @@ -1469,12 +1632,14 @@ android_glGetAttachedShaders__II_3II_3II if (!count_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "count == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "count == null"; goto exit; } if (countOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "countOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "countOffset < 0"; goto exit; } _countRemaining = _env->GetArrayLength(count_ref) - countOffset; @@ -1484,12 +1649,14 @@ android_glGetAttachedShaders__II_3II_3II if (!shaders_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "shaders == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "shaders == null"; goto exit; } if (shadersOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "shadersOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "shadersOffset < 0"; goto exit; } _shadersRemaining = _env->GetArrayLength(shaders_ref) - shadersOffset; @@ -1513,13 +1680,15 @@ exit: _env->ReleasePrimitiveArrayCritical(count_ref, count_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */ static void android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint program, jint maxcount, jobject count_buf, jobject shaders_buf) { - jint _exception = 0; jarray _countArray = (jarray) 0; jarray _shadersArray = (jarray) 0; jint _countRemaining; @@ -1536,10 +1705,10 @@ android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 (GLuint *)shaders ); if (_countArray) { - releasePointer(_env, _countArray, shaders, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _countArray, shaders, JNI_TRUE); } if (_shadersArray) { - releasePointer(_env, _shadersArray, count, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _shadersArray, count, JNI_TRUE); } } @@ -1547,11 +1716,15 @@ android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 static jint android_glGetAttribLocation__ILjava_lang_String_2 (JNIEnv *_env, jobject _this, jint program, jstring name) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; int _returnValue = 0; const char* _nativename = 0; if (!name) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "name == null"; goto exit; } _nativename = _env->GetStringUTFChars(name, 0); @@ -1566,6 +1739,9 @@ exit: _env->ReleaseStringUTFChars(name, _nativename); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } return _returnValue; } @@ -1574,18 +1750,22 @@ static void android_glGetBooleanv__I_3ZI (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLboolean *params_base = (GLboolean *) 0; jint _remaining; GLboolean *params = (GLboolean *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1603,13 +1783,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ static void android_glGetBooleanv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLboolean *params = (GLboolean *) 0; @@ -1620,7 +1802,7 @@ android_glGetBooleanv__ILjava_nio_IntBuffer_2 (GLboolean *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -1629,24 +1811,29 @@ static void android_glGetBufferParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -1664,6 +1851,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -1671,6 +1861,8 @@ static void android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -1678,7 +1870,8 @@ android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetBufferParameteriv( @@ -1691,6 +1884,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLenum glGetError ( void ) */ @@ -1707,18 +1903,22 @@ static void android_glGetFloatv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1736,13 +1936,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFloatv ( GLenum pname, GLfloat *params ) */ static void android_glGetFloatv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -1753,7 +1955,7 @@ android_glGetFloatv__ILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -1762,18 +1964,22 @@ static void android_glGetFramebufferAttachmentParameteriv__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; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1793,13 +1999,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */ static void android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -1812,7 +2020,7 @@ android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -1821,18 +2029,22 @@ static void android_glGetIntegerv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2169,7 +2381,8 @@ android_glGetIntegerv__I_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLint *) @@ -2186,6 +2399,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetIntegerv ( GLenum pname, GLint *params ) */ @@ -2193,6 +2409,8 @@ static void android_glGetIntegerv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -2531,7 +2749,8 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetIntegerv( @@ -2543,6 +2762,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */ @@ -2550,18 +2772,22 @@ static void android_glGetProgramiv__II_3II (JNIEnv *_env, jobject _this, jint program, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2580,13 +2806,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */ static void android_glGetProgramiv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint program, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -2598,7 +2826,7 @@ android_glGetProgramiv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -2626,18 +2854,22 @@ static void android_glGetRenderbufferParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2656,13 +2888,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */ static void android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -2674,7 +2908,7 @@ android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -2683,18 +2917,22 @@ static void android_glGetShaderiv__II_3II (JNIEnv *_env, jobject _this, jint shader, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2713,13 +2951,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */ static void android_glGetShaderiv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint shader, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -2731,7 +2971,7 @@ android_glGetShaderiv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -2759,6 +2999,8 @@ static void android_glGetShaderPrecisionFormat__II_3II_3II (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jintArray range_ref, jint rangeOffset, jintArray precision_ref, jint precisionOffset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *range_base = (GLint *) 0; jint _rangeRemaining; GLint *range = (GLint *) 0; @@ -2768,12 +3010,14 @@ android_glGetShaderPrecisionFormat__II_3II_3II if (!range_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "range == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "range == null"; goto exit; } if (rangeOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "rangeOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "rangeOffset < 0"; goto exit; } _rangeRemaining = _env->GetArrayLength(range_ref) - rangeOffset; @@ -2783,12 +3027,14 @@ android_glGetShaderPrecisionFormat__II_3II_3II if (!precision_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "precision == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "precision == null"; goto exit; } if (precisionOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "precisionOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "precisionOffset < 0"; goto exit; } _precisionRemaining = _env->GetArrayLength(precision_ref) - precisionOffset; @@ -2812,13 +3058,15 @@ exit: _env->ReleasePrimitiveArrayCritical(range_ref, range_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */ static void android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jobject range_buf, jobject precision_buf) { - jint _exception = 0; jarray _rangeArray = (jarray) 0; jarray _precisionArray = (jarray) 0; jint _rangeRemaining; @@ -2835,10 +3083,10 @@ android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 (GLint *)precision ); if (_rangeArray) { - releasePointer(_env, _rangeArray, precision, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _rangeArray, precision, JNI_TRUE); } if (_precisionArray) { - releasePointer(_env, _precisionArray, range, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _precisionArray, range, JNI_TRUE); } } @@ -2847,6 +3095,8 @@ static void android_glGetShaderSource__II_3II_3BI (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jintArray length_ref, jint lengthOffset, jbyteArray source_ref, jint sourceOffset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLsizei *length_base = (GLsizei *) 0; jint _lengthRemaining; GLsizei *length = (GLsizei *) 0; @@ -2856,12 +3106,14 @@ android_glGetShaderSource__II_3II_3BI if (!length_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length == null"; goto exit; } if (lengthOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "lengthOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "lengthOffset < 0"; goto exit; } _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; @@ -2871,12 +3123,14 @@ android_glGetShaderSource__II_3II_3BI if (!source_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "source == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "source == null"; goto exit; } if (sourceOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "sourceOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "sourceOffset < 0"; goto exit; } _sourceRemaining = _env->GetArrayLength(source_ref) - sourceOffset; @@ -2900,13 +3154,15 @@ exit: _env->ReleasePrimitiveArrayCritical(length_ref, length_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */ static void android_glGetShaderSource__IILjava_nio_IntBuffer_2B (JNIEnv *_env, jobject _this, jint shader, jint bufsize, jobject length_buf, jbyte source) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLsizei *length = (GLsizei *) 0; @@ -2919,7 +3175,7 @@ android_glGetShaderSource__IILjava_nio_IntBuffer_2B (char *)source ); if (_array) { - releasePointer(_env, _array, length, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, length, JNI_TRUE); } } @@ -2933,24 +3189,29 @@ static void android_glGetTexParameterfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -2968,6 +3229,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ @@ -2975,6 +3239,8 @@ static void android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -2982,7 +3248,8 @@ android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameterfv( @@ -2995,6 +3262,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -3002,24 +3272,29 @@ static void android_glGetTexParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -3037,6 +3312,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -3044,6 +3322,8 @@ static void android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -3051,7 +3331,8 @@ android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameteriv( @@ -3064,6 +3345,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */ @@ -3071,18 +3355,22 @@ static void android_glGetUniformfv__II_3FI (JNIEnv *_env, jobject _this, jint program, jint location, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3101,13 +3389,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */ static void android_glGetUniformfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -3119,7 +3409,7 @@ android_glGetUniformfv__IILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -3128,18 +3418,22 @@ static void android_glGetUniformiv__II_3II (JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3158,13 +3452,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */ static void android_glGetUniformiv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -3176,7 +3472,7 @@ android_glGetUniformiv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -3184,11 +3480,15 @@ android_glGetUniformiv__IILjava_nio_IntBuffer_2 static jint android_glGetUniformLocation__ILjava_lang_String_2 (JNIEnv *_env, jobject _this, jint program, jstring name) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; int _returnValue = 0; const char* _nativename = 0; if (!name) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "name == null"; goto exit; } _nativename = _env->GetStringUTFChars(name, 0); @@ -3203,6 +3503,9 @@ exit: _env->ReleaseStringUTFChars(name, _nativename); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } return _returnValue; } @@ -3211,18 +3514,22 @@ static void android_glGetVertexAttribfv__II_3FI (JNIEnv *_env, jobject _this, jint index, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3241,13 +3548,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */ static void android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -3259,7 +3568,7 @@ android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -3268,18 +3577,22 @@ static void android_glGetVertexAttribiv__II_3II (JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3298,13 +3611,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */ static void android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -3316,7 +3631,7 @@ android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -3449,7 +3764,6 @@ android_glPolygonOffset__FF static void android_glReadPixels__IIIIIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLvoid *pixels = (GLvoid *) 0; @@ -3465,7 +3779,7 @@ android_glReadPixels__IIIIIILjava_nio_Buffer_2 (GLvoid *)pixels ); if (_array) { - releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, pixels, JNI_TRUE); } } @@ -3514,6 +3828,9 @@ android_glScissor__IIII static void android_glShaderBinary__I_3IIILjava_nio_Buffer_2I (JNIEnv *_env, jobject _this, jint n, jintArray shaders_ref, jint offset, jint binaryformat, jobject binary_buf, jint length) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; GLuint *shaders_base = (GLuint *) 0; jint _shadersRemaining; @@ -3522,11 +3839,15 @@ android_glShaderBinary__I_3IIILjava_nio_Buffer_2I GLvoid *binary = (GLvoid *) 0; if (!shaders_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "shaders == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "shaders == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _shadersRemaining = _env->GetArrayLength(shaders_ref) - offset; @@ -3551,6 +3872,9 @@ exit: _env->ReleasePrimitiveArrayCritical(shaders_ref, shaders_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */ @@ -3705,21 +4029,30 @@ android_glTexParameterf__IIF static void android_glTexParameterfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -3737,19 +4070,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ static void android_glTexParameterfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameterfv( @@ -3762,6 +4103,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */ @@ -3779,21 +4123,30 @@ android_glTexParameteri__III static void android_glTexParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -3811,19 +4164,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */ static void android_glTexParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameteriv( @@ -3836,6 +4197,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */ @@ -3879,16 +4243,23 @@ android_glUniform1f__IF static void android_glUniform1fv__II_3FI (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *v_base = (GLfloat *) 0; jint _remaining; GLfloat *v = (GLfloat *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -3907,6 +4278,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */ @@ -3942,16 +4316,23 @@ android_glUniform1i__II static void android_glUniform1iv__II_3II (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *v_base = (GLint *) 0; jint _remaining; GLint *v = (GLint *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -3970,6 +4351,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */ @@ -4006,16 +4390,23 @@ android_glUniform2f__IFF static void android_glUniform2fv__II_3FI (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *v_base = (GLfloat *) 0; jint _remaining; GLfloat *v = (GLfloat *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -4034,6 +4425,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */ @@ -4070,16 +4464,23 @@ android_glUniform2i__III static void android_glUniform2iv__II_3II (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *v_base = (GLint *) 0; jint _remaining; GLint *v = (GLint *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -4098,6 +4499,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */ @@ -4135,16 +4539,23 @@ android_glUniform3f__IFFF static void android_glUniform3fv__II_3FI (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *v_base = (GLfloat *) 0; jint _remaining; GLfloat *v = (GLfloat *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -4163,6 +4574,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */ @@ -4200,16 +4614,23 @@ android_glUniform3i__IIII static void android_glUniform3iv__II_3II (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *v_base = (GLint *) 0; jint _remaining; GLint *v = (GLint *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -4228,6 +4649,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */ @@ -4266,16 +4690,23 @@ android_glUniform4f__IFFFF static void android_glUniform4fv__II_3FI (JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *v_base = (GLfloat *) 0; jint _remaining; GLfloat *v = (GLfloat *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -4294,6 +4725,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */ @@ -4332,16 +4766,23 @@ android_glUniform4i__IIIII static void android_glUniform4iv__II_3II (JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *v_base = (GLint *) 0; jint _remaining; GLint *v = (GLint *) 0; if (!v_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "v == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(v_ref) - offset; @@ -4360,6 +4801,9 @@ exit: _env->ReleasePrimitiveArrayCritical(v_ref, v_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */ @@ -4385,16 +4829,23 @@ android_glUniform4iv__IILjava_nio_IntBuffer_2 static void android_glUniformMatrix2fv__IIZ_3FI (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *value_base = (GLfloat *) 0; jint _remaining; GLfloat *value = (GLfloat *) 0; if (!value_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "value == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "value == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(value_ref) - offset; @@ -4414,6 +4865,9 @@ exit: _env->ReleasePrimitiveArrayCritical(value_ref, value_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ @@ -4440,16 +4894,23 @@ android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2 static void android_glUniformMatrix3fv__IIZ_3FI (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *value_base = (GLfloat *) 0; jint _remaining; GLfloat *value = (GLfloat *) 0; if (!value_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "value == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "value == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(value_ref) - offset; @@ -4469,6 +4930,9 @@ exit: _env->ReleasePrimitiveArrayCritical(value_ref, value_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ @@ -4495,16 +4959,23 @@ android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2 static void android_glUniformMatrix4fv__IIZ_3FI (JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *value_base = (GLfloat *) 0; jint _remaining; GLfloat *value = (GLfloat *) 0; if (!value_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "value == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "value == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(value_ref) - offset; @@ -4524,6 +4995,9 @@ exit: _env->ReleasePrimitiveArrayCritical(value_ref, value_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */ @@ -4578,16 +5052,23 @@ android_glVertexAttrib1f__IF static void android_glVertexAttrib1fv__I_3FI (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *values_base = (GLfloat *) 0; jint _remaining; GLfloat *values = (GLfloat *) 0; if (!values_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "values == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(values_ref) - offset; @@ -4605,6 +5086,9 @@ exit: _env->ReleasePrimitiveArrayCritical(values_ref, values_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */ @@ -4640,16 +5124,23 @@ android_glVertexAttrib2f__IFF static void android_glVertexAttrib2fv__I_3FI (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *values_base = (GLfloat *) 0; jint _remaining; GLfloat *values = (GLfloat *) 0; if (!values_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "values == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(values_ref) - offset; @@ -4667,6 +5158,9 @@ exit: _env->ReleasePrimitiveArrayCritical(values_ref, values_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */ @@ -4703,16 +5197,23 @@ android_glVertexAttrib3f__IFFF static void android_glVertexAttrib3fv__I_3FI (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *values_base = (GLfloat *) 0; jint _remaining; GLfloat *values = (GLfloat *) 0; if (!values_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "values == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(values_ref) - offset; @@ -4730,6 +5231,9 @@ exit: _env->ReleasePrimitiveArrayCritical(values_ref, values_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */ @@ -4767,16 +5271,23 @@ android_glVertexAttrib4f__IFFFF static void android_glVertexAttrib4fv__I_3FI (JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *values_base = (GLfloat *) 0; jint _remaining; GLfloat *values = (GLfloat *) 0; if (!values_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "values == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(values_ref) - offset; @@ -4794,6 +5305,9 @@ exit: _env->ReleasePrimitiveArrayCritical(values_ref, values_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */ diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp index 8777131..0310dc7 100644 --- a/core/jni/com_google_android_gles_jni_GLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp @@ -530,21 +530,30 @@ android_glCullFace__I static void android_glDeleteTextures__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *textures_base = (GLuint *) 0; jint _remaining; GLuint *textures = (GLuint *) 0; if (!textures_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "textures == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(textures_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } textures_base = (GLuint *) @@ -561,19 +570,27 @@ exit: _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */ static void android_glDeleteTextures__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *textures = (GLuint *) 0; textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteTextures( @@ -585,6 +602,9 @@ exit: if (_array) { releasePointer(_env, _array, textures, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDepthFunc ( GLenum func ) */ @@ -658,13 +678,18 @@ android_glDrawArrays__III static void android_glDrawElements__IIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *indices = (GLvoid *) 0; indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining); if (_remaining < count) { - jniThrowException(_env, "java/lang/ArrayIndexOutOfBoundsException", "remaining() < count"); + _exception = 1; + _exceptionType = "java/lang/ArrayIndexOutOfBoundsException"; + _exceptionMessage = "remaining() < count < needed"; goto exit; } glDrawElements( @@ -678,6 +703,9 @@ exit: if (_array) { releasePointer(_env, _array, indices, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glEnable ( GLenum cap ) */ @@ -726,16 +754,23 @@ android_glFogf__IF static void android_glFogfv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -765,7 +800,9 @@ android_glFogfv__I_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -782,12 +819,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFogfv ( GLenum pname, const GLfloat *params ) */ static void android_glFogfv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -819,7 +862,9 @@ android_glFogfv__ILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glFogfv( @@ -831,6 +876,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFogx ( GLenum pname, GLfixed param ) */ @@ -847,16 +895,23 @@ android_glFogx__II static void android_glFogxv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -886,7 +941,9 @@ android_glFogxv__I_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -903,12 +960,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFogxv ( GLenum pname, const GLfixed *params ) */ static void android_glFogxv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -940,7 +1003,9 @@ android_glFogxv__ILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glFogxv( @@ -952,6 +1017,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFrontFace ( GLenum mode ) */ @@ -996,24 +1064,29 @@ static void android_glGenTextures__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *textures_base = (GLuint *) 0; jint _remaining; GLuint *textures = (GLuint *) 0; if (!textures_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "textures == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(textures_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } textures_base = (GLuint *) @@ -1030,6 +1103,9 @@ exit: _env->ReleasePrimitiveArrayCritical(textures_ref, textures_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenTextures ( GLsizei n, GLuint *textures ) */ @@ -1037,6 +1113,8 @@ static void android_glGenTextures__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject textures_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *textures = (GLuint *) 0; @@ -1044,7 +1122,8 @@ android_glGenTextures__ILjava_nio_IntBuffer_2 textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenTextures( @@ -1056,6 +1135,9 @@ exit: if (_array) { releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLenum glGetError ( void ) */ @@ -1072,18 +1154,22 @@ static void android_glGetIntegerv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1420,7 +1506,8 @@ android_glGetIntegerv__I_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLint *) @@ -1437,6 +1524,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetIntegerv ( GLenum pname, GLint *params ) */ @@ -1444,6 +1534,8 @@ static void android_glGetIntegerv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -1782,7 +1874,8 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetIntegerv( @@ -1794,6 +1887,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* const GLubyte * glGetString ( GLenum name ) */ @@ -1825,16 +1921,23 @@ android_glLightModelf__IF static void android_glLightModelfv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1855,7 +1958,9 @@ android_glLightModelfv__I_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -1872,12 +1977,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightModelfv ( GLenum pname, const GLfloat *params ) */ static void android_glLightModelfv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -1900,7 +2011,9 @@ android_glLightModelfv__ILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightModelfv( @@ -1912,6 +2025,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightModelx ( GLenum pname, GLfixed param ) */ @@ -1928,16 +2044,23 @@ android_glLightModelx__II static void android_glLightModelxv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -1958,7 +2081,9 @@ android_glLightModelxv__I_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -1975,12 +2100,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightModelxv ( GLenum pname, const GLfixed *params ) */ static void android_glLightModelxv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -2003,7 +2134,9 @@ android_glLightModelxv__ILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightModelxv( @@ -2015,6 +2148,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */ @@ -2032,16 +2168,23 @@ android_glLightf__IIF static void android_glLightfv__II_3FI (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2088,7 +2231,9 @@ android_glLightfv__II_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -2106,12 +2251,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */ static void android_glLightfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -2160,7 +2311,9 @@ android_glLightfv__IILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightfv( @@ -2173,6 +2326,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */ @@ -2190,16 +2346,23 @@ android_glLightx__III static void android_glLightxv__II_3II (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2246,7 +2409,9 @@ android_glLightxv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -2264,12 +2429,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */ static void android_glLightxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -2318,7 +2489,9 @@ android_glLightxv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glLightxv( @@ -2331,6 +2504,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLineWidth ( GLfloat width ) */ @@ -2362,16 +2538,23 @@ android_glLoadIdentity__ static void android_glLoadMatrixf___3FI (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *m_base = (GLfloat *) 0; jint _remaining; GLfloat *m = (GLfloat *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2388,6 +2571,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLoadMatrixf ( const GLfloat *m ) */ @@ -2411,16 +2597,23 @@ android_glLoadMatrixf__Ljava_nio_FloatBuffer_2 static void android_glLoadMatrixx___3II (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *m_base = (GLfixed *) 0; jint _remaining; GLfixed *m = (GLfixed *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2437,6 +2630,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLoadMatrixx ( const GLfixed *m ) */ @@ -2480,16 +2676,23 @@ android_glMaterialf__IIF static void android_glMaterialfv__II_3FI (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2522,7 +2725,9 @@ android_glMaterialfv__II_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -2540,12 +2745,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */ static void android_glMaterialfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -2580,7 +2791,9 @@ android_glMaterialfv__IILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glMaterialfv( @@ -2593,6 +2806,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */ @@ -2610,16 +2826,23 @@ android_glMaterialx__III static void android_glMaterialxv__II_3II (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -2652,7 +2875,9 @@ android_glMaterialxv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -2670,12 +2895,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */ static void android_glMaterialxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -2710,7 +2941,9 @@ android_glMaterialxv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glMaterialxv( @@ -2723,6 +2956,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMatrixMode ( GLenum mode ) */ @@ -2738,16 +2974,23 @@ android_glMatrixMode__I static void android_glMultMatrixf___3FI (JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *m_base = (GLfloat *) 0; jint _remaining; GLfloat *m = (GLfloat *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2764,6 +3007,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMultMatrixf ( const GLfloat *m ) */ @@ -2787,16 +3033,23 @@ android_glMultMatrixf__Ljava_nio_FloatBuffer_2 static void android_glMultMatrixx___3II (JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *m_base = (GLfixed *) 0; jint _remaining; GLfixed *m = (GLfixed *) 0; if (!m_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "m == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(m_ref) - offset; @@ -2813,6 +3066,9 @@ exit: _env->ReleasePrimitiveArrayCritical(m_ref, m_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glMultMatrixx ( const GLfixed *m ) */ @@ -2996,7 +3252,6 @@ android_glPushMatrix__ static void android_glReadPixels__IIIIIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLvoid *pixels = (GLvoid *) 0; @@ -3012,7 +3267,7 @@ android_glReadPixels__IIIIIILjava_nio_Buffer_2 (GLvoid *)pixels ); if (_array) { - releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, pixels, JNI_TRUE); } } @@ -3172,16 +3427,23 @@ android_glTexEnvf__IIF static void android_glTexEnvfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3208,7 +3470,9 @@ android_glTexEnvfv__II_3FI break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -3226,12 +3490,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */ static void android_glTexEnvfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -3260,7 +3530,9 @@ android_glTexEnvfv__IILjava_nio_FloatBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glTexEnvfv( @@ -3273,6 +3545,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */ @@ -3290,16 +3565,23 @@ android_glTexEnvx__III static void android_glTexEnvxv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -3326,7 +3608,9 @@ android_glTexEnvxv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -3344,12 +3628,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */ static void android_glTexEnvxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -3378,7 +3668,9 @@ android_glTexEnvxv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glTexEnvxv( @@ -3391,6 +3683,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */ @@ -3531,6 +3826,8 @@ static jint android_glQueryMatrixxOES___3II_3II (JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLbitfield _returnValue = -1; GLfixed *mantissa_base = (GLfixed *) 0; jint _mantissaRemaining; @@ -3541,18 +3838,21 @@ android_glQueryMatrixxOES___3II_3II if (!mantissa_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissa == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "mantissa == null"; goto exit; } if (mantissaOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissaOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "mantissaOffset < 0"; goto exit; } _mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset; if (_mantissaRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - mantissaOffset < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - mantissaOffset < 16 < needed"; goto exit; } mantissa_base = (GLfixed *) @@ -3561,18 +3861,21 @@ android_glQueryMatrixxOES___3II_3II if (!exponent_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "exponent == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "exponent == null"; goto exit; } if (exponentOffset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "exponentOffset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "exponentOffset < 0"; goto exit; } _exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset; if (_exponentRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - exponentOffset < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - exponentOffset < 16 < needed"; goto exit; } exponent_base = (GLint *) @@ -3593,6 +3896,9 @@ exit: _env->ReleasePrimitiveArrayCritical(mantissa_ref, mantissa_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } return _returnValue; } @@ -3601,6 +3907,8 @@ static jint android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _mantissaArray = (jarray) 0; jarray _exponentArray = (jarray) 0; GLbitfield _returnValue = -1; @@ -3612,13 +3920,15 @@ android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining); if (_mantissaRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 16 < needed"; goto exit; } exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining); if (_exponentRemaining < 16) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 16 < needed"; goto exit; } _returnValue = glQueryMatrixxOES( @@ -3633,6 +3943,9 @@ exit: if (_exponentArray) { releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } return _returnValue; } @@ -3650,6 +3963,9 @@ android_glBindBuffer__II static void android_glBufferData__IILjava_nio_Buffer_2I (JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *data = (GLvoid *) 0; @@ -3657,7 +3973,9 @@ android_glBufferData__IILjava_nio_Buffer_2I if (data_buf) { data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); if (_remaining < size) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < size < needed"; goto exit; } } @@ -3672,19 +3990,27 @@ exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */ static void android_glBufferSubData__IIILjava_nio_Buffer_2 (JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLvoid *data = (GLvoid *) 0; data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining); if (_remaining < size) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < size < needed"; goto exit; } glBufferSubData( @@ -3698,27 +4024,39 @@ exit: if (_array) { releasePointer(_env, _array, data, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */ static void android_glClipPlanef__I_3FI (JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *equation_base = (GLfloat *) 0; jint _remaining; GLfloat *equation = (GLfloat *) 0; if (!equation_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "equation == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(equation_ref) - offset; if (_remaining < 4) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 4 < needed"; goto exit; } equation_base = (GLfloat *) @@ -3735,19 +4073,27 @@ exit: _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */ static void android_glClipPlanef__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *equation = (GLfloat *) 0; equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining); if (_remaining < 4) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 4 < needed"; goto exit; } glClipPlanef( @@ -3759,27 +4105,39 @@ exit: if (_array) { releasePointer(_env, _array, equation, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */ static void android_glClipPlanex__I_3II (JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *equation_base = (GLfixed *) 0; jint _remaining; GLfixed *equation = (GLfixed *) 0; if (!equation_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "equation == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(equation_ref) - offset; if (_remaining < 4) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 4 < needed"; goto exit; } equation_base = (GLfixed *) @@ -3796,19 +4154,27 @@ exit: _env->ReleasePrimitiveArrayCritical(equation_ref, equation_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */ static void android_glClipPlanex__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *equation = (GLfixed *) 0; equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining); if (_remaining < 4) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 4 < needed"; goto exit; } glClipPlanex( @@ -3820,6 +4186,9 @@ exit: if (_array) { releasePointer(_env, _array, equation, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */ @@ -3850,21 +4219,30 @@ android_glColorPointer__IIII static void android_glDeleteBuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *buffers_base = (GLuint *) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; if (!buffers_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "buffers == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(buffers_ref) - offset; if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } buffers_base = (GLuint *) @@ -3881,19 +4259,27 @@ exit: _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */ static void android_glDeleteBuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); if (_remaining < n) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteBuffers( @@ -3905,18 +4291,27 @@ exit: if (_array) { releasePointer(_env, _array, buffers, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */ static void android_glDrawElements__IIII (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; glDrawElements( (GLenum)mode, (GLsizei)count, (GLenum)type, (const GLvoid *)offset ); + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ @@ -3924,24 +4319,29 @@ static void android_glGenBuffers__I_3II (JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *buffers_base = (GLuint *) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; if (!buffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "buffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(buffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } buffers_base = (GLuint *) @@ -3958,6 +4358,9 @@ exit: _env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenBuffers ( GLsizei n, GLuint *buffers ) */ @@ -3965,6 +4368,8 @@ static void android_glGenBuffers__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *buffers = (GLuint *) 0; @@ -3972,7 +4377,8 @@ android_glGenBuffers__ILjava_nio_IntBuffer_2 buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenBuffers( @@ -3984,6 +4390,9 @@ exit: if (_array) { releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ @@ -3991,18 +4400,22 @@ static void android_glGetBooleanv__I_3ZI (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLboolean *params_base = (GLboolean *) 0; jint _remaining; GLboolean *params = (GLboolean *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4020,13 +4433,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ static void android_glGetBooleanv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLboolean *params = (GLboolean *) 0; @@ -4037,7 +4452,7 @@ android_glGetBooleanv__ILjava_nio_IntBuffer_2 (GLboolean *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -4062,18 +4477,22 @@ static void android_glGetClipPlanef__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *eqn_base = (GLfloat *) 0; jint _remaining; GLfloat *eqn = (GLfloat *) 0; if (!eqn_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "eqn == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(eqn_ref) - offset; @@ -4091,13 +4510,15 @@ exit: _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */ static void android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *eqn = (GLfloat *) 0; @@ -4108,7 +4529,7 @@ android_glGetClipPlanef__ILjava_nio_FloatBuffer_2 (GLfloat *)eqn ); if (_array) { - releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, eqn, JNI_TRUE); } } @@ -4117,18 +4538,22 @@ static void android_glGetClipPlanex__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *eqn_base = (GLfixed *) 0; jint _remaining; GLfixed *eqn = (GLfixed *) 0; if (!eqn_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "eqn == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(eqn_ref) - offset; @@ -4146,13 +4571,15 @@ exit: _env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */ static void android_glGetClipPlanex__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *eqn = (GLfixed *) 0; @@ -4163,7 +4590,7 @@ android_glGetClipPlanex__ILjava_nio_IntBuffer_2 (GLfixed *)eqn ); if (_array) { - releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, eqn, JNI_TRUE); } } @@ -4172,18 +4599,22 @@ static void android_glGetFixedv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4201,13 +4632,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFixedv ( GLenum pname, GLfixed *params ) */ static void android_glGetFixedv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -4218,7 +4651,7 @@ android_glGetFixedv__ILjava_nio_IntBuffer_2 (GLfixed *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -4227,18 +4660,22 @@ static void android_glGetFloatv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4256,13 +4693,15 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFloatv ( GLenum pname, GLfloat *params ) */ static void android_glGetFloatv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -4273,7 +4712,7 @@ android_glGetFloatv__ILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -4282,18 +4721,22 @@ static void android_glGetLightfv__II_3FI (JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4341,7 +4784,8 @@ android_glGetLightfv__II_3FI } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -4359,6 +4803,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */ @@ -4366,6 +4813,8 @@ static void android_glGetLightfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -4415,7 +4864,8 @@ android_glGetLightfv__IILjava_nio_FloatBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetLightfv( @@ -4428,6 +4878,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */ @@ -4435,18 +4888,22 @@ static void android_glGetLightxv__II_3II (JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4494,7 +4951,8 @@ android_glGetLightxv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -4512,6 +4970,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */ @@ -4519,6 +4980,8 @@ static void android_glGetLightxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -4568,7 +5031,8 @@ android_glGetLightxv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetLightxv( @@ -4581,6 +5045,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */ @@ -4588,18 +5055,22 @@ static void android_glGetMaterialfv__II_3FI (JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4633,7 +5104,8 @@ android_glGetMaterialfv__II_3FI } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfloat *) @@ -4651,6 +5123,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */ @@ -4658,6 +5133,8 @@ static void android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -4693,7 +5170,8 @@ android_glGetMaterialfv__IILjava_nio_FloatBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetMaterialfv( @@ -4706,6 +5184,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */ @@ -4713,18 +5194,22 @@ static void android_glGetMaterialxv__II_3II (JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4758,7 +5243,8 @@ android_glGetMaterialxv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -4776,6 +5262,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */ @@ -4783,6 +5272,8 @@ static void android_glGetMaterialxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -4818,7 +5309,8 @@ android_glGetMaterialxv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetMaterialxv( @@ -4831,6 +5323,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */ @@ -4838,18 +5333,22 @@ static void android_glGetTexEnviv__II_3II (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4877,7 +5376,8 @@ android_glGetTexEnviv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLint *) @@ -4895,6 +5395,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */ @@ -4902,6 +5405,8 @@ static void android_glGetTexEnviv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -4931,7 +5436,8 @@ android_glGetTexEnviv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetTexEnviv( @@ -4944,6 +5450,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */ @@ -4951,18 +5460,22 @@ static void android_glGetTexEnvxv__II_3II (JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -4990,7 +5503,8 @@ android_glGetTexEnvxv__II_3II } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLfixed *) @@ -5008,6 +5522,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */ @@ -5015,6 +5532,8 @@ static void android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -5044,7 +5563,8 @@ android_glGetTexEnvxv__IILjava_nio_IntBuffer_2 } if (_remaining < _needed) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glGetTexEnvxv( @@ -5057,6 +5577,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ @@ -5064,24 +5587,29 @@ static void android_glGetTexParameterfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -5099,6 +5627,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */ @@ -5106,6 +5637,8 @@ static void android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -5113,7 +5646,8 @@ android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2 params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameterfv( @@ -5126,6 +5660,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -5133,24 +5670,29 @@ static void android_glGetTexParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -5168,6 +5710,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */ @@ -5175,6 +5720,8 @@ static void android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -5182,7 +5729,8 @@ android_glGetTexParameteriv__IILjava_nio_IntBuffer_2 params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameteriv( @@ -5195,6 +5743,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */ @@ -5202,24 +5753,29 @@ static void android_glGetTexParameterxv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfixed *) @@ -5237,6 +5793,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */ @@ -5244,6 +5803,8 @@ static void android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; @@ -5251,7 +5812,8 @@ android_glGetTexParameterxv__IILjava_nio_IntBuffer_2 params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glGetTexParameterxv( @@ -5264,6 +5826,9 @@ exit: if (_array) { releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* GLboolean glIsBuffer ( GLuint buffer ) */ @@ -5324,21 +5889,30 @@ android_glPointParameterf__IF static void android_glPointParameterfv__I_3FI (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -5355,19 +5929,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */ static void android_glPointParameterfv__ILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glPointParameterfv( @@ -5379,6 +5961,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointParameterx ( GLenum pname, GLfixed param ) */ @@ -5395,21 +5980,30 @@ android_glPointParameterx__II static void android_glPointParameterxv__I_3II (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfixed *) @@ -5426,19 +6020,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */ static void android_glPointParameterxv__ILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glPointParameterxv( @@ -5450,6 +6052,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */ @@ -5501,16 +6106,23 @@ android_glTexEnvi__III static void android_glTexEnviv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -5537,7 +6149,9 @@ android_glTexEnviv__II_3II break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; goto exit; } params_base = (GLint *) @@ -5555,12 +6169,18 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */ static void android_glTexEnviv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -5589,7 +6209,9 @@ android_glTexEnviv__IILjava_nio_IntBuffer_2 break; } if (_remaining < _needed) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; goto exit; } glTexEnviv( @@ -5602,27 +6224,39 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ static void android_glTexParameterfv__II_3FI (JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfloat *) @@ -5640,19 +6274,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */ static void android_glTexParameterfv__IILjava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameterfv( @@ -5665,6 +6307,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */ @@ -5682,21 +6327,30 @@ android_glTexParameteri__III static void android_glTexParameteriv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLint *) @@ -5714,19 +6368,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */ static void android_glTexParameteriv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameteriv( @@ -5739,27 +6401,39 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */ static void android_glTexParameterxv__II_3II (JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *params_base = (GLfixed *) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; if (!params_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 1 < needed"; goto exit; } params_base = (GLfixed *) @@ -5777,19 +6451,27 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */ static void android_glTexParameterxv__IILjava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *params = (GLfixed *) 0; params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining); if (_remaining < 1) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 1 < needed"; goto exit; } glTexParameterxv( @@ -5802,6 +6484,9 @@ exit: if (_array) { releasePointer(_env, _array, params, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */ @@ -5842,21 +6527,30 @@ android_glDrawTexfOES__FFFFF static void android_glDrawTexfvOES___3FI (JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *coords_base = (GLfloat *) 0; jint _remaining; GLfloat *coords = (GLfloat *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLfloat *) @@ -5872,19 +6566,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexfvOES ( const GLfloat *coords ) */ static void android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfloat *coords = (GLfloat *) 0; coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexfvOES( @@ -5895,6 +6597,9 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */ @@ -5914,21 +6619,30 @@ android_glDrawTexiOES__IIIII static void android_glDrawTexivOES___3II (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *coords_base = (GLint *) 0; jint _remaining; GLint *coords = (GLint *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLint *) @@ -5944,19 +6658,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexivOES ( const GLint *coords ) */ static void android_glDrawTexivOES__Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLint *coords = (GLint *) 0; coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexivOES( @@ -5967,6 +6689,9 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */ @@ -5986,21 +6711,30 @@ android_glDrawTexsOES__SSSSS static void android_glDrawTexsvOES___3SI (JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLshort *coords_base = (GLshort *) 0; jint _remaining; GLshort *coords = (GLshort *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLshort *) @@ -6016,19 +6750,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexsvOES ( const GLshort *coords ) */ static void android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLshort *coords = (GLshort *) 0; coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexsvOES( @@ -6039,6 +6781,9 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */ @@ -6058,21 +6803,30 @@ android_glDrawTexxOES__IIIII static void android_glDrawTexxvOES___3II (JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfixed *coords_base = (GLfixed *) 0; jint _remaining; GLfixed *coords = (GLfixed *) 0; if (!coords_ref) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "coords == null"; goto exit; } if (offset < 0) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(coords_ref) - offset; if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < 5 < needed"; goto exit; } coords_base = (GLfixed *) @@ -6088,19 +6842,27 @@ exit: _env->ReleasePrimitiveArrayCritical(coords_ref, coords_base, JNI_ABORT); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDrawTexxvOES ( const GLfixed *coords ) */ static void android_glDrawTexxvOES__Ljava_nio_IntBuffer_2 (JNIEnv *_env, jobject _this, jobject coords_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLfixed *coords = (GLfixed *) 0; coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining); if (_remaining < 5) { - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5"); + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < 5 < needed"; goto exit; } glDrawTexxvOES( @@ -6111,6 +6873,9 @@ exit: if (_array) { releasePointer(_env, _array, coords, JNI_FALSE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glLoadPaletteFromModelViewMatrixOES ( void ) */ @@ -6273,7 +7038,7 @@ android_glCheckFramebufferStatusOES__I if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { jniThrowException(_env, "java/lang/UnsupportedOperationException", "glCheckFramebufferStatusOES"); - return 0; + return 0; } GLint _returnValue = 0; _returnValue = glCheckFramebufferStatusOES( @@ -6292,24 +7057,29 @@ android_glDeleteFramebuffersOES__I_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *framebuffers_base = (GLuint *) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; if (!framebuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "framebuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(framebuffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } framebuffers_base = (GLuint *) @@ -6326,6 +7096,9 @@ exit: _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */ @@ -6338,6 +7111,8 @@ android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; @@ -6345,7 +7120,8 @@ android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteFramebuffersOES( @@ -6357,6 +7133,9 @@ exit: if (_array) { releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ @@ -6369,24 +7148,29 @@ android_glDeleteRenderbuffersOES__I_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *renderbuffers_base = (GLuint *) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; if (!renderbuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "renderbuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } renderbuffers_base = (GLuint *) @@ -6403,6 +7187,9 @@ exit: _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ @@ -6415,6 +7202,8 @@ android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; @@ -6422,7 +7211,8 @@ android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glDeleteRenderbuffersOES( @@ -6434,6 +7224,9 @@ exit: if (_array) { releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */ @@ -6495,24 +7288,29 @@ android_glGenFramebuffersOES__I_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *framebuffers_base = (GLuint *) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; if (!framebuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "framebuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(framebuffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } framebuffers_base = (GLuint *) @@ -6529,6 +7327,9 @@ exit: _env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */ @@ -6541,6 +7342,8 @@ android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *framebuffers = (GLuint *) 0; @@ -6548,7 +7351,8 @@ android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2 framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenFramebuffersOES( @@ -6560,6 +7364,9 @@ exit: if (_array) { releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ @@ -6572,24 +7379,29 @@ android_glGenRenderbuffersOES__I_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLuint *renderbuffers_base = (GLuint *) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; if (!renderbuffers_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "renderbuffers == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(renderbuffers_ref) - offset; if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < n < needed"; goto exit; } renderbuffers_base = (GLuint *) @@ -6606,6 +7418,9 @@ exit: _env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */ @@ -6618,6 +7433,8 @@ android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; jarray _array = (jarray) 0; jint _remaining; GLuint *renderbuffers = (GLuint *) 0; @@ -6625,7 +7442,8 @@ android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2 renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining); if (_remaining < n) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < n < needed"; goto exit; } glGenRenderbuffersOES( @@ -6637,6 +7455,9 @@ exit: if (_array) { releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */ @@ -6649,18 +7470,22 @@ android_glGetFramebufferAttachmentParameterivOES__III_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -6680,6 +7505,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */ @@ -6691,7 +7519,6 @@ android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 "glGetFramebufferAttachmentParameterivOES"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -6704,7 +7531,7 @@ android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -6718,18 +7545,22 @@ android_glGetRenderbufferParameterivOES__II_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -6748,6 +7579,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */ @@ -6759,7 +7593,6 @@ android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 "glGetRenderbufferParameterivOES"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -6771,7 +7604,7 @@ android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -6785,18 +7618,22 @@ android_glGetTexGenfv__II_3FI return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -6815,6 +7652,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */ @@ -6826,7 +7666,6 @@ android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 "glGetTexGenfv"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -6838,7 +7677,7 @@ android_glGetTexGenfv__IILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -6852,18 +7691,22 @@ android_glGetTexGeniv__II_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -6882,6 +7725,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */ @@ -6893,7 +7739,6 @@ android_glGetTexGeniv__IILjava_nio_IntBuffer_2 "glGetTexGeniv"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -6905,7 +7750,7 @@ android_glGetTexGeniv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -6919,18 +7764,22 @@ android_glGetTexGenxv__II_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -6949,6 +7798,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */ @@ -6960,7 +7812,6 @@ android_glGetTexGenxv__IILjava_nio_IntBuffer_2 "glGetTexGenxv"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -6972,7 +7823,7 @@ android_glGetTexGenxv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -6983,7 +7834,7 @@ android_glIsFramebufferOES__I if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { jniThrowException(_env, "java/lang/UnsupportedOperationException", "glIsFramebufferOES"); - return JNI_FALSE; + return JNI_FALSE; } GLboolean _returnValue = JNI_FALSE; _returnValue = glIsFramebufferOES( @@ -6999,7 +7850,7 @@ android_glIsRenderbufferOES__I if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) { jniThrowException(_env, "java/lang/UnsupportedOperationException", "glIsRenderbufferOES"); - return JNI_FALSE; + return JNI_FALSE; } GLboolean _returnValue = JNI_FALSE; _returnValue = glIsRenderbufferOES( @@ -7051,18 +7902,22 @@ android_glTexGenfv__II_3FI return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLfloat *params_base = (GLfloat *) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -7081,6 +7936,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */ @@ -7092,7 +7950,6 @@ android_glTexGenfv__IILjava_nio_FloatBuffer_2 "glTexGenfv"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLfloat *params = (GLfloat *) 0; @@ -7104,7 +7961,7 @@ android_glTexGenfv__IILjava_nio_FloatBuffer_2 (GLfloat *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -7134,18 +7991,22 @@ android_glTexGeniv__II_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -7164,6 +8025,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */ @@ -7175,7 +8039,6 @@ android_glTexGeniv__IILjava_nio_IntBuffer_2 "glTexGeniv"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -7187,7 +8050,7 @@ android_glTexGeniv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } @@ -7217,18 +8080,22 @@ android_glTexGenxv__II_3II return; } jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; GLint *params_base = (GLint *) 0; jint _remaining; GLint *params = (GLint *) 0; if (!params_ref) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; goto exit; } if (offset < 0) { _exception = 1; - jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0"); + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; goto exit; } _remaining = _env->GetArrayLength(params_ref) - offset; @@ -7247,6 +8114,9 @@ exit: _env->ReleasePrimitiveArrayCritical(params_ref, params_base, _exception ? JNI_ABORT: 0); } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } } /* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */ @@ -7258,7 +8128,6 @@ android_glTexGenxv__IILjava_nio_IntBuffer_2 "glTexGenxv"); return; } - jint _exception = 0; jarray _array = (jarray) 0; jint _remaining; GLint *params = (GLint *) 0; @@ -7270,7 +8139,7 @@ android_glTexGenxv__IILjava_nio_IntBuffer_2 (GLint *)params ); if (_array) { - releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + releasePointer(_env, _array, params, JNI_TRUE); } } |