Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5369 in orxonox.OLD for trunk/src/lib/graphics/text_engine


Ignore:
Timestamp:
Oct 13, 2005, 12:39:28 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: saver font-changing in the Shell

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

Legend:

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

    r5368 r5369  
    428428                                               0xFF000000
    429429#else
    430                                                    0xFF000000,
     430                                               0xFF000000,
    431431                                               0x00FF0000,
    432432                                               0x0000FF00,
     
    497497  glGenTextures(1, &texture);
    498498  glBindTexture(GL_TEXTURE_2D, texture);
    499   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    500   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
     499  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
     500  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    501501  glTexImage2D(GL_TEXTURE_2D,
    502502               0,
  • trunk/src/lib/graphics/text_engine/font.h

    r5368 r5369  
    2323
    2424/* some default values */
    25 #define FONT_NUM_COLORS              256                        //!< number of colors.
     25#define FONT_NUM_COLORS              256           //!< number of colors.
    2626
    27 #define FONT_HIGHEST_KNOWN_CHAR      128                        //!< The highest character known to the textEngine.
    28 
     27#define FONT_HIGHEST_KNOWN_CHAR      128           //!< The highest character known to the textEngine.
     28#define FONT_DEFAULT_RENDER_SIZE     50            //!< At what Resolution to render fonts.
    2929// FORWARD DECLARATION
    3030
  • trunk/src/lib/graphics/text_engine/text.cc

    r5368 r5369  
    3737
    3838  if (fontFile != NULL)
    39     this->setFont(fontFile, textSize);
     39    this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE);
    4040  this->setType(type);
    4141  this->size = textSize;
  • trunk/src/lib/graphics/text_engine/text.h

    r5367 r5369  
    5858    void init();
    5959
    60     void setFont(const char* fontFile, unsigned int fontSize);
     60    void setFont(const char* fontFile, unsigned int renderSize);
    6161
    6262    void setText(const char* text, bool isExtern = false);
     
    6767    inline void setBlending(float blending) { this->blending = blending; };
    6868    /** sets the Color of the Text to render (values in [0-1]) @param r red @param g green @param b blue */
    69     void setColor(float r, float g, float b) { this->color = Vector(r,g,b); };
     69    void setColor(float r, float g, float b) { this->color = Vector(r, g, b); };
    7070    /** sets the Size of the Font */
    7171    void setSize(float size) { this->size = size; };
     72    /** @returns the Size of the Text */
     73    float getSize() const { return this->size; };
    7274
    7375    void setType(TEXT_RENDER_TYPE type);
Note: See TracChangeset for help on using the changeset viewer.