X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmaterials%2Ftechnique.cpp;h=26a70a018dde6042ce7ddc5f8b21a2e942257ad5;hp=b5ed6447c314c3e69be3bfe0fcb0c08be67cfc07;hb=3ac3a51c623271da815c8ee60c484445871753bf;hpb=885b8ad08cfcefba4b95ec9028fa1e25df2fe171 diff --git a/source/materials/technique.cpp b/source/materials/technique.cpp index b5ed6447..26a70a01 100644 --- a/source/materials/technique.cpp +++ b/source/materials/technique.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include "material.h" #include "program.h" @@ -132,6 +133,11 @@ void Technique::Loader::init_actions() add("pass", &Loader::pass); } +void Technique::Loader::set_inline_base_name(const string &n) +{ + inline_base_name = n; +} + void Technique::Loader::inherit(const string &n) { obj.passes = get_collection().get(n).get_passes(); @@ -143,7 +149,11 @@ void Technique::Loader::pass(const string &n) { RenderPass p; if(coll) - load_sub(p, get_collection()); + { + RenderPass::Loader ldr(p, get_collection()); + ldr.set_inline_base_name(format("%s/%s.pass", (inline_base_name.empty() ? FS::basename(get_source()) : inline_base_name), n)); + load_sub_with(ldr); + } else load_sub(p);