X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Fimage.cpp;h=2735ab611e6a059e73faccae8aa079a0c47e8876;hp=a2d44269b86a394115d696796cbc8fbb6fbb5f7c;hb=319cde3c06181ba1c3619567525002926d8b4889;hpb=768c65e13861f72929290ac2513df9975579e543 diff --git a/source/image.cpp b/source/image.cpp index a2d4426..2735ab6 100644 --- a/source/image.cpp +++ b/source/image.cpp @@ -53,15 +53,12 @@ void Image::set_keep_aspect(bool ka) rebuild(); } -void Image::rebuild_special(const Part &part, CachedPart &cache) +void Image::rebuild_special(const Part &part) { if(part.get_name()=="image") { if(!image) - { - cache.texture = 0; return; - } const Alignment &align = part.get_alignment(); Geometry rgeom = part.get_geometry(); @@ -84,10 +81,7 @@ void Image::rebuild_special(const Part &part, CachedPart &cache) } } - cache.texture = image; - cache.clear_mesh(); - - GL::MeshBuilder bld(*cache.mesh); + GL::MeshBuilder bld(part_cache.create_mesh(part, *image)); bld.color(1.0f, 1.0f, 1.0f); bld.begin(GL::QUADS); bld.texcoord(0.0, 0.0);