diff --git a/Cargo.toml b/Cargo.toml index ad48882..1bc898a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,10 +81,6 @@ name = "raymarch" path = "src/bin/raymarch.rs" required-features = ["build_raymarch"] -[[bin]] -name = "medium_test" -path = "src/bin/medium_test.rs" - [[bin]] name = "color_test" path = "src/bin/color_test.rs" diff --git a/src/bin/medium_test.rs b/src/bin/medium_test.rs deleted file mode 100644 index 9310c1f..0000000 --- a/src/bin/medium_test.rs +++ /dev/null @@ -1,13 +0,0 @@ -extern crate rust_pathtracer as root; - - - - - - - -fn main() { - - - -} diff --git a/src/lib.rs b/src/lib.rs index b15bf5b..86b8a72 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,6 @@ extern crate log; #[macro_use] extern crate paste; - #[cfg(feature = "minifb")] use minifb::{Key, Window, WindowOptions}; use rayon::prelude::*; @@ -71,9 +70,7 @@ pub fn window_loop( F: FnMut(&Window, &mut Vec, usize, usize) -> (), { let mut window = Window::new("Window", width, height, options).unwrap(); - window.limit_update_rate(Some(std::time::Duration::from_micros( - (1000000 / max_framerate) as u64, - ))); + window.set_target_fps(max_framerate); let mut film = Vec2D::new(width, height, 0u32); while window.is_open() && !window.is_key_down(Key::Escape) { diff --git a/src/renderer/naive.rs b/src/renderer/naive.rs index 9222373..11efec9 100644 --- a/src/renderer/naive.rs +++ b/src/renderer/naive.rs @@ -1,5 +1,4 @@ use super::prelude::*; -use crate::prelude::*; use crate::integrator::*; diff --git a/src/renderer/prelude.rs b/src/renderer/prelude.rs index c8ef139..6aa962e 100644 --- a/src/renderer/prelude.rs +++ b/src/renderer/prelude.rs @@ -1,3 +1,4 @@ +pub use crate::prelude::*; pub use crate::parsing::config::{Config, IntegratorKind, RenderSettings}; pub use crate::profile::Profile; pub use crate::world::{EnvironmentMap, World}; diff --git a/src/renderer/preview.rs b/src/renderer/preview.rs index 285e0e5..f852bcb 100644 --- a/src/renderer/preview.rs +++ b/src/renderer/preview.rs @@ -1,5 +1,7 @@ +// only needed because the actual code that uses these imports is gated +// behind a feature flag which the compiler does not seem to detect even though +#![allow(unused_imports)] use super::prelude::*; -use crate::prelude::*; use crate::parsing::config::{Config, RenderSettings, RendererType, Resolution}; // use crate::integrator::*; diff --git a/src/renderer/tiled.rs b/src/renderer/tiled.rs index fb19b44..fe49265 100644 --- a/src/renderer/tiled.rs +++ b/src/renderer/tiled.rs @@ -1,5 +1,4 @@ use super::prelude::*; -use crate::prelude::*; use crate::integrator::*;