#[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: QarStructureHeaderExtensible header; see the backend-specific stream parameter structs.
peer_id: QarPeerIdRequired. 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: boolIn 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: QarFrameLayoutFrame 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 QarAppVolumeIdRequired. 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: QarPixelFormatColor pixel format
depth_format: QarPixelFormatDepth pixel format
graphics_api: QarGraphicsAPISelects the backend and therefore the matching optional header extension.