LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::XRSystemDescriptor Struct Reference

XR system descriptor structure. More...

#include <XRSystemFlags.h>

Public Attributes

ApplicationDescriptor application
 Application descriptor used when a Vulkan debug or validation layer is enabled.
XRFormFactor formFactor = XRFormFactor::HeadMountedDisplay
 Selected form factor. Defaults to XRFormFactor::HeadMountedDisplay.
XRViewConfiguration viewConfiguration = XRViewConfiguration::Stereo
 Selected view configuration. Defaults to XRViewConfiguration::Stereo.
long flags = 0
 Combination of XRSystemFlags entries. By default 0.
const void * xrConfig = nullptr
 Optional raw pointer to a XR backend-specific configuration structure.
std::size_t xrConfigSize = 0
 Specifies the size (in bytes) of the structure xrConfig points to (use sizeof with the respective structure). By default 0.
void * platformContext = nullptr
 Optional raw pointer to a platform specific context structure the XR system is brought up with. By default null.
std::size_t platformContextSize = 0
 Specifies the size (in bytes) of the structure platformContext points to (use sizeof with the respective structure). By default 0.

Detailed Description

XR system descriptor structure.

See also
XRSystem::Load

Member Data Documentation

◆ application

ApplicationDescriptor LLGL::XRSystemDescriptor::application

Application descriptor used when a Vulkan debug or validation layer is enabled.

See also
ApplicationDescriptor

◆ flags

long LLGL::XRSystemDescriptor::flags = 0

Combination of XRSystemFlags entries. By default 0.

◆ formFactor

XRFormFactor LLGL::XRSystemDescriptor::formFactor = XRFormFactor::HeadMountedDisplay

Selected form factor. Defaults to XRFormFactor::HeadMountedDisplay.

◆ platformContext

void* LLGL::XRSystemDescriptor::platformContext = nullptr

Optional raw pointer to a platform specific context structure the XR system is brought up with. By default null.

Remarks
The structure it points to is identified by ::platformContextSize. Currently only used on Android, where it is required and points to either the android_app state of a NativeActivity-based application, or an LLGL::AndroidContext filled in by an application - as with SDL - that has no android_app.
Only the Java VM and Activity are read: the OpenXR loader needs both to discover and bind to the system XR runtime, via xrInitializeLoaderKHR and XrInstanceCreateInfoAndroidKHR.
See also
platformContextSize
RenderSystemDescriptor::platformContext
AndroidContext

◆ platformContextSize

std::size_t LLGL::XRSystemDescriptor::platformContextSize = 0

Specifies the size (in bytes) of the structure platformContext points to (use sizeof with the respective structure). By default 0.

Remarks
This size is what identifies which structure platformContext points to.
If platformContext is null then this field is ignored.
See also
platformContext

◆ viewConfiguration

XRViewConfiguration LLGL::XRSystemDescriptor::viewConfiguration = XRViewConfiguration::Stereo

Selected view configuration. Defaults to XRViewConfiguration::Stereo.

◆ xrConfig

const void* LLGL::XRSystemDescriptor::xrConfig = nullptr

Optional raw pointer to a XR backend-specific configuration structure.

Remarks
This can be used to pass some refinement configurations to the XR system when the module is loaded. Example usage (for OpenXR runtime):
// Initialize OpenXR specific configurations (e.g. always allocate at least 1GB of VRAM for each device memory chunk).
config.instanceExtensions = { "XR_EXT_HAND_TRACKING_EXTENSION_NAME" };
// Initialize XR system descriptor
xrDesc.xrConfig = &config;
xrDesc.xrConfigSize = sizeof(config);
// Load OpenXR system
auto xrSystem = LLGL::XRSystem::Load(xrDesc);
static XRSystemPtr Load(const XRSystemDescriptor &xrSystemDesc, Report *report=nullptr)
Loads and brings up an XR runtime.
Configuration structure for OpenXR-specific settings.
Definition XRConfiguration.h:20
ArrayView< const char * > instanceExtensions
List of OpenXR instance extensions to enable when loading the XR system. The ones that are not suppor...
Definition XRConfiguration.h:25
XR system descriptor structure.
Definition XRSystemFlags.h:109
std::size_t xrConfigSize
Specifies the size (in bytes) of the structure xrConfig points to (use sizeof with the respective str...
Definition XRSystemFlags.h:152
const void * xrConfig
Optional raw pointer to a XR backend-specific configuration structure.
Definition XRSystemFlags.h:145
See also
xrConfigSize
XRConfigurationOpenXR

◆ xrConfigSize

std::size_t LLGL::XRSystemDescriptor::xrConfigSize = 0

Specifies the size (in bytes) of the structure xrConfig points to (use sizeof with the respective structure). By default 0.

Remarks
If xrConfig is null then this field is ignored.
See also
xrConfig

The documentation for this struct was generated from the following file: