1 /* void glDispatchComputeIndirect ( GLintptr indirect ) */ android_glDispatchComputeIndirect(JNIEnv * _env,jobject,jlong indirect)2static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) { 3 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values. 4 // Here we only need to check for successful 64-bit to 32-bit conversion. 5 // - jlong is a int64_t (jni.h) 6 // - GLintptr is a long (khrplatform.h) 7 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) { 8 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large"); 9 return; 10 } 11 glDispatchComputeIndirect((GLintptr)indirect); 12 } 13 14