pub enum Target {
Offscreen(Texture),
Swapchain {
surface: Surface<'static>,
config: SurfaceConfiguration,
before_present: Option<Box<dyn Fn() + Send>>,
},
}Variants§
Implementations§
Source§impl Target
impl Target
pub fn offscreen(gpu: &Gpu, width: u32, height: u32) -> Self
pub fn swapchain( gpu: &Gpu, surface: Surface<'static>, config: SurfaceConfiguration, ) -> Self
pub fn before_present(self, notify: impl Fn() + Send + 'static) -> Self
pub fn format(&self) -> TextureFormat
pub fn size(&self) -> (u32, u32)
pub fn texture(&self) -> Option<&Texture>
pub fn resize(&mut self, gpu: &Gpu, width: u32, height: u32)
pub fn acquire(&mut self, gpu: &Gpu) -> Acquire
pub fn present(&self, gpu: &Gpu, frame: TargetFrame)
Auto Trait Implementations§
impl !Freeze for Target
impl !RefUnwindSafe for Target
impl !Sync for Target
impl !UnwindSafe for Target
impl Forget for Target
impl Move for Target
impl Send for Target
impl Unpin for Target
impl UnsafeUnpin for Target
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