/* MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.opengl; import org.lwjgl.LWJGLException; import org.lwjgl.BufferChecks; import java.nio.*; public class ARBBufferObject { public static final int GL_BUFFER_MAP_POINTER_ARB = 0x88bd; public static final int GL_BUFFER_MAPPED_ARB = 0x88bc; public static final int GL_BUFFER_ACCESS_ARB = 0x88bb; public static final int GL_BUFFER_USAGE_ARB = 0x8765; public static final int GL_BUFFER_SIZE_ARB = 0x8764; public static final int GL_READ_WRITE_ARB = 0x88ba; public static final int GL_WRITE_ONLY_ARB = 0x88b9; public static final int GL_READ_ONLY_ARB = 0x88b8; public static final int GL_DYNAMIC_COPY_ARB = 0x88ea; public static final int GL_DYNAMIC_READ_ARB = 0x88e9; public static final int GL_DYNAMIC_DRAW_ARB = 0x88e8; public static final int GL_STATIC_COPY_ARB = 0x88e6; public static final int GL_STATIC_READ_ARB = 0x88e5; public static final int GL_STATIC_DRAW_ARB = 0x88e4; public static final int GL_STREAM_COPY_ARB = 0x88e2; public static final int GL_STREAM_READ_ARB = 0x88e1; public static final int GL_STREAM_DRAW_ARB = 0x88e0; static native void initNativeStubs() throws LWJGLException; public static java.nio.ByteBuffer glGetBufferPointerARB(int target, int pname, int result_size) { java.nio.ByteBuffer __result = nglGetBufferPointervARB(target, pname, result_size); return __result; } private static native java.nio.ByteBuffer nglGetBufferPointervARB(int target, int pname, int result_size); public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params, 4); nglGetBufferParameterivARB(target, pname, params, params.position()); } private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_position); public static native boolean glUnmapBufferARB(int target); /** * glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, * in which case a new ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null, * it will be returned if it points to the same mapped memory, otherwise a new ByteBuffer is created. That * way, an application will normally use glMapBufferARB like this: *
* ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer); * @param result_size The size of the buffer area. * @param old_buffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and no new buffer will be created. In that case, size is ignored. * @return A ByteBuffer representing the mapped buffer memory. */ public static java.nio.ByteBuffer glMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer) { if (old_buffer != null) BufferChecks.checkDirect(old_buffer); java.nio.ByteBuffer __result = nglMapBufferARB(target, access, result_size, old_buffer); return __result; } private static native java.nio.ByteBuffer nglMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer); public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) { BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining()), data, data.position()); } public static void glGetBufferSubDataARB(int target, int offset, IntBuffer data) { BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) { BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1); } public static void glGetBufferSubDataARB(int target, int offset, FloatBuffer data) { BufferChecks.checkDirect(data); nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position); public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) { BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining()), data, data.position()); } public static void glBufferSubDataARB(int target, int offset, IntBuffer data) { BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) { BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1); } public static void glBufferSubDataARB(int target, int offset, FloatBuffer data) { BufferChecks.checkDirect(data); nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2); } private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position); public static void glBufferDataARB(int target, int size, int usage) { nglBufferDataARB(target, size, null, 0, usage); } public static void glBufferDataARB(int target, ByteBuffer data, int usage) { BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining()), data, data.position(), usage); } public static void glBufferDataARB(int target, IntBuffer data, int usage) { BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage); } public static void glBufferDataARB(int target, ShortBuffer data, int usage) { BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 1), data, data.position() << 1, usage); } public static void glBufferDataARB(int target, FloatBuffer data, int usage) { BufferChecks.checkDirect(data); nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage); } private static native void nglBufferDataARB(int target, int size, Buffer data, int data_position, int usage); public static native boolean glIsBufferARB(int buffer); public static void glGenBuffersARB(IntBuffer buffers) { BufferChecks.checkDirect(buffers); nglGenBuffersARB((buffers.remaining()), buffers, buffers.position()); } private static native void nglGenBuffersARB(int n, IntBuffer buffers, int buffers_position); public static void glDeleteBuffersARB(IntBuffer buffers) { BufferChecks.checkDirect(buffers); BufferObjectTracker.deleteBuffers(buffers); nglDeleteBuffersARB((buffers.remaining()), buffers, buffers.position()); } private static native void nglDeleteBuffersARB(int n, IntBuffer buffers, int buffers_position); public static void glBindBufferARB(int target, int buffer) { BufferObjectTracker.bindBuffer(target, buffer); nglBindBufferARB(target, buffer); } private static native void nglBindBufferARB(int target, int buffer); }