-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));
-}
-
-void Resources::Loader::style(const string &w, const string &n)
-{
- Style stl(res, w, n);
- load_sub(stl);
-
- res.styles.insert(StyleMap::value_type(StyleId(w, n), stl));
-}
-
-
-bool Resources::StyleId::operator<(const StyleId &other) const
-{
- if(widget<other.widget)
- return true;
- return widget==other.widget && name<other.name;
-}
-