Skip to content

Commit

Permalink
SDK Update 0.9.3
Browse files Browse the repository at this point in the history
General:
* Added accessors for all public OpenVR interfaces. These eliminate the need to call VR_GetGenericInterface and then cache a pointer to the result. The functions are:
  * vr::IVRSystem *VRSystem()
  * vr:: IVRChaperone*VRChaperone ()
  * vr:: IVRCompositor*VRCompositor ()
  * vr:: IVROverlay*VROverlay ()
  * vr::IVRRenderModels *VRRenderModels()
  * vr:: IVRControlPanel*VRControlPanel()
* Added VREvent_Quit to tell applications when they should exit. Applications that don’t exit will be killed after five seconds.
* Added VREvent_ProcessQuit to tell applications when another OpenVR process has exited.

C API:
* Added missing "VR_" prefixes.
* Added missing global entry points (VR_Init, VR_Shutdown, etc.).

IVRSystem:
* Added GetSortedTrackedDeviceIndicesOfClass helper function.  Useful for determining left vs right controller, etc. 
* Added properties to get battery and changing state for controllers. These are currently returning dummy values in the Lighthouse driver.
  * Prop_DeviceIsWireless_Bool
  * Prop_DeviceIsCharging_Bool
  * Prop_DeviceBatteryPercentage_Float
  * Prop_StatusDisplayTransform_Matrix34

IVRNotifications:
* Experimental version of Notifications is now in the SDK. There WILL be a breaking change to this API in a future SDK.
* Notifications API will enable creating Notification Sources that send alerts to users while they are in a VR experience.

IVRControlPanel:
* Added QuitProcess(), which tells another OpenVR process to quit. Pass in 0 to tell all OpenVR processes to quit. In the all case, 

IVRCompositor:
* Compositor_FrameTiming now additionally reports the following values:
 * m_flFrameIntervalMs
  * m_flSceneRenderCpuMs
  * m_flSceneRenderGpuMs
  * m_flCompositorRenderCpuMs
  * m_flCompositorRenderGpuMs
  * m_flPresentCallCpuMs
  * m_flRunningStartMs
* Removed IVRCompositor::SetGraphicsDevice. Applications pass in the type of a texture with each Submit call instead.
* Submit's TextureBounds no longer need to be vertically flipped for OpenGL textures.

IVROverlay:
* Renamed the “system overlay” to the Dashboard. Added CreateDashboardOverlay() to allow applications to create overlays that are intended to appear in the dashboard. 
* Removed Set/GetOverlayVisibility. This used to be used to set an overlay as a system overlay. 
* Added Set/GetOverlayColor. The overlay color (including alpha) is multiplied by the overlay’s output texture value.
* Applications that use IVROverlay no longer need to call IVRCompositor::SetGraphicsDevice(), but SetOverlayTexture takes a graphics API to identify what kind of texture is being passed in.
* SetOverlayTexture now takes a texture type.  SetOverlayTextureBounds still needs to be flipped vertically for OpenGL textures.

IVRChaperone:
*Added ReloadInfo() for forcing reload of bounds data from .vrchap. This is automatically handled by VRMonitor and the Compositor system when the config file is modified.

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 2865502]
  • Loading branch information
JoeLudwig committed Jul 6, 2015
1 parent 6e1abf5 commit 687645d
Show file tree
Hide file tree
Showing 24 changed files with 1,746 additions and 1,515 deletions.
Binary file modified bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux32/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified bin/win32/openvr_api.pdb
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll
Binary file not shown.
Binary file modified bin/win64/openvr_api.pdb
Binary file not shown.
255 changes: 150 additions & 105 deletions headers/openvr.h

Large diffs are not rendered by default.

1,167 changes: 661 additions & 506 deletions headers/openvr_api.cs

Large diffs are not rendered by default.

1,083 changes: 607 additions & 476 deletions headers/openvr_api.json

Large diffs are not rendered by default.

435 changes: 238 additions & 197 deletions headers/openvr_capi.h

Large diffs are not rendered by default.

60 changes: 51 additions & 9 deletions headers/openvr_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ enum TrackedDeviceProperty
Prop_HardwareRevision_String = 1007,
Prop_AllWirelessDongleDescriptions_String= 1008,
Prop_ConnectedWirelessDongle_String = 1009,
Prop_DeviceIsWireless_Bool = 1010,
Prop_DeviceIsCharging_Bool = 1011,
Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full
Prop_StatusDisplayTransform_Matrix34 = 1013,

// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
Expand Down Expand Up @@ -268,16 +272,20 @@ enum EVREventType

VREvent_OverlayShown = 500,
VREvent_OverlayHidden = 501,
VREvent_SystemOverlayActivated = 502,
VREvent_SystemOverlayDeactivated = 503,
VREvent_SystemOverlayThumbSelected = 504, // Handled by vrcompositor and never sent to applications - data is overlay
VREvent_DashboardActivated = 502,
VREvent_DashboardDeactivated = 503,
VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay
VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay
VREvent_ResetDashboard = 506, // Send to the overlay manager

VREvent_Notification_Show = 600,
VREvent_Notification_Dismissed = 601,
VREvent_Notification_BeginInteraction = 602,

VREvent_Notification_Dismissed = 600,
VREvent_Notification_BeginInteraction = 601,
VREvent_Notification_Scroll = 602,
VREvent_Notification_ClickOn = 603,
VREvent_Notification_ClickOff = 604,
VREvent_Quit = 700, // data is process
VREvent_ProcessQuit = 701, // data is process

VREvent_ChaperoneDataHasChanged = 800,
};


Expand Down Expand Up @@ -329,7 +337,7 @@ struct VREvent_Mouse_t
/** notification related events. Details will still change at this point */
struct VREvent_Notification_t
{
float x, y;
uint64_t ulUserValue;
uint32_t notificationId;
};

Expand Down Expand Up @@ -481,6 +489,9 @@ enum HmdError
HmdError_Driver_NotLoaded = 203,
HmdError_Driver_RuntimeOutOfDate = 204,
HmdError_Driver_HmdInUse = 205,
HmdError_Driver_NotCalibrated = 206,
HmdError_Driver_CalibrationInvalid = 207,
HmdError_Driver_HmdDisplayNotFound = 208,

HmdError_IPC_ServerInitFailed = 300,
HmdError_IPC_ConnectFailed = 301,
Expand All @@ -496,6 +507,34 @@ enum HmdError

#pragma pack( pop )

// figure out how to import from the VR API dll
#if defined(_WIN32)

#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __declspec( dllexport )
#else
#define VR_INTERFACE extern "C" __declspec( dllimport )
#endif

#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__)

#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
#else
#define VR_INTERFACE extern "C"
#endif

#else
#error "Unsupported Platform."
#endif


#if defined( _WIN32 )
#define VR_CALLTYPE __cdecl
#else
#define VR_CALLTYPE
#endif

}

#endif // _INCLUDE_VRTYPES_H
Expand Down Expand Up @@ -721,6 +760,9 @@ class ITrackedDeviceServerDriver
/** Returns a uint64 property. If the property is not available this function will return 0. */
virtual uint64_t GetUint64TrackedDeviceProperty( TrackedDeviceProperty prop, TrackedPropertyError *pError ) = 0;

/** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */
virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( TrackedDeviceProperty prop, TrackedPropertyError *pError ) = 0;

/** Returns a string property. If the property is not available this function will return 0 and pError will be
* set to an error. Otherwise it returns the length of the number of bytes necessary to hold this string including
* the trailing null. If the buffer is too small the error will be TrackedProp_BufferTooSmall. Strings will
Expand Down
Binary file modified lib/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified lib/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified lib/win32/openvr_api.lib
Binary file not shown.
Binary file modified lib/win64/openvr_api.lib
Binary file not shown.
Binary file modified samples/bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified samples/bin/win64/openvr_api.dll
Binary file not shown.
13 changes: 2 additions & 11 deletions samples/hellovr_opengl/hellovr_opengl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,6 @@ bool CMainApplication::BInitCompositor()
return false;
}

m_pCompositor->SetGraphicsDevice(vr::Compositor_DeviceType_OpenGL, NULL);

uint32_t unSize = m_pCompositor->GetLastError(NULL, 0);
if (unSize > 1)
{
Expand Down Expand Up @@ -716,15 +714,8 @@ void CMainApplication::RenderFrame()

if ( m_pCompositor )
{
// Flip y-axis since GL UV coords are backwards.
vr::VRTextureBounds_t bounds;
bounds.uMin = 0;
bounds.vMin = 1;
bounds.uMax = 1;
bounds.vMax = 0;

m_pCompositor->Submit(vr::Eye_Left, (void*)leftEyeDesc.m_nResolveTextureId, &bounds);
m_pCompositor->Submit(vr::Eye_Right, (void*)rightEyeDesc.m_nResolveTextureId, &bounds);
m_pCompositor->Submit(vr::Eye_Left, vr::API_OpenGL, (void*)leftEyeDesc.m_nResolveTextureId, NULL );
m_pCompositor->Submit(vr::Eye_Right, vr::API_OpenGL, (void*)rightEyeDesc.m_nResolveTextureId, NULL );
}
}

Expand Down
Loading

0 comments on commit 687645d

Please sign in to comment.