blob: ba324b09001e780125721ee1a969cbd53dc46164 [file] [log] [blame]
/*
**
** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
// This source file is automatically generated
#include <GLES3/gl3.h>
#include <GLES3/gl3ext.h>
#include <jni.h>
#include <JNIHelp.h>
#include <android_runtime/AndroidRuntime.h>
#include <utils/misc.h>
#include <assert.h>
static int initialized = 0;
static jclass nioAccessClass;
static jclass bufferClass;
static jmethodID getBasePointerID;
static jmethodID getBaseArrayID;
static jmethodID getBaseArrayOffsetID;
static jfieldID positionID;
static jfieldID limitID;
static jfieldID elementSizeShiftID;
/* special calls implemented in Android's GLES wrapper used to more
* efficiently bound-check passed arrays */
extern "C" {
#ifdef GL_VERSION_ES_CM_1_1
GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr, GLsizei count);
GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
const GLvoid *pointer, GLsizei count);
GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
GLsizei stride, const GLvoid *pointer, GLsizei count);
GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
GLsizei stride, const GLvoid *pointer, GLsizei count);
GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
GLsizei stride, const GLvoid *pointer, GLsizei count);
GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
GLsizei stride, const GLvoid *pointer, GLsizei count);
GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
GLsizei stride, const GLvoid *pointer, GLsizei count);
#endif
#ifdef GL_ES_VERSION_2_0
static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
}
#endif
#ifdef GL_ES_VERSION_3_0
static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type,
GLsizei stride, const GLvoid *pointer, GLsizei count) {
glVertexAttribIPointer(indx, size, type, stride, pointer);
}
#endif
}
/* Cache method IDs each time the class is loaded. */
static void
nativeClassInit(JNIEnv *_env, jclass glImplClass)
{
jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
"getBasePointer", "(Ljava/nio/Buffer;)J");
getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
"getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
"getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
positionID = _env->GetFieldID(bufferClass, "position", "I");
limitID = _env->GetFieldID(bufferClass, "limit", "I");
elementSizeShiftID =
_env->GetFieldID(bufferClass, "_elementSizeShift", "I");
}
static void *
getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
jint position;
jint limit;
jint elementSizeShift;
jlong pointer;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
*remaining = (limit - position) << elementSizeShift;
pointer = _env->CallStaticLongMethod(nioAccessClass,
getBasePointerID, buffer);
if (pointer != 0L) {
*array = NULL;
return reinterpret_cast<void*>(pointer);
}
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
getBaseArrayID, buffer);
*offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
return NULL;
}
static void
releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
{
_env->ReleasePrimitiveArrayCritical(array, data,
commit ? 0 : JNI_ABORT);
}
static void *
getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
char* buf = (char*) _env->GetDirectBufferAddress(buffer);
if (buf) {
jint position = _env->GetIntField(buffer, positionID);
jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
buf += position << elementSizeShift;
} else {
jniThrowException(_env, "java/lang/IllegalArgumentException",
"Must use a native order direct Buffer");
}
return (void*) buf;
}
// --------------------------------------------------------------------------
/*
* returns the number of values glGet returns for a given pname.
*
* The code below is written such that pnames requiring only one values
* are the default (and are not explicitely tested for). This makes the
* checking code much shorter/readable/efficient.
*
* This means that unknown pnames (e.g.: extensions) will default to 1. If
* that unknown pname needs more than 1 value, then the validation check
* is incomplete and the app may crash if it passed the wrong number params.
*/
static int getNeededCount(GLint pname) {
int needed = 1;
#ifdef GL_ES_VERSION_2_0
// GLES 2.x pnames
switch (pname) {
case GL_ALIASED_LINE_WIDTH_RANGE:
case GL_ALIASED_POINT_SIZE_RANGE:
needed = 2;
break;
case GL_BLEND_COLOR:
case GL_COLOR_CLEAR_VALUE:
case GL_COLOR_WRITEMASK:
case GL_SCISSOR_BOX:
case GL_VIEWPORT:
needed = 4;
break;
case GL_COMPRESSED_TEXTURE_FORMATS:
glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
break;
case GL_SHADER_BINARY_FORMATS:
glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed);
break;
}
#endif
#ifdef GL_VERSION_ES_CM_1_1
// GLES 1.x pnames
switch (pname) {
case GL_ALIASED_LINE_WIDTH_RANGE:
case GL_ALIASED_POINT_SIZE_RANGE:
case GL_DEPTH_RANGE:
case GL_SMOOTH_LINE_WIDTH_RANGE:
case GL_SMOOTH_POINT_SIZE_RANGE:
needed = 2;
break;
case GL_CURRENT_NORMAL:
case GL_POINT_DISTANCE_ATTENUATION:
needed = 3;
break;
case GL_COLOR_CLEAR_VALUE:
case GL_COLOR_WRITEMASK:
case GL_CURRENT_COLOR:
case GL_CURRENT_TEXTURE_COORDS:
case GL_FOG_COLOR:
case GL_LIGHT_MODEL_AMBIENT:
case GL_SCISSOR_BOX:
case GL_VIEWPORT:
needed = 4;
break;
case GL_MODELVIEW_MATRIX:
case GL_PROJECTION_MATRIX:
case GL_TEXTURE_MATRIX:
needed = 16;
break;
case GL_COMPRESSED_TEXTURE_FORMATS:
glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed);
break;
}
#endif
return needed;
}
template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)>
static void
get
(JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType;
const char * _exceptionMessage;
CTYPE *params_base = (CTYPE *) 0;
jint _remaining;
CTYPE *params = (CTYPE *) 0;
int _needed = 0;
if (!params_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
_needed = getNeededCount(pname);
// if we didn't find this pname, we just assume the user passed
// an array of the right size -- this might happen with extensions
// or if we forget an enum here.
if (_remaining < _needed) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (CTYPE *)
_env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
params = params_base + offset;
GET(
(GLenum)pname,
(CTYPE *)params
);
exit:
if (params_base) {
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
template <typename CTYPE, void GET(GLenum, CTYPE*)>
static void
getarray
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
CTYPE *params = (CTYPE *) 0;
int _needed = 0;
params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
_remaining /= sizeof(CTYPE); // convert from bytes to item count
_needed = getNeededCount(pname);
// if we didn't find this pname, we just assume the user passed
// an array of the right size -- this might happen with extensions
// or if we forget an enum here.
if (_needed>0 && _remaining < _needed) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < needed";
goto exit;
}
if (params == NULL) {
char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
params = (CTYPE *) (_paramsBase + _bufferOffset);
}
GET(
(GLenum)pname,
(CTYPE *)params
);
exit:
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
// --------------------------------------------------------------------------
/* void glReadBuffer ( GLenum mode ) */
static void
android_glReadBuffer__I
(JNIEnv *_env, jobject _this, jint mode) {
glReadBuffer(
(GLenum)mode
);
}
/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) */
static void
android_glDrawRangeElements__IIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jobject indices_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
if (indices == NULL) {
char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
indices = (GLvoid *) (_indicesBase + _bufferOffset);
}
glDrawRangeElements(
(GLenum)mode,
(GLuint)start,
(GLuint)end,
(GLsizei)count,
(GLenum)type,
(GLvoid *)indices
);
if (_array) {
releasePointer(_env, _array, indices, JNI_FALSE);
}
}
/* void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset ) */
static void
android_glDrawRangeElements__IIIIII
(JNIEnv *_env, jobject _this, jint mode, jint start, jint end, jint count, jint type, jint offset) {
glDrawRangeElements(
(GLenum)mode,
(GLuint)start,
(GLuint)end,
(GLsizei)count,
(GLenum)type,
reinterpret_cast<GLvoid *>(offset)
);
}
/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
static void
android_glTexImage3D__IIIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
if (pixels == NULL) {
char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexImage3D(
(GLenum)target,
(GLint)level,
(GLint)internalformat,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLint)border,
(GLenum)format,
(GLenum)type,
(GLvoid *)pixels
);
if (_array) {
releasePointer(_env, _array, pixels, JNI_FALSE);
}
}
/* void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset ) */
static void
android_glTexImage3D__IIIIIIIIII
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jint offset) {
glTexImage3D(
(GLenum)target,
(GLint)level,
(GLint)internalformat,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLint)border,
(GLenum)format,
(GLenum)type,
reinterpret_cast<GLvoid *>(offset)
);
}
/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels ) */
static void
android_glTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
if (pixels == NULL) {
char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexSubImage3D(
(GLenum)target,
(GLint)level,
(GLint)xoffset,
(GLint)yoffset,
(GLint)zoffset,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLenum)format,
(GLenum)type,
(GLvoid *)pixels
);
if (_array) {
releasePointer(_env, _array, pixels, JNI_FALSE);
}
}
/* void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset ) */
static void
android_glTexSubImage3D__IIIIIIIIIII
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jint offset) {
glTexSubImage3D(
(GLenum)target,
(GLint)level,
(GLint)xoffset,
(GLint)yoffset,
(GLint)zoffset,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLenum)format,
(GLenum)type,
reinterpret_cast<GLvoid *>(offset)
);
}
/* void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) */
static void
android_glCopyTexSubImage3D__IIIIIIIII
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) {
glCopyTexSubImage3D(
(GLenum)target,
(GLint)level,
(GLint)xoffset,
(GLint)yoffset,
(GLint)zoffset,
(GLint)x,
(GLint)y,
(GLsizei)width,
(GLsizei)height
);
}
/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ) */
static void
android_glCompressedTexImage3D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (data == NULL) {
char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
data = (GLvoid *) (_dataBase + _bufferOffset);
}
glCompressedTexImage3D(
(GLenum)target,
(GLint)level,
(GLenum)internalformat,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLint)border,
(GLsizei)imageSize,
(GLvoid *)data
);
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
}
/* void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset ) */
static void
android_glCompressedTexImage3D__IIIIIIIII
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint offset) {
glCompressedTexImage3D(
(GLenum)target,
(GLint)level,
(GLenum)internalformat,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLint)border,
(GLsizei)imageSize,
reinterpret_cast<GLvoid *>(offset)
);
}
/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ) */
static void
android_glCompressedTexSubImage3D__IIIIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (data == NULL) {
char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
data = (GLvoid *) (_dataBase + _bufferOffset);
}
glCompressedTexSubImage3D(
(GLenum)target,
(GLint)level,
(GLint)xoffset,
(GLint)yoffset,
(GLint)zoffset,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLenum)format,
(GLsizei)imageSize,
(GLvoid *)data
);
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
}
/* void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset ) */
static void
android_glCompressedTexSubImage3D__IIIIIIIIIII
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jint offset) {
glCompressedTexSubImage3D(
(GLenum)target,
(GLint)level,
(GLint)xoffset,
(GLint)yoffset,
(GLint)zoffset,
(GLsizei)width,
(GLsizei)height,
(GLsizei)depth,
(GLenum)format,
(GLsizei)imageSize,
reinterpret_cast<GLvoid *>(offset)
);
}
/* void glGenQueries ( GLsizei n, GLuint *ids ) */
static void
android_glGenQueries__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *ids_base = (GLuint *) 0;
jint _remaining;
GLuint *ids = (GLuint *) 0;
if (!ids_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "ids == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(ids_ref) - offset;
ids_base = (GLuint *)
_env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
ids = ids_base + offset;
glGenQueries(
(GLsizei)n,
(GLuint *)ids
);
exit:
if (ids_base) {
_env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGenQueries ( GLsizei n, GLuint *ids ) */
static void
android_glGenQueries__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *ids = (GLuint *) 0;
ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
if (ids == NULL) {
char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
ids = (GLuint *) (_idsBase + _bufferOffset);
}
glGenQueries(
(GLsizei)n,
(GLuint *)ids
);
if (_array) {
releasePointer(_env, _array, ids, JNI_TRUE);
}
}
/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
static void
android_glDeleteQueries__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray ids_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *ids_base = (GLuint *) 0;
jint _remaining;
GLuint *ids = (GLuint *) 0;
if (!ids_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "ids == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(ids_ref) - offset;
ids_base = (GLuint *)
_env->GetPrimitiveArrayCritical(ids_ref, (jboolean *)0);
ids = ids_base + offset;
glDeleteQueries(
(GLsizei)n,
(GLuint *)ids
);
exit:
if (ids_base) {
_env->ReleasePrimitiveArrayCritical(ids_ref, ids_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glDeleteQueries ( GLsizei n, const GLuint *ids ) */
static void
android_glDeleteQueries__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject ids_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *ids = (GLuint *) 0;
ids = (GLuint *)getPointer(_env, ids_buf, &_array, &_remaining, &_bufferOffset);
if (ids == NULL) {
char * _idsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
ids = (GLuint *) (_idsBase + _bufferOffset);
}
glDeleteQueries(
(GLsizei)n,
(GLuint *)ids
);
if (_array) {
releasePointer(_env, _array, ids, JNI_FALSE);
}
}
/* GLboolean glIsQuery ( GLuint id ) */
static jboolean
android_glIsQuery__I
(JNIEnv *_env, jobject _this, jint id) {
GLboolean _returnValue;
_returnValue = glIsQuery(
(GLuint)id
);
return (jboolean)_returnValue;
}
/* void glBeginQuery ( GLenum target, GLuint id ) */
static void
android_glBeginQuery__II
(JNIEnv *_env, jobject _this, jint target, jint id) {
glBeginQuery(
(GLenum)target,
(GLuint)id
);
}
/* void glEndQuery ( GLenum target ) */
static void
android_glEndQuery__I
(JNIEnv *_env, jobject _this, jint target) {
glEndQuery(
(GLenum)target
);
}
/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
static void
android_glGetQueryiv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
params_base = (GLint *)
_env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
params = params_base + offset;
glGetQueryiv(
(GLenum)target,
(GLenum)pname,
(GLint *)params
);
exit:
if (params_base) {
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) */
static void
android_glGetQueryiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
params = (GLint *) (_paramsBase + _bufferOffset);
}
glGetQueryiv(
(GLenum)target,
(GLenum)pname,
(GLint *)params
);
if (_array) {
releasePointer(_env, _array, params, JNI_TRUE);
}
}
/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
static void
android_glGetQueryObjectuiv__II_3II
(JNIEnv *_env, jobject _this, jint id, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *params_base = (GLuint *) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
params_base = (GLuint *)
_env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
params = params_base + offset;
glGetQueryObjectuiv(
(GLuint)id,
(GLenum)pname,
(GLuint *)params
);
exit:
if (params_base) {
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) */
static void
android_glGetQueryObjectuiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint id, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
params = (GLuint *) (_paramsBase + _bufferOffset);
}
glGetQueryObjectuiv(
(GLuint)id,
(GLenum)pname,
(GLuint *)params
);
if (_array) {
releasePointer(_env, _array, params, JNI_TRUE);
}
}
/* GLboolean glUnmapBuffer ( GLenum target ) */
static jboolean
android_glUnmapBuffer__I
(JNIEnv *_env, jobject _this, jint target) {
GLboolean _returnValue;
_returnValue = glUnmapBuffer(
(GLenum)target
);
return (jboolean)_returnValue;
}
/* void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) */
static jobject
android_glGetBufferPointerv__II
(JNIEnv *_env, jobject _this, jint target, jint pname) {
GLint64 _mapLength;
GLvoid* _p;
glGetBufferParameteri64v((GLenum)target, GL_BUFFER_MAP_LENGTH, &_mapLength);
glGetBufferPointerv((GLenum)target, (GLenum)pname, &_p);
return _env->NewDirectByteBuffer(_p, _mapLength);
}
/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
static void
android_glDrawBuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray bufs_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLenum *bufs_base = (GLenum *) 0;
jint _remaining;
GLenum *bufs = (GLenum *) 0;
if (!bufs_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "bufs == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(bufs_ref) - offset;
bufs_base = (GLenum *)
_env->GetPrimitiveArrayCritical(bufs_ref, (jboolean *)0);
bufs = bufs_base + offset;
glDrawBuffers(
(GLsizei)n,
(GLenum *)bufs
);
exit:
if (bufs_base) {
_env->ReleasePrimitiveArrayCritical(bufs_ref, bufs_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glDrawBuffers ( GLsizei n, const GLenum *bufs ) */
static void
android_glDrawBuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject bufs_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLenum *bufs = (GLenum *) 0;
bufs = (GLenum *)getPointer(_env, bufs_buf, &_array, &_remaining, &_bufferOffset);
if (bufs == NULL) {
char * _bufsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
bufs = (GLenum *) (_bufsBase + _bufferOffset);
}
glDrawBuffers(
(GLsizei)n,
(GLenum *)bufs
);
if (_array) {
releasePointer(_env, _array, bufs, JNI_FALSE);
}
}
/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix2x3fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
value_base = (GLfloat *)
_env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
value = value_base + offset;
glUniformMatrix2x3fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
exit:
if (value_base) {
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix2x3fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
if (value == NULL) {
char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
value = (GLfloat *) (_valueBase + _bufferOffset);
}
glUniformMatrix2x3fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
if (_array) {
releasePointer(_env, _array, value, JNI_FALSE);
}
}
/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix3x2fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
value_base = (GLfloat *)
_env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
value = value_base + offset;
glUniformMatrix3x2fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
exit:
if (value_base) {
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix3x2fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
if (value == NULL) {
char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
value = (GLfloat *) (_valueBase + _bufferOffset);
}
glUniformMatrix3x2fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
if (_array) {
releasePointer(_env, _array, value, JNI_FALSE);
}
}
/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix2x4fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
value_base = (GLfloat *)
_env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
value = value_base + offset;
glUniformMatrix2x4fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
exit:
if (value_base) {
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix2x4fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
if (value == NULL) {
char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
value = (GLfloat *) (_valueBase + _bufferOffset);
}
glUniformMatrix2x4fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
if (_array) {
releasePointer(_env, _array, value, JNI_FALSE);
}
}
/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix4x2fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
value_base = (GLfloat *)
_env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
value = value_base + offset;
glUniformMatrix4x2fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
exit:
if (value_base) {
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix4x2fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
if (value == NULL) {
char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
value = (GLfloat *) (_valueBase + _bufferOffset);
}
glUniformMatrix4x2fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
if (_array) {
releasePointer(_env, _array, value, JNI_FALSE);
}
}
/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix3x4fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
value_base = (GLfloat *)
_env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
value = value_base + offset;
glUniformMatrix3x4fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
exit:
if (value_base) {
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix3x4fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
if (value == NULL) {
char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
value = (GLfloat *) (_valueBase + _bufferOffset);
}
glUniformMatrix3x4fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
if (_array) {
releasePointer(_env, _array, value, JNI_FALSE);
}
}
/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix4x3fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
value_base = (GLfloat *)
_env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
value = value_base + offset;
glUniformMatrix4x3fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
exit:
if (value_base) {
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
static void
android_glUniformMatrix4x3fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
if (value == NULL) {
char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
value = (GLfloat *) (_valueBase + _bufferOffset);
}
glUniformMatrix4x3fv(
(GLint)location,
(GLsizei)count,
(GLboolean)transpose,
(GLfloat *)value
);
if (_array) {
releasePointer(_env, _array, value, JNI_FALSE);
}
}
/* void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) */
static void
android_glBlitFramebuffer__IIIIIIIIII
(JNIEnv *_env, jobject _this, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) {
glBlitFramebuffer(
(GLint)srcX0,
(GLint)srcY0,
(GLint)srcX1,
(GLint)srcY1,
(GLint)dstX0,
(GLint)dstY0,
(GLint)dstX1,
(GLint)dstY1,
(GLbitfield)mask,
(GLenum)filter
);
}
/* void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) */
static void
android_glRenderbufferStorageMultisample__IIIII
(JNIEnv *_env, jobject _this, jint target, jint samples, jint internalformat, jint width, jint height) {
glRenderbufferStorageMultisample(
(GLenum)target,
(GLsizei)samples,
(GLenum)internalformat,
(GLsizei)width,
(GLsizei)height
);
}
/* void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) */
static void
android_glFramebufferTextureLayer__IIIII
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint texture, jint level, jint layer) {
glFramebufferTextureLayer(
(GLenum)target,
(GLenum)attachment,
(GLuint)texture,
(GLint)level,
(GLint)layer
);
}
/* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */
static jobject
android_glMapBufferRange__IIII
(JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) {
GLvoid* _p = glMapBufferRange((GLenum)target,
(GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access);
jobject _buf = (jobject)0;
if (_p) {
_buf = _env->NewDirectByteBuffer(_p, length);
}
return _buf;
}
/* void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length ) */
static void
android_glFlushMappedBufferRange__III
(JNIEnv *_env, jobject _this, jint target, jint offset, jint length) {
glFlushMappedBufferRange(
(GLenum)target,
(GLintptr)offset,
(GLsizeiptr)length
);
}
/* void glBindVertexArray ( GLuint array ) */
static void
android_glBindVertexArray__I
(JNIEnv *_env, jobject _this, jint array) {
glBindVertexArray(
(GLuint)array
);
}
/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
static void
android_glDeleteVertexArrays__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *arrays_base = (GLuint *) 0;
jint _remaining;
GLuint *arrays = (GLuint *) 0;
if (!arrays_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "arrays == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(arrays_ref) - offset;
arrays_base = (GLuint *)
_env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
arrays = arrays_base + offset;
glDeleteVertexArrays(
(GLsizei)n,
(GLuint *)arrays
);
exit:
if (arrays_base) {
_env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) */
static void
android_glDeleteVertexArrays__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *arrays = (GLuint *) 0;
arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
if (arrays == NULL) {
char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
arrays = (GLuint *) (_arraysBase + _bufferOffset);
}
glDeleteVertexArrays(
(GLsizei)n,
(GLuint *)arrays
);
if (_array) {
releasePointer(_env, _array, arrays, JNI_FALSE);
}
}
/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
static void
android_glGenVertexArrays__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray arrays_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *arrays_base = (GLuint *) 0;
jint _remaining;
GLuint *arrays = (GLuint *) 0;
if (!arrays_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "arrays == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(arrays_ref) - offset;
arrays_base = (GLuint *)
_env->GetPrimitiveArrayCritical(arrays_ref, (jboolean *)0);
arrays = arrays_base + offset;
glGenVertexArrays(
(GLsizei)n,
(GLuint *)arrays
);
exit:
if (arrays_base) {
_env->ReleasePrimitiveArrayCritical(arrays_ref, arrays_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGenVertexArrays ( GLsizei n, GLuint *arrays ) */
static void
android_glGenVertexArrays__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject arrays_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *arrays = (GLuint *) 0;
arrays = (GLuint *)getPointer(_env, arrays_buf, &_array, &_remaining, &_bufferOffset);
if (arrays == NULL) {
char * _arraysBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
arrays = (GLuint *) (_arraysBase + _bufferOffset);
}
glGenVertexArrays(
(GLsizei)n,
(GLuint *)arrays
);
if (_array) {
releasePointer(_env, _array, arrays, JNI_TRUE);
}
}
/* GLboolean glIsVertexArray ( GLuint array ) */
static jboolean
android_glIsVertexArray__I
(JNIEnv *_env, jobject _this, jint array) {
GLboolean _returnValue;
_returnValue = glIsVertexArray(
(GLuint)array
);
return (jboolean)_returnValue;
}
/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
static void
android_glGetIntegeri_v__II_3II
(JNIEnv *_env, jobject _this, jint target, jint index, jintArray data_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLint *data_base = (GLint *) 0;
jint _remaining;
GLint *data = (GLint *) 0;
if (!data_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "data == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(data_ref) - offset;
data_base = (GLint *)
_env->GetPrimitiveArrayCritical(data_ref, (jboolean *)0);
data = data_base + offset;
glGetIntegeri_v(
(GLenum)target,
(GLuint)index,
(GLint *)data
);
exit:
if (data_base) {
_env->ReleasePrimitiveArrayCritical(data_ref, data_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) */
static void
android_glGetIntegeri_v__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint index, jobject data_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *data = (GLint *) 0;
data = (GLint *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (data == NULL) {
char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
data = (GLint *) (_dataBase + _bufferOffset);
}
glGetIntegeri_v(
(GLenum)target,
(GLuint)index,
(GLint *)data
);
if (_array) {
releasePointer(_env, _array, data, JNI_TRUE);
}
}
/* void glBeginTransformFeedback ( GLenum primitiveMode ) */
static void
android_glBeginTransformFeedback__I
(JNIEnv *_env, jobject _this, jint primitiveMode) {
glBeginTransformFeedback(
(GLenum)primitiveMode
);
}
/* void glEndTransformFeedback ( void ) */
static void
android_glEndTransformFeedback__
(JNIEnv *_env, jobject _this) {
glEndTransformFeedback();
}
/* void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) */
static void
android_glBindBufferRange__IIIII
(JNIEnv *_env, jobject _this, jint target, jint index, jint buffer, jint offset, jint size) {
glBindBufferRange(
(GLenum)target,
(GLuint)index,
(GLuint)buffer,
(GLintptr)offset,
(GLsizeiptr)size
);
}
/* void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer ) */
static void
android_glBindBufferBase__III
(JNIEnv *_env, jobject _this, jint target, jint index, jint buffer) {
glBindBufferBase(
(GLenum)target,
(GLuint)index,
(GLuint)buffer
);
}
/* void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) */
static
void
android_glTransformFeedbackVaryings
(JNIEnv *_env, jobject _this, jint program, jobjectArray varyings_ref, jint bufferMode) {
jint _exception = 0;
const char* _exceptionType = NULL;
const char* _exceptionMessage = NULL;
jint _count = 0, _i;
const char** _varyings = NULL;
const char* _varying = NULL;
if (!varyings_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "varyings == null";
goto exit;
}
_count = _env->GetArrayLength(varyings_ref);
_varyings = (const char**)calloc(_count, sizeof(const char*));
for (_i = 0; _i < _count; _i++) {
jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
if (!_varying) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "null varyings element";
goto exit;
}
_varyings[_i] = _env->GetStringUTFChars(_varying, 0);
}
glTransformFeedbackVaryings(program, _count, _varyings, bufferMode);
exit:
for (_i = _count - 1; _i >= 0; _i--) {
if (_varyings[_i]) {
jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i);
if (_varying) {
_env->ReleaseStringUTFChars(_varying, _varyings[_i]);
}
}
}
free(_varyings);
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
static void
android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI
(JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) {
jint _exception = 0;
const char * _exceptionType;
const char * _exceptionMessage;
GLsizei *length_base = (GLsizei *) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
GLint *size_base = (GLint *) 0;
jint _sizeRemaining;
GLint *size = (GLint *) 0;
GLenum *type_base = (GLenum *) 0;
jint _typeRemaining;
GLenum *type = (GLenum *) 0;
char *name_base = (char *) 0;
jint _nameRemaining;
char *name = (char *) 0;
if (!length_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "length == null";
goto exit;
}
if (lengthOffset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "lengthOffset < 0";
goto exit;
}
_lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
length_base = (GLsizei *)
_env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0);
length = length_base + lengthOffset;
if (!size_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "size == null";
goto exit;
}
if (sizeOffset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "sizeOffset < 0";
goto exit;
}
_sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
size_base = (GLint *)
_env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
size = size_base + sizeOffset;
if (!type_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "type == null";
goto exit;
}
if (typeOffset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "typeOffset < 0";
goto exit;
}
_typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
type_base = (GLenum *)
_env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
type = type_base + typeOffset;
if (!name_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "name == null";
goto exit;
}
if (nameOffset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "nameOffset < 0";
goto exit;
}
_nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
name_base = (char *)
_env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0);
name = name_base + nameOffset;
glGetTransformFeedbackVarying(
(GLuint)program,
(GLuint)index,
(GLsizei)bufsize,
(GLsizei *)length,
(GLint *)size,
(GLenum *)type,
(char *)name
);
exit:
if (name_base) {
_env->ReleasePrimitiveArrayCritical(name_ref, name_base,
_exception ? JNI_ABORT: 0);
}
if (type_base) {
_env->ReleasePrimitiveArrayCritical(type_ref, type_base,
_exception ? JNI_ABORT: 0);
}
if (size_base) {
_env->ReleasePrimitiveArrayCritical(size_ref, size_base,
_exception ? JNI_ABORT: 0);
}
if (length_base) {
_env->ReleasePrimitiveArrayCritical(length_ref, length_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
static void
android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
(JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
jarray _lengthArray = (jarray) 0;
jint _lengthBufferOffset = (jint) 0;
jarray _sizeArray = (jarray) 0;
jint _sizeBufferOffset = (jint) 0;
jarray _typeArray = (jarray) 0;
jint _typeBufferOffset = (jint) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
jint _sizeRemaining;
GLint *size = (GLint *) 0;
jint _typeRemaining;
GLenum *type = (GLenum *) 0;
length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
if (length == NULL) {
char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
}
if (size == NULL) {
char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
size = (GLint *) (_sizeBase + _sizeBufferOffset);
}
if (type == NULL) {
char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
type = (GLenum *) (_typeBase + _typeBufferOffset);
}
glGetTransformFeedbackVarying(
(GLuint)program,
(GLuint)index,
(GLsizei)bufsize,
(GLsizei *)length,
(GLint *)size,
(GLenum *)type,
(char *)name
);
if (_typeArray) {
releasePointer(_env, _typeArray, type, JNI_TRUE);
}
if (_sizeArray) {
releasePointer(_env, _sizeArray, size, JNI_TRUE);
}
if (_lengthArray) {
releasePointer(_env, _lengthArray, length, JNI_TRUE);
}
}
/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
static jstring
android_glGetTransformFeedbackVarying1
(JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) {
jint _exception = 0;
const char * _exceptionType;
const char * _exceptionMessage;
GLint *size_base = (GLint *) 0;
jint _sizeRemaining;
GLint *size = (GLint *) 0;
GLenum *type_base = (GLenum *) 0;
jint _typeRemaining;
GLenum *type = (GLenum *) 0;
jstring result = 0;
GLint len = 0;
glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
if (!len) {
return _env->NewStringUTF("");
}
char* buf = (char*) malloc(len);
if (buf == NULL) {
jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
return NULL;
}
if (!size_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "size == null";
goto exit;
}
if (sizeOffset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "sizeOffset < 0";
goto exit;
}
_sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
size_base = (GLint *)
_env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0);
size = size_base + sizeOffset;
if (!type_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "type == null";
goto exit;
}
if (typeOffset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "typeOffset < 0";
goto exit;
}
_typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
type_base = (GLenum *)
_env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0);
type = type_base + typeOffset;
glGetTransformFeedbackVarying(
(GLuint)program,
(GLuint)index,
(GLsizei)len,
NULL,
(GLint *)size,
(GLenum *)type,
(char *)buf
);
exit:
if (type_base) {
_env->ReleasePrimitiveArrayCritical(type_ref, type_base,
_exception ? JNI_ABORT: 0);
}
if (size_base) {
_env->ReleasePrimitiveArrayCritical(size_ref, size_base,
_exception ? JNI_ABORT: 0);
}
if (_exception != 1) {
result = _env->NewStringUTF(buf);
}
if (buf) {
free(buf);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
if (result == 0) {
result = _env->NewStringUTF("");
}
return result;
}
/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */
static jstring
android_glGetTransformFeedbackVarying2
(JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) {
jarray _sizeArray = (jarray) 0;
jint _sizeBufferOffset = (jint) 0;
jarray _typeArray = (jarray) 0;
jint _typeBufferOffset = (jint) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
jint _sizeRemaining;
GLint *size = (GLint *) 0;
jint _typeRemaining;
GLenum *type = (GLenum *) 0;
jstring result = 0;
GLint len = 0;
glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len);
if (!len) {
return _env->NewStringUTF("");
}
char* buf = (char*) malloc(len);
if (buf == NULL) {
jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
return NULL;
}
size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
if (size == NULL) {
char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
size = (GLint *) (_sizeBase + _sizeBufferOffset);
}
if (type == NULL) {
char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
type = (GLenum *) (_typeBase + _typeBufferOffset);
}
glGetTransformFeedbackVarying(
(GLuint)program,
(GLuint)index,
(GLsizei)len,
NULL,
(GLint *)size,
(GLenum *)type,
(char *)buf
);
if (_typeArray) {
releasePointer(_env, _typeArray, type, JNI_TRUE);
}
if (_sizeArray) {
releasePointer(_env, _sizeArray, size, JNI_TRUE);
}
result = _env->NewStringUTF(buf);
if (buf) {
free(buf);
}
return result;
}
/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) */
static void
android_glVertexAttribIPointerBounds__IIIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
if (pointer_buf) {
pointer = (GLvoid *) getDirectBufferPointer(_env, pointer_buf);
if ( ! pointer ) {
return;
}
}
glVertexAttribIPointerBounds(
(GLuint)index,
(GLint)size,
(GLenum)type,
(GLsizei)stride,
(GLvoid *)pointer,
(GLsizei)remaining
);
}
/* void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset ) */
static void
android_glVertexAttribIPointer__IIIII
(JNIEnv *_env, jobject _this, jint index, jint size, jint type, jint stride, jint offset) {
glVertexAttribIPointer(
(GLuint)index,
(GLint)size,
(GLenum)type,
(GLsizei)stride,
reinterpret_cast<GLvoid *>(offset)
);
}
/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
static void
android_glGetVertexAttribIiv__II_3II
(JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
params_base = (GLint *)
_env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
params = params_base + offset;
glGetVertexAttribIiv(
(GLuint)index,
(GLenum)pname,
(GLint *)params
);
exit:
if (params_base) {
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) */
static void
android_glGetVertexAttribIiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
params = (GLint *) (_paramsBase + _bufferOffset);
}
glGetVertexAttribIiv(
(GLuint)index,
(GLenum)pname,
(GLint *)params
);
if (_array) {
releasePointer(_env, _array, params, JNI_TRUE);
}
}
/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
static void
android_glGetVertexAttribIuiv__II_3II
(JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *params_base = (GLuint *) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
params_base = (GLuint *)
_env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
params = params_base + offset;
glGetVertexAttribIuiv(
(GLuint)index,
(GLenum)pname,
(GLuint *)params
);
exit:
if (params_base) {
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) */
static void
android_glGetVertexAttribIuiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
params = (GLuint *) (_paramsBase + _bufferOffset);
}
glGetVertexAttribIuiv(
(GLuint)index,
(GLenum)pname,
(GLuint *)params
);
if (_array) {
releasePointer(_env, _array, params, JNI_TRUE);
}
}
/* void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w ) */
static void
android_glVertexAttribI4i__IIIII
(JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
glVertexAttribI4i(
(GLuint)index,
(GLint)x,
(GLint)y,
(GLint)z,
(GLint)w
);
}
/* void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) */
static void
android_glVertexAttribI4ui__IIIII
(JNIEnv *_env, jobject _this, jint index, jint x, jint y, jint z, jint w) {
glVertexAttribI4ui(
(GLuint)index,
(GLuint)x,
(GLuint)y,
(GLuint)z,
(GLuint)w
);
}
/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
static void
android_glVertexAttribI4iv__I_3II
(JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLint *v_base = (GLint *) 0;
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
v_base = (GLint *)
_env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
v = v_base + offset;
glVertexAttribI4iv(
(GLuint)index,
(GLint *)v
);
exit:
if (v_base) {
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glVertexAttribI4iv ( GLuint index, const GLint *v ) */
static void
android_glVertexAttribI4iv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *v = (GLint *) 0;
v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
if (v == NULL) {
char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
v = (GLint *) (_vBase + _bufferOffset);
}
glVertexAttribI4iv(
(GLuint)index,
(GLint *)v
);
if (_array) {
releasePointer(_env, _array, v, JNI_FALSE);
}
}
/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
static void
android_glVertexAttribI4uiv__I_3II
(JNIEnv *_env, jobject _this, jint index, jintArray v_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *v_base = (GLuint *) 0;
jint _remaining;
GLuint *v = (GLuint *) 0;
if (!v_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
v_base = (GLuint *)
_env->GetPrimitiveArrayCritical(v_ref, (jboolean *)0);
v = v_base + offset;
glVertexAttribI4uiv(
(GLuint)index,
(GLuint *)v
);
exit:
if (v_base) {
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) */
static void
android_glVertexAttribI4uiv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint index, jobject v_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *v = (GLuint *) 0;
v = (GLuint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
if (v == NULL) {
char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
v = (GLuint *) (_vBase + _bufferOffset);
}
glVertexAttribI4uiv(
(GLuint)index,
(GLuint *)v
);
if (_array) {
releasePointer(_env, _array, v, JNI_FALSE);
}
}
/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
static void
android_glGetUniformuiv__II_3II
(JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLuint *params_base = (GLuint *) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
if (!params_ref) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
params_base = (GLuint *)
_env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0);
params = params_base + offset;
glGetUniformuiv(
(GLuint)program,
(GLint)location,
(GLuint *)params
);
exit:
if (params_base) {
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
}
/* void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) */
static void
android_glGetUniformuiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
jarray _array = (jarray) 0;
jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *params = (GLuint *) 0;
params = (GLuint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (params == NULL) {
char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
params = (GLuint *) (_paramsBase + _bufferOffset);
}
glGetUniformuiv(
(GLuint)program,
(GLint)location,
(GLuint *)params
);
if (_array) {
releasePointer(_env, _array, params, JNI_TRUE);
}
}
/* GLint glGetFragDataLocation ( GLuint program, const GLchar *name ) */
static jint
android_glGetFragDataLocation__ILjava_lang_String_2
(JNIEnv *_env, jobject _this, jint program, jstring name) {
jint _exception = 0;
const char * _exceptionType = NULL;
const char * _exceptionMessage = NULL;
GLint _returnValue = 0;
const char* _nativename = 0;
if (!name) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "name == null";
goto exit;
}
_nativename = _env->GetStringUTFChars(name, 0);
_returnValue = glGetFragDataLocation(
(GLuint)program,
(GLchar *)_nativename
);
exit:
if (_nativename) {
_env->ReleaseStringUTFChars(name, _nativename);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
}
return (jint)_returnValue;
}
/* void glUniform1ui ( GLint location, GLuint v0 ) */
static void
android_glUniform1ui__II
(JNIEnv *_env, jobject _this, jint location, jint v0) {
glUniform1ui(
(GLint)location,
(GLuint)v0
);
}
/* void glUniform2ui ( GLint location, GLuint v0, GLuint v1 ) */
static void
android_glUniform2ui__III
(JNIEnv *_env, jobject _this, jint location, jint v0, jint v1) {
glUniform2ui(
(GLint)location,
(GLuint)v0,
(GLuint)v1
);
}
/* void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 ) */
static void
android_glUniform3ui__IIII
(JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2) {
glUniform3ui(
(GLint)location,
(GLuint)v0,
(GLuint)v1,
(GLuint)v2
);
}
/* void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) */
static void
android_glUniform4ui__IIIII
(JNIEnv *_env, jobject _this, jint location, jint v0, jint v1, jint v2, jint v3) {
glUniform4ui(
(GLint)location,
(GLuint)v0,
(GLuint)v1