fix variable name

This commit is contained in:
Carter Anderson 2019-12-03 22:12:33 -08:00
parent 25b7dad1c2
commit 072346bb94

View file

@ -147,17 +147,17 @@ impl Application {
let temp_buf_data = self.device let temp_buf_data = self.device
.create_buffer_mapped(entities_count * size, wgpu::BufferUsage::COPY_SRC); .create_buffer_mapped(entities_count * size, wgpu::BufferUsage::COPY_SRC);
for ((entity, transform), slot) in entities.iter(&mut self.world) for ((material, transform), slot) in entities.iter(&mut self.world)
.zip(temp_buf_data.data.chunks_exact_mut(size)) .zip(temp_buf_data.data.chunks_exact_mut(size))
{ {
slot.copy_from_slice( slot.copy_from_slice(
MaterialUniforms { MaterialUniforms {
model: transform.0.into(), model: transform.0.into(),
color: [ color: [
entity.color.x as f32, material.color.x as f32,
entity.color.y as f32, material.color.y as f32,
entity.color.z as f32, material.color.z as f32,
entity.color.w as f32, material.color.w as f32,
], ],
} }
.as_bytes(), .as_bytes(),