Skip to content

Commit

Permalink
Add destroy function to CRender to cleanup sss stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
yohjimane committed Nov 12, 2024
1 parent 87ba0d0 commit 556f1dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Layers/xrRender/D3DXRenderBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ void D3DXRenderBase::OnDeviceDestroy(bool bKeepTextures)

void D3DXRenderBase::Destroy()
{
for (int id = 0; id < R__NUM_CONTEXTS; ++id)
{
contexts_pool[id].destroy();
}

xr_delete(Resources);
HW.DestroyDevice();
}
Expand Down
8 changes: 6 additions & 2 deletions src/Layers/xrRender/r__dsgraph_structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ struct R_dsgraph_structure
mapLOD.destroy();
mapDistort.destroy();
mapHUDSorted.destroy();
//HUDMask.destroy();
//mapWater.destroy();

#if RENDER != R_R1
mapWmark.destroy();
Expand All @@ -152,6 +150,12 @@ struct R_dsgraph_structure
cmd_list.Invalidate();
}

void destroy()
{
HUDMask.destroy();
mapWater.destroy();
}

void r_pmask(bool _1, bool _2, bool _wm = false)
{
o.pmask[0] = _1;
Expand Down

0 comments on commit 556f1dd

Please sign in to comment.