]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/syntax.cpp
Refactor the interface of SL::Compiler
[libs/gl.git] / source / glsl / syntax.cpp
index e508ed890c0ddc5a35c0180acdde11f7675d5f8e..affc09adfad7badff8ca65d7e39a4730fc9629be 100644 (file)
@@ -262,14 +262,20 @@ void Jump::visit(NodeVisitor &visitor)
 }
 
 
-Stage::Stage(StageType t):
+Stage::Stage(Stage::Type t):
        type(t),
        previous(0)
 { }
 
+const char *Stage::get_stage_name(Type type)
+{
+       static const char *names[] = { "shared", "vertex", "geometry", "fragment" };
+       return names[type];
+}
+
 
 Module::Module():
-       shared(SHARED)
+       shared(Stage::SHARED)
 { }
 
 } // namespace SL