1
0

fixed a bug because of which bvhnode scenes were not being rendered

This commit is contained in:
Ishan Jain 2023-05-31 11:14:58 +05:30
parent be11f1c8fe
commit 922d0f1656
Signed by: ishan
GPG Key ID: 0506DB2A1CC75C27

View File

@ -159,6 +159,7 @@ pub trait Demo: Send + Sync {
temp_offset += nx * 4; temp_offset += nx * 4;
} }
println!("Rendered {}", chunk); println!("Rendered {}", chunk);
}); });
}); });
@ -227,7 +228,7 @@ impl DemoWrapper {
pub fn render(&self, buf: &mut Vec<u8>, x: usize, y: usize, samples: u16) { pub fn render(&self, buf: &mut Vec<u8>, x: usize, y: usize, samples: u16) {
match self { match self {
DemoWrapper::HitableList(v) => v.render(buf, x, y, samples), 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),
} }
} }
} }