Mercurial > mm7
diff Engine/Graphics/Texture.cpp @ 2524:c7264ab7132f
Main menu rendered using d3d11
author | a.parshin |
---|---|
date | Fri, 10 Oct 2014 17:42:05 +0300 |
parents | 3a1b56ab8749 |
children | a902abdfc7f2 |
line wrap: on
line diff
--- a/Engine/Graphics/Texture.cpp Thu Oct 09 23:33:36 2014 +0300 +++ b/Engine/Graphics/Texture.cpp Fri Oct 10 17:42:05 2014 +0300 @@ -395,8 +395,21 @@ pLevelOfDetail0_prolly_alpha_mask = nullptr; pLevelOfDetail1 = nullptr; - pLevelOfDetail2 = nullptr; - pLevelOfDetail3 = nullptr; + //pLevelOfDetail2 = nullptr; + //pLevelOfDetail3 = nullptr; + + if (d3d11_srv) + { + if (d3d11_desc) + { + delete d3d11_desc; + d3d11_desc = nullptr; + } + + extern void d3d11_release(struct ID3D11ShaderResourceView *); + d3d11_release(d3d11_srv); + d3d11_srv = nullptr; + } pPalette16 = nullptr; pPalette24 = nullptr; @@ -494,11 +507,14 @@ palette_id1 = 0; palette_id2 = 0; pLevelOfDetail0_prolly_alpha_mask = nullptr; - pLevelOfDetail3 = nullptr; - pLevelOfDetail2 = nullptr; + //pLevelOfDetail3 = nullptr; + //pLevelOfDetail2 = nullptr; pLevelOfDetail1 = nullptr; pPalette16 = nullptr; pPalette24 = nullptr; + + d3d11_srv = nullptr; + d3d11_desc = nullptr; } //----- (0040F414) -------------------------------------------------------- @@ -1290,8 +1306,17 @@ this->field_18 = 0; if (d3d11_srv) - __debugbreak(); // should properly release this stuff - d3d11_srv = nullptr; + { + if (d3d11_desc) + { + delete d3d11_desc; + d3d11_desc = nullptr; + } + + extern void d3d11_release(struct ID3D11ShaderResourceView *); + d3d11_release(d3d11_srv); + d3d11_srv = nullptr; + } } //----- (0040E55E) --------------------------------------------------------