cherry-pick: fix unloading

This commit is contained in:
Dreitone committed 2025-12-19 19:12:20 -06:00
1 parent 96553cdbe3
commit 7af86d63bc
1 file changed
+12
+12
View File
@@ -100,6 +100,18 @@ namespace CalamityMod.Graphics.Primitives
{
Main.QueueMainThreadAction(() =>
{
MainPositions = null;
MainVertices = null;
MainIndices = null;
MainCompletionRatios = null;
MainTangents = null;
MainNormals = null;
WireframeVertices = null;
NonSmoothIndexScratch = null;
VertexBuffer?.Dispose();
VertexBuffer = null;
IndexBuffer?.Dispose();
IndexBuffer = null;
WireframeEffect?.Dispose();
WireframeEffect = null;
});