DX11: Introduce a StateManager class, might improve performance a little.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5740 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-06-18 23:33:07 +00:00
parent b4f5a4d89e
commit 5cfdb2d0c8
9 changed files with 54 additions and 334 deletions

View File

@ -31,8 +31,7 @@ struct TexbufDeleter
{
~TexbufDeleter()
{
if (texbuf) delete[] texbuf;
texbuf = NULL;
SAFE_DELETE_ARRAY(texbuf);
texbufsize = 0;
}
} texbufdeleter;
@ -55,7 +54,7 @@ void ReplaceTexture2D(ID3D11Texture2D* pTexture, const u8* buffer, unsigned int
{
if (texbufsize < 4*width*height)
{
if (texbuf) delete[] texbuf;
SAFE_DELETE_ARRAY(texbuf);
texbuf = new u8[4*width*height];
texbufsize = 4*width*height;
}