X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fparser.cpp;h=3047e136e288303a5725fcdd2ec1d103b3290c2a;hb=9a63244c1342337915c4610401a24c09fa72cc3d;hp=eaf5706f25a6fd8b30935835efb32272943427e4;hpb=d3ceb2186dc79130508093b3d0c944771a53534f;p=libs%2Fgl.git diff --git a/source/glsl/parser.cpp b/source/glsl/parser.cpp index eaf5706f..3047e136 100644 --- a/source/glsl/parser.cpp +++ b/source/glsl/parser.cpp @@ -73,16 +73,16 @@ void Parser::set_required_version(const Version &ver) cur_stage->required_version = ver; } -void Parser::stage_change(StageType stage) +void Parser::stage_change(Stage::Type stage) { 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); - if(cur_stage->type!=SHARED) + if(cur_stage->type!=Stage::SHARED) module->stages.back().previous = cur_stage; cur_stage = &module->stages.back(); } @@ -254,7 +254,7 @@ RefPtr Parser::parse_statement() RefPtr Parser::parse_import() { - if(cur_stage->type!=SHARED) + if(cur_stage->type!=Stage::SHARED) throw invalid_shader_source(tokenizer.get_location(), "Imports are only allowed in the shared section"); tokenizer.expect("import"); @@ -651,7 +651,7 @@ RefPtr Parser::parse_passthrough() RefPtr pass = new Passthrough; pass->source = source_index; pass->line = tokenizer.get_location().line; - if(cur_stage->type==GEOMETRY) + if(cur_stage->type==Stage::GEOMETRY) { tokenizer.expect("["); pass->subscript = parse_expression();