diff options
Diffstat (limited to 'opengl/tools/glgen/stubs/gles11/glShaderSource.cpp')
-rw-r--r-- | opengl/tools/glgen/stubs/gles11/glShaderSource.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp b/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp new file mode 100644 index 0000000..c274108 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp @@ -0,0 +1,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); +} |