GL Studio API
gls_font_renderer.h
Go to the documentation of this file.
1 /*! \file
2  \brief The disti::GlsFontRenderer class and related classes.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2015 by The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef _GLS_FONT_RENDERER_H
41 #define _GLS_FONT_RENDERER_H
42 
43 #include <string>
44 #include <vector>
45 #include "gls_gl.h"
46 #ifdef GLES
47 #include "gls_state_manager.h"
48 #include "gls_quad_storage.h"
49 #endif
50 #include "gls_font_base.h"
51 #include "image.h"
52 #include "gls_color.h"
53 #include "vertex.h"
54 #include "IFontImage.h"
55 
56 //===========================================================================
57 // BEGIN NAMESPACE
58 //===========================================================================
59 namespace disti
60 {
61 
62 //---------------------------------------------------------------------------
63 // FORWARD REFERENCES
64 //---------------------------------------------------------------------------
65 class VertexNoColor;
66 class glsColor;
67 class Image;
68 
69 typedef VertexNoColor Vector;
70 
71 //===========================================================================
72 /**
73 *
74 * The GlsFontRenderer object can be used to render characters from a GlsFontBase in
75 * Open GL at specific locations and with several different text effects.
76 * Prior to rendering any characters, InitRendering must be invoked to set
77 * up the proper drawing environment. Then call Render for each character
78 * to be drawn.
79 *
80 * \sa GlsFontBase
81 *
82 */
83 //===========================================================================
85 {
86 public:
87 
88  typedef GlsFontBase::Char_t Char_t;
90 
91  //----------------------------------------
92  // Character rendering state variables
93  //----------------------------------------
94 
95  /** Returns the minification filter for this font */
96  unsigned char TextureMinFilter()
97  {
98  return _textureMinFilter;
99  }
100 
101  /** Sets the minification filter for this font */
102  void TextureMinFilter(unsigned char val)
103  {
104  _textureMinFilter = val;
105  }
106 
107  /** Returns the magnification filter for this font */
108  unsigned char TextureMagFilter()
109  {
110  return _textureMagFilter;
111  }
112 
113  /** Sets the magnification filter for this font */
114  void TextureMagFilter(unsigned char val)
115  {
116  _textureMagFilter = val;
117  }
118 
119  //----------------------------------------
120  // Setup and cleanup for rendering
121  //----------------------------------------
122 
123  /**
124  * Set the font to use.
125  * The font pointer must be set before calling
126  * any rendering methods
127  */
128  void SetFont(const GlsFontBase* font)
129  {
130  _font = font;
131  }
132  const GlsFontBase* GetFont(void)
133  {
134  return _font;
135  }
136 
137  /**
138  * Initializes the font to begin rendering characters. This will set up
139  * Open GL texture modes, bind the font's texture, set up minification
140  * and magnification filters, etc. This must be called once before
141  * invoking Render to draw characters. This version overwrites the
142  * texture minification and magnification filters before initializing.
143  * \param textureMinFilter Minification mode for the font texture
144  * \param textureMagFilter Magnification mode for the font texture
145  */
147  unsigned char textureMinFilter,
148  unsigned char textureMagFilter
149 #ifdef GLES
150  ,IGlsStateManager *stateManager
151 #endif // GLES
152  )
153  {
154  _textureMinFilter = textureMinFilter;
155  _textureMagFilter = textureMagFilter;
157 #ifdef GLES
158  stateManager
159 #endif // GLES
160  );
161  }
162 
163  /**
164  * Initializes the font to begin rendering characters. This will set up
165  * Open GL texture modes, bind the font's texture, set up minification
166  * and magnification filters, etc. This must be called before
167  * using any of the Render methods draw characters.
168  */
169 
170 #ifdef GLES
171 
172  void InitRendering(IGlsStateManager *stateManager)
173  {
174  SetupTexture(_font->Texture(), stateManager);
175  }
176 
177 #else // !GLES
178 
180  {
182  }
183 
184  /**
185  * Restores the Open GL state as it was before the call to InitRendering.
186  * This should be called after all characters have been rendered using
187  * the Render methods.
188  */
190  {
191  glDisable(GL_TEXTURE_2D);
192  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
193  } // end GlsFontRenderer::TermRendering
194 
195 #endif // GLES
196 
197  //----------------------------------------
198  // Rendering Methods
199  //----------------------------------------
200 
201 #ifdef GLES
202 
203  /** Draw a character by adding it into the supplied QuadStorage object
204  * \param emphasize Whether to draw with emphasize or not
205  * \param emphasisOffset If drawing with emphasize, the offset in logical units
206  * \param inverse Whether to draw in inverse mode or not
207  * \param quadStorage The quad storage object to render the characters into
208  * \param x1 lower left corner x coordinate of the polygon
209  * \param y1 lower left corner y coordinate of the polygon
210  * \param x2 upper right corner x coordinate of the polygon
211  * \param y2 upper right corner y coordinate of the polygon
212  */
213  void DrawCharacter(
214  const bool emphasize,
215  const float emphasisOffset,
216  const bool inverse,
217  GlsQuadListVCT_2D &quadStorage,
218  const GLfloat x1,
219  const GLfloat y1,
220  const GLfloat x2,
221  const GLfloat y2) const
222  {
223  // character color
224  quadStorage.AddQuad2D(x1,y1,x2,y2);
225 
226  // Character emphasis. Draw two more cells offset a little so
227  // character appears bolded.
228  if (emphasize && !inverse)
229  {
230  GLfloat offsetY1(y1 + emphasisOffset);
231  GLfloat offsetY2(y2 + emphasisOffset);
232 
233  quadStorage.AddQuad2D(x1 - emphasisOffset, offsetY1, x2 - emphasisOffset, offsetY2);
234  quadStorage.AddQuad2D(x1 + emphasisOffset, offsetY1, x2 + emphasisOffset, offsetY2);
235  }
236 
237  } // end GlsFontRenderer::DrawCharacter
238 
239  /**
240  * Draws a halo effect for the given character.
241  *
242  * \param c the character code to render
243  * \param haloOffset Controls the size of the halo
244  * GlsTextGrid uses: (emphasize ? 0.05f : 0.03f) * (character_width) (x2 - x1)
245  * \param _vertArray Pointer to the currently bound vertex array
246  * \param x1 lower left corner x coordinate of the polygon
247  * \param y1 lower left corner y coordinate of the polygon
248  * \param x2 upper right corner x coordinate of the polygon
249  * \param y2 upper right corner y coordinate of the polygon
250  */
251  void DrawHalo(
252  const float haloOffset,
253  GlsQuadListVCT_2D &quadStorage,
254  const GLfloat x1,
255  const GLfloat y1,
256  const GLfloat x2,
257  const GLfloat y2) const
258  {
259  const GLfloat x1right(x1 + haloOffset);
260  const GLfloat x1left(x1 - haloOffset);
261  const GLfloat x2right(x2 + haloOffset);
262  const GLfloat x2left(x2 - haloOffset);
263  const GLfloat y1up(y1 + haloOffset);
264  const GLfloat y1down(y1 - haloOffset);
265  const GLfloat y2up(y2 + haloOffset);
266  const GLfloat y2down(y2 - haloOffset);
267 
268  quadStorage.AddQuad2D(x1left, y1up, x2left, y2up);
269  quadStorage.AddQuad2D(x1left, y1down, x2left, y2down);
270  quadStorage.AddQuad2D(x1right, y1up, x2right, y2up);
271  quadStorage.AddQuad2D(x1right, y1down, x2right, y2down);
272  }
273 
274 #else // !GLES
275 
276  /**
277  * Draws a character.
278  *
279  * \param emphasize true if the rendered character should be emphasized.
280  * This will essentially bold the character. If a bold
281  * font is being used, the character will appear even
282  * more bolded.
283  * \param emphasisOffset Magnitude of the emhpasis offset. A good value to try is (0.2 * character_width).
284  * \param inverse true if the rendered character should be inverse
285  * video. This makes the text see-through and it's
286  * background the text foreground color.
287  * \param x1 lower left corner x coordinate of the polygon
288  * \param y1 lower left corner y coordinate of the polygon
289  * \param x2 upper right corner x coordinate of the polygon
290  * \param y2 upper right corner y coordinate of the polygon
291  * \param tx1 lower left corner x texture coordinate
292  * \param ty1 lower left corner y texture coordinate
293  * \param tx2 upper right corner x texture coordinate
294  * \param ty2 upper right corner y texture coordinate
295  */
297  const bool emphasize,
298  const float emphasisOffset,
299  const bool inverse,
300  const GLfloat x1,
301  const GLfloat y1,
302  const GLfloat x2,
303  const GLfloat y2,
304  const GLfloat tx1,
305  const GLfloat ty1,
306  const GLfloat tx2,
307  const GLfloat ty2) const
308  {
309  // character color
310  glBlendFunc(inverse ? GL_ONE_MINUS_SRC_ALPHA : GL_SRC_ALPHA,
311  inverse ? GL_SRC_ALPHA : GL_ONE_MINUS_SRC_ALPHA);
312 
313  glBegin(GL_QUADS);
314 
315  MapTexture(x1, y1, x2, y2, tx1, ty1, tx2, ty2);
316  // Character emphasis. Draw two more cells offset a little so
317  // character appears bolded.
318  if (emphasize && !inverse)
319  {
320  GLfloat offsetY1(y1 + emphasisOffset);
321  GLfloat offsetY2(y2 + emphasisOffset);
322 
323  MapTexture(
324  x1 - emphasisOffset, offsetY1, x2 - emphasisOffset, offsetY2,
325  tx1, ty1, tx2, ty2);
326 
327  MapTexture(
328  x1 + emphasisOffset, offsetY1, x2 + emphasisOffset, offsetY2,
329  tx1, ty1, tx2, ty2);
330  }
331 
332  glEnd();
333  } // end GlsFontRenderer::DrawCharacter
334 
335  /**
336  * Draws a halo effect for the given character.
337  *
338  * \param haloOffset Controls the size of the halo
339  * GlsTextGrid uses: (emphasize ? 0.05f : 0.03f) * (character_width) (x2 - x1)
340  * \param x1 lower left corner x coordinate of the polygon
341  * \param y1 lower left corner y coordinate of the polygon
342  * \param x2 upper right corner x coordinate of the polygon
343  * \param y2 upper right corner y coordinate of the polygon
344  * \param tx1 lower left corner x texture coordinate
345  * \param ty1 lower left corner y texture coordinate
346  * \param tx2 upper right corner x texture coordinate
347  * \param ty2 upper right corner y texture coordinate
348  */
349  void DrawHalo(
350  const float haloOffset,
351  const GLfloat x1,
352  const GLfloat y1,
353  const GLfloat x2,
354  const GLfloat y2,
355  const GLfloat tx1,
356  const GLfloat ty1,
357  const GLfloat tx2,
358  const GLfloat ty2) const
359  {
360  // Halo effect.
361  GLfloat x1right(x1 + haloOffset);
362  GLfloat x1left(x1 - haloOffset);
363  GLfloat x2right(x2 + haloOffset);
364  GLfloat x2left(x2 - haloOffset);
365  GLfloat y1up(y1 + haloOffset);
366  GLfloat y1down(y1 - haloOffset);
367  GLfloat y2up(y2 + haloOffset);
368  GLfloat y2down(y2 - haloOffset);
369 
370  glBegin(GL_QUADS);
371 
372  // Shift left and up
373  MapTexture(
374  x1left, y1up, x2left, y2up,
375  tx1, ty1, tx2, ty2);
376 
377  // Shift left and down
378  MapTexture(
379  x1left, y1down, x2left, y2down,
380  tx1, ty1, tx2, ty2);
381 
382  // Shift right and up
383  MapTexture(
384  x1right, y1up, x2right, y2up,
385  tx1, ty1, tx2, ty2);
386 
387  // Shift right and down
388  MapTexture(
389  x1right, y1down, x2right, y2down,
390  tx1, ty1, tx2, ty2);
391 
392  glEnd();
393  } // end GlsFontRenderer::DrawHalo
394 
395  /**
396  * Draws a drop shadow effect for a character.
397  * \param shadowOffset distance to offset the shadow from the character
398  * \param x1 lower left corner x coordinate of the polygon
399  * \param y1 lower left corner y coordinate of the polygon
400  * \param x2 upper right corner x coordinate of the polygon
401  * \param y2 upper right corner y coordinate of the polygon
402  * \param tx1 lower left corner x texture coordinate
403  * \param ty1 lower left corner y texture coordinate
404  * \param tx2 upper right corner x texture coordinate
405  * \param ty2 upper right corner y texture coordinate
406  */
408  const float shadowOffset,
409  const GLfloat x1,
410  const GLfloat y1,
411  const GLfloat x2,
412  const GLfloat y2,
413  const GLfloat tx1,
414  const GLfloat ty1,
415  const GLfloat tx2,
416  const GLfloat ty2) const
417  {
418  // Shadow effect.
419  glBegin(GL_QUADS);
420 
421  // Shift right and down
422  MapTexture(
423  x1 + shadowOffset,
424  y1 - shadowOffset,
425  x2 + shadowOffset,
426  y2 - shadowOffset,
427  tx1, ty1, tx2, ty2);
428 
429  glEnd();
430 
431  } // end GlsFontRenderer::DrawShadow
432 
433  /**
434  * Map a square piece of a texture onto a quad ( assumed to be called
435 between glBegin(GL_QUADS)...glEnd() pair )
436  * \param x1 the lower left corner x of the quad
437  * \param y1 the lower left corner y of the quad
438  * \param x2 the upper right corner x of the quad
439  * \param y2 the upper right corner of the quad
440  * \param tx1 lower left corner x texture coordinate
441  * \param ty1 lower left corner y texture coordinate
442  * \param tx2 upper right corner x texture coordinate
443  * \param ty2 upper right corner y texture coordinate
444  */
445  static void MapTexture(
446  const GLfloat x1,
447  const GLfloat y1,
448  const GLfloat x2,
449  const GLfloat y2,
450  const GLfloat tx1,
451  const GLfloat ty1,
452  const GLfloat tx2,
453  const GLfloat ty2 )
454  {
455  glTexCoord2f(tx1, ty1);
456  glVertex2f(x1, y1);
457  glTexCoord2f(tx2, ty1);
458  glVertex2f(x2, y1);
459  glTexCoord2f(tx2, ty2);
460  glVertex2f(x2, y2);
461  glTexCoord2f(tx1, ty2);
462  glVertex2f(x1, y2);
463  }
464 
465 #endif // GLES
466 
467  /**
468  * Create a GlsFontRenderer with the default settings.
469  * \param font The font to use for rendering. This may be NULL on creation, but it must be set before rendering.
470  */
472  _font(font),
475  {
476  }
477 
478 protected:
479 
480 #ifndef GLES
481  /** Current drawing color is kept so we don't have to make an OpenGL call if the color is the same */
483 #endif
484 
485  /** Pointer to the font to use for rendering */
487 
488  /** Minification mode for the font texture */
489  unsigned char _textureMinFilter;
490 
491  /** Magnification mode for the font texture */
492  unsigned char _textureMagFilter;
493 
494  /**
495  * Helper method to set up Open GL texture modes, bind the font's texture,
496  * set up minification and magnification filters, etc.
497  */
498 
499 #ifdef GLES
500 
501  void SetupTexture(IFontImage* texture, IGlsStateManager *stateManager)
502  {
503  const bool mipMap = ( ( TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST == _textureMinFilter ) ||
504  ( TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR == _textureMinFilter ) ||
506  ( TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST == _textureMinFilter ) );
507  if (mipMap)
508  {
509  // This will force the image to create the mipmap images
510  texture->MipMap(true);
511  }
512 
513  // Initialize the font texture
514  stateManager->Texture2DEnabled(true);
515  stateManager->BindTexture(texture);
516 
517  // Set up mip mapping for magnification
518  if (_textureMagFilter == TEXTURE_FILTER_NEAREST)
519  {
520  stateManager->SetTextureMagFilter(GL_NEAREST);
521  }
522  else if (_textureMagFilter == TEXTURE_FILTER_LINEAR)
523  {
524  stateManager->SetTextureMagFilter(GL_LINEAR);
525  }
526 
527  // Set up mip mapping for minification
528  switch (_textureMinFilter)
529  {
531  stateManager->SetTextureMinFilter(GL_NEAREST);
532  break;
533 
535  stateManager->SetTextureMinFilter(GL_LINEAR);
536  break;
537 
539  stateManager->SetTextureMinFilter(GL_NEAREST_MIPMAP_NEAREST);
540  break;
541 
543  stateManager->SetTextureMinFilter(GL_LINEAR_MIPMAP_LINEAR);
544  break;
545 
547  stateManager->SetTextureMinFilter(GL_NEAREST_MIPMAP_LINEAR);
548  break;
549 
551  stateManager->SetTextureMinFilter(GL_LINEAR_MIPMAP_NEAREST);
552  break;
553  }
554 
555  stateManager->SetTextureEnvMode(IGlsStateManager::GLS_TEXTURE_MAP_MODE_MODULATE);
556 
557  } // end GlsFontRenderer::SetupTexture
558 
559 #else // !GLES
560 
561  void SetupTexture(IFontImage* texture)
562  {
563  const bool mipMap = ( ( TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST == _textureMinFilter ) ||
564  ( TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR == _textureMinFilter ) ||
566  ( TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST == _textureMinFilter ) );
567  if (mipMap)
568  {
569  // This will force the image to create the mipmap images
570  texture->MipMap(true);
571  }
572 
573  // Initialize the drawing color
574  glColor4ubv(_currentColor.RGBA());
575 
576  // Initialize the font texture
577  glEnable(GL_TEXTURE_2D);
578  texture->BindTexture();
579 
580  // Set up mip mapping for magnification
581  if (_textureMagFilter == TEXTURE_FILTER_NEAREST)
582  {
583  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
584  }
585  else if (_textureMagFilter == TEXTURE_FILTER_LINEAR)
586  {
587  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
588  }
589 
590  // Set up mip mapping for minification
591  switch (_textureMinFilter)
592  {
594  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
595  break;
597  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
598  break;
600  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
601  break;
603  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
604  break;
606  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR);
607  break;
609  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
610  break;
611  }
612 
613  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
614 
615  } // end GlsFontRenderer::SetupTexture
616 
617 #endif // GLES
618 
619 }; // end class GlsFontRenderer
620 
621 } // end namespace disti
622 
623 #endif
Definition: display_types.h:76
Definition: display_types.h:74
virtual void MipMap(bool mipMap)=0
unsigned char _textureMinFilter
Definition: gls_font_renderer.h:489
Definition: IFontImage.h:54
void SetupTexture(IFontImage *texture)
Definition: gls_font_renderer.h:561
glsColor _currentColor
Definition: gls_font_renderer.h:482
void TextureMinFilter(unsigned char val)
Definition: gls_font_renderer.h:102
The disti::GlsFontBase class and related classes.
Image * Texture() const
Definition: gls_font_base.h:318
virtual void BindTexture()=0
unsigned char TextureMagFilter()
Definition: gls_font_renderer.h:108
unsigned char TextureMinFilter()
Definition: gls_font_renderer.h:96
The Color class: Implements a 4 component RGBA color.
The Image class. All textures are converted internally into Images.
const GlsFontBase * _font
Definition: gls_font_renderer.h:486
VertexNoColor Vector
Definition: gls_font_base.h:68
Definition: gls_font_renderer.h:84
void DrawCharacter(const bool emphasize, const float emphasisOffset, const bool inverse, const GLfloat x1, const GLfloat y1, const GLfloat x2, const GLfloat y2, const GLfloat tx1, const GLfloat ty1, const GLfloat tx2, const GLfloat ty2) const
Definition: gls_font_renderer.h:296
The disti::Vertex class. A class for manipulating 3D vertices.
void DrawShadow(const float shadowOffset, const GLfloat x1, const GLfloat y1, const GLfloat x2, const GLfloat y2, const GLfloat tx1, const GLfloat ty1, const GLfloat tx2, const GLfloat ty2) const
Definition: gls_font_renderer.h:407
void SetFont(const GlsFontBase *font)
Definition: gls_font_renderer.h:128
void DrawHalo(const float haloOffset, const GLfloat x1, const GLfloat y1, const GLfloat x2, const GLfloat y2, const GLfloat tx1, const GLfloat ty1, const GLfloat tx2, const GLfloat ty2) const
Definition: gls_font_renderer.h:349
unsigned char _textureMagFilter
Definition: gls_font_renderer.h:492
void InitRendering()
Definition: gls_font_renderer.h:179
void TermRendering()
Definition: gls_font_renderer.h:189
Definition: gls_color.h:54
void RGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: gls_color.h:164
Definition: display_types.h:72
void TextureMagFilter(unsigned char val)
Definition: gls_font_renderer.h:114
Definition: display_types.h:75
Definition: display_types.h:71
Definition: display_types.h:73
Character attributes. One item for each character in the set.
Definition: gls_font_base.h:127
static void MapTexture(const GLfloat x1, const GLfloat y1, const GLfloat x2, const GLfloat y2, const GLfloat tx1, const GLfloat ty1, const GLfloat tx2, const GLfloat ty2)
Definition: gls_font_renderer.h:445
void InitRendering(unsigned char textureMinFilter, unsigned char textureMagFilter)
Definition: gls_font_renderer.h:146
Definition: bmpimage.h:46
GlsFontRenderer(const GlsFontBase *font)
Definition: gls_font_renderer.h:471
IFontImage.
Definition: gls_font_base.h:87
The gls_gl.