[][src]Struct nannou::wgpu::BufferImage

pub struct BufferImage { /* fields omitted */ }

A wrapper around a wgpu buffer that contains an image of a known size and image::ColorType.

Methods

impl BufferImage[src]

pub fn size(&self) -> [u32; 2][src]

The dimensions of the image stored within the buffer.

pub fn color_type(&self) -> ColorType[src]

The color type of the image stored within the buffer.

pub fn read<F>(&self, callback: F) where
    F: 'static + FnOnce(Result<ImageAsyncMapping, ()>), 
[src]

Asynchronously maps the buffer of bytes from GPU to host memory and, once mapped, calls the given user callback with the data represented as an ImageAsyncMapping.

Note: The given callback will not be called until the memory is mapped and the device is polled. You should not rely on the callback being called immediately.

Trait Implementations

impl Debug for BufferImage[src]

Auto Trait Implementations

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,