X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fimage.cpp;h=383f906911993d2a83d8d434ec791f8c0e90d303;hb=4b52d16bc895f9d969383d7a7d6a3558c1972cc5;hp=5dcb2e3f5b84b8e727a98b3aa6180c3642b35a24;hpb=707b59d45ae50b69c94918f8f74313283b304597;p=libs%2Fgltk.git diff --git a/source/image.cpp b/source/image.cpp index 5dcb2e3..383f906 100644 --- a/source/image.cpp +++ b/source/image.cpp @@ -12,7 +12,6 @@ Image::Image(const GL::Texture2D *i): image(i), keep_aspect(true) { - focusable = false; } void Image::autosize_special(const Part &part, Geometry &ageom) const @@ -76,15 +75,15 @@ void Image::rebuild_special(const Part &part) GL::MeshBuilder bld(part_cache.create_mesh(part, *image)); bld.color(1.0f, 1.0f, 1.0f); - bld.begin(GL::QUADS); + bld.begin(GL::TRIANGLE_STRIP); + bld.texcoord(0.0, 1.0); + bld.vertex(rgeom.x, rgeom.y+rgeom.h); bld.texcoord(0.0, 0.0); bld.vertex(rgeom.x, rgeom.y); - bld.texcoord(1.0, 0.0); - bld.vertex(rgeom.x+rgeom.w, rgeom.y); bld.texcoord(1.0, 1.0); bld.vertex(rgeom.x+rgeom.w, rgeom.y+rgeom.h); - bld.texcoord(0.0, 1.0); - bld.vertex(rgeom.x, rgeom.y+rgeom.h); + bld.texcoord(1.0, 0.0); + bld.vertex(rgeom.x+rgeom.w, rgeom.y); bld.end(); } }