X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.cpp;h=d0273909d68db900e0d95e79c08f1d2cf9f140cd;hb=a3637962f082182d72998a35ea86e48d51e520c3;hp=23b8f0301e9bd76196ec15b7388ef74f5ed2887e;hpb=20a86c5905e1f7527d3c9edc3f56f6b7679c268a;p=libs%2Fgl.git diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index 23b8f030..d0273909 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -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::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