mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
cogl: Remove cogl_material_set_user_program
This function is deprecated and must be replaced to the alternative. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2058>
This commit is contained in:
parent
06de4e241d
commit
403f44e7b0
@ -81,10 +81,3 @@ cogl_material_set_blend_constant (CoglMaterial *material,
|
|||||||
{
|
{
|
||||||
cogl_pipeline_set_blend_constant (COGL_PIPELINE (material), constant_color);
|
cogl_pipeline_set_blend_constant (COGL_PIPELINE (material), constant_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cogl_material_set_user_program (CoglMaterial *material,
|
|
||||||
CoglHandle program)
|
|
||||||
{
|
|
||||||
cogl_pipeline_set_user_program (COGL_PIPELINE (material), program);
|
|
||||||
}
|
|
||||||
|
@ -325,53 +325,6 @@ COGL_EXPORT void
|
|||||||
cogl_material_set_blend_constant (CoglMaterial *material,
|
cogl_material_set_blend_constant (CoglMaterial *material,
|
||||||
const CoglColor *constant_color);
|
const CoglColor *constant_color);
|
||||||
|
|
||||||
/**
|
|
||||||
* cogl_material_set_user_program:
|
|
||||||
* @material: a #CoglMaterial object.
|
|
||||||
* @program: A #CoglHandle to a linked CoglProgram
|
|
||||||
*
|
|
||||||
* Associates a linked CoglProgram with the given material so that the
|
|
||||||
* program can take full control of vertex and/or fragment processing.
|
|
||||||
*
|
|
||||||
* This is an example of how it can be used to associate an ARBfp
|
|
||||||
* program with a #CoglMaterial:
|
|
||||||
* |[
|
|
||||||
* CoglHandle shader;
|
|
||||||
* CoglHandle program;
|
|
||||||
* CoglMaterial *material;
|
|
||||||
*
|
|
||||||
* shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT);
|
|
||||||
* cogl_shader_source (shader,
|
|
||||||
* "!!ARBfp1.0\n"
|
|
||||||
* "MOV result.color,fragment.color;\n"
|
|
||||||
* "END\n");
|
|
||||||
*
|
|
||||||
* program = cogl_create_program ();
|
|
||||||
* cogl_program_attach_shader (program, shader);
|
|
||||||
* cogl_program_link (program);
|
|
||||||
*
|
|
||||||
* material = cogl_material_new ();
|
|
||||||
* cogl_material_set_user_program (material, program);
|
|
||||||
*
|
|
||||||
* cogl_set_source_color4ub (0xff, 0x00, 0x00, 0xff);
|
|
||||||
* cogl_rectangle (0, 0, 100, 100);
|
|
||||||
* ]|
|
|
||||||
*
|
|
||||||
* It is possibly worth keeping in mind that this API is not part of
|
|
||||||
* the long term design for how we want to expose shaders to Cogl
|
|
||||||
* developers (We are planning on deprecating the cogl_program and
|
|
||||||
* cogl_shader APIs in favour of a "snippet" framework) but in the
|
|
||||||
* meantime we hope this will handle most practical GLSL and ARBfp
|
|
||||||
* requirements.
|
|
||||||
*
|
|
||||||
* Since: 1.4
|
|
||||||
* Deprecated: 1.16: Use #CoglSnippet api instead instead
|
|
||||||
*/
|
|
||||||
COGL_DEPRECATED_FOR (cogl_snippet_)
|
|
||||||
COGL_EXPORT void
|
|
||||||
cogl_material_set_user_program (CoglMaterial *material,
|
|
||||||
CoglHandle program);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __COGL_MATERIAL_H__ */
|
#endif /* __COGL_MATERIAL_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user