rtiow: add dragon scene, tune stltest to compare with cuboid.
Refactor enum Model to use strum.
This commit is contained in:
@@ -11,3 +11,4 @@ log = "0.4.17"
|
||||
renderer = { path = "../renderer" }
|
||||
stderrlog = "0.4.3"
|
||||
structopt = "0.2.18"
|
||||
strum = "0.24.1"
|
||||
|
||||
@@ -6,7 +6,8 @@ use cpuprofiler::PROFILER;
|
||||
use log::info;
|
||||
use structopt::StructOpt;
|
||||
|
||||
use renderer::renderer::{render, Opt};
|
||||
use renderer::renderer::{render, Model, Opt};
|
||||
use strum::VariantNames;
|
||||
|
||||
#[cfg(not(feature = "profile"))]
|
||||
struct MockTimer;
|
||||
@@ -41,8 +42,12 @@ fn main() -> Result<(), std::io::Error> {
|
||||
.init()
|
||||
.unwrap();
|
||||
let opt = Opt::from_args();
|
||||
if opt.model.is_none() {
|
||||
eprintln!("--model should be one of {:?}", Model::VARIANTS);
|
||||
return Ok(());
|
||||
}
|
||||
info!("{:?}", opt);
|
||||
let scene = opt.model.scene(&opt);
|
||||
let scene = opt.model.as_ref().unwrap().scene(&opt);
|
||||
fs::create_dir_all(&opt.output)?;
|
||||
if opt.pprof.is_some() && !cfg!(feature = "profile") {
|
||||
panic!("profiling disabled at compile time, but -pprof specified");
|
||||
|
||||
Reference in New Issue
Block a user