diff options
author | Jesse Hall <jessehall@google.com> | 2013-04-10 15:48:58 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2013-04-10 22:00:18 -0700 |
commit | 610bbf2b6fd80af98849d7e23526c6ce8a4112da (patch) | |
tree | ef74f997b1224a350673bbd74f2bb78d8e225683 | |
parent | 27c86b962373f40a01f094689d623d51c51d4f83 (diff) | |
download | frameworks_native-610bbf2b6fd80af98849d7e23526c6ce8a4112da.zip frameworks_native-610bbf2b6fd80af98849d7e23526c6ce8a4112da.tar.gz frameworks_native-610bbf2b6fd80af98849d7e23526c6ce8a4112da.tar.bz2 |
Special-case glGetBufferPointerv
Bug: 8566953
Change-Id: I11a7394eb46f229fd3ae716e77487a45bac6ed53
4 files changed, 20 insertions, 1 deletions
diff --git a/opengl/tools/glgen/specs/gles11/GLES30.spec b/opengl/tools/glgen/specs/gles11/GLES30.spec index 4fc541b..d95937d 100644 --- a/opengl/tools/glgen/specs/gles11/GLES30.spec +++ b/opengl/tools/glgen/specs/gles11/GLES30.spec @@ -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 ) diff --git a/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.cpp b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.cpp new file mode 100644 index 0000000..7016c4b --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.cpp @@ -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); +} + diff --git a/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.java b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.java new file mode 100644 index 0000000..c966e11 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.java @@ -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 + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.nativeReg new file mode 100644 index 0000000..7886451 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.nativeReg @@ -0,0 +1 @@ +{"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II },
\ No newline at end of file |