graphics: use existing encoder

This commit is contained in:
2026-03-09 09:31:10 -07:00
parent 4ebd251273
commit 98421ed24a
2 changed files with 10 additions and 11 deletions

View File

@@ -58,7 +58,11 @@ pub fn new(
..wgpu::TextureViewDescriptor::default()
});
graphics.render(&view,&device,&queue,graphics::view_inv(frame_state.pos(),frame_state.angles()));
let mut encoder=device.create_command_encoder(&wgpu::CommandEncoderDescriptor{label:None});
graphics.encode_commands(&mut encoder,&view,graphics::view_inv(frame_state.pos(),frame_state.angles()));
queue.submit([encoder.finish()]);
frame.present();
}