From b7906b49c98ffaf29a5c9e25cfbabec16b7f4a8d Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 7 Jan 2013 20:11:26 +0100 Subject: [PATCH] fix byte order in osd rasterfont --- Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp index af2f3cf069..f4ea9ec855 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp @@ -212,8 +212,6 @@ RasterFont::~RasterFont() void RasterFont::printMultilineText(const char *text, double start_x, double start_y, double z, int bbWidth, int bbHeight, u32 color) { size_t length = strlen(text); - if (!length) - return; // nothing to do glBindVertexArray(VAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); @@ -286,7 +284,7 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta ProgramShaderCache::SetBothShaders(s_fragmentShader.glprogid, s_vertexShader.glprogid); if(color != cached_color) { - glUniform4f(uniform_color_id, GLfloat((color>>16)&0xff)/255.f,GLfloat((color>>8)&0xff)/255.f,GLfloat((color>>0)&0xff)/255.f,GLfloat((color>>24)&0xff)/255.f); + glUniform4f(uniform_color_id, GLfloat((color>>0)&0xff)/255.f,GLfloat((color>>8)&0xff)/255.f,GLfloat((color>>16)&0xff)/255.f,GLfloat((color>>24)&0xff)/255.f); cached_color = color; } @@ -299,4 +297,4 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta glBindVertexArray(0); } -} \ No newline at end of file +}