]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compatibility.cpp
Move the StageType enum inside the Stage struct
[libs/gl.git] / source / glsl / compatibility.cpp
index 0c312d022ca20f71da5818863136614647e47fd7..4e43ae9dcdd3b4241afe1d7c5c945db368834a49 100644 (file)
@@ -49,7 +49,7 @@ void DefaultPrecisionGenerator::visit(VariableDeclaration &var)
                Precision *prec = new Precision;
                if(!type.compare(0, 7, "sampler"))
                        prec->precision = "lowp";
-               else if(stage->type==FRAGMENT)
+               else if(stage->type==Stage::FRAGMENT)
                        prec->precision = "mediump";
                else
                        prec->precision = "highp";
@@ -231,12 +231,12 @@ void LegacyConverter::visit(VariableDeclaration &var)
                if(i!=var.layout->qualifiers.end())
                {
                        unsigned location = lexical_cast<unsigned>(i->value);
-                       if(stage->type==VERTEX && var.interface=="in")
+                       if(stage->type==Stage::VERTEX && var.interface=="in")
                        {
                                stage->locations[var.name] = location;
                                var.layout->qualifiers.erase(i);
                        }
-                       else if(stage->type==FRAGMENT && var.interface=="out")
+                       else if(stage->type==Stage::FRAGMENT && var.interface=="out")
                        {
                                if(location!=0)
                                        static Require _req(EXT_gpu_shader4);
@@ -262,7 +262,7 @@ void LegacyConverter::visit(VariableDeclaration &var)
 
        if((var.interface=="in" || var.interface=="out") && !supports_unified_interface_syntax())
        {
-               if(stage->type==FRAGMENT && var.interface=="out")
+               if(stage->type==Stage::FRAGMENT && var.interface=="out")
                {
                        frag_out = &var;
                        remove_node = true;