compiles and renders textures again

This commit is contained in:
2020-02-20 23:55:36 -08:00
parent d1051a0ca3
commit 438f96eb32
16 changed files with 110 additions and 89 deletions

View File

@@ -20,7 +20,7 @@ use crate::canvas::managed::shader::generic_shader::GenericShader;
use crate::canvas::managed::shader::text_shader::TextShader;
use crate::canvas::managed::handles::{CanvasTextureHandle, CompiledShaderHandle, CanvasFontHandle, CanvasImageHandle};
use crate::compute::managed::handles::{CompuKernelHandle, CompuBufferHandle};
use crate::util::vertex::{VertexTypes, ColorVertex2D, TextVertex3D, TextureVertex2D, ImageVertex2D};
use crate::util::vertex::{VertexTypes, ColorVertex3D, TextVertex3D, TextureVertex3D, ImageVertex3D};
/// VKProcessor holds the vulkan instance information, the swapchain,
@@ -168,10 +168,10 @@ impl<'a> VkProcessor<'a> {
/// A hardcoded list of shaders which can be preloaded from this function
pub fn preload_shaders(&mut self) {
self.canvas_state.load_shader::<GenericShader, ColorVertex2D>(String::from("color-passthrough"), self.physical.clone(), self.capabilities.clone());
self.canvas_state.load_shader::<GenericShader, TextureVertex2D>(String::from("simple_texture"), self.physical.clone(), self.capabilities.clone());
self.canvas_state.load_shader::<GenericShader, ImageVertex2D>(String::from("simple_image"), self.physical.clone(), self.capabilities.clone());
self.canvas_state.load_shader::<TextShader, TextVertex3D>(String::from("simple_text"), self.physical.clone(), self.capabilities.clone());
self.canvas_state.load_shader::<GenericShader, ColorVertex3D>(String::from("color-passthrough"), self.physical.clone(), self.capabilities.clone());
self.canvas_state.load_shader::<GenericShader, TextureVertex3D>(String::from("simple_texture"), self.physical.clone(), self.capabilities.clone());
self.canvas_state.load_shader::<GenericShader, ImageVertex3D>(String::from("simple_image"), self.physical.clone(), self.capabilities.clone());
// self.canvas_state.load_shader::<TextShader, TextVertex3D>(String::from("simple_text"), self.physical.clone(), self.capabilities.clone());
}
/// A hardcoded list of shaders which can be proloaded from this function