Skip to content

Commit

Permalink
Fix index buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Jun 22, 2019
1 parent 892c5f8 commit e469212
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ValveResourceFormat/ThirdParty/MeshOptimizerIndexDecoder.cs
Expand Up @@ -60,6 +60,8 @@ private static uint DecodeIndex(BinaryReader data, uint next, uint last)

private static void WriteTriangle(Span<byte> destination, int offset, int indexSize, uint a, uint b, uint c)
{
offset *= indexSize;

if (indexSize == 2)
{
BinaryPrimitives.WriteUInt16LittleEndian(destination.Slice(offset + 0), (ushort)a);
Expand Down

0 comments on commit e469212

Please sign in to comment.