diff options
author | Jesse Hall <jessehall@google.com> | 2013-04-10 16:27:00 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2013-04-10 22:00:33 -0700 |
commit | fa4c1170ac1c18fb919efcc965f55a045a42c06e (patch) | |
tree | 065fe554fd8662abd80cce90a5fe65f872fe4c19 /opengl | |
parent | 1c8b8e8b8ee6290875fe59288ffa7ccaf4d86247 (diff) | |
download | frameworks_native-fa4c1170ac1c18fb919efcc965f55a045a42c06e.zip frameworks_native-fa4c1170ac1c18fb919efcc965f55a045a42c06e.tar.gz frameworks_native-fa4c1170ac1c18fb919efcc965f55a045a42c06e.tar.bz2 |
Special-case glGetStringi
Modeled on the existing glGetString special-case.
Bug: 8566953
Change-Id: Icc6b23ab53b00510368900ad99c92028253dc797
Diffstat (limited to 'opengl')
4 files changed, 17 insertions, 1 deletions
diff --git a/opengl/tools/glgen/specs/gles11/GLES30.spec b/opengl/tools/glgen/specs/gles11/GLES30.spec index b7fe460..d09885c 100644 --- a/opengl/tools/glgen/specs/gles11/GLES30.spec +++ b/opengl/tools/glgen/specs/gles11/GLES30.spec @@ -219,7 +219,7 @@ void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) -// const GLubyte * glGetStringi ( GLenum name, GLuint index ) +const GLubyte * glGetStringi ( GLenum name, GLuint index ) void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) diff --git a/opengl/tools/glgen/stubs/gles11/glGetStringi.cpp b/opengl/tools/glgen/stubs/gles11/glGetStringi.cpp new file mode 100644 index 0000000..1611539 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetStringi.cpp @@ -0,0 +1,8 @@ +/* const GLubyte * glGetStringi ( GLenum name, GLuint index ) */ +static jstring +android_glGetStringi__II + (JNIEnv *_env, jobject _this, jint name, jint index) { + const GLubyte* _chars = glGetStringi((GLenum)name, (GLuint)index); + return _env->NewStringUTF((const char*)_chars); +} + diff --git a/opengl/tools/glgen/stubs/gles11/glGetStringi.java b/opengl/tools/glgen/stubs/gles11/glGetStringi.java new file mode 100644 index 0000000..523d4c7 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetStringi.java @@ -0,0 +1,7 @@ + // C function const GLubyte * glGetStringi ( GLenum name, GLuint index ) + + public static native String glGetStringi( + int name, + int index + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetStringi.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetStringi.nativeReg new file mode 100644 index 0000000..e7ee353 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetStringi.nativeReg @@ -0,0 +1 @@ +{"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II },
\ No newline at end of file |