pub enum Dx12SwapchainKind {
DxgiFromHwnd,
DxgiFromVisual,
}
Expand description
Selects which kind of swapchain to use on DX12.
Variants§
DxgiFromHwnd
Use a DXGI swapchain made directly from the window’s HWND.
This does not support transparency but has better support from developer tooling from RenderDoc.
DxgiFromVisual
Use a DXGI swapchain made from a DirectComposition visual made automatically from the window’s HWND.
This creates a single IDCompositionVisual
over the entire window that is used by the Surface
.
If a user wants to manage the composition tree themselves, they should create their own device and
composition, and pass the relevant visual down via SurfaceTargetUnsafe::CompositionVisual
.
This supports transparent windows, but does not have support from RenderDoc.
Implementations§
Source§impl Dx12SwapchainKind
impl Dx12SwapchainKind
Sourcepub fn from_env() -> Option<Self>
pub fn from_env() -> Option<Self>
Choose which presentation system to use from the environment variable WGPU_DX12_PRESENTATION_SYSTEM
.
Valid values, case insensitive:
DxgiFromVisual
orVisual
DxgiFromHwnd
orHwnd
forSelf::DxgiFromHwnd
Trait Implementations§
Source§impl Clone for Dx12SwapchainKind
impl Clone for Dx12SwapchainKind
Source§fn clone(&self) -> Dx12SwapchainKind
fn clone(&self) -> Dx12SwapchainKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more