]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Move the StageType enum inside the Stage struct
[libs/gl.git] / source / glsl / compiler.cpp
index 031ae265f52b514c93384d173218d9b400644fb9..e6c035775a89b0ff1aaa98464755d031a73fed98 100644 (file)
@@ -65,15 +65,15 @@ void Compiler::add_shaders(Program &program)
        {
                for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
                {
-                       if(i->type==VERTEX)
+                       if(i->type==Stage::VERTEX)
                        {
                                program.attach_shader_owned(new VertexShader(apply<Formatter>(*i)));
                                for(map<string, unsigned>::iterator j=i->locations.begin(); j!=i->locations.end(); ++j)
                                        program.bind_attribute(j->second, j->first);
                        }
-                       else if(i->type==GEOMETRY)
+                       else if(i->type==Stage::GEOMETRY)
                                program.attach_shader_owned(new GeometryShader(apply<Formatter>(*i)));
-                       else if(i->type==FRAGMENT)
+                       else if(i->type==Stage::FRAGMENT)
                        {
                                program.attach_shader_owned(new FragmentShader(apply<Formatter>(*i)));
                                if(EXT_gpu_shader4)
@@ -137,7 +137,7 @@ void Compiler::append_module(Module &mod)
 void Compiler::append_stage(Stage &stage)
 {
        Stage *target = 0;
-       if(stage.type==SHARED)
+       if(stage.type==Stage::SHARED)
                target = &module->shared;
        else
        {