Commit graph

1811 commits

Author SHA1 Message Date
Jakob Bornecrantz 541bdd2fce st/gui: Add remote device control ui 2020-10-15 21:07:40 +00:00
Jakob Bornecrantz 3483a7286d d/remote: Add remote driver 2020-10-15 21:07:40 +00:00
Jakob Bornecrantz 0cf3c704b6 st/oxr: Add simple controller bindings 2020-10-15 21:07:40 +00:00
Jakob Bornecrantz f3394320b1 xrt: Add simple controller input profile 2020-10-15 21:07:40 +00:00
Jakob Bornecrantz a200bd5fec st/oxr: Add option to disable printing to stderr 2020-10-15 01:45:51 +00:00
Jakob Bornecrantz 71e05fc21d st/oxr: Improve pose sub-path handling
If the client only supplies the 'any' path no sub-path would be
selected in the 'any' cause.
2020-10-15 01:45:51 +00:00
Jakob Bornecrantz 54739aff8d c/render: Refactor out distortion rendering 2020-10-13 19:51:13 +01:00
Jakob Bornecrantz c5741af98a c/main: Tidy names 2020-10-13 19:17:50 +01:00
Jakob Bornecrantz 4ffc0b4144 c/main: Remove viewport_id in mesh shader 2020-10-13 19:17:50 +01:00
Jakob Bornecrantz 95bdcc0bd3 c/main: Round viewport to cover the same as scissors 2020-10-13 19:17:50 +01:00
Jakob Bornecrantz 32fd9398fe c/main: Refactor shader loading to own file 2020-10-13 19:17:50 +01:00
Jakob Bornecrantz 438a8e71f9 aux/vk: Add vkFreeDescriptorSets 2020-10-13 18:59:28 +01:00
Christoph Haag c0a5b3b76c d/survive: Implement haptic feedback 2020-10-13 19:39:28 +02:00
Christoph Haag 0dcde4a597 d/vive: Actually Use defined values for default haptic frequency and min haptic duration 2020-10-13 19:39:28 +02:00
Christoph Haag 270a4143c7 d/vive: Use defines for minimum haptic frequency and unspecified haptic frequency 2020-10-13 19:39:25 +02:00
Christoph Haag 1f021a6eda xrt: Add defines for minimum haptic frequency and unspecified haptic frequency 2020-10-13 19:27:53 +02:00
Christoph Haag d959bea54a d/vive: curl thumb when touching a button 2020-10-12 22:55:33 +02:00
Christoph Haag 05f65e0028 d/survive: curl thumb when touching a button 2020-10-12 22:55:33 +02:00
Christoph Haag f8088c1fa4 d/survive: Add fingertracking and refactor
Get controller config at startup & determine variant.
2020-10-12 22:55:33 +02:00
Christoph Haag 5164488225 d/vive_controller: Add finger tracking 2020-10-12 22:55:33 +02:00
Christoph Haag ca5cbaaa6f aux: Add hand_tracking util 2020-10-12 22:55:33 +02:00
Christoph Haag 6e5206f232 ipc: Add missing position_tracking_supported passthrough 2020-10-12 22:13:48 +02:00
Christoph Haag 256e2c68d8 xrt: Implement & hook up hand joint tracking infrastructure
Include <inttypes.h> to satisfy older compilers
2020-10-12 22:13:47 +02:00
Christoph Haag 2a07c1034e d/ns: Don't create rs tracker twice on v1 2020-10-12 16:06:25 +02:00
Ryan Pavlik 9d8af39b4f t/cli: Fix build on Windows. 2020-10-08 17:26:23 -05:00
Ryan Pavlik 835beedcca u_handles: Add Win32 handle utilities 2020-10-08 17:26:22 -05:00
Ryan Pavlik 5522c7317a st/oxr: Replace __typeof__ usage with portable syntax.
Needed for building on MSVC
2020-10-08 17:26:22 -05:00
Ryan Pavlik 3faa32753d inc/xrt: have the vulkan includes include windows.h neatly.
The Vulkan header itself already does it, we just want to do it first
with the right defines.
2020-10-08 17:26:22 -05:00
Ryan Pavlik 39ede92287 build: Link aux_util against threads explicitly 2020-10-08 17:26:22 -05:00
Ryan Pavlik 8b416da12b xrt: Add Win32 Vulkan platform define when needed 2020-10-08 17:26:22 -05:00
Ryan Pavlik 938e8cb393 inc/xrt: Windows uses Win32 HANDLEs for things. 2020-10-08 17:26:22 -05:00
Ryan Pavlik 60b4fc2ba1 inc/xrt: Add a header for minimally including Windows.h 2020-10-08 17:26:22 -05:00
Ryan Pavlik 3f83b1da92 u_json: Properly silence secure CRT warnings. 2020-10-08 17:26:22 -05:00
Ryan Pavlik 48eb00f1c8 u_bitwise: Switch from static const int to defines.
Sadly MSVC didn't believe those were constant,
and this is a C file so no constexpr.
2020-10-08 17:26:22 -05:00
Jakob Bornecrantz 1750bb672f c/main: Remove none shaders 2020-10-08 15:02:52 +01:00
Jakob Bornecrantz 39ec39dbee c/main: Add more logging levels 2020-10-08 14:57:59 +01:00
Jakob Bornecrantz 813487c2f5 ipc: Use new none distortion code 2020-10-07 23:45:46 +01:00
Jakob Bornecrantz 96046d1315 d/ohmd: Use new none distortion code 2020-10-07 23:45:45 +01:00
Jakob Bornecrantz 7baf90d3d8 d/hdk: Use new none distortion code 2020-10-07 23:45:43 +01:00
Jakob Bornecrantz cd2ea960b9 d/dummy: Use new none distortion code 2020-10-07 23:45:41 +01:00
Jakob Bornecrantz 51c8575323 u/mesh: Add back none distortion generation 2020-10-07 23:45:39 +01:00
Jakob Bornecrantz b5e5322f49 c/main: Use log levels 2020-10-06 20:37:01 +01:00
Lubosz Sarnecki bbeab1da3f c/main: Use u_logging.
Remove comp_compositor_print.
2020-10-06 20:04:52 +01:00
Christoph Haag dc29c3f97e build/meson: Build daydream and arduino driver when dbus is enabled 2020-10-05 16:05:02 +00:00
Christoph Haag 5bea856f20 build/meson: Add XRT_HAVE_DBUS when dbus is found 2020-10-05 16:05:02 +00:00
Jakob Bornecrantz 92caeae39c xrt: Define XRT_FEATURE_COMPOSITOR_MAIN and XRT_FEATURE_OPENXR 2020-10-05 16:46:06 +01:00
Jakob Bornecrantz 942ba178a0 st/oxr: Add extension support for XR_KHR_composition_layer_equirect2 2020-10-05 16:45:48 +01:00
Jakob Bornecrantz 708dc80bbc external: Update OpenXR headers to 1.0.12 2020-10-05 16:34:12 +01:00
Jakob Bornecrantz c5b696cfd7 t/cli: Add lighthouse command 2020-10-05 16:22:02 +01:00
Jakob Bornecrantz 0804dc20d1 os/ble: Use logging 2020-10-05 16:22:02 +01:00
Jakob Bornecrantz 40c764a290 os/ble: Large refactor of code 2020-10-05 14:19:52 +01:00
Jakob Bornecrantz 5af976a510 os/ble: Add os_ble_broadcast_write_value function 2020-10-05 14:19:52 +01:00
Jakob Bornecrantz 5b4d45ffcc os/ble: Correct documentation on os_ble_notify_open function 2020-10-05 14:19:52 +01:00
Jakob Bornecrantz 33879da21a xrt: Add XRT_HAVE_DBUS 2020-10-05 14:19:52 +01:00
Christoph Haag a0dd182dae build/ctl: Explicitly depend on generated ipc client header
Including a header in the build target is the documented solution for depending on
the generation of files via custom targets.

Fixes build on alpine linux.
2020-10-04 23:44:16 +02:00
Jakob Bornecrantz 02b33c668b st/oxr: Destroy client compositor when session is destroyed
Fixes #99
2020-10-04 13:04:57 +01:00
Jakob Bornecrantz 9dd8bfef28 st/oxr: Use xrt_comp_native_destroy helper 2020-10-04 13:04:55 +01:00
Jakob Bornecrantz 3729f2e8c9 ipc: Free client side compositor 2020-10-04 13:04:53 +01:00
Jakob Bornecrantz 309037a445 c/client: The client compositors doesn't own the native compositor 2020-10-04 13:04:52 +01:00
Jakob Bornecrantz 6ec6c2eac9 d/dummy: Make view rotate slightly with time 2020-10-01 23:49:12 +01:00
Jakob Bornecrantz 9f39410b64 d/dummy: Make the view move slightly with time 2020-10-01 15:50:51 +01:00
Jakob Bornecrantz 9a675cc7f3 xrt: Rename xrt_uv_triplet 2020-09-30 15:35:57 +01:00
Christoph Haag bb56e5f3c5 d/openhmd: Make struct oh_device private and refactor 2020-09-30 02:08:03 +02:00
Christoph Haag f6c3998d29 xrt: Use struct vive_values for u_compute_distortion_vive 2020-09-30 02:05:05 +02:00
Christoph Haag 29188d681c xrt: Remove all but mesh distortion values from xrt_hmd_parts::distortion
Move vive values to struct u_vive_values in u_distortion_mesh.
Move openhmd values to private struct inside ohmd driver.
2020-09-30 02:05:05 +02:00
Christoph Haag c5209c5ed4 comp: Move mesh generation to comp_renderer init
Use none shader when XRT_DISTORTION_MODEL_NONE is set.
Fall back to none distortion if mesh generation fails or unsupported
distortion model is set.

comp_render init updates comp_settings::distortion_model.

u_compute_distortion_mesh: Don't touch xdev::distortion::preferred,
just add XRT_DISTORTION_MODEL_MESHUV mesh to xdev::distortion::models.
2020-09-30 02:05:05 +02:00
Christoph Haag f82f247c19 comp: Rename distortion.vert to none.vert
After removing the other shaders, it is only used for no distortion anymore.
2020-09-30 02:05:05 +02:00
Christoph Haag bc7a948975 comp: More replacing of binding indices with variables 2020-09-30 02:05:05 +02:00
Christoph Haag 2e7451ca5e comp: Support only mesh and no istortion, remove pano and vive shaders
Also changes hardcoded binding indices into variables to make following the code easier
e.g. when adding new UBOs.
2020-09-30 02:05:04 +02:00
Christoph Haag 80f6fc9039 comp: Replace hardcoded binding indices with variables
Makes it easier to follow when changing code.
2020-09-30 01:30:30 +02:00
Christoph Haag fd883e26bf d/openhmd: Fix distortion_k value ordering
Their order is opposite to the psvr panotools values.
2020-09-30 01:30:30 +02:00
Christoph Haag fb71c71a8c xrt: Replace mesh generator with xdev->compute_distortion()
Each HMD driver now has to implement compute_distortion() which will be called
by the compositor implementation to generate a mesh (usually).

u_distortion_mesh contains implementations for the defaults (panotools, OpenHMD, vive).

Also adds compute_distortion function for Vive distortion

There are differences between OpenHMD and Panotools values, main differences for now:
* psvr has 5 pano coefficients, ohmd has 3
* psvr uses viewport size and lens center in pixels for distortion calculation, ohmd in meter
* psvr uses different distortion scaling than ohmd
2020-09-28 17:04:15 +01:00
Jakob Bornecrantz 2aaa3acfdf st/oxr: Do not destroy native compositor in sub-classed session creation functions
So it's owned by the instance.
2020-09-24 19:07:01 +01:00
Jakob Bornecrantz 6961bf885f st/oxr: Don't create a new native compositor in android session
Spotted by Jarvis.
2020-09-24 19:06:51 +01:00
Christoph Haag ee8fdb45fd d/ns: remove useless assignments 2020-09-22 02:19:13 +02:00
Christoph Haag e5683d4fde comp: remove useless pano ubo from mesh distortion
It was left in as a debug measure, but is more confusing than useful,
especially with northstar directly generating a mesh and vive with its own shader.
2020-09-22 02:19:13 +02:00
Christoph Haag 3c0ae7e61e d/dummy: reduce dummy HMD resolution to 720p 2020-09-21 20:37:28 +02:00
Christoph Haag 31539c800e d/ohmd: Add (OpenHMD) suffix to openhmd driver string 2020-09-21 20:37:28 +02:00
Christoph Haag 3d0235a450 st/prober: Fix build with v4l2 disabled 2020-09-21 20:21:56 +02:00
Jakob Bornecrantz 9ebf1c4d4d st/oxr: Fix warning 2020-09-18 20:51:31 +01:00
Ryan Pavlik 6af00ed8db u/file: Stub out Linux path manip code. 2020-09-18 18:27:46 +01:00
Ryan Pavlik 6ad46cb1b2 build: Be able to build against pthreads4w 2020-09-18 18:25:27 +01:00
Ryan Pavlik 7e600dd244 build: Adjust/fix missing dependencies 2020-09-18 18:25:27 +01:00
Ryan Pavlik 6779b1c0f8 st/p: Fix include of libusb 2020-09-18 18:25:27 +01:00
Ryan Pavlik b71f13c582 st/p: Tighten preprocessor conditionals for non-Linux 2020-09-18 18:25:15 +01:00
Milan Jaros 3f4bcb412e u/threading: Cast result of realloc. 2020-09-18 17:15:33 +01:00
Ryan Pavlik 695a2c1151 u/debug: Silence warnings on MSVC 2020-09-18 17:15:33 +01:00
Ryan Pavlik f7a132e635 u/time: Fix overflow. 2020-09-18 17:15:33 +01:00
Ryan Pavlik 1dffe58952 u/json: Silence warnings on MSVC 2020-09-18 17:15:33 +01:00
Milan Jaros 7685f49adb os/threading: Fix includes on Windows 2020-09-18 17:15:33 +01:00
Milan Jaros 367c01f354 os/time: Provide time functions for Windows 2020-09-18 17:15:33 +01:00
Ryan Pavlik 7c47293c52 os/time: Implement os_nanosleep for Windows 2020-09-18 13:56:34 +01:00
Ryan Pavlik dae3ab3a4f xrt: Be sure to include config headers 2020-09-18 13:56:24 +01:00
Ryan Pavlik a0c8839a71 xrt: Remove un-needed includes of unistd 2020-09-18 13:56:16 +01:00
Ryan Pavlik 54f6aa2166 inc/xrt: Some MSVC and Windows support 2020-09-18 13:56:11 +01:00
Ryan Pavlik 3ff56f4a3c inc/xrt: Add Windows implementations of atomic intrinsics. 2020-09-18 13:56:05 +01:00
Jakob Bornecrantz c411caf0cd st/oxr: Fix return length from oxr_action_get_input_source_localized_name 2020-09-17 23:04:37 +01:00
Jakob Bornecrantz 4a62e88f09 st/oxr: Return identifier name for bindings 2020-09-17 23:04:37 +01:00
Jakob Bornecrantz b6786f5bfc st/oxr: Return controller name for bindings 2020-09-17 15:28:59 +01:00
Jakob Bornecrantz 33713c790c st/oxr: Correctly return sub path for input source 2020-09-17 00:26:12 +01:00