- GL::push_matrix();
- GL::translate(rgeom.x, rgeom.y, 0);
- part.get_graphic(state)->render(part.get_geometry().w, part.get_geometry().h);
- GL::pop_matrix();
+ cache.texture = graphic->get_texture();
+ cache.clear_mesh();
+
+ GL::MeshBuilder bld(*cache.mesh);
+ bld.matrix() *= GL::Matrix::translation(rgeom.x, rgeom.y, 0);
+ graphic->build(part.get_geometry().w, part.get_geometry().h, bld);