(&mut self, new: Vec2<usize>)
| 39 | } |
| 40 | |
| 41 | pub fn resize(&mut self, new: Vec2<usize>) { |
| 42 | self.accumulated_samples = 0; |
| 43 | self.cpu.resize(new); |
| 44 | self.cuda |
| 45 | .resize(new) |
| 46 | .expect("Failed to resize CUDA renderer"); |
| 47 | } |
| 48 | |
| 49 | /// Renders the scene and returns a final image buffer that can be displayed. |
| 50 | pub fn render(&mut self, ui: &Ui) -> &[u8] { |