[−][src]Struct imgui_wgpu::Texture
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]
texture: Texture,
view: TextureView,
bind_group: BindGroup,
size: Extent3d
) -> Self
Create a Texture
from its raw parts.
pub fn new(
device: &Device,
renderer: &Renderer,
config: TextureConfig<'_>
) -> Self
[src]
device: &Device,
renderer: &Renderer,
config: TextureConfig<'_>
) -> Self
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,