summaryrefslogtreecommitdiffstats
path: root/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp
blob: c2741089a6bd884952a04d4d969f0ce891da9210 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

/* 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);
}