Import line: | Cogl = imports.gi.Cogl; |
GIR File: | Cogl-1.0.gir |
C documentation: | CoglMaterial |
Struct : | Material |
None |
Method / Constructor | Defined By | |
---|---|---|
get_ambient
(Color ambient)
:
none
Retrieves the current ambient color for material
Retrieves the current ambient color for material
|
Cogl.Material | |
get_color
()
:
Cogl.Color
Retrieves the current material color.
Retrieves the current material color.
|
Cogl.Material | |
get_diffuse
(Color diffuse)
:
none
Retrieves the current diffuse color for material
Retrieves the current diffuse color for material
|
Cogl.Material | |
get_emission
(Color emission)
:
none
Retrieves the materials current emission color.
Retrieves the materials current emission color.
|
Cogl.Material | |
Gets whether point sprite coordinate generation is enabled for this
texture layer. |
Cogl.Material | |
get_layer_wrap_mode_p
(gint32 layer_index)
:
Cogl.MaterialWrapMode
|
Cogl.Material | |
get_layer_wrap_mode_s
(gint32 layer_index)
:
Cogl.MaterialWrapMode
|
Cogl.Material | |
get_layer_wrap_mode_t
(gint32 layer_index)
:
Cogl.MaterialWrapMode
|
Cogl.Material | |
get_layers
()
:
Array
This function lets you access a material's internal list of layers
for iteration.
This function lets you access a material's internal list of layers
for iteration. made public by mistake and will be deprecated when we have suitable alternative. remain valid if you modify the material or any of the layers in any way and so you would have to re-get the list in that situation. list of CoglMaterialLayer's that can be passed to the cogl_material_layer_* functions. The list is owned by Cogl and it should not be modified or freed
|
Cogl.Material | |
get_n_layers
()
:
gint32
Retrieves the number of layers defined for the given material
Retrieves the number of layers defined for the given material
|
Cogl.Material | |
get_point_size
()
:
gfloat
|
Cogl.Material | |
get_shininess
()
:
gfloat
Retrieves the materials current emission color.
Retrieves the materials current emission color.
|
Cogl.Material | |
get_specular
(Color specular)
:
none
Retrieves the materials current specular color.
Retrieves the materials current specular color.
|
Cogl.Material | |
get_user_program
()
:
void*
|
Cogl.Material | |
remove_layer
(gint32 layer_index)
:
none
This function removes a layer from your material
This function removes a layer from your material
|
Cogl.Material | |
set_alpha_test_function
(MaterialAlphaFunc alpha_func, gfloat alpha_reference)
:
none
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.
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. The default is COGL_MATERIAL_ALPHA_FUNC_ALWAYS
|
Cogl.Material | |
set_ambient
(Color ambient)
:
none
Sets the material's ambient color, in the standard OpenGL lighting
model.
Sets the material's ambient color, in the standard OpenGL lighting
model. The ambient color affects the overall color of the object. Since the diffuse color will be intense when the light hits the surface directly, the ambient will be most apparent where the light hits at a slant. The default value is (0.2, 0.2, 0.2, 1.0)
|
Cogl.Material | |
set_ambient_and_diffuse
(Color color)
:
none
Conveniently sets the diffuse and ambient color of material at the same
time.
Conveniently sets the diffuse and ambient color of material at the same
time. See cogl_material_set_ambient() and cogl_material_set_diffuse(). The default ambient color is (0.2, 0.2, 0.2, 1.0) The default diffuse color is (0.8, 0.8, 0.8, 1.0)
|
Cogl.Material | |
If not already familiar; please refer here
for an overview of what blend strings are, and their syntax.
If not already familiar; please refer here
for an overview of what blend strings are, and their syntax. Blending occurs after the alpha test function, and combines fragments with the framebuffer. Currently the only blend function Cogl exposes is ADD(). So any valid blend statements will be of the form: |[ <channel-mask>=ADD(SRC_COLOR*(<factor>), DST_COLOR*(<factor>)) ]| optional! This is the list of source-names usable as blend factors: The source names can be used according to the color-source and factor syntax, so for example "(1-SRC_COLOR[A])" would be a valid factor, as would "(CONSTANT[RGB])" These can also be used as factors: before computing the result of blending. premultiplied alpha: "RGB = ADD(SRC_COLOR*(SRC_COLOR[A]), DST_COLOR*(1-SRC_COLOR[A]))" "A = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" premultiplied alpha "RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))" The default blend string is: |[ RGBA = ADD (SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A])) ]| That gives normal alpha-blending when the calculated color for the material is in premultiplied form. described blending is supported by the underlying driver/hardware. If there was an error, FALSE is returned and error is set accordingly (if present).
|
Cogl.Material | |
set_blend_constant
(Color constant_color)
:
none
When blending is setup to reference a CONSTANT blend factor then
blending will depend on the constant set with this function.
When blending is setup to reference a CONSTANT blend factor then
blending will depend on the constant set with this function.
|
Cogl.Material | |
set_color
(Color color)
:
none
Sets the basic color of the material, used when no lighting is enabled.
Sets the basic color of the material, used when no lighting is enabled.
Note that if you don't add any layers to the material then the color will be blended unmodified with the destination; the default blend semi-transparent red. See cogl_color_premultiply(). The default value is (1.0, 1.0, 1.0, 1.0)
|
Cogl.Material | |
Sets the basic color of the material, used when no lighting is enabled.
Sets the basic color of the material, used when no lighting is enabled.
The default value is (1.0, 1.0, 1.0, 1.0)
|
Cogl.Material | |
Sets the basic color of the material, used when no lighting is enabled.
Sets the basic color of the material, used when no lighting is enabled.
The default value is (0xff, 0xff, 0xff, 0xff)
|
Cogl.Material | |
set_diffuse
(Color diffuse)
:
none
Sets the material's diffuse color, in the standard OpenGL lighting
model.
Sets the material's diffuse color, in the standard OpenGL lighting
model. The diffuse color is most intense where the light hits the surface directly - perpendicular to the surface. The default value is (0.8, 0.8, 0.8, 1.0)
|
Cogl.Material | |
set_emission
(Color emission)
:
none
Sets the material's emissive color, in the standard OpenGL lighting
model.
Sets the material's emissive color, in the standard OpenGL lighting
model. It will look like the surface is a light source emitting this color. The default value is (0.0, 0.0, 0.0, 1.0)
|
Cogl.Material | |
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.
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. This function defines a new texture layer. The index values of multiple layers do not have to be consecutive; it is only their relative order that is important. as purely GLSL based layers.
|
Cogl.Material | |
If not already familiar; you can refer
here for an overview of what blend strings are and there syntax.
If not already familiar; you can refer
here for an overview of what blend strings are and there syntax. These are all the functions available for texture combining: DOT3_RGB(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + (arg0[G] - 0.5)) * (arg1[G] - 0.5) + (arg0[B] - 0.5)) * (arg1[B] - 0.5)) DOT3_RGBA(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) + (arg0[G] - 0.5)) * (arg1[G] - 0.5) + (arg0[B] - 0.5)) * (arg1[B] - 0.5)) Refer to the color-source syntax for describing the arguments. The valid source names for texture combining are: cogl_material_set_layer_constant() cogl_material_set_color() if this is layer 0, use the color of the material as set with cogl_material_set_color() RGBA = MODULATE (PREVIOUS, TEXTURE) the alpha component of a constant as the interpolator. The constant color is given by calling cogl_material_set_layer_constant. RGBA = INTERPOLATE (PREVIOUS, TEXTURE, CONSTANT[A]) with blending. described texture combining is supported by the underlying driver and or hardware. On failure, FALSE is returned and error is set
|
Cogl.Material | |
When you are using the 'CONSTANT' color source in a layer combine
description then you can use this function to define its value.
When you are using the 'CONSTANT' color source in a layer combine
description then you can use this function to define its value.
|
Cogl.Material | |
Changes the decimation and interpolation filters used when a texture is
drawn at other scales than 100%.
Changes the decimation and interpolation filters used when a texture is
drawn at other scales than 100%.
|
Cogl.Material | |
This function lets you set a matrix that can be used to e.g.
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.
|
Cogl.Material | |
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.
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. This function will only work if COGL_FEATURE_POINT_SPRITE is available. If the feature is not available then the function will return FALSE and set error.
|
Cogl.Material | |
set_layer_wrap_mode
(gint32 layer_index, MaterialWrapMode mode)
:
none
Sets the wrap mode for both coordinates of texture lookups on this
layer.
Sets the wrap mode for both coordinates of texture lookups on this
layer. This is equivalent to calling cogl_material_set_layer_wrap_mode_s() and cogl_material_set_layer_wrap_mode_t() separately.
|
Cogl.Material | |
set_layer_wrap_mode_p
(gint32 layer_index, MaterialWrapMode mode)
:
none
|
Cogl.Material | |
set_layer_wrap_mode_s
(gint32 layer_index, MaterialWrapMode mode)
:
none
Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
Sets the wrap mode for the 's' coordinate of texture lookups on this layer.
|
Cogl.Material | |
set_layer_wrap_mode_t
(gint32 layer_index, MaterialWrapMode mode)
:
none
Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
Sets the wrap mode for the 't' coordinate of texture lookups on this layer.
|
Cogl.Material | |
set_point_size
(gfloat point_size)
:
none
|
Cogl.Material | |
set_shininess
(gfloat shininess)
:
none
Sets the materials shininess, in the standard OpenGL lighting model,
which determines how specular highlights are calculated.
Sets the materials shininess, in the standard OpenGL lighting model,
which determines how specular highlights are calculated. A higher The default value is 0.0
|
Cogl.Material | |
set_specular
(Color specular)
:
none
Sets the material's specular color, in the standard OpenGL lighting
model.
Sets the material's specular color, in the standard OpenGL lighting
model. The intensity of the specular color depends on the viewport position, and is brightest along the lines of reflection. The default value is (0.0, 0.0, 0.0, 1.0)
|
Cogl.Material | |
set_user_program
(void* program)
:
none
|
Cogl.Material |
None |
Class / Namespace | Method / Signal / Properties |
---|---|
Clutter.OffscreenEffect
Method |
get_target
()
:
Cogl.Material
Retrieves the material used as a render target for the offscreen
buffer created by effect COGL_INVALID_HANDLE. |