Special-case glGetBufferPointerv

Bug: 8566953
Change-Id: I11a7394eb46f229fd3ae716e77487a45bac6ed53
This commit is contained in:
Jesse Hall 2013-04-10 15:48:58 -07:00
parent 27c86b9623
commit 610bbf2b6f
4 changed files with 20 additions and 1 deletions

View File

@ -173,7 +173,7 @@ void glEndQuery ( GLenum target )
void glGetQueryiv ( GLenum target, GLenum pname, GLint *params )
void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params )
GLboolean glUnmapBuffer ( GLenum target )
// void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid **params )
void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid **params )
void glDrawBuffers ( GLsizei n, const GLenum *bufs )
void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )

View File

@ -0,0 +1,11 @@
/* 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);
}

View File

@ -0,0 +1,7 @@
// C function void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params )
public static native java.nio.Buffer glGetBufferPointerv(
int target,
int pname
);

View File

@ -0,0 +1 @@
{"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II },