]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/parser.cpp
Move the StageType enum inside the Stage struct
[libs/gl.git] / source / glsl / parser.cpp
index eaf5706f25a6fd8b30935835efb32272943427e4..7f0f8e138629f37ee03c67e2b60a1481e5e5b458 100644 (file)
@@ -73,7 +73,7 @@ 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");
@@ -82,7 +82,7 @@ void Parser::stage_change(StageType 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<Statement> Parser::parse_statement()
 
 RefPtr<Import> 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<Passthrough> Parser::parse_passthrough()
        RefPtr<Passthrough> 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();