fix for rbga8 decoding that causes problems in nsmbw

fix for screen clearing in opengl and d3d

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5749 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-06-19 21:12:09 +00:00
parent 208c33f09c
commit 4ab0e4b8a0
3 changed files with 13 additions and 10 deletions

View File

@ -914,11 +914,13 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
sirc.right = targetRc.right;
sirc.bottom = targetRc.bottom;
D3D::dev->SetScissorRect(&sirc);
D3D::ChangeRenderState(D3DRS_ALPHABLENDENABLE, false);
if (zEnable)
D3D::ChangeRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS);
D3D::drawClearQuad(color ,(z & 0xFFFFFF) / float(0xFFFFFF),PixelShaderCache::GetClearProgram(),VertexShaderCache::GetClearVertexShader());
if (zEnable)
D3D::RefreshRenderState(D3DRS_ZFUNC);
D3D::RefreshRenderState(D3DRS_ZFUNC);
D3D::RefreshRenderState(D3DRS_ALPHABLENDENABLE);
UpdateViewport();
SetScissorRect();
}