Cogl.Primitive.new_with_attributes
Description: Reference for Cogl.Primitive.new_with_attributes

### Constructor

# Cogl Primitivenew_with_attributes

#### Declaration [src]

    CoglPrimitive*
    cogl_primitive_new_with_attributes (
      CoglVerticesMode mode,
      int n_vertices,
      CoglAttribute** attributes,
      int n_attributes
    )

#### Description [src]

Combines a set of `CoglAttribute`s with a specific draw `mode` and defines a vertex count so a `CoglPrimitive` object can be retained and drawn later with no addition information required.

The value passed as `n_vertices` will simply update the `CoglPrimitive` `n_vertices` property as if `cogl_primitive_set_n_vertices()` were called. This property defines the number of vertices to read when drawing.

#### Parameters

`mode`

  Type: `CoglVerticesMode`

  A `CoglVerticesMode` defining how to draw the vertices.

`n_vertices`

  Type: `int`

  The number of vertices to process when drawing.

`attributes`

  Type: An array of `CoglAttribute*`

  An array of CoglAttribute.

  The length of the array is specified in the `n_attributes` argument.
  The data is owned by the caller of the function.

`n_attributes`

  Type: `int`

  The number of attributes.

#### Return value

Type: `CoglPrimitive`

A newly allocated `CoglPrimitive` object.

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