Getting back up to date

This commit is contained in:
2020-01-18 22:30:46 -08:00
parent 88b078d1ff
commit 8a83a1f12a
5 changed files with 554 additions and 30 deletions

View File

@@ -23,8 +23,8 @@ use crate::canvas::shader::text_shader::{TextShader, GlyphInstance};
use vulkano::pipeline::vertex::{OneVertexOneInstanceDefinition, SingleBufferDefinition};
use crate::util::vertex_3d::Vertex3D;
/// VKProcessor holds the vulkan instance information, the swapchain, and the compute and canvas states
///
/// VKProcessor holds the vulkan instance information, the swapchain,
/// and the compute and canvas states
pub struct VkProcessor<'a> {
// Vulkan state fields
pub instance: Arc<Instance>,
@@ -38,10 +38,13 @@ pub struct VkProcessor<'a> {
swapchain_recreate_needed: bool,
/// State holding textures, images, and their related vertex buffers
canvas_state: CanvasState,
/// State holding
compute_state: CompuState,
capabilities: Capabilities,
canvas_state: CanvasState,
}
@@ -85,6 +88,10 @@ impl<'a> VkProcessor<'a> {
}
}
pub fn is_open(&mut self) -> bool {
self.surfcae
}
/// Using the surface, we calculate the surface capabilities and create the swapchain and swapchain images
pub fn create_swapchain(&mut self, surface: &'a Arc<Surface<Window>>) {
let (mut swapchain, images) = {
@@ -213,6 +220,7 @@ impl<'a> VkProcessor<'a> {
self.compute_state.write_compute_buffer(handle, data)
}
///
pub fn run(&mut self,
surface: &'a Arc<Surface<Window>>,
canvas_frame: CanvasFrame,