2009-11-19 08:34:55 +00:00
|
|
|
|
|
|
|
/* 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) {
|
2011-04-09 03:01:01 +00:00
|
|
|
jniThrowException(_env, "java/lang/IllegalArgumentException", "string == null");
|
2009-11-19 08:34:55 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* nativeString = _env->GetStringUTFChars(string, 0);
|
|
|
|
const char* strings[] = {nativeString};
|
|
|
|
glShaderSource(shader, 1, strings, 0);
|
|
|
|
_env->ReleaseStringUTFChars(string, nativeString);
|
|
|
|
}
|