diff --git a/cogl/cogl-material-private.h b/cogl/cogl-material-private.h index a113349fb..e57b79205 100644 --- a/cogl/cogl-material-private.h +++ b/cogl/cogl-material-private.h @@ -926,6 +926,10 @@ _cogl_material_layer_get_authority (CoglMaterialLayer *layer, CoglHandle _cogl_material_layer_get_texture (CoglMaterialLayer *layer); +CoglHandle +_cogl_material_get_layer_texture (CoglMaterial *material, + int layer_index); + typedef gboolean (*CoglMaterialInternalLayerCallback) (CoglMaterialLayer *layer, void *user_data); diff --git a/cogl/cogl-material.c b/cogl/cogl-material.c index e02396d4e..905e0e5fd 100644 --- a/cogl/cogl-material.c +++ b/cogl/cogl-material.c @@ -1970,6 +1970,15 @@ _cogl_material_layer_get_texture (CoglMaterialLayer *layer) return authority->texture; } +CoglHandle +_cogl_material_get_layer_texture (CoglMaterial *material, + int layer_index) +{ + CoglMaterialLayer *layer = + _cogl_material_get_layer (material, layer_index); + return _cogl_material_layer_get_texture (layer); +} + static void _cogl_material_prune_empty_layer_difference (CoglMaterial *layers_authority, CoglMaterialLayer *layer)