Struct direct3d11::device::builder::DeviceBuilder
source · pub struct DeviceBuilder<'a> { /* private fields */ }
Implementations
sourceimpl<'a> DeviceBuilder<'a>
impl<'a> DeviceBuilder<'a>
sourcepub fn with_driver_type(self, driver_type: DriverType) -> Self
pub fn with_driver_type(self, driver_type: DriverType) -> Self
Explicitly set the driver_type. This is not necessary except to trigger the other sanity checks in the builder methods if you really want a specific DriverType to be passed.
panics
Panics if adapter or software_module has already been specified and the passed driver_type is not the required value for those configurations.
sourcepub fn with_adapter(self, adapter: &'a Adapter) -> Self
pub fn with_adapter(self, adapter: &'a Adapter) -> Self
Instructs Direct3D to create the device on the specified adapter. This implicitly sets driver_type to Unknown if it hasn’t been set yet.
panics
Panics if driver_type has already been set to a value other than Unknown
sourcepub fn with_flags(self, flags: CreateDeviceFlags) -> Self
pub fn with_flags(self, flags: CreateDeviceFlags) -> Self
Pass additional flags to CreateDevice. None are specified by default.
panics
Panics if CreateDeviceFlags::SINGLETHREADED is set. This is not supported at this time. You can open a pull request if this feature is important to you.
pub fn with_feature_levels(self, levels: &'a [FeatureLevel]) -> Self
pub unsafe fn with_software_module(self, software: HMODULE) -> Self
pub fn build(self) -> Result<(FeatureLevel, Device, DeviceContext), Error>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for DeviceBuilder<'a>
impl<'a> !Send for DeviceBuilder<'a>
impl<'a> !Sync for DeviceBuilder<'a>
impl<'a> Unpin for DeviceBuilder<'a>
impl<'a> UnwindSafe for DeviceBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more