Skip to main content

Module drawable

Module drawable 

Expand description

Base-class for objects that draw into a crate::Canvas. The object has a generation ID, which is guaranteed to be unique across all drawables.

Modules§

gpu_draw_handler
GPU backend support for drawables: a GPUDrawHandler lets a drawable execute using the underlying 3D API rather than the crate::Canvas API.

Type Aliases§

Drawable
Base-class for objects that draw into Canvas.
GPUDrawHandler
When using the GPU backend it is possible for a drawable to execute using the underlying 3D API rather than the crate::Canvas API. It does so by creating a GPU draw handler. The GPU backend is deferred so the handler will be given access to the 3D API at the correct point in the drawing stream as the GPU backend flushes. Since the drawable may mutate, each time it is drawn to a GPU-backed canvas a new handler is snapped, representing the drawable’s state at the time of the snap.