Changeset 5768 in orxonox.OLD for trunk/src/lib/graphics/text_engine/text.cc
- Timestamp:
- Nov 24, 2005, 8:24:52 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/text.cc
r5767 r5768 38 38 if (fontFile != NULL) 39 39 this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE); 40 this->setSizeY2D(t his->size = textSize);40 this->setSizeY2D(textSize); 41 41 } 42 42 … … 69 69 this->blending = TEXT_DEFAULT_BLENDING; 70 70 this->color = TEXT_DEFAULT_COLOR; 71 this->size = TEXT_DEFAULT_SIZE; 72 71 this->setSize(TEXT_DEFAULT_SIZE); 73 72 this->setText(NULL); 74 73 } … … 182 181 { 183 182 glyphArray = this->font->getGlyphArray(); 184 glBindTexture(GL_TEXTURE_2D, font->get FastTextureID());183 glBindTexture(GL_TEXTURE_2D, font->getTexture()); 185 184 } 186 185 else … … 189 188 Font::initDefaultFont(); 190 189 glyphArray = Font::getDefaultFont()->getGlyphArray(); 191 glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->get FastTextureID());190 glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->getTexture()); 192 191 } 193 192 const char* tmpText = this->externText; … … 210 209 211 210 glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]); 212 glVertex2d(posX, this-> size);211 glVertex2d(posX, this->getSizeY2D()); 213 212 214 213 glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]); 215 glVertex2d(posX+tmpGlyph->width*this-> size, this->size);214 glVertex2d(posX+tmpGlyph->width*this->getSizeY2D(), this->getSizeY2D()); 216 215 217 216 glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]); 218 glVertex2d(posX+tmpGlyph->width*this-> size, 0);217 glVertex2d(posX+tmpGlyph->width*this->getSizeY2D(), 0); 219 218 220 219 glEnd(); 221 220 glEndList(); 222 posX += tmpGlyph->advance * this-> size;221 posX += tmpGlyph->advance * this->getSizeY2D(); 223 222 } 224 223 ++tmpText;
Note: See TracChangeset
for help on using the changeset viewer.