diff --git a/src/canvas/canvas_state.rs b/src/canvas/canvas_state.rs index 8da318e8..25d22e82 100644 --- a/src/canvas/canvas_state.rs +++ b/src/canvas/canvas_state.rs @@ -443,11 +443,13 @@ impl CanvasState { { let g = hprof::enter("Textured Vertex Buffer"); for (k, v) in textured_drawables.drain() { - let vertex_buffer = v.clone().iter() - .fold(Vec::new(), |mut a: Vec, b| { - a.extend(b); - a - }); + let vertex_buffer = v.clone().get(0).unwrap().clone(); + // TODO +// v.clone().iter() +// .fold(Vec::new(), |mut a: Vec, b| { +// a.extend(b); +// a +// }); self.textured_vertex_buffer.insert( k.clone(), @@ -464,11 +466,13 @@ impl CanvasState { { let g = hprof::enter("Image Vertex Buffer"); for (k, v) in image_drawables.drain() { - let vertex_buffer = v.clone().iter() - .fold(Vec::new(), |mut a: Vec<&RuntimeVertexDef>, b| { - a.extend(b); - a - }); + let vertex_buffer = v.clone().get(0).unwrap().clone(); + // TODO +// v.clone().iter() +// .fold(Vec::new(), |mut a: Vec<&RuntimeVertexDef>, b| { +// a.extend(b); +// a +// }); self.image_vertex_buffer.insert( k.clone(), diff --git a/src/canvas/shader/dynamic_vertex.rs b/src/canvas/shader/dynamic_vertex.rs index 07b360be..ea67bfdc 100644 --- a/src/canvas/shader/dynamic_vertex.rs +++ b/src/canvas/shader/dynamic_vertex.rs @@ -131,6 +131,11 @@ unsafe impl VertexDefinition for RuntimeVertexDef AttributeInfo { offset: 0, format: binding.format })); } +// let buffers = vec![ +// (0, mem::size_of::(), InputRate::Vertex), +// (1, mem::size_of::(), InputRate::Instance), +// ].into_iter(); + Ok((buffers_iter, attribs_iter.into_iter())) } }