Changeset 5369 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Oct 13, 2005, 12:39:28 AM (19 years ago)
- Location:
- trunk/src/lib/graphics/text_engine
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/font.cc
r5368 r5369 428 428 0xFF000000 429 429 #else 430 430 0xFF000000, 431 431 0x00FF0000, 432 432 0x0000FF00, … … 497 497 glGenTextures(1, &texture); 498 498 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); 501 501 glTexImage2D(GL_TEXTURE_2D, 502 502 0, -
trunk/src/lib/graphics/text_engine/font.h
r5368 r5369 23 23 24 24 /* some default values */ 25 #define FONT_NUM_COLORS 256 25 #define FONT_NUM_COLORS 256 //!< number of colors. 26 26 27 #define FONT_HIGHEST_KNOWN_CHAR 128 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. 29 29 // FORWARD DECLARATION 30 30 -
trunk/src/lib/graphics/text_engine/text.cc
r5368 r5369 37 37 38 38 if (fontFile != NULL) 39 this->setFont(fontFile, textSize);39 this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE); 40 40 this->setType(type); 41 41 this->size = textSize; -
trunk/src/lib/graphics/text_engine/text.h
r5367 r5369 58 58 void init(); 59 59 60 void setFont(const char* fontFile, unsigned int fontSize);60 void setFont(const char* fontFile, unsigned int renderSize); 61 61 62 62 void setText(const char* text, bool isExtern = false); … … 67 67 inline void setBlending(float blending) { this->blending = blending; }; 68 68 /** 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); }; 70 70 /** sets the Size of the Font */ 71 71 void setSize(float size) { this->size = size; }; 72 /** @returns the Size of the Text */ 73 float getSize() const { return this->size; }; 72 74 73 75 void setType(TEXT_RENDER_TYPE type);
Note: See TracChangeset
for help on using the changeset viewer.