Graphics Reference
In-Depth Information
(continued)
readoffset
offset in bytes into the read buffer data to copy from.
writeoffset
offset in bytes into the write buffer data to copy to.
size
the number of bytes to copy from the read buffer
data to the write buffer data.
Calling
glCopyBufferSubData
will copy the specified bytes from
the buffer bound to the
readtarget
to the
writetarget
. The buffer
binding is determined based on the last call to
glBindBuffer
for
each target. Any type of buffer object (array, element array, transform
feedback, and so on) can be bound to the
GL_COPY_READ_BUFFER
or
GL_COPY_WRITE_BUFFER
target. These two targets are provided as a
convenience so that the application doesn't have to change any of the
true buffer bindings to perform a copy between buffers.
This chapter explored how vertex attributes and data are specified in
OpenGL ES 3.0. Specifically, it covered the following topics:
• How to specify constant vertex attributes using the
glVertexAttrib*
functions and vertex arrays using the
glVertexAttrib[I]Pointer
functions
• How to create and store vertex attribute and element data in vertex
buffer objects
• How vertex array state is encapsulated in vertex array objects and how
to use VAOs to improve performance
• The variety of methods for loading buffer objects with data:
glBuffer[Sub]Data
,
glMapBufferRange
, and
glCopyBufferSubData
Now that we know how vertex data are specified, the next chapter covers
all of the primitives that can be drawn in OpenGL ES using vertex data.