]> git.tdb.fi Git - libs/gl.git/commitdiff
Don't link program with the transform feature in constructor
authorMikko Rasa <tdb@tdb.fi>
Sat, 11 Aug 2012 13:38:35 +0000 (16:38 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 11 Aug 2012 13:38:35 +0000 (16:38 +0300)
The transform feature produces calls to external functions, which need to
be added in a separate shader.  Trying to link in the constructor only
produces link errors.

source/program.cpp

index 52150f3f7f2be252f4beca3f04c237b8b05e1107..9e54d6a86a1e2cbb673ad80752fc3376225af320 100644 (file)
@@ -97,7 +97,8 @@ Program::Program(const StandardFeatures &features)
        init();
 
        add_standard_shaders(features);
-       link();
+       if(!features.transform)
+               link();
 }
 
 Program::Program(const string &vert, const string &frag)