image(i),
keep_aspect(true)
{
- 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")
{
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();
}
}