pub enum CurrentSurfaceTexture {
Success(SurfaceTexture),
Suboptimal(SurfaceTexture),
Timeout,
Occluded,
Outdated,
Lost,
Validation,
}Expand description
Result of a call to Surface::get_current_texture.
See variant documentation for how to handle each case.
Variants§
Success(SurfaceTexture)
Successfully acquired a surface texture with no issues.
Suboptimal(SurfaceTexture)
Successfully acquired a surface texture, but texture no longer matches the properties of the underlying surface.
It’s highly recommended to call Surface::configure again for optimal performance.
Timeout
A timeout was encountered while trying to acquire the next frame.
Applications should skip the current frame and try again later.
Occluded
The window is occluded (e.g. minimized or behind another window).
Applications should skip the current frame and try again once the window is no longer occluded.
Outdated
The underlying surface has changed, and therefore the surface configuration is outdated.
Call Surface::configure() and try again.
Lost
The surface has been lost and needs to be recreated.
If the device as a whole is lost (see set_device_lost_callback()), then
you need to recreate the device and all resources.
Otherwise, call Instance::create_surface() to recreate the surface,
then Surface::configure(), and try again.
Validation
A validation error inside Surface::get_current_texture() was raised
and caught by an error scope or
on_uncaptured_error().
Applications should attend to the validation error and try again.