]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/syntax.cpp
Even more validation for uniform mismatches
[libs/gl.git] / source / glsl / syntax.cpp
index 23b8f0301e9bd76196ec15b7388ef74f5ed2887e..d0273909d68db900e0d95e79c08f1d2cf9f140cd 100644 (file)
@@ -545,6 +545,14 @@ bool is_same_type(const TypeDeclaration &type1, const TypeDeclaration &type2)
                return false;
 }
 
+int get_layout_value(const Layout &layout, const string &name, int def_value)
+{
+       for(vector<Layout::Qualifier>::const_iterator i=layout.qualifiers.begin(); i!=layout.qualifiers.end(); ++i)
+               if(i->name==name)
+                       return i->value;
+       return def_value;
+}
+
 } // namespace SL
 } // namespace GL
 } // namespace Msp