A more D-like way of doing it would possibly be:char[] file; file = read("program.frag"); glShaderSource(f, 1, &file.ptr, &file.length);
Scratch this last part. I'd hoped it worked, but ptr and length aren't lvalues, so no can do.
-- Simen
A more D-like way of doing it would possibly be:char[] file; file = read("program.frag"); glShaderSource(f, 1, &file.ptr, &file.length);
Scratch this last part. I'd hoped it worked, but ptr and length aren't lvalues, so no can do.
-- Simen