X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftable.cpp;h=32db6c4af30ddbee2546730291bb8942e4477d3d;hb=1aa6cd9b865e366737dcc9d2d36c4f8faed5bc4f;hp=1fe69619f911aa892563c27b54dba76e613d1c5d;hpb=2accd84fb2f8cc96efea8b3f27e381c2d2749160;p=libs%2Fgltk.git diff --git a/source/table.cpp b/source/table.cpp index 1fe6961..32db6c4 100644 --- a/source/table.cpp +++ b/source/table.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "part.h" #include "style.h" #include "table.h" @@ -52,7 +52,7 @@ void Table::set_cell_text(unsigned r, unsigned c, const string &t) data[r*columns+c] = t; } -void Table::render_special(const Part &part) const +void Table::rebuild_special(const Part &part, CachedPart &cache) { if(part.get_name()=="cells") { @@ -67,6 +67,10 @@ void Table::render_special(const Part &part) const cgeom.h = geom.h/rows; cgeom.y = geom.h-cgeom.h; + cache.texture = &font.get_texture(); + cache.clear_mesh(); + + GL::MeshBuilder bld(*cache.mesh); for(unsigned i=0; i