Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/openvr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNat Brown <natb@valvesoftware.com>2019-01-30 02:25:26 +0300
committerNat Brown <natb@valvesoftware.com>2019-01-30 02:25:26 +0300
commitfc60d2da07de6cf906ca90ad0cf5f6a88ca85601 (patch)
tree88729f5ff4e36babdca0894fbd86e29b39d4bad4 /src
parent64fc05966a109543a1e191a45e1ab3a25a651211 (diff)
Merging using vr_steamvr_rel_to_sdk_release to create OpenVR SDK v1.2.10
General: * Added new, more specific error messages for many compositor startup failures. * Fix for IVRCompositor.GetFrameTimings C# binding (https://github.com/ValveSoftware/openvr/issues/1001) Event and Overlay changes: * Scroll events have been split into two types. The first, VREvent_ScrollDiscrete, is meant for applications that are tuned to accept primarily detented mousewheel events, which replaces the previous VREvent_Scroll event. The second, VREvent_ScrollSmooth, is for applications that are tuned for more touchscreen-like, analog scrolling. * VROverlayFlags have been updated to allow overlays to indicate their preferred scroll event type. The VROverlayFlags_SendVRDiscreteScrollEvents flag renames the VROverlayFlags_SendVRScrollEvents flag, and the overlay will receive VREvent_ScrollDiscrete events when this flag is set. The VROverlayFlags_SendVRSmoothScrollEvents flag is added, and the overlay's owning application will receive VREvent_ScrollSmooth events when this flag is set. * VREvent_Input_BindingsUpdated is sent when a user has updated controller bindings using the system input binding UI. IVRIOBuffer: * Adds ability for writers to detect if an IOBuffer has readers (IVRIOBuffer::HasReaders), to avoid potentially expensive writing work [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4924548]
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt21
-rw-r--r--src/openvr.pc.in11
-rw-r--r--src/vrcommon/hmderrors_public.cpp79
-rw-r--r--src/vrcommon/pathtools_public.cpp2
-rw-r--r--src/vrcommon/vrpathregistry_public.cpp2
5 files changed, 112 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8ac19f9..29b69c5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,6 +2,7 @@
project(openvr_api)
set( LIBNAME "openvr_api" )
+set(OPENVR_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../headers)
# Set some properies for specific files.
if(APPLE)
@@ -50,6 +51,12 @@ set(SOURCE_FILES
${VRCOMMON_FILES}
)
+set(PUBLIC_HEADER_FILES
+ ${OPENVR_HEADER_DIR}/openvr_driver.h
+ ${OPENVR_HEADER_DIR}/openvr_capi.h
+ ${OPENVR_HEADER_DIR}/openvr.h
+)
+
source_group("Src" FILES
${CORE_FILES}
)
@@ -92,6 +99,18 @@ if(USE_CUSTOM_LIBCXX)
endif()
target_link_libraries(${LIBNAME} ${EXTRA_LIBS} ${CMAKE_DL_LIBS})
-target_include_directories(${LIBNAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../headers)
+target_include_directories(${LIBNAME} PUBLIC ${OPENVR_HEADER_DIR})
install(TARGETS ${LIBNAME} DESTINATION lib)
+install(FILES ${PUBLIC_HEADER_FILES} DESTINATION include/openvr)
+
+# Generate a .pc file for linux environments
+if(PLATFORM_NAME MATCHES "linux")
+ set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
+ CONFIGURE_FILE("openvr.pc.in" "openvr.pc" @ONLY)
+
+ set(OPENVR_PC ${CMAKE_CURRENT_BINARY_DIR}/openvr.pc)
+ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
+ install(FILES ${OPENVR_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}")
+ endif()
+endif()
diff --git a/src/openvr.pc.in b/src/openvr.pc.in
new file mode 100644
index 0000000..3edba91
--- /dev/null
+++ b/src/openvr.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include/openvr
+
+Name: openvr
+Description: OpenVR is an API and runtime that allos access to VR hardware.
+Version: @OPENVR_VERSION@
+
+Libs: -L${libdir} -lopenvr_api -ldl
+Cflags: -I${includedir}
diff --git a/src/vrcommon/hmderrors_public.cpp b/src/vrcommon/hmderrors_public.cpp
index 6710f6d..a3cddc3 100644
--- a/src/vrcommon/hmderrors_public.cpp
+++ b/src/vrcommon/hmderrors_public.cpp
@@ -196,6 +196,85 @@ const char *GetIDForVRInitError( vr::EVRInitError eError )
RETURN_ENUM_AS_STRING( VRInitError_Compositor_OverlayInitFailed );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_ScreenshotsInitFailed );
RETURN_ENUM_AS_STRING( VRInitError_Compositor_UnableToCreateDevice );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_SharedStateIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_NotificationManagerIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_ResourceManagerClientIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_MessageOverlaySharedStateInitFailure );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_PropertiesInterfaceIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFullscreenWindowFailed );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_SettingsInterfaceIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToShowWindow );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_DistortInterfaceIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_DisplayFrequencyFailure );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_RendererInitializationFailed );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_DXGIFactoryInterfaceIsNull );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_DXGIFactoryCreateFailed );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_DXGIFactoryQueryFailed );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidAdapterDesktop );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidHmdAttachment );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidOutputDesktop );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidDeviceProvided );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_D3D11RendererInitializationFailed );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToFindDisplayMode );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateSwapChain );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToGetBackBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateRenderTarget );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateDXGI2SwapChain );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedtoGetDXGI2BackBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateDXGI2RenderTarget );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToGetDXGIDeviceInterface );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_SelectDisplayMode );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateNvAPIRenderTargets );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_NvAPISetDisplayMode );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_FailedToCreateDirectModeDisplay );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_InvalidHmdPropertyContainer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_UpdateDisplayFrequency );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateRasterizerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateWireframeRasterizerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateSamplerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateClampToBorderSamplerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateAnisoSamplerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlaySamplerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreatePanoramaSamplerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFontSamplerState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateNoBlendState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateAlphaBlendState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendStateMaskR );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendStateMaskG );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateBlendStateMaskB );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDepthStencilState );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDepthStencilStateNoWrite );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDepthStencilStateNoDepth );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFlushTexture );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDistortionSurfaces );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateHmdPoseConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateGeomConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreatePanelMaskConstantBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreatePixelSimUBO );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateMSAARenderTextures );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateResolveRenderTextures );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateComputeResolveRenderTextures );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateDriverDirectModeResolveTextures );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_OpenDriverDirectModeResolveTextures );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateFallbackSyncTexture );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_ShareFallbackSyncTexture );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayIndexBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateOverlayVertextBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateTextVertexBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateTextIndexBuffer );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateMirrorTextures );
+ RETURN_ENUM_AS_STRING( VRInitError_Compositor_CreateLastFrameRenderTexture );
// Vendor-specific errors
RETURN_ENUM_AS_STRING( VRInitError_VendorSpecific_UnableToConnectToOculusRuntime);
diff --git a/src/vrcommon/pathtools_public.cpp b/src/vrcommon/pathtools_public.cpp
index 7069c5e..ab299d2 100644
--- a/src/vrcommon/pathtools_public.cpp
+++ b/src/vrcommon/pathtools_public.cpp
@@ -209,7 +209,7 @@ bool Path_IsAbsolute( const std::string & sPath )
std::string Path_MakeAbsolute( const std::string & sRelativePath, const std::string & sBasePath )
{
if( Path_IsAbsolute( sRelativePath ) )
- return sRelativePath;
+ return Path_Compact( sRelativePath );
else
{
if( !Path_IsAbsolute( sBasePath ) )
diff --git a/src/vrcommon/vrpathregistry_public.cpp b/src/vrcommon/vrpathregistry_public.cpp
index 79c7351..42de3e1 100644
--- a/src/vrcommon/vrpathregistry_public.cpp
+++ b/src/vrcommon/vrpathregistry_public.cpp
@@ -402,7 +402,7 @@ bool CVRPathRegistry_Public::GetPaths( std::string *psRuntimePath, std::string *
if ( nCountEnvironmentVariables == 3 )
{
- // all three environment variables where set, so we don't need the physical file
+ // all three environment variables were set, so we don't need the physical file
return true;
}