]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/program.cpp
Refactor the interface of SL::Compiler
[libs/gl.git] / source / core / program.cpp
index 74c1df3e3058ac069bda809cf96a9566bf1e2904..4cdbf97c0fcdf84431b1ba88044cc8bd41addb07 100644 (file)
@@ -36,12 +36,13 @@ Program::Program(const std::string &source)
        if(source.find(';')==string::npos && source.size()>5 && !source.compare(source.size()-5, 5, ".glsl"))
        {
                if(RefPtr<IO::Seekable> io = Resources::get_builtins().open(source))
-                       compiler.compile(*io, source);
+                       compiler.load_source(*io, source);
                else
                        throw IO::file_not_found(source);
        }
        else
-               compiler.compile(source);
+               compiler.set_source(source);
+       compiler.compile();
        compiler.add_shaders(*this);
        link();
 }