[xna] Fixed another (not so apparent) bug in multi pass rending (item texture reference was cleared to null and added to free pool too early). See #1554.

This commit is contained in:
Harald Csaszar 2019-11-27 12:18:00 +01:00
parent cb59d8d78b
commit c771fabf5d

View File

@ -157,14 +157,17 @@ namespace Spine {
Array.Copy(item.vertices, 0, vertexArray, vertexCount, itemVertexCount);
vertexCount += itemVertexCount;
item.texture = null;
freeItems.Enqueue(item);
}
FlushVertexArray(device, vertexCount, triangleCount);
}
public void AfterLastDrawPass () {
int itemCount = items.Count;
for (int i = 0; i < itemCount; i++) {
var item = items[i];
item.texture = null;
freeItems.Enqueue(item);
}
items.Clear();
}