diff options
author | Julian T <julian@jtle.dk> | 2021-02-12 23:33:50 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-02-12 23:34:09 +0100 |
commit | 14f7b47f2c2315d0de5e52d31c57fe07a15d08ad (patch) | |
tree | f512e7e0939fd151cf9196004611e3cd82a95773 /src/world/mod.rs | |
parent | 49c6adb0db70ffc30eaac33b66eacf7574b34e26 (diff) |
Implement multithreaded compiling of tiles
Diffstat (limited to 'src/world/mod.rs')
-rw-r--r-- | src/world/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/world/mod.rs b/src/world/mod.rs index ef239db..f0ba8d2 100644 --- a/src/world/mod.rs +++ b/src/world/mod.rs @@ -4,17 +4,17 @@ pub mod shapes; mod scene; pub use scene::*; -use std::rc::Rc; +use std::sync::Arc; use crate::core::Hittable; use crate::material::Material; pub struct Object { - pub shape: Box<dyn Hittable>, - pub mat: Rc<dyn Material>, + pub shape: Box<dyn Hittable + Sync>, + pub mat: Arc<dyn Material + Sync + Send>, } impl Object { - pub fn new(mat: Rc<dyn Material>, shape: Box<dyn Hittable>) -> Self { + pub fn new(mat: Arc<dyn Material + Sync + Send>, shape: Box<dyn Hittable + Sync>) -> Self { Object { mat, shape, |