diff --git a/cogl/cogl-pipeline-fragend-arbfp.c b/cogl/cogl-pipeline-fragend-arbfp.c index 294daa96f..8c25b3631 100644 --- a/cogl/cogl-pipeline-fragend-arbfp.c +++ b/cogl/cogl-pipeline-fragend-arbfp.c @@ -165,7 +165,7 @@ _cogl_pipeline_fragend_arbfp_start (CoglPipeline *pipeline, return FALSE; /* TODO: support fog */ - if (ctx->legacy_fog_state.enabled) + if (_cogl_pipeline_get_fog_enabled (pipeline)) return FALSE; user_program = cogl_pipeline_get_user_program (pipeline); diff --git a/cogl/cogl-pipeline-private.h b/cogl/cogl-pipeline-private.h index 7e019c28e..de96c6c75 100644 --- a/cogl/cogl-pipeline-private.h +++ b/cogl/cogl-pipeline-private.h @@ -1184,6 +1184,9 @@ void _cogl_pipeline_set_blend_enabled (CoglPipeline *pipeline, CoglPipelineBlendEnable enable); +gboolean +_cogl_pipeline_get_fog_enabled (CoglPipeline *pipeline); + void _cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline, const char *breadcrumb); diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c index 70bda8ffb..d0e32d94c 100644 --- a/cogl/cogl-pipeline.c +++ b/cogl/cogl-pipeline.c @@ -2855,6 +2855,18 @@ _cogl_pipeline_update_authority (CoglPipeline *pipeline, } } +gboolean +_cogl_pipeline_get_fog_enabled (CoglPipeline *pipeline) +{ + CoglPipeline *authority; + + g_return_val_if_fail (cogl_is_pipeline (pipeline), FALSE); + + authority = + _cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_FOG); + return authority->big_state->fog_state.enabled; +} + unsigned long _cogl_pipeline_get_age (CoglPipeline *pipeline) {