Add null checks for *Buffer params

This change prevents crashes in native layers and throws an exception
instead.

Bug: 25695785
Test: CtsGraphicsTestCases
Change-Id: I0b4115e001099f579f53e47fa5cb9c851c6dabdb
This commit is contained in:
Romain Guy
2016-12-05 12:26:02 -08:00
parent e9bf7c8436
commit 84cac20dfd
10 changed files with 3247 additions and 69 deletions

View File

@@ -600,6 +600,9 @@ android_glColorMask__ZZZZ
static void
android_glColorPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -618,17 +621,29 @@ android_glColorPointerBounds__IIILjava_nio_Buffer_2I
(GLvoid *)pointer,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) */
static void
android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (!data_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (data == NULL) {
char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -644,20 +659,34 @@ android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
(GLsizei)imageSize,
(GLvoid *)data
);
exit:
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */
static void
android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (!data_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (data == NULL) {
char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -674,9 +703,14 @@ android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(GLsizei)imageSize,
(GLvoid *)data
);
exit:
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */
@@ -781,6 +815,12 @@ android_glDeleteTextures__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "textures == null";
goto exit;
}
textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -885,6 +925,12 @@ android_glDrawElements__IIILjava_nio_Buffer_2
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
if (!indices_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "indices == null";
goto exit;
}
indices = (GLvoid *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
@@ -1026,6 +1072,12 @@ android_glFogfv__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1144,6 +1196,12 @@ android_glFogxv__ILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1278,6 +1336,12 @@ android_glGenTextures__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "textures == null";
goto exit;
}
textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1424,6 +1488,12 @@ android_glLightModelfv__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1542,6 +1612,12 @@ android_glLightModelxv__ILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1676,6 +1752,12 @@ android_glLightfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1825,6 +1907,12 @@ android_glLightxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1947,11 +2035,20 @@ exit:
static void
android_glLoadMatrixf__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jfloatArray _array = (jfloatArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
if (!m_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "m == null";
goto exit;
}
m = (GLfloat *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (m == NULL) {
char * _mBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
@@ -1960,9 +2057,14 @@ android_glLoadMatrixf__Ljava_nio_FloatBuffer_2
glLoadMatrixf(
(GLfloat *)m
);
exit:
if (_array) {
_env->ReleaseFloatArrayElements(_array, (jfloat*)m, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glLoadMatrixx ( const GLfixed *m ) */
@@ -2011,11 +2113,20 @@ exit:
static void
android_glLoadMatrixx__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "m == null";
goto exit;
}
m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (m == NULL) {
char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -2024,9 +2135,14 @@ android_glLoadMatrixx__Ljava_nio_IntBuffer_2
glLoadMatrixx(
(GLfixed *)m
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glLogicOp ( GLenum opcode ) */
@@ -2134,6 +2250,12 @@ android_glMaterialfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -2279,6 +2401,12 @@ android_glMaterialxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -2383,11 +2511,20 @@ exit:
static void
android_glMultMatrixf__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jfloatArray _array = (jfloatArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
if (!m_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "m == null";
goto exit;
}
m = (GLfloat *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (m == NULL) {
char * _mBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
@@ -2396,9 +2533,14 @@ android_glMultMatrixf__Ljava_nio_FloatBuffer_2
glMultMatrixf(
(GLfloat *)m
);
exit:
if (_array) {
_env->ReleaseFloatArrayElements(_array, (jfloat*)m, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glMultMatrixx ( const GLfixed *m ) */
@@ -2447,11 +2589,20 @@ exit:
static void
android_glMultMatrixx__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "m == null";
goto exit;
}
m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (m == NULL) {
char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -2460,9 +2611,14 @@ android_glMultMatrixx__Ljava_nio_IntBuffer_2
glMultMatrixx(
(GLfixed *)m
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) */
@@ -2517,6 +2673,9 @@ android_glNormal3x__III
static void
android_glNormalPointerBounds__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2534,6 +2693,9 @@ android_glNormalPointerBounds__IILjava_nio_Buffer_2I
(GLvoid *)pointer,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) */
@@ -2630,11 +2792,20 @@ 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;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (!pixels_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "pixels == null";
goto exit;
}
pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (pixels == NULL) {
char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -2649,8 +2820,13 @@ android_glReadPixels__IIIIIILjava_nio_Buffer_2
(GLenum)type,
(GLvoid *)pixels
);
exit:
if (_array) {
releasePointer(_env, _array, pixels, JNI_TRUE);
releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -2776,6 +2952,9 @@ android_glStencilOp__III
static void
android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2794,6 +2973,9 @@ android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
(GLvoid *)pointer,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexEnvf ( GLenum target, GLenum pname, GLfloat param ) */
@@ -2880,6 +3062,12 @@ android_glTexEnvfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -3001,6 +3189,12 @@ android_glTexEnvxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -3042,6 +3236,9 @@ exit:
static void
android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -3068,6 +3265,9 @@ android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
if (_array) {
releasePointer(_env, _array, pixels, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
@@ -3096,6 +3296,9 @@ android_glTexParameterx__III
static void
android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -3122,6 +3325,9 @@ android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
if (_array) {
releasePointer(_env, _array, pixels, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTranslatef ( GLfloat x, GLfloat y, GLfloat z ) */
@@ -3150,6 +3356,9 @@ android_glTranslatex__III
static void
android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -3168,6 +3377,9 @@ android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
(GLvoid *)pointer,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */

View File

@@ -540,6 +540,12 @@ android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
jint _exponentRemaining;
GLint *exponent = (GLint *) 0;
if (!mantissa_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "mantissa == null";
goto exit;
}
mantissa = (GLfixed *)getPointer(_env, mantissa_buf, (jarray*)&_mantissaArray, &_mantissaRemaining, &_mantissaBufferOffset);
if (_mantissaRemaining < 16) {
_exception = 1;
@@ -547,6 +553,12 @@ android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
_exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
if (!exponent_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "exponent == null";
goto exit;
}
exponent = (GLint *)getPointer(_env, exponent_buf, (jarray*)&_exponentArray, &_exponentRemaining, &_exponentBufferOffset);
if (_exponentRemaining < 16) {
_exception = 1;

View File

@@ -505,6 +505,12 @@ android_glBufferSubData__IIILjava_nio_Buffer_2
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (!data_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
@@ -587,6 +593,12 @@ android_glClipPlanef__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
if (!equation_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "equation == null";
goto exit;
}
equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (equation == NULL) {
char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
@@ -596,6 +608,8 @@ android_glClipPlanef__ILjava_nio_FloatBuffer_2
(GLenum)plane,
(GLfloat *)equation
);
exit:
if (_array) {
_env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
}
@@ -659,6 +673,12 @@ android_glClipPlanex__ILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
if (!equation_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "equation == null";
goto exit;
}
equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (equation == NULL) {
char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -668,6 +688,8 @@ android_glClipPlanex__ILjava_nio_IntBuffer_2
(GLenum)plane,
(GLfixed *)equation
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
}
@@ -761,6 +783,12 @@ android_glDeleteBuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "buffers == null";
goto exit;
}
buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -865,6 +893,12 @@ android_glGenBuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "buffers == null";
goto exit;
}
buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -967,6 +1001,12 @@ android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -1054,6 +1094,12 @@ android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
if (!eqn_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "eqn == null";
goto exit;
}
eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
@@ -1140,6 +1186,12 @@ android_glGetClipPlanex__ILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
if (!eqn_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "eqn == null";
goto exit;
}
eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
@@ -1212,11 +1264,20 @@ exit:
static void
android_glGetFixedv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1226,8 +1287,13 @@ android_glGetFixedv__ILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1333,6 +1399,12 @@ android_glGetLightfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1471,6 +1543,12 @@ android_glGetLightxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1607,6 +1685,12 @@ android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1741,6 +1825,12 @@ android_glGetMaterialxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1863,6 +1953,12 @@ android_glGetTexEnvfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -1973,6 +2069,12 @@ android_glGetTexEnviv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -2083,6 +2185,12 @@ android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -2182,6 +2290,12 @@ android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2270,6 +2384,12 @@ android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2358,6 +2478,12 @@ android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2499,6 +2625,12 @@ android_glPointParameterfv__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2595,6 +2727,12 @@ android_glPointParameterxv__ILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2624,6 +2762,9 @@ exit:
static void
android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2641,6 +2782,9 @@ android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I
(GLvoid *)pointer,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
@@ -2739,6 +2883,12 @@ android_glTexEnviv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -2838,6 +2988,12 @@ android_glTexParameterfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2937,6 +3093,12 @@ android_glTexParameteriv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -3025,6 +3187,12 @@ android_glTexParameterxv__IILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;

View File

@@ -572,6 +572,12 @@ android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
jint _remaining;
GLshort *coords = (GLshort *) 0;
if (!coords_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "coords == null";
goto exit;
}
coords = (GLshort *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
@@ -656,6 +662,12 @@ android_glDrawTexivOES__Ljava_nio_IntBuffer_2
jint _remaining;
GLint *coords = (GLint *) 0;
if (!coords_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "coords == null";
goto exit;
}
coords = (GLint *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
@@ -740,6 +752,12 @@ android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
if (!coords_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "coords == null";
goto exit;
}
coords = (GLfixed *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
@@ -837,6 +855,12 @@ android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
if (!coords_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "coords == null";
goto exit;
}
coords = (GLfloat *)getPointer(_env, coords_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
@@ -865,11 +889,20 @@ exit:
static void
android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLeglImageOES image = (GLeglImageOES) 0;
if (!image_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "image == null";
goto exit;
}
image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (image == NULL) {
char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -879,8 +912,13 @@ android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
(GLenum)target,
(GLeglImageOES)image
);
exit:
if (_array) {
releasePointer(_env, _array, image, JNI_TRUE);
releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -888,11 +926,20 @@ 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;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLeglImageOES image = (GLeglImageOES) 0;
if (!image_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "image == null";
goto exit;
}
image = (GLeglImageOES)getPointer(_env, image_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (image == NULL) {
char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -902,8 +949,13 @@ android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
(GLenum)target,
(GLeglImageOES)image
);
exit:
if (_array) {
releasePointer(_env, _array, image, JNI_TRUE);
releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -985,11 +1037,20 @@ exit:
static void
android_glClipPlanexOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
if (!equation_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "equation == null";
goto exit;
}
equation = (GLfixed *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (equation == NULL) {
char * _equationBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -999,9 +1060,14 @@ android_glClipPlanexOES__ILjava_nio_IntBuffer_2
(GLenum)plane,
(GLfixed *)equation
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)equation, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) */
@@ -1083,11 +1149,20 @@ exit:
static void
android_glFogxvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1097,9 +1172,14 @@ android_glFogxvOES__ILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) */
@@ -1177,6 +1257,12 @@ android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
if (!eqn_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "eqn == null";
goto exit;
}
eqn = (GLfixed *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
@@ -1249,11 +1335,20 @@ exit:
static void
android_glGetFixedvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1263,8 +1358,13 @@ android_glGetFixedvOES__ILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1316,11 +1416,20 @@ exit:
static void
android_glGetLightxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1331,8 +1440,13 @@ android_glGetLightxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1384,11 +1498,20 @@ exit:
static void
android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1399,8 +1522,13 @@ android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1452,11 +1580,20 @@ exit:
static void
android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1467,8 +1604,13 @@ android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1520,11 +1662,20 @@ exit:
static void
android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1535,8 +1686,13 @@ android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1597,11 +1753,20 @@ exit:
static void
android_glLightModelxvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1611,9 +1776,14 @@ android_glLightModelxvOES__ILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glLightxOES ( GLenum light, GLenum pname, GLfixed param ) */
@@ -1675,11 +1845,20 @@ exit:
static void
android_glLightxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1690,9 +1869,14 @@ android_glLightxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glLineWidthxOES ( GLfixed width ) */
@@ -1750,11 +1934,20 @@ exit:
static void
android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "m == null";
goto exit;
}
m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (m == NULL) {
char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1763,9 +1956,14 @@ android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
glLoadMatrixxOES(
(GLfixed *)m
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param ) */
@@ -1827,11 +2025,20 @@ exit:
static void
android_glMaterialxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1842,9 +2049,14 @@ android_glMaterialxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glMultMatrixxOES ( const GLfixed *m ) */
@@ -1893,11 +2105,20 @@ exit:
static void
android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "m == null";
goto exit;
}
m = (GLfixed *)getPointer(_env, m_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (m == NULL) {
char * _mBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1906,9 +2127,14 @@ android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
glMultMatrixxOES(
(GLfixed *)m
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)m, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) */
@@ -2006,11 +2232,20 @@ exit:
static void
android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -2020,9 +2255,14 @@ android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glPointSizexOES ( GLfixed size ) */
@@ -2136,11 +2376,20 @@ exit:
static void
android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -2151,9 +2400,14 @@ android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param ) */
@@ -2215,11 +2469,20 @@ exit:
static void
android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -2230,9 +2493,14 @@ android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z ) */
@@ -2328,6 +2596,12 @@ android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "renderbuffers == null";
goto exit;
}
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -2414,6 +2688,12 @@ android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "renderbuffers == null";
goto exit;
}
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -2513,6 +2793,12 @@ android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2621,6 +2907,12 @@ android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "framebuffers == null";
goto exit;
}
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -2707,6 +2999,12 @@ android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "framebuffers == null";
goto exit;
}
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -2831,6 +3129,12 @@ android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2887,6 +3191,9 @@ android_glLoadPaletteFromModelViewMatrixOES__
static void
android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2905,12 +3212,18 @@ android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
(GLvoid *)pointer,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
static void
android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -2929,6 +3242,9 @@ android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
(GLvoid *)pointer,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) */
@@ -3016,11 +3332,20 @@ exit:
static void
android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jfloatArray _array = (jfloatArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
if (!equation_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "equation == null";
goto exit;
}
equation = (GLfloat *)getPointer(_env, equation_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (equation == NULL) {
char * _equationBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
@@ -3030,9 +3355,14 @@ android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
(GLenum)plane,
(GLfloat *)equation
);
exit:
if (_array) {
_env->ReleaseFloatArrayElements(_array, (jfloat*)equation, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
@@ -3096,6 +3426,12 @@ android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
if (!eqn_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "eqn == null";
goto exit;
}
eqn = (GLfloat *)getPointer(_env, eqn_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
@@ -3189,11 +3525,20 @@ exit:
static void
android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jfloatArray _array = (jfloatArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
@@ -3204,9 +3549,14 @@ android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
(GLenum)pname,
(GLfloat *)params
);
exit:
if (_array) {
_env->ReleaseFloatArrayElements(_array, (jfloat*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexGeniOES ( GLenum coord, GLenum pname, GLint param ) */
@@ -3268,11 +3618,20 @@ exit:
static void
android_glTexGenivOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -3283,9 +3642,14 @@ android_glTexGenivOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param ) */
@@ -3347,11 +3711,20 @@ exit:
static void
android_glTexGenxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -3362,9 +3735,14 @@ android_glTexGenxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
@@ -3415,11 +3793,20 @@ exit:
static void
android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jfloatArray _array = (jfloatArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetFloatArrayElements(_array, (jboolean *) 0);
@@ -3430,8 +3817,13 @@ android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
(GLenum)pname,
(GLfloat *)params
);
exit:
if (_array) {
_env->ReleaseFloatArrayElements(_array, (jfloat*)params, 0);
_env->ReleaseFloatArrayElements(_array, (jfloat*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -3483,11 +3875,20 @@ exit:
static void
android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -3498,8 +3899,13 @@ android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -3551,11 +3957,20 @@ exit:
static void
android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfixed *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -3566,8 +3981,13 @@ android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLfixed *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}

View File

@@ -640,6 +640,12 @@ android_glBufferSubData__IIILjava_nio_Buffer_2
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (!data_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
@@ -742,11 +748,20 @@ android_glCompileShader__I
static void
android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (!data_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (data == NULL) {
char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -762,20 +777,34 @@ android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
(GLsizei)imageSize,
(GLvoid *)data
);
exit:
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) */
static void
android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (!data_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
data = (GLvoid *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (data == NULL) {
char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -792,9 +821,14 @@ android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(GLsizei)imageSize,
(GLvoid *)data
);
exit:
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) */
@@ -919,6 +953,12 @@ android_glDeleteBuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "buffers == null";
goto exit;
}
buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1005,6 +1045,12 @@ android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "framebuffers == null";
goto exit;
}
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1100,6 +1146,12 @@ android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "renderbuffers == null";
goto exit;
}
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1195,6 +1247,12 @@ android_glDeleteTextures__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "textures == null";
goto exit;
}
textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1317,6 +1375,12 @@ android_glDrawElements__IIILjava_nio_Buffer_2
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
if (!indices_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "indices == null";
goto exit;
}
indices = (GLvoid *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
@@ -1471,6 +1535,12 @@ android_glGenBuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "buffers == null";
goto exit;
}
buffers = (GLuint *)getPointer(_env, buffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1566,6 +1636,12 @@ android_glGenFramebuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "framebuffers == null";
goto exit;
}
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1652,6 +1728,12 @@ android_glGenRenderbuffers__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "renderbuffers == null";
goto exit;
}
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -1738,6 +1820,12 @@ android_glGenTextures__ILjava_nio_IntBuffer_2
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "textures == null";
goto exit;
}
textures = (GLuint *)getPointer(_env, textures_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
@@ -2514,6 +2602,12 @@ android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
goto exit;
}
}
if (!shaders_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "shaders == null";
goto exit;
}
shaders = (GLuint *)getPointer(_env, shaders_buf, (jarray*)&_shadersArray, &_shadersRemaining, &_shadersBufferOffset);
if (_shadersRemaining < maxcount) {
_exception = 1;
@@ -2659,6 +2753,12 @@ android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2758,11 +2858,20 @@ exit:
static void
android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -2774,8 +2883,13 @@ android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -2856,6 +2970,12 @@ android_glGetProgramiv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -2963,6 +3083,12 @@ android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -3051,6 +3177,12 @@ android_glGetShaderiv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -3194,6 +3326,12 @@ android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
jint _precisionRemaining;
GLint *precision = (GLint *) 0;
if (!range_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "range == null";
goto exit;
}
range = (GLint *)getPointer(_env, range_buf, (jarray*)&_rangeArray, &_rangeRemaining, &_rangeBufferOffset);
if (_rangeRemaining < 1) {
_exception = 1;
@@ -3201,6 +3339,12 @@ android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
if (!precision_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "precision == null";
goto exit;
}
precision = (GLint *)getPointer(_env, precision_buf, (jarray*)&_precisionArray, &_precisionRemaining, &_precisionBufferOffset);
if (_precisionRemaining < 1) {
_exception = 1;
@@ -3409,6 +3553,12 @@ android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -3497,6 +3647,12 @@ android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -3585,6 +3741,12 @@ android_glGetUniformfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -3673,6 +3835,12 @@ android_glGetUniformiv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -3806,6 +3974,12 @@ android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -3916,6 +4090,12 @@ android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
@@ -4082,11 +4262,20 @@ 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;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (!pixels_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "pixels == null";
goto exit;
}
pixels = (GLvoid *)getPointer(_env, pixels_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (pixels == NULL) {
char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
@@ -4101,8 +4290,13 @@ android_glReadPixels__IIIIIILjava_nio_Buffer_2
(GLenum)type,
(GLvoid *)pixels
);
exit:
if (_array) {
releasePointer(_env, _array, pixels, JNI_TRUE);
releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -4179,6 +4373,12 @@ android_glShaderBinary__I_3IIILjava_nio_Buffer_2I
_env->GetIntArrayElements(shaders_ref, (jboolean *)0);
shaders = shaders_base + offset;
if (!binary_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "binary == null";
goto exit;
}
binary = (GLvoid *)getPointer(_env, binary_buf, (jarray*)&_array, &_binaryRemaining, &_bufferOffset);
if (_binaryRemaining < length) {
_exception = 1;
@@ -4227,7 +4427,19 @@ android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I
jint _binaryRemaining;
GLvoid *binary = (GLvoid *) 0;
if (!shaders_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "shaders == null";
goto exit;
}
shaders = (GLuint *)getPointer(_env, shaders_buf, (jarray*)&_shadersArray, &_shadersRemaining, &_shadersBufferOffset);
if (!binary_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "binary == null";
goto exit;
}
binary = (GLvoid *)getPointer(_env, binary_buf, (jarray*)&_binaryArray, &_binaryRemaining, &_binaryBufferOffset);
if (_binaryRemaining < length) {
_exception = 1;
@@ -4349,6 +4561,9 @@ android_glStencilOpSeparate__IIII
static void
android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -4375,6 +4590,9 @@ android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
if (_array) {
releasePointer(_env, _array, pixels, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) */
@@ -4450,6 +4668,12 @@ android_glTexParameterfv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -4549,6 +4773,12 @@ android_glTexParameteriv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -4579,6 +4809,9 @@ exit:
static void
android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -4605,6 +4838,9 @@ android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
if (_array) {
releasePointer(_env, _array, pixels, JNI_FALSE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glUniform1f ( GLint location, GLfloat x ) */
@@ -4679,6 +4915,12 @@ android_glUniform1fv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
@@ -4777,6 +5019,12 @@ android_glUniform1iv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
@@ -4876,6 +5124,12 @@ android_glUniform2fv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*2) {
_exception = 1;
@@ -4975,6 +5229,12 @@ android_glUniform2iv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*2) {
_exception = 1;
@@ -5075,6 +5335,12 @@ android_glUniform3fv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*3) {
_exception = 1;
@@ -5175,6 +5441,12 @@ android_glUniform3iv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*3) {
_exception = 1;
@@ -5276,6 +5548,12 @@ android_glUniform4fv__IILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLfloat *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*4) {
_exception = 1;
@@ -5377,6 +5655,12 @@ android_glUniform4iv__IILjava_nio_IntBuffer_2
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
v = (GLint *)getPointer(_env, v_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*4) {
_exception = 1;
@@ -5466,6 +5750,12 @@ android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*4) {
_exception = 1;
@@ -5556,6 +5846,12 @@ android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*9) {
_exception = 1;
@@ -5646,6 +5942,12 @@ android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
value = (GLfloat *)getPointer(_env, value_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count*16) {
_exception = 1;
@@ -5762,6 +6064,12 @@ android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "values == null";
goto exit;
}
values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
@@ -5859,6 +6167,12 @@ android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "values == null";
goto exit;
}
values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 2) {
_exception = 1;
@@ -5957,6 +6271,12 @@ android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "values == null";
goto exit;
}
values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 3) {
_exception = 1;
@@ -6056,6 +6376,12 @@ android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "values == null";
goto exit;
}
values = (GLfloat *)getPointer(_env, values_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
@@ -6099,6 +6425,9 @@ android_glVertexAttribPointer__IIIZII
static void
android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jobject ptr_buf, jint remaining) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
@@ -6119,6 +6448,9 @@ android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
(GLvoid *)ptr,
(GLsizei)remaining
);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -499,11 +499,20 @@ exit:
static void
android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z
(JNIEnv *_env, jobject _this, jint source, jint type, jint severity, jint count, jobject ids_buf, jboolean enabled) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *ids = (GLuint *) 0;
if (!ids_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "ids == null";
goto exit;
}
ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (ids == NULL) {
char * _idsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -517,9 +526,14 @@ android_glDebugMessageControlKHR__IIIILjava_nio_IntBuffer_2Z
(GLuint *)ids,
(GLboolean)enabled
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)ids, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
@@ -915,11 +929,20 @@ exit:
static void
android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -930,9 +953,14 @@ android_glTexParameterIivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params ) */
@@ -983,11 +1011,20 @@ exit:
static void
android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -998,9 +1035,14 @@ android_glTexParameterIuivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params ) */
@@ -1051,11 +1093,20 @@ exit:
static void
android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1066,8 +1117,13 @@ android_glGetTexParameterIivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1119,11 +1175,20 @@ exit:
static void
android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1134,8 +1199,13 @@ android_glGetTexParameterIuivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1187,11 +1257,20 @@ exit:
static void
android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *param = (GLint *) 0;
if (!param_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "param == null";
goto exit;
}
param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (param == NULL) {
char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1202,9 +1281,14 @@ android_glSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)param
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param ) */
@@ -1255,11 +1339,20 @@ exit:
static void
android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *param = (GLuint *) 0;
if (!param_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "param == null";
goto exit;
}
param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (param == NULL) {
char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1270,9 +1363,14 @@ android_glSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)param
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params ) */
@@ -1323,11 +1421,20 @@ exit:
static void
android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1338,8 +1445,13 @@ android_glGetSamplerParameterIivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1391,11 +1503,20 @@ exit:
static void
android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1406,8 +1527,13 @@ android_glGetSamplerParameterIuivEXT__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}

View File

@@ -535,6 +535,12 @@ android_glDebugMessageControl__IIIILjava_nio_IntBuffer_2Z
jint _remaining;
GLuint *ids = (GLuint *) 0;
if (!ids_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "ids == null";
goto exit;
}
ids = (GLuint *)getPointer(_env, ids_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
@@ -852,6 +858,12 @@ android_glDrawElementsBaseVertex__IIILjava_nio_Buffer_2I
jint _remaining;
void *indices = (void *) 0;
if (!indices_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "indices == null";
goto exit;
}
indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count-basevertex) {
_exception = 1;
@@ -892,6 +904,12 @@ android_glDrawRangeElementsBaseVertex__IIIIILjava_nio_Buffer_2I
jint _remaining;
void *indices = (void *) 0;
if (!indices_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "indices == null";
goto exit;
}
indices = (void *)getPointer(_env, indices_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < count-basevertex) {
_exception = 1;
@@ -1022,6 +1040,12 @@ android_glReadnPixels__IIIIIIILjava_nio_Buffer_2
jint _remaining;
void *data = (void *) 0;
if (!data_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
data = (void *)getPointer(_env, data_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < bufSize) {
_exception = 1;
@@ -1116,6 +1140,12 @@ android_glGetnUniformfv__IIILjava_nio_FloatBuffer_2
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLfloat *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < bufSize) {
_exception = 1;
@@ -1206,6 +1236,12 @@ android_glGetnUniformiv__IIILjava_nio_IntBuffer_2
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < bufSize) {
_exception = 1;
@@ -1296,6 +1332,12 @@ android_glGetnUniformuiv__IIILjava_nio_IntBuffer_2
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (_remaining < bufSize) {
_exception = 1;
@@ -1390,11 +1432,20 @@ exit:
static void
android_glTexParameterIiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1405,9 +1456,14 @@ android_glTexParameterIiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params ) */
@@ -1458,11 +1514,20 @@ exit:
static void
android_glTexParameterIuiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1473,9 +1538,14 @@ android_glTexParameterIuiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params ) */
@@ -1526,11 +1596,20 @@ exit:
static void
android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1541,8 +1620,13 @@ android_glGetTexParameterIiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1594,11 +1678,20 @@ exit:
static void
android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1609,8 +1702,13 @@ android_glGetTexParameterIuiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1662,11 +1760,20 @@ exit:
static void
android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *param = (GLint *) 0;
if (!param_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "param == null";
goto exit;
}
param = (GLint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (param == NULL) {
char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1677,9 +1784,14 @@ android_glSamplerParameterIiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)param
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param ) */
@@ -1730,11 +1842,20 @@ exit:
static void
android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject param_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *param = (GLuint *) 0;
if (!param_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "param == null";
goto exit;
}
param = (GLuint *)getPointer(_env, param_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (param == NULL) {
char * _paramBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1745,9 +1866,14 @@ android_glSamplerParameterIuiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)param
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)param, JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params ) */
@@ -1798,11 +1924,20 @@ exit:
static void
android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1813,8 +1948,13 @@ android_glGetSamplerParameterIiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
@@ -1866,11 +2006,20 @@ exit:
static void
android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint sampler, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
jintArray _array = (jintArray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_buf) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
params = (GLuint *)getPointer(_env, params_buf, (jarray*)&_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetIntArrayElements(_array, (jboolean *) 0);
@@ -1881,8 +2030,13 @@ android_glGetSamplerParameterIuiv__IILjava_nio_IntBuffer_2
(GLenum)pname,
(GLuint *)params
);
exit:
if (_array) {
_env->ReleaseIntArrayElements(_array, (jint*)params, 0);
_env->ReleaseIntArrayElements(_array, (jint*)params, _exception ? JNI_ABORT : 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}

File diff suppressed because it is too large Load Diff