Adding stages from multiple modules presents some difficulties in matching
the interfaces.
void Program::add_stages(const Module &mod, const map<string, int> &spec_values)
{
+ if(!stage_ids.empty())
+ throw invalid_operation("Program::add_stages");
+
switch(mod.get_format())
{
case Module::GLSL: return add_glsl_stages(static_cast<const GlslModule &>(mod), spec_values);
void Program::link()
{
+ if(stage_ids.empty())
+ throw invalid_operation("Program::link");
+
uniforms.clear();
glLinkProgram(id);