summaryrefslogtreecommitdiff
path: root/servers/xr_server.h
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2022-07-24 20:43:30 +1000
committerBastiaan Olij <mux213@gmail.com>2022-07-28 11:50:34 +1000
commit1dd671014bdfc714687f91914755ad925aabda5f (patch)
tree4c03669e8695c9900dfe1b6fe8b26c8757bbeb29 /servers/xr_server.h
parenteac22e3eb489b4a50bb274f10e8a8d4eb795fa99 (diff)
Add startup flag to override XR mode settings
Diffstat (limited to 'servers/xr_server.h')
-rw-r--r--servers/xr_server.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/servers/xr_server.h b/servers/xr_server.h
index d9188d2de1..74128bfb54 100644
--- a/servers/xr_server.h
+++ b/servers/xr_server.h
@@ -57,6 +57,12 @@ class XRServer : public Object {
_THREAD_SAFE_CLASS_
public:
+ enum XRMode {
+ XRMODE_DEFAULT, /* Default behaviour, means we check project settings */
+ XRMODE_OFF, /* Ignore project settings, disable OpenXR, disable shaders */
+ XRMODE_ON, /* Ignore project settings, enable OpenXR, enable shaders, run editor in VR (if applicable) */
+ };
+
enum TrackerType {
TRACKER_HEAD = 0x01, /* tracks the position of the players head (or in case of handheld AR, location of the phone) */
TRACKER_CONTROLLER = 0x02, /* tracks a controller */
@@ -75,6 +81,8 @@ public:
};
private:
+ static XRMode xr_mode;
+
Vector<Ref<XRInterface>> interfaces;
Dictionary trackers;
@@ -90,6 +98,9 @@ protected:
static void _bind_methods();
public:
+ static XRMode get_xr_mode();
+ static void set_xr_mode(XRMode p_mode);
+
static XRServer *get_singleton();
/*