+
+ GL::Pipeline::Pass &pass = pipeline.add_pass(0, *renderable);
+ pass.set_lighting(&lighting);
+ pass.set_depth_test(&GL::DepthTest::lequal());
+ pass.set_blend(&GL::Blend::alpha());
+
+ view.set_content(&pipeline);
+ 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);