Skip to content

Commit 4f95aae

Browse files
committed
Removed preinit, fixed eye position, fixed depth texture, sdk to 1.23.7
- Updated to SteamVR SDK 1.23.7 - Fix for unnecessary preinit #80 - Fix for incorrect reporting of eye position #86 - Fix for broken depth textures in some situations #110
1 parent ef2db16 commit 4f95aae

File tree

8 files changed

+180
-25
lines changed

8 files changed

+180
-25
lines changed

Providers/Display/Display.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,9 @@ bool OpenVRDisplayProvider::SubmitToCompositor( vr::EVREye eEye, int nStage )
763763
tex.eColorSpace = vr::ColorSpace_Auto;
764764

765765
// Check if we have a valid depth buffer
766-
if (m_pNativeDepthTextures[eEye][nStage])
767-
{
768-
tex.depth.handle = m_pNativeDepthTextures[eEye][nStage];
766+
if (m_pNativeDepthTextures[nStage][nTexIndex])
767+
{
768+
tex.depth.handle = m_pNativeDepthTextures[nStage][nTexIndex];
769769
}
770770

771771
if ( !m_bIsOverlayApplication )
@@ -1163,7 +1163,7 @@ void *OpenVRDisplayProvider::GetNativeEyeTexture( int stage, int eye )
11631163
return m_pNativeColorTextures[stage][eye];
11641164
}
11651165

1166-
1166+
11671167
void OpenVRDisplayProvider::ReleaseOverlayPointers()
11681168
{
11691169
#ifndef __linux__

Providers/Input/Input.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ void OpenVRInputProvider::OpenVRToUnityTracking( const vr::TrackedDevicePose_t &
474474
if ( postTransform )
475475
{
476476
XRMatrix4x4 &xrTrackingTransformRef = reinterpret_cast< XRMatrix4x4 & >( trackingToReference );
477-
xrTrackingTransformRef *= reinterpret_cast< XRMatrix4x4 & >( *postTransform );
477+
xrTrackingTransformRef = reinterpret_cast< XRMatrix4x4 & >( *postTransform ) * xrTrackingTransformRef;
478478
}
479479

480480
outPosition.x = trackingToReference.columns[3].x;

Providers/UserProjectSettings.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,15 @@ SetUserDefinedSettings( UserDefinedSettings settings )
493493

494494
if ( settings.actionManifestPath && strlen( settings.actionManifestPath ) > 1 )
495495
{
496+
#ifdef __linux__
497+
size_t actionManifestPathLength = strlen( settings.actionManifestPath );
498+
std::string actionManifestPath = settings.actionManifestPath;
499+
std::replace( actionManifestPath.begin(), actionManifestPath.end(), '\\', '/' );
500+
char *updatedActionManifestPath = new char[ actionManifestPathLength ];
501+
std::copy( actionManifestPath.begin(), actionManifestPath.end(), updatedActionManifestPath );
502+
settings.actionManifestPath = updatedActionManifestPath;
503+
#endif
504+
496505
if ( UserProjectSettings::FileExists( std::string( settings.actionManifestPath ) ) )
497506
{
498507
size_t strLen = strlen( settings.actionManifestPath ) + 1;
@@ -504,7 +513,12 @@ SetUserDefinedSettings( UserDefinedSettings settings )
504513
{
505514
XR_TRACE( "[OpenVR] [path] %s\n", UserProjectSettings::GetCurrentWorkingPath().c_str() );
506515

516+
#ifndef __linux__
507517
std::string fullPath = UserProjectSettings::GetCurrentWorkingPath() + "\\Assets\\" + settings.actionManifestPath;
518+
#else
519+
std::string fullPath = UserProjectSettings::GetCurrentWorkingPath() + "/Assets/" + settings.actionManifestPath;
520+
#endif
521+
508522
char *actionManifestPath = new char[fullPath.size() + 1];
509523
std::copy( fullPath.begin(), fullPath.end(), actionManifestPath );
510524
actionManifestPath[fullPath.size()] = '\0';

com.valve.openvr/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this package will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [1.2.0] - 2023-03-22
8+
### Added
9+
- Added limited OpenGL support (multipass only)
10+
### Changed
11+
- Updated to SteamVR SDK 1.23.7
12+
- Fix for unity projects set to binary serialization
13+
- Fix for unnecessary preinit #80
14+
- Fix for incorrect reporting of eye position #86
15+
- Fix for broken depth textures in some situations #110
16+
717
## [1.1.5] - 2021-11-08
818
### Changed
919
- Fixed issue with unicode paths / project names not working #108

com.valve.openvr/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ For now, to get access to controllers and other forms of input you will need to
1818
* In some circumstances the unity console will show errors on start saying "screen position out of view frustrum". This should not impact visuals.
1919
* OpenVR Mirror View Mode (default) can cause black screens in the game view. Please send us bug reports if this happens.
2020
* OpenVR Mirror View Mode requires use of Linear Color Space (Project Settings > Player > Other Settings > (Rendering) Color Space)
21+
* Linux - Vulkan - Multipass will crash.
22+
* Linux - OpenGL - Single Pass Instanced will crash.
2123

2224

2325

com.valve.openvr/Runtime/OpenVRLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ public static void TickCallback(int value)
443443
#if UNITY_EDITOR
444444
public string GetPreInitLibraryName(BuildTarget buildTarget, BuildTargetGroup buildTargetGroup)
445445
{
446-
return "XRSDKOpenVR";
446+
return null;
447447
}
448448

449449
private static void DisableTickOnReload()

0 commit comments

Comments
 (0)