Skip to content

Commit 556f1dd

Browse files
committed
Add destroy function to CRender to cleanup sss stuff
1 parent 87ba0d0 commit 556f1dd

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Layers/xrRender/D3DXRenderBase.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ void D3DXRenderBase::OnDeviceDestroy(bool bKeepTextures)
7070

7171
void D3DXRenderBase::Destroy()
7272
{
73+
for (int id = 0; id < R__NUM_CONTEXTS; ++id)
74+
{
75+
contexts_pool[id].destroy();
76+
}
77+
7378
xr_delete(Resources);
7479
HW.DestroyDevice();
7580
}

src/Layers/xrRender/r__dsgraph_structure.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ struct R_dsgraph_structure
141141
mapLOD.destroy();
142142
mapDistort.destroy();
143143
mapHUDSorted.destroy();
144-
//HUDMask.destroy();
145-
//mapWater.destroy();
146144

147145
#if RENDER != R_R1
148146
mapWmark.destroy();
@@ -152,6 +150,12 @@ struct R_dsgraph_structure
152150
cmd_list.Invalidate();
153151
}
154152

153+
void destroy()
154+
{
155+
HUDMask.destroy();
156+
mapWater.destroy();
157+
}
158+
155159
void r_pmask(bool _1, bool _2, bool _wm = false)
156160
{
157161
o.pmask[0] = _1;

0 commit comments

Comments
 (0)