1
0
mirror of synced 2024-09-24 19:48:21 +02:00

BFRES: Update VertexBufferIndex after re-adding VertexBuffers

This commit is contained in:
OatmealDome 2018-11-18 13:38:30 -05:00 committed by GitHub
parent 74d42d1b8b
commit f13a420d76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,6 +166,7 @@ namespace FirstPlugin
bfres.resFile.Models[CurMdl].Shapes.Add(shape.Shape);
bfres.resFile.Models[CurMdl].VertexBuffers.Add(shape.VertexBuffer);
shape.Shape.VertexBufferIndex = (ushort)(bfres.resFile.Models[CurMdl].VertexBuffers.Count - 1);
SetShaderAssignAttributes(shape.GetMaterial().shaderassign, shape);
}
@ -213,6 +214,7 @@ namespace FirstPlugin
bfres.resFileU.Models[CurMdl].Shapes.Add(shape.Text, shape.ShapeU);
bfres.resFileU.Models[CurMdl].VertexBuffers.Add(shape.VertexBufferU);
shape.ShapeU.VertexBufferIndex = (ushort)(bfres.resFileU.Models[CurMdl].VertexBuffers.Count - 1);
SetShaderAssignAttributes(shape.GetMaterial().shaderassign, shape);
}