GlbData.MergeBuffers

MergeBuffers()

Merges all the !:GlbImage.LogicalBuffers instances into a single big one.

public void MergeBuffers()

Exceptions

exceptioncondition
InvalidOperationException.Net arrays have an upper limit of 2Gb, so this is the biggest a buffer can normally grow, so attempting to merge buffers that sum more than 2Gb will throw this exception.

Remarks

When merging the buffers, it also adjusts the BufferView offsets so the data they point to remains the same.

If images are required to be included in the binary, call !:GlbImage.MergeImages before calling MergeBuffers.

See Also


MergeBuffers(int)

Merges all the !:GlbImage.LogicalBuffers instances into buffers of maxSize size.

public void MergeBuffers(int maxSize)
ParameterTypeDescription
maxSizeInt32The maximum size of each buffer. Notice that if a single BufferView is larger than maxSize, that buffer will be also larger.

See Also