• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* void glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
2 static void
android_glDebugMessageInsertKHR__IIIILjava_lang_String_2(JNIEnv * _env,jobject _this,jint source,jint type,jint id,jint severity,jstring buf)3 android_glDebugMessageInsertKHR__IIIILjava_lang_String_2
4   (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jstring buf) {
5     jint _exception = 0;
6     const char * _exceptionType = NULL;
7     const char * _exceptionMessage = NULL;
8     const char* _nativebuf = 0;
9     jint _length = 0;
10 
11     if (!buf) {
12         _exception = 1;
13         _exceptionType = "java/lang/IllegalArgumentException";
14         _exceptionMessage = "buf == null";
15         goto exit;
16     }
17     _nativebuf = _env->GetStringUTFChars(buf, 0);
18     _length = _env->GetStringUTFLength(buf);
19 
20     glDebugMessageInsertKHR(
21         (GLenum)source,
22         (GLenum)type,
23         (GLuint)id,
24         (GLenum)severity,
25         (GLsizei)_length,
26         (GLchar *)_nativebuf
27     );
28 
29 exit:
30     if (_nativebuf) {
31         _env->ReleaseStringUTFChars(buf, _nativebuf);
32     }
33 
34     if (_exception) {
35         jniThrowException(_env, _exceptionType, _exceptionMessage);
36     }
37 }
38 
39