window(display, opts.wnd_opts),
gl_ctx(window, opts.gl_opts),
keyboard(window),
+ resources(&res_mgr),
view(window, gl_ctx),
camera(resources.get<GL::Camera>("Camera.camera")),
lighting(resources.get<GL::Lighting>("Desert.lightn")),
flare.set_matrix(GL::Matrix::translation(p));
display.tick();
+ res_mgr.tick();
view.render();
}
}
-DesertPillars::Resources::Resources()
+DesertPillars::Resources::Resources(GL::ResourceManager *rm)
{
FS::Path base_dir = FS::get_sys_data_dir()/"demos"/"desertpillars"/"data";
source.add_directory(base_dir);
source.add_directory(base_dir/"textures");
source.add_directory(base_dir/"exported");
add_source(source);
+
+ set_resource_manager(rm);
}
{
private:
Msp::DataFile::DirectorySource source;
+ Msp::GL::ResourceManager res_mgr;
public:
- Resources();
+ Resources(Msp::GL::ResourceManager *);
};
class MorphSphere: public Msp::GL::ObjectInstance
Msp::Graphics::Window window;
Msp::Graphics::GLContext gl_ctx;
Msp::Input::Keyboard keyboard;
+ Msp::GL::ResourceManager res_mgr;
Resources resources;
Msp::GL::WindowView view;