wip: week of changes
This commit is contained in:
parent
03e8f34dba
commit
176ea52ab0
20 changed files with 171 additions and 47 deletions
6
raidillon_assets/Cargo.toml
Normal file
6
raidillon_assets/Cargo.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "raidillon_assets"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
3
raidillon_assets/src/lib.rs
Normal file
3
raidillon_assets/src/lib.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
pub mod model_manager;
|
||||
|
||||
pub use crate::model_manager::{ModelManager, ModelManagerRef};
|
||||
14
raidillon_assets/src/model_manager.rs
Normal file
14
raidillon_assets/src/model_manager.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use std::cell::RefCell;
|
||||
use std::path::Path;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub type ModelManagerRef = Rc<RefCell<Box<dyn ModelManager>>>;
|
||||
|
||||
|
||||
/// The asset manager trait of Raidillon.
|
||||
pub trait ModelManager {
|
||||
/// Loads a gltf model to VRAM.
|
||||
fn load_gltf(&mut self, path: &Path);
|
||||
/// Unloads the loaded model from VRAM.
|
||||
fn unload_model(&mut self, path: &Path);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue