if(!allow_stage_change)
throw invalid_shader_source(tokenizer.get_location(), "Changing stage not allowed here");
else if(stage<=cur_stage->type)
- throw invalid_shader_source(tokenizer.get_location(), "Stage '%s' not allowed here", stage);
+ throw invalid_shader_source(tokenizer.get_location(), "Stage '%s' not allowed here", Stage::get_stage_name(stage));
module->stages.push_back(stage);
previous(0)
{ }
+const char *Stage::get_stage_name(Type type)
+{
+ static const char *names[] = { "shared", "vertex", "geometry", "fragment" };
+ return names[type];
+}
+
Module::Module():
shared(Stage::SHARED)