1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Add a get_system_info method to XRInterface

This commit is contained in:
Bastiaan Olij
2023-03-13 12:26:10 +11:00
parent 550a779851
commit e31c2e4277
14 changed files with 69 additions and 1 deletions

View File

@@ -95,6 +95,10 @@ private:
uint32_t num_swapchain_formats = 0;
int64_t *supported_swapchain_formats = nullptr;
// system info
String runtime_name;
String runtime_version;
// configuration
XrFormFactor form_factor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
XrViewConfigurationType view_configuration = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO;
@@ -294,6 +298,8 @@ public:
XrInstance get_instance() const { return instance; };
XrSystemId get_system_id() const { return system_id; };
XrSession get_session() const { return session; };
String get_runtime_name() const { return runtime_name; };
String get_runtime_version() const { return runtime_version; };
// helper method to convert an XrPosef to a Transform3D
Transform3D transform_from_pose(const XrPosef &p_pose);