From afdbb71926d9c9826273c61384bfc224b21e3319 Mon Sep 17 00:00:00 2001 From: Fernando Monteiro Date: Mon, 18 Oct 2021 22:49:42 +0100 Subject: [PATCH] cogl: Remove cogl_material_set_blend This function is deprecated and must be replaced to the alternative. Part-of: --- cogl/cogl/deprecated/cogl-material-compat.c | 10 --- cogl/cogl/deprecated/cogl-material-compat.h | 91 --------------------- 2 files changed, 101 deletions(-) diff --git a/cogl/cogl/deprecated/cogl-material-compat.c b/cogl/cogl/deprecated/cogl-material-compat.c index c3d495651..5e5d3bb66 100644 --- a/cogl/cogl/deprecated/cogl-material-compat.c +++ b/cogl/cogl/deprecated/cogl-material-compat.c @@ -64,13 +64,3 @@ cogl_material_set_color4ub (CoglMaterial *material, cogl_pipeline_set_color4ub (COGL_PIPELINE (material), red, green, blue, alpha); } - -gboolean -cogl_material_set_blend (CoglMaterial *material, - const char *blend_string, - GError **error) -{ - return cogl_pipeline_set_blend (COGL_PIPELINE (material), - blend_string, - error); -} diff --git a/cogl/cogl/deprecated/cogl-material-compat.h b/cogl/cogl/deprecated/cogl-material-compat.h index fc9de7a8d..50d3bb8b3 100644 --- a/cogl/cogl/deprecated/cogl-material-compat.h +++ b/cogl/cogl/deprecated/cogl-material-compat.h @@ -218,97 +218,6 @@ cogl_material_set_alpha_test_function (CoglMaterial *material, CoglMaterialAlphaFunc alpha_func, float alpha_reference); -/** - * cogl_material_set_blend: - * @material: A #CoglMaterial object - * @blend_string: A Cogl blend string - * describing the desired blend function. - * @error: return location for a #GError that may report lack of driver - * support if you give separate blend string statements for the alpha - * channel and RGB channels since some drivers, or backends such as - * GLES 1.1, don't support this feature. May be %NULL, in which case a - * warning will be printed out using GLib's logging facilities if an - * error is encountered. - * - * 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>)) - * ]| - * - * The brackets around blend factors are currently not - * optional! - * - * This is the list of source-names usable as blend factors: - * - * SRC_COLOR: The color of the incoming fragment - * DST_COLOR: The color of the framebuffer - * CONSTANT: The constant set via cogl_material_set_blend_constant() - * - * - * 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: - * - * 0: (0, 0, 0, 0) - * 1: (1, 1, 1, 1) - * SRC_ALPHA_SATURATE_FACTOR: (f,f,f,1) where f = MIN(SRC_COLOR[A],1-DST_COLOR[A]) - * - * - * Remember; all color components are normalized to the range [0, 1] - * before computing the result of blending. - * - * - * Blend Strings/1 - * Blend a non-premultiplied source over a destination with - * 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]))" - * - * - * - * - * Blend Strings/2 - * Blend a premultiplied source over a destination with - * 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. - * - * Return value: %TRUE if the blend string was successfully parsed, and the - * described blending is supported by the underlying driver/hardware. If - * there was an error, %FALSE is returned and @error is set accordingly (if - * present). - * - * Since: 1.0 - * Deprecated: 1.16: Use cogl_pipeline_set_blend() instead - */ -COGL_DEPRECATED_FOR (cogl_pipeline_set_blend) -COGL_EXPORT gboolean -cogl_material_set_blend (CoglMaterial *material, - const char *blend_string, - GError **error); - G_END_DECLS #endif /* __COGL_MATERIAL_H__ */