Changeset 5767 in orxonox.OLD for trunk/src/lib/graphics/text_engine/text.h
- Timestamp:
- Nov 24, 2005, 7:43:08 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/text.h
r5427 r5767 26 26 struct SDL_Surface; 27 27 28 /**29 * STATIC means: a font, that is only one GL-face.30 ** it is very fast, and can be used for all text31 ** that does not have to be changed anymore, or if32 ** the the text should look very nice33 * DYNAMIC means: a very fast font, that will is build34 ** from multiple quads.35 ** Use this type, if you want to create fast changing36 ** text like a counter.37 */38 typedef enum TEXT_RENDER_TYPE39 {40 TEXT_RENDER_STATIC = 1,41 TEXT_RENDER_DYNAMIC = 242 };43 44 28 //! A Struct to handel Texture Coordinates for quads 45 29 struct TexCoord … … 55 39 { 56 40 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); 58 42 ~Text(); 59 43 void init(); … … 74 58 // void getSize(float &x, float& y) const { return this->size; }; 75 59 76 void setType(TEXT_RENDER_TYPE type);77 void createTexture();78 79 60 virtual void draw() const; 80 61 … … 88 69 Font* font; //!< Font of this text 89 70 90 TEXT_RENDER_TYPE type; //!< The type of this Font.91 71 char* text; //!< The text to display 92 72 const char* externText; //!< the text to Display from an external Source. … … 94 74 float blending; //!< The blending intensity. 95 75 float size; //!< The size of the Font. 96 97 // placement in openGL98 GLuint texture; //!< A GL-texture to hold the text (static Mode)99 TexCoord texCoord; //!< Texture-coordinates @todo fix this to have a struct100 float height;101 float width;102 76 }; 103 77
Note: See TracChangeset
for help on using the changeset viewer.