back in the saddle, upgrading dependencies

This commit is contained in:
2020-07-26 00:47:24 -07:00
parent 626eac4e86
commit ea52a20fce
10 changed files with 317 additions and 212 deletions

View File

@@ -15,7 +15,6 @@ use std::path::PathBuf;
use image::GenericImageView;
use std::iter::FromIterator;
use vulkano::swapchain::Capabilities;
use winit::Window;
use vulkano::pipeline::viewport::Viewport;
use vulkano::descriptor::descriptor::DescriptorDescTy::TexelBuffer;
use crate::canvas::canvas_frame::CanvasFrame;
@@ -35,6 +34,7 @@ use crate::canvas::managed::shader::generic_shader::GenericShader;
use crate::VertexTypes;
use crate::util::vertex::{TextVertex3D, TextureVertex3D, ImageVertex3D, ColorVertex3D, CanvasFrameAllocation};
use shade_runner::Input;
use winit::window::Window;
/// Canvas state is used for storage of texture and image buffers in addition to vertex buffers
@@ -380,7 +380,7 @@ impl CanvasState {
fn get_solid_color_descriptor_set(&self, kernel: Arc<GenericShader>) -> Box<dyn DescriptorSet + Send + Sync> {
let o: Box<dyn DescriptorSet + Send + Sync> = Box::new(
PersistentDescriptorSet::start(
kernel.clone().get_pipeline().clone(), 0,
kernel.clone().get_pipeline().clone().descriptor_set_layout(0).unwrap().clone(),
).build().unwrap());
o
}
@@ -458,10 +458,10 @@ impl CanvasState {
/// Pushes the draw commands to the command buffer. Requires the framebuffers and
/// image number to be passed in as they are taken care of by the vkprocessor
pub fn draw_commands(&mut self,
mut command_buffer: AutoCommandBufferBuilder,
mut command_buffer: &mut AutoCommandBufferBuilder,
framebuffers: Vec<Arc<dyn FramebufferAbstract + Send + Sync>>,
image_num: usize,
allocated_buffers: CanvasFrameAllocation) -> AutoCommandBufferBuilder {
allocated_buffers: CanvasFrameAllocation) {
// Specify the color to clear the framebuffer with i.e. blue
let clear_values = vec!(
@@ -478,7 +478,7 @@ impl CanvasState {
reference: None,
};
let mut command_buffer = command_buffer.begin_render_pass(
command_buffer = command_buffer.begin_render_pass(
framebuffers[image_num].clone(), false, clear_values.clone(),
).unwrap();
@@ -547,10 +547,10 @@ impl CanvasState {
// Text
let mut shader = self.shader_buffers.get(
self.get_shader_handle(String::from("simple_text"))
.unwrap().clone().get_handle() as usize
).unwrap();
// let mut shader = self.shader_buffers.get(
// self.get_shader_handle(String::from("simple_text"))
// .unwrap().clone().get_handle() as usize
// ).unwrap();
//
// self.dynamic_state = DynamicState {
// line_width: None,
@@ -597,18 +597,18 @@ impl CanvasState {
// }),
// };
if !allocated_buffers.text_vertex_buffer.is_empty() {
command_buffer = command_buffer.draw(
shader.get_pipeline().clone(),
&self.dynamic_state.clone(),
allocated_buffers.text_vertex_buffer.clone(),
(), (),
).unwrap();
}
// if !allocated_buffers.text_vertex_buffer.is_empty() {
// command_buffer = command_buffer.draw(
// shader.get_pipeline().clone(),
// &self.dynamic_state.clone(),
// allocated_buffers.text_vertex_buffer.clone(),
// (), (),
// ).unwrap();
// }
command_buffer
.end_render_pass()
.unwrap()
.unwrap();
}
}