Bubba-3D
0.9.0
Awesome game engine!
|
#include <TextObject.h>
Public Member Functions | |
TextObject (std::string text, Font *font, int width, int height, int x, int y) | |
virtual void | render (ShaderProgram *shaderProgram, chag::float4x4 *projectionMatrix) |
virtual void | setText (std::string text) |
![]() | |
virtual void | setRelativePosition (chag::float3 position) |
virtual void | setCenterOffset (chag::float3 offset) |
virtual void | setRotation (float rotation) |
virtual void | setScale (chag::float2 scale) |
Protected Attributes | |
std::string | text |
Font * | font |
int | width |
int | height |
int | x |
int | y |
int | numVertices |
GLuint | vao |
GLuint | vbo |
bool | buffersInitiated = false |
![]() | |
chag::float3 | center = chag::make_vector(0.0f, 0.0f, 0.0f) |
float | rotation = 0.0f |
chag::float3 | originalPosition = chag::make_vector(0.0f, 0.0f, 0.0f) |
chag::float3 | scale = chag::make_vector(1.0f,1.0f,1.0f) |
Additional Inherited Members | |
![]() | |
chag::float3 | relativePosition = chag::make_vector(0.0f, 0.0f, 0.0f) |
A low-level OpenGL object that renders text within the specified dimensions.
Definition at line 26 of file TextObject.h.
TextObject::TextObject | ( | std::string | text, |
Font * | font, | ||
int | width, | ||
int | height, | ||
int | x, | ||
int | y | ||
) |
Creates a text object that should be rendered at position (x,y). The coordinates are screen-type 2D coordinates when used with the HudRenderer (see HudRenderer).
Definition at line 26 of file TextObject.cpp.
|
virtual |
Renders the object using the specified shader program and projection matrix. The shader should have the same variables as the default hud.vert and hud.frag.
Implements IHudDrawable.
Definition at line 179 of file TextObject.cpp.
|
virtual |
Changes the text of the TextObject.
Definition at line 31 of file TextObject.cpp.