A friendly renderer built with WGPU.
Frenderer currently manages a [wgpu::Instance
] and associated
types, initializing a custom [SpriteRenderer] based on
storage buffers (for native) and instance buffers (for WebGL).
It also provides a convenience type [input::Input
] for
processing user input and a utility function for loading a texture
(from disk or from a relative URL).
Except for the WGPU initialization, frenderer is fully modular; in
particular, it does not take control of the event loop. Typical
usage will call [frenderer::with_default_runtime()
]
to install frenderer inside a [winit::window::Window
], call
[sprites::SpriteRenderer::add_sprite_group()
] on the resulting
[frenderer::Frenderer
] value, and eventually call
[frenderer::Frenderer::process_window_event()
],
[sprites::SpriteRenderer::upload_sprites()
], and
[frenderer::Frenderer::render
] to draw.
In the future, calling code will have the option of constructing
its own [wgpu::RenderPass
] to provide to frenderer's rendering
subroutine. More types of renderers including 3D renderers will
also be provided.