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

QarRenderSenderInit

Struct QarRenderSenderInit 

Source
#[repr(C)]
pub struct QarRenderSenderInit { pub header: QarStructureHeader, pub peer_id: QarPeerId, pub enable_auto_reconnects: bool, pub texture_layout: QarFrameLayout, pub frame_views: [QarRenderFrameView; 8], pub frame_views_count: usize, pub app_volume_id: *const QarAppVolumeId, pub color_format: QarPixelFormat, pub depth_format: QarPixelFormat, pub graphics_api: QarGraphicsAPI, }
Expand description

@brief Rendering stream sender configuration.

Backend-specific graphics context/device configuration is supplied through header.next. Exactly one extension is required for a GPU API:

  • QAR_GRAPHICS_API_D3D11 requires QarStreamParamsD3D11.
  • QAR_GRAPHICS_API_OPENGL requires exactly one of QarStreamParamsOpenGlEgl, QarStreamParamsOpenGlWgl or QarStreamParamsOpenGlGlx, whichever matches the context you own.
  • QAR_GRAPHICS_API_VULKAN requires QarStreamParamsVulkan. QAR_GRAPHICS_API_CPU supports no graphics extension.

The chain may also hold one QarRenderSenderAlphaModeExt, in any position. Nothing else may be chained, and no type may appear twice.

Fields§

§header: QarStructureHeader

Extensible header; see the backend-specific stream parameter structs.

§peer_id: QarPeerId

Required. The peer this stream renders for - the headset or viewer that will receive these frames, never this process’ own peer id. See “Basic flow” in api.h for how to find target peer ids.

qar_peer_id_unique() does not produce a usable value here: it mints a fresh id belonging to no peer, so a stream created with one is negotiated with nobody and never produces a frame.

§enable_auto_reconnects: bool

In case of stream failure caused by network issue or other side crash we will automatically restart stream and try to recreate a stream transparently in the background

§texture_layout: QarFrameLayout

Frame layout configuration

§frame_views: [QarRenderFrameView; 8]

Array of views in the single video frame.

The order is guaranteed. The views of the layout (qar_render_sender_layout()) and of every frame this sender hands back (qar_render_sender_frame_*()) come in exactly the order declared here, each with the eye and data_type declared at its position. Textures come in the order the views first use them: one per view for QAR_FRAME_LAYOUT_SEPARATED_TEXTURES, one per data type for side by side and layered, and each view’s texture_index names its texture. A view the frame layout provides but you did not declare follows the declared ones.

§frame_views_count: usize§app_volume_id: *const QarAppVolumeId

Required. The app volume this stream is displayed in, which is what places it in the session’s shared 3D scene. Create the volume first with qar_app_volumes_get_or_create() and pass the id it wrote out; a stream without one is not positioned in the scene and no viewer can show it.

It also defines the sender’s app content space: every pose, hand joint, radius and velocity the sender hands the application is in it. While the volume does not resolve, the sender hands out nothing: begin-frame fails with QAR_STATUS_RENDERING_PRODUCER_APP_VOLUME_UNRESOLVED and the hands are reported untracked.

NULL is rejected with QAR_STATUS_APP_VOLUME_INVALID_ID.

§color_format: QarPixelFormat

Color pixel format

§depth_format: QarPixelFormat

Depth pixel format

§graphics_api: QarGraphicsAPI

Selects the backend and therefore the matching optional header extension.

Trait Implementations§

Source§

impl Clone for QarRenderSenderInit

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 Copy for QarRenderSenderInit

Source§

impl Debug for QarRenderSenderInit

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for QarRenderSenderInit

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QarRenderSenderInit

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.