The open source OpenXR runtime
at main 47 lines 838 B view raw
1// Copyright 2022, Collabora, Ltd. 2// SPDX-License-Identifier: BSL-1.0 3/*! 4 * @file 5 * @brief SimulaVR driver interface. 6 * @author Moshi Turner <moshiturner@protonmail.com> 7 * @ingroup drv_svr 8 */ 9 10#pragma once 11 12#include "xrt/xrt_defines.h" 13#ifdef __cplusplus 14extern "C" { 15#endif 16 17struct svr_display_distortion_polynomial_values 18{ 19 float k1; 20 float k3; 21 float k5; 22 float k7; 23 float k9; 24}; 25 26struct svr_one_display_distortion 27{ 28 float half_fov; 29 struct xrt_vec2 display_size_mm; 30 31 struct svr_display_distortion_polynomial_values red, green, blue; 32}; 33 34struct svr_two_displays_distortion 35{ 36 struct svr_one_display_distortion views[2]; // left, right 37}; 38 39// Doesn't take possession of *distortion - feel free to free it after. 40struct xrt_device * 41svr_hmd_create(struct svr_two_displays_distortion *distortion); 42 43 44 45#ifdef __cplusplus 46} 47#endif