1
0
Fork 0

material: Adds _cogl_material_pre_paint_for_layer

This is a counter part for _cogl_material_layer_pre_paint which takes a
layer index instead of a direct CoglMaterialLayer pointer. The aim is to
phase out code that directly iterates the internal layer pointers of a
material since the layer pointers can change if any property of any
layer is changed making direct layer pointers very fragile.
This commit is contained in:
Robert Bragg 2010-07-28 13:59:34 +01:00
parent 1b9a247174
commit b64c1c9781
2 changed files with 17 additions and 0 deletions

View file

@ -606,6 +606,15 @@ _cogl_material_layer_has_user_matrix (CoglMaterialLayer *layer);
void
_cogl_material_layer_pre_paint (CoglMaterialLayer *layerr);
/*
* Calls the pre_paint method on the layer texture if there is
* one. This will determine whether mipmaps are needed based on the
* filter settings.
*/
void
_cogl_material_pre_paint_for_layer (CoglMaterial *material,
int layer_id);
/*
* CoglMaterialFlushFlag:
* @COGL_MATERIAL_FLUSH_FALLBACK_MASK: The fallback_layers member is set to

View file

@ -5237,6 +5237,14 @@ _cogl_material_layer_pre_paint (CoglMaterialLayer *layer)
}
}
void
_cogl_material_pre_paint_for_layer (CoglMaterial *material,
int layer_id)
{
CoglMaterialLayer *layer = _cogl_material_get_layer (material, layer_id);
_cogl_material_layer_pre_paint (layer);
}
CoglMaterialFilter
cogl_material_layer_get_min_filter (CoglMaterialLayer *layer)
{