Graphics Reference
In-Depth Information
Note that glGenBuffers is not required to assign a buffer object name
before it is bound using glBindBuffer . Alternatively, an application can
specify an unused buffer object name with glBindBuffer . However, we
recommend that OpenGL ES applications call glGenBuffers and use
buffer object names returned by glGenBuffers instead of specifying their
own buffer object names.
The state associated with a buffer object can be categorized as follows:
GL_BUFFER_SIZE . This refers to the size of the buffer object data that
is specified by glBufferData . The initial value when the buffer object
is first bound using glBindBuffer is 0 .
GL_BUFFER_USAGE . This is a hint as to how the application will use the
data stored in the buffer object. It is described in detail in Table 6-2.
The initial value is GL_STATIC_DRAW .
Table 6-2
Buffer Usage
Buffer Usage Enum
Description
GL_STATIC_DRAW
The buffer object data will be modified once and used
many times to draw primitives or specify images.
GL_STATIC_READ
The buffer object data will be modified once and used
many times to read data back from OpenGL ES. The
data read back from OpenGL ES will be queried for
from the application.
GL_STATIC_COPY
The buffer object data will be modified once and used
many times to read data back from OpenGL ES. The
data read back from OpenGL ES will be used directly as
a source to draw primitives or specify images.
GL_DYNAMIC_DRAW
The buffer object data will be modified repeatedly and
used many times to draw primitives or specify images.
GL_DYNAMIC_READ
The buffer object will be modified repeatedly and used
many times to read data back from OpenGL ES. The
data read back from OpenGL ES will be queried for
from the application.
GL_DYNAMIC_COPY
The buffer object data will be modified repeatedly and
used many times to read data back from OpenGL ES.
The data read back from OpenGL ES will be used
directly as a source to draw primitives or specify
images.
(continues)
 
 
Search WWH ::




Custom Search