Cogl.Primitive
Description: Reference for Cogl.Primitive

### Class

# CoglPrimitive

#### Description [src]

    final class Cogl.Primitive : GObject.Object
    {
      /* No available fields */
    }

Functions for creating, manipulating and drawing primitives.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### cogl_primitive_new

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.

###### cogl_primitive_new_p2

Provides a convenient way to describe a primitive, such as a single triangle strip or a triangle fan, that will internally allocate the necessary `CoglAttributeBuffer` storage, describe the position attribute with a `CoglAttribute` and upload your data.

###### cogl_primitive_new_p2c4

Provides a convenient way to describe a primitive, such as a single triangle strip or a triangle fan, that will internally allocate the necessary `CoglAttributeBuffer` storage, describe the position and color attributes with `CoglAttribute`s and upload your data.

###### cogl_primitive_new_p2t2

Provides a convenient way to describe a primitive, such as a single triangle strip or a triangle fan, that will internally allocate the necessary `CoglAttributeBuffer` storage, describe the position and texture coordinate attributes with `CoglAttribute`s and upload your data.

###### cogl_primitive_new_p3

Provides a convenient way to describe a primitive, such as a single triangle strip or a triangle fan, that will internally allocate the necessary `CoglAttributeBuffer` storage, describe the position attribute with a `CoglAttribute` and upload your data.

###### cogl_primitive_new_p3t2

Provides a convenient way to describe a primitive, such as a single triangle strip or a triangle fan, that will internally allocate the necessary `CoglAttributeBuffer` storage, describe the position and texture coordinate attributes with `CoglAttribute`s and upload your data.

###### cogl_primitive_new_with_attributes

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.

#### Instance methods

###### cogl_primitive_draw

Draws the given `primitive` geometry to the specified destination `framebuffer` using the graphics processing state described by `pipeline`.

###### cogl_primitive_set_first_vertex

No description available.

###### cogl_primitive_set_indices

Associates a sequence of `CoglIndices` with the given `primitive`.

###### cogl_primitive_set_n_vertices

Specifies how many vertices should be read when drawing the given `primitive`.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct CoglPrimitiveClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.