- public Material copy ()
Creates a new material with the configuration copied from the source
material.
- public void get_ambient (out Color ambient)
Retrieves the current ambient color for
this
- public void get_color (out Color color)
Retrieves the current material color.
- public void get_diffuse (out Color diffuse)
Retrieves the current diffuse color for
this
- public void get_emission (out Color emission)
Retrieves the materials current emission color.
- public unowned List<MaterialLayer> get_layers ()
This function lets you access a material's internal list of layers for
iteration.
- public int get_n_layers ()
Retrieves the number of layers defined for the given
this
- public float get_point_size ()
Get the size of points drawn when
POINTS is used with the vertex buffer API.
- public float get_shininess ()
Retrieves the materials current emission color.
- public void get_specular (out Color specular)
Retrieves the materials current specular color.
- public void remove_layer (int layer_index)
This function removes a layer from your material
- public void set_alpha_test_function (MaterialAlphaFunc alpha_func, float alpha_reference)
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.
- public void set_ambient (Color ambient)
Sets the material's ambient color, in the standard OpenGL lighting
model.
- public void set_ambient_and_diffuse (Color color)
Conveniently sets the diffuse and ambient color of
this at the same time.
- public bool set_blend (string blend_string) throws BlendStringError
If not already familiar; please refer here for an overview of
what blend strings are, and their syntax.
- public void set_blend_constant (Color constant_color)
When blending is setup to reference a CONSTANT blend factor then
blending will depend on the constant set with this function.
- public void set_color (Color color)
Sets the basic color of the material, used when no lighting is
enabled.
- public void set_color4f (float red, float green, float blue, float alpha)
Sets the basic color of the material, used when no lighting is
enabled.
- public void set_color4ub (uchar red, uchar green, uchar blue, uchar alpha)
Sets the basic color of the material, used when no lighting is
enabled.
- public void set_diffuse (Color diffuse)
Sets the material's diffuse color, in the standard OpenGL lighting
model.
- public void set_emission (Color emission)
Sets the material's emissive color, in the standard OpenGL lighting
model.
- public void set_layer (int layer_index, Texture texture)
In addition to the standard OpenGL lighting model a Cogl material may
have one or more layers comprised of textures that can be blended together in order, with a number of different texture combine modes.
- public bool set_layer_combine (int layer_index, string blend_string) throws BlendStringError
If not already familiar; you can refer here for an overview of
what blend strings are and there syntax.
- public void set_layer_combine_constant (int layer_index, Color constant)
When you are using the 'CONSTANT' color source in a layer combine
description then you can use this function to define its value.
- public void set_layer_filters (int layer_index, MaterialFilter min_filter, MaterialFilter mag_filter)
Changes the decimation and interpolation filters used when a texture
is drawn at other scales than 100%.
- public void set_layer_matrix (int layer_index, Matrix matrix)
This function lets you set a matrix that can be used to e.g. translate
and rotate a single layer of a material used to fill your geometry.
- public void set_point_size (float point_size)
Changes the size of points drawn when
POINTS is used with the vertex buffer API.
- public void set_shininess (float shininess)
Sets the shininess of the material, in the standard OpenGL lighting
model, which determines the size of the specular highlights.
- public void set_specular (Color specular)
Sets the material's specular color, in the standard OpenGL lighting
model.