X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbuilders%2Fsequencetemplate.cpp;h=f158c630083b8e82110028c031c4edfe63bb2396;hp=46ffec702c300e5ae5f393abdbdabc8929525c9f;hb=6cbabebe65575a55e120acd6294da305765d5bbb;hpb=c63285753b51215c030b226d66f9662287713f01 diff --git a/source/builders/sequencetemplate.cpp b/source/builders/sequencetemplate.cpp index 46ffec70..f158c630 100644 --- a/source/builders/sequencetemplate.cpp +++ b/source/builders/sequencetemplate.cpp @@ -5,7 +5,9 @@ #include "bloom.h" #include "colorcurve.h" #include "lighting.h" +#include "object.h" #include "resources.h" +#include "scene.h" #include "sequencetemplate.h" #include "tests.h" @@ -75,9 +77,10 @@ SequenceTemplate::Loader::Loader(SequenceTemplate &t, Collection &c): add("multisample", &Loader::multisample_range); add("postprocessor", &Loader::postprocessor); add("step", &Loader::step); + add("step", &Loader::step_with_slot); // Deprecated - add("pass", &Loader::step); + add("pass", &Loader::step_with_slot); obj.resources = &c; } @@ -109,7 +112,12 @@ void SequenceTemplate::Loader::postprocessor(const string &slot) obj.postprocessors.push_back(pp); } -void SequenceTemplate::Loader::step(const string &tag, const string &rend) +void SequenceTemplate::Loader::step(const string &tag) +{ + step_with_slot(tag, string()); +} + +void SequenceTemplate::Loader::step_with_slot(const string &tag, const string &rend) { Step stp; stp.tag = tag; @@ -143,6 +151,8 @@ void SequenceTemplate::Step::Loader::init() add("depth_test", &Loader::depth_test_predefined); add("lighting", &Loader::lighting); add("lighting", &Loader::lighting_inline); + add("object", &Loader::object); + add("scene", &Loader::scene); } void SequenceTemplate::Step::Loader::blend_predefined(const string &name) @@ -196,10 +206,15 @@ void SequenceTemplate::Step::Loader::lighting(const string &name) obj.lighting.keep(); } -/*void SequenceTemplate::Step::Loader::scene(const string &name) +void SequenceTemplate::Step::Loader::object(const string &name) { - obj.default_renderable = get_collection().get(name); -}*/ + obj.default_renderable = &get_collection().get(name); +} + +void SequenceTemplate::Step::Loader::scene(const string &name) +{ + obj.default_renderable = &get_collection().get(name); +} } // namespace GL } // namespace Msp