Monado OpenXR Runtime
OpenXR state tracker

Client application facing code. More...

Collaboration diagram for OpenXR state tracker:

Modules

 OpenXR entrypoints
 Gets called from the client application, does most verification and routes calls into OpenXR main code functions.
 
 OpenXR main code
 Gets called from OpenXR entrypoints functions and talks to devices and Compositor using XRT interfaces.
 

Directories

directory oxr
 OpenXR state tracker files.
 

Macros

#define XRT_CAST_PTR_TO_OXR_HANDLE(HANDLE_TYPE, PTR)   ((HANDLE_TYPE)(uint64_t)(uintptr_t)(PTR))
 Cast a pointer to an OpenXR handle in such a way as to avoid warnings. More...
 
#define XRT_CAST_OXR_HANDLE_TO_PTR(PTR_TYPE, HANDLE)   ((PTR_TYPE)(uintptr_t)(uint64_t)(HANDLE))
 Cast an OpenXR handle to a pointer in such a way as to avoid warnings. More...
 

Detailed Description

Client application facing code.

Macro Definition Documentation

◆ XRT_CAST_OXR_HANDLE_TO_PTR

#define XRT_CAST_OXR_HANDLE_TO_PTR (   PTR_TYPE,
  HANDLE 
)    ((PTR_TYPE)(uintptr_t)(uint64_t)(HANDLE))

#include <state_trackers/oxr/oxr_objects.h>

Cast an OpenXR handle to a pointer in such a way as to avoid warnings.

Avoids -Wint-to-pointer-cast by first casting to a 64-bit int, then to a pointer-sized int, then to the desired pointer type. That's a lot of no-ops on 64-bit, but a narrowing (!) conversion on 32-bit.

◆ XRT_CAST_PTR_TO_OXR_HANDLE

#define XRT_CAST_PTR_TO_OXR_HANDLE (   HANDLE_TYPE,
  PTR 
)    ((HANDLE_TYPE)(uint64_t)(uintptr_t)(PTR))

#include <state_trackers/oxr/oxr_objects.h>

Cast a pointer to an OpenXR handle in such a way as to avoid warnings.

Avoids -Wpointer-to-int-cast by first casting to the same size int, then promoting to the 64-bit int, then casting to the handle type. That's a lot of no-ops on 64-bit, but a widening conversion on 32-bit.