Cogl.IndexBuffer.new
Description: Reference for Cogl.IndexBuffer.new

### Constructor

# Cogl IndexBuffernew

#### Declaration [src]

    CoglIndexBuffer*
    cogl_index_buffer_new (
      CoglContext* context,
      size_t bytes
    )

#### Description [src]

Declares a new `CoglIndexBuffer` of `size` bytes to contain vertex indices. Once declared, data can be set using `cogl_buffer_set_data()` or by mapping it into the application’s address space using cogl_buffer_map().

#### 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: `CoglIndexBuffer`

A newly allocated `CoglIndexBuffer`.

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