pub struct ImageRenderingContext { /* private fields */ }Expand description
Image rendering context
Implementations§
Source§impl ImageRenderingContext
impl ImageRenderingContext
Sourcepub fn new(device: Arc<Device>, queue: Arc<Queue>) -> Self
pub fn new(device: Arc<Device>, queue: Arc<Queue>) -> Self
Create a new image rendering context
Sourcepub fn create_image(&self, pixels: &[u8], width: u32, height: u32) -> GpuImage
pub fn create_image(&self, pixels: &[u8], width: u32, height: u32) -> GpuImage
Create a GPU image from RGBA data
Sourcepub fn create_image_labeled(
&self,
pixels: &[u8],
width: u32,
height: u32,
label: &str,
) -> GpuImage
pub fn create_image_labeled( &self, pixels: &[u8], width: u32, height: u32, label: &str, ) -> GpuImage
Create a GPU image with a label
Sourcepub fn sampler_linear(&self) -> &Sampler
pub fn sampler_linear(&self) -> &Sampler
Get the linear sampler
Sourcepub fn sampler_nearest(&self) -> &Sampler
pub fn sampler_nearest(&self) -> &Sampler
Get the nearest sampler
Auto Trait Implementations§
impl Freeze for ImageRenderingContext
impl !RefUnwindSafe for ImageRenderingContext
impl Send for ImageRenderingContext
impl Sync for ImageRenderingContext
impl Unpin for ImageRenderingContext
impl UnsafeUnpin for ImageRenderingContext
impl !UnwindSafe for ImageRenderingContext
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