Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Generals/Code/Libraries/Source/WWVegas/WW3D2/texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,10 @@ void TextureClass::Apply_Null(unsigned int stage)

void TextureClass::Apply_New_Surface(bool initialized)
{
if (D3DTexture) D3DTexture->Release();
D3DTexture=TextureLoadTask->Peek_D3D_Texture();
D3DTexture->AddRef();
Set_D3D_Base_Texture(TextureLoadTask->Peek_D3D_Texture());
if (initialized) Initialized=true;

WWASSERT(D3DTexture);
WWASSERT(Peek_D3D_Base_Texture());
IDirect3DSurface8* surface;
DX8_ErrorCode(Peek_D3D_Texture()->GetSurfaceLevel(0,&surface));
D3DSURFACE_DESC d3d_desc;
Expand Down
28 changes: 4 additions & 24 deletions GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,12 +895,7 @@ void TextureClass::Apply_New_Surface
bool disable_auto_invalidation
)
{
IDirect3DBaseTexture8* d3d_tex=Peek_D3D_Base_Texture();

if (d3d_tex) d3d_tex->Release();

Poke_Texture(d3d_texture);//TextureLoadTask->Peek_D3D_Texture();
d3d_texture->AddRef();
Set_D3D_Base_Texture(d3d_texture);

if (initialized) Initialized=true;
if (disable_auto_invalidation) InactivationTime = 0;
Expand Down Expand Up @@ -1276,12 +1271,7 @@ void ZTextureClass::Apply_New_Surface
bool disable_auto_invalidation
)
{
IDirect3DBaseTexture8* d3d_tex=Peek_D3D_Base_Texture();

if (d3d_tex) d3d_tex->Release();

Poke_Texture(d3d_texture);//TextureLoadTask->Peek_D3D_Texture();
d3d_texture->AddRef();
Set_D3D_Base_Texture(d3d_texture);

if (initialized) Initialized=true;
if (disable_auto_invalidation) InactivationTime = 0;
Expand Down Expand Up @@ -1595,12 +1585,7 @@ void CubeTextureClass::Apply_New_Surface
bool disable_auto_invalidation
)
{
IDirect3DBaseTexture8* d3d_tex=Peek_D3D_Base_Texture();

if (d3d_tex) d3d_tex->Release();

Poke_Texture(d3d_texture);//TextureLoadTask->Peek_D3D_Texture();
d3d_texture->AddRef();
Set_D3D_Base_Texture(d3d_texture);

if (initialized) Initialized=true;
if (disable_auto_invalidation) InactivationTime = 0;
Expand Down Expand Up @@ -1883,12 +1868,7 @@ void VolumeTextureClass::Apply_New_Surface
bool disable_auto_invalidation
)
{
IDirect3DBaseTexture8* d3d_tex=Peek_D3D_Base_Texture();

if (d3d_tex) d3d_tex->Release();

Poke_Texture(d3d_texture);//TextureLoadTask->Peek_D3D_Texture();
d3d_texture->AddRef();
Set_D3D_Base_Texture(d3d_texture);

if (initialized) Initialized=true;
if (disable_auto_invalidation) InactivationTime = 0;
Expand Down
Loading