table of contents
| GLBUFFERDATA(3G) | [FIXME: manual] | GLBUFFERDATA(3G) |
NAME¶
glBufferData - creates and initializes a buffer object's data storeC SPECIFICATION¶
void
glBufferData(GLenum target,
GLsizeiptr size,
const GLvoid * data,
GLenum usage);
PARAMETERS¶
targetSpecifies the target buffer object. The
symbolic constant must be GL_ARRAY_BUFFER, GL_COPY_READ_BUFFER,
GL_COPY_WRITE_BUFFER, GL_ELEMENT_ARRAY_BUFFER,
GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER,
GL_TEXTURE_BUFFER, GL_TRANSFORM_FEEDBACK_BUFFER, or
GL_UNIFORM_BUFFER.
size
Specifies the size in bytes of the buffer
object's new data store.
data
Specifies a pointer to data that will be
copied into the data store for initialization, or NULL if no data is to
be copied.
usage
Specifies the expected usage pattern of the
data store. The symbolic constant must be GL_STREAM_DRAW,
GL_STREAM_READ, GL_STREAM_COPY, GL_STATIC_DRAW,
GL_STATIC_READ, GL_STATIC_COPY, GL_DYNAMIC_DRAW,
GL_DYNAMIC_READ, or GL_DYNAMIC_COPY.
DESCRIPTION¶
The data store contents will be modified once
and used at most a few times.
STATIC
The data store contents will be modified once
and used many times.
DYNAMIC
The data store contents will be modified
repeatedly and used many times.
The nature of access may be one of these:
DRAW
The data store contents are modified by the
application, and used as the source for GL drawing and image specification
commands.
READ
The data store contents are modified by
reading data from the GL, and used to return that data when queried by the
application.
COPY
The data store contents are modified by
reading data from the GL, and used as the source for GL drawing and image
specification commands.
NOTES¶
If data is NULL, a data store of the specified size is still created, but its contents remain uninitialized and thus undefined. Clients must align data elements consistent with the requirements of the client platform, with an additional base-level requirement that an offset within a buffer to a datum comprising N bytes be a multiple of N.ERRORS¶
ASSOCIATED GETS¶
SEE ALSO¶
COPYRIGHT¶
Copyright © 2005 Addison-Wesley. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.| 05/30/2012 | [FIXME: source] |