org.lwjgl.opengles.EXTMultiDrawArrays Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-opengles Show documentation
Show all versions of lwjgl-opengles Show documentation
A royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems - including consoles, phones, appliances and vehicles.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.opengles;
import java.nio.*;
import org.lwjgl.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Native bindings to the EXT_multi_draw_arrays extension.
*
* These functions behave identically to the standard OpenGL 1.1 functions glDrawArrays() and glDrawElements() except they handle multiple lists of
* vertices in one call. Their main purpose is to allow one function call to render more than one primitive such as triangle strip, triangle fan, etc.
*/
public class EXTMultiDrawArrays {
static { GLES.initialize(); }
protected EXTMultiDrawArrays() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(GLESCapabilities caps) {
return checkFunctions(
caps.glMultiDrawArraysEXT, caps.glMultiDrawElementsEXT
);
}
// --- [ glMultiDrawArraysEXT ] ---
public static native void nglMultiDrawArraysEXT(int mode, long first, long count, int primcount);
public static void glMultiDrawArraysEXT(int mode, IntBuffer first, IntBuffer count) {
if (CHECKS) {
check(count, first.remaining());
}
nglMultiDrawArraysEXT(mode, memAddress(first), memAddress(count), first.remaining());
}
// --- [ glMultiDrawElementsEXT ] ---
public static native void nglMultiDrawElementsEXT(int mode, long count, int type, long indices, int primcount);
public static void glMultiDrawElementsEXT(int mode, IntBuffer count, int type, PointerBuffer indices) {
if (CHECKS) {
check(indices, count.remaining());
}
nglMultiDrawElementsEXT(mode, memAddress(count), type, memAddress(indices), count.remaining());
}
/** Array version of: {@link #glMultiDrawArraysEXT MultiDrawArraysEXT} */
public static void glMultiDrawArraysEXT(int mode, int[] first, int[] count) {
long __functionAddress = GLES.getICD().glMultiDrawArraysEXT;
if (CHECKS) {
check(__functionAddress);
check(count, first.length);
}
callPPV(__functionAddress, mode, first, count, first.length);
}
/** Array version of: {@link #glMultiDrawElementsEXT MultiDrawElementsEXT} */
public static void glMultiDrawElementsEXT(int mode, int[] count, int type, PointerBuffer indices) {
long __functionAddress = GLES.getICD().glMultiDrawElementsEXT;
if (CHECKS) {
check(__functionAddress);
check(indices, count.length);
}
callPPV(__functionAddress, mode, count, type, memAddress(indices), count.length);
}
}