Package org.lwjgl.opengl
Class ARBBufferObject
- java.lang.Object
-
- org.lwjgl.opengl.ARBBufferObject
-
- Direct Known Subclasses:
ARBPixelBufferObject,ARBVertexBufferObject,EXTPixelBufferObject
public class ARBBufferObject extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intGL_BUFFER_ACCESS_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:static intGL_BUFFER_MAP_POINTER_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:static intGL_BUFFER_MAPPED_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:static intGL_BUFFER_SIZE_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:static intGL_BUFFER_USAGE_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:static intGL_DYNAMIC_COPY_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_DYNAMIC_DRAW_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_DYNAMIC_READ_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_READ_ONLY_ARBAccepted by the <access> parameter of MapBufferARB:static intGL_READ_WRITE_ARBAccepted by the <access> parameter of MapBufferARB:static intGL_STATIC_COPY_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_STATIC_DRAW_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_STATIC_READ_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_STREAM_COPY_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_STREAM_DRAW_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_STREAM_READ_ARBAccepted by the <usage> parameter of BufferDataARB:static intGL_WRITE_ONLY_ARBAccepted by the <access> parameter of MapBufferARB:
-
Constructor Summary
Constructors Constructor Description ARBBufferObject()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidglBindBufferARB(int target, int buffer)static voidglBufferDataARB(int target, long data_size, int usage)static voidglBufferDataARB(int target, ByteBuffer data, int usage)static voidglBufferDataARB(int target, DoubleBuffer data, int usage)static voidglBufferDataARB(int target, FloatBuffer data, int usage)static voidglBufferDataARB(int target, IntBuffer data, int usage)static voidglBufferDataARB(int target, ShortBuffer data, int usage)static voidglBufferSubDataARB(int target, long offset, ByteBuffer data)static voidglBufferSubDataARB(int target, long offset, DoubleBuffer data)static voidglBufferSubDataARB(int target, long offset, FloatBuffer data)static voidglBufferSubDataARB(int target, long offset, IntBuffer data)static voidglBufferSubDataARB(int target, long offset, ShortBuffer data)static voidglDeleteBuffersARB(int buffer)Overloads glDeleteBuffersARB.static voidglDeleteBuffersARB(IntBuffer buffers)static intglGenBuffersARB()Overloads glGenBuffersARB.static voidglGenBuffersARB(IntBuffer buffers)static intglGetBufferParameterARB(int target, int pname)Deprecated.Will be removed in 3.0.static voidglGetBufferParameterARB(int target, int pname, IntBuffer params)static intglGetBufferParameteriARB(int target, int pname)Overloads glGetBufferParameterivARB.static ByteBufferglGetBufferPointerARB(int target, int pname)static voidglGetBufferSubDataARB(int target, long offset, ByteBuffer data)static voidglGetBufferSubDataARB(int target, long offset, DoubleBuffer data)static voidglGetBufferSubDataARB(int target, long offset, FloatBuffer data)static voidglGetBufferSubDataARB(int target, long offset, IntBuffer data)static voidglGetBufferSubDataARB(int target, long offset, ShortBuffer data)static booleanglIsBufferARB(int buffer)static ByteBufferglMapBufferARB(int target, int access, long length, ByteBuffer old_buffer)glMapBufferARB maps a GL buffer object to a ByteBuffer.static ByteBufferglMapBufferARB(int target, int access, ByteBuffer old_buffer)glMapBufferARB maps a GL buffer object to a ByteBuffer.static booleanglUnmapBufferARB(int target)
-
-
-
Field Detail
-
GL_STREAM_DRAW_ARB
public static final int GL_STREAM_DRAW_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_STREAM_READ_ARB
public static final int GL_STREAM_READ_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_STREAM_COPY_ARB
public static final int GL_STREAM_COPY_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_STATIC_DRAW_ARB
public static final int GL_STATIC_DRAW_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_STATIC_READ_ARB
public static final int GL_STATIC_READ_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_STATIC_COPY_ARB
public static final int GL_STATIC_COPY_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_DYNAMIC_DRAW_ARB
public static final int GL_DYNAMIC_DRAW_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_DYNAMIC_READ_ARB
public static final int GL_DYNAMIC_READ_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_DYNAMIC_COPY_ARB
public static final int GL_DYNAMIC_COPY_ARB
Accepted by the <usage> parameter of BufferDataARB:- See Also:
- Constant Field Values
-
GL_READ_ONLY_ARB
public static final int GL_READ_ONLY_ARB
Accepted by the <access> parameter of MapBufferARB:- See Also:
- Constant Field Values
-
GL_WRITE_ONLY_ARB
public static final int GL_WRITE_ONLY_ARB
Accepted by the <access> parameter of MapBufferARB:- See Also:
- Constant Field Values
-
GL_READ_WRITE_ARB
public static final int GL_READ_WRITE_ARB
Accepted by the <access> parameter of MapBufferARB:- See Also:
- Constant Field Values
-
GL_BUFFER_SIZE_ARB
public static final int GL_BUFFER_SIZE_ARB
Accepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
- Constant Field Values
-
GL_BUFFER_USAGE_ARB
public static final int GL_BUFFER_USAGE_ARB
Accepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
- Constant Field Values
-
GL_BUFFER_ACCESS_ARB
public static final int GL_BUFFER_ACCESS_ARB
Accepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
- Constant Field Values
-
GL_BUFFER_MAPPED_ARB
public static final int GL_BUFFER_MAPPED_ARB
Accepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
- Constant Field Values
-
GL_BUFFER_MAP_POINTER_ARB
public static final int GL_BUFFER_MAP_POINTER_ARB
Accepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
- Constant Field Values
-
-
Method Detail
-
glBindBufferARB
public static void glBindBufferARB(int target, int buffer)
-
glDeleteBuffersARB
public static void glDeleteBuffersARB(IntBuffer buffers)
-
glDeleteBuffersARB
public static void glDeleteBuffersARB(int buffer)
Overloads glDeleteBuffersARB.
-
glGenBuffersARB
public static void glGenBuffersARB(IntBuffer buffers)
-
glGenBuffersARB
public static int glGenBuffersARB()
Overloads glGenBuffersARB.
-
glIsBufferARB
public static boolean glIsBufferARB(int buffer)
-
glBufferDataARB
public static void glBufferDataARB(int target, long data_size, int usage)
-
glBufferDataARB
public static void glBufferDataARB(int target, ByteBuffer data, int usage)
-
glBufferDataARB
public static void glBufferDataARB(int target, DoubleBuffer data, int usage)
-
glBufferDataARB
public static void glBufferDataARB(int target, FloatBuffer data, int usage)
-
glBufferDataARB
public static void glBufferDataARB(int target, IntBuffer data, int usage)
-
glBufferDataARB
public static void glBufferDataARB(int target, ShortBuffer data, int usage)
-
glBufferSubDataARB
public static void glBufferSubDataARB(int target, long offset, ByteBuffer data)
-
glBufferSubDataARB
public static void glBufferSubDataARB(int target, long offset, DoubleBuffer data)
-
glBufferSubDataARB
public static void glBufferSubDataARB(int target, long offset, FloatBuffer data)
-
glBufferSubDataARB
public static void glBufferSubDataARB(int target, long offset, IntBuffer data)
-
glBufferSubDataARB
public static void glBufferSubDataARB(int target, long offset, ShortBuffer data)
-
glGetBufferSubDataARB
public static void glGetBufferSubDataARB(int target, long offset, ByteBuffer data)
-
glGetBufferSubDataARB
public static void glGetBufferSubDataARB(int target, long offset, DoubleBuffer data)
-
glGetBufferSubDataARB
public static void glGetBufferSubDataARB(int target, long offset, FloatBuffer data)
-
glGetBufferSubDataARB
public static void glGetBufferSubDataARB(int target, long offset, IntBuffer data)
-
glGetBufferSubDataARB
public static void glGetBufferSubDataARB(int target, long offset, ShortBuffer data)
-
glMapBufferARB
public static ByteBuffer glMapBufferARB(int target, int access, ByteBuffer old_buffer)
glMapBufferARB maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, 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); Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. The version of this method without an explicit length argument calls glGetBufferParameterARB internally to retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. The version of this method with an explicit length argument is a fast alternative to the one without. No GL call is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
Security warning: The length argument should match the buffer object size. Reading from or writing to outside the memory region that corresponds to the mapped buffer object will cause native crashes.- Parameters:
length- the length of the mapped memory in bytes.old_buffer- A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.- Returns:
- A ByteBuffer representing the mapped buffer memory.
-
glMapBufferARB
public static ByteBuffer glMapBufferARB(int target, int access, long length, ByteBuffer old_buffer)
glMapBufferARB maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, 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); Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. The version of this method without an explicit length argument calls glGetBufferParameterARB internally to retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. The version of this method with an explicit length argument is a fast alternative to the one without. No GL call is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
Security warning: The length argument should match the buffer object size. Reading from or writing to outside the memory region that corresponds to the mapped buffer object will cause native crashes.- Parameters:
length- the length of the mapped memory in bytes.old_buffer- A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.- Returns:
- A ByteBuffer representing the mapped buffer memory.
-
glUnmapBufferARB
public static boolean glUnmapBufferARB(int target)
-
glGetBufferParameterARB
public static void glGetBufferParameterARB(int target, int pname, IntBuffer params)
-
glGetBufferParameterARB
@Deprecated public static int glGetBufferParameterARB(int target, int pname)
Deprecated.Will be removed in 3.0. UseglGetBufferParameteriARB(int, int)instead.Overloads glGetBufferParameterivARB.
-
glGetBufferParameteriARB
public static int glGetBufferParameteriARB(int target, int pname)Overloads glGetBufferParameterivARB.
-
glGetBufferPointerARB
public static ByteBuffer glGetBufferPointerARB(int target, int pname)
-
-