1
2/* void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint * length ) */
3static
4void
5android_glShaderSource
6    (JNIEnv *_env, jobject _this, jint shader, jstring string) {
7
8    if (!string) {
9        jniThrowException(_env, "java/lang/IllegalArgumentException", "string == null");
10        return;
11    }
12
13    const char* nativeString = _env->GetStringUTFChars(string, 0);
14    const char* strings[] = {nativeString};
15    glShaderSource(shader, 1, strings, 0);
16    _env->ReleaseStringUTFChars(string, nativeString);
17}
18