[][src]Struct imgui_wgpu::Texture

pub struct Texture { /* fields omitted */ }

A container for a bindable texture.

Implementations

impl Texture[src]

pub fn from_raw_parts(
    texture: Texture,
    view: TextureView,
    bind_group: BindGroup,
    size: Extent3d
) -> Self
[src]

Create a Texture from its raw parts.

pub fn new(
    device: &Device,
    renderer: &Renderer,
    config: TextureConfig<'_>
) -> Self
[src]

Create a new GPU texture width the specified config.

pub fn write(&self, queue: &Queue, data: &[u8], width: u32, height: u32)[src]

Write data to the texture.

  • data: 32-bit RGBA bitmap data.
  • width: The width of the source bitmap (data) in pixels.
  • height: The height of the source bitmap (data) in pixels.

pub fn width(&self) -> u32[src]

The width of the texture in pixels.

pub fn height(&self) -> u32[src]

The height of the texture in pixels.

pub fn depth(&self) -> u32[src]

The depth of the texture.

pub fn size(&self) -> Extent3d[src]

The size of the texture in pixels.

pub fn texture(&self) -> &Texture[src]

The underlying wgpu::Texture.

pub fn view(&self) -> &TextureView[src]

The wgpu::TextureView of the underlying texture.

Auto Trait Implementations

impl !RefUnwindSafe for Texture

impl Send for Texture

impl Sync for Texture

impl Unpin for Texture

impl !UnwindSafe for Texture

Blanket Implementations

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> From<T> for T[src]

impl<T> Instrument for T[src]

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

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.