nitial setup
This commit is contained in:
commit
af215f8291
10 changed files with 214 additions and 0 deletions
26
src/main.rs
Normal file
26
src/main.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
mod renderer;
|
||||
|
||||
use std::string::String;
|
||||
use clap::{Parser};
|
||||
use crate::renderer::render;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
struct Args {
|
||||
gltf_file_path: String,
|
||||
//which scene to use in the gltf file
|
||||
scene_index: u32,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
//parse clargs
|
||||
let args = Args::parse();
|
||||
|
||||
//load gltf scene
|
||||
let scenes = easy_gltf::load(
|
||||
&args.gltf_file_path)
|
||||
.expect(&*format!("Failed to load glTF file {}", &args.gltf_file_path));
|
||||
|
||||
render(scenes, args.scene_index)
|
||||
}
|
||||
|
||||
4
src/renderer.rs
Normal file
4
src/renderer.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
use easy_gltf::Scene;
|
||||
|
||||
pub fn render(scenes: Vec<Scene>, scene_idx: u32) {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue