X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphic.cpp;h=3579610bf7a640696e4f97bbf928f828b252168f;hb=d7ae291415a21cc886fe318070b41ac8d3e57a30;hp=99defc7627a97749718dcefc4eed71964ae415e3;hpb=c1f038acb91eb3bfaa34dfd4729d19ed3f871a42;p=libs%2Fgltk.git diff --git a/source/graphic.cpp b/source/graphic.cpp index 99defc7..3579610 100644 --- a/source/graphic.cpp +++ b/source/graphic.cpp @@ -1,16 +1,13 @@ +#include #include "graphic.h" #include "resources.h" using namespace std; -#include - namespace Msp { namespace GLtk { -Graphic::Graphic(const Resources &r, const string &n): - res(r), - name(n), +Graphic::Graphic(): texture(0) { } @@ -49,31 +46,25 @@ void Graphic::render(unsigned wd, unsigned ht) const unsigned ymin=border.bottom ? 0 : 1; unsigned ymax=border.top ? 3 : 2; + GL::Immediate imm((GL::TEXCOORD2,GL::VERTEX2)); for(unsigned i=ymin; i(n); graph.slice=Geometry(0, 0, graph.texture->get_width(), graph.texture->get_height()); } @@ -102,15 +93,5 @@ void Graphic::Loader::shadow() load_sub(graph.shadow); } - -Graphic::Sides::Loader::Loader(Sides &s): - sides(s) -{ - add("top", &Sides::top); - add("right", &Sides::right); - add("bottom", &Sides::bottom); - add("left", &Sides::left); -} - } // namespace GLtk } // namespace Msp