Skip to content

Commit

Permalink
OpenVR SDK 1.0.16
Browse files Browse the repository at this point in the history
SteamVR Input (IVRInput/IVRDriverInput):

* Added motion range parameter to UpdateSkeletonComponent in IVRDriverInput.  This allows the driver to specify which range of motion set the given transforms are for, with controller or without controller
* Added boneCount member InputSkeletalActionData struct.  This lets users know how many bones are in the target skeleton by calling GetSkeletalActionData.  
* Added GetSkeletalBoneData as a separate call to get the bone transforms.  User code should now call GetSkeletalActionData first to determine if the action is active, and if so then call GetSkeletalBoneData to retrieve the transforms.  
* Added an input example to the sample driver. This includes an input profile, localized strings, icons, etc.
* Added ulRestrictToDevice argument to GetDigitalActionData, GetAnalogActionData, GetSkeletalActionData, GetSkeletalBoneData, GetSkeletalBoneDataCompressed, and TriggerHapticVibration. This allows applications to use the same action for both hands and differentiate them when calling to fetch the actual data. To get these handles, pass "/user/hand/right" or "/user/hand/left" to IVRInput::GetInputSourceHandle.
* Added nPriority to VRActiveActionSet_t. This allows applications to control how multiple bindings from different actions sets block each other. If action set A and action set B both have something bound to the trigger, the action set with the larger priority number will be returned to the application and the action set with the smaller priority number will receive no input. If multiple action sets use the same priority number, the application will get inputs from all actions in those sets even if they're bound to the same input source.

IVRRenderModels:

* Added GetComponentStateForDevicePath, which allows applications to animate controller components while using the new input system. To get these handles, pass "/user/hand/right" or "/user/hand/left" to IVRInput::GetInputSourceHandle or use the devicePath field in the structure filled out by IVRInput::GetOriginTrackedDeviceInfo.

IVRSpatialAnchors:

* Add a new interface that lets clients request driver descriptors for physical locations.  These descriptors are opaque strings that are stored by the client until they want to recover that position for future use.  The driver can update the coordinates whenever it has better information (for example when the HMD gets physically closer to the original location).  The client should treat active anchors like object poses that could update at any time.  Drivers don't have to implement any special support for this, in which case the runtime will provide fallback descriptors which are no better or worse than just having the application record virtual coordinates.  As of this release, no drivers are providing special descriptors.  This interface is present for prototyping but is not recommended for production use at this time.  Further documentation is provided in the associated headers.

IVRVirtualDisplay:

* Added the ability for DisplayRedirect devices to disable mura correction in the compositor (set Prop_DriverRequestedMuraCorrectionMode_Int32 to EVRMuraCorrectionMode_NoCorrection).
* Added the ability for DisplayRedirect devices to specify parameters to use for mura feathering.  This is to allow DisplayRedirect devices that use the IVRVirtualDisplay interface to handle only a subset of mura correction in the middle of the display, while the compositor continues to correct the outer area.  Mura correction values are linearly interpolated to zero over the specified ranges in pixels; corners use the max value.

IVRCompositorPluginProvider:

* Initial support for loading SteamVR drivers in the compositor process.  Currently only supports IVRVirtualDisplay components in order to provide async reprojection support.

New texture submission formats for macOS 10.14:

 * macOS 10.14 now supports cross-process sharable MTLTexture objects. Applications on macOS 10.14 or higher should prefer submitting textures to the compositor using TextureType_Metal rather than TextureType_IOSurface.
 * TextureType_Metal textures of type MTLTextureType2D and MTLTextureType2DArray can be submitted to IVRCompositor::Submit. When submitting MTLTextureType2DArray textures, the compositor assumes layer 0 is the left eye texture (vr::EVREye::Eye_left) and layer 1 is the right eye texture (vr::EVREye::Eye_Right). Applications must still call IVRCompositor::Submit twice, once for each eye, when submitting MTLTextureType2DArray textures, and the two layers of the texture will only be utilized if the same MTLTexturetype2DArray texture is submitted to each call.

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4637165]
  • Loading branch information
JoeLudwig committed Jul 27, 2018
1 parent 60eb187 commit 6aacebd
Show file tree
Hide file tree
Showing 49 changed files with 1,823 additions and 202 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.
363 changes: 321 additions & 42 deletions headers/openvr.h

Large diffs are not rendered by default.

436 changes: 398 additions & 38 deletions headers/openvr_api.cs

Large diffs are not rendered by default.

222 changes: 188 additions & 34 deletions headers/openvr_api.json

Large diffs are not rendered by default.

144 changes: 126 additions & 18 deletions headers/openvr_capi.h

Large diffs are not rendered by default.

413 changes: 401 additions & 12 deletions headers/openvr_driver.h

Large diffs are not rendered by default.

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.
13 changes: 12 additions & 1 deletion samples/bin/drivers/sample/resources/driver.vrresources
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@
"Model-v2.0" : {
"Alias" : "Model-v1.0",
"Prop_NamedIconPathDeviceAlertLow_String" : "{sample}/icons/headset_model2_alertlow.png"
},

"Controller" : {
"Prop_NamedIconPathDeviceOff_String" : "{sample}/icons/controller_status_off.png",
"Prop_NamedIconPathDeviceSearching_String" : "{sample}/icons/controller_status_searching.gif",
"Prop_NamedIconPathDeviceSearchingAlert_String" : "{sample}/icons/controller_status_searching_alert.gif",
"Prop_NamedIconPathDeviceReady_String" : "{sample}/icons/controller_status_ready.png",
"Prop_NamedIconPathDeviceReadyAlert_String" : "{sample}/icons/controller_status_ready_alert.png",
"Prop_NamedIconPathDeviceNotReady_String" : "{sample}/icons/controller_status_error.png",
"Prop_NamedIconPathDeviceStandby_String" : "{sample}/icons/controller_status_standby.png",
"Prop_NamedIconPathDeviceAlertLow_String" : "{sample}/icons/controller_status_ready_low.png"
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"bindings" : {
"/actions/legacy" : {
"sources" : [
{
"inputs" : {
"single" : {
"output" : "/actions/legacy/in/right_axis1_press"
}
},
"mode" : "button",
"parameters" : {
"sub_mode" : "complex"
},
"path" : "/user/hand/right/input/a"
},
{
"inputs" : {
"single" : {
"output" : "/actions/legacy/in/right_a_press"
}
},
"mode" : "button",
"parameters" : {
"sub_mode" : "complex"
},
"path" : "/user/hand/right/input/c"
},
{
"inputs" : {
"single" : {
"output" : "/actions/legacy/in/right_grip_press"
}
},
"mode" : "button",
"parameters" : {
"sub_mode" : "complex"
},
"path" : "/user/hand/right/input/b"
}
]
}
},
"controller_type" : "mycontroller",
"description" : "",
"name" : "Default binding for Sample Driver Controller for legacy applications"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"jsonid": "input_profile",
"legacy_binding": "{sample}/input/legacy_binding_mycontroller.json",
"controller_type": "mycontroller",
"input_bindingui_mode": "single_device",
"input_bindingui_right": {
"image": "{sample}/icons/sample_controller.svg"
},
"input_source": {
"/input/a": {
"binding_image_point": [ 80, 60 ],
"type": "button",
"order": 1
},
"/input/b": {
"binding_image_point": [ 250, 60 ],
"type": "button",
"order": 2
},
"/input/c": {
"binding_image_point": [ 450, 60 ],
"type": "button",
"order": 3
},
"/output/haptic": {
"binding_image_point": [ 300, 150 ],
"type": "vibration",
"order": 4
}
},
"default_bindings": [
{
"app_key": "openvr.component.vrcompositor",
"binding_url": "vrcompositor_binding_mycontroller.json"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"app_key" : "openvr.component.vrcompositor",
"bindings" : {
"/actions/lasermouse" : {
"sources" : [
{
"inputs" : {
"single" : {
"output" : "/actions/lasermouse/in/leftclick"
}
},
"mode" : "button",
"path" : "/devices/sample/CTRL_1234/input/b"
}
]
},
"/actions/system" : {
"sources" : [
{
"inputs" : {
"single" : {
"output" : "/actions/system/in/toggledashboard"
}
},
"mode" : "button",
"parameters" : {
"sub_mode" : "complex"
},
"path" : "/devices/sample/CTRL_1234/input/a"
}
]
}
},
"controller_type" : "mycontroller",
"description" : "",
"name" : "My VR Compositor configuration for mycontroller"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"language_tag": "en_US",
"mycontroller" : "Sample Driver Controller",

"/input/c" : "'C' key"
}
]
17 changes: 9 additions & 8 deletions samples/bin/hellovr_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"default_bindings": [
{
"controller_type" : "vive_controller",
"binding_url" : "hellovr_bindings_vive_controller"
"binding_url" : "hellovr_bindings_vive_controller.json"
}
],
"actions": [
Expand All @@ -15,7 +15,7 @@
"type": "boolean"
},
{
"name": "/actions/demo/in/TriggerHaptic",
"name": "/actions/demo/in/triggerhaptic",
"type": "boolean"
},
{
Expand All @@ -31,24 +31,25 @@
"type": "pose"
},
{
"name": "/actions/demo/out/Haptic_Left",
"name": "/actions/demo/out/haptic_left",
"type": "vibration"
},
{
"name": "/actions/demo/out/Haptic_Right",
"name": "/actions/demo/out/haptic_right",
"type": "vibration"
}
],
"localization" : [
{
"language_tag": "en",
"language_tag": "en_US",
"/actions/demo/in/HideCubes" : "Hide Cubes",
"/actions/demo/in/TriggerHaptic" : "Trigger Haptic Pulse",
"/actions/demo/in/HideThisController" : "Hide this Controller",
"/actions/demo/in/triggerhaptic" : "Trigger Haptic Pulse",
"/actions/demo/in/AnalogInput" : "Analog Input",
"/actions/demo/in/Hand_Right" : "Right Hand Pose",
"/actions/demo/in/Hand_Left" : "Left Hand Pose",
"/actions/demo/out/Haptic_Left" : "Left Haptic Feedback",
"/actions/demo/out/Haptic_Right" : "Right Haptic Feedback"
"/actions/demo/out/haptic_left" : "Left Haptic Feedback",
"/actions/demo/out/haptic_right" : "Right Haptic Feedback"
}
]
}
10 changes: 10 additions & 0 deletions samples/bin/hellovr_bindings_vive_controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
"path" : "/user/hand/right/pose/raw"
}
],
"haptics" : [
{
"output" : "/actions/demo/out/haptic_right",
"path" : "/user/hand/right/output/haptic"
},
{
"output" : "/actions/demo/out/haptic_left",
"path" : "/user/hand/left/output/haptic"
}
],
"sources" : [
{
"inputs" : {
Expand Down
Binary file modified samples/bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified samples/bin/osx32/libopenvr_api.dylib
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.
Loading

1 comment on commit 6aacebd

@muchcharles
Copy link

@muchcharles muchcharles commented on 6aacebd Aug 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoeLudwig I saw in latest beta notes that Vive controller has a new firmware to support the new haptics API in here. Is there a way to query whether the controller has been updated to support the new API? And/or does the driver emulate it as a fallback as best as possible?

Also, is there a way to get the valid frequency ranges, etc., and does the new API allow superimposing multiple events or does a new call to TriggerHapticVibration cancel existing playing ones?

Please sign in to comment.