hitting this damn shader module again. Very unergonomic interface with the fact that the entry point doesn't just own the shadermodule

This commit is contained in:
2019-09-24 22:39:24 -07:00
parent 3db8eaf006
commit 5a888a4163
5 changed files with 145 additions and 89 deletions

View File

@@ -11,12 +11,12 @@ use winit::Window;
use crate::compute::compu_state::CompuState;
use vulkano::image::ImageUsage;
use crate::compute::compu_frame::CompuFrame;
use crate::canvas::canvas_state::{CanvasState, CanvasTextureHandle, CanvasImageHandle, ShaderType};
use crate::canvas::canvas_state::{CanvasState, CanvasTextureHandle, CanvasImageHandle};
use crate::canvas::canvas_frame::CanvasFrame;
use crate::compute::compu_kernel::{CompuKernel, CompuKernelHandle};
use crate::compute::compu_buffer::{CompuBuffers, CompuBufferHandle};
use std::time::Duration;
use crate::canvas::canvas_shader::{CanvasShaderHandle, CompiledGraphicsPipeline, CompiledGraphicsPipelineHandle};
use crate::canvas::canvas_shader::{CanvasShaderHandle, CompiledGraphicsPipeline, CompiledGraphicsPipelineHandle, ShaderType};
use vulkano::pipeline::depth_stencil::{DynamicStencilValue, StencilFaceFlags};
/// VKProcessor holds the vulkan instance information, the swapchain, and the compute and canvas states
@@ -155,9 +155,9 @@ impl<'a> VkProcessor<'a> {
/// A hardcoded list of shaders which can be proloaded from this function
pub fn preload_shaders(&mut self) {
self.canvas.load_shader(String::from("color-passthrough"), ShaderType::SOLID, self.physical.clone(), self.capabilities.clone());
self.canvas.load_shader(String::from("simple_texture"), ShaderType::TEXTURED, self.physical.clone(), self.capabilities.clone());
self.canvas.load_shader(String::from("simple_image"), ShaderType::IMAGE, self.physical.clone(), self.capabilities.clone());
self.canvas.load_shader(String::from("color-passthrough"), self.physical.clone(), self.capabilities.clone());
self.canvas.load_shader(String::from("simple_texture"), self.physical.clone(), self.capabilities.clone());
self.canvas.load_shader(String::from("simple_image"), self.physical.clone(), self.capabilities.clone());
}
/// O(n) Lookup for the matching texture string