Skip to main content
Version: 0.9.0

RenderSenderOptions class

Arguments of a render sender: one stream rendered for one target peer, displayed in one app volume. The defaults match qar_render_sender_init_default().

Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll · Source: QarTypes.cs

public sealed class RenderSenderOptions

Remarks​

The stream-parameter property matching RenderSenderOptions.GraphicsAPI must be set and the other two left null; creating the sender throws ArgumentException otherwise.

Constructors​

RenderSenderOptions(PeerId, GraphicsAPI)​

public RenderSenderOptions(PeerId peerId, GraphicsAPI graphicsAPI)

Parameters

NameTypeDescription
peerIdPeerId
graphicsAPIGraphicsAPI

Properties​

MemberDescription
PeerIdRequired. The peer this stream renders for - the headset or viewer that receives the frames, never this process' own peer id. Take it from a render stream request (RenderSenderControl.SubscribeRequests) or from Session.InviteTargetApp. PeerId.Unique belongs to no peer, so a stream created with one never produces a frame.
GraphicsAPI
EnableAutoReconnectsTrue (the default) keeps the sender across network drops and target restarts: frame calls fail while it is disconnected, typically with StatusCode.MediaStreamingStreamIsReconnecting, and recover on their own.
TextureLayoutDefaults to FrameLayout.SideBySide.
FrameViewsThe views of one video frame; at most 8 are sent. The order is guaranteed: the layout (RenderSender layout) and every frame the sender hands back list their views in exactly this order, 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 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 was not declared follows the declared ones.
AppVolumeIdRequired. The app volume this stream is displayed in, which places it in the shared scene and defines the app content space every pose the sender hands out is in. Create it first with AppVolumeControl.GetOrCreate. Null is rejected with StatusCode.AppVolumeInvalidId.
ColorFormatDefaults to PixelFormat.B8G8R8A8.
DepthFormatDefaults to PixelFormat.D32Float.
StreamParamsD3D11Required when RenderSenderOptions.GraphicsAPI is GraphicsAPI.D3D11; must be null otherwise.
StreamParamsVulkanRequired when RenderSenderOptions.GraphicsAPI is GraphicsAPI.Vulkan; must be null otherwise.
StreamParamsOpenGlRequired when RenderSenderOptions.GraphicsAPI is GraphicsAPI.OpenGL; must be null otherwise.

PeerId​

Required. The peer this stream renders for - the headset or viewer that receives the frames, never this process' own peer id. Take it from a render stream request (RenderSenderControl.SubscribeRequests) or from Session.InviteTargetApp. PeerId.Unique belongs to no peer, so a stream created with one never produces a frame.

public PeerId PeerId { get; set; }

Value: PeerId

GraphicsAPI​

public GraphicsAPI GraphicsAPI { get; set; }

Value: GraphicsAPI

EnableAutoReconnects​

True (the default) keeps the sender across network drops and target restarts: frame calls fail while it is disconnected, typically with StatusCode.MediaStreamingStreamIsReconnecting, and recover on their own.

public bool EnableAutoReconnects { get; set; }

Value: bool

TextureLayout​

Defaults to FrameLayout.SideBySide.

public FrameLayout TextureLayout { get; set; }

Value: FrameLayout

FrameViews​

The views of one video frame; at most 8 are sent. The order is guaranteed: the layout (RenderSender layout) and every frame the sender hands back list their views in exactly this order, 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 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 was not declared follows the declared ones.

public RenderFrameView[] FrameViews { get; set; }

Value: RenderFrameView[]

AppVolumeId​

Required. The app volume this stream is displayed in, which places it in the shared scene and defines the app content space every pose the sender hands out is in. Create it first with AppVolumeControl.GetOrCreate. Null is rejected with StatusCode.AppVolumeInvalidId.

public AppVolumeId? AppVolumeId { get; set; }

Value: AppVolumeId?

ColorFormat​

Defaults to PixelFormat.B8G8R8A8.

public PixelFormat ColorFormat { get; set; }

Value: PixelFormat

DepthFormat​

Defaults to PixelFormat.D32Float.

public PixelFormat DepthFormat { get; set; }

Value: PixelFormat

StreamParamsD3D11​

Required when RenderSenderOptions.GraphicsAPI is GraphicsAPI.D3D11; must be null otherwise.

public StreamParamsD3D11? StreamParamsD3D11 { get; set; }

Value: StreamParamsD3D11

StreamParamsVulkan​

Required when RenderSenderOptions.GraphicsAPI is GraphicsAPI.Vulkan; must be null otherwise.

public StreamParamsVulkan? StreamParamsVulkan { get; set; }

Value: StreamParamsVulkan

StreamParamsOpenGl​

Required when RenderSenderOptions.GraphicsAPI is GraphicsAPI.OpenGL; must be null otherwise.

public StreamParamsOpenGl? StreamParamsOpenGl { get; set; }

Value: StreamParamsOpenGl