Fix wrong pixel format specified for upload

This commit is contained in:
Jonas Kulla 2013-09-25 15:13:45 +02:00
parent 0a17f9ccad
commit cfcfc2fd5e
1 changed files with 2 additions and 2 deletions

View File

@ -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();