]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/graphic.cpp
Clear focus in Panel if focused child is removed
[libs/gltk.git] / source / graphic.cpp
index 0c874c8d1c0dd785e4bfe024822a35139c1fa801..9b613a74bf0a83381f2c7cf02aacf5326844a377 100644 (file)
@@ -21,9 +21,6 @@ Graphic::Graphic():
 
 void Graphic::render(unsigned wd, unsigned ht) const
 {
-       GL::VertexArray varr((GL::TEXCOORD2, GL::VERTEX2));
-       RefPtr<GL::VertexArrayBuilder> vab=varr.modify();
-
        vector<float> 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)
        {