1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

Don't cache blend type while glBlendFunc() is still called elsewhere

This commit is contained in:
fgenesis 2022-05-21 16:31:38 +02:00
parent 5c558c122f
commit 80d23900de

View file

@ -31,11 +31,12 @@ GPUState::GPUState()
void GPUState::setBlend(BlendType bt)
{
compile_assert(Countof(s_blendParams) == _BLEND_MAXSIZE);
if(_blendType == bt)
return;
// FIXME: comment this back in once ALL other occurances of glBlendFunc() have been removed
//if(_blendType == bt)
// return;
_blendType = bt;
if (bt >= BLEND_DEFAULT)
if (unsigned(bt) < _BLEND_MAXSIZE)
{
glEnable(GL_BLEND);
const BlendParams& bp = s_blendParams[bt];