set_source_texture
Description:
This is a convenience function for creating a material with the first layer set to texture
and setting that material as the source
with cogl_set_source.
Note:
Latest drawing apis all take an explicit CoglPipeline
argument so this stack of CoglMaterial
s shouldn't be used.
Note: There is no interaction between calls to cogl_set_source_color and cogl_set_source_texture. If you need to blend a texture with a color then you can create a simple material like this:
material = cogl_material_new ();
cogl_material_set_color4ub (material, 0xff, 0x00, 0x00, 0x80);
cogl_material_set_layer (material, 0, tex_handle);
cogl_set_source (material);
Parameters:
texture |
The |
Namespace: Cogl
Package: cogl-1.0