org.lwjgl.opengles.OESVertexArrayObject 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.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Native bindings to the OES_vertex_array_object extension.
*
* This extension introduces vertex array objects which encapsulate vertex array states on the server side (vertex buffer objects). These objects aim to
* keep pointers to vertex data and to provide names for different sets of vertex data. Therefore applications are allowed to rapidly switch between
* different sets of vertex array state, and to easily return to the default vertex array state.
*/
public class OESVertexArrayObject {
/** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv. */
public static final int GL_VERTEX_ARRAY_BINDING_OES = 0x85B5;
static { GLES.initialize(); }
protected OESVertexArrayObject() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(GLESCapabilities caps) {
return checkFunctions(
caps.glBindVertexArrayOES, caps.glDeleteVertexArraysOES, caps.glGenVertexArraysOES, caps.glIsVertexArrayOES
);
}
// --- [ glBindVertexArrayOES ] ---
public static native void glBindVertexArrayOES(int array);
// --- [ glDeleteVertexArraysOES ] ---
public static native void nglDeleteVertexArraysOES(int n, long arrays);
public static void glDeleteVertexArraysOES(IntBuffer arrays) {
nglDeleteVertexArraysOES(arrays.remaining(), memAddress(arrays));
}
public static void glDeleteVertexArraysOES(int array) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
IntBuffer arrays = stack.ints(array);
nglDeleteVertexArraysOES(1, memAddress(arrays));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ glGenVertexArraysOES ] ---
public static native void nglGenVertexArraysOES(int n, long arrays);
public static void glGenVertexArraysOES(IntBuffer arrays) {
if (CHECKS) {
check(arrays, 1);
}
nglGenVertexArraysOES(arrays.remaining(), memAddress(arrays));
}
public static int glGenVertexArraysOES() {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
IntBuffer arrays = stack.callocInt(1);
nglGenVertexArraysOES(1, memAddress(arrays));
return arrays.get(0);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ glIsVertexArrayOES ] ---
public static native boolean glIsVertexArrayOES(int array);
/** Array version of: {@link #glDeleteVertexArraysOES DeleteVertexArraysOES} */
public static void glDeleteVertexArraysOES(int[] arrays) {
long __functionAddress = GLES.getICD().glDeleteVertexArraysOES;
if (CHECKS) {
check(__functionAddress);
}
callPV(__functionAddress, arrays.length, arrays);
}
/** Array version of: {@link #glGenVertexArraysOES GenVertexArraysOES} */
public static void glGenVertexArraysOES(int[] arrays) {
long __functionAddress = GLES.getICD().glGenVertexArraysOES;
if (CHECKS) {
check(__functionAddress);
check(arrays, 1);
}
callPV(__functionAddress, arrays.length, arrays);
}
}