Program.prepare_and_attach

Compile all shaders, attach each to program link and validate program.

This function may do to much, it may get deleted or renamed. Use the equivalent descripted in examples:
struct Program
nothrow @safe
prepare_and_attach

Return Value

Type: GLResult!void

GLResult!void with error information if any

Examples

program.prepare_and_attach(&vert_shader, &frag_shader).throw_on_error;
// Program read to use!

is equivalent to:

Program program;
Shader vert_sh, frag_shader; // our shaders;
foreach (shader; [&vert_sh, &frag_shader])
    shader.compile().throw_on_error;

program.attach(vert_sh, frag_shader).throw_on_error;
program.link().throw_on_error;
program.validate().throw_on_error;
// Program ready to use!

Meta