public class ARBCopyBuffer
extends java.lang.Object
This extension provides a mechanism to do an accelerated copy from one buffer object to another. This may be useful to load buffer objects in a "loading thread" while minimizing cost and synchronization effort in the "rendering thread."
Promoted to core in OpenGL 3.1.
| Modifier and Type | Field and Description |
|---|---|
static int |
GL_COPY_READ_BUFFER
Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, MapBufferRange,
FlushMappedBufferRange, GetBufferParameteriv, BindBufferRange, BindBufferBase, and CopyBufferSubData.
|
static int |
GL_COPY_WRITE_BUFFER
Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, MapBufferRange,
FlushMappedBufferRange, GetBufferParameteriv, BindBufferRange, BindBufferBase, and CopyBufferSubData.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
glCopyBufferSubData(int readTarget,
int writeTarget,
long readOffset,
long writeOffset,
long size)
Copies all or part of one buffer object's data store to the data store of another buffer object.
|
public static final int GL_COPY_READ_BUFFER
public static final int GL_COPY_WRITE_BUFFER
public static void glCopyBufferSubData(int readTarget,
int writeTarget,
long readOffset,
long writeOffset,
long size)
An INVALID_VALUE error is generated if any of readoffset, writeoffset, or size are negative, if readoffset+size exceeds the size of the buffer object
bound to readtarget, or if writeoffset+size exceeds the size of the buffer object bound to writetarget.
An INVALID_VALUE error is generated if the same buffer object is bound to both readtarget and writetarget, and the ranges [readoffset, readoffset+size)
and [writeoffset, writeoffset+size) overlap.
An INVALID_OPERATION error is generated if zero is bound to readtarget or writetarget.
An INVALID_OPERATION error is generated if the buffer objects bound to either readtarget or writetarget are mapped.
readTarget - the source buffer object target. One of:ARRAY_BUFFER | COPY_READ_BUFFER | COPY_WRITE_BUFFER | ELEMENT_ARRAY_BUFFER |
PIXEL_PACK_BUFFER | PIXEL_UNPACK_BUFFER | TRANSFORM_FEEDBACK_BUFFER | TEXTURE_BUFFER |
UNIFORM_BUFFER |
writeTarget - the destination buffer object targetreadOffset - the source buffer object offset, in byteswriteOffset - the destination buffer object offset, in bytessize - the number of bytes to copyCopyright LWJGL. All Rights Reserved. License terms.