Class

CoglPipeline

Description

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

Hierarchy

hierarchy this CoglPipeline ancestor_0 CoglObject ancestor_0--this

Ancestors

Constructors

cogl_pipeline_new

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

Available since: 2.0

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.

Available since: 1.10

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.

Available since: 1.10

cogl_pipeline_copy

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

Available since: 2.0

cogl_pipeline_foreach_layer

Iterates all the layer indices of the given pipeline.

Available since: 2.0

cogl_pipeline_get_alpha_test_function
No description available.

Available since: 2.0

cogl_pipeline_get_alpha_test_reference
No description available.

Available since: 2.0

cogl_pipeline_get_color

Retrieves the current pipeline color.

Available since: 2.0

cogl_pipeline_get_cull_face_mode
No description available.

Available since: 2.0

cogl_pipeline_get_depth_state

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

Available since: 2.0

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.

Available since: 2.0

cogl_pipeline_get_layer_mag_filter

Retrieves the currently set magnification CoglPipelineFilter set on the specified layer. The magnification filter determines how the layer should be sampled when up-scaled.

Available since: 1.10

cogl_pipeline_get_layer_min_filter

Retrieves the currently set minification CoglPipelineFilter set on the specified layer. The miniifcation filter determines how the layer should be sampled when down-scaled.

Available since: 1.10

cogl_pipeline_get_layer_point_sprite_coords_enabled

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

Available since: 2.0

cogl_pipeline_get_layer_texture
No description available.

Available since: 1.10

cogl_pipeline_get_layer_wrap_mode_s

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

Available since: 1.6

cogl_pipeline_get_layer_wrap_mode_t

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

Available since: 1.6

cogl_pipeline_get_n_layers

Retrieves the number of layers defined for the given pipeline.

Available since: 2.0

cogl_pipeline_get_per_vertex_point_size
No description available.

Available since: 2.0

cogl_pipeline_get_point_size

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

Available since: 2.0

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.

Available since: 2.0

cogl_pipeline_get_user_program

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

Available since: 2.0

cogl_pipeline_remove_layer

This function removes a layer from your pipeline.

Available since: 1.10

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.

Available since: 2.0

cogl_pipeline_set_blend

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

Available since: 2.0

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.

Available since: 2.0

cogl_pipeline_set_color

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

Available since: 2.0

cogl_pipeline_set_color4f

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

Available since: 2.0

cogl_pipeline_set_color4ub

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

Available since: 2.0

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.

Available since: 2.0

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.

Available since: 2.0

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.

Available since: 2.0

cogl_pipeline_set_layer_combine

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

Available since: 2.0

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.

Available since: 2.0

cogl_pipeline_set_layer_filters

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

Available since: 1.10

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.

Available since: 1.10

cogl_pipeline_set_layer_max_mipmap_level
No description available.
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.

Available since: 1.10

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.

Available since: 2.0

cogl_pipeline_set_layer_texture
No description available.
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.

Available since: 2.0

cogl_pipeline_set_layer_wrap_mode_s

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

Available since: 2.0

cogl_pipeline_set_layer_wrap_mode_t

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

Available since: 2.0

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.

Available since: 2.0

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.

Available since: 2.0

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().

Available since: 2.0

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().

Available since: 2.0

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().

Available since: 2.0

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().

Available since: 2.0

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().

Available since: 2.0

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.

Available since: 2.0

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.

Available since: 1.4

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.

Available since: 1.4