mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 08:00:25 +02:00
Anchored Main Menu Quad
This commit is contained in:
1 parent
913eda2b3a
commit
bd106dd1fe
6 files changed
+94
-30
No files matched your search
@@ -386,11 +386,11 @@ inline void EnsureConfigFile() {
|
||||
"# model of your kart, the vehicle included.\n"
|
||||
"first_person_hidden_model = 0\n"
|
||||
"# Keyboard shortcut that recenters the VR view, naming the key the\n"
|
||||
"# way SDL does (F9, Home, Keypad 5, ...). It moves the view to where\n"
|
||||
"# you are sitting now and nothing else: forward and the horizon come\n"
|
||||
"# from the headset's own reference space, so recentering cannot tilt\n"
|
||||
"# the game. Applies during an immersive race; the menu screen is\n"
|
||||
"# head-locked already. Rebindable from the F10 menu under VR. Leave\n"
|
||||
"# way SDL does (F9, Home, Keypad 5, ...). It moves the race view to\n"
|
||||
"# where you are sitting now and brings the menu screen back upright in\n"
|
||||
"# front of you. The race view moves in position only: forward and the\n"
|
||||
"# horizon come from the headset's own reference space, so recentering\n"
|
||||
"# cannot tilt the game. Rebindable from the F10 menu under VR. Leave\n"
|
||||
"# empty to unbind.\n"
|
||||
"recenter_key = \"F9\"\n"
|
||||
"# Fixed pitch of the game camera, in degrees, for a player sitting\n"
|
||||
|
||||
@@ -41,10 +41,17 @@ struct OpenXRD3D12GraphicsRequirements {
|
||||
struct OpenXRD3D12Presentation {
|
||||
OpenXRD3D12FrameMode mode = OpenXRD3D12FrameMode::ImmersiveProjection;
|
||||
|
||||
// Used only by VirtualScreen. The quad is head-locked in XR_VIEW_SPACE
|
||||
// and centered straight ahead at -Z.
|
||||
// Used only by VirtualScreen.
|
||||
float quad_distance_meters = 2.0f;
|
||||
float quad_width_meters = 2.4f;
|
||||
|
||||
// When quad_anchored is set, the quad is placed at quad_pose in the
|
||||
// application reference space and stays put as the player looks around.
|
||||
// Otherwise it falls back to being head-locked in XR_VIEW_SPACE, centered
|
||||
// straight ahead at -Z, which is what happens until tracking has produced a
|
||||
// head pose good enough to anchor against.
|
||||
bool quad_anchored = false;
|
||||
XrPosef quad_pose{{0.0f, 0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 0.0f}};
|
||||
};
|
||||
|
||||
struct OpenXRD3D12Frame {
|
||||
@@ -96,8 +103,9 @@ public:
|
||||
|
||||
// Releases acquired images and calls xrEndFrame. submit_layer must only be
|
||||
// true after WaitForSubmission returned Success. Immersive frames submit
|
||||
// XrCompositionLayerProjection; virtual-screen frames submit a head-locked
|
||||
// XrCompositionLayerQuad using the single mono target.
|
||||
// XrCompositionLayerProjection; virtual-screen frames submit an
|
||||
// XrCompositionLayerQuad using the single mono target, placed as the
|
||||
// presentation's quad_anchored/quad_pose describe.
|
||||
bool FinishFrame(OpenXRD3D12Frame& frame, bool submit_layer);
|
||||
|
||||
// Call on the XR owner thread after Aurora's worker is idle and before
|
||||
|
||||
@@ -36,12 +36,13 @@ void OpenXRServiceProducerFrameBoundary() noexcept;
|
||||
bool OpenXRIsRunning() noexcept;
|
||||
std::string OpenXRLastError();
|
||||
|
||||
// Recenters the view on where the player is sitting now. Position only: the
|
||||
// forward direction and the horizon come from the OpenXR reference space and
|
||||
// are never relatched from the headset, so recentering cannot tilt the game's
|
||||
// horizon. Use the runtime's own recenter gesture to change forward. Callable
|
||||
// from any thread; serviced on the XR pacing thread and ignored outside an
|
||||
// immersive race, where the head-locked menu screen has no origin to recenter.
|
||||
// Recenters on where the player is sitting now: it moves the immersive race
|
||||
// view's origin, and re-places the anchored menu screen upright in front of
|
||||
// them. Position only for the race view: the forward direction and the horizon
|
||||
// come from the OpenXR reference space and are never relatched from the
|
||||
// headset, so recentering cannot tilt the game's horizon. Use the runtime's own
|
||||
// recenter gesture to change forward. Callable from any thread; serviced once
|
||||
// per frame on the XR pacing thread.
|
||||
void OpenXRRequestRecenter() noexcept;
|
||||
|
||||
// Sets a fixed pitch of the game camera for a player sitting reclined, in
|
||||
|
||||
Reference in new issue
Block a user