AttributeBuffer.with_size


Description:

public AttributeBuffer.with_size (Context context, ulong bytes)

Describes a new AttributeBuffer of size bytes to contain arrays of vertex attribute data.

Afterwards data can be set using set_data or by mapping it into the application's address space using map.

The underlying storage of this buffer isn't allocated by this function so that you have an opportunity to use the 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

Parameters:

context

A Context

bytes

The number of bytes to allocate for vertex attribute data.

Returns:

A newly allocated AttributeBuffer. Never null.