cogl: Separate out state flags for the alpha test func and ref

Previously the flag to mark the differences for the alpha test
function and reference value were conflated into one. However this is
awkward when generating shader code to simulate the alpha testing for
GLES 2 because in that case changing the function would need a
different program but changing the reference value just requires
updating a uniform. This patch makes the function and reference have
their own state flags.
This commit is contained in:
Neil Roberts
2010-11-22 18:29:50 +00:00
parent 38ad560b19
commit 60000690e1
3 changed files with 102 additions and 36 deletions

View File

@ -521,7 +521,8 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
blend_state->blend_dst_factor_rgb));
}
if (pipelines_difference & COGL_PIPELINE_STATE_ALPHA_FUNC)
if (pipelines_difference & (COGL_PIPELINE_STATE_ALPHA_FUNC |
COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE))
{
CoglPipeline *authority =
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_ALPHA_FUNC);