just code indentation

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4280 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-09-15 21:25:34 +00:00
parent ef6e574ea1
commit 3117bde5fb
3 changed files with 536 additions and 524 deletions

View File

@ -322,6 +322,8 @@ void ShowD3DError(HRESULT err)
{ {
if (dev) if (dev)
{ {
ForgetCachedState();
// Can't keep a pointer around to the backbuffer surface when resetting. // Can't keep a pointer around to the backbuffer surface when resetting.
if (back_buffer_z) if (back_buffer_z)
back_buffer_z->Release(); back_buffer_z->Release();
@ -399,6 +401,14 @@ void ShowD3DError(HRESULT err)
} }
} }
void ForgetCachedState()
{
memset(m_Textures, 0, sizeof(m_Textures));
memset(m_RenderStates, 0xFF, sizeof(m_RenderStates));
memset(m_TextureStageStates, 0xFF, sizeof(m_TextureStageStates));
memset(m_SamplerStates, 0xFF, sizeof(m_SamplerStates));
}
void SetTexture(DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture) void SetTexture(DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture)
{ {
if (m_Textures[Stage] != pTexture) if (m_Textures[Stage] != pTexture)

View File

@ -57,6 +57,7 @@ void SetTexture(DWORD Stage, IDirect3DBaseTexture9 *pTexture);
void SetRenderState(D3DRENDERSTATETYPE State, DWORD Value); void SetRenderState(D3DRENDERSTATETYPE State, DWORD Value);
void SetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value); void SetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value);
void SetSamplerState(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value); void SetSamplerState(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value);
void ForgetCachedState();
// Utility functions for vendor specific hacks. So far, just the one. // Utility functions for vendor specific hacks. So far, just the one.
void EnableAlphaToCoverage(); void EnableAlphaToCoverage();

View File

@ -47,6 +47,7 @@ namespace D3D
m_pTexture = NULL; m_pTexture = NULL;
m_pVB = NULL; m_pVB = NULL;
} }
enum {m_dwTexWidth = 512, m_dwTexHeight = 512}; enum {m_dwTexWidth = 512, m_dwTexHeight = 512};
int CD3DFont::Init() int CD3DFont::Init()