Initial commit

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-06-29 15:57:38 +03:00
commit c93ab29a90
12 changed files with 699 additions and 0 deletions

15
src/common.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include <format>
#define OPENXR_CHECK(fn_call, ...) \
do { \
XrResult result = fn_call(__VA_ARGS__); \
if (result != XR_SUCCESS) { \
std::array<char, XR_MAX_RESULT_STRING_SIZE> msg {}; \
xrResultToString(nullptr, result, msg.data()); \
throw std::runtime_error( \
std::format("OpenXR call '{}' failed (code {}): {}", #fn_call, \
static_cast<int>(result), msg.data())); \
} \
} while (0)