X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgraphic.cpp;h=9b613a74bf0a83381f2c7cf02aacf5326844a377;hb=9b29612d1cde85fee9b3f011e86a5cabe5dbcce3;hp=0c874c8d1c0dd785e4bfe024822a35139c1fa801;hpb=f34c8d617cbe8ae426e7a1e280dfa0aaf5d11a6d;p=libs%2Fgltk.git diff --git a/source/graphic.cpp b/source/graphic.cpp index 0c874c8..9b613a7 100644 --- a/source/graphic.cpp +++ b/source/graphic.cpp @@ -21,9 +21,6 @@ Graphic::Graphic(): void Graphic::render(unsigned wd, unsigned ht) const { - GL::VertexArray varr((GL::TEXCOORD2, GL::VERTEX2)); - RefPtr vab=varr.modify(); - vector x, y; create_coords(0.0f-shadow.left, wd+shadow.right, border.left, border.right, slice.w-border.left-border.right, x); create_coords(0.0f-shadow.bottom, ht+shadow.top, border.bottom, border.top, slice.h-border.bottom-border.top, y); @@ -38,7 +35,8 @@ void Graphic::render(unsigned wd, unsigned ht) const unsigned ymax=y.size()-(border.top ? 2 : 3); texture->bind(); - GL::Immediate imm((GL::TEXCOORD2,GL::VERTEX2)); + GL::Immediate imm((GL::COLOR4_UBYTE, GL::TEXCOORD2, GL::VERTEX2)); + imm.color(1.0f, 1.0f, 1.0f); imm.begin(GL::QUADS); for(unsigned i=ymin; i<=ymax; ++i) {