Cogl.AttributeBuffer.new_with_size

function new_with_size(context: Cogl.Context, bytes: Number(gsize)): Cogl.AttributeBuffer {
    // Gjs wrapper for cogl_attribute_buffer_new_with_size()
}
  

Describes a new Cogl.AttributeBuffer 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

context

A Cogl.Context

bytes

The number of bytes to allocate for vertex attribute data.

Returns

A newly allocated Cogl.AttributeBuffer. Never null.