3 #include "glsl/compiler.h"
13 void Module::set_source(const string &src)
15 SL::Compiler compiler;
16 compiler.set_source(src);
17 compiler.compile(SL::Compiler::MODULE);
18 prepared_source = compiler.get_combined_glsl();
19 source_map = compiler.get_source_map();
22 void Module::load_source(IO::Base &io, Resources *res, const string &name)
24 SL::Compiler compiler;
25 compiler.load_source(io, res, name);
26 compiler.compile(SL::Compiler::MODULE);
27 prepared_source = compiler.get_combined_glsl();
28 source_map = compiler.get_source_map();
31 void Module::load_source(IO::Base &io, const string &name)
33 load_source(io, 0, name);