Struct let_engine::Resources
source · pub struct Resources {
pub vulkan: Vulkan,
pub loader: Arc<Mutex<Loader>>,
pub labelifier: Arc<Mutex<Labelifier>>,
}
Fields§
§vulkan: Vulkan
§loader: Arc<Mutex<Loader>>
§labelifier: Arc<Mutex<Labelifier>>
Implementations§
source§impl Resources
impl Resources
pub fn new( vulkan: Vulkan, loader: Arc<Mutex<Loader>>, labelifier: Arc<Mutex<Labelifier>> ) -> Self
pub fn update(&self)
pub fn load_font(&self, font: &[u8]) -> Arc<GameFont>
pub fn load_texture_from_raw( &self, texture: Vec<u8>, format: Format, dimensions: (u32, u32), layers: u32, settings: TextureSettings ) -> Arc<Texture>
pub fn load_texture( &self, texture: &[u8], format: ImageFormat, layers: u32, settings: TextureSettings ) -> Result<Arc<Texture>, InvalidFormatError>
sourcepub unsafe fn new_shader_from_raw(
&self,
vertex_bytes: &[u8],
fragment_bytes: &[u8]
) -> Shaders
pub unsafe fn new_shader_from_raw( &self, vertex_bytes: &[u8], fragment_bytes: &[u8] ) -> Shaders
Safety
Any wrong shaders bytes can mess up the program in a way I didn’t text before.
pub fn new_descriptor_write<T: BufferContents>( &self, buf: T, set: u32 ) -> WriteDescriptorSet
pub fn new_material( &self, settings: MaterialSettings, descriptor_bindings: Vec<WriteDescriptorSet> ) -> Material
sourcepub fn new_material_from_texture(
&self,
texture: &[u8],
format: ImageFormat,
layers: u32,
settings: TextureSettings
) -> Result<Material, InvalidFormatError>
pub fn new_material_from_texture( &self, texture: &[u8], format: ImageFormat, layers: u32, settings: TextureSettings ) -> Result<Material, InvalidFormatError>
Simplification of making a texture and putting it into a material.
sourcepub fn new_material_from_raw_texture(
&self,
texture: Vec<u8>,
format: Format,
dimensions: (u32, u32),
layers: u32,
settings: TextureSettings
) -> Material
pub fn new_material_from_raw_texture( &self, texture: Vec<u8>, format: Format, dimensions: (u32, u32), layers: u32, settings: TextureSettings ) -> Material
Simplification of making a texture and putting it into a material.
pub fn default_textured_material(&self, texture: &Arc<Texture>) -> Material
pub fn get_window(&self) -> &Window
pub fn window_dimensions(&self) -> (u32, u32)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Resources
impl Send for Resources
impl Sync for Resources
impl Unpin for Resources
impl !UnwindSafe for Resources
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more