Primitive.with_attributes


Description:

public Primitive.with_attributes (VerticesMode mode, int n_vertices, Attribute attributes, int n_attributes)

Combines a set of Attribute<!-- -->s with a specific draw mode and defines a vertex count so a Primitive object can be retained and drawn later with no addition information required.

The value passed as n_vertices will simply update the Primitive < structfield>n_vertices</structfield> property as if set_n_vertices were called. This property defines the number of vertices to read when drawing.

Parameters:

mode

A VerticesMode defining how to draw the vertices

n_vertices

The number of vertices to process when drawing

attributes

An array of CoglAttribute

n_attributes

The number of attributes

Returns:

A newly allocated Primitive object