Finally appeased the compiler. Need to do some real cleaning up on the relationship between canvas and vk processor

master
mitchellhansen 5 years ago
parent f06adc9a55
commit 8cd5e3e562

@ -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()
} }
} }

@ -412,7 +412,7 @@ impl<'a> VkProcessor<'a> {
I can't replace canvas. I can't replace canvas.
*/ */
self.canvas.draw_commands(&mut command_buffer, framebuffers, image_num); let mut command_buffer = self.canvas.draw_commands(command_buffer, framebuffers, image_num);
//self.canvas = mem::replace(&mut self.canvas, //self.canvas = mem::replace(&mut self.canvas,

Loading…
Cancel
Save