File openxr.cpp
FileList > openxr > openxr.cpp
Go to the source code of this file
#include "interface.h"
#include "openxr/openxr_loader_negotiation.h"
#include <cstring>
#include <malloc.h>
#include <string>
Public Attributes
Type | Name |
---|---|
PFN_xrEnumerateInstanceExtensionProperties | NextEnumerateInstanceExtensionProperties = {nullptr} |
const std::string | kLayerName = "ILLIXR\_HT" |
PFN_xrGetInstanceProcAddr | nextXrGetInstanceProcAddr = nullptr |
Public Functions
Type | Name |
---|---|
XrResult | illixr_xrCreateApiLayerInstance (const XrInstanceCreateInfo * info, const XrApiLayerCreateInfo * layerInfo, XrInstance * instance) |
XrResult | illixr_xrEnumerateApiLayerProperties (uint32_t propertyCapacityInput, uint32_t * propertyCountOutput, XrApiLayerProperties * properties) |
XrResult | illixr_xrEnumerateInstanceExtensionProperties (const char * layerName, uint32_t propertyCapacityInput, uint32_t * propertyCountOutput, XrExtensionProperties * properties) |
XrResult XRAPI_CALL | illixr_xrGetInstanceProcAddr (XrInstance instance, const char * name, PFN_xrVoidFunction * function) |
XrResult | illixr_xrNegotiateLoaderApiLayerInterface (const XrNegotiateLoaderInfo * loaderInfo, const char * layerName, XrNegotiateApiLayerRequest * layerRequest) |
Macros
Type | Name |
---|---|
define | API_VERSION 1 |
define | INTERFACE_VERSION 1 |
define | PRINT_ERROR (...) /* multi line expression */ |
define | XR_NO_PROTOTYPES |
Public Attributes Documentation
variable NextEnumerateInstanceExtensionProperties
PFN_xrEnumerateInstanceExtensionProperties NextEnumerateInstanceExtensionProperties;
variable kLayerName
const std::string kLayerName;
variable nextXrGetInstanceProcAddr
PFN_xrGetInstanceProcAddr nextXrGetInstanceProcAddr;
Public Functions Documentation
function illixr_xrCreateApiLayerInstance
XrResult illixr_xrCreateApiLayerInstance (
const XrInstanceCreateInfo * info,
const XrApiLayerCreateInfo * layerInfo,
XrInstance * instance
)
xrCreateInstance for API layers
Parameters:
info
Pointer to the XrInstanceCreateInfo information passed by the application into the outer xrCreateInstance function.layerInfo
Pointer to an XrApiLayerCreateInfo structure that contains special information required by a API layer during its create instance process. This is generated by the loader.instance
Pointer to store the returned instance in, just as in the standard xrCreateInstance function.
Returns:
XrResult instance.
function illixr_xrEnumerateApiLayerProperties
XrResult illixr_xrEnumerateApiLayerProperties (
uint32_t propertyCapacityInput,
uint32_t * propertyCountOutput,
XrApiLayerProperties * properties
)
Returns up to requested number of global layer properties
Parameters:
propertyCapacityInput
The capacity of the properties array, or 0 to indicate a request to retrieve the required capacity.propertyCountOutput
Pointer to the count of properties written, or a pointer to the required capacity in the case that propertyCapacityInput is insufficient.properties
Pointer to an array of XrApiLayerProperties structures, but can be NULL if propertyCapacityInput is 0.
Returns:
XrResult instance.
function illixr_xrEnumerateInstanceExtensionProperties
XrResult illixr_xrEnumerateInstanceExtensionProperties (
const char * layerName,
uint32_t propertyCapacityInput,
uint32_t * propertyCountOutput,
XrExtensionProperties * properties
)
These functions are either called directly by the OpenXR application or are sent as handles to the application to be called indirectly. They deal with setting up and identifying function handles, but do not work directly with the hand tracking itself. Returns properties of available instance extensions
Parameters:
layerName
Either NULL or a pointer to a string naming the API layer to retrieve extensions from, as returned by xrEnumerateApiLayerProperties.propertyCapacityInput
The capacity of the properties array, or 0 to indicate a request to retrieve the required capacity.propertyCountOutput
Pointer to the count of properties written, or a pointer to the required capacity in the case that propertyCapacityInput is insufficient.properties
Pointer to an array of XrExtensionProperties structures, but can be NULL if propertyCapacityInput is 0.
Returns:
XrResult instance.
function illixr_xrGetInstanceProcAddr
XrResult XRAPI_CALL illixr_xrGetInstanceProcAddr (
XrInstance instance,
const char * name,
PFN_xrVoidFunction * function
)
Gets a function pointer for an OpenXR function
Parameters:
instance
The instance that the function pointer will be compatible with, or NULL for functions not dependent on any instance.name
The name of the function to obtain.function
The address of the function pointer to get.
Returns:
XrResult instance.
function illixr_xrNegotiateLoaderApiLayerInterface
XrResult illixr_xrNegotiateLoaderApiLayerInterface (
const XrNegotiateLoaderInfo * loaderInfo,
const char * layerName,
XrNegotiateApiLayerRequest * layerRequest
)
API layer exported negotiation function
Parameters:
loaderInfo
Pointer to a valid XrNegotiateLoaderInfo structure.layerName
NULL or a valid C-style NULL-terminated string listing the name of an API layer which the loader is attempting to negotiate with.layerRequest
Valid pointer to an XrNegotiateApiLayerRequest structure, with minimal initialization, as subsequently described, to be fully populated by the called API layer.
Returns:
XrResult instance.
Macro Definition Documentation
define API_VERSION
#define API_VERSION `1`
define INTERFACE_VERSION
#define INTERFACE_VERSION `1`
define PRINT_ERROR
#define PRINT_ERROR (
...
) `/* multi line expression */`
define XR_NO_PROTOTYPES
#define XR_NO_PROTOTYPES
The documentation for this class was generated from the following file /home/friedel/devel/ILLIXR-plugins/hand_tracking/openxr/openxr.cpp