Constructor

CoglAttributeBuffernew_with_size

Declaration [src]

CoglAttributeBuffer*
cogl_attribute_buffer_new_with_size (
  CoglContext* context,
  size_t bytes
)

Description [src]

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() 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.

Parameters

context

Type: CoglContext

A CoglContext.

The data is owned by the caller of the function.
bytes

Type: size_t

The number of bytes to allocate for vertex attribute data.

Return value

Type: CoglAttributeBuffer

A newly allocated CoglAttributeBuffer. Never NULL.

The caller of the function takes ownership of the data, and is responsible for freeing it.