57 #include <ACG/Math/GLMatrixT.hh> 67 const std::string& _text,
70 glRasterPos3fv(_pos.
data());
72 std::string::const_iterator s_it(_text.begin()), s_end(_text.end());
73 for (; s_it!=s_end; ++s_it)
74 glutBitmapCharacter(_font, *s_it);
82 const std::string& _text,
86 glGetIntegerv(GL_VIEWPORT, viewport);
89 glMatrixMode(GL_PROJECTION);
93 orthoProj.
ortho(0.0f,
float(viewport[2]), 0.0f,
float(viewport[3]), -1.0f, 1.0f);
94 glLoadMatrixf(orthoProj.data());
97 glMatrixMode(GL_MODELVIEW);
100 glRasterPos2i(_pos[0], _pos[1]);
104 std::string::const_iterator s_it(_text.begin()), s_end(_text.end());
105 for (; s_it!=s_end; ++s_it)
106 glutBitmapCharacter(_font, *s_it);
110 glMatrixMode(GL_PROJECTION);
112 glMatrixMode(GL_MODELVIEW);
void identity()
setup an identity matrix
Namespace providing different geometric functions concerning angles.
void ortho(Scalar left, Scalar right, Scalar bottom, Scalar top, Scalar near_plane, Scalar far_plane)
multiply self with orthographic projection matrix
void glText(const Vec3f &_pos, const std::string &_text, void *_font)
Text output in OpenGL, given 3D text position.
Scalar * data()
access to Scalar array