Monado OpenXR Runtime
Macros | Functions
oxr_api_instance.c File Reference

Holds instance related entrypoints. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xrt/xrt_compiler.h"
#include "util/u_debug.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_two_call.h"
#include "oxr_api_funcs.h"
#include "oxr_api_verify.h"
#include "oxr_extension_support.h"
#include "openxr/openxr.h"
#include "openxr/openxr_reflection.h"
Include dependency graph for oxr_api_instance.c:

Macros

#define MAKE_EXTENSION_PROPERTIES(mixed_case, all_caps)
 
#define CHECK_EXT_NAME(mixed_case, all_caps)
 
#define MAKE_RESULT_CASE(VAL, _)   case VAL: strncpy(buffer, #VAL, XR_MAX_RESULT_STRING_SIZE); break;
 
#define MAKE_TYPE_CASE(VAL, _)   case VAL: strncpy(buffer, #VAL, XR_MAX_RESULT_STRING_SIZE); break;
 

Functions

XrResult oxr_xrEnumerateInstanceExtensionProperties (const char *layerName, uint32_t propertyCapacityInput, uint32_t *propertyCountOutput, XrExtensionProperties *properties)
 OpenXR API function xrEnumerateInstanceExtensionProperties. More...
 
XrResult oxr_xrCreateInstance (const XrInstanceCreateInfo *createInfo, XrInstance *out_instance)
 OpenXR API function xrCreateInstance. More...
 
XrResult oxr_xrDestroyInstance (XrInstance instance)
 OpenXR API function xrDestroyInstance. More...
 
XrResult oxr_xrGetInstanceProperties (XrInstance instance, XrInstanceProperties *instanceProperties)
 OpenXR API function xrGetInstanceProperties. More...
 
XrResult oxr_xrPollEvent (XrInstance instance, XrEventDataBuffer *eventData)
 OpenXR API function xrPollEvent. More...
 
XrResult oxr_xrResultToString (XrInstance instance, XrResult value, char buffer[XR_MAX_RESULT_STRING_SIZE])
 OpenXR API function xrResultToString. More...
 
XrResult oxr_xrStructureTypeToString (XrInstance instance, XrStructureType value, char buffer[XR_MAX_STRUCTURE_NAME_SIZE])
 OpenXR API function xrStructureTypeToString. More...
 
XrResult oxr_xrStringToPath (XrInstance instance, const char *pathString, XrPath *out_path)
 OpenXR API function xrStringToPath. More...
 
XrResult oxr_xrPathToString (XrInstance instance, XrPath path, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer)
 OpenXR API function xrPathToString. More...
 
XrResult oxr_xrConvertTimespecTimeToTimeKHR (XrInstance instance, const struct timespec *timespecTime, XrTime *time)
 OpenXR API function xrConvertTimespecTimeToTimeKHR. More...
 
XrResult oxr_xrConvertTimeToTimespecTimeKHR (XrInstance instance, XrTime time, struct timespec *timespecTime)
 OpenXR API function xrConvertTimeToTimespecTimeKHR. More...
 

Detailed Description

Holds instance related entrypoints.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

◆ CHECK_EXT_NAME

#define CHECK_EXT_NAME (   mixed_case,
  all_caps 
)
Value:
if (strcmp(createInfo->enabledExtensionNames[i], \
XR_##all_caps##_EXTENSION_NAME) == 0) { \
continue; \
}

Referenced by oxr_xrCreateInstance().

◆ MAKE_EXTENSION_PROPERTIES

#define MAKE_EXTENSION_PROPERTIES (   mixed_case,
  all_caps 
)
Value:
{XR_TYPE_EXTENSION_PROPERTIES, NULL, XR_##all_caps##_EXTENSION_NAME, \
XR_##mixed_case##_SPEC_VERSION},

◆ MAKE_RESULT_CASE

#define MAKE_RESULT_CASE (   VAL,
 
)    case VAL: strncpy(buffer, #VAL, XR_MAX_RESULT_STRING_SIZE); break;

Referenced by oxr_xrResultToString().

◆ MAKE_TYPE_CASE

#define MAKE_TYPE_CASE (   VAL,
 
)    case VAL: strncpy(buffer, #VAL, XR_MAX_RESULT_STRING_SIZE); break;