rhi: gl: Fix not resetting color write bits when switching pipeline

This was visible in the triquadcube test when enabling transparent window
background: the cube on the left was rendered incorrectly because alpha
was not written out due to not setting glColorMask() back to the defaults
when switching to another pipeline.

Change-Id: I7a8c94072e0b68a58fffcc8c1a200e3940dcad44
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This commit is contained in:
Laszlo Agocs 2019-09-26 09:38:56 +02:00
parent 0628932fef
commit fc8d6d3ea1

View File

@ -2258,6 +2258,7 @@ void QRhiGles2::executeBindGraphicsPipeline(QRhiGraphicsPipeline *ps)
} }
} else { } else {
f->glDisable(GL_BLEND); f->glDisable(GL_BLEND);
f->glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
} }
if (psD->m_depthTest) if (psD->m_depthTest)
f->glEnable(GL_DEPTH_TEST); f->glEnable(GL_DEPTH_TEST);