Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3777 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Apr 11, 2005, 4:43:13 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/textEngine: Blending of text enabled

Location:
orxonox/branches/textEngine/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/textEngine/src/lib/graphics/font/text_engine.cc

    r3776 r3777  
    5656  this->text = NULL;
    5757  this->texture = 0;
     58  this->blending = 1.0f;
    5859  this->setType(type);
    5960  this->setPosition(0, 0);
     
    181182      pos.z = 0;
    182183    }
     184
     185  // setting the Blending effects
     186  glColor4f(1.0f,1.0f,1.0f, this->blending);
     187  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    183188
    184189  // drawing this Text.
  • orxonox/branches/textEngine/src/lib/graphics/font/text_engine.h

    r3774 r3777  
    101101  void setText(const char* text);
    102102  void setPosition(int x, int y);
     103  /** \param blending the blending intensity to set (between 0.0 and 1.0) */
     104  inline void setBlending(float blending) {this->blending = blending;}
    103105
    104106  // Static Text
     
    119121  char* text;                    //!< The text to display
    120122  SDL_Color color;               //!< The color of the font.
     123  float blending;                //!< The blending intensity.
    121124  // placement in openGL
    122125  GLuint texture;                //!< A GL-texture to hold the text
  • orxonox/branches/textEngine/src/story_entities/world.cc

    r3776 r3777  
    354354            this->testText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_DYNAMIC, 0, 255, 0);
    355355            testText->setText("TEXT  rocks");
     356            testText->setBlending(.5);
    356357            testText->setBindNode(tn);
    357358
Note: See TracChangeset for help on using the changeset viewer.