X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2Frender.cpp;h=1dc9b2be4e47646efe11806581dcff23db58feba;hb=1bc6f085c53cdeaa08e2c00e821d4e2e25cae1c8;hp=7e048408b5091239ca10e35e89a8dfe2fcec4035;hpb=55dbd6b35a39888f245e247d2e140f141f918178;p=blank.git diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index 7e04840..1dc9b2b 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -107,13 +107,14 @@ glm::tvec2 Font::TextSize(const char *text) const { return size; } -Texture Font::Render(const char *text, SDL_Color color) const { +Texture Font::Render(const char *text) const { Texture tex; + Render(text, tex); return tex; } -void Font::Render(const char *text, SDL_Color color, Texture &tex) const { - SDL_Surface *srf = TTF_RenderUTF8_Blended(handle, text, color); +void Font::Render(const char *text, Texture &tex) const { + SDL_Surface *srf = TTF_RenderUTF8_Blended(handle, text, { 0xFF, 0xFF, 0xFF, 0xFF }); if (!srf) { throw std::runtime_error(TTF_GetError()); }