piping everything through. Almost done
This commit is contained in:
@@ -11,7 +11,7 @@ use winit::Window;
|
||||
use crate::compute::compu_state::CompuState;
|
||||
use vulkano::image::ImageUsage;
|
||||
use crate::compute::compu_frame::CompuFrame;
|
||||
use crate::canvas::canvas_state::{CanvasState, CanvasTextureHandle, CanvasImageHandle};
|
||||
use crate::canvas::canvas_state::{CanvasState, CanvasTextureHandle, CanvasImageHandle, CanvasFontHandle};
|
||||
use crate::canvas::canvas_frame::CanvasFrame;
|
||||
use crate::compute::compu_kernel::{CompuKernel, CompuKernelHandle};
|
||||
use crate::compute::compu_buffer::{CompuBuffers, CompuBufferHandle};
|
||||
@@ -163,6 +163,11 @@ impl<'a> VkProcessor<'a> {
|
||||
self.canvas_state.load_shader::<TextShader>(String::from("simple_text"), self.physical.clone(), self.capabilities.clone());
|
||||
}
|
||||
|
||||
/// A hardcoded list of shaders which can be proloaded from this function
|
||||
pub fn preload_fonts(&mut self) {
|
||||
self.canvas_state.load_font(String::from("sansation.ttf"));
|
||||
}
|
||||
|
||||
/// O(n) Lookup for the matching texture string
|
||||
pub fn get_texture_handle(&self, texture_name: String) -> Option<Arc<CanvasTextureHandle>> {
|
||||
self.canvas_state.get_texture_handle(texture_name)
|
||||
@@ -178,6 +183,10 @@ impl<'a> VkProcessor<'a> {
|
||||
self.canvas_state.get_shader_handle(shader_name)
|
||||
}
|
||||
|
||||
pub fn get_font_handle(&self, font_name: String) -> Option<Arc<CanvasFontHandle>> {
|
||||
self.canvas_state.get_font_handle(font_name)
|
||||
}
|
||||
|
||||
/// Create a new image which has the transfer usage
|
||||
pub fn new_swap_image(&mut self, dimensions: (u32, u32)) -> Arc<CanvasImageHandle> {
|
||||
let mut usage = ImageUsage::none();
|
||||
|
||||
Reference in New Issue
Block a user