Graphics Reference
In-Depth Information
GL_TRANSFORM_FEEDBACK_BUFFER
GL_UNIFORM_BUFFER
offset
offset in bytes from the beginning of the mapped buffer
length
number of bytes of the buffer from offset to flush
If an application maps with
GL_MAP_FLUSH_EXPLICIT_BIT
but does not
explicitly flush a modified region with
glFlushMappedBufferRange
,
its contents will be undefined.
So far, we have shown how to load buffer objects with data using
glBufferData
,
glBufferSubData
, and
glMapBufferRange
. All of these
techniques involve transferring data from the application to the device. It
is also possible with OpenGL ES 3.0 to copy data from one buffer object
to another entirely on the device. This can be done using the function
glCopyBufferSubData
.
void
glCopyBufferSubData
(GLenum
readtarget
,
GLenum
writetarget
,
GLintptr
readoffset
,
GLintptr
writeoffset
,
GLsizeiptr
size
)
readtarget
the buffer object target to read from.
writetarget
the buffer object target to write to. Both
readtarget
and
writetarget
can be set to any of the following
targets (although they must not be the same target):
GL_ARRAY_BUFFER
GL_ELEMENT_ARRAY_BUFFER
GL_COPY_READ_BUFFER
GL_COPY_WRITE_BUFFER
GL_PIXEL_PACK_BUFFER
GL_PIXEL_UNPACK_BUFFER
GL_TRANSFORM_FEEDBACK_BUFFER
GL_UNIFORM_BUFFER
(continues)