Lines Matching refs:indirect
336 /* void glDispatchComputeIndirect ( GLintptr indirect ) */
337 static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
338 // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
342 if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
343 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
346 glDispatchComputeIndirect((GLintptr)indirect);
349 /* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
350 static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
351 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
354 if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
355 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
358 glDrawArraysIndirect(mode, (const void*)indirect);
361 /* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
362 static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
363 // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
366 if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
367 jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
370 glDrawElementsIndirect(mode, type, (const void*)indirect);