2d-rendering
mitchellhansen 3 years ago
parent 4955909aa8
commit b37fd66164

@ -24,7 +24,6 @@ use crate::physics::state::PhysicsState;
use crate::render::state::RenderState; use crate::render::state::RenderState;
use crate::render::system::{ImguiGenericOutputLine, ImguiPerformanceProfilerLine}; use crate::render::system::{ImguiGenericOutputLine, ImguiPerformanceProfilerLine};
use crate::runtime::state::RuntimeState; use crate::runtime::state::RuntimeState;
use crate::geometry::create_quad_mesh;
use crate::geometry::RawMesh; use crate::geometry::RawMesh;
pub fn quad_color(color: [f32; 4]) -> [[f32; 4]; 4] { pub fn quad_color(color: [f32; 4]) -> [[f32; 4]; 4] {
@ -130,7 +129,7 @@ pub fn runtime_spawn(
match entity.type_name.as_ref() { match entity.type_name.as_ref() {
"Sprite" => { "Sprite" => {
let raw_mesh = create_quad_mesh();
let mesh_name = entity.mesh.clone().unwrap(); let mesh_name = entity.mesh.clone().unwrap();
let raw_mesh = match runtime_state.get_mesh(mesh_name.as_str()) { let raw_mesh = match runtime_state.get_mesh(mesh_name.as_str()) {
@ -199,6 +198,10 @@ pub fn runtime_spawn(
let collider = ColliderBuilder::capsule_y(2.0, 1.0).build(); let collider = ColliderBuilder::capsule_y(2.0, 1.0).build();
//let mut vec = Vec::new();
//vec.push()
let gpu_mesh_buffer = renderer let gpu_mesh_buffer = renderer
.upload_mesh_to_buffer( .upload_mesh_to_buffer(
raw_mesh, raw_mesh,

Loading…
Cancel
Save