From 922d0f1656b8e74bd4bad0d1b6459762ac457fe3 Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Wed, 31 May 2023 11:14:58 +0530 Subject: [PATCH] fixed a bug because of which bvhnode scenes were not being rendered --- src/demos/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/demos/mod.rs b/src/demos/mod.rs index f17ffe1..374ff75 100644 --- a/src/demos/mod.rs +++ b/src/demos/mod.rs @@ -159,6 +159,7 @@ pub trait Demo: Send + Sync { temp_offset += nx * 4; } + println!("Rendered {}", chunk); }); }); @@ -227,7 +228,7 @@ impl DemoWrapper { pub fn render(&self, buf: &mut Vec, x: usize, y: usize, samples: u16) { match self { DemoWrapper::HitableList(v) => v.render(buf, x, y, samples), - DemoWrapper::BVHNode(v) => v.save_as_ppm(buf, x, y, samples), + DemoWrapper::BVHNode(v) => v.render(buf, x, y, samples), } } }