working on loading materials

This commit is contained in:
2021-02-18 23:48:47 -08:00
parent e3c1ce7789
commit e5815ce0d6
11 changed files with 21601 additions and 27 deletions

View File

@@ -110,7 +110,7 @@ impl RenderState {
/// Create a bare vertex & indices buffer
/// TODO I really should remove this / consolidate it
pub fn create_buffer(
fn create_buffer(
device: &wgpu::Device,
indices: Vec<u32>,
vertices: Vec<Vertex>,
@@ -271,7 +271,7 @@ impl RenderState {
// Though the attr thing is still a macro. Which would cause issues if
// I wanted to get tricky with the 0,1 types
let vertex_size = mem::size_of::<Vertex>();
let vertex_attr = wgpu::vertex_attr_array![0 => Float4, 1 => Float4];
let vertex_attr = wgpu::vertex_attr_array![0 => Float4, 1 => Float4, 2 => Float2];
let vb_desc = wgpu::VertexBufferLayout {
array_stride: vertex_size as wgpu::BufferAddress,
step_mode: wgpu::InputStepMode::Vertex,