Associates a linked CoglProgram with the given material so that the program can take full control of vertex and/or fragment processing.
CoglSnippet api instead instead
This is an example of how it can be used to associate an ARBfp program with a
shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT);
program = cogl_create_program ();
cogl_program_attach_shader (program, shader);
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.
A VertexBufferIndices to a linked CoglProgram