Some housecleaning around the D3D plugin, start of preparations to share even more code with the GL plugin.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4183 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-09-03 19:24:16 +00:00
parent 2091fb3ceb
commit 562a4e25ac
24 changed files with 201 additions and 684 deletions

View File

@ -265,8 +265,8 @@ void Flush()
goto shader_fail;
// update alpha only
Renderer::SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA);
Renderer::SetRenderState(D3DRS_ALPHABLENDENABLE, false);
D3D::SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA);
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, false);
g_nativeVertexFmt->SetupVertexPointers();
if (collection != C_POINTS)
@ -299,9 +299,9 @@ void Flush()
if (bpmem.blendmode.colorupdate)
write |= D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE;
if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract)
Renderer::SetRenderState(D3DRS_ALPHABLENDENABLE, true);
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, true);
Renderer::SetRenderState(D3DRS_COLORWRITEENABLE, write);
D3D::SetRenderState(D3DRS_COLORWRITEENABLE, write);
INCSTAT(stats.thisFrame.numDrawCalls);
}