- const float font_size=font->get_default_size();
- unsigned text_w=static_cast<unsigned>(font->get_string_width(text)*font_size);
+ GL::MeshBuilder bld(part_cache.create_mesh(part, *icon));
+ bld.color(1.0f, 1.0f, 1.0f);
+ bld.begin(GL::TRIANGLE_STRIP);
+ bld.texcoord(0, 1);
+ bld.vertex(rgeom.x, rgeom.y+rgeom.h);
+ bld.texcoord(0, 0);
+ bld.vertex(rgeom.x, rgeom.y);
+ bld.texcoord(1, 1);
+ bld.vertex(rgeom.x+rgeom.w, rgeom.y+rgeom.h);
+ bld.texcoord(1, 0);
+ bld.vertex(rgeom.x+rgeom.w, rgeom.y);
+ bld.end();
+ }
+ }
+}