pub enum PresentStrategy {
Hwnd,
Sequential,
Flip,
FlipRedirect,
}Expand description
It’s very tricky to get smooth dynamics (especially resizing) and good performance on Windows. This setting lets clients experiment with different strategies.
Variants§
Hwnd
Don’t try to use DXGI at all, only create Hwnd render targets. Note: on Windows 7 this is the only mode available.
Sequential
Corresponds to the swap effect DXGI_SWAP_EFFECT_SEQUENTIAL. In testing, it causes diagonal banding artifacts with Nvidia adapters, and incremental present doesn’t work. However, it is compatible with GDI (such as menus).
Flip
Corresponds to the swap effect DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL. In testing, it seems to perform well (including allowing smooth resizing when the frame can be rendered quickly), but isn’t compatible with GDI.
FlipRedirect
Corresponds to the swap effect DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL but with a redirection surface for GDI compatibility. Resize is very laggy and artifacty.
Trait Implementations§
Source§impl Clone for PresentStrategy
impl Clone for PresentStrategy
Source§fn clone(&self) -> PresentStrategy
fn clone(&self) -> PresentStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PresentStrategy
impl Debug for PresentStrategy
Source§impl Default for PresentStrategy
impl Default for PresentStrategy
Source§fn default() -> PresentStrategy
fn default() -> PresentStrategy
Source§impl PartialEq for PresentStrategy
impl PartialEq for PresentStrategy
impl Copy for PresentStrategy
impl Eq for PresentStrategy
impl StructuralPartialEq for PresentStrategy
Auto Trait Implementations§
impl Freeze for PresentStrategy
impl RefUnwindSafe for PresentStrategy
impl Send for PresentStrategy
impl Sync for PresentStrategy
impl Unpin for PresentStrategy
impl UnwindSafe for PresentStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more