| Top |
CoglAttributeBuffer: Buffers of vertex attributesCoglAttributeBuffer: Buffers of vertex attributes — Functions for creating and manipulating attribute buffers |
CoglAttributeBuffer * cogl_attribute_buffer_new_with_size (CoglContext *context,size_t bytes);
Describes a new CoglAttributeBuffer of size
bytes to contain
arrays of vertex attribute data. Afterwards data can be set using
cogl_buffer_set_data() or by mapping it into the application's
address space using cogl_buffer_map().
The underlying storage of this buffer isn't allocated by this
function so that you have an opportunity to use the
cogl_buffer_set_update_hint() and cogl_buffer_set_usage_hint()
functions which may influence how the storage is allocated. The
storage will be allocated once you upload data to the buffer.
Note: You can assume this function always succeeds and won't return
NULL
Stability Level: Unstable
CoglAttributeBuffer * cogl_attribute_buffer_new (CoglContext *context,size_t bytes,const void *data);
Describes a new CoglAttributeBuffer of size
bytes to contain
arrays of vertex attribute data and also uploads size
bytes read
from data
to the new buffer.
You should never pass a NULL data pointer.
NULL and so you can assume this function
always succeeds.cogl_attribute_buffer_new_with_size() and then
explicitly catch errors with cogl_buffer_set_data() or
cogl_buffer_map().context |
||
bytes |
The number of bytes to allocate for vertex attribute data. |
|
data |
An optional pointer to vertex data to upload immediately. |
[array length=bytes] |
Since: 1.4
Stability Level: Unstable
CoglBool
cogl_is_attribute_buffer (void *object);
Gets whether the given object references a CoglAttributeBuffer.
Since: 1.4
Stability Level: Unstable