// (c) Tuomas J. Lukka #ifndef VOB_VOBS_TEXT_HXX #define VOB_VOBS_TEXT_HXX #include #include namespace Vob { namespace Vobs { typedef GLMosaicText::Renderer< GLMosaicText::DenseGlyphs, unsigned short> DefaultTextRenderer; template struct Text1Base { enum { NTrans = 1 }; TextRenderer *rend; str text; int flags; template void params(F &f) { f(rend, text, flags); } template struct Vertexer { const Coords &c; Vertexer(const Coords &c) : c(c) { } template void operator()(const T &x, const T &y) { ZVec tmp(x, y, 0); c.vertex(tmp); } }; template void render(const T &t) const { if (1) { std::cout << "HorizText:\\n"; for (typename str::const_iterator it = text.begin(); it != text.end(); ++it) cout << "'" << (char)*it << "' (" << (int)*it << ")\\n"; } Vertexer vertexer(t); GLMosaicText::renderIter(*rend, text.begin(), text.end(), 0,0, vertexer, (flags & 1 ? GLMosaicText::normalBindTexture_01 : GLMosaicText::normalBindTexture) ); } }; typedef Text1Base Text1; VOB_DEFINED(Text1); } } #endif