- add("font", &Loader::font);
- add("texture", &Loader::texture);
- add("graphic", &Loader::graphic);
- add("style", &Loader::style);
-}
-
-void Resources::Loader::font(const string &fn)
-{
- RefPtr<GL::Font> fnt=new GL::Font;
- Parser::load(*fnt, fn);
-
- res.fonts.insert(FontMap::value_type(fn.substr(0, fn.rfind('.')), fnt.get()));
- if(!res.default_font)
- res.default_font=fnt.get();
- fnt.release();
-}
-
-void Resources::Loader::texture(const string &fn)
-{
- RefPtr<GL::Texture2D> tex=new GL::Texture2D;
- tex->image(fn);
- tex->set_min_filter(GL::LINEAR);
-
- res.textures.insert(TextureMap::value_type(fn.substr(0, fn.rfind('.')), tex.release()));
+ add("default_font", &Loader::default_font);
+ add("font", &Loader::font);
+ add("style", &Loader::style);