+
+ if(!sequence)
+ {
+ sequence = new GL::Sequence(view);
+ GL::Sequence::Step &step = sequence->add_step(0, *renderable);
+ step.set_lighting(&lighting);
+ step.set_depth_test(&GL::DepthTest::lequal());
+ step.set_blend(&GL::Blend::alpha());
+ }
+
+ view.set_content(sequence);
+ view.set_camera(&camera);
+}
+
+template<typename T>
+T *Viewer::load(const string &name)
+{
+ if(FS::exists(name))
+ {
+ T *thing = new T;
+ DataFile::load(*thing, name, resources);
+ resources.add("__"+name, thing);
+ return thing;
+ }
+ else
+ return &resources.get<T>(name);