vdr-plugin-softhddevice-drm-gles 1.6.2
cOglFontAtlas Class Reference

Texture Atlas for a Font. More...

#include <openglosd.h>

Public Member Functions

 cOglFontAtlas (FT_Face, int)
 
virtual ~cOglFontAtlas (void)
 
cOglAtlasGlyphGetGlyph (int) const
 
int Height (void) const
 
int Width (void) const
 
void BindTexture (void)
 

Private Attributes

GLuint m_texture = 0
 
int m_width = 0
 
int m_height = 0
 
cOglAtlasGlyphm_pGlyph [MAX_CHARCODE - MIN_CHARCODE+1]
 

Detailed Description

Texture Atlas for a Font.

Represents a texture atlas keeping a range of glyphs on one texture per font and size instead of having one texture per glyph. This technique makes dealing with huge amounts of glyphs faster, because the bottleneck (texture up-/download/binding) is reduced at a minimum. Its faster to deal with one single bigger texture than many smaller ones.

The font atlas is prepared once at the time the new font or sized is accessed for the first time. We may have a little delay at startup, which is negligible.

Definition at line 171 of file openglosd.h.

Member Function Documentation

◆ Height()

int cOglFontAtlas::Height ( void  ) const
inline

Definition at line 176 of file openglosd.h.

References m_height.

◆ Width()

int cOglFontAtlas::Width ( void  ) const
inline

Definition at line 177 of file openglosd.h.

References m_width.

Member Data Documentation

◆ m_height

int cOglFontAtlas::m_height = 0
private

Definition at line 182 of file openglosd.h.

Referenced by cOglFontAtlas(), and Height().

◆ m_pGlyph

cOglAtlasGlyph* cOglFontAtlas::m_pGlyph[MAX_CHARCODE - MIN_CHARCODE+1]
private

Definition at line 183 of file openglosd.h.

Referenced by cOglFontAtlas(), GetGlyph(), and ~cOglFontAtlas().

◆ m_texture

GLuint cOglFontAtlas::m_texture = 0
private

Definition at line 180 of file openglosd.h.

Referenced by BindTexture(), cOglFontAtlas(), and ~cOglFontAtlas().

◆ m_width

int cOglFontAtlas::m_width = 0
private

Definition at line 181 of file openglosd.h.

Referenced by cOglFontAtlas(), and Width().


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