replicant-frameworks_native/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp
Jack Palevich 50d0b14689 Add a Java API for OpenGL ES 2.0.
Currently this API is hidden.

Add a test program.
2009-11-19 16:34:55 +08:00

18 lines
512 B
C++

/* void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint * length ) */
static
void
android_glShaderSource
(JNIEnv *_env, jobject _this, jint shader, jstring string) {
if (!string) {
_env->ThrowNew(IAEClass, "string == null");
return;
}
const char* nativeString = _env->GetStringUTFChars(string, 0);
const char* strings[] = {nativeString};
glShaderSource(shader, 1, strings, 0);
_env->ReleaseStringUTFChars(string, nativeString);
}