X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fimage.cpp;h=f1180c39e1664491fd239560d59f251b8194074a;hb=b3234ca0277c5e282a2a0a2558b58edb25750653;hp=8e14328c84b85aa073661cdb2dede39806715f20;hpb=d2d5b4c4dedf90a42dd2baff8334318b1d000f64;p=libs%2Fgltk.git diff --git a/source/image.cpp b/source/image.cpp index 8e14328..f1180c3 100644 --- a/source/image.cpp +++ b/source/image.cpp @@ -15,7 +15,7 @@ Image::Image(const GL::Texture2D *i): focusable = false; } -void Image::autosize_special(const Part &part, Geometry &ageom) +void Image::autosize_special(const Part &part, Geometry &ageom) const { if(part.get_name()=="image") { @@ -76,15 +76,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(); } }