]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programcompiler.cpp
Move postprocessor shaders to the builtin shaderlib
[libs/gl.git] / source / programcompiler.cpp
index d65869316423d64806a23bdf3e60254d0f014ce7..13c73e4ac0a79694d4d50c7e37b14b6ffd69b1bb 100644 (file)
@@ -123,9 +123,8 @@ void ProgramCompiler::process()
 
 void ProgramCompiler::import(const string &name)
 {
-       if(!resources)
-               throw runtime_error("no resources");
-       RefPtr<IO::Seekable> io = resources->open_raw(name+".glsl");
+       string fn = name+".glsl";
+       RefPtr<IO::Seekable> io = (resources ? resources->open_raw(fn) : Resources::get_builtins().open(fn));
        if(!io)
                throw runtime_error(format("module %s not found", name));
        ProgramParser import_parser;