Revert Rodolfo's recent zcomploc commits until they actually work correctly.

This reverts commit 402006a83a.
This reverts commit 48d8d71391.
This reverts commit 450dcc9d2c.
This commit is contained in:
NeoBrainX
2012-03-30 01:56:24 +02:00
parent f7c17c6351
commit 460610ea0e
16 changed files with 75 additions and 184 deletions

View File

@ -632,43 +632,6 @@ void Renderer::SetScissorRect(const TargetRectangle& rc)
glScissor(rc.left, rc.bottom, rc.GetWidth(), rc.GetHeight());
}
void Renderer::ApplyState(RenderStateMode mode)
{
if(mode == RSM_Zcomploc)
{
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
}
else if(mode == RSM_Multipass)
{
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_FALSE);
glDepthFunc(GL_EQUAL);
}
else if (mode == RSM_UseDstAlpha)
{
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE);
glDisable(GL_BLEND);
}
}
void Renderer::RestoreState(RenderStateMode mode)
{
if(mode == RSM_Zcomploc)
{
SetColorMask();
}
else if(mode == RSM_Multipass)
{
SetDepthMode();
}
else if (mode == RSM_UseDstAlpha)
{
SetColorMask();
if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract)
glEnable(GL_BLEND);
}
}
void Renderer::SetColorMask()
{
// Only enable alpha channel if it's supported by the current EFB format