Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8768 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Jun 24, 2006, 3:59:11 AM (19 years ago)
Author:
bensch
Message:

trunk: font: cleaner draw() of Texts

Location:
trunk/src/lib/graphics/text_engine
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine/font.cc

    r8767 r8768  
    150150  Font::defaultFontData = Font(font_xpm).data;
    151151}
     152
    152153
    153154/**
  • trunk/src/lib/graphics/text_engine/font_data.h

    r8766 r8768  
    7070  const TextureDataPointer& textureData() const { return texData; };
    7171
    72   bool rebuild();
     72  bool rebuild() { return texData->rebuild(); };
    7373
    7474private:
    75 
    7675  void initGlyphs(TTF_Font* font, Uint16 from, Uint16 count);
    7776  bool getGlyphMetrics(TTF_Font* font, Glyph* glyph, Uint16 character);
  • trunk/src/lib/graphics/text_engine/limited_width_text.cc

    r8761 r8768  
    7070
    7171  // drawing this Text.
    72   // setting the Blending effects
    73   glColor4fv(&this->color()[0]);
    74 
    75 
    76   glActiveTexture(GL_TEXTURE0);
    77 
    78 //   glEnable(GL_BLEND);
    79 //   glEnable(GL_TEXTURE_2D);
    80 //   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    81 //   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
    82 //
    83 //   glBindTexture(GL_TEXTURE_2D, this->font().getTexture());
    8472  this->font().select();
    8573
  • trunk/src/lib/graphics/text_engine/multi_line_text.cc

    r8761 r8768  
    7373
    7474  // drawing this Text.
    75   // setting the Blending effects
    76   glActiveTexture(GL_TEXTURE0);
     75  this->font().select();
    7776
    78 /*  glColor4fv(&this->color()[0]);
    79   glEnable(GL_BLEND);
    80   glEnable(GL_TEXTURE_2D);
    81   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    82   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
    83 
    84   glBindTexture(GL_TEXTURE_2D, this->font().getTexture());*/
    85   this->font().select();
    8677  glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
    8778  glRotatef(this->getAbsDir2D(), 0, 0, 1);
  • trunk/src/lib/graphics/text_engine/text.cc

    r8764 r8768  
    226226    glTranslatef(-this->getSizeX2D()/2, 0, 0);
    227227
     228
    228229  this->font().select();
    229230  glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
Note: See TracChangeset for help on using the changeset viewer.