Skip to content

Commit

Permalink
OpenVR SDK 0.9.15
Browse files Browse the repository at this point in the history
General:
* Several event members have been changes from enum values to plain-old-data types to guarantee compatibility across compiler vendors.

IVRSystem:
* PollNextEvent() and PollNextEventWithPose() now take a parameter for the size in bytes of the VREvent object you are passing in
* The data member in VREvent_t is now variable length and at the end of the structure. 

IVRApplications:
* Added VRApplicationProperty_LastLaunchTime_Uint64, which returns the last launch time for an application in seconds since January 1, 1970.

IVRCompositor:
* Compositor_FrameTiming is totally different. What should we tell people, Aaron?

IVROverlay:
* Added the ability to render an overlay wrapped around a component on a tracked controller when in the dashboard or compositor.
* k_EGamepadTextInputModeSubmit added for chat-style use of the keyboard where instead of a "Done" button there is a "Submit" button and it doesn't make the keyboard go away.
* PollNextOverlayEvent() now takes a parameter for the size in bytes of the VREvent object you are passing in
* For overlay applications there are now two new event types you can listen to, VREvent_Scroll and VREvent_TouchPadMove. These events are generated if the VROverlayFlags_SendVRScrollEvents or VROverlayFlags_SendVRTouchpadEvents flag is set on your overlay window.

IVRRenderModels:
* Added RenderModelHasComponent, which returns true if the named model has the named component.

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 3265813]
  • Loading branch information
JoeLudwig committed Jan 29, 2016
1 parent 80f2e46 commit c955710
Show file tree
Hide file tree
Showing 23 changed files with 539 additions and 352 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.
316 changes: 130 additions & 186 deletions headers/openvr.h

Large diffs are not rendered by default.

231 changes: 159 additions & 72 deletions headers/openvr_api.cs

Large diffs are not rendered by default.

189 changes: 139 additions & 50 deletions headers/openvr_api.json

Large diffs are not rendered by default.

84 changes: 54 additions & 30 deletions headers/openvr_capi.h

Large diffs are not rendered by default.

65 changes: 54 additions & 11 deletions headers/openvr_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ enum ETrackedDeviceProperty
Prop_ContainsProximitySensor_Bool = 1025,
Prop_DeviceProvidesBatteryStatus_Bool = 1026,
Prop_DeviceCanPowerOff_Bool = 1027,
Prop_Firmware_ProgrammingTarget_String = 1028,

// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
Expand All @@ -231,7 +232,7 @@ enum ETrackedDeviceProperty
Prop_UserIpdMeters_Float = 2003,
Prop_CurrentUniverseId_Uint64 = 2004,
Prop_PreviousUniverseId_Uint64 = 2005,
Prop_DisplayFirmwareVersion_String = 2006,
Prop_DisplayFirmwareVersion_Uint64 = 2006,
Prop_IsOnDesktop_Bool = 2007,
Prop_DisplayMCType_Int32 = 2008,
Prop_DisplayMCOffset_Float = 2009,
Expand All @@ -253,6 +254,8 @@ enum ETrackedDeviceProperty
Prop_LensCenterRightV_Float = 2025,
Prop_UserHeadToEyeDepthMeters_Float = 2026,
Prop_CameraFirmwareVersion_Uint64 = 2027,
Prop_CameraFirmwareDescription_String = 2028,
Prop_DisplayFPGAVersion_Uint64 = 2029,

// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
Expand All @@ -270,6 +273,7 @@ enum ETrackedDeviceProperty
Prop_FieldOfViewBottomDegrees_Float = 4003,
Prop_TrackingRangeMinimumMeters_Float = 4004,
Prop_TrackingRangeMaximumMeters_Float = 4005,
Prop_ModeLabel_String = 4006,

// Vendors are free to expose private debug data in this reserved region
Prop_VendorSpecific_Reserved_Start = 10000,
Expand Down Expand Up @@ -355,6 +359,8 @@ enum EVREventType
VREvent_MouseButtonUp = 302, // data is mouse
VREvent_FocusEnter = 303, // data is overlay
VREvent_FocusLeave = 304, // data is overlay
VREvent_Scroll = 305, // data is mouse
VREvent_TouchPadMove = 306, // data is mouse

VREvent_InputFocusCaptured = 400, // data is process
VREvent_InputFocusReleased = 401, // data is process
Expand Down Expand Up @@ -469,7 +475,7 @@ inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; }
/** used for controller button events */
struct VREvent_Controller_t
{
EVRButtonId button;
uint32_t button; // EVRButtonId enum
};


Expand All @@ -485,8 +491,35 @@ enum EVRMouseButton
/** used for simulated mouse events in overlay space */
struct VREvent_Mouse_t
{
float x, y;
EVRMouseButton button;
float x, y; // co-ords are in GL space, bottom left of the texture is 0,0
uint32_t button; // EVRMouseButton enum
};

/** used for simulated mouse wheel scroll in overlay space */
struct VREvent_Scroll_t
{
float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
uint32_t repeatCount;
};

/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger
is on the touchpad (or just released from it)
**/
struct VREvent_TouchPadMove_t
{
// true if the users finger is detected on the touch pad
bool bFingerDown;

// How long the finger has been down in seconds
float flSecondsFingerDown;

// These values indicate the starting finger position (so you can do some basic swipe stuff)
float fValueXFirst;
float fValueYFirst;

// This is the raw sampled coordinate without deadzoning
float fValueXRaw;
float fValueYRaw;
};

/** notification related events. Details will still change at this point */
Expand All @@ -496,7 +529,6 @@ struct VREvent_Notification_t
uint32_t notificationId;
};


/** Used for events about processes */
struct VREvent_Process_t
{
Expand All @@ -516,7 +548,7 @@ struct VREvent_Overlay_t
/** Used for a few events about overlays */
struct VREvent_Status_t
{
EVRState statusState;
uint32_t statusState; // EVRState enum
};

/** Used for keyboard events **/
Expand All @@ -537,8 +569,7 @@ struct VREvent_Chaperone_t
uint64_t m_nCurrentUniverse;
};

/** Not actually used for any events. It is just used to reserve
* space in the union for future event types */
/** Not actually used for any events */
struct VREvent_Reserved_t
{
uint64_t reserved0;
Expand All @@ -556,6 +587,7 @@ typedef union
VREvent_Reserved_t reserved;
VREvent_Controller_t controller;
VREvent_Mouse_t mouse;
VREvent_Scroll_t scroll;
VREvent_Process_t process;
VREvent_Notification_t notification;
VREvent_Overlay_t overlay;
Expand All @@ -564,15 +596,17 @@ typedef union
VREvent_Ipd_t ipd;
VREvent_Chaperone_t chaperone;
VREvent_PerformanceTest_t performanceTest;
VREvent_TouchPadMove_t touchPadMove;
} VREvent_Data_t;

/** An event posted by the server to all running applications */
struct VREvent_t
{
EVREventType eventType;
uint32_t eventType; // EVREventType enum
TrackedDeviceIndex_t trackedDeviceIndex;
VREvent_Data_t data;
float eventAgeSeconds;
// event data must be the end of the struct as its size is variable
VREvent_Data_t data;
};


Expand Down Expand Up @@ -779,7 +813,6 @@ enum EVRInitError

VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,

VRInitError_VendorSpecific_HmdFound_But = 1100,
VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101,
VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103,
Expand Down Expand Up @@ -993,11 +1026,21 @@ namespace vr
static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency";

//-----------------------------------------------------------------------------
// user interface keys
static const char * const k_pch_UserInterface_Section = "userinterface";
static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";

//-----------------------------------------------------------------------------
// notification keys
static const char * const k_pch_Notifications_Section = "notifications";
static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";

//-----------------------------------------------------------------------------
// keyboard keys
static const char * const k_pch_Keyboard_Section = "keyboard";
static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";

//-----------------------------------------------------------------------------
// perf keys
static const char * const k_pch_Perf_Section = "perfcheck";
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.
2 changes: 1 addition & 1 deletion samples/hellovr_opengl/hellovr_opengl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ bool CMainApplication::HandleInput()

// Process SteamVR events
vr::VREvent_t event;
while( m_pHMD->PollNextEvent( &event ) )
while( m_pHMD->PollNextEvent( &event, sizeof( event ) ) )
{
ProcessVREvent( event );
}
Expand Down
4 changes: 2 additions & 2 deletions samples/helloworldoverlay/openvroverlaycontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void COpenVROverlayController::OnTimeoutPumpEvents()
}

vr::VREvent_t vrEvent;
while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayHandle, &vrEvent ) )
while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayHandle, &vrEvent, sizeof( vrEvent ) ) )
{
switch( vrEvent.eventType )
{
Expand Down Expand Up @@ -313,7 +313,7 @@ void COpenVROverlayController::OnTimeoutPumpEvents()

if( m_ulOverlayThumbnailHandle != vr::k_ulOverlayHandleInvalid )
{
while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayThumbnailHandle, &vrEvent ) )
while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayThumbnailHandle, &vrEvent, sizeof( vrEvent) ) )
{
switch( vrEvent.eventType )
{
Expand Down

0 comments on commit c955710

Please sign in to comment.