Provides a set of Textures and slots to automatically store multiple TextureData where it fits best.
Constructor
new(textureTypes:Array<{width:Int, slots:Int, height:Int, config:TextureConfig}>)
Creates a new TextureCache instance.
Parameters:
textureTypes | defines the width, height, slots amount and texture-type of what have to be available |
|---|
Variables
Methods
addData(textureData:TextureData):{unit:Int, slot:Int}
Adds a TextureData instance into the next free texture/slot where it best fits and does not already exist.
Returns the texture unit and slot number or null if it not fits.