pub struct RenderTarget2d { /* private fields */ }Expand description
A renderer-owned offscreen color target in physical texture pixels.
Targets preserve GPU pixels only; a host must redraw them after device
recreation. Use the renderer’s physical WgpuRenderer::size when a
target should match the presentation surface exactly.
Implementations§
Source§impl RenderTarget2d
impl RenderTarget2d
Sourcepub fn allocation_bytes(&self) -> usize
pub fn allocation_bytes(&self) -> usize
Returns nominal single-level texel-storage bytes implied by its format. Backend row/tile/page alignment and resource metadata are not observable through wgpu and are therefore excluded.
Auto Trait Implementations§
impl !RefUnwindSafe for RenderTarget2d
impl !UnwindSafe for RenderTarget2d
impl Freeze for RenderTarget2d
impl Send for RenderTarget2d
impl Sync for RenderTarget2d
impl Unpin for RenderTarget2d
impl UnsafeUnpin for RenderTarget2d
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