Skip to content

Commit

Permalink
GLTF: Fix glb chunk alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Oct 26, 2024
1 parent 56330eb commit b290628
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private static void writeBinaryHeader(int length, @NotNull WritableByteChannel c

private static void writeBinaryChunk(@NotNull BinaryChunkType type, @NotNull ByteBuffer buffer, @NotNull WritableByteChannel channel) throws IOException {
final int length = buffer.remaining();
final int padding = length % 4;
final int padding = MathUtils.alignUp(length, 4) - length;

channel.write(ByteBuffer
.allocate(8)
Expand Down

0 comments on commit b290628

Please sign in to comment.