Class: RenderableGCSystem

RenderableGCSystem

System plugin to the renderer to manage renderable garbage collection. When rendering stuff with the renderer will assign resources to each renderable. This could be for example a batchable Sprite, or a text texture. If the renderable is not used for a certain amount of time its resources will be tided up by its render pipe.

new RenderableGCSystem (renderer)

Name Type Description
renderer Renderer

The renderer this System works for.

Implements

Members

defaultOptions RenderableGCSystemOptions static

default options for the renderableGCSystem

Properties:
Name Type Default Description
renderableGCActive boolean true

If set to true, this will enable the garbage collector on the GPU.

renderableGCFrequency number 600

Frames between two garbage collections.

renderableGCMaxUnusedTime number 60 * 60

The maximum idle frames before a texture is destroyed by garbage collection.

maxUnusedTime number

Maximum idle frames before a texture is destroyed by garbage collection.

See:
  • renderableGCSystem.defaultMaxIdle

Methods

run () void

Runs the scheduled garbage collection