1 #ifndef MSP_GLTK_GRAPHIC_H_
2 #define MSP_GLTK_GRAPHIC_H_
4 #include <msp/gl/texture2d.h>
5 #include <msp/parser/loader.h>
16 class Loader: public Parser::Loader
23 void texture(const std::string &);
24 void slice(unsigned, unsigned, unsigned, unsigned);
31 class Loader: public Parser::Loader
35 Sides &get_object() { return sides; }
48 Graphic(const Resources &, const std::string &);
49 const Sides &get_border() const { return border; }
50 const Sides &get_shadow() const { return shadow; }
51 const GL::Texture2D *get_texture() const { return texture; }
52 unsigned get_width() const { return slice.w; }
53 unsigned get_height() const { return slice.h; }
54 void render(unsigned, unsigned) const;
60 const GL::Texture2D *texture;