compiles, doesn't run. Not sure where I left this...
This commit is contained in:
@@ -16,7 +16,7 @@ use crate::camera::{Camera, CameraController};
|
||||
use crate::components::{Collider, LoopState, Mesh, Physics, Position};
|
||||
use crate::geometry::{load_obj, RawMesh};
|
||||
use std::io::Read;
|
||||
|
||||
use imgui_wgpu::Texture;
|
||||
|
||||
|
||||
#[derive(Deserialize, Clone)]
|
||||
@@ -71,8 +71,28 @@ pub struct TomlEntityContainer {
|
||||
pub struct RuntimeState {
|
||||
config_db: TomlEntityContainer,
|
||||
mesh_cache: HashMap<String, RawMesh>,
|
||||
texture_cache: HashMap<String, RawMesh>,
|
||||
}
|
||||
|
||||
pub struct Model {
|
||||
pub meshes: Vec<RawMesh>,
|
||||
pub materials: Vec<Material>,
|
||||
}
|
||||
|
||||
pub struct Material {
|
||||
pub name: String,
|
||||
pub diffuse_texture: Texture,
|
||||
}
|
||||
|
||||
// pub struct Mesh {
|
||||
// pub name: String,
|
||||
// pub vertex_buffer: wgpu::Buffer,
|
||||
// pub index_buffer: wgpu::Buffer,
|
||||
// pub num_elements: u32,
|
||||
// pub material: usize,
|
||||
// }
|
||||
|
||||
|
||||
impl RuntimeState {
|
||||
pub fn new() -> RuntimeState {
|
||||
// TODO: Hook this file to the gui
|
||||
@@ -86,6 +106,7 @@ impl RuntimeState {
|
||||
RuntimeState {
|
||||
config_db: settings,
|
||||
mesh_cache: Default::default(),
|
||||
texture_cache: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +133,6 @@ impl RuntimeState {
|
||||
}
|
||||
}
|
||||
|
||||
panic!("nah");
|
||||
//panic!("nah");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user