Open
Description
This issue tracks the ability to render custom content (rendered with wgpu) into a Blitz scene.
Notes
- The Vello renderer allows for a custom wgpu texture to be rendered in a Vello scene using: https://docs.rs/vello/latest/vello/struct.Renderer.html#method.override_image. To use this API, one creates a dummy
peniko::Image
of the correct dimensions, call this API with the texture you wish to use. You can then render the texture by drawing callingScene::draw_image
with the dummy image (yes this API is dumb, but it works so 🤷 ) - We need to work out an API for how to do it. The web typically uses the
<canvas>
element for custom rendered content. It would probably make sense for us to do the same here. Either the<canvas>
element should own a wgpu Texture and we need some way to get a reference to it. Or we should crate our own wgpu texture, and we need to some way to pass it to the<canvas>
- probably makes sense for the<canvas>
to own the texture?
Activity