Monado OpenXR Runtime
oxr_chain.h File Reference

Utilities for accessing members in an OpenXR structure chain. More...

#include <xrt/xrt_openxr_includes.h>
Include dependency graph for oxr_chain.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define OXR_GET_INPUT_FROM_CHAIN(PTR, STRUCTURE_TYPE_ENUM, TYPE)   ((TYPE const *)oxr_find_input_in_chain(PTR, STRUCTURE_TYPE_ENUM))
 Finds an input struct of the given type in a next-chain and casts it as desired. More...
 
#define OXR_GET_OUTPUT_FROM_CHAIN(PTR, STRUCTURE_TYPE_ENUM, TYPE)   ((TYPE *)oxr_find_output_in_chain(PTR, STRUCTURE_TYPE_ENUM))
 Finds an output struct of the given type in a next-chain and casts it as desired. More...
 

Detailed Description

Utilities for accessing members in an OpenXR structure chain.

Author
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om

Macro Definition Documentation

◆ OXR_GET_INPUT_FROM_CHAIN

#define OXR_GET_INPUT_FROM_CHAIN (   PTR,
  STRUCTURE_TYPE_ENUM,
  TYPE 
)    ((TYPE const *)oxr_find_input_in_chain(PTR, STRUCTURE_TYPE_ENUM))

Finds an input struct of the given type in a next-chain and casts it as desired.

Returns NULL if nothing matching is found.

Note: There is no protection here to ensure that STRUCTURE_TYPE_ENUM (an XrStructureType value) and TYPE (a type name) actually match!

Referenced by oxr_verify_XrSessionCreateInfo().

◆ OXR_GET_OUTPUT_FROM_CHAIN

#define OXR_GET_OUTPUT_FROM_CHAIN (   PTR,
  STRUCTURE_TYPE_ENUM,
  TYPE 
)    ((TYPE *)oxr_find_output_in_chain(PTR, STRUCTURE_TYPE_ENUM))

Finds an output struct of the given type in a next-chain and casts it as desired.

Returns NULL if nothing matching is found.

Note: There is no protection here to ensure that STRUCTURE_TYPE_ENUM (an XrStructureType value) and TYPE (a type name) actually match!