]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/sourcemap.cpp
Recognize the #line directive in the GLSL parser
[libs/gl.git] / source / glsl / sourcemap.cpp
index e74f1b67408367ab2ff2a3a28c6381b6aa54656e..9b341fe46e0b6be0c098199548de39a3a4b28f10 100644 (file)
@@ -29,6 +29,16 @@ void SourceMap::set_name(unsigned i, const std::string &n)
        source_names[i] = n;
 }
 
+const string &SourceMap::get_name(unsigned i) const
+{
+       i -= base_index;
+       if(i<source_names.size())
+               return source_names[i];
+
+       static string empty;
+       return empty;
+}
+
 void SourceMap::merge_from(const SourceMap &other)
 {
        if(other.base_index<base_index)