Resize the image-specific buffers for a new image size.
(&mut self, new: Vec2<usize>)
| 83 | |
| 84 | /// Resize the image-specific buffers for a new image size. |
| 85 | pub fn resize(&mut self, new: Vec2<usize>) -> CudaResult<()> { |
| 86 | self.viewport.bounds = new; |
| 87 | self.accumulated_buffer = Self::image_buffer(new)?; |
| 88 | self.out_buffer = Self::image_buffer(new)?; |
| 89 | self.denoised_buffer = Self::image_buffer(new)?; |
| 90 | self.scaled_buffer = Self::image_buffer(new)?; |
| 91 | self.rand_states = DefaultRand::initialize_states(SEED, new.product()) |
| 92 | .as_slice() |
| 93 | .as_unified_buf()?; |
| 94 | Ok(()) |
| 95 | } |
| 96 | |
| 97 | /// Swaps out a material at a specific index. |
| 98 | pub fn update_material(&mut self, idx: usize, new: MaterialKind) { |
nothing calls this directly
no test coverage detected