]> git.tdb.fi Git - libs/gl.git/blobdiff - source/resources/resources.cpp
Refactor the interface of SL::Compiler
[libs/gl.git] / source / resources / resources.cpp
index d52dbe34fb61c745e74c4cad108cdd0a604990e7..114a08ecf838f0f6fd6fbf5c517fa64e9a07fe5f 100644 (file)
@@ -12,7 +12,6 @@
 #include "pipelinetemplate.h"
 #include "pose.h"
 #include "program.h"
-#include "programcompiler.h"
 #include "resourcemanager.h"
 #include "resources.h"
 #include "sampler.h"
@@ -21,6 +20,7 @@
 #include "texture2d.h"
 #include "texture2darray.h"
 #include "texturecube.h"
+#include "glsl/compiler.h"
 
 using namespace std;
 
@@ -172,8 +172,9 @@ Program *Resources::create_program(const string &name)
 
        if(RefPtr<IO::Seekable> io = open_raw(name))
        {
-               ProgramCompiler compiler;
-               compiler.compile(*io, this, name);
+               SL::Compiler compiler;
+               compiler.load_source(*io, this, name);
+               compiler.compile();
                RefPtr<Program> program = new Program;
                compiler.add_shaders(*program);
                program->link();