From aec35091073e8c7d14a3f6a82f7c33dfd7c69861 Mon Sep 17 00:00:00 2001 From: Chris Bras Date: Wed, 2 Jun 2021 16:29:13 +0200 Subject: [PATCH] Eminem - Crab God.mp3 --- src/state/world_state.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/state/world_state.rs b/src/state/world_state.rs index a15c433..28ca955 100644 --- a/src/state/world_state.rs +++ b/src/state/world_state.rs @@ -448,11 +448,11 @@ impl WorldState { } { - let vertex_buffer = self.world.npc.vertex_buffer.unwrap(); - let index_buffer = self.world.npc.index_buffer.unwrap(); + let vertex_buffer = self.world.npc.vertex_buffer.as_ref(); + let index_buffer = self.world.npc.index_buffer.as_ref(); - render_pass.set_vertex_buffer(0, vertex_buffer.slice(..)); - render_pass.set_index_buffer(index_buffer.slice(..), wgpu::IndexFormat::Uint32); + render_pass.set_vertex_buffer(0, vertex_buffer.unwrap().slice(..)); + render_pass.set_index_buffer(index_buffer.unwrap().slice(..), wgpu::IndexFormat::Uint32); render_pass.draw_indexed(0..self.world.npc.indices.len() as u32 , 0, 0..1); }