Skip to content

Commit

Permalink
Fix rain particles corruption after Device.Reset()
Browse files Browse the repository at this point in the history
Thanks to Armen Abroyan
  • Loading branch information
Xottab-DUTY committed Mar 8, 2019
1 parent 085c42c commit b8fd8b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cs/engine/layers/xrRender/ResourceManager_Reset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ void CResourceManager::reset_end ()
{
SGeometry* _G = v_geoms[_it];
if (_G->vb == RCache.Vertex.old_pVB) _G->vb = RCache.Vertex.Buffer();
// Here we may recover the buffer using one of
// RCache's index buffers.
// Do not remove else.
if (_G->ib == RCache.Index.old_pIB) _G->ib = RCache.Index.Buffer();
if (_G->ib == RCache.old_QuadIB) _G->ib = RCache.QuadIB;
else if (_G->ib == RCache.old_QuadIB) _G->ib = RCache.QuadIB;
}
}

Expand Down

0 comments on commit b8fd8b9

Please sign in to comment.