Write the per-frame + per-view UBOs. Safe to call any time before `dispatch`; callers should call exactly once per frame to keep `PerFrame.time` accurate. Does NOT clear the commands list — that's `reset_frame`'s job (called at begin_frame, not end_frame, so draws submitted during the frame survive).
(
&mut self,
queue: &wgpu::Queue,
per_frame: &PerFrameUniforms,
per_view: &PerViewUniforms,
)
| 674 | /// list — that's `reset_frame`'s job (called at begin_frame, not |
| 675 | /// end_frame, so draws submitted during the frame survive). |
| 676 | pub fn update_frame_uniforms( |
| 677 | &mut self, |
| 678 | queue: &wgpu::Queue, |
| 679 | per_frame: &PerFrameUniforms, |
| 680 | per_view: &PerViewUniforms, |
| 681 | ) { |
| 682 | queue.write_buffer(&self.per_frame_buffer, 0, bytemuck::bytes_of(per_frame)); |
| 683 | queue.write_buffer(&self.per_view_buffer, 0, bytemuck::bytes_of(per_view)); |
| 684 | } |
| 685 | |
| 686 | /// Reset the per-draw slot cursor. Commands lists are cleared by |
| 687 | /// the Renderer from its own `begin_frame` so the order of reset |
no outgoing calls