X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphic.cpp;h=3579610bf7a640696e4f97bbf928f828b252168f;hb=d7ae291415a21cc886fe318070b41ac8d3e57a30;hp=d05123ab890f0f342f858840f97f82cc4e68a6c0;hpb=131ac8ff2c06f94d40f4bf98d4a6ec0d113cdffc;p=libs%2Fgltk.git diff --git a/source/graphic.cpp b/source/graphic.cpp index d05123a..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,23 +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()); }