GLState: Remove 'BlendNone' mode in favor of disabling blending alltogether

This commit is contained in:
Jonas Kulla 2014-07-20 13:17:12 +02:00
parent 7ce747d34d
commit 27b7815f52
6 changed files with 30 additions and 23 deletions

View file

@ -166,9 +166,9 @@ struct BitmapPrivate
void blitQuad(Quad &quad)
{
glState.blendMode.pushSet(BlendNone);
glState.blend.pushSet(false);
quad.draw();
glState.blendMode.pop();
glState.blend.pop();
}
void fillRect(const IntRect &rect,
@ -540,7 +540,7 @@ void Bitmap::blur()
BlurShader::HPass &pass1 = shader.pass1;
BlurShader::VPass &pass2 = shader.pass2;
glState.blendMode.pushSet(BlendNone);
glState.blend.pushSet(false);
glState.viewport.pushSet(IntRect(0, 0, width(), height()));
TEX::bind(p->gl.tex);
@ -562,7 +562,7 @@ void Bitmap::blur()
quad.draw();
glState.viewport.pop();
glState.blendMode.pop();
glState.blend.pop();
shState->texPool().release(auxTex);
@ -959,11 +959,8 @@ void Bitmap::drawText(const IntRect &rect, const char *str, int align)
p->bindFBO();
p->pushSetViewport(shader);
glState.blendMode.pushSet(BlendNone);
p->blitQuad(quad);
quad.draw();
glState.blendMode.pop();
p->popViewport();
}