mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
cogl-pipeline: Add getters for the alpha test state
This adds two public functions: cogl_pipeline_get_alpha_test_function and cogl_pipeline_get_alpha_test_reference.
This commit is contained in:
parent
959846326f
commit
c3582b77df
@ -3920,6 +3920,31 @@ cogl_pipeline_set_alpha_test_function (CoglPipeline *pipeline,
|
||||
_cogl_pipeline_set_alpha_test_function_reference (pipeline, alpha_reference);
|
||||
}
|
||||
|
||||
CoglPipelineAlphaFunc
|
||||
cogl_pipeline_get_alpha_test_function (CoglPipeline *pipeline)
|
||||
{
|
||||
CoglPipeline *authority;
|
||||
|
||||
g_return_val_if_fail (cogl_is_pipeline (pipeline), 0);
|
||||
|
||||
authority =
|
||||
_cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_ALPHA_FUNC);
|
||||
|
||||
return authority->big_state->alpha_state.alpha_func;
|
||||
}
|
||||
|
||||
float
|
||||
cogl_pipeline_get_alpha_test_reference (CoglPipeline *pipeline)
|
||||
{
|
||||
CoglPipeline *authority;
|
||||
|
||||
g_return_val_if_fail (cogl_is_pipeline (pipeline), 0.0f);
|
||||
|
||||
authority =
|
||||
_cogl_pipeline_get_authority (pipeline,
|
||||
COGL_PIPELINE_STATE_ALPHA_FUNC_REFERENCE);
|
||||
|
||||
return authority->big_state->alpha_state.alpha_func_reference;
|
||||
}
|
||||
|
||||
GLenum
|
||||
|
@ -475,6 +475,28 @@ cogl_pipeline_set_alpha_test_function (CoglPipeline *pipeline,
|
||||
CoglPipelineAlphaFunc alpha_func,
|
||||
float alpha_reference);
|
||||
|
||||
/**
|
||||
* cogl_pipeline_get_alpha_test_function:
|
||||
* @pipeline: A #CoglPipeline object
|
||||
*
|
||||
* Return value: The alpha test function of @pipeline.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
CoglPipelineAlphaFunc
|
||||
cogl_pipeline_get_alpha_test_function (CoglPipeline *pipeline);
|
||||
|
||||
/**
|
||||
* cogl_pipeline_get_alpha_test_reference:
|
||||
* @pipeline: A #CoglPipeline object
|
||||
*
|
||||
* Return value: The alpha test reference value of @pipeline.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
float
|
||||
cogl_pipeline_get_alpha_test_reference (CoglPipeline *pipeline);
|
||||
|
||||
/**
|
||||
* cogl_pipeline_set_blend:
|
||||
* @pipeline: A #CoglPipeline object
|
||||
|
Loading…
Reference in New Issue
Block a user