- RefPtr<GL::Font> fnt=new GL::Font;
- DataFile::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()));
-}
-
-void Resources::Loader::graphic(const std::string &n)
-{
- Graphic graph(res, n);
- load_sub(graph);
- if(!graph.get_texture())
- throw Exception("Graphic without texture");
-
- res.graphics.insert(GraphicMap::value_type(n, graph));