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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graphics/text.c b/src/graphics/text.c
index 9afc204..0aa33cf 100644
--- a/src/graphics/text.c
+++ b/src/graphics/text.c
@@ -5,7 +5,7 @@
int mgl_text_init(mgl_text *self, mgl_font *font, const char *text, float x, float y) {
self->font = font;
self->text = text;
- self->color = (mgl_color){ 1.0f, 1.0f, 1.0f, 1.0f };
+ self->color = (mgl_color){ 255, 255, 255, 255 };
self->position = (mgl_vec2f){ x, y };
return 0;
}
@@ -44,7 +44,7 @@ void mgl_text_draw(mgl_context *context, mgl_text *text) {
mgl_vec2f position = text->position;
position.y += text->font->size;
- context->gl.glColor4f(text->color.r, text->color.g, text->color.b, text->color.a);
+ context->gl.glColor4ub(text->color.r, text->color.g, text->color.b, text->color.a);
context->gl.glBindTexture(GL_TEXTURE_2D, text->font->texture.id);
context->gl.glBegin(GL_QUADS);
while(*str) {