compiler.set_source(module->get_prepared_source(), "<module>");
compiler.specialize(spec_values);
compiler.compile(SL::Compiler::PROGRAM);
+#ifdef DEBUG
+ string diagnostics = compiler.get_diagnostics();
+ if(!diagnostics.empty())
+ IO::print("Program diagnostics:\n%s\n", diagnostics);
+#endif
vector<SL::Stage::Type> stages = compiler.get_stages();
for(vector<SL::Stage::Type>::const_iterator i=stages.begin(); i!=stages.end(); ++i)
glBindAttribLocation(id, index, name.c_str());
}
-void Program::bind_attribute(VertexComponent comp, const string &name)
+void Program::bind_attribute(VertexAttribute attr, const string &name)
{
- bind_attribute(get_component_type(comp), name);
+ bind_attribute(get_attribute_semantic(attr), name);
}
void Program::bind_fragment_data(unsigned index, const string &name)