## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csGLFontCache Class Reference
[Common Plugin Classes]

OpenGL font cache. More...

`#include <csplugincommon/opengl/glfontcache.h>`

Inheritance diagram for csGLFontCache:

[legend]
List of all members.

## Public Member Functions

void | DumpFontCache (csRefArray< iImage > &pages)
| Create images of all the texture pages used for caching.
void | FlushText ()
| Flush the cached text vertices.
void | Setup ()
| Read configuration etc.
virtual void | WriteString (iFont *font, int pen_x, int pen_y, int fg, int bg, const utf8_char *text, uint flags)
| Draw a string using OpenGL, where the baseline starts at x,y.

## Detailed Description

OpenGL font cache.

Definition at line 44 of file glfontcache.h.

## Member Function Documentation

void csGLFontCache::DumpFontCache | ( | csRefArray< iImage > & | pages | ) |

| Create images of all the texture pages used for caching.

void csGLFontCache::FlushText | ( |  | ) |

| Flush the cached text vertices. The text writer caches some text (and sets some needed states). Before drawing anything else, the text cache has to be flushed (and the states reset).

void csGLFontCache::Setup | ( |  | ) |

| Read configuration etc.

virtual void csGLFontCache::WriteString | ( | iFont * | font,
|  | int | pen_x,
|  | int | pen_y,
|  | int | fg,
|  | int | bg,
|  | const utf8_char * | text,
|  | uint | flags
| ) | `[virtual]`

| Draw a string using OpenGL, where the baseline starts at x,y. Reimplemented from csFontCache.

The documentation for this class was generated from the following file:

- csplugincommon/opengl/glfontcache.h