summaryrefslogtreecommitdiffstats
path: root/opengl/tools
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2013-04-10 15:48:58 -0700
committerJesse Hall <jessehall@google.com>2013-04-10 22:00:18 -0700
commit610bbf2b6fd80af98849d7e23526c6ce8a4112da (patch)
treeef74f997b1224a350673bbd74f2bb78d8e225683 /opengl/tools
parent27c86b962373f40a01f094689d623d51c51d4f83 (diff)
downloadframeworks_native-610bbf2b6fd80af98849d7e23526c6ce8a4112da.zip
frameworks_native-610bbf2b6fd80af98849d7e23526c6ce8a4112da.tar.gz
frameworks_native-610bbf2b6fd80af98849d7e23526c6ce8a4112da.tar.bz2
Special-case glGetBufferPointerv
Bug: 8566953 Change-Id: I11a7394eb46f229fd3ae716e77487a45bac6ed53
Diffstat (limited to 'opengl/tools')
-rw-r--r--opengl/tools/glgen/specs/gles11/GLES30.spec2
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.cpp11
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.java7
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.nativeReg1
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