Special-case glGetStringi

Modeled on the existing glGetString special-case.

Bug: 8566953
Change-Id: Icc6b23ab53b00510368900ad99c92028253dc797
This commit is contained in:
Jesse Hall 2013-04-10 16:27:00 -07:00
parent 1c8b8e8b8e
commit fa4c1170ac
4 changed files with 17 additions and 1 deletions

View File

@ -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 )

View File

@ -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);
}

View File

@ -0,0 +1,7 @@
// C function const GLubyte * glGetStringi ( GLenum name, GLuint index )
public static native String glGetStringi(
int name,
int index
);

View File

@ -0,0 +1 @@
{"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II },