| Cogl 2.0 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
CoglAttributeBuffer: Buffers of vertex attributesCoglAttributeBuffer: Buffers of vertex attributes — Functions for creating and manipulating attribute buffers |
CoglAttributeBuffer; CoglAttributeBuffer * cogl_attribute_buffer_new_with_size (CoglContext *context,size_t bytes); CoglAttributeBuffer * cogl_attribute_buffer_new (CoglContext *context,size_t bytes,const void *data); CoglBool cogl_is_attribute_buffer (void *object);
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
|
A CoglContext |
|
The number of bytes to allocate for vertex attribute data. |
Returns : |
A newly allocated CoglAttributeBuffer. Never NULL. [transfer full]
|
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().
|
A CoglContext |
|
The number of bytes to allocate for vertex attribute data. |
|
An optional pointer to vertex data to upload immediately. [array length=bytes] |
Returns : |
A newly allocated CoglAttributeBuffer (never NULL). [transfer full]
|
Since 1.4
Stability Level: Unstable
CoglBool cogl_is_attribute_buffer (void *object);
Gets whether the given object references a CoglAttributeBuffer.
|
A CoglObject |
Returns : |
TRUE if object references a CoglAttributeBuffer,
FALSE otherwise |
Since 1.4
Stability Level: Unstable