Graphics Reference
In-Depth Information
The glMapBufferRange command returns a pointer to all of or a portion
(range) of the data storage for the buffer object. This pointer can be used
by the application to read or update the contents of the buffer object. The
glUnmapBuffer command is used to indicate that the updates have been
completed and to release the mapped pointer.
void * glMapBufferRange (GLenum target , GLintptr offset,
GLsizeiptr length , GLbitfield
access )
target
can be set to any of the following targets:
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
offset
offset in bytes into the buffer data store
length
number of bytes of the buffer data to map
access
a bitfield combination of access flags. The application
must specify at least one of the following flags:
GL_MAP_READ_BIT
The application will read from
the returned pointer.
GL_MAP_WRITE_BIT
The application will write to
the returned pointer.
Additionally, the application may include the following
optional access flags:
GL_MAP_INVALIDATE_RANGE_BIT
Indicates that the contents of
the buffer within the specified
range can be discarded by the
driver before returning the
pointer. This flag cannot be
used in combination with
GL_MAP_READ_BIT .
(continues)
 
 
Search WWH ::




Custom Search