Dela via


Class GraphicsBindingOpenXrD3d11

D3D11 binding for OpenXR.

Important: RemoteManagerStatic.StartupRemoteRendering must be called before the OpenXR loader negotiates with the underlying OpenXR runtime.

At runtime the only thing that needs to be done by the user is to call GraphicsBindingOpenXrD3d11.BlitRemoteFrame to render the remote frame to the current render target.

class Microsoft::Azure::RemoteRendering::GraphicsBindingOpenXrD3d11 final : public Microsoft::Azure::RemoteRendering::GraphicsBinding

Methods

BlitRemoteFrame

Blits the current remote frame to the bound render target.

When this function is executed it is assumed that the color and depth buffers provided by OpenXR are bound as the render target. This should be done as the very first thing in each frame as this function will overwrite all content in the target buffers.

auto BlitRemoteFrame() noexcept -> Microsoft::Azure::RemoteRendering::Result;

Returns

Type Description
Result Result.Success, Result.NotInitialized, Result.Fail, Result.NoConnection

GetRemoteFocusPoint

Retrieves the remote focus point.

This focus point must be explicitly set as the focus point to be used.

A Result.NoConnection error occurs if this is called while there is no connection to the server.

auto GetRemoteFocusPoint(uint64_t spaceHandle, Microsoft::Azure::RemoteRendering::Float3* position, Microsoft::Azure::RemoteRendering::Float3* normal, Microsoft::Azure::RemoteRendering::Float3* velocity) noexcept -> Microsoft::Azure::RemoteRendering::FocusPointResult;

Parameters

Name Type Description
spaceHandle ulong The OpenXR space in which the focus point should be expressed. Passing an invalid space handle will result in invalid focus points.
position Float3 The focus point's position in world-space.
normal Float3 The focus point's normal in world-space.
velocity Float3 The focus point's velocity measured in units per second, in world-space.

Returns

Type Description
FocusPointResult How to interpret the point data. If FocusPointResult.Invalid is returned, the data should not be used.

UpdateAppSpace

Informs ARR of a new app space.

ARR must be informed whenever the app space changes.

auto UpdateAppSpace(uint64_t spaceHandle) noexcept -> Microsoft::Azure::RemoteRendering::Result;

Parameters

Name Type Description
spaceHandle ulong OpenXR space handle.

Returns

Type Description
Result Result.Success, Result.NotInitialized, Result.Fail

See also