Skip to main content
QAROS Rust API Dev (main) · versions: Dev (main) · Developer Guide

D3D11StreamParams

Struct D3D11StreamParams 

Source
pub struct D3D11StreamParams {
    pub color_bind_flags: u32,
    pub depth_bind_flags: u32,
    pub acquire_keyed_mutex_sync: bool,
    /* private fields */
}
Expand description

QarStreamParamsD3D11: the application’s D3D11.1 device and immediate context, on which QAROS creates the frame’s shared textures, and how it creates and synchronizes them.

Fields§

§color_bind_flags: u32

D3D11_BIND_FLAG bits of the color textures; the C sample asks for D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE. The header’s default is 0.

§depth_bind_flags: u32

D3D11_BIND_FLAG bits of the depth textures, for example D3D11_BIND_DEPTH_STENCIL. QAROS creates them as DXGI_FORMAT_D32_FLOAT, a typed depth format, so D3D11_BIND_SHADER_RESOURCE makes sender creation fail with E_INVALIDARG. The header’s default is 0.

§acquire_keyed_mutex_sync: bool

True (the header’s default): the library acquires and releases each texture’s keyed mutex around the frame cycle. False: the application drives the keyed-mutex chain with the keys in D3D11Frame::keyed_mutexes, for example when it copies through a chain of shared textures.

Implementations§

Source§

impl D3D11StreamParams

Source

pub fn new(device: &ID3D11Device1, context: &ID3D11DeviceContext1) -> Self

The header’s defaults (qar_stream_params_d3d11_default: no bind flags, the library drives the keyed mutexes) for device and its immediate context. Takes a reference on both, which every sender created with these parameters keeps.

Source

pub unsafe fn from_raw( device: *mut ID3D11Device1, context: *mut ID3D11DeviceContext1, ) -> Option<Self>

The header’s defaults for a device and context given as raw pointers, from another D3D11 binding or a test. None when either is null. No reference is taken.

§Safety

device is an ID3D11Device1 and context its immediate ID3D11DeviceContext1, and both stay valid for as long as a sender created with these parameters may use them: until its session is dropped, and for a creation started with crate::Session::start_d3d11_render_sender as described there.

Source

pub fn device_raw(&self) -> *mut ID3D11Device1

The device pointer handed to QAROS.

Source

pub fn context_raw(&self) -> *mut ID3D11DeviceContext1

The immediate context pointer handed to QAROS.

Trait Implementations§

Source§

impl Clone for D3D11StreamParams

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for D3D11StreamParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.