pub struct ImageManager { /* private fields */ }Expand description
Manages uploaded image textures and their bind groups.
Implementations§
Source§impl ImageManager
impl ImageManager
pub fn new() -> Self
Sourcepub fn register_image(
&mut self,
name: &str,
width: u32,
height: u32,
pixels: &[u8],
device: &Device,
queue: &Queue,
bind_group_layout: &BindGroupLayout,
)
pub fn register_image( &mut self, name: &str, width: u32, height: u32, pixels: &[u8], device: &Device, queue: &Queue, bind_group_layout: &BindGroupLayout, )
Register an image by name. Uploads RGBA pixel data and creates a bind group compatible with the quad pipeline’s bind group layout.
Sourcepub fn get_bind_group(&self, name: &str) -> Option<&BindGroup>
pub fn get_bind_group(&self, name: &str) -> Option<&BindGroup>
Get the bind group for a registered image.
Trait Implementations§
Source§impl Default for ImageManager
impl Default for ImageManager
Source§fn default() -> ImageManager
fn default() -> ImageManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ImageManager
impl !UnwindSafe for ImageManager
impl Freeze for ImageManager
impl Send for ImageManager
impl Sync for ImageManager
impl Unpin for ImageManager
impl UnsafeUnpin for ImageManager
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