Got the vertex definition into the load function. Which is something
This commit is contained in:
@@ -19,7 +19,9 @@ use std::time::Duration;
|
||||
use vulkano::pipeline::depth_stencil::{DynamicStencilValue, StencilFaceFlags};
|
||||
use crate::canvas::shader::common::CompiledGraphicsPipelineHandle;
|
||||
use crate::canvas::shader::generic_shader::GenericShader;
|
||||
use crate::canvas::shader::text_shader::TextShader;
|
||||
use crate::canvas::shader::text_shader::{TextShader, GlyphInstance};
|
||||
use vulkano::pipeline::vertex::{OneVertexOneInstanceDefinition, SingleBufferDefinition};
|
||||
use crate::util::vertex_3d::Vertex3D;
|
||||
|
||||
/// VKProcessor holds the vulkan instance information, the swapchain, and the compute and canvas states
|
||||
///
|
||||
@@ -157,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::<GenericShader>(String::from("color-passthrough"), self.physical.clone(), self.capabilities.clone());
|
||||
self.canvas_state.load_shader::<GenericShader>(String::from("simple_texture"), self.physical.clone(), self.capabilities.clone());
|
||||
self.canvas_state.load_shader::<GenericShader>(String::from("simple_image"), self.physical.clone(), self.capabilities.clone());
|
||||
self.canvas_state.load_shader::<TextShader>(String::from("simple_text"), self.physical.clone(), self.capabilities.clone());
|
||||
self.canvas_state.load_shader::<GenericShader, SingleBufferDefinition::<Vertex3D>>(String::from("color-passthrough"), self.physical.clone(), self.capabilities.clone());
|
||||
self.canvas_state.load_shader::<GenericShader, SingleBufferDefinition::<Vertex3D>>(String::from("simple_texture"), self.physical.clone(), self.capabilities.clone());
|
||||
self.canvas_state.load_shader::<GenericShader, SingleBufferDefinition::<Vertex3D>>(String::from("simple_image"), self.physical.clone(), self.capabilities.clone());
|
||||
self.canvas_state.load_shader::<TextShader, OneVertexOneInstanceDefinition::<Vertex3D, GlyphInstance>>(String::from("simple_text"), self.physical.clone(), self.capabilities.clone());
|
||||
}
|
||||
|
||||
/// A hardcoded list of shaders which can be proloaded from this function
|
||||
|
||||
Reference in New Issue
Block a user