The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/null: Show using get_view_poses

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2342>

+12 -1
+12 -1
src/xrt/compositor/null/null_compositor.c
··· 28 28 #include "util/comp_vulkan.h" 29 29 30 30 #include "multi/comp_multi_interface.h" 31 + #include "xrt/xrt_device.h" 31 32 32 33 33 34 #include <stdint.h> ··· 57 58 58 59 /* 59 60 * 60 - * Vulkan functions. 61 + * Vulkan extensions. 61 62 * 62 63 */ 63 64 ··· 426 427 NULL_TRACE(c, "LAYER_COMMIT"); 427 428 428 429 int64_t frame_id = c->base.layer_accum.data.frame_id; 430 + int64_t display_time_ns = c->base.layer_accum.layers[0].data.timestamp; 431 + 432 + // Default value from monado, overridden by HMD device where possible. 433 + struct xrt_vec3 default_eye_relation = {0.063f, 0.f, 0.f}; 434 + struct xrt_space_relation head_relation = {0}; 435 + 436 + struct xrt_fov fovs[2] = {0}; 437 + struct xrt_pose poses[2] = {0}; 438 + xrt_device_get_view_poses(c->xdev, &default_eye_relation, display_time_ns, 2, &head_relation, fovs, poses); 439 + 429 440 430 441 /* 431 442 * The null compositor doesn't render any frames, but needs to do