glBindBuffer, glBufferSubData, glMapBuffer, glUnmapBuffer
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/.
Page generated by adrdox
glBufferData: man2/glBufferData.xml
glBufferData creates a new data store for the buffer object currently bound to target. Any pre-existing data store is deleted. The new data store is created with the specified size in bytes and usage. If data is not null, the data store is initialized with data from this pointer. In its initial state, the new data store is not mapped, it has a null mapped pointer, and its mapped access is GL_READ_WRITE. usage is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. usage can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The frequency of access may be one of these: The nature of access may be one of these:
glBufferData is available only if the GL version is 1.5 or greater. Targets GL_PIXEL_PACK_BUFFER and GL_PIXEL_UNPACK_BUFFER are available only if the GL version is 2.1 or greater. 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.