MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / clear_view

Method clear_view

examples/cuda/cpu/path_tracer/src/renderer.rs:143–153  ·  view source on GitHub ↗
(&mut self, force: bool)

Source from the content-addressed store, hash-verified

141 }
142
143 fn clear_view(&mut self, force: bool) {
144 if force {
145 self.cuda.update_camera(&self.camera).unwrap();
146 self.cpu.update_camera(&self.camera);
147 } else if self.running_on_gpu {
148 self.cuda.update_camera(&self.camera).unwrap();
149 } else {
150 self.cpu.update_camera(&self.camera);
151 }
152 self.accumulated_samples = 0;
153 }
154
155 pub fn process_event(&mut self, event: &Event<()>, _control_flow: &mut ControlFlow) {
156 if self.controller.process_event(event, &mut self.camera) {

Callers 2

renderMethod · 0.80
process_eventMethod · 0.80

Calls 1

update_cameraMethod · 0.45

Tested by

no test coverage detected