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

Method new

examples/cuda/cpu/path_tracer/src/renderer.rs:26–39  ·  view source on GitHub ↗
(dimensions: Vec2<usize>, camera: &Camera, scene: &Scene)

Source from the content-addressed store, hash-verified

24
25impl Renderer {
26 pub fn new(dimensions: Vec2<usize>, camera: &Camera, scene: &Scene) -> Self {
27 Self {
28 cuda: CudaRenderer::new(dimensions, camera, scene)
29 .expect("Failed to make CUDA renderer"),
30 cpu: CpuRenderer::new(dimensions, camera, scene),
31 running_on_gpu: true,
32 denoise: false,
33 accumulated_samples: 0,
34 camera: *camera,
35 controller: CameraController::new(dimensions),
36 system: System::new_all(),
37 use_optix: false,
38 }
39 }
40
41 pub fn resize(&mut self, new: Vec2<usize>) {
42 self.accumulated_samples = 0;

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
expectMethod · 0.45

Tested by

no test coverage detected