Handle error that can be returned by render_to_texture

This commit is contained in:
Arman Uguray 2023-03-03 11:32:39 -08:00
parent d72ad14059
commit acfd570440

View file

@ -128,7 +128,7 @@ impl Renderer {
if target.width != width || target.height != height {
target = TargetTexture::new(device, width, height);
}
self.render_to_texture(device, queue, scene, &target.view, &params);
self.render_to_texture(device, queue, scene, &target.view, &params)?;
let mut encoder =
device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });
{