+ if(p.get_name().empty())
+ p.build(geom, state, part_cache);
+ else
+ rebuild_special(p);
+ }
+}
+
+void Widget::rebuild_special(const Part &part)
+{
+ part_cache.insert_special(part);
+}
+
+void Widget::render(GL::Renderer &renderer) const
+{
+ if(!style)
+ throw logic_error(format("Attempt to render a widget with null style (class=\"%s\", style_name=\"%s\")", get_class(), style_name));
+
+ static const GL::Tag texture_tag("ui_tex");
+
+ GL::Renderer::Push _push(renderer);
+ int x = 0;
+ int y = 0;
+ map_coords_to_root(x, y);
+ renderer.set_matrix(GL::Matrix::translation(x, y, 0));
+ for(const CachedPart &p: part_cache.get_parts())
+ {
+ if(p.mesh && p.texture)