Changeset 3844 in orxonox.OLD for orxonox/trunk/src/lib/graphics/text_engine.cc
- Timestamp:
- Apr 17, 2005, 12:41:57 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/text_engine.cc
r3843 r3844 183 183 void Text::draw(void) const 184 184 { 185 // storing all the Transformation Matrices.186 GLdouble modMat[16];187 GLdouble projMat[16];188 GLint viewPort[4];189 glGetDoublev(GL_PROJECTION_MATRIX, projMat);190 glGetDoublev(GL_MODELVIEW_MATRIX, modMat);191 glGetIntegerv(GL_VIEWPORT, viewPort);192 193 GraphicsEngine::enter2DMode();194 195 196 185 // setting the Position of this Text. 197 186 Vector pos; … … 202 191 GLdouble z = this->bindNode->getAbsCoor().z; 203 192 GLdouble tmp[3]; 204 gluProject(x, y, z, modMat, projMat,viewPort, tmp, tmp+1, tmp+2);193 gluProject(x, y, z, GraphicsEngine::modMat, GraphicsEngine::projMat, GraphicsEngine::viewPort, tmp, tmp+1, tmp+2); 205 194 pos.x = tmp[0] + this->posSize.x; 206 195 pos.y = GraphicsEngine::getInstance()->getResolutionY() - tmp[1] + this->posSize.y; … … 266 255 } 267 256 glPopMatrix(); 268 GraphicsEngine::leave2DMode();269 257 } 270 258 … … 931 919 void TextEngine::draw(void) const 932 920 { 921 // entering 3D-mode 922 GraphicsEngine::enter2DMode(); 923 // drawing all the texts 933 924 tIterator<Text>* textIterator = textList->getIterator(); 934 925 Text* text = textIterator->nextElement(); … … 939 930 } 940 931 delete textIterator; 932 // retruning to the previous mode 933 GraphicsEngine::leave2DMode(); 941 934 } 942 935
Note: See TracChangeset
for help on using the changeset viewer.