Cogl.Pipeline
Description: Reference for Cogl.Pipeline

### Class

# CoglPipeline

since: 13

#### Description

    final class Cogl.Pipeline : GObject.TypeInstance
    {
      /* No available fields */
    }

No description available.

Available since: 13

#### Ancestors

- CoglObject

#### Constructors

###### cogl_pipeline_new

Allocates and initializes a default simple pipeline that will color a primitive white.

since: 13

#### Instance methods

###### cogl_pipeline_add_layer_snippet

Adds a shader snippet that will hook on to the given layer of the pipeline. The exact part of the pipeline that the snippet wraps around depends on the hook that is given to cogl_snippet_new(). Note that some hooks can’t be used with a layer and need to be added with `cogl_pipeline_add_snippet()` instead.

since: 13

###### cogl_pipeline_add_snippet

Adds a shader snippet to `pipeline`. The snippet will wrap around or replace some part of the pipeline as defined by the hook point in `snippet`. Note that some hook points are specific to a layer and must be added with `cogl_pipeline_add_layer_snippet()` instead.

since: 13

###### cogl_pipeline_copy

Creates a new pipeline with the configuration copied from the source pipeline.

since: 13

###### cogl_pipeline_foreach_layer

Iterates all the layer indices of the given `pipeline`.

since: 13

###### cogl_pipeline_get_alpha_test_function

No description available.

since: 13

###### cogl_pipeline_get_alpha_test_reference

No description available.

since: 13

###### cogl_pipeline_get_color

Retrieves the current pipeline color.

since: 13

###### cogl_pipeline_get_cull_face_mode

No description available.

since: 13

###### cogl_pipeline_get_depth_state

Retrieves the current depth state configuration for the given `pipeline` as previously set using cogl_pipeline_set_depth_state().

since: 13

###### cogl_pipeline_get_front_face_winding

The order of the vertices within a primitive specifies whether it is considered to be front or back facing. This function specifies which order is considered to be the front faces. `COGL_WINDING_COUNTER_CLOCKWISE` sets the front faces to primitives with vertices in a counter-clockwise order and `COGL_WINDING_CLOCKWISE` sets them to be clockwise. The default is `COGL_WINDING_COUNTER_CLOCKWISE`.

since: 13

###### cogl_pipeline_get_layer_filters

Returns the decimation and interpolation filters used when a texture is drawn at other scales than 100%.

since: 13

###### cogl_pipeline_get_layer_point_sprite_coords_enabled

Gets whether point sprite coordinate generation is enabled for this texture layer.

since: 13

###### cogl_pipeline_get_layer_texture

No description available.

since: 13

###### cogl_pipeline_get_layer_wrap_mode_s

Returns the wrap mode for the ‘s’ coordinate of texture lookups on this layer.

since: 13

###### cogl_pipeline_get_layer_wrap_mode_t

Returns the wrap mode for the ‘t’ coordinate of texture lookups on this layer.

since: 13

###### cogl_pipeline_get_n_layers

Retrieves the number of layers defined for the given `pipeline`.

since: 13

###### cogl_pipeline_get_per_vertex_point_size

No description available.

since: 13

###### cogl_pipeline_get_point_size

Get the size of points drawn when `COGL_VERTICES_MODE_POINTS` is used with the vertex buffer API.

since: 13

###### cogl_pipeline_get_uniform_location

This is used to get an integer representing the uniform with the name `uniform_name`. The integer can be passed to functions such as `cogl_pipeline_set_uniform_1f()` to set the value of a uniform.

since: 13

###### cogl_pipeline_get_user_program

Queries what user program has been associated with the given `pipeline` using cogl_pipeline_set_user_program().

since: 13

###### cogl_pipeline_remove_layer

This function removes a layer from your pipeline.

since: 13

###### cogl_pipeline_set_alpha_test_function

Before a primitive is blended with the framebuffer, it goes through an alpha test stage which lets you discard fragments based on the current alpha value. This function lets you change the function used to evaluate the alpha channel, and thus determine which fragments are discarded and which continue on to the blending stage.

since: 13

###### cogl_pipeline_set_blend

If not already familiar; please refer here for an overview of what blend strings are, and their syntax.

since: 13

###### cogl_pipeline_set_blend_constant

When blending is setup to reference a CONSTANT blend factor then blending will depend on the constant set with this function.

since: 13

###### cogl_pipeline_set_color

Sets the basic color of the pipeline, used when no lighting is enabled.

since: 13

###### cogl_pipeline_set_color4f

Sets the basic color of the pipeline, used when no lighting is enabled.

since: 13

###### cogl_pipeline_set_color4ub

Sets the basic color of the pipeline, used when no lighting is enabled.

since: 13

###### cogl_pipeline_set_cull_face_mode

Sets which faces will be culled when drawing. Face culling can be used to increase efficiency by avoiding drawing faces that would get overridden. For example, if a model has gaps so that it is impossible to see the inside then faces which are facing away from the screen will never be seen so there is no point in drawing them. This can be achieved by setting the cull face mode to `COGL_PIPELINE_CULL_FACE_MODE_BACK`.

since: 13

###### cogl_pipeline_set_depth_state

This commits all the depth state configured in `state` struct to the given `pipeline`. The configuration values are copied into the pipeline so there is no requirement to keep the `CoglDepthState` struct around if you don’t need it any more.

since: 13

###### cogl_pipeline_set_front_face_winding

The order of the vertices within a primitive specifies whether it is considered to be front or back facing. This function specifies which order is considered to be the front faces. `COGL_WINDING_COUNTER_CLOCKWISE` sets the front faces to primitives with vertices in a counter-clockwise order and `COGL_WINDING_CLOCKWISE` sets them to be clockwise. The default is `COGL_WINDING_COUNTER_CLOCKWISE`.

since: 13

###### cogl_pipeline_set_layer_combine

If not already familiar; you can refer here for an overview of what blend strings are and there syntax.

since: 13

###### cogl_pipeline_set_layer_combine_constant

When you are using the ‘CONSTANT’ color source in a layer combine description then you can use this function to define its value.

since: 13

###### cogl_pipeline_set_layer_filters

Changes the decimation and interpolation filters used when a texture is drawn at other scales than 100%.

since: 13

###### cogl_pipeline_set_layer_matrix

This function lets you set a matrix that can be used to e.g. translate and rotate a single layer of a pipeline used to fill your geometry.

since: 13

###### cogl_pipeline_set_layer_max_mipmap_level

No description available.

since: 13

###### cogl_pipeline_set_layer_null_texture

Sets the texture for this layer to be the default texture for the given type. The default texture is a 1x1 pixel white texture.

since: 13

###### cogl_pipeline_set_layer_point_sprite_coords_enabled

When rendering points, if `enable` is `TRUE` then the texture coordinates for this layer will be replaced with coordinates that vary from 0.0 to 1.0 across the primitive. The top left of the point will have the coordinates 0.0,0.0 and the bottom right will have 1.0,1.0. If `enable` is `FALSE` then the coordinates will be fixed for the entire point.

since: 13

###### cogl_pipeline_set_layer_texture

No description available.

since: 13

###### cogl_pipeline_set_layer_wrap_mode

Sets the wrap mode for all three coordinates of texture lookups on this layer. This is equivalent to calling `cogl_pipeline_set_layer_wrap_mode_s()` and `cogl_pipeline_set_layer_wrap_mode_t()` separately.

since: 13

###### cogl_pipeline_set_layer_wrap_mode_s

Sets the wrap mode for the ‘s’ coordinate of texture lookups on this layer.

since: 13

###### cogl_pipeline_set_layer_wrap_mode_t

Sets the wrap mode for the ‘t’ coordinate of texture lookups on this layer.

since: 13

###### cogl_pipeline_set_per_vertex_point_size

Sets whether to use a per-vertex point size or to use the value set by cogl_pipeline_set_point_size(). If per-vertex point size is enabled then the point size can be set for an individual point either by drawing with a `CoglAttribute` with the name ‘cogl_point_size_in’ or by writing to the GLSL builtin ‘cogl_point_size_out’ from a vertex shader snippet.

since: 13

###### cogl_pipeline_set_point_size

Changes the size of points drawn when `COGL_VERTICES_MODE_POINTS` is used with the attribute buffer API. Note that typically the GPU will only support a limited minimum and maximum range of point sizes. If the chosen point size is outside that range then the nearest value within that range will be used instead. The size of a point is in screen space so it will be the same regardless of any transformations.

since: 13

###### cogl_pipeline_set_uniform_1f

Sets a new value for the uniform at `uniform_location`. If this pipeline has a user program attached and is later used as a source for drawing, the given value will be assigned to the uniform which can be accessed from the shader’s source. The value for `uniform_location` should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location().

since: 13

###### cogl_pipeline_set_uniform_1i

Sets a new value for the uniform at `uniform_location`. If this pipeline has a user program attached and is later used as a source for drawing, the given value will be assigned to the uniform which can be accessed from the shader’s source. The value for `uniform_location` should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location().

since: 13

###### cogl_pipeline_set_uniform_float

Sets new values for the uniform at `uniform_location`. If this pipeline has a user program attached and is later used as a source for drawing, the given values will be assigned to the uniform which can be accessed from the shader’s source. The value for `uniform_location` should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location().

since: 13

###### cogl_pipeline_set_uniform_int

Sets new values for the uniform at `uniform_location`. If this pipeline has a user program attached and is later used as a source for drawing, the given values will be assigned to the uniform which can be accessed from the shader’s source. The value for `uniform_location` should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location().

since: 13

###### cogl_pipeline_set_uniform_matrix

Sets new values for the uniform at `uniform_location`. If this pipeline has a user program attached and is later used as a source for drawing, the given values will be assigned to the uniform which can be accessed from the shader’s source. The value for `uniform_location` should be retrieved from the string name of the uniform by calling cogl_pipeline_get_uniform_location().

since: 13

###### cogl_pipeline_set_user_program

Associates a linked CoglProgram with the given pipeline so that the program can take full control of vertex and/or fragment processing.

since: 13

##### Methods inherited from CoglObject (2)

###### cogl_object_get_user_data

Finds the user data previously associated with `object` using the given `key`. If no user data has been associated with `object` for the given `key` this function returns NULL.

since: 13

###### cogl_object_set_user_data

Associates some private `user_data` with a given `CoglObject`. To later remove the association call `cogl_object_set_user_data()` with the same `key` but NULL for the `user_data`.

since: 13