You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Rename OpenXRInterface.OpenXrSessionState to OpenXRInterface.SessionState
This commit is contained in:
@@ -86,7 +86,7 @@
|
|||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_session_state">
|
<method name="get_session_state">
|
||||||
<return type="int" enum="OpenXRInterface.OpenXrSessionState" />
|
<return type="int" enum="OpenXRInterface.SessionState" />
|
||||||
<description>
|
<description>
|
||||||
Returns the current state of our OpenXR session.
|
Returns the current state of our OpenXR session.
|
||||||
</description>
|
</description>
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
</signal>
|
</signal>
|
||||||
<signal name="session_focussed">
|
<signal name="session_focussed">
|
||||||
<description>
|
<description>
|
||||||
Informs our OpenXR session now has focus, e.g. output is sent to our HMD and we're receiving XR input.
|
Informs our OpenXR session now has focus, for example output is sent to the HMD and we're receiving XR input.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="session_loss_pending">
|
<signal name="session_loss_pending">
|
||||||
@@ -242,38 +242,38 @@
|
|||||||
</signal>
|
</signal>
|
||||||
<signal name="session_visible">
|
<signal name="session_visible">
|
||||||
<description>
|
<description>
|
||||||
Informs our OpenXR session is now visible, e.g. output is being sent to the HMD but we don't receive XR input.
|
Informs our OpenXR session is now visible, for example output is sent to the HMD but we don't receive XR input.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="OPENXR_SESSION_STATE_UNKNOWN" value="0" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_UNKNOWN" value="0" enum="SessionState">
|
||||||
The state of the session is unknown, we haven't tried setting up OpenXR yet.
|
The state of the session is unknown, we haven't tried setting up OpenXR yet.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_IDLE" value="1" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_IDLE" value="1" enum="SessionState">
|
||||||
The initial state after the OpenXR session is created or after the session is destroyed.
|
The initial state after the OpenXR session is created or after the session is destroyed.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_READY" value="2" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_READY" value="2" enum="SessionState">
|
||||||
OpenXR is ready to begin our session. [signal session_begun] is emitted when we change to this state.
|
OpenXR is ready to begin our session. [signal session_begun] is emitted when we change to this state.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_SYNCHRONIZED" value="3" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_SYNCHRONIZED" value="3" enum="SessionState">
|
||||||
The application has synched its frame loop with the runtime but we're not rendering anything. [signal session_synchronized] is emitted when we change to this state.
|
The application has synched its frame loop with the runtime but we're not rendering anything. [signal session_synchronized] is emitted when we change to this state.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_VISIBLE" value="4" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_VISIBLE" value="4" enum="SessionState">
|
||||||
The application has synched its frame loop with the runtime and we're rendering output to the user, however we receive no user input. [signal session_visible] is emitted when we change to this state.
|
The application has synched its frame loop with the runtime and we're rendering output to the user, however we receive no user input. [signal session_visible] is emitted when we change to this state.
|
||||||
[b]Note:[/b] This is the current state just before we get the focused state, whenever the user opens a system menu, switches to another application or takes off their headset.
|
[b]Note:[/b] This is the current state just before we get the focused state, whenever the user opens a system menu, switches to another application, or takes off their headset.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_FOCUSED" value="5" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_FOCUSED" value="5" enum="SessionState">
|
||||||
The application has synched its frame loop with the runtime, we're rendering output to the user and we're receiving XR input. [signal session_focussed] is emitted when we change to this state.
|
The application has synched its frame loop with the runtime, we're rendering output to the user and we're receiving XR input. [signal session_focussed] is emitted when we change to this state.
|
||||||
[b]Note:[/b] This is the state OpenXR will be in when the user can fully interact with your game.
|
[b]Note:[/b] This is the state OpenXR will be in when the user can fully interact with your game.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_STOPPING" value="6" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_STOPPING" value="6" enum="SessionState">
|
||||||
Our session is being stopped. [signal session_stopping] is emitted when we change to this state.
|
Our session is being stopped. [signal session_stopping] is emitted when we change to this state.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_LOSS_PENDING" value="7" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_LOSS_PENDING" value="7" enum="SessionState">
|
||||||
The session is about to be lost. [signal session_loss_pending] is emitted when we change to this state.
|
The session is about to be lost. [signal session_loss_pending] is emitted when we change to this state.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="OPENXR_SESSION_STATE_EXITING" value="8" enum="OpenXrSessionState">
|
<constant name="SESSION_STATE_EXITING" value="8" enum="SessionState">
|
||||||
The OpenXR instance is about to be destroyed and we're existing. [signal instance_exiting] is emitted when we change to this state.
|
The OpenXR instance is about to be destroyed and we're existing. [signal instance_exiting] is emitted when we change to this state.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="HAND_LEFT" value="0" enum="Hand">
|
<constant name="HAND_LEFT" value="0" enum="Hand">
|
||||||
|
|||||||
@@ -120,15 +120,15 @@ void OpenXRInterface::_bind_methods() {
|
|||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "vrs_min_radius", PROPERTY_HINT_RANGE, "1.0,100.0,1.0"), "set_vrs_min_radius", "get_vrs_min_radius");
|
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "vrs_min_radius", PROPERTY_HINT_RANGE, "1.0,100.0,1.0"), "set_vrs_min_radius", "get_vrs_min_radius");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "vrs_strength", PROPERTY_HINT_RANGE, "0.1,10.0,0.1"), "set_vrs_strength", "get_vrs_strength");
|
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "vrs_strength", PROPERTY_HINT_RANGE, "0.1,10.0,0.1"), "set_vrs_strength", "get_vrs_strength");
|
||||||
|
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_UNKNOWN);
|
BIND_ENUM_CONSTANT(SESSION_STATE_UNKNOWN);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_IDLE);
|
BIND_ENUM_CONSTANT(SESSION_STATE_IDLE);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_READY);
|
BIND_ENUM_CONSTANT(SESSION_STATE_READY);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_SYNCHRONIZED);
|
BIND_ENUM_CONSTANT(SESSION_STATE_SYNCHRONIZED);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_VISIBLE);
|
BIND_ENUM_CONSTANT(SESSION_STATE_VISIBLE);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_FOCUSED);
|
BIND_ENUM_CONSTANT(SESSION_STATE_FOCUSED);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_STOPPING);
|
BIND_ENUM_CONSTANT(SESSION_STATE_STOPPING);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_LOSS_PENDING);
|
BIND_ENUM_CONSTANT(SESSION_STATE_LOSS_PENDING);
|
||||||
BIND_ENUM_CONSTANT(OPENXR_SESSION_STATE_EXITING);
|
BIND_ENUM_CONSTANT(SESSION_STATE_EXITING);
|
||||||
|
|
||||||
BIND_ENUM_CONSTANT(HAND_LEFT);
|
BIND_ENUM_CONSTANT(HAND_LEFT);
|
||||||
BIND_ENUM_CONSTANT(HAND_RIGHT);
|
BIND_ENUM_CONSTANT(HAND_RIGHT);
|
||||||
@@ -1417,12 +1417,12 @@ void OpenXRInterface::on_refresh_rate_changes(float p_new_rate) {
|
|||||||
emit_signal(SNAME("refresh_rate_changed"), p_new_rate);
|
emit_signal(SNAME("refresh_rate_changed"), p_new_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenXRInterface::OpenXrSessionState OpenXRInterface::get_session_state() {
|
OpenXRInterface::SessionState OpenXRInterface::get_session_state() {
|
||||||
if (openxr_api) {
|
if (openxr_api) {
|
||||||
return (OpenXrSessionState)openxr_api->get_session_state();
|
return (SessionState)openxr_api->get_session_state();
|
||||||
}
|
}
|
||||||
|
|
||||||
return OPENXR_SESSION_STATE_UNKNOWN;
|
return SESSION_STATE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Hand tracking. */
|
/** Hand tracking. */
|
||||||
|
|||||||
@@ -218,19 +218,19 @@ public:
|
|||||||
void tracker_profile_changed(RID p_tracker, RID p_interaction_profile);
|
void tracker_profile_changed(RID p_tracker, RID p_interaction_profile);
|
||||||
|
|
||||||
/** Session */
|
/** Session */
|
||||||
enum OpenXrSessionState { // Should mirror XrSessionState
|
enum SessionState { // Should mirror XrSessionState
|
||||||
OPENXR_SESSION_STATE_UNKNOWN = 0,
|
SESSION_STATE_UNKNOWN = 0,
|
||||||
OPENXR_SESSION_STATE_IDLE = 1,
|
SESSION_STATE_IDLE = 1,
|
||||||
OPENXR_SESSION_STATE_READY = 2,
|
SESSION_STATE_READY = 2,
|
||||||
OPENXR_SESSION_STATE_SYNCHRONIZED = 3,
|
SESSION_STATE_SYNCHRONIZED = 3,
|
||||||
OPENXR_SESSION_STATE_VISIBLE = 4,
|
SESSION_STATE_VISIBLE = 4,
|
||||||
OPENXR_SESSION_STATE_FOCUSED = 5,
|
SESSION_STATE_FOCUSED = 5,
|
||||||
OPENXR_SESSION_STATE_STOPPING = 6,
|
SESSION_STATE_STOPPING = 6,
|
||||||
OPENXR_SESSION_STATE_LOSS_PENDING = 7,
|
SESSION_STATE_LOSS_PENDING = 7,
|
||||||
OPENXR_SESSION_STATE_EXITING = 8,
|
SESSION_STATE_EXITING = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
OpenXrSessionState get_session_state();
|
SessionState get_session_state();
|
||||||
|
|
||||||
/** Hand tracking. */
|
/** Hand tracking. */
|
||||||
enum Hand {
|
enum Hand {
|
||||||
@@ -337,7 +337,7 @@ public:
|
|||||||
~OpenXRInterface();
|
~OpenXRInterface();
|
||||||
};
|
};
|
||||||
|
|
||||||
VARIANT_ENUM_CAST(OpenXRInterface::OpenXrSessionState)
|
VARIANT_ENUM_CAST(OpenXRInterface::SessionState)
|
||||||
VARIANT_ENUM_CAST(OpenXRInterface::Hand)
|
VARIANT_ENUM_CAST(OpenXRInterface::Hand)
|
||||||
VARIANT_ENUM_CAST(OpenXRInterface::HandMotionRange)
|
VARIANT_ENUM_CAST(OpenXRInterface::HandMotionRange)
|
||||||
VARIANT_ENUM_CAST(OpenXRInterface::HandTrackedSource)
|
VARIANT_ENUM_CAST(OpenXRInterface::HandTrackedSource)
|
||||||
|
|||||||
Reference in New Issue
Block a user