diff options
author | pixel <pixel> | 2006-02-02 17:29:04 +0000 |
---|---|---|
committer | pixel <pixel> | 2006-02-02 17:29:04 +0000 |
commit | 58d8064ce2beb470ed36ea6bf4b0ac5bed8d0079 (patch) | |
tree | 48356a8dd0edaf6c902947746272658f934c7fc1 /lib/font.cc | |
parent | c3b798273403e6dc80245d43d3ae75be5e48946c (diff) |
Having a better texture tainting solution, which will hopefully avoid texture mess when going fullscreen.
Diffstat (limited to 'lib/font.cc')
-rw-r--r-- | lib/font.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/font.cc b/lib/font.cc index 8527d15..fab51e4 100644 --- a/lib/font.cc +++ b/lib/font.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: font.cc,v 1.17 2005-12-01 13:48:12 pixel Exp $ */ +/* $Id: font.cc,v 1.18 2006-02-02 17:29:05 pixel Exp $ */ #include <stdarg.h> #include <SDL.h> @@ -150,6 +150,7 @@ mogltk::font::font(Handle * ffont) : textcolor(255, 255, 255, 255), shadow(0), w for (i = 0; i < nbT; i++) { fonttex[i] = alloctexture(); + fonttex[i]->name = "Main font texture number " + String(i); for (j = 0; j < 15; j++) { fontcache[j][i] = 0; } @@ -605,6 +606,7 @@ mogltk::texture * mogltk::font::printtex(rect * _r, const ugly_string & m, va_li ph = nextpower(r.h); t = new texture(pw, ph); + t->name = String("Text-on-texture: '") + m.p + "'"; for (p = buffer; *p; p++) { if (*p == '\n') { @@ -672,7 +674,7 @@ mogltk::font * mogltk::SystemFont; mogltk::font * mogltk::FixedFont; mogltk::texture * mogltk::font::alloctexture() { - return new mogltk::texture(256, 256); + return new texture(256, 256); } void mogltk::font::Bind(int f) { @@ -691,6 +693,7 @@ void mogltk::font::checknbind(int index, ColorP c) { if (!fontcache[i][index]) { fontcache[i][index] = alloctexture(); + fontcache[i][index]->name = "Color font texture number " + String(index); for (y = 0; y < 256; y++) { for (x = 0; x < 256; x++) { t.fromSDL(fontcache[15][index]->GetPixels()[(y << 8) + x], f); |