Type Function
Object TextureResourceCanvas
Library graphics.*
Revision Release 2024.3703
See also TextureResource


This method schedules display objects queued for rendering via texture:draw() to be rendered to the texture before the next frame.


texture:invalidate( [params] )
params (optional)

String or Table. If specified, one of the following options are valid. If omitted, accumulative rendering of objects from the rendering queue occurs.

  • Pass a string value of "cache" to clear the texture and subsequently render objects from the cache to the texture:

texture:invalidate( "cache" )

  • If you need to render display objects without clearing the texture, pass a table with keys of source and accumulate. This switches off accumulative rendering and uses the cache as the source for rendering to the texture.

texture:invalidate( { source="cache", accumulate=false } )