|
|
@ -279,11 +279,11 @@ impl Canvas {
|
|
|
|
).unwrap().0
|
|
|
|
).unwrap().0
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
for (k, v) in self.textured_drawables.iter() {
|
|
|
|
for (k, v) in self.textured_drawables.drain() {
|
|
|
|
self.textured_vertex_buffer.insert(
|
|
|
|
self.textured_vertex_buffer.insert(
|
|
|
|
k.clone(),
|
|
|
|
k.clone(),
|
|
|
|
ImmutableBuffer::from_iter(
|
|
|
|
ImmutableBuffer::from_iter(
|
|
|
|
self.textured_drawables.get(k).iter().cloned(),
|
|
|
|
v.iter().cloned(),
|
|
|
|
BufferUsage::vertex_buffer(),
|
|
|
|
BufferUsage::vertex_buffer(),
|
|
|
|
self.queue.clone(),
|
|
|
|
self.queue.clone(),
|
|
|
|
).unwrap().0
|
|
|
|
).unwrap().0
|
|
|
@ -357,9 +357,9 @@ impl Canvas {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub fn draw_commands(&self,
|
|
|
|
pub fn draw_commands(&self,
|
|
|
|
command_buffer: &mut AutoCommandBufferBuilder,
|
|
|
|
mut command_buffer: AutoCommandBufferBuilder,
|
|
|
|
framebuffers: Vec<Arc<dyn FramebufferAbstract + Send + Sync>>,
|
|
|
|
framebuffers: Vec<Arc<dyn FramebufferAbstract + Send + Sync>>,
|
|
|
|
image_num: usize) {
|
|
|
|
image_num: usize) -> AutoCommandBufferBuilder {
|
|
|
|
|
|
|
|
|
|
|
|
// Specify the color to clear the framebuffer with i.e. blue
|
|
|
|
// Specify the color to clear the framebuffer with i.e. blue
|
|
|
|
let clear_values = vec!(ClearValue::Float([0.0, 0.0, 1.0, 1.0]));
|
|
|
|
let clear_values = vec!(ClearValue::Float([0.0, 0.0, 1.0, 1.0]));
|
|
|
@ -391,9 +391,9 @@ impl Canvas {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
command_buffer = command_buffer
|
|
|
|
command_buffer
|
|
|
|
.end_render_pass()
|
|
|
|
.end_render_pass()
|
|
|
|
.unwrap();
|
|
|
|
.unwrap()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|