Provides allocation and freeing of ranges within IndexBuffers.
The IndexBufferManager will create and free any IndexBuffers it requires.
Required scripts
The IndexBufferManager object requires:
/*{{ javascript("jslib/indexbuffermanager.js") }}*/
Summary
Syntax
var indexBufferManager = IndexBufferManager.create(graphicsDevice, dynamic);
Summary
Allocate a number of indices of a given format.
The returned object should be retained to pass to free().
Syntax
var format = graphicsDevice.INDEXFORMAT_USHORT;
var allocation = indexBufferManager.allocate(numIndices, format);
var indexBuffer = allocation.indexBuffer;
var baseIndex = allocation.baseIndex;
The returned object has two public values:
Summary
Called to free an allocation from the IndexBufferManager.
Syntax
indexBufferManager.free(allocation);
Summary
Called when the object is no longer required.
Syntax
indexBufferManager.destroy();