Got the vertex definition into the load function. Which is something

This commit is contained in:
2019-10-15 00:08:43 -07:00
parent 595937d68f
commit 554e8d551e
9 changed files with 50 additions and 21 deletions

View File

@@ -318,16 +318,17 @@ impl CanvasState {
/// Load and Compile a shader with the filename at resources/shaders
/// Takes physical and capabilities as we don't store that in Canvas
pub fn load_shader<T: 'static>(&mut self,
pub fn load_shader<T: 'static, V>(&mut self,
filename: String,
physical: PhysicalDevice,
capabilities: Capabilities) -> Option<Arc<CompiledGraphicsPipelineHandle>>
where T: CompiledGraphicsPipeline {
let handle = Arc::new(CompiledGraphicsPipelineHandle {
handle: self.shader_buffers.len() as u32
});
let shader: Box<dyn CompiledGraphicsPipeline> = Box::new(T::new(
let shader: Box<dyn CompiledGraphicsPipeline> = Box::new(T::new::<V>(
filename.clone(),
self.device.clone(),
handle.clone(),