/[libvob]/libvob/include/vob/vobs/Text.hxx
ViewVC logotype

Diff of /libvob/include/vob/vobs/Text.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by tjl, Fri Aug 15 18:53:38 2003 UTC revision 1.7 by tjl, Sat Aug 16 12:20:14 2003 UTC
# Line 38  Text.hxx Line 38  Text.hxx
38  namespace Vob {  namespace Vob {
39  namespace Vobs {  namespace Vobs {
40    
41        PREDBGVAR(dbg_text);
42    
43  typedef GLMosaicText::Renderer<  typedef GLMosaicText::Renderer<
44              GLMosaicText::DenseGlyphs<unsigned short>,              GLMosaicText::DenseGlyphs<unsigned short>,
45              unsigned short>              unsigned short>
# Line 61  template<class TextRenderer, class str> Line 63  template<class TextRenderer, class str>
63          Vertexer(const Coords &c) : c(c) { }          Vertexer(const Coords &c) : c(c) { }
64          template<class T> void operator()(const T &x, const T &y) {          template<class T> void operator()(const T &x, const T &y) {
65              ZVec tmp(x, y, 0);              ZVec tmp(x, y, 0);
66                DBG(dbg_text) << "Vertex "<<tmp<<"\n";
67              c.vertex(tmp);              c.vertex(tmp);
68          }          }
69      };      };
70    
71      template<class T> void render(const T &t) const {      template<class T> void render(const T &t) const {
72          if (0) {          if (dbg_text) {
73              std::cout << "HorizText:\\n";              DBG(dbg_text) << "HorizText:\\n";
74              for (typename str::const_iterator it = text.begin();              for (typename str::const_iterator it = text.begin();
75                      it != text.end(); ++it)                      it != text.end(); ++it)
76                  cout << "'" << (char)*it << "' (" <<                  DBG(dbg_text) << "'" << (char)*it << "' (" <<
77                          (int)*it << ")\\n";                          (int)*it << ")\\n";
78          }          }
79          Vertexer<T> vertexer(t);          Vertexer<T> vertexer(t);
80            DBG(dbg_text) << "Start text render "<<rend<<" "<<rend->rend<<"\n";
81          GLMosaicText::renderIter(*(rend->rend), text.begin(), text.end(),          GLMosaicText::renderIter(*(rend->rend), text.begin(), text.end(),
82                  0,yoffs,                  0,yoffs,
83                  vertexer, (flags & 1 ?                  vertexer, (flags & 1 ?
84                          GLMosaicText::normalBindTexture_01 :                          GLMosaicText::normalBindTexture_01 :
85                          GLMosaicText::normalBindTexture)                          GLMosaicText::normalBindTexture)
86                  );                  );
87            DBG(dbg_text) << "End text render\n";
88    
89      }      }
90    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26