Struct wgpu::SurfaceTexture
source · pub struct SurfaceTexture {
pub texture: Texture,
pub suboptimal: bool,
/* private fields */
}
Expand description
Surface texture that can be rendered to.
Result of a successful call to Surface::get_current_texture
.
This type is unique to the Rust API of wgpu
. In the WebGPU specification,
the GPUCanvasContext
provides
a texture without any additional information.
Fields§
§texture: Texture
Accessible view of the frame.
suboptimal: bool
true
if the acquired buffer can still be used for rendering,
but should be recreated for maximum performance.
Implementations§
source§impl SurfaceTexture
impl SurfaceTexture
sourcepub fn present(self)
pub fn present(self)
Schedule this texture to be presented on the owning surface.
Needs to be called after any work on the texture is scheduled via Queue::submit
.
Trait Implementations§
source§impl Debug for SurfaceTexture
impl Debug for SurfaceTexture
Auto Trait Implementations§
impl !RefUnwindSafe for SurfaceTexture
impl Send for SurfaceTexture
impl Sync for SurfaceTexture
impl Unpin for SurfaceTexture
impl !UnwindSafe for SurfaceTexture
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