|
|
|
@ -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<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.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(),
|
|
|
|
|