texture.cache

Type GroupObject
Object TextureResourceCanvas
Library graphics.*
Revision Release 2024.3703
See also TextureResource
TextureResourceCanvas
texture.invalidate()

Overview

After being rendered to the TextureResourceCanvas, the associated display object is moved to this group.

All objects within this group are rendered when the canvas is invalidated with "cache":

texture:invalidate( "cache" )

Elements in this GroupObject can be accessed just like elements in any other display group. You can manually add or remove child objects and use texture:invalidate() to render changes to the texture.

Gotchas

Modifying geometry properties like anchors can be very tricky for this group and doing so may lead to undesired behavior when used in combination with texture.draw() and cumulative invalidation.