![]() |
LLGL 0.05 Beta
|
XR session interface. More...
#include <XRSession.h>
Public Member Functions | |
| ~XRSession () | |
| Releases internal data. The owning XRSystem releases native XR resources. | |
| virtual XRSessionState | GetState () const =0 |
| Returns the current runtime-reported session state. | |
| virtual XREnvironmentBlendMode | GetEnvironmentBlendMode () const =0 |
| Returns the environment blend mode the runtime selected for this session. | |
| virtual ArrayView< Format > | GetSupportedColorFormats () const =0 |
| Returns the list of color formats supported by this session for swap-chains, in runtime-preferred order. | |
| virtual ArrayView< Format > | GetSupportedDepthFormats () const =0 |
| Returns the list of depth-stencil formats supported by this session for swap-chains, in runtime-preferred order. | |
| virtual XRSwapChain * | CreateSwapChain (const XRSwapChainDescriptor &swapChainDesc)=0 |
| Creates a new XR swap-chain. | |
| virtual void | Release (XRSwapChain &swapChain)=0 |
| Releases the specified swap-chain. After this call, the specified object must no longer be used. | |
| virtual bool | IsRunning () const =0 |
| Returns true if the session has been signalled ready by the runtime and BeginFrame may be invoked. | |
| virtual bool | WaitFrame (XRFrameState &frameState)=0 |
| Waits for the previous frame to finish and retrieves the next frame state. Must be called before BeginFrame at the beginning of the app's update. | |
| virtual bool | BeginFrame ()=0 |
| Begins a new XR frame. Must be called after WaitFrame(). | |
| virtual bool | EndFrame (float nearZ, float farZ, ArrayView< XRSwapChain * > swapChains)=0 |
| Submits a frame to the runtime. | |
| virtual bool | GetViewState (DynamicVector< XRViewPose > &viewsOut)=0 |
| Sample and return the latest predicted poses for the session's views. | |
| virtual bool | GetNativeHandle (void *nativeHandle, std::size_t nativeHandleSize)=0 |
| Returns the native handle of this XR Session. | |
| virtual const Report * | GetReport () const =0 |
| Returns a pointer to the report or null if there is none. | |
| Public Member Functions inherited from LLGL::Interface | |
| virtual bool | IsInstanceOf (int id) const |
| Returns true if this object is an instance of the specified interface. | |
| Public Member Functions inherited from LLGL::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| virtual | ~NonCopyable ()=default |
Protected Member Functions | |
| XRSession () | |
| Allocates the internal data. | |
| Protected Member Functions inherited from LLGL::NonCopyable | |
| NonCopyable ()=default | |
XR session interface.
| LLGL::XRSession::~XRSession | ( | ) |
Releases internal data. The owning XRSystem releases native XR resources.
|
protected |
Allocates the internal data.
|
pure virtual |
Begins a new XR frame. Must be called after WaitFrame().
|
pure virtual |
Creates a new XR swap-chain.
| [in] | swapChainDesc | Specifies the swap-chain descriptor. |
|
pure virtual |
Submits a frame to the runtime.
| [in] | nearZ | Near clipping plane (in meters) the application used to render this frame. |
| [in] | farZ | Far clipping plane (in metres) the application used to render this frame. |
| [in] | swapChains | One swap-chain per view, in the same order as XRSystem::GetViewConfigurations(). |
frameState.shouldRender, an empty layer set is submitted instead (the runtime still requires a paired EndFrame call).
|
pure virtual |
Returns the environment blend mode the runtime selected for this session.
|
pure virtual |
Returns the native handle of this XR Session.
| [out] | nativeHandle | Pointer to the backend-specific native handle structure. Obtain it from #include <LLGL/Backend/OpenXR/NativeHandle.h>. |
| [in] | nativeHandleSize | Size (in bytes) of the native handle structure. |
|
pure virtual |
Returns a pointer to the report or null if there is none.
|
pure virtual |
Returns the current runtime-reported session state.
Returns the list of color formats supported by this session for swap-chains, in runtime-preferred order.
Returns the list of depth-stencil formats supported by this session for swap-chains, in runtime-preferred order.
XR_KHR_composition_layer_depth is unavailable). When non-empty, pass the chosen format in XRSwapChainDescriptor::depthStencilFormat to have the swap-chain submit depth to the runtime for reprojection; otherwise the swap-chain falls back to a private depth texture that is not submitted.
|
pure virtual |
Sample and return the latest predicted poses for the session's views.
| [out] | viewsOut | Receives the view poses and projection parameters. The size of this array matches the view count returned by XRSystem::GetViewConfigurations(). |
|
pure virtual |
Returns true if the session has been signalled ready by the runtime and BeginFrame may be invoked.
|
pure virtual |
Releases the specified swap-chain. After this call, the specified object must no longer be used.
|
pure virtual |
Waits for the previous frame to finish and retrieves the next frame state. Must be called before BeginFrame at the beginning of the app's update.
| [out] | frameState | Receives the predicted display time and a flag indicating whether the application should render. |