- add_keyword<GL::Font>("font");
- add_keyword<Graphic>("graphic");
- add_keyword<Style>("style");
+ add_type<Graphic>().keyword("graphic");
+ add_type<GL::Module>().creator([this](const string &n){ return create_module(n); });
+ add_type<GL::Sampler>().creator([this](const string &n){ return create_sampler(n); });
+ add_type<GL::Program>().creator([this](const string &n){ return create_program(n); });
+ add_type<GL::Texture2D>().keyword("texture").creator([this](const string &n){ return create_texture(n); });
+ add_type<GL::Font>().keyword("font");
+ add_type<Style>().keyword("style");
+}
+
+Resources::Resources(const FS::Path &fn):
+ Resources()
+{
+ dir_src = new DataFile::DirectorySource;
+ dir_src->add_directory(FS::dirname(fn));
+ add_source(*dir_src);