Getting back up to date
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user