void Graphic::Loader::texture(const string &n)
{
- graph.texture=&res.get<GL::Texture2D>(n);
+ graph.texture=res.get<GL::Texture2D>(n);
graph.slice=Geometry(0, 0, graph.texture->get_width(), graph.texture->get_height());
}
void Part::Loader::graphic(State s, const string &n)
{
- part.graphic[s]=&res.get<Graphic>(n);
+ part.graphic[s]=res.get<Graphic>(n);
}
void Part::Loader::align(int x, int y)
GL::Texture2D *Resources::create_texture(const string &name)
{
RefPtr<GL::Texture2D> tex=new GL::Texture2D;
- tex->image((path/(name+".png")).str());
+ tex->load_image((path/(name+".png")).str());
tex->set_min_filter(GL::LINEAR);
return tex.release();
}
void Resources::Loader::default_font(const string &name)
{
- res.default_font=&res.get<GL::Font>(name);
+ res.default_font=res.get<GL::Font>(name);
}
void Resources::Loader::font(const string &name)
sname+='-';
sname+=style_name;
}
- style=&res.get<Style>(sname);
+ style=res.get<Style>(sname);
}
void Widget::render_part(const Part &part) const