Commit graph

114 commits

Author SHA1 Message Date
Zach Pomerantz
34a77b47a3 Restore SDL2 comments 2016-03-28 12:25:56 -07:00
Zach Pomerantz
b94e244844 Update oculus legacy plugin 2016-03-28 12:24:31 -07:00
Zach Pomerantz
931cad34d1 Check plugin activation success 2016-03-28 12:05:58 -07:00
Zach Pomerantz
776893a5ab Improve logging for oculus errors 2016-03-28 11:22:56 -07:00
Anthony Thibault
88c4e54cff openvr: predict 3 frames into the future
Becasue I revered the latency fix in the GLEscrow queue.

*sigh*
2016-03-23 17:38:40 -07:00
Anthony J. Thibault
0d37515784 Merge branch 'master' into tony/vive-rendering-work 2016-03-23 15:59:59 -07:00
Anthony Thibault
209524a5c0 openvr: Non-threaded present work
In the unlikely event you hit 90htz in non-threaded present mode, you will have perfect tracking and latency.
This verifies that there are no other sources of tracking or rendering latency, other then the ones we already know about.
2016-03-22 15:38:10 -07:00
Zach Pomerantz
64ced6ee04 Add comment explaining bare glGetError 2016-03-22 12:04:24 -07:00
Anthony Thibault
b1286517c6 Removed frame latency in GLEscrow
This could occur if the GLEscrow queue has extra frames in it.
When new textures were fetched, before this fix, they were simply popped from the queue.
This commit introduces a loop, that will fetch from the queue until it is empty.
2016-03-21 21:51:16 -07:00
Anthony Thibault
225c462685 Improved NSIGHT instrumentation
* Application::idle, physics and avatar processing are tracked
* Application::paintGL frameNumber payload is tracked
* OpenGLDisplayPlugin::present is profiled with corresponding frameNumber payload
* Added color and payload support to Nsight ProfileRange class.
2016-03-21 21:47:59 -07:00
Anthony Thibault
0d046b12de OpenVR: Moved WaitGetPoses after main window preview. 2016-03-21 17:39:10 -07:00
Anthony Thibault
63d6f888e6 Update openvr sdk to 0.9.19 2016-03-21 17:31:13 -07:00
Anthony Thibault
5b2a050df7 display-plugins: Pulled getHeadPose into common base class.
* Moved getHeadPose and _headPoseCache out of each derived class and into HmdDisplayPlugin.
* updated comment in application.
2016-03-20 14:08:35 -07:00
Anthony J. Thibault
e1d47e7028 OculusLegacyDisplayPlugin: mac os x and linux fixes 2016-03-18 16:23:30 -07:00
Anthony J. Thibault
4321c5a62b OculusLegacyDisplayPlugin: fixes for macosx and linux 2016-03-18 15:59:48 -07:00
Anthony J. Thibault
960ffd9c9e DisplayPlugins: updateHeadPose() no longer returns a value.
Also, moved updateHeadPose so that the overlay and the main rendering use the same headPose.
Which should also be the same place the latencyMarker for the ovr_GetTrackingState is set.
2016-03-18 15:16:58 -07:00
Anthony J. Thibault
2faaf243a1 Revert change to OpenVrDisplayPlugin::isSupported() 2016-03-18 13:42:31 -07:00
Anthony J. Thibault
d218ca4960 openvr: fix for crash on exit
Before this fix, a script could call into HMD.getHUDLookAtPosition2D() while the app was shutting down, which in turn would call
getHeadPose() on the currently active display plugin.  This call could cause a crash within the openvr plugin, because the SDK was either shutdown, or in the process of shutting down on the main thread.

This fixes this by spliting the previous DisplayPlugin::getHeadPose(int) into two parts:

* updateHeadPose(int) which is only called once a frame and only by the main thread.
* getHeadPose() which is thread-safe and will return a cached copy of the hmd pose sampled by the last updateHeadPose.
2016-03-18 12:26:11 -07:00
Bradley Austin Davis
cde56d6fa2 Disable OpenVR plugin when Oculus HMD is connected 2016-03-17 10:13:52 -07:00
Bradley Austin Davis
25c8a3a0f3 Fixing legacy plugin 2016-03-17 10:13:52 -07:00
Bradley Austin Davis
b279ff9f7d Fix for crash on disabling and re-enabling openvr 2016-03-17 10:13:52 -07:00
Bradley Austin Davis
7045680bc7 Reduce crashes on switching display plugins 2016-03-17 10:13:52 -07:00
Bradley Austin Davis
384351067e Don't crash when the Rift is turned off 2016-03-16 20:16:28 -07:00
Brad Hefta-Gaub
9e0d9f5748 Merge pull request #7337 from sethalves/disable-oculus-legacy-on-linux
don't build oculus-legacy plugin on Linux
2016-03-13 12:26:37 -07:00
Brad Davis
27033e5bb5 Fix vive crash on deactivate 2016-03-12 21:48:36 -08:00
Seth Alves
d036e0618d don't build oculus-legacy plugin on linux 2016-03-12 07:54:59 -08:00
Chris Collins
ae596d79f1 Merge pull request #7317 from jherico/hmd_worn
Expose a property in display plugins to determine if the device is visible to the user
2016-03-11 11:46:06 -08:00
Philip Rosedale
e87ef52a4c Merge pull request #7302 from hyperlogic/tony/wrong-way-overlay
More reliable and usable UI sphere overlay location
2016-03-10 17:43:50 -08:00
Brad Davis
87c9961aa8 Expose a property in display plugins to determine if the device is visble to the user 2016-03-10 17:19:32 -08:00
Anthony Thibault
153f7fc3aa OpenVR: adjusted translation of UI sphere overlay 2016-03-10 09:45:47 -08:00
Anthony Thibault
42d27557a1 OpenVR: remove 180 y rotation for UI bounds.
Turns out the room I was using was misconfigured.
2016-03-09 18:42:58 -08:00
Anthony Thibault
5df616be37 OpenVR: More usable UI Sphere overlay location
Also, added a debug option to display SensorToWorld matrix in Developer > Avatar menu.
2016-03-09 16:24:08 -08:00
Brad Davis
d428f3b96f Working on crash bugs 2016-03-09 14:00:05 -08:00
Brad Davis
17852e86d2 Fixing enum names 2016-03-08 16:16:44 -08:00
Brad Davis
f651adbd24 Correcting vive button naming 2016-03-08 15:12:54 -08:00
Brad Davis
1312901f06 Removing thumb mappings, using start/back for camera and menu 2016-03-08 15:09:45 -08:00
Brad Davis
166a419e90 Oculus update 2016-03-08 11:20:53 -08:00
Brad Davis
28103cf5ef Migrate composition of the overlay and pointer to the present thread 2016-03-07 17:14:41 -08:00
Anthony Thibault
89885805d2 OpenVR: Added hysteresis to the touch pad dead spot
This should make using the Vive touch pad for movement more reliable.
2016-02-26 18:34:33 -08:00
Anthony J. Thibault
01ef5aabcb OpenVR: More reliable detection of left and right hands 2016-02-26 14:38:35 -08:00
Anthony J. Thibault
0fd260076b SixenseManager: fix velocity and angularVelocity computation
Copied the delta based computation of velocity and angularVelocity that was in
Application::setPalmData() and moved it into SixenseManager.  This will guarantee
that the velocity computation is the same as it was previously.  The goal here is
to NOT change the behavior of the hydra.

The moving average style calculation of velocities has been removed.

Removed dead code.
2016-02-22 20:05:41 -08:00
Anthony Thibault
3b87cd0ea8 Improve hold action by using controller velocity
The AvatarHoldAction now derives the body velocity by using data from the controller::Pose.  Rather then trying to derive it based on previous positions.  This results in more acurate motion of the held object when the hold is released.

OpenVR input plugin: pass the velocity and angularVelocity directly from the controller pose to the controller::Pose.
2016-02-22 19:15:22 -08:00
Anthony Thibault
942f2c13ab Vive: smoother updates for IK driven by vive controllers
Before this PR the simulation rate was clamped to never exceed 60htz.
This had problems when waving the vive hand controllers in the world,
they would jitter.  The simulation rate is now clamped to never exceed
120 htz.  This has the effect of synchronizing the display and the
update rates to 90htz.

Also there are improvements to vive support if threaded present is
disabled.
2016-02-19 15:58:13 -08:00
Anthony Thibault
93f61fce7a OpenVRDisplayPlugin: predict poses for better tracking
Extrapolate the next set of poses for HMD and hand controllers.
Currently we predict 44ms into the future, this seems too high, however
it was discovered by inspection to be the best value.
Obviously there is a source of latency that we need to track down,
however even with this latency, it is a much improved experience.
2016-02-18 18:00:04 -08:00
Brad Davis
8289c39a2a Removing flicker from OpenVR mirror 2016-02-17 14:48:24 -08:00
Brad Davis
d1583e8cbe Fixing warnings 2016-02-16 17:00:00 -08:00
Brad Davis
d61f4fbb25 PR feedback 2016-02-16 16:44:16 -08:00
Brad Davis
56fc9ea301 Remove distortion on HMD previews, both mono and stereo 2016-02-15 21:46:29 -08:00
Anthony J. Thibault
111ed65bf8 Controller Pose values are relative to Avatar.
Pass a InputCalibrationData to each inputPlugin and inputDevice.
This contains the most up sensorToWorldMatrix, avatarMat and hmdSensorMatrix.
Each input plugin can use this data to transform it's poses into Avatar space
before sending it up the chain.

This fixes a bug in the handControllerGrab.js script that relied on the hand controller
rotation/positions being in the avatar frame.
2016-02-11 17:18:01 -08:00
Brad Hefta-Gaub
d77d102384 add support for persisting the mono preview mode option 2016-02-10 22:01:17 -08:00