Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5767 in orxonox.OLD for trunk/src/lib/graphics/text_engine/text.h


Ignore:
Timestamp:
Nov 24, 2005, 7:43:08 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: removed support for text-render-static

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine/text.h

    r5427 r5767  
    2626struct SDL_Surface;
    2727
    28 /**
    29  * STATIC means: a font, that is only one GL-face.
    30  ** it is very fast, and can be used for all text
    31  ** that does not have to be changed anymore, or if
    32  ** the the text should look very nice
    33  * DYNAMIC means: a very fast font, that will is build
    34  ** from multiple quads.
    35  ** Use this type, if you want to create fast changing
    36  ** text like a counter.
    37  */
    38 typedef enum TEXT_RENDER_TYPE
    39 {
    40   TEXT_RENDER_STATIC      = 1,
    41   TEXT_RENDER_DYNAMIC     = 2
    42 };
    43 
    4428//! A Struct to handel Texture Coordinates for quads
    4529struct TexCoord
     
    5539{
    5640  public:
    57     Text(const char* fontFile = NULL, unsigned int fontSize = TEXT_DEFAULT_SIZE, TEXT_RENDER_TYPE type = TEXT_RENDER_DYNAMIC);
     41    Text(const char* fontFile = NULL, unsigned int fontSize = TEXT_DEFAULT_SIZE);
    5842    ~Text();
    5943    void init();
     
    7458//    void getSize(float &x, float& y) const { return this->size; };
    7559
    76     void setType(TEXT_RENDER_TYPE type);
    77     void createTexture();
    78 
    7960    virtual void draw() const;
    8061
     
    8869    Font*             font;           //!< Font of this text
    8970
    90     TEXT_RENDER_TYPE  type;           //!< The type of this Font.
    9171    char*             text;           //!< The text to display
    9272    const char*       externText;     //!< the text to Display from an external Source.
     
    9474    float             blending;       //!< The blending intensity.
    9575    float             size;           //!< The size of the Font.
    96 
    97   // placement in openGL
    98     GLuint            texture;        //!< A GL-texture to hold the text (static Mode)
    99     TexCoord          texCoord;       //!< Texture-coordinates @todo fix this to have a struct
    100     float             height;
    101     float             width;
    10276};
    10377
Note: See TracChangeset for help on using the changeset viewer.