Core guide
Resource ownership
Keep GPU resources alive across accepted draws with opaque handles and leases.
Live example
See Resource ownership in action
See a texture acquired through a resource owner remain usable for the game lifetime.
How it works
Releasing a handle invalidates that handle for future reads. An accepted draw keeps its resource lease until the renderer is safe to release it, while owner disposal cleans up remaining acquisitions.
Public types
ResourceOwnerResourceHandle<T>GeometryOwnerGeometryHandle
Minimum viable example
const handle = game.resources.acquire(texture, (resource) => resource.release());
renderer.draw_texture(handle.read());
handle.release(); Scope and limitations
Scene ownership automation and multi-scene asset policies are deferred.