Package org.lwjgl.opengl
Class ARBBufferObject
java.lang.Object
org.lwjgl.opengl.ARBBufferObject
- Direct Known Subclasses:
ARBPixelBufferObject
,ARBVertexBufferObject
,EXTPixelBufferObject
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Accepted by the <pname> parameter of GetBufferParameterivARB:static final int
Accepted by the <pname> parameter of GetBufferParameterivARB:static final int
Accepted by the <pname> parameter of GetBufferParameterivARB:static final int
Accepted by the <pname> parameter of GetBufferParameterivARB:static final int
Accepted by the <pname> parameter of GetBufferParameterivARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <access> parameter of MapBufferARB:static final int
Accepted by the <access> parameter of MapBufferARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <usage> parameter of BufferDataARB:static final int
Accepted by the <access> parameter of MapBufferARB: -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
glBindBufferARB
(int target, int buffer) static void
glBufferDataARB
(int target, long data_size, int usage) static void
glBufferDataARB
(int target, ByteBuffer data, int usage) static void
glBufferDataARB
(int target, DoubleBuffer data, int usage) static void
glBufferDataARB
(int target, FloatBuffer data, int usage) static void
glBufferDataARB
(int target, IntBuffer data, int usage) static void
glBufferDataARB
(int target, ShortBuffer data, int usage) static void
glBufferSubDataARB
(int target, long offset, ByteBuffer data) static void
glBufferSubDataARB
(int target, long offset, DoubleBuffer data) static void
glBufferSubDataARB
(int target, long offset, FloatBuffer data) static void
glBufferSubDataARB
(int target, long offset, IntBuffer data) static void
glBufferSubDataARB
(int target, long offset, ShortBuffer data) static void
glDeleteBuffersARB
(int buffer) Overloads glDeleteBuffersARB.static void
glDeleteBuffersARB
(IntBuffer buffers) static int
Overloads glGenBuffersARB.static void
glGenBuffersARB
(IntBuffer buffers) static int
glGetBufferParameterARB
(int target, int pname) Deprecated.Will be removed in 3.0.static void
glGetBufferParameterARB
(int target, int pname, IntBuffer params) static int
glGetBufferParameteriARB
(int target, int pname) Overloads glGetBufferParameterivARB.static ByteBuffer
glGetBufferPointerARB
(int target, int pname) static void
glGetBufferSubDataARB
(int target, long offset, ByteBuffer data) static void
glGetBufferSubDataARB
(int target, long offset, DoubleBuffer data) static void
glGetBufferSubDataARB
(int target, long offset, FloatBuffer data) static void
glGetBufferSubDataARB
(int target, long offset, IntBuffer data) static void
glGetBufferSubDataARB
(int target, long offset, ShortBuffer data) static boolean
glIsBufferARB
(int buffer) static ByteBuffer
glMapBufferARB
(int target, int access, long length, ByteBuffer old_buffer) glMapBufferARB maps a GL buffer object to a ByteBuffer.static ByteBuffer
glMapBufferARB
(int target, int access, ByteBuffer old_buffer) glMapBufferARB maps a GL buffer object to a ByteBuffer.static boolean
glUnmapBufferARB
(int target)
-
Field Details
-
GL_STREAM_DRAW_ARB
public static final int GL_STREAM_DRAW_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_STREAM_READ_ARB
public static final int GL_STREAM_READ_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_STREAM_COPY_ARB
public static final int GL_STREAM_COPY_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_STATIC_DRAW_ARB
public static final int GL_STATIC_DRAW_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_STATIC_READ_ARB
public static final int GL_STATIC_READ_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_STATIC_COPY_ARB
public static final int GL_STATIC_COPY_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_DYNAMIC_DRAW_ARB
public static final int GL_DYNAMIC_DRAW_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_DYNAMIC_READ_ARB
public static final int GL_DYNAMIC_READ_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_DYNAMIC_COPY_ARB
public static final int GL_DYNAMIC_COPY_ARBAccepted by the <usage> parameter of BufferDataARB:- See Also:
-
GL_READ_ONLY_ARB
public static final int GL_READ_ONLY_ARBAccepted by the <access> parameter of MapBufferARB:- See Also:
-
GL_WRITE_ONLY_ARB
public static final int GL_WRITE_ONLY_ARBAccepted by the <access> parameter of MapBufferARB:- See Also:
-
GL_READ_WRITE_ARB
public static final int GL_READ_WRITE_ARBAccepted by the <access> parameter of MapBufferARB:- See Also:
-
GL_BUFFER_SIZE_ARB
public static final int GL_BUFFER_SIZE_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
-
GL_BUFFER_USAGE_ARB
public static final int GL_BUFFER_USAGE_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
-
GL_BUFFER_ACCESS_ARB
public static final int GL_BUFFER_ACCESS_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
-
GL_BUFFER_MAPPED_ARB
public static final int GL_BUFFER_MAPPED_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
-
GL_BUFFER_MAP_POINTER_ARB
public static final int GL_BUFFER_MAP_POINTER_ARBAccepted by the <pname> parameter of GetBufferParameterivARB:- See Also:
-
-
Constructor Details
-
ARBBufferObject
public ARBBufferObject()
-
-
Method Details
-
glBindBufferARB
public static void glBindBufferARB(int target, int buffer) -
glDeleteBuffersARB
-
glDeleteBuffersARB
public static void glDeleteBuffersARB(int buffer) Overloads glDeleteBuffersARB. -
glGenBuffersARB
-
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
-
glBufferDataARB
-
glBufferDataARB
-
glBufferDataARB
-
glBufferDataARB
-
glBufferSubDataARB
-
glBufferSubDataARB
-
glBufferSubDataARB
-
glBufferSubDataARB
-
glBufferSubDataARB
-
glGetBufferSubDataARB
-
glGetBufferSubDataARB
-
glGetBufferSubDataARB
-
glGetBufferSubDataARB
-
glGetBufferSubDataARB
-
glMapBufferARB
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
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
-
glGetBufferParameterARB
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
-