TextureReaper

Struct that maintains a registry of all allocated textures. It's used to finalize textures once they have been marked for destruction. This makes it possible to mark them from any thread, while the reaper runs only on the main thread, ensuring thread safety in OpenGL backends.

Constructors

this
this(TextureReaper )
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

check
void check()

Count number of cycles since last collection and collect if configured period has passed.

collect
void collect()

Collect all destroyed textures immediately.

destroyAll
void destroyAll()

Destroy all textures.

makeTombstone
shared(TextureTombstone)* makeTombstone(FluidBackend backend, uint textureID)

Create a tombstone.

Variables

cycleAccumulator
int cycleAccumulator;
Undocumented in source.
period
int period;

Number of cycles between runs of the reaper.

textures
shared(TextureTombstone)*[uint] textures;
Undocumented in source.

Meta