TextureCache

A cache of textures in use by a model.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

add
uint add(Texture texture)

Adds a texture to the cache, adding a retain count to the texture. Texture caches only allow a single instance of a texture to be stored within.

find
ptrdiff_t find(Texture texture)

Finds the slot of a given texture within the cache.

get
Texture get(uint slotId)

Tries to get a texture from the cache.

insert
void insert(Texture texture, size_t at)

Inserts a texture into the texture cache at the given index, the texture cache is resized to accomodate the index.

prune
void prune()

Prunes all textures from the cache, only leaving behind textures referenced from outside of the cache.

Properties

cache
Texture[] cache [@property getter]

The cached textures.

size
size_t size [@property getter]

Size of the texture cache in elements.

Meta