aboutsummaryrefslogtreecommitdiff
path: root/src/graphics/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/text.c')
-rw-r--r--src/graphics/text.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/graphics/text.c b/src/graphics/text.c
index 204d1e0..9afc204 100644
--- a/src/graphics/text.c
+++ b/src/graphics/text.c
@@ -14,6 +14,14 @@ void mgl_text_deinit(mgl_text *self) {
}
+void mgl_text_set_position(mgl_text *self, mgl_vec2f position) {
+ self->position = position;
+}
+
+void mgl_text_set_color(mgl_text *self, mgl_color color) {
+ self->color = color;
+}
+
static void mgl_text_draw_glyph(mgl_context *context, mgl_font_glyph *glyph, mgl_vec2f position) {
context->gl.glTexCoord2f(glyph->texture_position.x, glyph->texture_position.y);
context->gl.glVertex3f(position.x + glyph->position.x, position.y + glyph->position.y, 0.0f);