pub struct OffscreenTexture { /* private fields */ }Expand description
webgpu::OffscreenTexture
Implementations§
Source§impl OffscreenTexture
impl OffscreenTexture
pub fn new( context: Rc<Context>, size: Size, type_: TextureChannelDataType, depth: bool, stencil: bool, ) -> Self
pub fn take_texture(&self) -> Option<Texture2DPtr>
Trait Implementations§
Source§impl OffscreenTexture for OffscreenTexture
impl OffscreenTexture for OffscreenTexture
Source§fn is_renderable(&self) -> bool
fn is_renderable(&self) -> bool
Check if the texture resource is valid and can be rendered to
fn read_still_image(&self) -> PremultipliedImage
fn get_texture(&self) -> Texture2DPtr
fn as_any(&self) -> &dyn Any
Source§impl Renderable for OffscreenTexture
impl Renderable for OffscreenTexture
fn renderable_base(&self) -> &RenderableBase
fn get_size(&self) -> Size
Source§fn get_resource(&self) -> Option<Rc<dyn RenderableResource>>
fn get_resource(&self) -> Option<Rc<dyn RenderableResource>>
getResource<T>() without the cast: the caller downcasts.fn has_resource(&self) -> bool
fn set_resource(&self, resource: Option<Rc<dyn RenderableResource>>)
fn wait(&self)
Source§fn set_renderable_size(&self, size: Size)
fn set_renderable_size(&self, size: Size)
setRenderableSize (protected in C++).Source§fn is_same_renderable(&self, other: &dyn Renderable) -> bool
fn is_same_renderable(&self, other: &dyn Renderable) -> bool
operator!=: compares the resource pointers.Auto Trait Implementations§
impl !Freeze for OffscreenTexture
impl !RefUnwindSafe for OffscreenTexture
impl !Send for OffscreenTexture
impl !Sync for OffscreenTexture
impl !UnwindSafe for OffscreenTexture
impl Forget for OffscreenTexture
impl Unpin for OffscreenTexture
impl UnsafeUnpin for OffscreenTexture
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