Method
CoglPipelineset_blend
Declaration [src]
gboolean
cogl_pipeline_set_blend (
CoglPipeline* pipeline,
const char* blend_string,
GError** error
)
Description [src]
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>))
This is the list of source-names usable as blend factors:
cogl_pipeline_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:
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 pipeline is in premultiplied form.
Stability: | Unstable |
Available since: | 2.0 |