diff options
Diffstat (limited to 'src/jogl/native/JoglCommon.c')
-rw-r--r-- | src/jogl/native/JoglCommon.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/jogl/native/JoglCommon.c b/src/jogl/native/JoglCommon.c index d9f5edd49..62dd8ef21 100644 --- a/src/jogl/native/JoglCommon.c +++ b/src/jogl/native/JoglCommon.c @@ -149,3 +149,25 @@ Java_jogamp_opengl_GLContextImpl_glGetStringInt(JNIEnv *env, jclass _unused, jin return (*env)->NewStringUTF(env, _res); } +/* + * Class: jogamp_opengl_GLContextImpl + * Method: glGetIntegervInt + * Signature: (ILjava/lang/Object;I)V + */ +JNIEXPORT void JNICALL +Java_jogamp_opengl_GLContextImpl_glGetIntegervInt(JNIEnv *env, jclass _unused, jint pname, jobject params, jint params_byte_offset, jlong procAddress) { + typedef void (KHRONOS_APIENTRY*_local_PFNGLGETINTEGERVPROC)(unsigned int pname, int * params); + + _local_PFNGLGETINTEGERVPROC ptr_glGetIntegerv; + int * _params_ptr = NULL; + if ( NULL != params ) { + _params_ptr = (int *) (((char*) (*env)->GetPrimitiveArrayCritical(env, params, NULL) ) + params_byte_offset); + } + ptr_glGetIntegerv = (_local_PFNGLGETINTEGERVPROC) (intptr_t) procAddress; + assert(ptr_glGetIntegerv != NULL); + (* ptr_glGetIntegerv) ((unsigned int) pname, (int *) _params_ptr); + if ( NULL != params ) { + (*env)->ReleasePrimitiveArrayCritical(env, params, _params_ptr, 0); + } +} + |