Definition at line 36 of file text_shader.h.
#include <text_shader.h>
◆ HorizAlign
Enumerator |
---|
HORIZ_ALIGN_LEFT | |
HORIZ_ALIGN_CENTER | |
HORIZ_ALIGN_RIGHT | |
Definition at line 47 of file text_shader.h.
◆ VertAlign
Enumerator |
---|
VERT_ALIGN_TOP | |
VERT_ALIGN_CENTER | |
VERT_ALIGN_BASELINE | |
VERT_ALIGN_BOTTOM | |
Definition at line 53 of file text_shader.h.
◆ TextShader()
mingfx::TextShader::TextShader |
( |
| ) |
|
◆ ~TextShader()
virtual mingfx::TextShader::~TextShader |
( |
| ) |
|
|
virtual |
◆ Draw3D()
void mingfx::TextShader::Draw3D |
( |
const Matrix4 & |
model, |
|
|
const Matrix4 & |
view, |
|
|
const Matrix4 & |
projection, |
|
|
const std::string & |
text, |
|
|
TextFormat |
format, |
|
|
bool |
cache = false |
|
) |
| |
◆ Init()
bool mingfx::TextShader::Init |
( |
const std::string & |
font_file, |
|
|
int |
native_font_size |
|
) |
| |
Call this from within the InitOpenGL() function since it will initialize not just the Font's internal data but also an OpenGL texture to be stored on the graphics card. Internally, this uses the stb_truetype library to load true type fonts (files with a .ttf extension).
◆ native_font_size()
float mingfx::TextShader::native_font_size |
( |
| ) |
|
◆ TextExtents()
Vector2 mingfx::TextShader::TextExtents |
( |
const std::string & |
text, |
|
|
TextFormat |
format, |
|
|
bool |
cache = false |
|
) |
| |
The documentation for this class was generated from the following file: