]> git.tdb.fi Git - libs/gl.git/blobdiff - tools/glslcompiler.cpp
Disallow specializing when compiling a module
[libs/gl.git] / tools / glslcompiler.cpp
index 7af8c80bcf78cc5852b38a3f9d573cd4a976144d..a1eb1a1fa4d87ddd77c71c47acb0fca563c5b309 100644 (file)
@@ -74,6 +74,8 @@ GlslCompiler::GlslCompiler(int argc, char **argv):
        else if(!dump_ast)
                combined = true;
 
+       if(!spec_values_in.empty() && as_module)
+               throw usage_error("Modules can't be specialized");
        for(vector<string>::const_iterator i=spec_values_in.begin(); i!=spec_values_in.end(); ++i)
        {
                unsigned colon = i->find(':');