diff --git a/src/vkprocessor.rs b/src/vkprocessor.rs index 46b4fef6..827c99a3 100644 --- a/src/vkprocessor.rs +++ b/src/vkprocessor.rs @@ -32,7 +32,7 @@ use vulkano::pipeline::viewport::Viewport; use image::ImageFormat; use vulkano::image::immutable::ImmutableImage; use vulkano::image::attachment::AttachmentImage; -use vulkano::image::{Dimensions, ImageUsage}; +use vulkano::image::{Dimensions, ImageUsage, ImageAccess, ImageDimensions}; use vulkano::format::Format; use vulkano::sampler::{Sampler, Filter, MipmapMode, SamplerAddressMode}; use image::flat::NormalForm::ColumnMajorPacked; @@ -57,7 +57,7 @@ fn window_size_dependent_setup( let viewport = Viewport { origin: [0.0, 0.0], - dimensions: [dimensions[0] as f32, dimensions[1] as f32], + dimensions: [dimensions.width() as f32, dimensions.height() as f32], depth_range: 0.0..1.0, }; dynamic_state.viewports = Some(vec!(viewport)); @@ -129,6 +129,11 @@ pub struct VkProcessor<'a> { pub vertex_buffer: Option>, pub dynamic_state: DynamicState, pub graphics_image_swap_buffer: Option>, + + + pub image_buffer_store : Vec>, + + } @@ -175,6 +180,8 @@ impl<'a> VkProcessor<'a> { vertex_buffer: Option::None, dynamic_state: DynamicState { line_width: None, viewports: None, scissors: None }, graphics_image_swap_buffer: None, + + image_buffer_store: vec![] } } @@ -330,7 +337,11 @@ impl<'a> VkProcessor<'a> { self.graphics_image_swap_buffer = Some(compute_transfer_image.clone().unwrap()); } + + + // The image set is the containing object for all texture and image hooks. + // todo, make this pull from the image_buffer_store fn get_image_set(&mut self) -> Box { let sampler = Sampler::new(self.device.clone(), Filter::Linear, Filter::Linear,