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> |
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 |
|
|