From f1e8990dbaec4dc947fca0dc78b167f3051cf129 Mon Sep 17 00:00:00 2001 From: mitchellhansen Date: Thu, 17 Oct 2019 22:57:27 -0700 Subject: [PATCH] compiles. Need a good hard think to see what this interface is going to look like --- notes/drawable-flow | 2 +- notes/vkprocessor.drawio | 2 +- src/canvas/canvas_frame.rs | 2 +- src/canvas/shader/generic_shader.rs | 5 ++++- src/canvas/shader/text_shader.rs | 7 +++++-- src/vkprocessor.rs | 8 ++++---- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/notes/drawable-flow b/notes/drawable-flow index f217d36a..0e8d4fc1 100644 --- a/notes/drawable-flow +++ b/notes/drawable-flow @@ -1 +1 @@ -7Vtdb+I4FP01SDMPVPkiwGOBdmelzk41VDPbp5WbmMRbE0eOKTC/fq8ThxAcCt2SJoyQKjW+dkxyzr33XNvQscfz1R8cxeFX5mPasQx/1bEnHcuyDXsA/6RlnVnMQd/NLAEnvrIVhin5hZXRUNYF8XFSGigYo4LEZaPHogh7omRDnLNlediM0fKnxijAmmHqIapbfxJfhMo6tIyi4wsmQZh/tGWonjnKRytDEiKfLbdM9k3HHnPGRHY1X40xlfDlwGT33e7p3TwZx5E45oaf9uPDX9Nn+y6cXn/DS/dltoi6io0XRBfqjR/wSqgHFuschmRJ5hRF0BrNWCSmqseENqIkiODag8fAHAwvmAsCCF6rDsFisHohof4dWrOFfNhEIO85b41CxskvmBZRNSd0c6GcwXJLI6byTjAbYOU4gTH3OQLmjukrWpUG3qFEKIPHKEVxQp42rzFHPCDRiAnB5mqQggZeB6/2Ym5umIQgwGyOBV/DEHXDUHGv3N/O3Xq55UuusoVbbjRQvCDlvsFm5oJguFAcv4HvvsZ3xxrJwCBYRsa1jK91jDUHENIrJDGcPeMxowyYnkQs8whC6Y4pdwqKZ2KvSyQx8kgU3KVjJk5h+a6AkCYG985oGjch8X0cSTqZQAJl3EmiYkYikSLVG8Ef4Dk2rnqdHjz4GNpm0YY/OZyLMYvgXRBJacTgGEssneM4zvdHku4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EjFXnFI2v5X5LFx6oU88oM0xZxXUtIeiM55ynT6fMOlXJ6ujINYNtDa+AMXav1OHlZW1q9c+jDOExgN+uBuLtdUlB69DIYgKvBCOQUFhc8tWdaXravRVjDTVNH532fFUXWg0sZPOnvJALTnCcOx+vFAonEaND5b+Tx+HUxWUsFkD2Mai2IHL0bsQezhFd7cLWHjt5EOIJO6760LybbA0vvITwRlziPy3mGJH4PatkA/mKY/9WVNI3mf70GfPoP \ No newline at end of file diff --git a/notes/vkprocessor.drawio b/notes/vkprocessor.drawio index e025c387..22e9c681 100644 --- a/notes/vkprocessor.drawio +++ b/notes/vkprocessor.drawio @@ -1 +1 @@ -7V3bkps4EP2aqdp9sAskro9zycxkd1I1tZPKJo8aLNskGLlAzCVfv5JBNiDZxjZYsIkfJiAkDKe7j1rdLecCXi/e7hK0nH8iExxdAGPydgFvLgAwPc9j//CW96IFGDBvmSXhpGjbNDyFP3HRaBStWTjBaaUjJSSi4bLaGJA4xgGttKEkIa/VblMSVb91iWbFNxqbhqcARVjq9m84oXPxdOyzuXKPw9mcSpcWSPQvGtI5mpDXUhP8cAGvE0JofrR4u8YRB1BAk4+73XJ1/WwJjmmTAeBqEbow87OZ+SOdPXx/uLt5G5nFbV5QlBUvfY3iF5R+xm80S/AFcCJ296vnhB3N+JHulhWU9F2IKCFZPMH8FQ12+XUeUvy0RAG/+sq0krXN6SJiZ+Z6dBky8fo4ofit1FRAeIfJAtPknXUprlpCvoVOj0wI8obXkoZ4Rad5WTesohEVWjlb33wjNXZQCO4QIYItQvy44Ar+W4RVEdp+XYTCRMsi9M8rQrhFhLeEvedvCVYl6EoSNI2xrd0MHVmGZLEMI7yaH8MgfQyXOApjhUn+EcYUJ1OOGZ+nEo5Q0flP7XBDtwq3CYAKbUuBttMZ2O4Wg9GO1hqHnTMEUIAF20CLfFs+BJ/vHet9eftPZvx17//8MnKhBAueMFenOCUJnZMZiVH0YdN6VQVu0+eBkGUB13dM6Xvht6GMkiqY+C2kX0vH3/itmOb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+Ua7M3Qa6nDkhdhpKU7S9Uc8vbWkWeVdVDtb+/tzw7yJ2i04MPrtHjhXWSw6+st6IfeShu5RpaxX2/ljV/7uzuevad7S1reaX1cVcvdd6/mjW9VOE3NJbq1jyLn4mc6dnX3vH3d21FyqEa2tHts++bqAfdUV094ZM1nxtSl8wB85pHGaVYj+zokQRO/aKZP3Ksbv1Uq1tGSLo08dipMahrWfiplJ7IXW6ZXKNUfc707a/2xULODiWNQlzJLcrY1chZtb6xTHskxQ3nxmr+5UqWs3Ej9nTPpRi2XO7sqZb4b7eyLLgkSF+6gOfYdY/sRs9qxqmWa1tj3Szcyq1/DFsZe6ap1Vr3zmtC7XTURTFNOWuBvFdmtKjIwj1bk0zlRUN1BToR1N2WcR49NxYuxTyTFTUZgE0M0zsuKnprqeyfa2RddAlWygr6Wyo5WLGXlPfZd4G8+tnNeNRtg+VlVlXtf7evVrj/r1/ZPT82Xiw1o26Wsoj2dL8DklaxwLw+tYy3raBzZ6fZ3/3OL3P4PCvDDfw== \ No newline at end of file diff --git a/src/canvas/canvas_frame.rs b/src/canvas/canvas_frame.rs index c552c3f9..0a6f1edc 100644 --- a/src/canvas/canvas_frame.rs +++ b/src/canvas/canvas_frame.rs @@ -56,7 +56,7 @@ Type: Text Color frame.draw(text) { - + text.type == TEXT { // When it matches to default text shader text_shader.get_definition() text_shader.get_pipeline() diff --git a/src/canvas/shader/generic_shader.rs b/src/canvas/shader/generic_shader.rs index 5f3fd32c..24327050 100644 --- a/src/canvas/shader/generic_shader.rs +++ b/src/canvas/shader/generic_shader.rs @@ -18,6 +18,7 @@ use shade_runner as sr; use crate::canvas::shader::common::CompiledGraphicsPipelineResources; use vulkano::memory::pool::PotentialDedicatedAllocation::Generic; use vulkano::SafeDeref; +use crate::canvas::shader::dynamic_vertex::RuntimeVertexDef; /// CanvasShader holds the pipeline and render pass for the input shader source #[derive(Clone)] @@ -75,12 +76,14 @@ impl CompiledGraphicsPipeline for GenericShader { )).unwrap() }; + let vertex_definition = RuntimeVertexDef::from_primitive(0); + GenericShader { graphics_pipeline: Some(Arc::new(GraphicsPipeline::start() //SingleBufferDefinition:: - .vertex_input(T::new()) + .vertex_input(vertex_definition) .vertex_shader(vertex_entry_point.clone(), ShaderSpecializationConstants { first_constant: 0, diff --git a/src/canvas/shader/text_shader.rs b/src/canvas/shader/text_shader.rs index b0bcc20f..b918c876 100644 --- a/src/canvas/shader/text_shader.rs +++ b/src/canvas/shader/text_shader.rs @@ -15,6 +15,7 @@ use vulkano::pipeline::vertex::{SingleBufferDefinition, OneVertexOneInstanceDefi use crate::util::vertex_3d::Vertex3D; use crate::canvas::shader::generic_shader::GenericShader; use shade_runner as sr; +use crate::canvas::shader::dynamic_vertex::RuntimeVertexDef; #[derive(Default, Debug, Clone, Copy)] pub struct GlyphInstance { @@ -45,7 +46,7 @@ impl CompiledGraphicsPipelineResources for TextShader {} impl CompiledGraphicsPipeline for TextShader { /// This will explode when the shader does not want to compile - fn new(filename: String, + fn new(filename: String, device: Arc, handle: Arc, render_pass: Arc) -> TextShader { @@ -104,11 +105,13 @@ impl CompiledGraphicsPipeline for TextShader { }, }; + let vertex_definition = RuntimeVertexDef::from_primitive(0); + TextShader { graphics_pipeline: Some(Arc::new(GraphicsPipeline::start() //OneVertexOneInstanceDefinition:: - .vertex_input(T::new()) + .vertex_input(vertex_definition) .vertex_shader(vertex_entry_point.clone(), ShaderSpecializationConstants { first_constant: 0, diff --git a/src/vkprocessor.rs b/src/vkprocessor.rs index 9002d8b4..220db96b 100644 --- a/src/vkprocessor.rs +++ b/src/vkprocessor.rs @@ -159,10 +159,10 @@ impl<'a> VkProcessor<'a> { /// A hardcoded list of shaders which can be proloaded from this function pub fn preload_shaders(&mut self) { - self.canvas_state.load_shader::>(String::from("color-passthrough"), self.physical.clone(), self.capabilities.clone()); - self.canvas_state.load_shader::>(String::from("simple_texture"), self.physical.clone(), self.capabilities.clone()); - self.canvas_state.load_shader::>(String::from("simple_image"), self.physical.clone(), self.capabilities.clone()); - self.canvas_state.load_shader::>(String::from("simple_text"), self.physical.clone(), self.capabilities.clone()); + self.canvas_state.load_shader::(String::from("color-passthrough"), self.physical.clone(), self.capabilities.clone()); + self.canvas_state.load_shader::(String::from("simple_texture"), self.physical.clone(), self.capabilities.clone()); + self.canvas_state.load_shader::(String::from("simple_image"), self.physical.clone(), self.capabilities.clone()); + self.canvas_state.load_shader::(String::from("simple_text"), self.physical.clone(), self.capabilities.clone()); } /// A hardcoded list of shaders which can be proloaded from this function