nitial setup

This commit is contained in:
CDaut 2023-11-17 19:35:54 +01:00
commit af215f8291
10 changed files with 214 additions and 0 deletions

26
src/main.rs Normal file
View 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
View file

@ -0,0 +1,4 @@
use easy_gltf::Scene;
pub fn render(scenes: Vec<Scene>, scene_idx: u32) {
}