From cfcfc2fd5e6726aa48d4483a10633038bccd645f Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Wed, 25 Sep 2013 15:13:45 +0200 Subject: [PATCH] Fix wrong pixel format specified for upload --- src/bitmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitmap.cpp b/src/bitmap.cpp index a4aac78..f523915 100644 --- a/src/bitmap.cpp +++ b/src/bitmap.cpp @@ -646,7 +646,7 @@ void Bitmap::drawText(const IntRect &rect, const char *str, int align) { /* Even faster: upload directly to bitmap texture */ TEX::bind(p->tex.tex); - TEX::uploadSubImage(posRect.x, posRect.y, posRect.w, posRect.h, txtSurf->pixels, GL_RGBA); + TEX::uploadSubImage(posRect.x, posRect.y, posRect.w, posRect.h, txtSurf->pixels, GL_BGRA_EXT); } else { @@ -654,7 +654,7 @@ void Bitmap::drawText(const IntRect &rect, const char *str, int align) TEXFBO &gpTF = gState->gpTexFBO(txtSurf->w, txtSurf->h); TEX::bind(gpTF.tex); - TEX::uploadSubImage(0, 0, txtSurf->w, txtSurf->h, txtSurf->pixels, GL_RGBA); + TEX::uploadSubImage(0, 0, txtSurf->w, txtSurf->h, txtSurf->pixels, GL_BGRA_EXT); FBO::bind(gpTF.fbo, FBO::Read); p->bindFBO();