pub struct Framebuffer {
pub texture: Texture,
pub depth: DepthBuffer,
}Expand description
Off-screen framebuffer. Can be used as a render target in render passes.
Fields§
§texture: Texture§depth: DepthBufferImplementations§
Trait Implementations§
Source§impl Bind for Framebuffer
impl Bind for Framebuffer
fn binding(&self, index: u32) -> BindGroupEntry<'_>
Source§impl Canvas for Framebuffer
impl Canvas for Framebuffer
type Color = Bgra8
fn clear( &self, color: Self::Color, device: &mut Device, encoder: &mut CommandEncoder, )
fn fill( &self, buf: &[Self::Color], device: &mut Device, encoder: &mut CommandEncoder, )
fn transfer( &self, buf: &[Self::Color], rect: SizedRect<i32, ScreenSpace>, device: &mut Device, encoder: &mut CommandEncoder, )
fn blit( &self, from: SizedRect<u32, ScreenSpace>, dst: SizedRect<u32, ScreenSpace>, encoder: &mut CommandEncoder, )
Source§impl Debug for Framebuffer
impl Debug for Framebuffer
Source§impl From<Framebuffer> for Texture
impl From<Framebuffer> for Texture
Source§fn from(fb: Framebuffer) -> Self
fn from(fb: Framebuffer) -> Self
Converts to this type from the input type.
Source§impl RenderTarget for Framebuffer
impl RenderTarget for Framebuffer
Source§fn color_target(&self) -> &TextureView
fn color_target(&self) -> &TextureView
Color component.
Source§fn zdepth_target(&self) -> &TextureView
fn zdepth_target(&self) -> &TextureView
Depth component.
Auto Trait Implementations§
impl Freeze for Framebuffer
impl !RefUnwindSafe for Framebuffer
impl Send for Framebuffer
impl Sync for Framebuffer
impl Unpin for Framebuffer
impl !UnwindSafe for Framebuffer
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