doing some hardcore storming on this dynamic vertex situation

This commit is contained in:
2019-10-16 23:29:49 -07:00
parent c4b20bcd79
commit ffa04d0bb1
7 changed files with 120 additions and 72 deletions

View File

@@ -319,17 +319,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, V>(&mut self,
pub fn load_shader<T: 'static>(&mut self,
filename: String,
physical: PhysicalDevice,
capabilities: Capabilities) -> Option<Arc<CompiledGraphicsPipelineHandle>>
where T: CompiledGraphicsPipeline, V: VertexDefinition {
where T: CompiledGraphicsPipeline {
let handle = Arc::new(CompiledGraphicsPipelineHandle {
handle: self.shader_buffers.len() as u32
});
let shader: Box<dyn CompiledGraphicsPipeline> = Box::new(T::new::<V>(
let shader: Box<dyn CompiledGraphicsPipeline> = Box::new(T::new(
filename.clone(),
self.device.clone(),
handle.clone(),