Fix shadow atlas resizing bug

This commit is contained in:
Wojtek Figat
2024-08-07 17:14:06 +02:00
parent ffb760d8f3
commit 15d6f9861c
2 changed files with 16 additions and 3 deletions

View File

@@ -134,6 +134,18 @@ public:
Init(Width, Height, BordersPadding);
}
/// <summary>
/// Clears and resets atlas back to the initial state.
/// </summary>
void Reset()
{
Width = 0;
Height = 0;
BordersPadding = 0;
Nodes.Clear();
FreeNodes.Clear();
}
/// <summary>
/// Tries to insert a node into the atlas using rectangle pack algorithm.
/// </summary>