1
0
mirror of synced 2024-11-12 10:10:50 +01:00

Merge pull request #9 from OatmealDome/patch-1

BFRES: Update VertexBufferIndex after re-adding VertexBuffers
This commit is contained in:
KillzXGaming 2018-11-18 15:46:19 -05:00 committed by GitHub
commit 6ce70dc4d1
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);
}