Cogl.Primitive.new_with_attributes

function new_with_attributes(mode: Cogl.VerticesMode, n_vertices: Number(gint), attributes: Cogl.Attribute, n_attributes: Number(gint)): Cogl.Primitive {
    // Gjs wrapper for cogl_primitive_new_with_attributes()
}
  

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

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

Since 1.6

mode

A Cogl.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 Cogl.Primitive object