easiest solution there was just to remove the unclonable objects from ShaderKernels
This commit is contained in:
@@ -105,7 +105,7 @@ unsafe impl SpecializationConstants for SimpleSpecializationConstants {
|
||||
|
||||
|
||||
pub struct VkProcessor<'a> {
|
||||
pub shader_kernels: Option<Arc<ShaderKernels<'a>>>,
|
||||
pub shader_kernels: Option<ShaderKernels>,
|
||||
pub compute_kernel: Option<ComputeKernel>,
|
||||
pub vertex_shader_path: PathBuf,
|
||||
pub fragment_shader_path: PathBuf,
|
||||
@@ -185,17 +185,17 @@ impl<'a> VkProcessor<'a> {
|
||||
}
|
||||
|
||||
pub fn compile_shaders(&mut self, filename: String, surface: &'a Arc<Surface<Window>>) {
|
||||
self.shader_kernels = Some(Arc::new(
|
||||
self.shader_kernels = Some(
|
||||
ShaderKernels::new(filename.clone(),
|
||||
surface, self.queue.clone(),
|
||||
self.physical,
|
||||
self.device.clone())
|
||||
));
|
||||
);
|
||||
}
|
||||
|
||||
// On resizes we have to recreate the swapchain
|
||||
pub fn recreate_swapchain(&mut self, surface: &'a Arc<Surface<Window>>) {
|
||||
//self.shader_kernels.unwrap().recreate_swapchain(surface);
|
||||
self.shader_kernels = Some(self.shader_kernels.take().unwrap().recreate_swapchain(surface));
|
||||
}
|
||||
|
||||
pub fn load_buffers(&mut self, image_filename: String)
|
||||
|
||||
Reference in New Issue
Block a user