1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-05-10 02:55:00 +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) void GPUState::setBlend(BlendType bt)
{ {
compile_assert(Countof(s_blendParams) == _BLEND_MAXSIZE); compile_assert(Countof(s_blendParams) == _BLEND_MAXSIZE);
if(_blendType == bt) // FIXME: comment this back in once ALL other occurances of glBlendFunc() have been removed
return; //if(_blendType == bt)
// return;
_blendType = bt; _blendType = bt;
if (bt >= BLEND_DEFAULT) if (unsigned(bt) < _BLEND_MAXSIZE)
{ {
glEnable(GL_BLEND); glEnable(GL_BLEND);
const BlendParams& bp = s_blendParams[bt]; const BlendParams& bp = s_blendParams[bt];