blob: c2741089a6bd884952a04d4d969f0ce891da9210 [file] [log] [blame]
Jack Palevich560814f2009-11-19 16:34:55 +08001
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 _env->ThrowNew(IAEClass, "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}