IneQuation.pl
09-21-2008, 07:53 AM
Can one compiled shader be attached simultanously to a number of programs? Say, something like this:
glCompileShader(ID);
glAttachShader(program1, ID);
glLinkProgram(program1);
glAttachShader(program2, ID);
glLinkProgram(program2);
And then just switching from one program to another on demand? I have a little library containing functions used in all the other shaders and having it compiled multiple times doesn't make much sense.
glCompileShader(ID);
glAttachShader(program1, ID);
glLinkProgram(program1);
glAttachShader(program2, ID);
glLinkProgram(program2);
And then just switching from one program to another on demand? I have a little library containing functions used in all the other shaders and having it compiled multiple times doesn't make much sense.